2007-01-16 00:29:04 +01:00
|
|
|
#
|
2011-01-14 03:48:37 +01:00
|
|
|
# spec file for package pam_pkcs11
|
2007-01-16 00:29:04 +01:00
|
|
|
#
|
2018-08-02 18:35:40 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:29:04 +01:00
|
|
|
#
|
2008-09-25 23:43:45 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:29:04 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-04-10 15:21:50 +02:00
|
|
|
|
2017-07-21 14:17:18 +02:00
|
|
|
# It seems to be an upstream naming bug:
|
|
|
|
%define _name pam_pkcs11-pam_pkcs11
|
2007-01-16 00:29:04 +01:00
|
|
|
Name: pam_pkcs11
|
2017-07-21 14:17:18 +02:00
|
|
|
Version: 0.6.9
|
2012-07-10 17:29:08 +02:00
|
|
|
Release: 0
|
2007-07-27 02:02:39 +02:00
|
|
|
Summary: PKCS #11 PAM Module
|
2018-08-02 18:35:40 +02:00
|
|
|
License: LGPL-2.1-or-later
|
2012-07-10 17:29:08 +02:00
|
|
|
Group: Productivity/Security
|
2017-07-21 14:17:18 +02:00
|
|
|
Url: https://github.com/OpenSC/pam_pkcs11
|
|
|
|
Source: %{_name}-%{version}.tar.gz
|
2007-08-03 22:28:44 +02:00
|
|
|
Source1: pam_pkcs11-common-auth-smartcard.pam
|
2010-03-05 11:53:32 +01:00
|
|
|
Source2: baselibs.conf
|
2017-07-21 14:17:18 +02:00
|
|
|
# make dist was not called.
|
|
|
|
Source3: pam_pkcs11-0.6.9-ChangeLog.git
|
2017-09-03 15:58:26 +02:00
|
|
|
Source4: pkcs11_eventmgr.service
|
|
|
|
Patch0: %{name}-fsf-address.patch
|
2007-08-03 22:28:44 +02:00
|
|
|
Patch1: %{name}-0.5.3-nss-conf.patch
|
|
|
|
Patch3: %{name}-0.6.0-nss-autoconf.patch
|
2018-08-02 18:35:40 +02:00
|
|
|
# PATCH-FIX-UPSTEAM-PENDING pam_pkcs11-crl-check.patch https://github.com/OpenSC/pam_pkcs11/pull/26 -- Fix segfault and fetch problems when checking CRLs.
|
|
|
|
Patch4: %{name}-crl-check.patch
|
2012-07-10 17:29:08 +02:00
|
|
|
BuildRequires: curl-devel
|
2017-07-21 14:17:18 +02:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: fdupes
|
2012-07-10 17:29:08 +02:00
|
|
|
BuildRequires: flex
|
2016-04-04 14:03:04 +02:00
|
|
|
BuildRequires: libtool
|
2012-07-10 17:29:08 +02:00
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: mozilla-nss-devel
|
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
BuildRequires: pcsc-lite-devel
|
2017-07-21 14:17:18 +02:00
|
|
|
BuildRequires: pkgconfig
|
2017-09-03 15:58:26 +02:00
|
|
|
%{?systemd_requires}
|
|
|
|
%if 0%{?suse_version} >= 1210
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%endif
|
2007-01-16 00:29:04 +01:00
|
|
|
|
|
|
|
%description
|
2007-09-11 00:48:13 +02:00
|
|
|
This Linux PAM module allows X.509 a certificate-based user
|
2007-01-16 00:29:04 +01:00
|
|
|
authentication. The certificate and its dedicated private key are
|
2007-09-11 00:48:13 +02:00
|
|
|
thereby accessed by means of an appropriate PKCS #11 module. For the
|
2007-01-16 00:29:04 +01:00
|
|
|
verification of the users' certificates, locally stored CA certificates
|
2007-07-27 02:02:39 +02:00
|
|
|
as well as online or locally accessible CRLs are used.
|
2007-01-16 00:29:04 +01:00
|
|
|
|
2017-09-26 16:51:52 +02:00
|
|
|
Additionally, the package includes pam_pkcs11-related tools:
|
|
|
|
|
|
|
|
* pkcs11_eventmgr: Generates actions on card insert, removal, or
|
|
|
|
time-out events
|
2007-01-16 00:29:04 +01:00
|
|
|
|
2007-09-11 00:48:13 +02:00
|
|
|
* pklogin_finder: Gets the login name that maps to a certificate
|
2007-01-16 00:29:04 +01:00
|
|
|
|
2007-09-11 00:48:13 +02:00
|
|
|
* pkcs11_inspect: Inspects the contents of a certificate
|
2007-01-16 00:29:04 +01:00
|
|
|
|
2007-09-11 00:48:13 +02:00
|
|
|
* make_hash_links: Creates hash link directories for storing CAs and
|
2007-07-27 02:02:39 +02:00
|
|
|
CRLs
|
2007-01-16 00:29:04 +01:00
|
|
|
|
2017-07-21 14:17:18 +02:00
|
|
|
%package devel-doc
|
|
|
|
Summary: PKCS #11 API PAM Documentation
|
|
|
|
# File conflict. devel-doc split was done with 0.6.9 upgrade, after SLE 12 SP3, Leap 42.3.
|
|
|
|
Group: Documentation/HTML
|
|
|
|
Conflicts: pam_pkcs11 < 0.6.9
|
|
|
|
|
|
|
|
%description devel-doc
|
|
|
|
API documentation for pam_pkcs11
|
|
|
|
|
|
|
|
This Linux PAM module allows X.509 a certificate-based user
|
2017-09-26 16:51:52 +02:00
|
|
|
authentication.
|
2007-01-16 00:29:04 +01:00
|
|
|
|
|
|
|
%prep
|
2017-07-21 14:17:18 +02:00
|
|
|
%setup -q -n %{_name}-%{version}
|
2017-09-03 15:58:26 +02:00
|
|
|
%patch0 -p1
|
2007-08-03 22:28:44 +02:00
|
|
|
%patch1 -p1
|
|
|
|
%patch3 -p1
|
2018-08-02 18:35:40 +02:00
|
|
|
%patch4 -p1
|
2017-07-21 14:17:18 +02:00
|
|
|
cp -a %{SOURCE1} common-auth-smartcard
|
2012-02-28 20:04:01 +01:00
|
|
|
sed -i s:/lib/:/%{_lib}/:g etc/pam_pkcs11.conf.example.in etc/pkcs11_eventmgr.conf.example
|
2017-07-21 14:17:18 +02:00
|
|
|
# make dist was not called and cannot be called on a non git snapshot.
|
|
|
|
cp -a %{SOURCE3} ChangeLog.git
|
|
|
|
sed -i "/git log/d" Makefile.am
|
|
|
|
sed -i '/^HTML_TIMESTAMP/s/YES/NO/' doc/doxygen.conf.in
|
2007-01-16 00:29:04 +01:00
|
|
|
|
|
|
|
%build
|
2016-04-04 14:03:04 +02:00
|
|
|
./bootstrap
|
2007-07-27 02:02:39 +02:00
|
|
|
%configure\
|
2011-01-14 03:48:32 +01:00
|
|
|
--docdir=%{_docdir}/%{name}\
|
2007-08-03 22:28:44 +02:00
|
|
|
--with-nss\
|
2007-01-16 00:29:04 +01:00
|
|
|
--with-curl
|
2017-07-21 14:17:18 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
# Generate documentation: This sounds like an upstream bug while making an upstream source tarball.
|
|
|
|
make %{?_smp_mflags} dist
|
2007-01-16 00:29:04 +01:00
|
|
|
|
|
|
|
%install
|
2017-07-21 14:17:18 +02:00
|
|
|
%make_install
|
|
|
|
mkdir -p %{buildroot}/%{_lib}
|
|
|
|
mv %{buildroot}%{_libdir}/security %{buildroot}/%{_lib}
|
|
|
|
rm %{buildroot}%{_libdir}/pam_pkcs11/*.*a %{buildroot}/%{_lib}/security/*.*a
|
2007-01-16 00:29:04 +01:00
|
|
|
# Hardcoded defaults... no sysconfdir
|
2017-07-21 14:17:18 +02:00
|
|
|
install -dm 755 %{buildroot}%{_sysconfdir}/pam_pkcs11/cacerts
|
|
|
|
install -dm 755 %{buildroot}%{_sysconfdir}/pam_pkcs11/crls
|
2007-01-16 00:29:04 +01:00
|
|
|
cd etc
|
|
|
|
for conf in *.conf.example ; do
|
2017-07-21 14:17:18 +02:00
|
|
|
install -m 644 ${conf} %{buildroot}%{_sysconfdir}/pam_pkcs11/${conf%.example}
|
2007-01-16 00:29:04 +01:00
|
|
|
done
|
|
|
|
cd ..
|
2017-07-21 14:17:18 +02:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
|
|
|
cp -a AUTHORS COPYING ChangeLog ChangeLog.git NEWS README README.md TODO doc/pam_pkcs11.html doc/mappers_api.html doc/api doc/README.autologin doc/README.mappers %{buildroot}%{_docdir}/%{name}
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
|
|
|
|
cp common-auth-smartcard %{buildroot}%{_sysconfdir}/pam.d/
|
2017-09-03 15:58:26 +02:00
|
|
|
install -D -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/pkcs11_eventmgr.service
|
2007-07-27 02:02:39 +02:00
|
|
|
%find_lang %{name}
|
2017-07-21 14:17:18 +02:00
|
|
|
%fdupes -s %{buildroot}%{_docdir}/%{name}
|
2007-01-16 00:29:04 +01:00
|
|
|
|
2017-09-03 15:58:26 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre pkcs11_eventmgr.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post pkcs11_eventmgr.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun pkcs11_eventmgr.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun pkcs11_eventmgr.service
|
|
|
|
|
2017-07-21 14:17:18 +02:00
|
|
|
%files -f %{name}.lang
|
2007-07-27 02:02:39 +02:00
|
|
|
%doc %{_docdir}/%{name}
|
2017-07-21 14:17:18 +02:00
|
|
|
%exclude %{_docdir}/%{name}/api
|
2007-07-27 02:02:39 +02:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_libdir}/pam_pkcs11
|
2007-01-16 00:29:04 +01:00
|
|
|
/%{_lib}/security/*.so
|
2017-07-21 14:17:18 +02:00
|
|
|
%{_mandir}/man?/*%{ext_man}
|
2007-07-27 02:02:39 +02:00
|
|
|
%dir %{_sysconfdir}/pam_pkcs11
|
|
|
|
%dir %{_sysconfdir}/pam_pkcs11/cacerts
|
|
|
|
%dir %{_sysconfdir}/pam_pkcs11/crls
|
|
|
|
%config(noreplace) %{_sysconfdir}/pam_pkcs11/*.conf
|
2007-08-03 22:28:44 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/common-auth-smartcard
|
2017-09-03 15:58:26 +02:00
|
|
|
%{_prefix}/lib/systemd/system/pkcs11_eventmgr.service
|
2007-07-27 02:02:39 +02:00
|
|
|
|
2017-07-21 14:17:18 +02:00
|
|
|
%files devel-doc
|
|
|
|
%doc %{_docdir}/%{name}/api
|
|
|
|
|
2007-07-27 02:02:39 +02:00
|
|
|
%changelog
|