diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-10-20 11:40:28 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-10-20 11:40:28 +0000 |
commit | a6b50df75f7a4552a3473a2f294cdd6b517d015b (patch) | |
tree | 8588e637f6cdb262a7a210bc0c2d89db44226556 /app-crypt/ekeyd/files | |
parent | Restrict tests on 3.3 series. (diff) | |
download | gentoo-2-a6b50df75f7a4552a3473a2f294cdd6b517d015b.tar.gz gentoo-2-a6b50df75f7a4552a3473a2f294cdd6b517d015b.tar.bz2 gentoo-2-a6b50df75f7a4552a3473a2f294cdd6b517d015b.zip |
Remove old 1.1.3 ebuild; revbump 1.1.4 to use new init scripts that are OpenRC-specific, and thus much shorter. The WATERMARK option has been dropped from ekey-egd-linux, as it should be set in sysctl.conf instead.
(Portage version: 2.2.0_alpha69/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/ekeyd/files')
-rw-r--r-- | app-crypt/ekeyd/files/ekey-egd-linux.conf.2 (renamed from app-crypt/ekeyd/files/ekey-egd-linux.conf) | 2 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-egd-linux.init | 40 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-egd-linux.init.2 | 23 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-ulusbd.conf.2 (renamed from app-crypt/ekeyd/files/ekey-ulusbd.conf) | 7 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-ulusbd.init.2 (renamed from app-crypt/ekeyd/files/ekey-ulusbd.init) | 31 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.1-earlyboot.patch | 32 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.3-format.patch | 26 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.3-libusb_compat.patch | 14 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch | 26 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd.init | 42 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd.init.2 | 30 |
11 files changed, 72 insertions, 201 deletions
diff --git a/app-crypt/ekeyd/files/ekey-egd-linux.conf b/app-crypt/ekeyd/files/ekey-egd-linux.conf.2 index 0f72288ac534..8c0b089d94b5 100644 --- a/app-crypt/ekeyd/files/ekey-egd-linux.conf +++ b/app-crypt/ekeyd/files/ekey-egd-linux.conf.2 @@ -8,5 +8,3 @@ #RECONNECTINTERVAL=10 # Set the number of 1024 bit blocks to request each time #BLOCKS=2 -# Low level entropy to trigger egd-linux entropy read -WATERMARK=1024 diff --git a/app-crypt/ekeyd/files/ekey-egd-linux.init b/app-crypt/ekeyd/files/ekey-egd-linux.init deleted file mode 100644 index c3a2a9914ba6..000000000000 --- a/app-crypt/ekeyd/files/ekey-egd-linux.init +++ /dev/null @@ -1,40 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-egd-linux.init,v 1.1 2011/04/08 02:39:27 flameeyes Exp $ - -: ${HOST:=localhost} -: ${PORT:=8888} -: ${RECONNECTINTERVAL:=10} -: ${BLOCKS:=2} - -depend() { - use net - after ekeyd - - provide entropy -} - -start() { - ebegin "Starting EntropyKey EGD client" - start-stop-daemon \ - --start --pidfile "/var/run/${SVCNAME}.pid" \ - --exec /usr/libexec/ekey-egd-linux -- \ - -H ${HOST} -p ${PORT} \ - -r ${RECONNECTINTERVAL} \ - -b ${BLOCKS} \ - -D "/var/run/${SVCNAME}.pid" - - [ -n "${WATERMARK}" ] && \ - sysctl "kernel.random.write_wakeup_threshold=$WATERMARK" >/dev/null 2>&1 - - eend $? -} - -stop() { - ebegin "Stopping EntropyKey EGD client" - start-stop-daemon \ - --stop --pidfile "/var/run/${SVCNAME}.pid" \ - --exec /usr/libexec/ekey-egd-linux - eend $? -} diff --git a/app-crypt/ekeyd/files/ekey-egd-linux.init.2 b/app-crypt/ekeyd/files/ekey-egd-linux.init.2 new file mode 100644 index 000000000000..91ca2edb775e --- /dev/null +++ b/app-crypt/ekeyd/files/ekey-egd-linux.init.2 @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-egd-linux.init.2,v 1.1 2011/10/20 11:40:27 flameeyes Exp $ + +: ${HOST:=localhost} +: ${PORT:=8888} +: ${RECONNECTINTERVAL:=10} +: ${BLOCKS:=2} + +description="EntropyKey EGD client" + +pidfile=/var/run/$SVCNAME.pid + +command=/usr/libexec/ekey-egd-linux +command_args="-H ${HOST} -p ${PORT} -r ${RECONNECTINTERVAL} -b ${BLOCKS} -D ${pidfile}" + +depend() { + use net + after ekeyd + + provide entropy +} diff --git a/app-crypt/ekeyd/files/ekey-ulusbd.conf b/app-crypt/ekeyd/files/ekey-ulusbd.conf.2 index 1a6100854df8..7ed730152b7c 100644 --- a/app-crypt/ekeyd/files/ekey-ulusbd.conf +++ b/app-crypt/ekeyd/files/ekey-ulusbd.conf.2 @@ -1,6 +1,6 @@ -# Copyright 2009 Gentoo Foundation +# Copyright 2009-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v 1.2 2009/09/29 12:03:21 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf.2,v 1.1 2011/10/20 11:40:27 flameeyes Exp $ # The userland USB daemon has to know the USB path of the EntopyKey to # work properly; in alternative to providing these statically, they @@ -13,4 +13,5 @@ EKEY_SERIAL="" #USB_BUS="" #USB_DEV="" -SOCKET_PATH="/var/run/ekey-ulusbd-${EKEY_SERIAL}" +# this is set by default +# SOCKET_PATH="/var/run/ekey-ulusbd-${EKEY_SERIAL}" diff --git a/app-crypt/ekeyd/files/ekey-ulusbd.init b/app-crypt/ekeyd/files/ekey-ulusbd.init.2 index 9b6faf8e81b9..fd7192d10f0b 100644 --- a/app-crypt/ekeyd/files/ekey-ulusbd.init +++ b/app-crypt/ekeyd/files/ekey-ulusbd.init.2 @@ -1,13 +1,21 @@ #!/sbin/runscript -# Copyright 2009 Gentoo Foundation +# Copyright 2009-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v 1.3 2009/10/04 11:43:34 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init.2,v 1.1 2011/10/20 11:40:27 flameeyes Exp $ INSTANCE="${SVCNAME#*.}" -if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekey-ulusbd" ]; then +if [ -z "${INSTANCE}" -o "${SVCNAME}" = "ekey-ulusbd" ]; then INSTANCE="ekey-ulusbd" fi +: ${SOCKET_PATH:=/var/run/ekey-ulusbd-${EKEY_SERIAL}} + +description="EntropyKey Userland USB Daemon" + +pidfile=/var/run/$SVCNAME.pid +command=/usr/libexec/ekey-ulusbd +command_args="-P ${pidfile} -p ${SOCKET_PATH}" + depend() { need localmount } @@ -23,20 +31,11 @@ start() { USB_DEV=$2 fi - ebegin "Starting EntropyKey Userland USB Daemon" + ebegin "Starting ${description}" start-stop-daemon \ - --start --pidfile "/var/run/${SVCNAME}.pid" \ - --exec /usr/libexec/ekey-ulusbd -- \ - -P "/var/run/${SVCNAME}.pid" \ - -p "${SOCKET_PATH}" \ + --start --pidfile ${pidfile} \ + --exec ${command} -- \ + ${command_args} \ -b $(printf %03d ${USB_BUS}) -d $(printf %03d ${USB_DEV}) -D eend $? } - -stop() { - ebegin "Stopping EntropyKey daemon" - start-stop-daemon \ - --stop --pidfile "/var/run/${SVCNAME}.pid" \ - --exec /usr/libexec/ekey-ulusbd - eend $? -} diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.1-earlyboot.patch b/app-crypt/ekeyd/files/ekeyd-1.1.1-earlyboot.patch deleted file mode 100644 index d415373e0769..000000000000 --- a/app-crypt/ekeyd/files/ekeyd-1.1.1-earlyboot.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: ekeyd-1.1.1/doc/ekeyd-udev -=================================================================== ---- ekeyd-1.1.1.orig/doc/ekeyd-udev -+++ ekeyd-1.1.1/doc/ekeyd-udev -@@ -6,19 +6,20 @@ if test "x$SUBSYSTEM" = "xtty"; then - $BINPATH/ekeydctl ${ACTION} /dev/entropykey/${ENTROPY_KEY_SERIAL} - else - if test "x$ACTION" = "xadd"; then -- mkdir -p /var/run/entropykeys -+ mkdir -p /dev/entropykey -+ mkdir -p /dev/.ekeyd-ulusb - if test "x${BUSNUM}" = "x" -o "x${DEVNUM}" = "x"; then - exit 0 - fi -- if test -r "/var/run/ekey-ulusbd-${ENTROPY_KEY_SERIAL}.pid"; then -- kill $(cat "/var/run/ekey-ulusbd-${ENTROPY_KEY_SERIAL}.pid") || true -+ if test -r "/dev/.ekeyd-ulusb/${ENTROPY_KEY_SERIAL}.pid"; then -+ kill $(cat "/dev/.ekeyd-ulusb/${ENTROPY_KEY_SERIAL}.pid") || true - fi -- $BINPATH/ekey-ulusbd -b${BUSNUM} -d${DEVNUM} -P/var/run/ekey-ulusbd-${ENTROPY_KEY_SERIAL}.pid -p/var/run/entropykeys/${ENTROPY_KEY_SERIAL} -D -+ /usr/libexec/ekey-ulusbd -b${BUSNUM} -d${DEVNUM} -P/dev/.ekeyd-ulusb/${ENTROPY_KEY_SERIAL}.pid -p/dev/entropykey/${ENTROPY_KEY_SERIAL} -D - fi -- $BINPATH/ekeydctl ${ACTION} /var/run/entropykeys/${ENTROPY_KEY_SERIAL} -+ $BINPATH/ekeydctl ${ACTION} /dev/entropykey/${ENTROPY_KEY_SERIAL} - if test "x$ACTION" = "xremove"; then -- rm "/var/run/ekey-ulusbd-${ENTROPYKEY_KEY_SERIAL}.pid" -- rm "/var/run/entropykeys/${ENTROPYKEY_KEY_SERIAL}" -+ rm "/dev/.ekeyd-ulusb/${ENTROPYKEY_KEY_SERIAL}.pid" -+ rm "/dev/entropykey/${ENTROPYKEY_KEY_SERIAL}" - fi - fi - diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.3-format.patch b/app-crypt/ekeyd/files/ekeyd-1.1.3-format.patch deleted file mode 100644 index a705dd503e0c..000000000000 --- a/app-crypt/ekeyd/files/ekeyd-1.1.3-format.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: ekeyd-1.1.3/daemon/ekeyd.c -=================================================================== ---- ekeyd-1.1.3.orig/daemon/ekeyd.c -+++ ekeyd-1.1.3/daemon/ekeyd.c -@@ -203,7 +203,7 @@ open_foldback_output(void) - return (output_stream != NULL); - } - --static const char *usage= -+static const char usage[]= - "Usage: %s [-f <configfile>] [-p <pidfile>] [-v] [-h]\n" - "Entropy Key Daemon\n\n" - "\t-f Read configuration from configfile\n" -Index: ekeyd-1.1.3/daemon/ekey-setkey.c -=================================================================== ---- ekeyd-1.1.3.orig/daemon/ekey-setkey.c -+++ ekeyd-1.1.3/daemon/ekey-setkey.c -@@ -79,7 +79,7 @@ calc_mac(uint8_t *snum, uint8_t *mkey, u - return mac; - } - --static const char *usage = -+static const char usage[] = - "Usage: %s [-d] [-h] [-n] [-f <keyring>] [-m <master>]\n" - " [-s <serial>] <path>\n" - "Entropy key device long term session key tool\n\n" diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.3-libusb_compat.patch b/app-crypt/ekeyd/files/ekeyd-1.1.3-libusb_compat.patch deleted file mode 100644 index e97f4e12ba3e..000000000000 --- a/app-crypt/ekeyd/files/ekeyd-1.1.3-libusb_compat.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: ekeyd-1.1.3/daemon/ekey-ulusbd.c -=================================================================== ---- ekeyd-1.1.3.orig/daemon/ekey-ulusbd.c -+++ ekeyd-1.1.3/daemon/ekey-ulusbd.c -@@ -100,7 +100,8 @@ find_usb_device(char *busmatch, char *de - - #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP - if ((r = usb_detach_kernel_driver_np(devh, EKEY_IFACE)) != 0) { -- if (r != -ENODATA) { -+ /* libusb_compat-0.1.3 mistakenly translate ENODATA to ENOENT */ -+ if (r != -ENODATA && r != -ENOENT) { - fprintf(stderr, - "Unable to detach Entropy Key at %s/%s from kernel\n", - busmatch, devmatch); diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch b/app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch deleted file mode 100644 index fc709108bc74..000000000000 --- a/app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: ekeyd-1.1.3/doc/60-UDEKEY01.rules -=================================================================== ---- ekeyd-1.1.3.orig/doc/60-UDEKEY01.rules -+++ ekeyd-1.1.3/doc/60-UDEKEY01.rules -@@ -2,7 +2,7 @@ - - # Detect an Entropy Key being inserted - ACTION=="add|change", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="usb_id --export %p" --ACTION=="add|change", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/echo ENTROPY_KEY_SERIAL=$env{ID_SERIAL_SHORT}" -+ACTION=="add|change", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/sh -c '/bin/echo ENTROPY_KEY_SERIAL=$env{ID_SERIAL_SHORT} | /bin/sed -e s:/:_:g'" - - # Add the /dev/entropykey/FOO symbolic link - ACTION=="add|change", ENV{ENTROPY_KEY_SERIAL}!="", SYMLINK+="entropykey/$env{ENTROPY_KEY_SERIAL}" -Index: ekeyd-1.1.3/doc/60-UDEKEY01-UDS.rules -=================================================================== ---- ekeyd-1.1.3.orig/doc/60-UDEKEY01-UDS.rules -+++ ekeyd-1.1.3/doc/60-UDEKEY01-UDS.rules -@@ -3,7 +3,7 @@ - - # Detect an Entropy Key being inserted - # ACTION=="add", SUBSYSTEM=="usb", DEVTYPE=="usb_device", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="usb_id --export %p" --ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/echo ENTROPY_KEY_SERIAL=$attr{serial}" -+ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/sh -c '/bin/echo ENTROPY_KEY_SERIAL=$env{ID_SERIAL_SHORT} | /bin/sed -e s:/:_:g'" - - # And tell the ekeyd about the new device. - ACTION=="add|change", ENV{ENTROPY_KEY_SERIAL}!="", RUN+="/lib/udev/ekeyd-udev" diff --git a/app-crypt/ekeyd/files/ekeyd.init b/app-crypt/ekeyd/files/ekeyd.init deleted file mode 100644 index 897f3ac77e95..000000000000 --- a/app-crypt/ekeyd/files/ekeyd.init +++ /dev/null @@ -1,42 +0,0 @@ -#!/sbin/runscript -# Copyright 2009-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.4 2011/04/08 02:39:27 flameeyes Exp $ - -INSTANCE="${SVCNAME#*.}" -if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekeyd" ]; then - INSTANCE="ekeyd" -fi - -depend() { - use udev ekey-ulusbd - need localmount - - local cfgfile="/etc/entropykey/${INSTANCE}.conf" - config "${cfgfile}" - - # quickly parse the configuration file; we only provide entropy - # if we're not using the egd server/client split method. - if sed -e 's:--.*::' "${cfgfile}" | grep -q SetOutputToKernel; then - provide entropy - fi -} - -start() { - ebegin "Starting EntropyKey daemon" - start-stop-daemon \ - --start --pidfile "/var/run/${SVCNAME}.pid" \ - --exec /usr/libexec/ekeyd -- \ - -f "/etc/entropykey/${INSTANCE}.conf" \ - -p "/var/run/${SVCNAME}.pid" - eend $? -} - -stop() { - ebegin "Stopping EntropyKey daemon" - start-stop-daemon \ - --stop --pidfile "/var/run/${SVCNAME}.pid" \ - --exec /usr/libexec/ekeyd - eend $? -} - diff --git a/app-crypt/ekeyd/files/ekeyd.init.2 b/app-crypt/ekeyd/files/ekeyd.init.2 new file mode 100644 index 000000000000..a3f372cc8444 --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd.init.2 @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init.2,v 1.1 2011/10/20 11:40:27 flameeyes Exp $ + +INSTANCE="${SVCNAME#*.}" +if [ -z "${INSTANCE}" -o "${SVCNAME}" = "ekeyd" ]; then + INSTANCE="ekeyd" +fi + +description="EntropyKey daemon" + +pidfile=/var/run/$SVCNAME.pid +cfgfile=/etc/entropykey/${INSTANCE}.conf + +command=/usr/libexec/ekeyd +command_args="-f ${cfgfile} -p ${pidfile}" + +depend() { + config $cfgfile + + use udev ekey-ulusbd + need localmount + + # quickly parse the configuration file; we only provide entropy + # if we're not using the egd server/client split method. + if sed -e 's:--.*::' "${cfgfile}" | grep -q SetOutputToKernel; then + provide entropy + fi +} |