nss-pam-ldapd-vl.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. %bcond_with systemd
  2. %global nssdir /%{_lib}
  3. %global pamdir /%{_lib}/security
  4. %define _hardened_build 1
  5. Name: nss-pam-ldapd
  6. Version: 0.9.10
  7. Release: 2%{?_dist_release}
  8. Summary: An nsswitch module which uses directory servers
  9. License: LGPLv2+
  10. URL: http://arthurdejong.org/nss-pam-ldapd/
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. Source0: http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
  14. Source1: http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz.sig
  15. %if %{with systemd}
  16. Source3: nslcd.tmpfiles
  17. Source4: nslcd.service
  18. %else
  19. Source100: nslcd.init
  20. %endif
  21. # Pylint tests fail w/o certain imports and are not needed for nslcd anyway,
  22. # plus, we don't ship the python utilities
  23. Patch0001: 0001-Disable-pylint-tests.patch
  24. Patch0002: 0002-Watch-for-uint32_t-overflows.patch
  25. BuildRequires: gcc
  26. BuildRequires: openldap-devel, krb5-devel
  27. BuildRequires: autoconf, automake
  28. BuildRequires: pam-devel
  29. %if %{with systemd}
  30. BuildRequires: systemd-units
  31. %{?systemd_requires}
  32. %else
  33. Requires(pre): shadow-utils
  34. Requires(post): initscripts, chkconfig
  35. Requires(preun): initscripts, chkconfig
  36. Requires(postun): initscripts, chkconfig
  37. %endif
  38. # Pull in nscd, which is recommended.
  39. Recommends: nscd
  40. Provides: nss-ldapd = %{version}-%{release}
  41. # Obsolete PADL's nss_ldap
  42. Provides: nss_ldap = 264-5
  43. Obsoletes: nss_ldap < 264-5
  44. %description
  45. The nss-pam-ldapd daemon, nslcd, uses a directory server to look up name
  46. service information (users, groups, etc.) on behalf of a lightweight
  47. nsswitch module.
  48. %prep
  49. %autosetup -p1
  50. autoreconf -f -i
  51. %build
  52. %configure --libdir=%{nssdir} \
  53. --disable-utils \
  54. --with-pam-seclib-dir=%{pamdir}
  55. %make_build
  56. %check
  57. make check
  58. %install
  59. rm -rf $RPM_BUILD_ROOT
  60. make install DESTDIR=$RPM_BUILD_ROOT
  61. mkdir -p $RPM_BUILD_ROOT/%{_libdir}
  62. %if %{with systemd}
  63. mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
  64. install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/
  65. mkdir -p -m 0755 $RPM_BUILD_ROOT/%{_tmpfilesdir}
  66. install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}.conf
  67. %else
  68. mkdir -p -m 0755 $RPM_BUILD_ROOT/%{_localstatedir}/run/nslcd
  69. mkdir -p -m 0755 $RPM_BUILD_ROOT/%{_initdir}
  70. install -p -m 0755 %{SOURCE100} $RPM_BUILD_ROOT/%{_initdir}/nslcd
  71. %endif
  72. ln -s libnss_ldap.so.2 $RPM_BUILD_ROOT/%{nssdir}/libnss_ldap.so
  73. sed -i -e 's,^uid.*,uid nslcd,g' -e 's,^gid.*,gid ldap,g' \
  74. $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf
  75. touch -r nslcd.conf $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf
  76. mkdir -p -m 0755 $RPM_BUILD_ROOT/var/run/nslcd
  77. %files
  78. %doc AUTHORS ChangeLog COPYING HACKING NEWS README TODO
  79. %{_sbindir}/*
  80. %{nssdir}/*.so*
  81. %{pamdir}/pam_ldap.so
  82. %{_mandir}/*/*
  83. %attr(0600,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/nslcd.conf
  84. %attr(0775,nslcd,root) /var/run/nslcd
  85. %if %{with systemd}
  86. %attr(0644,root,root) %config(noreplace) %{_tmpfilesdir}/%{name}.conf
  87. %{_unitdir}/nslcd.service
  88. %else
  89. %{_initdir}/nslcd
  90. %endif
  91. %pre
  92. getent group ldap > /dev/null || \
  93. /usr/sbin/groupadd -r -g 55 ldap
  94. getent passwd nslcd > /dev/null || \
  95. /usr/sbin/useradd -r -g ldap -c 'LDAP Client User' \
  96. -u 65 -d / -s /sbin/nologin nslcd 2> /dev/null || :
  97. %post
  98. # The usual stuff.
  99. /sbin/ldconfig
  100. %if %{with systemd}
  101. %systemd_post nslcd.service
  102. %else
  103. if [ $1 -eq 1 ]; then
  104. /sbin/chkconfig --add nslcd
  105. fi
  106. %endif
  107. %preun
  108. %if %{with systemd}
  109. %systemd_preun nslcd.service
  110. %else
  111. if [ $1 -eq 0 ]; then
  112. /sbin/service nslcd stop >/dev/null 2>&1 || :
  113. /sbin/chkconfig --del nslcd
  114. fi
  115. %endif
  116. %postun
  117. /sbin/ldconfig
  118. %if %{with systemd}
  119. %systemd_postun_with_restart nslcd.service
  120. %else
  121. if [ $1 -ne 0 ]; then
  122. /sbin/service nslcd condrestart >/dev/null 2>&1 || :
  123. fi
  124. %endif
  125. %changelog
  126. * Sun Dec 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.9.10-2
  127. - initial build for Vine Linux.
  128. * Mon Sep 3 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.9.10-1
  129. - New upstream release 0.9.10
  130. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9-4
  131. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  132. * Wed May 30 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.9.9-3
  133. - Also change the pemissions on tmpfiles
  134. - Related: rhbz#1583211 - nslcd, the local LDAP daemon, fails to start
  135. with SELinux enabled
  136. * Wed May 30 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.9.9-2
  137. - Apply a patch by Lukas Slebodnik to allow root to write to the
  138. /var/run/nslcd directory
  139. - Resolves: rhbz#1583211 - nslcd, the local LDAP daemon, fails to start
  140. with SELinux enabled
  141. * Sun Apr 1 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.9.9-1
  142. - Upgrade to the latest upstream
  143. - Disable the python utilities
  144. - Don't bother with failing pylint test as we don't ship the python
  145. utilities
  146. - Drop unused validname and exitcode patches, port strtoid overflow
  147. patch
  148. * Sat Mar 31 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.8.14-12
  149. - Get rid of all conditions that are always true for both EPEL-7 and Fedora
  150. as it's quite unlikely we'd use this specfile on EPEL-6
  151. - Remove the sysvinit script and all the scriptlets around it
  152. - Unconditionally use systemd scriptlet macros and systemd_requires
  153. - Unconditionally build the PAM module as the PADL module is long dead
  154. - Remove the auto-migration of settings from nss_ldap as it's been
  155. long gone from Fedora
  156. - Don't check /etc/sysconfig/authconfig as authconfig is on its way
  157. out from Fedora
  158. - Use only spaces, not tabs, to stop my editor from looking like a
  159. Christmas tree
  160. - Remove the obsolete Group stanza
  161. - Make nscd Recommended, not Required
  162. * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.14-11
  163. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  164. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.14-10
  165. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  166. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.14-9
  167. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  168. * Wed Feb 8 2017 Jakub Hrozek <jhrozek@redhat.com> 0.8.14-8
  169. - Apply a patch from Stanislav Moravec to fix nslcd return code
  170. * Tue Mar 29 2016 Nalin Dahyabhai <nalin@redhat.com> 0.8.14-7
  171. - move the packaged tmpfiles.d file from /etc/tmpfiles.d to %%{_tmpfilesdir},
  172. per heads-up from Ville Skyttä on devel@
  173. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.14-6
  174. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  175. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.14-5
  176. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  177. * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.14-4
  178. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  179. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.14-3
  180. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  181. * Wed May 07 2014 Nalin Dahyabhai <nalin@redhat.com> 0.8.14-2
  182. - where we check for USELDAP=yes in /etc/sysconfig/authconfig as an indication
  183. of nss_ldap being in use, to decide whether to enable the nslcd service or
  184. not, also check for USELDAPAUTH=yes, which indicates pam_ldap is being used
  185. * Sat Oct 05 2013 Jakub Hrozek <jhrozek@redhat.com> 0.8.14-1
  186. - New upstream release 0.8.14
  187. - Remove upstreamed patches
  188. * Sat Oct 05 2013 Jakub Hrozek <jhrozek@redhat.com> 0.8.13-4
  189. - Backport fixes for #1003011
  190. * Sat Oct 05 2013 Jakub Hrozek <jhrozek@redhat.com> 0.8.13-3
  191. - Build with _hardened_build macro
  192. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.13-2
  193. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  194. * Mon May 6 2013 Nalin Dahyabhai <nalin@redhat.com> 0.8.13-1
  195. - update to 0.8.13
  196. - correct a syntax error in the fix that was added for #832706
  197. * Tue Apr 30 2013 Nalin Dahyabhai <nalin@redhat.com> 0.8.12-4
  198. - in %%post, attempt to rewrite any instances of "map group uniqueMember ..."
  199. to be "map group member ..." in nslcd.conf, as the attribute name changed
  200. in 0.8.4 (via freeipa ticket #3589)
  201. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.12-3
  202. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  203. * Fri Jan 18 2013 Nalin Dahyabhai <nalin@redhat.com> 0.8.12-2
  204. - drop local patch to make the client flush some more read buffers
  205. * Fri Jan 18 2013 Nalin Dahyabhai <nalin@redhat.com> 0.8.12-1
  206. - update to 0.8.12 (#846793)
  207. - make building pam_ldap conditional on the targeted release
  208. - add "After=named.service dirsrv.target slapd.service" to nslcd.service,
  209. to make sure that nslcd is started after them if they're to be started
  210. on the local system (#832706)
  211. - alter the versioned Obsoletes: on pam_ldap to include the F18 package
  212. - use %%{_unitdir} when deciding where to put systemd configuration, based
  213. on patch from Václav Pavlín (#850232)
  214. - use new systemd macros for scriptlet hooks, when available, based on
  215. patch from Václav Pavlín (#850232)
  216. * Sun Sep 09 2012 Jakub Hrozek <jhrozek@redhat.com> 0.7.17-1
  217. - new upstream release 0.7.17
  218. * Sun Aug 05 2012 Jakub Hrozek <jhrozek@redhat.com> - 0.7.16-5
  219. - Obsolete PADL's nss_ldap
  220. * Sat Aug 04 2012 Jakub Hrozek <jhrozek@redhat.com> - 0.7.16-4
  221. - Build the PAM module, obsoletes PADL's pam-ldap (#856006)
  222. * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.16-3
  223. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  224. * Mon May 14 2012 Jakub Hrozek <jhrozek@redhat.com> 0.7.16-2
  225. - backport upstream revision r1659 related to broken pipe when
  226. requesting a large group
  227. - use grep -E instead of egrep to avoid rpmlint warnings
  228. * Sat Apr 28 2012 Jakub Hrozek <jhrozek@redhat.com> 0.7.16-1
  229. - new upstream release 0.7.16
  230. * Thu Mar 15 2012 Jakub Hrozek <jhrozek@redhat.com> 0.7.15-2
  231. - Do not print "Broken Pipe" error message when requesting a large group
  232. * Fri Mar 9 2012 Jakub Hrozek <jhrozek@redhat.com> 0.7.15-1
  233. - new upstream release 0.7.15
  234. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.14-3
  235. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  236. * Fri Dec 16 2011 Jakub Hrozek <jhrozek@redhat.com> 0.7.14-2
  237. - Do not overflow large UID/GID values on 32bit architectures
  238. * Mon Nov 28 2011 Nalin Dahyabhai <nalin@redhat.com>
  239. - use the same conditional test for deciding when to create the .so symlink as
  240. we do later on for deciding when to include it in the package (#757004)
  241. * Fri Sep 23 2011 Jakub Hrozek <jhrozek@redhat.com> 0.7.14-1
  242. - new upstream release 0.7.14
  243. - obsoletes nss-pam-ldapd-0.7.x-buffers.patch
  244. * Wed Aug 24 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-8
  245. - include backported enhancement to take URIs in the form "dns:DOMAIN" in
  246. addition to the already-implemented "dns" (#730309)
  247. * Thu Jul 14 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-7
  248. - switch to only munging the contents of /etc/nslcd.conf on the very first
  249. install (#706454)
  250. - make sure that we have enough space to parse any valid GID value when
  251. parsing a user's primary GID (#716822)
  252. - backport support for the "validnames" option from SVN and use it to allow
  253. parentheses characters by modifying the default setting (#690870), then
  254. modify the default again to also allow shorter and shorter names to pass
  255. muster (#706860)
  256. * Wed Jul 13 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-6
  257. - convert to systemd-native startup (#716997)
  258. * Mon Jun 13 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-5
  259. - change the file path Requires: we have for pam_ldap into a package name
  260. Requires: (#601931)
  261. * Wed Mar 30 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-4
  262. - tag nslcd.conf with %%verify(not md5 size mtime), since we always tweak
  263. it in %%post (#692225)
  264. * Tue Mar 1 2011 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-3
  265. - add a tmpfiles configuration to ensure that /var/run/nslcd is created when
  266. /var/run is completely empty at boot (#656643)
  267. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.13-2
  268. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  269. * Mon Dec 13 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.13-1
  270. - update to 0.7.13
  271. * Fri Oct 29 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.12-1
  272. - update to 0.7.12
  273. * Fri Oct 15 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.11-1
  274. - update to 0.7.11
  275. * Wed Sep 29 2010 jkeating - 0.7.10-2
  276. - Rebuilt for gcc bug 634757
  277. * Fri Sep 24 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.10-1
  278. - update to 0.7.10
  279. * Thu Sep 23 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.9-2
  280. - when creating /var/run/nslcd in the buildroot, specify that 0755 is a
  281. permissions value and not another directory name (#636880)
  282. * Mon Aug 30 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.9-1
  283. - update to 0.7.9
  284. * Wed Aug 18 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.8-1
  285. - update to 0.7.8
  286. * Wed Jul 7 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.7-1
  287. - update to 0.7.7
  288. * Mon Jun 28 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.6-3
  289. - don't accidentally set multiple 'gid' settings in nslcd.conf, and try to
  290. clean up after older versions of this package that did (#608314)
  291. * Thu May 27 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.6-2
  292. - make inclusion of the .so symlink conditional on being on a sufficiently-
  293. new Fedora where pam_ldap isn't part of the nss_ldap package, so having
  294. this package conflict with nss_ldap doesn't require that pam_ldap be
  295. removed (#596691)
  296. * Thu May 27 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.6-1
  297. - update to 0.7.6
  298. * Mon May 17 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.5-3
  299. - switch to the upstream patch for #592411
  300. * Fri May 14 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.5-2
  301. - don't return an uninitialized buffer as the value for an optional attribute
  302. that isn't present in the directory server entry (#592411)
  303. * Fri May 14 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.5-1
  304. - update to 0.7.5
  305. * Fri May 14 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.4-1
  306. - update to 0.7.4
  307. - stop trying to migrate retry timeout parameters from old ldap.conf files
  308. - add an explicit requires: on nscd to make sure it's at least available on
  309. systems that are using nss-pam-ldapd; otherwise it's usually optional
  310. * Tue Mar 23 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.3-1
  311. - update to 0.7.3
  312. * Thu Feb 25 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.2-2
  313. - bump release for post-review commit
  314. * Thu Feb 25 2010 Nalin Dahyabhai <nalin@redhat.com> 0.7.2-1
  315. - add comments about why we have a .so link at all, and not a -devel subpackage
  316. * Wed Jan 13 2010 Nalin Dahyabhai <nalin@redhat.com>
  317. - obsolete/provides nss-ldapd
  318. - import configuration from nss-ldapd.conf, too
  319. * Tue Jan 12 2010 Nalin Dahyabhai <nalin@redhat.com>
  320. - rename to nss-pam-ldapd
  321. - also check for import settings in /etc/nss_ldap.conf and /etc/pam_ldap.conf
  322. * Thu Sep 24 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.11-2
  323. - rebuild
  324. * Wed Sep 16 2009 Nalin Dahyabhai <nalin@redhat.com>
  325. - apply Mitchell Berger's patch to clean up the init script, use %%{_initddir},
  326. and correct the %%post so that it only thinks about turning on nslcd when
  327. we're first being installed (#522947)
  328. - tell status() where the pidfile is when the init script is called for that
  329. * Tue Sep 8 2009 Nalin Dahyabhai <nalin@redhat.com>
  330. - fix typo in a comment, capitalize the full name for "LDAP Client User" (more
  331. from #516049)
  332. * Wed Sep 2 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.11-1
  333. - update to 0.6.11
  334. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.10-4
  335. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  336. * Thu Jun 18 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.10-3
  337. - update URL: and Source:
  338. * Mon Jun 15 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.10-2
  339. - add and own /var/run/nslcd
  340. - convert hosts to uri during migration
  341. * Thu Jun 11 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.10-1
  342. - update to 0.6.10
  343. * Fri Apr 17 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.8-1
  344. - bump release number to 1 (part of #491767)
  345. - fix which group we check for during %%pre (part of #491767)
  346. * Tue Mar 24 2009 Nalin Dahyabhai <nalin@redhat.com>
  347. - require chkconfig by package rather than path (Jussi Lehtola, part of #491767)
  348. * Mon Mar 23 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.8-0.1
  349. - update to 0.6.8
  350. * Mon Mar 23 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.7-0.1
  351. - start using a dedicated user
  352. * Wed Mar 18 2009 Nalin Dahyabhai <nalin@redhat.com> 0.6.7-0.0
  353. - initial package (#445965)