new upstream release 2.4.2

- add pkcs_slot man page
- don't add root to the pkcs11 group
This commit is contained in:
Dan Horák 2012-06-21 13:49:09 +02:00
parent b44c0f1db4
commit 18aa734070
6 changed files with 106 additions and 9 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ opencryptoki-2.3.1.tar.gz
/opencryptoki-2.3.3.tar.gz /opencryptoki-2.3.3.tar.gz
/opencryptoki-2.4.tar.gz /opencryptoki-2.4.tar.gz
/opencryptoki-2.4.1.tar.gz /opencryptoki-2.4.1.tar.gz
/opencryptoki-2.4.2.tar.gz

View File

@ -0,0 +1,49 @@
diff --git a/configure.in b/configure.in
index 483a092..083a766 100644
--- a/configure.in
+++ b/configure.in
@@ -663,6 +663,7 @@ AC_CONFIG_FILES([Makefile usr/Makefile \
man/Makefile \
man/man1/Makefile \
man/man1/pkcsconf.1 \
+ man/man1/pkcs_slot.1 \
man/man1/pkcs11_startup.1 \
man/man5/Makefile \
man/man5/pk_config_data.5 \
diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am
index 8f0e5ee..1560fec 100644
--- a/man/man1/Makefile.am
+++ b/man/man1/Makefile.am
@@ -1,2 +1,2 @@
-man1_MANS=pkcs11_startup.1 pkcsconf.1
+man1_MANS=pkcs11_startup.1 pkcs_slot.1 pkcsconf.1
EXTRA_DIST = $(man1_MANS)
diff --git a/man/man1/pkcs_slot.1.in b/man/man1/pkcs_slot.1.in
new file mode 100644
index 0000000..8d55c9a
--- /dev/null
+++ b/man/man1/pkcs_slot.1.in
@@ -0,0 +1,23 @@
+.TH PKCS_SLOT 1 "February 2010" "@PACKAGE_VERSION@" "openCryptoki"
+.SH NAME
+pkcs_slot \- configuration program for opencryptoki
+.SH SYNOPSIS
+.B pkcs_slot
+\fIdevicenumber depth\fR
+.SH DESCRIPTION
+
+This utility is used internal by pkcs11_startup.
+It writes the configuration file to disk as @localstatedir@/lib/opencryptoki/pk_config_data.
+
+.SH "SEE ALSO"
+.PD 0
+.TP
+\fBpkcs11_startup\fP(1),
+.TP
+\fBopencryptoki\fP(7),
+.TP
+\fBpkcsslotd\fP(8),
+.TP
+\fBpk_config_data\fP(5).
+.PD
+

View File

@ -0,0 +1,30 @@
diff --git a/usr/Makefile.am b/usr/Makefile.am
index bced120..20352d5 100644
--- a/usr/Makefile.am
+++ b/usr/Makefile.am
@@ -5,6 +5,6 @@ endif
SUBDIRS = lib $(DAEMONDIRS)
install-data-hook:
- $(MKDIR_P) $(lockdir)
- $(CHGRP) pkcs11 $(lockdir)
- $(CHMOD) 0770 $(lockdir)
+ $(MKDIR_P) $(DESTDIR)$(lockdir)
+ $(CHGRP) pkcs11 $(DESTDIR)$(lockdir)
+ $(CHMOD) 0770 $(DESTDIR)$(lockdir)
diff --git a/usr/Makefile.am b/usr/Makefile.am
index 20352d5..5d42b0f 100644
--- a/usr/Makefile.am
+++ b/usr/Makefile.am
@@ -6,5 +6,9 @@ SUBDIRS = lib $(DAEMONDIRS)
install-data-hook:
$(MKDIR_P) $(DESTDIR)$(lockdir)
- $(CHGRP) pkcs11 $(DESTDIR)$(lockdir)
- $(CHMOD) 0770 $(DESTDIR)$(lockdir)
+ if test `id` = 0; then \
+ $(CHGRP) pkcs11 $(DESTDIR)$(lockdir); \
+ $(CHMOD) 0770 $(DESTDIR)$(lockdir); \
+ else \
+ echo "Not running as root, you must set the correct group and mode manually!"; \
+ fi

View File

@ -0,0 +1 @@
D /var/lock/opencryptoki 0770 root pkcs11 -

View File

@ -1,11 +1,12 @@
Name: opencryptoki Name: opencryptoki
Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11 Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11
Version: 2.4.1 Version: 2.4.2
Release: 2%{?dist} Release: 1%{?dist}
License: CPL License: CPL
Group: System Environment/Base Group: System Environment/Base
URL: http://sourceforge.net/projects/opencryptoki URL: http://sourceforge.net/projects/opencryptoki
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: %{name}-tmpfiles.conf
# the pkcs11 group is created and populated in scriptlet # the pkcs11 group is created and populated in scriptlet
Patch0: %{name}-2.3.2-do-not-create-group-in-pkcs11_startup.patch Patch0: %{name}-2.3.2-do-not-create-group-in-pkcs11_startup.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=732756 # https://bugzilla.redhat.com/show_bug.cgi?id=732756
@ -14,6 +15,10 @@ Patch1: %{name}-2.4-group.patch
Patch2: %{name}-2.4.1-systemd.patch Patch2: %{name}-2.4.1-systemd.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=830129 # https://bugzilla.redhat.com/show_bug.cgi?id=830129
Patch3: %{name}-2.4.1-830129.patch Patch3: %{name}-2.4.1-830129.patch
# add pkcs_slot man page
Patch4: %{name}-2.4.1-man.patch
# fix locks dir installation
Patch5: %{name}-2.4.2-locks.patch
Requires(pre): shadow-utils coreutils sed Requires(pre): shadow-utils coreutils sed
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: trousers-devel BuildRequires: trousers-devel
@ -40,6 +45,7 @@ This package contains the Slot Daemon (pkcsslotd) and general utilities.
%package libs %package libs
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: The run-time libraries for opencryptoki package Summary: The run-time libraries for opencryptoki package
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-libs < 2.3.2 Obsoletes: %{name}-libs < 2.3.2
%description libs %description libs
@ -56,7 +62,7 @@ functional.
%package devel %package devel
Group: Development/Libraries Group: Development/Libraries
Summary: Development files for openCryptoki Summary: Development files for openCryptoki
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel %description devel
This package contains the development header files for building This package contains the development header files for building
@ -138,6 +144,8 @@ cryptographic hardware such as IBM 4764 or 4765 that uses the
%patch1 -p1 -b .group %patch1 -p1 -b .group
%patch2 -p1 -b .systemd %patch2 -p1 -b .systemd
%patch3 -p1 -b .bz830129 %patch3 -p1 -b .bz830129
%patch4 -p1 -b .man
%patch5 -p1 -b .locks
# Upstream tarball has unnecessary executable perms set on the sources # Upstream tarball has unnecessary executable perms set on the sources
find . -name '*.[ch]' -print0 | xargs -0 chmod -x find . -name '*.[ch]' -print0 | xargs -0 chmod -x
@ -163,6 +171,10 @@ make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/stdll/*.la rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/stdll/*.la
# systemd must create /var/lock/opencryptoki
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%post swtok -p /sbin/ldconfig %post swtok -p /sbin/ldconfig
@ -181,10 +193,7 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/stdll/*.la
%endif %endif
%pre %pre
# Create pkcs11 group
getent group pkcs11 >/dev/null || groupadd -r pkcs11 getent group pkcs11 >/dev/null || groupadd -r pkcs11
# Add root to the pkcs11 group
gpasswd -a root pkcs11
exit 0 exit 0
%post %post
@ -211,12 +220,14 @@ fi
%files %files
%doc ChangeLog FAQ README %doc ChangeLog FAQ README
%doc doc/openCryptoki-HOWTO.pdf %doc doc/openCryptoki-HOWTO.pdf
%{_prefix}/lib/tmpfiles.d/%{name}.conf
%{_unitdir}/pkcsslotd.service %{_unitdir}/pkcsslotd.service
%{_sbindir}/* %{_sbindir}/*
%{_mandir}/man*/* %{_mandir}/man*/*
%{_libdir}/opencryptoki/methods %{_libdir}/opencryptoki/methods
%{_libdir}/pkcs11/methods %{_libdir}/pkcs11/methods
%dir %attr(770,root,pkcs11) %{_sharedstatedir}/%{name} %dir %attr(770,root,pkcs11) %{_sharedstatedir}/%{name}
%dir %attr(770,root,pkcs11) %{_localstatedir}/lock/%{name}
%files libs %files libs
%doc LICENSE %doc LICENSE
@ -235,7 +246,7 @@ fi
%{_libdir}/pkcs11/stdll %{_libdir}/pkcs11/stdll
%files devel %files devel
%{_includedir}/* %{_includedir}/%{name}/
%files swtok %files swtok
%{_libdir}/opencryptoki/stdll/libpkcs11_sw.* %{_libdir}/opencryptoki/stdll/libpkcs11_sw.*
@ -260,6 +271,11 @@ fi
%changelog %changelog
* Thu Jun 21 2012 Dan Horák <dan[at]danny.cz> - 2.4.2-1
- new upstream release 2.4.2
- add pkcs_slot man page
- don't add root to the pkcs11 group
* Mon Jun 11 2012 Dan Horák <dan[at]danny.cz> - 2.4.1-2 * Mon Jun 11 2012 Dan Horák <dan[at]danny.cz> - 2.4.1-2
- fix unresolved symbols in TPM module (#830129) - fix unresolved symbols in TPM module (#830129)

View File

@ -1 +1 @@
165e91b70ae5c78bc34ea910ff91ea8f opencryptoki-2.4.1.tar.gz ec020070237ef652e4e1dc06a642f717 opencryptoki-2.4.2.tar.gz