summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/pcsc-lite/files')
-rw-r--r--sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules (renamed from sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules)4
-rw-r--r--sys-apps/pcsc-lite/files/pcsc-lite-1.9.8-systemd-user.patch18
-rw-r--r--sys-apps/pcsc-lite/files/pcscd-udev14
-rw-r--r--sys-apps/pcsc-lite/files/pcscd.conf1
4 files changed, 35 insertions, 2 deletions
diff --git a/sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules b/sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules
index e6ee464344ff..fc612d5e25f3 100644
--- a/sys-apps/pcsc-lite/files/99-pcscd-hotplug.rules
+++ b/sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# We add this here so that it runs after ccid's and ifd-gempc's rules;
# if we just added a pcscd-owned device, we hotplug the pcscd service.
-ACTION=="add", ENV{PCSCD}=="1", GROUP="pcscd", RUN+="/bin/env IN_HOTPLUG=1 /etc/init.d/pcscd --quiet start"
+ACTION=="add", ENV{PCSCD}=="1", GROUP="pcscd", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pcscd.service", RUN+="pcscd.sh"
diff --git a/sys-apps/pcsc-lite/files/pcsc-lite-1.9.8-systemd-user.patch b/sys-apps/pcsc-lite/files/pcsc-lite-1.9.8-systemd-user.patch
new file mode 100644
index 000000000000..4d64c5c032f0
--- /dev/null
+++ b/sys-apps/pcsc-lite/files/pcsc-lite-1.9.8-systemd-user.patch
@@ -0,0 +1,18 @@
+Don't run the daemon as root
+https://bugs.gentoo.org/545390
+
+--- a/etc/pcscd.service.in
++++ b/etc/pcscd.service.in
+@@ -4,9 +4,12 @@
+ Documentation=man:pcscd(8)
+
+ [Service]
++PIDFile=/run/pcscd/pcscd.pid
+ ExecStart=@sbindir_exp@/pcscd --foreground --auto-exit $PCSCD_ARGS
+ ExecReload=@sbindir_exp@/pcscd --hotplug
+ EnvironmentFile=-@sysconfdir@/default/pcscd
++User=pcscd
++Group=pcscd
+
+ [Install]
+ Also=pcscd.socket
diff --git a/sys-apps/pcsc-lite/files/pcscd-udev b/sys-apps/pcsc-lite/files/pcscd-udev
new file mode 100644
index 000000000000..e6d6c7348887
--- /dev/null
+++ b/sys-apps/pcsc-lite/files/pcscd-udev
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# pcscd.sh: udev external RUN script
+#
+# based on netifrc net.sh helper
+# Copyright 2007 Roy Marples <uberlord@gentoo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+# make sure openrc is managing services
+if [ ! -d /run/openrc ]; then
+ exit 0
+fi
+
+IN_HOTPLUG=1 /etc/init.d/pcscd --quiet start
diff --git a/sys-apps/pcsc-lite/files/pcscd.conf b/sys-apps/pcsc-lite/files/pcscd.conf
new file mode 100644
index 000000000000..168c860e88c8
--- /dev/null
+++ b/sys-apps/pcsc-lite/files/pcscd.conf
@@ -0,0 +1 @@
+d /run/pcscd 0755 pcscd pcscd -