Update to 0.23.9-2
- server: Make it possible to eval envvar settings
This commit is contained in:
parent
a55411e113
commit
6586159cc3
|
@ -5,3 +5,6 @@
|
||||||
/x86_64/
|
/x86_64/
|
||||||
/trust-extract-compat
|
/trust-extract-compat
|
||||||
/p11-kit-0.23.9.tar.gz
|
/p11-kit-0.23.9.tar.gz
|
||||||
|
/p11-kit-client.service
|
||||||
|
/trust-extract-compat
|
||||||
|
/p11-kit-0.23.9.tar.gz
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=p11-kit client
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=true
|
||||||
|
RuntimeDirectory=p11-kit
|
||||||
|
ExecStart=/usr/bin/true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
|
@ -0,0 +1,52 @@
|
||||||
|
From 031912fa844c4f3da327c8b2578d9d9ce2a6473e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daiki Ueno <dueno@redhat.com>
|
||||||
|
Date: Thu, 5 Oct 2017 10:59:02 +0200
|
||||||
|
Subject: [PATCH] server: Make it possible to eval envvar settings
|
||||||
|
|
||||||
|
Previously, calling "eval $(p11-kit server)" from shell hung because
|
||||||
|
the program didn't properly close stdout before forking.
|
||||||
|
---
|
||||||
|
p11-kit/server.c | 20 +++++++++++---------
|
||||||
|
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/p11-kit/server.c b/p11-kit/server.c
|
||||||
|
index 97e18e2..96c77ec 100644
|
||||||
|
--- a/p11-kit/server.c
|
||||||
|
+++ b/p11-kit/server.c
|
||||||
|
@@ -346,6 +346,17 @@ server_loop (Server *server,
|
||||||
|
if (server->socket == -1)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
+ if (!quiet) {
|
||||||
|
+ char *path;
|
||||||
|
+
|
||||||
|
+ path = p11_path_encode (server->socket_name);
|
||||||
|
+ printf ("P11_KIT_SERVER_ADDRESS=unix:path=%s\n", path);
|
||||||
|
+ free (path);
|
||||||
|
+ printf ("P11_KIT_SERVER_PID=%d\n", getpid ());
|
||||||
|
+ fflush (stdout);
|
||||||
|
+ close (STDOUT_FILENO);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* run as daemon */
|
||||||
|
if (!foreground) {
|
||||||
|
pid = fork ();
|
||||||
|
@@ -372,15 +383,6 @@ server_loop (Server *server,
|
||||||
|
|
||||||
|
sigprocmask (SIG_BLOCK, &blockset, NULL);
|
||||||
|
|
||||||
|
- if (!quiet) {
|
||||||
|
- char *path;
|
||||||
|
-
|
||||||
|
- path = p11_path_encode (server->socket_name);
|
||||||
|
- printf ("P11_KIT_SERVER_ADDRESS=unix:path=%s\n", path);
|
||||||
|
- free (path);
|
||||||
|
- printf ("P11_KIT_SERVER_PID=%d\n", getpid ());
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* accept connections */
|
||||||
|
ret = 0;
|
||||||
|
for (;;) {
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
12
p11-kit.spec
12
p11-kit.spec
|
@ -1,6 +1,7 @@
|
||||||
# This spec file has been automatically updated
|
# This spec file has been automatically updated
|
||||||
Version: 0.23.9
|
Version: 0.23.9
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
|
Patch1: p11-kit-server-eval-env.patch
|
||||||
Name: p11-kit
|
Name: p11-kit
|
||||||
Summary: Library for loading and sharing PKCS#11 modules
|
Summary: Library for loading and sharing PKCS#11 modules
|
||||||
|
|
||||||
|
@ -8,6 +9,7 @@ License: BSD
|
||||||
URL: http://p11-glue.freedesktop.org/p11-kit.html
|
URL: http://p11-glue.freedesktop.org/p11-kit.html
|
||||||
Source0: https://github.com/p11-glue/p11-kit/releases/download/%{version}/p11-kit-%{version}.tar.gz
|
Source0: https://github.com/p11-glue/p11-kit/releases/download/%{version}/p11-kit-%{version}.tar.gz
|
||||||
Source1: trust-extract-compat
|
Source1: trust-extract-compat
|
||||||
|
Source2: p11-kit-client.service
|
||||||
|
|
||||||
BuildRequires: libtasn1-devel >= 2.3
|
BuildRequires: libtasn1-devel >= 2.3
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
|
@ -64,7 +66,7 @@ feature is still experimental.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# These paths are the source paths that come from the plan here:
|
# These paths are the source paths that come from the plan here:
|
||||||
|
@ -80,6 +82,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/*.la
|
||||||
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_libexecdir}/p11-kit/
|
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_libexecdir}/p11-kit/
|
||||||
# Install the example conf with %%doc instead
|
# Install the example conf with %%doc instead
|
||||||
rm $RPM_BUILD_ROOT%{_sysconfdir}/pkcs11/pkcs11.conf.example
|
rm $RPM_BUILD_ROOT%{_sysconfdir}/pkcs11/pkcs11.conf.example
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_userunitdir}
|
||||||
|
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_userunitdir}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
make check
|
||||||
|
@ -134,10 +138,14 @@ fi
|
||||||
|
|
||||||
%files server
|
%files server
|
||||||
%{_libdir}/pkcs11/p11-kit-client.so
|
%{_libdir}/pkcs11/p11-kit-client.so
|
||||||
|
%{_userunitdir}/p11-kit-client.service
|
||||||
%{_libexecdir}/p11-kit/p11-kit-server
|
%{_libexecdir}/p11-kit/p11-kit-server
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 05 2017 Daiki Ueno <dueno@redhat.com> - 0.23.9-2
|
||||||
|
- server: Make it possible to eval envvar settings
|
||||||
|
|
||||||
* Wed Oct 04 2017 Daiki Ueno <dueno@redhat.com> - 0.23.9-1
|
* Wed Oct 04 2017 Daiki Ueno <dueno@redhat.com> - 0.23.9-1
|
||||||
- Update to upstream 0.23.9
|
- Update to upstream 0.23.9
|
||||||
|
|
||||||
|
|
1
sources
1
sources
|
@ -1,2 +1,3 @@
|
||||||
|
SHA512 (p11-kit-client.service) = 0f08618851c6eafb35c630957044fc96324be4d3828cdd2aa9b5d6e1245549197ca5b969d6a2f735c893d73c02e885cdc3205bd43e37f6124ebc6cfa61970d3b
|
||||||
SHA512 (trust-extract-compat) = 91210705f9bcf1a13c0de1ca9943e3ac68296bfcb7953fc59241de060247b470b39be6e914dd4d92e38a78d5df0962c83315ad78f8c0eade8e62d884b05fdd42
|
SHA512 (trust-extract-compat) = 91210705f9bcf1a13c0de1ca9943e3ac68296bfcb7953fc59241de060247b470b39be6e914dd4d92e38a78d5df0962c83315ad78f8c0eade8e62d884b05fdd42
|
||||||
SHA512 (p11-kit-0.23.9.tar.gz) = 6a8a569483763d3ffacadf669b8ba9b9be38a77dd8dc366ca0cb91c44753517fa1879d4422e4e8dfbcac594565727839a619566a170c0f94f8e112f18b0086ed
|
SHA512 (p11-kit-0.23.9.tar.gz) = 6a8a569483763d3ffacadf669b8ba9b9be38a77dd8dc366ca0cb91c44753517fa1879d4422e4e8dfbcac594565727839a619566a170c0f94f8e112f18b0086ed
|
||||||
|
|
Loading…
Reference in New Issue