diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-crypt/ekeyd/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-crypt/ekeyd/files')
-rw-r--r-- | app-crypt/ekeyd/files/90-ekeyd.rules | 16 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-egd-linux.conf.2 | 10 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-egd-linux.init.2 | 23 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-ulusbd.conf.2 | 17 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-ulusbd.init.2 | 41 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.4-gentoo.patch | 133 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.5-const_char_usage.patch | 32 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.5-enoent.patch | 23 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.5-misc.patch | 50 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.5-path-fixes.patch | 49 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.5-remove-werror.patch | 29 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd-1.1.5-udev-rule.patch | 36 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd.init.2 | 30 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd.service | 8 |
14 files changed, 497 insertions, 0 deletions
diff --git a/app-crypt/ekeyd/files/90-ekeyd.rules b/app-crypt/ekeyd/files/90-ekeyd.rules new file mode 100644 index 000000000000..2532ba852efc --- /dev/null +++ b/app-crypt/ekeyd/files/90-ekeyd.rules @@ -0,0 +1,16 @@ +# Entropy key udev rules +# +# Centos/RHEL 6 rules for udev version 147 +# +# These rules create devices under /dev/entropykey/<serialnumber> +# +# Copyright 2011-2014 Simtec Electronics +# +# For licence terms refer to the COPYING file distributed with the source. + +ACTION=="add", SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="20df", ENV{ID_MODEL_ID}=="0001", SYMLINK+="entropykey/$env{ID_SERIAL_SHORT}" + +ACTION=="add", SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="20df", ENV{ID_MODEL_ID}=="0001", RUN+="/usr/sbin/ekeydctl add /dev/entropykey/$env{ID_SERIAL_SHORT}" + +ACTION=="remove", SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="20df", ENV{ID_MODEL_ID}=="0001", RUN+="/usr/sbin/ekeydctl remove $env{ID_SERIAL_SHORT}" + diff --git a/app-crypt/ekeyd/files/ekey-egd-linux.conf.2 b/app-crypt/ekeyd/files/ekey-egd-linux.conf.2 new file mode 100644 index 000000000000..8c0b089d94b5 --- /dev/null +++ b/app-crypt/ekeyd/files/ekey-egd-linux.conf.2 @@ -0,0 +1,10 @@ +# Configuration file for ekey-egd-linux + +# Hostname or IP address to connect to. +#HOST="localhost" +# Port number to connect to. +#PORT="8888" +# Time between reconnect attempts. +#RECONNECTINTERVAL=10 +# Set the number of 1024 bit blocks to request each time +#BLOCKS=2 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..c843d19e1171 --- /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 +# $Id$ + +: ${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.2 b/app-crypt/ekeyd/files/ekey-ulusbd.conf.2 new file mode 100644 index 000000000000..eb12afc36a14 --- /dev/null +++ b/app-crypt/ekeyd/files/ekey-ulusbd.conf.2 @@ -0,0 +1,17 @@ +# Copyright 2009-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# The userland USB daemon has to know the USB path of the EntopyKey to +# work properly; in alternative to providing these statically, they +# can be found by giving the serial of the key. +# +# The serial will also be used to set the default path to open the +# socket to. + +EKEY_SERIAL="" +#USB_BUS="" +#USB_DEV="" + +# this is set by default +# SOCKET_PATH="/var/run/ekey-ulusbd-${EKEY_SERIAL}" diff --git a/app-crypt/ekeyd/files/ekey-ulusbd.init.2 b/app-crypt/ekeyd/files/ekey-ulusbd.init.2 new file mode 100644 index 000000000000..c448e8974de6 --- /dev/null +++ b/app-crypt/ekeyd/files/ekey-ulusbd.init.2 @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 2009-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +INSTANCE="${SVCNAME#*.}" +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 +} + +start() { + if [ -z ${USB_BUS} ]; then + set -- $(lsusb -v -d 20df:0001 | \ + egrep '(^Bus|iSerial)' | \ + grep -B1 "${EKEY_SERIAL}" | \ + head -n 1 | \ + cut -c 5-7,15-18) + USB_BUS=$1 + USB_DEV=$2 + fi + + ebegin "Starting ${description}" + start-stop-daemon \ + --start --pidfile ${pidfile} \ + --exec ${command} -- \ + ${command_args} \ + -b $(printf %03d ${USB_BUS}) -d $(printf %03d ${USB_DEV}) -D + eend $? +} diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.4-gentoo.patch b/app-crypt/ekeyd/files/ekeyd-1.1.4-gentoo.patch new file mode 100644 index 000000000000..f1491362e83f --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.4-gentoo.patch @@ -0,0 +1,133 @@ +Index: ekeyd-1.1.4/host/ekeyd.c +=================================================================== +--- ekeyd-1.1.4.orig/host/ekeyd.c ++++ ekeyd-1.1.4/host/ekeyd.c +@@ -209,7 +209,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.4/host/ekey-setkey.c +=================================================================== +--- ekeyd-1.1.4.orig/host/ekey-setkey.c ++++ ekeyd-1.1.4/host/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" +Index: ekeyd-1.1.4/host/ekey-ulusbd.c +=================================================================== +--- ekeyd-1.1.4.orig/host/ekey-ulusbd.c ++++ ekeyd-1.1.4/host/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); +Index: ekeyd-1.1.4/udev/entropykey.sh +=================================================================== +--- ekeyd-1.1.4.orig/udev/entropykey.sh ++++ ekeyd-1.1.4/udev/entropykey.sh +@@ -19,9 +19,9 @@ wait_for_usb () { + COUNTER=$(( ${COUNTER} + 1 )) + test ${COUNTER} -ge 10 && exit 1 + done +- $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/.ekey-ulusbd/${ENTROPY_KEY_SERIAL}.pid -p/dev/entropykey/${ENTROPY_KEY_SERIAL} -D + sleep 1 +- $BINPATH/ekeydctl ${ACTION} /var/run/entropykeys/${ENTROPY_KEY_SERIAL} ++ $BINPATH/ekeydctl ${ACTION} /dev/entropykey/${ENTROPY_KEY_SERIAL} + exit 0 + } + +@@ -34,18 +34,18 @@ else + 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/.ekey-ulusbd/${ENTROPY_KEY_SERIAL}.pid"; then ++ kill $(< "/dev/.ekey-ulusbd/${ENTROPY_KEY_SERIAL}.pid") || true + fi +- mkdir -p /var/run/entropykeys ++ mkdir -p /dev/entropykey /dev/.ekeyd-ulusb + wait_for_usb & + exit 0 + fi + # Update ekeyd with device operation +- $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/.ekey-ulusbd/${ENTROPYKEY_KEY_SERIAL}.pid" ++ rm "/dev/entropykey/${ENTROPYKEY_KEY_SERIAL}" + fi + fi + +Index: ekeyd-1.1.4/udev/fedora15/60-entropykey.rules +=================================================================== +--- ekeyd-1.1.4.orig/udev/fedora15/60-entropykey.rules ++++ ekeyd-1.1.4/udev/fedora15/60-entropykey.rules +@@ -9,10 +9,10 @@ + # For licence terms refer to the COPYING file distributed with the source. + + # Detect an Entropy Key being inserted and add info values to environment +-ACTION=="add|change|remove", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", BUS=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="usb_id --export %p" ++ACTION=="add|change|remove", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="usb_id --export %p" + + # Detect an Entropy Key being inserted and extract serial number +-ACTION=="add|change|remove", 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|remove", 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/<serialnumber> symbolic link + ENV{ENTROPY_KEY_SERIAL}!="", SYMLINK+="entropykey/$env{ENTROPY_KEY_SERIAL}" +Index: ekeyd-1.1.4/udev/fedora15/60-entropykey-uds.rules +=================================================================== +--- ekeyd-1.1.4.orig/udev/fedora15/60-entropykey-uds.rules ++++ ekeyd-1.1.4/udev/fedora15/60-entropykey-uds.rules +@@ -9,7 +9,7 @@ + # For licence terms refer to the COPYING file. + + # Detect an Entropy Key being inserted and extract serial number +-ACTION=="add|change|remove", SUBSYSTEM=="usb", BUS=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/echo ENTROPY_KEY_SERIAL=$attr{serial}" ++ACTION=="add|change|remove", 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 device action. + ENV{ENTROPY_KEY_SERIAL}!="", RUN+="/lib/udev/entropykey.sh" +Index: ekeyd-1.1.4/host/Makefile +=================================================================== +--- ekeyd-1.1.4.orig/host/Makefile ++++ ekeyd-1.1.4/host/Makefile +@@ -107,7 +107,7 @@ OPT ?= -O2 + CFLAGS += $(INCLUDES) + CFLAGS += -g -Wall $(OPT) + CFLAGS += -fno-strict-aliasing +-CFLAGS += -std=c99 -Wall -pedantic -Wshadow -Werror -D_GNU_SOURCE ++CFLAGS += -std=c99 -Wall -pedantic -Wshadow -D_GNU_SOURCE + CFLAGS += '-DCONFIGFILE="$(SYSCONFPREFIX)/ekeyd.conf"' + CFLAGS += '-DPIDFILE="$(RUNTIMEPREFIX)/ekeyd.pid"' + CFLAGS += '-DKEYRINGFILE="$(SYSCONFPREFIX)/keyring"' +@@ -148,7 +148,7 @@ daemonise_ulusbd.o: daemonise.c + $(COMPILE.c) $(OUTPUT_OPTION) $(PTHFLAGS) $^ + + egd-linux: egd-linux.o daemonise.o +- $(CC) $(CFLAGS) -o $@ $^ ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + + ekeyd: ekeyd.o daemonise.o lstate.o connection.o stream.o frame.o packet.o keydb.o util.o fds.o krnlop.o foldback.o stats.o nonce.o ../device/frames/pem.o ../device/skeinwrap.o ../device/skein/skein.o ../device/skein/skein_block.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.5-const_char_usage.patch b/app-crypt/ekeyd/files/ekeyd-1.1.5-const_char_usage.patch new file mode 100644 index 000000000000..81ad8e6a5337 --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.5-const_char_usage.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# User kristianf +# Date 1382916823 -3600 +# Mon Oct 28 00:33:43 2013 +0100 +# Node ID 0d99149615ec5ec70a6d03c685291ddc55babff6 +# Parent fd192324ff9ae4c4c92cdb9c27f5ae100da136a6 +Rewrite static const char *usage + +diff -r fd192324ff9a -r 0d99149615ec host/ekey-setkey.c +--- a/host/ekey-setkey.c Mon Oct 28 00:31:59 2013 +0100 ++++ b/host/ekey-setkey.c Mon Oct 28 00:33:43 2013 +0100 +@@ -79,7 +79,7 @@ + return mac; + } + +-static const char *usage = ++static const char usage[] = + "This is a low level tool. You probably wanted to use ekey-rekey instead.\n\n" + "Usage: %s [-d] [-h] [-n] [-f <keyring>] [-m <master>]\n" + " [-s <serial>] <path>\n" +diff -r fd192324ff9a -r 0d99149615ec host/ekeyd.c +--- a/host/ekeyd.c Mon Oct 28 00:31:59 2013 +0100 ++++ b/host/ekeyd.c Mon Oct 28 00:33:43 2013 +0100 +@@ -209,7 +209,7 @@ + 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" diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.5-enoent.patch b/app-crypt/ekeyd/files/ekeyd-1.1.5-enoent.patch new file mode 100644 index 000000000000..2d4cccbafafa --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.5-enoent.patch @@ -0,0 +1,23 @@ +# HG changeset patch +# User kristianf +# Date 1382916946 -3600 +# Mon Oct 28 00:35:46 2013 +0100 +# Node ID 0a9e41a05aafb98cc8c21562931cb1cbb5e30c1f +# Parent 0d99149615ec5ec70a6d03c685291ddc55babff6 +libusb_compat + +diff -r 0d99149615ec -r 0a9e41a05aaf host/ekey-ulusbd.c +--- a/host/ekey-ulusbd.c Mon Oct 28 00:33:43 2013 +0100 ++++ b/host/ekey-ulusbd.c Mon Oct 28 00:35:46 2013 +0100 +@@ -100,8 +100,9 @@ + + #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP + if ((r = usb_detach_kernel_driver_np(devh, EKEY_IFACE)) != 0) { +- if (r != -ENODATA) { +- fprintf(stderr, ++ /* 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); + usb_close(devh); diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.5-misc.patch b/app-crypt/ekeyd/files/ekeyd-1.1.5-misc.patch new file mode 100644 index 000000000000..660f0bacf0ac --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.5-misc.patch @@ -0,0 +1,50 @@ +diff -r 724cf5abf164 host/Makefile +--- a/host/Makefile Mon Oct 28 00:43:49 2013 +0100 ++++ b/host/Makefile Mon Oct 28 00:54:01 2013 +0100 +@@ -19,7 +19,7 @@ + RM ?= rm -f + LUA_V ?= 5.1 + EXTRA_INC ?= +-LUA_INC ?= -I/usr/include/lua5.1 ++LUA_INC ?= -I/usr/include + LIBDL ?= -ldl + PTHFLAGS ?= + PTHLIBS ?= -lpthread +@@ -31,7 +31,7 @@ + MANZEXT := .gz + + # Current tool version as returned from tools +-EKEYD_VERSION_S="1.1.4" ++EKEYD_VERSION_S="1.1.5" + + # Attempt to detect an OS and set build options as appropriate + OSNAME=$(shell uname -s | tr A-Z a-z | tr -d /) +@@ -91,10 +91,7 @@ + override MANZCMD:=cat + override MANZEXT:= + endif +-override LUA_INC:=-I/usr/local/include/lua51 + override LIBDL:= +-LIBDIRS += -L/usr/local/lib +-INCLUDES += -I/usr/local/include + endif + endif + endif +@@ -114,7 +111,7 @@ + CFLAGS += '-DEKEYD_VERSION_S=""$(EKEYD_VERSION_S)""' + CFLAGS += $(EXTRA_CFLAGS) + +-LIBS += -llua$(LUA_V) -lm $(LIBDL) ++LIBS += -llua -lm $(LIBDL) + LDFLAGS += $(LIBDIRS) + + +@@ -157,7 +154,7 @@ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + + control.inc: bin2c.lua control.lua +- lua$(LUA_V) bin2c.lua +control.lua result > control.inc.new ++ lua bin2c.lua +control.lua result > control.inc.new + mv control.inc.new control.inc + + lstate.o: lstate.c control.inc diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.5-path-fixes.patch b/app-crypt/ekeyd/files/ekeyd-1.1.5-path-fixes.patch new file mode 100644 index 000000000000..0a9a59186d1d --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.5-path-fixes.patch @@ -0,0 +1,49 @@ +# HG changeset patch +# User kristianf +# Date 1382917171 -3600 +# Mon Oct 28 00:39:31 2013 +0100 +# Node ID d96c42b36cb125e6e52cff623b7bdad1910284b4 +# Parent 0a9e41a05aafb98cc8c21562931cb1cbb5e30c1f +entropykey.sh + +diff -r 0a9e41a05aaf -r d96c42b36cb1 udev/entropykey.sh +--- a/udev/entropykey.sh Mon Oct 28 00:35:46 2013 +0100 ++++ b/udev/entropykey.sh Mon Oct 28 00:39:31 2013 +0100 +@@ -19,9 +19,10 @@ + COUNTER=$(( ${COUNTER} + 1 )) + test ${COUNTER} -ge 10 && exit 1 + done +- $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/.ekey-ulusbd/${ENTROPY_KEY_SERIAL}.pid -p/dev/entropykey/${ENTROPY_KEY_SERIAL} -D ++ + sleep 1 +- $BINPATH/ekeydctl ${ACTION} /var/run/entropykeys/${ENTROPY_KEY_SERIAL} ++ $BINPATH/ekeydctl ${ACTION} /dev/entropykey/${ENTROPY_KEY_SERIAL} + exit 0 + } + +@@ -34,18 +35,18 @@ + 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/.ekey-ulusbd/${ENTROPY_KEY_SERIAL}.pid"; then ++ kill $(< "/dev/.ekey-ulusbd/${ENTROPY_KEY_SERIAL}.pid") || true + fi +- mkdir -p /var/run/entropykeys ++ mkdir -p /dev/entropykey /dev/.ekeyd-ulusb + wait_for_usb & + exit 0 + fi + # Update ekeyd with device operation +- $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/.ekey-ulusbd/${ENTROPYKEY_KEY_SERIAL}.pid" ++ rm "/dev/entropykey/${ENTROPYKEY_KEY_SERIAL}" + fi + fi + diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.5-remove-werror.patch b/app-crypt/ekeyd/files/ekeyd-1.1.5-remove-werror.patch new file mode 100644 index 000000000000..bb5862dee986 --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.5-remove-werror.patch @@ -0,0 +1,29 @@ +# HG changeset patch +# User kristianf +# Date 1382917429 -3600 +# Mon Oct 28 00:43:49 2013 +0100 +# Node ID 724cf5abf164dd5889a7c72916aa524c3822b8bd +# Parent 902b9c6908618864319835d69981f9ea902be324 +Makefile + +diff -r 902b9c690861 -r 724cf5abf164 host/Makefile +--- a/host/Makefile Mon Oct 28 00:41:59 2013 +0100 ++++ b/host/Makefile Mon Oct 28 00:43:49 2013 +0100 +@@ -107,7 +107,7 @@ + CFLAGS += $(INCLUDES) + CFLAGS += -g -Wall $(OPT) + CFLAGS += -fno-strict-aliasing +-CFLAGS += -std=c99 -Wall -pedantic -Wshadow -Werror -D_GNU_SOURCE ++CFLAGS += -std=c99 -Wall -pedantic -Wshadow -D_GNU_SOURCE + CFLAGS += '-DCONFIGFILE="$(SYSCONFPREFIX)/ekeyd.conf"' + CFLAGS += '-DPIDFILE="$(RUNTIMEPREFIX)/ekeyd.pid"' + CFLAGS += '-DKEYRINGFILE="$(SYSCONFPREFIX)/keyring"' +@@ -148,7 +148,7 @@ + $(COMPILE.c) $(OUTPUT_OPTION) $(PTHFLAGS) $^ + + egd-linux: egd-linux.o daemonise.o +- $(CC) $(CFLAGS) -o $@ $^ ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + + ekeyd: ekeyd.o daemonise.o lstate.o connection.o stream.o frame.o packet.o keydb.o util.o fds.o krnlop.o foldback.o stats.o nonce.o ../device/frames/pem.o ../device/skeinwrap.o ../device/skein/skein.o ../device/skein/skein_block.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.5-udev-rule.patch b/app-crypt/ekeyd/files/ekeyd-1.1.5-udev-rule.patch new file mode 100644 index 000000000000..c4b53a802bf6 --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd-1.1.5-udev-rule.patch @@ -0,0 +1,36 @@ +# HG changeset patch +# User kristianf +# Date 1382917319 -3600 +# Mon Oct 28 00:41:59 2013 +0100 +# Node ID 902b9c6908618864319835d69981f9ea902be324 +# Parent d96c42b36cb125e6e52cff623b7bdad1910284b4 +udev rule + +diff -r d96c42b36cb1 -r 902b9c690861 udev/fedora15/60-entropykey-uds.rules +--- a/udev/fedora15/60-entropykey-uds.rules Mon Oct 28 00:39:31 2013 +0100 ++++ b/udev/fedora15/60-entropykey-uds.rules Mon Oct 28 00:41:59 2013 +0100 +@@ -9,7 +9,7 @@ + # For licence terms refer to the COPYING file. + + # Detect an Entropy Key being inserted and extract serial number +-ACTION=="add|change|remove", SUBSYSTEM=="usb", BUS=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/echo ENTROPY_KEY_SERIAL=$attr{serial}" ++ACTION=="add|change|remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="/bin/sh -c /bin/echo ENTROPY_KEY_SERIAL=$attr{serial}" + + # And tell the ekeyd about the device action. + ENV{ENTROPY_KEY_SERIAL}!="", RUN+="/lib/udev/entropykey.sh" +diff -r d96c42b36cb1 -r 902b9c690861 udev/fedora15/60-entropykey.rules +--- a/udev/fedora15/60-entropykey.rules Mon Oct 28 00:39:31 2013 +0100 ++++ b/udev/fedora15/60-entropykey.rules Mon Oct 28 00:41:59 2013 +0100 +@@ -9,10 +9,10 @@ + # For licence terms refer to the COPYING file distributed with the source. + + # Detect an Entropy Key being inserted and add info values to environment +-ACTION=="add|change|remove", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", BUS=="usb", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{program}="usb_id --export %p" ++ACTION=="add|change|remove", SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="20df", ATTRS{idProduct}=="0001", IMPORT{builtin}="usb_id" + + # Detect an Entropy Key being inserted and extract serial number +-ACTION=="add|change|remove", 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|remove", 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}" + + # Add the /dev/entropykey/<serialnumber> symbolic link + ENV{ENTROPY_KEY_SERIAL}!="", SYMLINK+="entropykey/$env{ENTROPY_KEY_SERIAL}" diff --git a/app-crypt/ekeyd/files/ekeyd.init.2 b/app-crypt/ekeyd/files/ekeyd.init.2 new file mode 100644 index 000000000000..27ef7a11e46b --- /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 +# $Id$ + +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 +} diff --git a/app-crypt/ekeyd/files/ekeyd.service b/app-crypt/ekeyd/files/ekeyd.service new file mode 100644 index 000000000000..637b424b703d --- /dev/null +++ b/app-crypt/ekeyd/files/ekeyd.service @@ -0,0 +1,8 @@ +[Unit] +Description=Entropy key daemon + +[Service] +ExecStart=/usr/libexec/ekeyd + +[Install] +WantedBy=multi-user.target |