source: projects/specs/branches/6/n/nss_ldap/nss_ldap-vl.spec @ 3255

Revision 3255, 19.7 KB checked in by daisuke, 13 years ago (diff)

nss_ldap: rebuild with new krb5

Line 
1%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
2
3%define pam_ldap_version 184
4Summary: NSS library and PAM module for LDAP
5Summary(ja): LDAP を利用する NSS ライブラリ および PAM モジュール
6Name: nss_ldap
7Version: 264
8Release: 3%{?_dist_release}
9URL: http://www.padl.com/
10License: LGPLv2+
11Group: System Environment/Base
12
13Source0: ftp://ftp.padl.com/pub/nss_ldap-%{version}.tar.gz
14Source1: ftp://ftp.padl.com/pub/pam_ldap-%{pam_ldap_version}.tar.gz
15Source3: nss_ldap.versions
16Source4: pam_ldap.versions
17Source5: README.TLS
18Source6: version.c
19Source7: dlopen.sh
20
21Patch0: pam_ldap-184-dnsconfig.patch
22Patch1: pam_ldap-180-local_users.patch
23Patch3: pam_ldap-180-install-perms.patch
24Patch4: pam_ldap-180-bind.patch
25Patch6: nss_ldap-257-over-recursion.patch
26Patch7: pam_ldap-182-manpointer.patch
27Patch8: nss_ldap-254-soname.patch
28Patch11: nss_ldap-257-initgroups-minimum_uid.patch
29Patch13: pam_ldap-176-exop-modify.patch
30Patch15: nss_ldap-257-mozldap.patch
31Patch16: pam_ldap-184-referral-passwd2.patch
32Patch17: nss_ldap-259-res_init.patch
33Patch19: pam_ldap-184-broken-sasl-rebind.patch
34Patch20: pam_ldap-184-nsrole.patch
35Patch22: nss_ldap-264-ent_internal.patch
36Patch23: pam_ldap-183-releaseconfig.patch
37Patch24: nss_ldap-264-cloexec.patch
38
39BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
40BuildRequires: autoconf, automake, libtool
41BuildRequires: openssl-devel, pam-devel
42BuildRequires: cyrus-sasl-devel >= 2.1
43BuildRequires: openldap-devel >= 2.0.27
44BuildRequires: krb5-devel >= 1.4
45Requires: nscd
46Obsoletes: pam_ldap
47Requires(post): grep, sed, coreutils, /sbin/ldconfig
48
49%description
50This package includes two LDAP access clients: nss_ldap and pam_ldap.
51Nss_ldap is a set of C library extensions that allow X.500 and LDAP
52directory servers to be used as a primary source of aliases, ethers,
53groups, hosts, networks, protocol, users, RPCs, services, and shadow
54passwords (instead of or in addition to using flat files or NIS).
55
56Pam_ldap is a module for Linux-PAM that supports password changes, V2
57clients, Netscape's SSL, ypldapd, Netscape Directory Server password
58policies, access authorization, and crypted hashes.
59
60# compat32
61%package -n compat32-%{name}
62Summary: NSS library and PAM module for LDAP
63Summary(ja): LDAP を利用する NSS ライブラリ および PAM モジュール
64Group: System Environment/Base
65Requires: %{name} = %{version}-%{release}
66
67%description -n compat32-%{name}
68This package includes two LDAP access clients: nss_ldap and pam_ldap.
69Nss_ldap is a set of C library extensions that allow X.500 and LDAP
70directory servers to be used as a primary source of aliases, ethers,
71groups, hosts, networks, protocol, users, RPCs, services, and shadow
72passwords (instead of or in addition to using flat files or NIS).
73
74Pam_ldap is a module for Linux-PAM that supports password changes, V2
75clients, Netscape's SSL, ypldapd, Netscape Directory Server password
76policies, access authorization, and crypted hashes.
77
78%prep
79%setup -q -c -a 1
80cp %{SOURCE5} .
81cp nss_ldap-%{version}/ldap.conf ldap.conf.nss_ldap
82cp pam_ldap-%{pam_ldap_version}/ldap.conf ldap.conf.pam_ldap
83
84cp nss_ldap-%{version}/resolve.c pam_ldap-%{pam_ldap_version}/
85cp nss_ldap-%{version}/resolve.h pam_ldap-%{pam_ldap_version}/
86cp nss_ldap-%{version}/snprintf.c pam_ldap-%{pam_ldap_version}/
87cp nss_ldap-%{version}/snprintf.h pam_ldap-%{pam_ldap_version}/
88
89pushd nss_ldap-%{version}
90%patch8 -p1 -b .soname
91%patch17 -p1 -b .res_init
92%patch22 -p1 -b .ent_internal
93%patch24 -p1 -b .cloexec
94autoreconf -f -i
95popd
96
97pushd pam_ldap-%{pam_ldap_version}
98%patch0 -p1 -b .dnsconfig
99%patch3 -p1 -b .install-perms
100%patch4 -p1 -b .bind
101%patch1 -p1 -b .local_users
102%patch7 -p1 -b .manpointer
103%patch13 -p1 -b .exop-modify
104%patch16 -p1 -b .referral-passwd2
105%patch19 -p1 -b .broken-sasl-rebind
106%patch20 -p1 -b .nsrole
107%patch23 -p1 -b .releaseconfig
108autoreconf -f -i
109popd
110
111rm -f pam.d/*.pam_console
112
113cp nss_ldap-%{version}/ANNOUNCE             ANNOUNCE.nss_ldap
114cp nss_ldap-%{version}/AUTHORS              AUTHORS.nss_ldap
115cp nss_ldap-%{version}/ChangeLog            ChangeLog.nss_ldap
116cp nss_ldap-%{version}/COPYING              COPYING.nss_ldap
117cp nss_ldap-%{version}/NEWS                 NEWS.nss_ldap
118cp nss_ldap-%{version}/README               README.nss_ldap
119cp nss_ldap-%{version}/nsswitch.ldap        nsswitch.ldap
120cp pam_ldap-%{pam_ldap_version}/AUTHORS     AUTHORS.pam_ldap
121cp pam_ldap-%{pam_ldap_version}/ChangeLog   ChangeLog.pam_ldap
122cp pam_ldap-%{pam_ldap_version}/COPYING     COPYING.pam_ldap
123cp pam_ldap-%{pam_ldap_version}/COPYING.LIB COPYING.LIB.pam_ldap
124cp pam_ldap-%{pam_ldap_version}/NEWS        NEWS.pam_ldap
125cp pam_ldap-%{pam_ldap_version}/README      README.pam_ldap
126
127cp %{_datadir}/libtool/config/config.{sub,guess} nss_ldap-%{version}/
128cp %{_datadir}/libtool/config/config.{sub,guess} pam_ldap-%{pam_ldap_version}/
129
130%build
131# We're building modules here, so make sure -fPIC is always used.
132CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
133
134# Build pam_ldap.
135pushd pam_ldap-%{pam_ldap_version}
136%configure --libdir=/%{_lib}
137make %{?_smp_mflags}
138popd
139
140pushd nss_ldap-%{version}
141%configure \
142        --with-ldap=openldap \
143        --enable-schema-mapping \
144        --enable-rfc2307bis \
145        --enable-configurable-krb5-ccname-gssapi
146make %{?_smp_mflags} LIBS="-Wl,-Bstatic -lldap -llber -Wl,-Bdynamic -lsasl2 -lgssapi_krb5 -lssl -ldl -lpthread_nonshared -lnsl -lresolv"
147popd
148
149# Check that the modules are actually loadable.
150%{SOURCE7}       ./nss_ldap-%{version}/nss_ldap.so
151%{SOURCE7} -lpam ./pam_ldap-%{pam_ldap_version}/pam_ldap.so
152
153%install
154[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
155mkdir -p $RPM_BUILD_ROOT/{etc,%{_lib}/security,%{_libdir}}
156
157# Let the nss_ldap install target do its thing, skipping the chown/chgrp bits
158# and making sure we only get one libc version, even on multilib boxen.
159# We used to do some gymnastics to match the form of libnss_ldap-$libcversion.so
160# filenames that the glibc-bundled modules do, but that doesn't tell us anything
161# more than which version of libc was available at build time.  People tend to
162# assume that's also the nss_ldap version, too, so forget that.
163libcver=%{version}
164make -C nss_ldap-%{version} install \
165        DESTDIR=$RPM_BUILD_ROOT \
166        INST_UID=`id -un` INST_GID=`id -gn` \
167        LIBC_VERS=$libcver
168
169# Install the direct-linking symlink.
170ln -s libnss_ldap-$libcver.so $RPM_BUILD_ROOT/%{_libdir}/libnss_ldap.so
171
172# Install the module for PAM.
173pushd pam_ldap-%{pam_ldap_version}
174make install DESTDIR=$RPM_BUILD_ROOT
175
176# Install the default configuration file, but change the search bases to
177# something generic to avoid overloading padl.com servers and to match
178# good practice when using DNS domains in example configurations.
179sed 's|dc=padl|dc=example|g' ldap.conf > $RPM_BUILD_ROOT/etc/ldap.conf
180chmod 644 $RPM_BUILD_ROOT/etc/ldap.conf
181popd
182
183# Remove a doc file from /etc; we'll included it as a %%doc file.
184rm -f $RPM_BUILD_ROOT/etc/nsswitch.ldap
185
186# The makefile assumes installation into /lib, which is incorrect.
187rm -f $RPM_BUILD_ROOT/%{_libdir}/../%{_libdir}/libnss_ldap.so.2
188
189%clean
190[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
191
192%post
193/sbin/ldconfig
194# Fix a logic mismatch between what the version of authconfig in RHL 7.2 would
195# generate and this version of pam_ldap.
196if grep -q '^account     required      /lib/security/pam_ldap.so$' /etc/pam.d/system-auth ; then
197        newfile=`mktemp /etc/pam.d/system-auth-XXXXXX`
198        if [ ! -z "$newfile" ] ; then
199                cat /etc/pam.d/system-auth > $newfile
200                sed 's,account     required      /lib/security/pam_ldap.so,account     [default=bad success=ok user_unknown=ignore service_err=ignore system_err=ignore] pam_ldap.so,g' $newfile > /etc/pam.d/system-auth
201                rm -f $newfile
202        fi
203fi
204
205%postun -p /sbin/ldconfig
206
207%post -n compat32-%{name} -p /sbin/ldconfig
208%postun -n compat32-%{name} -p /sbin/ldconfig
209
210%files
211%defattr(-,root,root)
212%attr(0755,root,root) /%{_libdir}/libnss_ldap-*.so
213%attr(0755,root,root) /%{_libdir}/libnss_ldap.so.?
214%attr(0755,root,root) /%{_lib}/security/*.so*
215%attr(0755,root,root) %{_libdir}/libnss_ldap.so
216%attr(0644,root,root) %{_mandir}/man5/*.5*
217%attr(0644,root,root) %config(noreplace) /etc/ldap.conf
218%doc README.TLS
219%doc nsswitch.ldap *.nss_ldap *.pam_ldap
220%doc pam_ldap-%{pam_ldap_version}/pam.d
221%doc pam_ldap-%{pam_ldap_version}/ldapns.schema
222%doc pam_ldap-%{pam_ldap_version}/ns-pwd-policy.schema
223
224%if %{build_compat32}
225%files -n compat32-%{name}
226%defattr(-,root,root)
227%attr(0755,root,root) /%{_libdir}/libnss_ldap-*.so
228%attr(0755,root,root) /%{_libdir}/libnss_ldap.so.?
229%attr(0755,root,root) %{_libdir}/libnss_ldap.so
230%endif
231
232%changelog
233* Sat Apr 02 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 264-3
234- rebuild with krb5-1.8.2
235
236* Tue Jan 11 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 264-2
237- rebuild with openssl-1.0.0c
238
239* Fri Aug 14 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 264-1
240- new upstream release
241  - update to nss_ldap-264
242- merged with fedora package
243- enable krb5, add BR: krb5-devel
244- add compat32 package
245
246* Sun Jan 04 2009 NAKAMURA Kenta <kenta@vinelinux.org> 261-2
247- rebuilt with openldap-2.4.11
248
249* Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 261-1
250- new upstream release
251  - update to nss_ldap-261, pam_ldap-184
252- merged with fedora package
253
254* Mon Aug 28 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 251-0vl1
255- new upstream release
256  - update to nss_ldap-251, pam_ldap-182
257
258* Sun Aug 27 2006 NAKAMURA Kenta <kenta@vinelinux.org> 249-0vl3
259- rebuilt with openldap-2.3.27-0vl1
260
261* Sun Jul 02 2006 Satoshi MACHINO <machino@vinelinux.org> 249-0vl2
262- rebuilt with openldap-2.3.24-0vl1
263
264* Thu Mar 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 249-0vl1
265- new upstream release
266  needed by new pam package. (thanks to Hideki MIWA)
267- remove unneeded patches(0,1,2,3)
268
269* Sat Apr 10 2004 Satoshi MACHINO <machino@vinelinux.org> 217-1vl1
270- new upstream version
271- merged fedora core's package
272  * Thu Mar 25 2004 Nalin Dahyabhai <nalin@redhat.com> 217-1
273  - include patch to set errno to ENOENT when returning NSS_STATUS_NOTFOUND to
274  glibc
275  * Tue Mar 23 2004 Nalin Dahyabhai <nalin@redhat.com>
276  - update to 217
277  * Wed Mar 10 2004 Nalin Dahyabhai <nalin@redhat.com> 212-1
278  - update to 212, pam_ldap 167
279  - link nss_ldap with libgssapi_krb5, the static libsasl2 includes the gssapi
280    mech, at least for now, and we pick up its unresolved symbols at link-time
281  - fix out-of-bounds error at initialization-time (part of #101269)
282  - include pam_ldap's authorization schema files for slapd as a doc file
283  * Thu Nov 20 2003 Nalin Dahyabhai <nalin@redhat.com> 207-5
284  - fix objectclass and attribute mapping, which failed due to uninitialized
285    fields in mapping index structures, fixed upstream in 210 (#110547)
286  * Mon Nov 10 2003 Nalin Dahyabhai <nalin@redhat.com> 207-4
287  - link with the proper libsasl (1 or 2) for the version of OpenLDAP we
288    are linking with (#106801)
289  * Thu Aug 14 2003 Nalin Dahyabhai <nalin@redhat.com> 207-3
290  - link dynamically with libcom_err if it isn't in /usr/kerberos/%{_lib} (which
291    we assume means that it's in /%{_lib})
292  * Wed Aug 13 2003 Nalin Dahyabhai <nalin@redhat.com> 207-2
293  - relax openldap-devel buildreq to 2.0.27
294  * Thu Jun  5 2003 Nalin Dahyabhai <nalin@redhat.com> 207-1
295  - update to build with newer OpenLDAP
296  - add README.TLS to remind people that in order for TLS support to be usable,
297    the server's certificate has to pass validation checks made by the client
298  * Sun Mar 09 2003 Florian La Roche <Florian.LaRoche@redhat.de>
299  - move pam into /lib64/security directory
300  * Wed Jan 15 2003 Nalin Dahyabhai <nalin@redhat.com> 202-4
301  - rework static link order to account for libssl requiring libkrb5
302  - force assembly locking on %%ix86 systems
303  - link with libz, which libssl also requires
304  * Thu Dec 12 2002 Elliot Lee <sopwith@redhat.com> 202-3
305  - Fix wildcard for symlink in %%install
306  * Thu Nov 14 2002 Nalin Dahyabhai <nalin@redhat.com> 202-2
307  - apply DB patches from sleepycat.com
308  - correctly point nss_ldap at the bundled DB library
309  - create /%%{_lib} instead of /lib to install into
310  * Wed Oct  2 2002 Nalin Dahyabhai <nalin@redhat.com> 202-1
311  - update to nss_ldap 202, pam_ldap 153
312  - update DB from 4.0.14 to 4.1.24.NC
313  - try to address multilib path changes
314  * Fri Aug  9 2002 Nalin Dahyabhai <nalin@redhat.com> 198-2
315  - handle larger-than-expected DNS responses correctly
316  * Wed Aug  7 2002 Nalin Dahyabhai <nalin@redhat.com> 198-1
317  - update to nss_ldap 198, closing a possible buffer overflow in DNS autoconfig
318  * Fri Jul 19 2002 Nalin Dahyabhai <nalin@redhat.com> 197-1
319  - update to nss_ldap 197, pam_ldap 150
320  * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
321  - automated rebuild
322  * Mon Jun 10 2002 Nalin Dahyabhai <nalin@redhat.com> 194-1
323  - update to nss_ldap 194, pam_ldap 148
324  * Sun May 26 2002 Tim Powers <timp@redhat.com>
325  - automated rebuild
326  * Mon May 20 2002 Nalin Dahyabhai <nalin@redhat.com> 189-3
327  - rebuild in new environment
328  * Thu May 16 2002 Nalin Dahyabhai <nalin@redhat.com> 189-2
329  - build for RHL 7.2/7.3
330  * Thu May 16 2002 Nalin Dahyabhai <nalin@redhat.com> 189-1.7
331  - build for RHL 7/7.1
332  * Thu May 16 2002 Nalin Dahyabhai <nalin@redhat.com> 189-1.6
333  - fix up logic generated by authconfig from RHL 7.2 in %%post
334  - build for RHL 6.x
335  * Wed May 15 2002 Nalin Dahyabhai <nalin@redhat.com>
336  - the triggerun should be a trigger postun
337  * Tue May  7 2002 Nalin Dahyabhai <nalin@redhat.com> 189-0.6
338  - update to nss_ldap 189, pam_ldap 145
339  * Tue May  7 2002 Nalin Dahyabhai <nalin@redhat.com> 188-0.6
340  - rebuild for RHL 6.2
341  - change dependency on pam-devel to /usr/include/security/pam_modules.h
342  - drop build deps on cyrus-sasl-devel and openldap >= 2.x
343  - modify pam_ldap versions file so that binutils from RHL 6.2 can parse it
344  - update to nss_ldap 188
345  - update to pam_ldap 144
346  * Fri Apr  5 2002 Nalin Dahyabhai <nalin@redhat.com> 185-1
347  - update to nss_ldap 185
348  - update to pam_ldap 140
349  * Thu Feb 28 2002 Nalin Dahyabhai <nalin@redhat.com> 184-1
350  - update to pam_ldap 138
351  - enable rfc2307bis schema support
352  - version the pam_ldap module
353  - add the proper soname to the nss_ldap module and remove the symlink
354  - add a trigger to run ldconfig again when an upgrade removes the symlink,
355    which used to be in this package (doh!)
356  - fix the symlink from %%{_libdir} to the module (for linking directly to it)
357  * Thu Feb 14 2002 Nalin Dahyabhai <nalin@redhat.com>
358  - update to nss_ldap 184, pam_ldap 137
359
360* Thu Apr 10 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 181-1vl2
361- rebuild
362                                                                               
363* Sat Jan 26 2002 MACHINO Satoshi <machino@vinelinux.org> 181-1vl1
364- updated to nss_ldap 181, pam_ldap 136
365                                                                               
366* Sun Nov 19 2000 Satoshi MACHINO <machino@vinelinux.org> 122-4vl1
367- build with gcc-2.95.3
368- removed krb5-devel in BuildPrereq tag
369- removed nss_ldap-122-redhat.patch
370- added nss_ldap-122-vine.patch
371- partially used rpmmacros
372                                                                               
373* Fri Oct 27 2000 Nalin Dahyabhai <nalin@redhat.com>
374- update to nss_ldap 122
375- link statically with libsasl, require the first devel package that supplied it                                                                               
376                                                                               
377* Thu Oct 19 2000 Nalin Dahyabhai <nalin@redhat.com>
378- update to nss_ldap 120 and pam_ldap 77
379                                                                               
380* Wed Oct  4 2000 Nalin Dahyabhai <nalin@redhat.com>
381- update to nss_ldap 116 and pam_ldap 74
382
383* Fri Sep  7 2000 Nalin Dahyabhai <nalin@redhat.com>
384- rebuild in new environment
385                                                                               
386* Thu Jul 27 2000 Nalin Dahyabhai <nalin@redhat.com>
387- update to pam_ldap 67 to fix a bug in template user code
388- convert symlink in /usr/lib to a relative one (#16132)
389                                                                               
390* Thu Jul 27 2000 Nalin Dahyabhai <nalin@redhat.com>
391- update to nss_ldap 113 and pam_ldap 66
392                                                                               
393* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
394- automatic rebuild
395                                                                               
396* Tue Jun 27 2000 Matt Wilson <msw@redhat.com>
397- changed all the -,- in attr statements to root,root
398                                                                               
399* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
400- update pam_ldap to 63
401                                                                               
402* Wed May 31 2000 Nalin Dahyabhai <nalin@redhat.com>
403- update pam_ldap to 56
404                                                                               
405* Tue May 30 2000 Nalin Dahyabhai <nalin@redhat.com>
406- update pam_ldap to 55
407- back out no-threads patch for pam_ldap, not needed any more
408                                                                               
409* Thu May 25 2000 Nalin Dahyabhai <nalin@redhat.com>
410- update to 110
411- revert prototype patch, looks like a problem with the new glibc after all
412                                                                               
413* Fri May 19 2000 Nalin Dahyabhai <nalin@redhat.com>
414- get libpthread out of the NSS module
415- fix prototype problems in getpwXXX()
416                                                                               
417* Mon May 15 2000 Nalin Dahyabhai <nalin@redhat.com>
418- update to nss_ldap 109
419                                                                               
420* Sat Apr 29 2000 Nalin Dahyabhai <nalin@redhat.com>
421- update pam_ldap 51
422                                                                               
423* Tue Apr 25 2000 Nalin Dahyabhai <nalin@redhat.com>
424- update to nss_ldap 108 and pam_ldap 49
425                                                                               
426* Thu Apr 20 2000 Nalin Dahyabhai <nalin@redhat.com>
427- update to pam_ldap 48
428
429* Thu Mar 30 2000 Nalin Dahyabhai <nalin@redhat.com>
430- update to nss_ldap 107
431- note: check http://www.advogato.org/person/lukeh/ for Luke's changelog
432                                                                               
433* Tue Mar 21 2000 Nalin Dahyabhai <nalin@redhat.com>
434- update to nss_ldap 106
435                                                                               
436* Wed Feb  9 2000 Nalin Dahyabhai <nalin@redhat.com>
437- update to nss_ldap 105
438                                                                               
439* Mon Feb  7 2000 Nalin Dahyabhai <nalin@redhat.com>
440- update to nss_ldap 104 and pam_ldap 46
441- disable link against libpthread in pam_ldap
442                                                                               
443* Tue Feb  1 2000 Nalin Dahyabhai <nalin@redhat.com>
444- remove migration tools, because this package requires openldap now, which
445  also includes them
446                                                                               
447* Fri Jan 28 2000 Nalin Dahyabhai <nalin@redhat.com>
448- update to nss_ldap 103
449                                                                               
450* Mon Jan 24 2000 Preston Brown <pbrown@redhat.com>
451- fix typo in linuxconf-pair pam cfg file (#7800)
452
453* Tue Jan 11 2000 Preston Brown <pbrown@redhat.com>
454- v99, made it require pam_ldap
455- added perl migration tools
456- integrate pam_ldap stuff
457                                                                               
458* Fri Oct 22 1999 Bill Nottingham <notting@redhat.com>
459- statically link ldap libraries (they're in /usr/lib)
460                                                                               
461* Tue Aug 10 1999 Cristian Gafton <gafton@redhat.com>
462- use the ldap.conf file as an external source
463- don't forcibly build the support for version 3
464- imported the default spec file from the tarball and fixed it up for RH 6.1
465
Note: See TracBrowser for help on using the repository browser.