summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-09-28 18:29:36 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-09-28 18:29:36 +0000
commitaaf18fc4324158a811fdb963d2f55aeb7d99c446 (patch)
tree2e2441708c0f774b032671fd8e3edc66c5b6a5c7 /app-crypt/ekeyd
parentVersion bump. (diff)
downloadhistorical-aaf18fc4324158a811fdb963d2f55aeb7d99c446.tar.gz
historical-aaf18fc4324158a811fdb963d2f55aeb7d99c446.tar.bz2
historical-aaf18fc4324158a811fdb963d2f55aeb7d99c446.zip
Bump already, add init script for the userland USB daemon, and move the two daemon executables in /usr/libexec.
Package-Manager: portage-2.2_rc42/cvs/Linux x86_64
Diffstat (limited to 'app-crypt/ekeyd')
-rw-r--r--app-crypt/ekeyd/ChangeLog10
-rw-r--r--app-crypt/ekeyd/Manifest14
-rw-r--r--app-crypt/ekeyd/ekeyd-1.0.5-r1.ebuild (renamed from app-crypt/ekeyd/ekeyd-1.0.5.ebuild)33
-rw-r--r--app-crypt/ekeyd/files/ekey-ulusbd.conf16
-rw-r--r--app-crypt/ekeyd/files/ekey-ulusbd.init43
-rw-r--r--app-crypt/ekeyd/files/ekeyd.init8
6 files changed, 101 insertions, 23 deletions
diff --git a/app-crypt/ekeyd/ChangeLog b/app-crypt/ekeyd/ChangeLog
index 1d66fcf93138..6e4c380d37ac 100644
--- a/app-crypt/ekeyd/ChangeLog
+++ b/app-crypt/ekeyd/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-crypt/ekeyd
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ChangeLog,v 1.1 2009/09/28 10:59:06 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ChangeLog,v 1.2 2009/09/28 18:29:35 flameeyes Exp $
+
+*ekeyd-1.0.5-r1 (28 Sep 2009)
+
+ 28 Sep 2009; Diego E. Pettenò <flameeyes@gentoo.org> -ekeyd-1.0.5.ebuild,
+ +ekeyd-1.0.5-r1.ebuild, +files/ekey-ulusbd.conf, +files/ekey-ulusbd.init,
+ files/ekeyd.init:
+ Bump already, add init script for the userland USB daemon, and move the
+ two daemon executables in /usr/libexec.
*ekeyd-1.0.5 (28 Sep 2009)
diff --git a/app-crypt/ekeyd/Manifest b/app-crypt/ekeyd/Manifest
index a35df7f51ec9..e9a999991469 100644
--- a/app-crypt/ekeyd/Manifest
+++ b/app-crypt/ekeyd/Manifest
@@ -1,15 +1,17 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX ekeyd.init 745 RMD160 a638b822e56e2132901a7bd211eb1713854eac54 SHA1 ca4cdcc352df64a506cef0dc635fc6d842987b27 SHA256 5618c1d3557ebff0e43ad58d5774118585f0156dc8cd290cc732715778f71462
+AUX ekey-ulusbd.conf 579 RMD160 2a8782a79e9a17bc308aa9b67ddbab8d8b61037e SHA1 dc32017824cba6a3921d2df6282f85f2af042836 SHA256 d18a974adc61f465c85a9bf83377de1486be9cb792ee04a72bd978c885e1b5b7
+AUX ekey-ulusbd.init 1173 RMD160 bffa19688ac673f6128a4e1abaabb085473bff6b SHA1 08589b116dc5864f20aabae363304f31a167f320 SHA256 ea3ddeb21667b4875f31c8f87066a8854429b7746169bb9485efd73520eed243
+AUX ekeyd.init 763 RMD160 3506c2400360e67cd4b5a375de7cb0669ec74578 SHA1 8fa7d722ea8f3a1cccaffee5a54d81a8b7abffe0 SHA256 c8e7ba5b34618fabfb9d161e64f6112f82c0a2bc644a4f5a14a2569783b43946
DIST ekeyd-1.0.5.tar.gz 87743 RMD160 986b596b8988a731ce43a1eeafa8dbd7f71c9384 SHA1 95b1f54315746ee979b38d62383c0fa7c25ace90 SHA256 fc82c4e1c9d702c74bd98df3e4b18f5d1c9dc9ba59ad0a3569d79def02b847e1
-EBUILD ekeyd-1.0.5.ebuild 2686 RMD160 17ed0d3d6104cd139d144dea066a0227db3ed928 SHA1 04f831db10ae713ea53d14aa7345ce084a40f28e SHA256 98fc41f049e37fa46ad4a854ad6da66c2159f5f6ba0aef5ba9fc6554d42a1ff7
-MISC ChangeLog 551 RMD160 862fb9f7c220d203d65384cffb06f0cb81a97d4d SHA1 9e243d206c85e801c2a787881d0c911a2c32de6e SHA256 2a61ae681ecce31c78693b117f1acec7441a74d4d4b162329740736b9bd0b1e2
+EBUILD ekeyd-1.0.5-r1.ebuild 3127 RMD160 1d27a4a8563eaa9cc8ec65a1225fa165362a4df5 SHA1 5e870cea94c54a1b7baf55d6016978a0ffdc6c54 SHA256 27fbbbf65e84e6ea3f5cd580bdb43226ff8d7cb1eb60e1ddba9d0940fe12f146
+MISC ChangeLog 872 RMD160 9fc2e1845ad548ae1b68d3db7696627868547ec1 SHA1 31b44ccc2f7a40d1da678b8476fc19472a383798 SHA256 ea7b8f6807bdaed2dee3103ebf10761b98d57862b82c3f430d73f76671837b89
MISC metadata.xml 401 RMD160 988224226b2b1e56ca024b6866deb0291faf3ab7 SHA1 17ae474fa2c6964cc4feab7173ec86f1062b9197 SHA256 3e04add274d3b051cdc073d9b3b8272861caff36bec655e6c86cf2a4fabb66c4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAkrAlv4ACgkQAiZjviIA2XhejwCfaYE/5APS0GJUFmar6NSKHd7Z
-3+0AoMF0xXnIofFrcnag2jy2Yt5zwFAH
-=hb1T
+iEYEARECAAYFAkrBAJEACgkQAiZjviIA2XgxmQCcCSUkbgGtzQd6kmmqTb01jJ8H
+E2EAoM+ZK8QkeNm/57cerc4D5rMTyM9R
+=Aah6
-----END PGP SIGNATURE-----
diff --git a/app-crypt/ekeyd/ekeyd-1.0.5.ebuild b/app-crypt/ekeyd/ekeyd-1.0.5-r1.ebuild
index 0fff9c327b1a..dee57d21b439 100644
--- a/app-crypt/ekeyd/ekeyd-1.0.5.ebuild
+++ b/app-crypt/ekeyd/ekeyd-1.0.5-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ekeyd-1.0.5.ebuild,v 1.1 2009/09/28 10:59:06 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ekeyd-1.0.5-r1.ebuild,v 1.1 2009/09/28 18:29:35 flameeyes Exp $
EAPI=2
@@ -14,7 +14,7 @@ LICENSE="as-is" # yes, truly
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~x86"
IUSE="usb kernel_linux"
@@ -67,13 +67,25 @@ src_compile() {
src_install() {
emake -C daemon \
DESTDIR="${D}" \
+ BUILD_ULUSBD=$(use usb && echo yes || echo no) \
install || die "emake install failed"
+ # We move the daemons around to avoid polluting the available
+ # commands.
+ dodir /usr/libexec
+ mv "${D}"/usr/sbin/ekey*d "${D}"/usr/libexec
+
+ keepdir /etc/ekeyd
+
# Install them manually because we don't want them gzipped
doman daemon/{ekeyd,ekey-setkey,ekey-rekey,ekeydctl}.8 \
daemon/ekeyd.conf.5 || die
+ newinitd "${FILESDIR}"/${PN}.init ${PN} || die
+
if use usb; then
+ newinitd "${FILESDIR}"/ekey-ulusbd.init ekey-ulusbd || die
+ newconfd "${FILESDIR}"/ekey-ulusbd.conf ekey-ulusbd || die
doman daemon/ekey-ulusbd.8 || die
fi
@@ -86,10 +98,6 @@ src_install() {
exeinto /$(get_libdir)/udev
doexe doc/ekeyd-udev || die
fi
-
- keepdir /etc/ekeyd
-
- newinitd "${FILESDIR}"/${PN}.init ${PN} || die
}
pkg_postinst() {
@@ -102,12 +110,13 @@ pkg_postinst() {
if use usb; then
elog ""
- elog "TODO TODO TODO TODO TODO"
- elog ""
- elog "Please note that while the userland USB daemon is being built"
- elog "there currently is no init script to start it; this will be fixed"
- elog "as soon as possible."
+ elog "If you don't want (or can't) use the CDC ACM driver in your"
+ elog "kernel, you may use the Userland USB Daemon to access the"
+ elog "EntropyKey."
elog ""
- elog "TODO TODO TODO TODO TODO"
+ elog "To do so, make sure to start the ekey-ulusbd service, after"
+ elog "having configured /etc/conf.d/ekey-ulusbd."
+ elog "This service is also multiplexed so you can run it for any"
+ elog "number of keys."
fi
}
diff --git a/app-crypt/ekeyd/files/ekey-ulusbd.conf b/app-crypt/ekeyd/files/ekey-ulusbd.conf
new file mode 100644
index 000000000000..80bf0c1aec13
--- /dev/null
+++ b/app-crypt/ekeyd/files/ekey-ulusbd.conf
@@ -0,0 +1,16 @@
+# Copyright 2009 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.1 2009/09/28 18:29:36 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
+# 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=""
+
+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
new file mode 100644
index 000000000000..f1ee32bcc54a
--- /dev/null
+++ b/app-crypt/ekeyd/files/ekey-ulusbd.init
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 2009 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.1 2009/09/28 18:29:36 flameeyes Exp $
+
+INSTANCE="${SVCNAME#*.}"
+if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekey-ulusbd" ]; then
+ INSTANCE="ekey-ulusbd"
+fi
+
+depend() {
+ use udev
+}
+
+start() {
+ if [ -z ${USB_BUS} ]; then
+ local devdir=$(fgrep -l 20df /sys/bus/usb/devices/*/idVendor \
+ | xargs -n1 dirname \
+ | xargs -I{} fgrep -l 0001 {}/idProduct \
+ | xargs -n1 dirname \
+ | xargs -I{} fgrep -l ${EKEY_SERIAL} {}/serial \
+ | xargs -n1 dirname)
+ USB_BUS=$(< ${devdir}/busnum)
+ USB_DEV=$(< ${devdir}/devnum)
+ fi
+
+ ebegin "Starting EntropyKey Userland USB Daemon"
+ start-stop-daemon \
+ --start --pidfile "/var/run/${SVCNAME}.pid" \
+ --exec /usr/libexec/ekey-ulusbd -- \
+ -P "/var/run/${SVCNAME}.pid" \
+ -p "${SOCKET_PATH}" \
+ -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.init b/app-crypt/ekeyd/files/ekeyd.init
index 89dab724a46c..5bdfdf17a0c9 100644
--- a/app-crypt/ekeyd/files/ekeyd.init
+++ b/app-crypt/ekeyd/files/ekeyd.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 2009 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.1 2009/09/28 10:59:07 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.2 2009/09/28 18:29:36 flameeyes Exp $
INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekeyd" ]; then
@@ -9,14 +9,14 @@ if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekeyd" ]; then
fi
depend() {
- use udev
+ use udev ekey-ulusbd
}
start() {
ebegin "Starting EntropyKey daemon"
start-stop-daemon \
--start --pidfile "/var/run/${SVCNAME}.pid" \
- --exec /usr/sbin/ekeyd -- \
+ --exec /usr/libexec/ekeyd -- \
-f "/etc/entropykey/${INSTANCE}.conf" \
-p "/var/run/${SVCNAME}.pid"
eend $?
@@ -26,7 +26,7 @@ stop() {
ebegin "Stopping EntropyKey daemon"
start-stop-daemon \
--stop --pidfile "/var/run/${SVCNAME}.pid" \
- --exec /usr/sbin/ekeyd
+ --exec /usr/libexec/ekeyd
eend $?
}