pam_pkcs11-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. %define nss_version 3.10
  2. %define nspr_version 4.6
  3. %define with_curl 0
  4. %define with_ldap 0
  5. Summary: PKCS #11/NSS PAM login module
  6. Summary(ja): PKCS #11/NSS PAM ログインモジュール
  7. Name: pam_pkcs11
  8. Version: 0.5.3
  9. Release: 1%{?_dist_release}
  10. Group: System Environment/Base
  11. License: LGPLv2+
  12. URL: http://www.opensc.org/pam_pkcs11
  13. Source0: http://www.opensc.org/files/%{name}-%{version}.tar.gz
  14. Source1: rh_pam_pkcs11.conf
  15. Source2: rh_pkcs11_eventmgr.conf
  16. Patch1: pam_pkcs11-0.5.3-nss.patch
  17. Patch2: pam_pkcs11-0.5.3-cardonly.patch
  18. Patch3: pam_pkcs11-0.5.3-setup-tool.patch
  19. Patch4: pam_pkcs11-0.5.3-putenv-login-token.patch
  20. Patch5: pam_pkcs11-0.5.3-ocsp.patch
  21. Patch6: pam_pkcs11-0.5.3-wait-for-card.patch
  22. Patch7: pam_pkcs11-0.5.3-reject_unloaded_module.patch
  23. Patch8: pam_pkcs11-0.5.3-l10n.patch
  24. Patch9: pam_pkcs11-0.5.3-screen-saver.patch
  25. Patch10: pam_pkcs11-0.5.3-pin-fix.patch
  26. Patch11: pam_pkcs11-0.5.3-eventmgr-crash-fix.patch
  27. Patch12: pam_pkcs11-0.5.3-pam-syslog.patch
  28. Patch13: pam_pkcs11-0.5.3-password.patch
  29. Patch14: pam_pkcs11-0.5.3-export-auth-cert.patch
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  31. BuildRequires: pam-devel
  32. %{?_with_ldap:BuildRequires: openldap-devel}
  33. %{?_with_curl:BuildRequires: curl-devel}
  34. BuildRequires: libxslt
  35. BuildRequires: docbook-style-xsl
  36. BuildRequires: nss-devel >= %{nss_version}
  37. BuildRequires: nspr-devel
  38. BuildRequires: pkgconfig
  39. BuildRequires: intltool
  40. BuildRequires: gettext
  41. Requires: nss
  42. Requires: nspr
  43. Provides: pam_pkcs11 = %{version}-%{release}
  44. %description
  45. This Linux-PAM login module allows a X.509 certificate based user
  46. authentication. The certificate and its dedicated private key are thereby
  47. accessed by means of an appropriate PKCS #11 module. For the
  48. verification of the users' certificates, locally stored CA
  49. certificates as well as either online or locally accessible CRLs and
  50. OCSP are used. This version uses NSS to validate the Certificates and manage
  51. the PKCS #11 smartCards.
  52. Additional included pam_pkcs11 related tools
  53. - pkcs11_eventmgr: Generate actions on card insert/removal/timeout events
  54. - pklogin_finder: Get the loginname that maps to a certificate
  55. - pkcs11_inspect: Inspect the contents of a certificate
  56. %prep
  57. %setup -q -n pam_pkcs11-%{version}
  58. %patch1 -p0 -b .nss
  59. %patch2 -p0 -b .card-only
  60. %patch3 -p1 -b .setup
  61. %patch4 -p0 -b .putenv
  62. %patch5 -p0 -b .ocsp
  63. %patch6 -p1 -b .wait-for-card
  64. %patch7 -p0 -b .reject-unloaded-module
  65. %patch8 -p0 -b .l10n
  66. %patch9 -p0 -b .screen-saver
  67. %patch10 -p0 -b .pin-fix
  68. %patch11 -p0 -b .eventmgr-crash-fix
  69. %patch12 -p1 -b .pam-syslog
  70. %patch13 -p1 -b .password
  71. %patch14 -p0 -b .export-auth-cert
  72. %build
  73. %if %{with_curl}
  74. %define curl_flags --with-curl=yes
  75. %else
  76. %define curl_flags --with-curl=no
  77. %endif
  78. %if %{with_ldap}
  79. %define ldap_flags --with-ldap=yes
  80. %else
  81. %define ldap_flags --with-ldap=no
  82. %endif
  83. %configure \
  84. --with-nss \
  85. --with-debug \
  86. --disable-dependency-tracking \
  87. %{curl_flags} %{ldap_flags}
  88. make CFLAGS="$RPM_OPT_FLAGS -O0 -ggdb3"
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. make install DESTDIR=$RPM_BUILD_ROOT
  92. rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.*a
  93. #
  94. # pam security directory is in /%{_lib} not %{_libdir}
  95. #
  96. mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
  97. install -m 755 $RPM_BUILD_ROOT/%{_libdir}/security/%{name}.so $RPM_BUILD_ROOT/%{_lib}/security
  98. rm -rf $RPM_BUILD_ROOT/%{_libdir}/security
  99. #
  100. # set up config files
  101. #
  102. install -dm 755 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
  103. install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.conf
  104. install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/pkcs11_eventmgr.conf
  105. #
  106. # clean up those files that aren't part of this package
  107. # (makefile should install them if --without-pcsclite is supplied
  108. #
  109. rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/card_eventmgr.1
  110. rm -f $RPM_BUILD_ROOT/%{_datadir}/%{name}/card_eventmgr.conf.example
  111. # nss version does not need this script
  112. rm -f $RPM_BUILD_ROOT/%{_bindir}/make_hash_link.sh
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT
  115. %files
  116. %defattr(-,root,root,-)
  117. %doc AUTHORS COPYING README TODO ChangeLog NEWS
  118. %doc doc/pam_pkcs11.html
  119. %doc doc/mappers_api.html
  120. %doc doc/README.autologin
  121. %doc doc/README.mappers
  122. %dir %{_sysconfdir}/%{name}/
  123. %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
  124. %config(noreplace) %{_sysconfdir}/%{name}/pkcs11_eventmgr.conf
  125. %{_bindir}/pkcs11_eventmgr
  126. %{_bindir}/pklogin_finder
  127. %{_bindir}/pkcs11_inspect
  128. %{_bindir}/pkcs11_setup
  129. %dir %{_libdir}/%{name}
  130. %{_libdir}/%{name}/*.so
  131. /%{_lib}/security/%{name}.so
  132. %{_mandir}/man8/%{name}.8.gz
  133. %{_mandir}/man1/pkcs11_eventmgr.1.gz
  134. %{_mandir}/man1/pkcs11_inspect.1.gz
  135. %{_mandir}/man1/pklogin_finder.1.gz
  136. %dir %{_datadir}/%{name}
  137. %doc %{_datadir}/%{name}/%{name}.conf.example
  138. %doc %{_datadir}/%{name}/pam.d_login.example
  139. %doc %{_datadir}/%{name}/subject_mapping.example
  140. %doc %{_datadir}/%{name}/mail_mapping.example
  141. %doc %{_datadir}/%{name}/digest_mapping.example
  142. %doc %{_datadir}/%{name}/pkcs11_eventmgr.conf.example
  143. %changelog
  144. * Wed May 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.3-1
  145. - initial build for Vine Linux
  146. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-28
  147. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  148. * Sat Nov 8 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.5.3-27
  149. - Include missing directory entries (#233895).
  150. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.5.3-26
  151. - Autorebuild for GCC 4.3
  152. * Fri Aug 20 2007 Bob Relyea <rrelyea@redhat.com> - 0.5.3-25
  153. - Update License description to the new Fedora standard
  154. * Thu Mar 08 2007 Florian La Roche <laroche@redhat.com> - 0.5.3-24
  155. - remove empty rpm scripts
  156. * Sun Oct 13 2006 Jesse Keating <jkeating@redhat.com> - 0.5.3-23
  157. - turn OCSP off by default
  158. * Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 0.5.3-22
  159. - rebuilt for unwind info generation, broken in gcc-4.1.1-21
  160. * Mon Sep 18 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-21
  161. - update password supported patch.
  162. - fix bug where the user and smart card prompt was coming up in login after
  163. the username had been entered.
  164. - use pam_ignore for the case where we always want to drop to the other
  165. pam_modules.
  166. - add environment variables for the certificate used to authenticate.
  167. * Mon Sep 18 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-20
  168. - Use pam_syslog rather than syslog (patch by Tmraz).
  169. - Signal to the user that change password is not supported by pam_pkcs11.
  170. * Wed Sep 14 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-19
  171. - Fix problem where pin was not being passed in the pam password variable
  172. correctly. Needed for Kerberos PKInit
  173. * Tue Sep 13 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-18
  174. - define those apps that we shouldn't login initially with (screen-savers)
  175. * Tue Sep 12 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-17
  176. - restrict reauthentication to the token used in the inital login.
  177. - don't require reauthentication apps to log into a token if the user
  178. didn't initally log into the token.
  179. - handle the case where we have more than one token.
  180. * Thu Sep 7 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-16
  181. - make sure we have l10n tools for the build itself
  182. * Mon Sep 1 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-15
  183. - add l10n support
  184. - correct mapper order.
  185. - login should allow SSL Client Auth certs rather than restricting to Email
  186. Signing certs.
  187. * Mon Aug 28 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-14
  188. - use implicit paths to load the PKCS #11 module
  189. * Mon Aug 28 2006 Tomas Mraz <tmraz@redhat.com>
  190. - pkcs11_setup should respect $LIB in module paths (#204252)
  191. * Mon Aug 28 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-13
  192. - Fix the default mapping order.
  193. - Make ocsp support controlled by a config entry.
  194. - Fix login crash
  195. - revert to explicit paths until we can fix 'login' and 'authconfig'
  196. * Mon Aug 28 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-12
  197. - use $LIB so the config file works for multi archs on the
  198. - same machine
  199. * Mon Aug 21 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-11
  200. - Handle library paths in config file
  201. * Mon Aug 16 2006 Robert Relyea <rrelyea@redhat.com> 0.5.3-10
  202. - remove sceventd
  203. * Mon Jul 24 2006 Ray Strode <rstrode@redhat.com> 0.5.3-9
  204. - compile with better debugging flags
  205. * Sun Jul 23 2006 Ray Strode <rstrode@redhat.com> 0.5.3-8
  206. - fix bug where it was ignoring first argument of module
  207. command line
  208. * Sun Jul 23 2006 Ray Strode <rstrode@redhat.com> 0.5.3-7
  209. - add new wait_for_card option that stalls auth process
  210. until a card is inserted
  211. - if the user is reauthenticating (already logged in, but
  212. say unlocking the screen) then only treat the token the
  213. user logged in with as a valid authentication token
  214. - clean up "smart card" word. Before we had a mix of
  215. "smartcard", "Smart Card", "SmartCard", and "smart card"
  216. i think.
  217. - only say "Please insert your smart card." instead of
  218. "Please insert your Smart Card or enter username" if
  219. username based login isn't allowed.
  220. * Thu Jul 20 2006 Robert Relyea <rrelyea at redhat.com> 0.5.3-6
  221. - Include the login token in the environment
  222. - Conditionally turn on OCSP
  223. - Treat uninitialized tokens as not present.
  224. * Tue Jul 18 2006 Tomas Mraz <tmraz at redhat.com> 0.5.3-5
  225. - added a simple pkcs11_setup tool
  226. * Thu Jul 18 2006 Robert Relyea <rrelyea at redhat.com>
  227. - Fix memory error in card_only.
  228. - Use the TEXT_INFO field for smart card prompting
  229. * Mon Jul 17 2006 Jesse Keating <jkeating@redhat.com> 0.5.3-4
  230. - rebuild
  231. * Thu Jun 10 2006 Robert Relyea <rrelyea at redhat.com> 0.5.3-3
  232. - Updated to 0.5.3 with card_only and NSS support
  233. * Mon Apr 20 2006 Robert Relyea < rrelyea at redhat.com > 0:0.5.1.-2.exp
  234. - Added screenlocking helper support
  235. * Mon Mar 30 2006 Robert Relyea < rrelyea at redhat.com > 0:0.5.1.-1.exp
  236. - Added NSS support.
  237. * Mon Jan 30 2006 Robert Relyea < rrelyea at redhat.com > 0:0.5.1.-0.demo
  238. - include coolkey support
  239. - added card_only option.
  240. * Thu Sep 7 2005 Juan Antonio Martinez <jonsito at teleline.es 0:0.5.3-2
  241. - Add ldap_mapper.so as separate package, as it depends on external library
  242. - Changes from FC4 team
  243. * Thu Sep 1 2005 Juan Antonio Martinez <jonsito at teleline.es 0:0.5.3-0
  244. - Update to 0.5.3
  245. - Remove tools package, and create pcsc one with pcsc-lite dependent files
  246. * Fri Apr 11 2005 Juan Antonio Martinez <jonsito at teleline.es 0:0.5.2-1
  247. - Changed package name to pam_pkcs11
  248. * Fri Apr 8 2005 Juan Antonio Martinez <jonsito at teleline.es 0:0.5.2-0
  249. - Updated to 0.5.2 release
  250. - Changed /etc/pkcs11 for /etc/pam_pkcs11
  251. - Changed /usr/share/pkcs11_login for /usr/share/pam_pkcs11
  252. - Next item is change package name to pam_pkcs11
  253. * Thu Apr 7 2005 Juan Antonio Martinez <jonsito at teleline.es 0:0.5.1-0
  254. - patches to avoid autotools in compile from tgz
  255. * Thu Mar 29 2005 Juan Antonio Martinez <jonsito at teleline.es 0:0.5-1
  256. - upgrade to 0.5beta1 version
  257. - BuildRequires now complains compilation of html manual from xml file
  258. * Thu Feb 28 2005 Juan Antonio Martinez <jonsito at teleline.es> 0:0.4.4-2
  259. - New pkcs11_eventmgr app in "tools" package
  260. * Thu Feb 24 2005 Juan Antonio Martinez <jonsito at teleline.es> 0:0.4.4-1
  261. - Fix pcsc-lite dependencies
  262. * Thu Feb 15 2005 Juan Antonio Martinez <jonsito at teleline.es> 0:0.4.4-0
  263. - Update to 0.4.4b2
  264. * Sun Sep 12 2004 Ville Skytt辰 <ville.skytta at iki.fi> - 0:0.3b-0.fdr.1
  265. - Update to 0.3b.
  266. - Disable dependency tracking to speed up the build.
  267. * Tue May 4 2004 Ville Skytt辰 <ville.skytta at iki.fi> - 0:0.3-0.fdr.1
  268. - Update to 0.3.
  269. - Do not use libcurl by default; rebuild using "--with curl" to use it.
  270. * Mon Mar 29 2004 Ville Skytt辰 <ville.skytta at iki.fi> - 0:0.2-0.fdr.1
  271. - Update to 0.2.
  272. - Use libcurl by default; rebuild using "--without curl" to disable.
  273. * Wed Jan 21 2004 Ville Skytt辰 <ville.skytta at iki.fi> - 0:0.1-0.fdr.0.2.beta5
  274. - Add the user_mapping config file.
  275. * Mon Jan 19 2004 Ville Skytt辰 <ville.skytta at iki.fi> - 0:0.1-0.fdr.0.1.beta5
  276. - First build.