source: projects/specs/trunk/n/nss_ldap/nss_ldap-vl.spec @ 521

Revision 521, 19.5 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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