diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-09-28 18:29:36 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-09-28 18:29:36 +0000 |
commit | 4d2a8f5f8a107eb8e692f7e697e165a4795807e7 (patch) | |
tree | cf9601b7bc88fd30211f9374575a0af9f1046bee /app-crypt | |
parent | Version bump. (diff) | |
download | gentoo-2-4d2a8f5f8a107eb8e692f7e697e165a4795807e7.tar.gz gentoo-2-4d2a8f5f8a107eb8e692f7e697e165a4795807e7.tar.bz2 gentoo-2-4d2a8f5f8a107eb8e692f7e697e165a4795807e7.zip |
Bump already, add init script for the userland USB daemon, and move the two daemon executables in /usr/libexec.
(Portage version: 2.2_rc42/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/ekeyd/ChangeLog | 10 | ||||
-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.conf | 16 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekey-ulusbd.init | 43 | ||||
-rw-r--r-- | app-crypt/ekeyd/files/ekeyd.init | 8 |
5 files changed, 93 insertions, 17 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/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 $? } |