summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2011-03-27 21:56:09 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2011-03-27 21:56:09 +0000
commitda0b162aeb8509dcc707bf269767f392337c8887 (patch)
tree0d41623f001d7f8ab6a8a15d2448096c28e405c1 /app-crypt/ekeyd
parentremove old ebuilds (diff)
downloadgentoo-2-da0b162aeb8509dcc707bf269767f392337c8887.tar.gz
gentoo-2-da0b162aeb8509dcc707bf269767f392337c8887.tar.bz2
gentoo-2-da0b162aeb8509dcc707bf269767f392337c8887.zip
Revision bump: fix udev rules for keys with slashes in serial numbers (bug #349503, huge thanks to Daniel Weigert for the help and the patience); install udev rules to /lib/udev/rules.d (or lib64); fix rules for non-symlinked lib64; use the same name for both rule files.
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/ekeyd')
-rw-r--r--app-crypt/ekeyd/ChangeLog13
-rw-r--r--app-crypt/ekeyd/ekeyd-1.1.3-r2.ebuild (renamed from app-crypt/ekeyd/ekeyd-1.1.3-r1.ebuild)23
-rw-r--r--app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch26
3 files changed, 52 insertions, 10 deletions
diff --git a/app-crypt/ekeyd/ChangeLog b/app-crypt/ekeyd/ChangeLog
index 4807dd1bb1e5..892cecd112db 100644
--- a/app-crypt/ekeyd/ChangeLog
+++ b/app-crypt/ekeyd/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-crypt/ekeyd
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ChangeLog,v 1.18 2010/11/06 01:34:36 rafaelmartins Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ChangeLog,v 1.19 2011/03/27 21:56:08 flameeyes Exp $
+
+*ekeyd-1.1.3-r2 (27 Mar 2011)
+
+ 27 Mar 2011; Diego E. Pettenò <flameeyes@gentoo.org> -ekeyd-1.1.3-r1.ebuild,
+ +ekeyd-1.1.3-r2.ebuild, +files/ekeyd-1.1.3-slashes.patch:
+ Revision bump: fix udev rules for keys with slashes in serial numbers (bug
+ #349503, huge thanks to Daniel Weigert for the help and the patience);
+ install udev rules to /lib/udev/rules.d (or lib64); fix rules for
+ non-symlinked lib64; use the same name for both rule files.
06 Nov 2010; Rafael G. Martins <rafaelmartins@gentoo.org>
ekeyd-1.1.3-r1.ebuild:
diff --git a/app-crypt/ekeyd/ekeyd-1.1.3-r1.ebuild b/app-crypt/ekeyd/ekeyd-1.1.3-r2.ebuild
index 9d85cb5039e8..4b1c411a3d4f 100644
--- a/app-crypt/ekeyd/ekeyd-1.1.3-r1.ebuild
+++ b/app-crypt/ekeyd/ekeyd-1.1.3-r2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ekeyd-1.1.3-r1.ebuild,v 1.3 2010/11/06 01:34:36 rafaelmartins Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/ekeyd-1.1.3-r2.ebuild,v 1.1 2011/03/27 21:56:08 flameeyes Exp $
EAPI=2
@@ -45,6 +45,14 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.1.1-earlyboot.patch
epatch "${FILESDIR}"/${P}-libusb_compat.patch
+ epatch "${FILESDIR}"/${P}-slashes.patch
+
+ # Stupid multilib hack; remove it once Gentoo has sane paths for
+ # udev directories.
+ if [[ $(get_libdir) != lib ]]; then
+ sed -i -e "s:/lib/udev/:/$(get_libdir)/udev/:" \
+ doc/*.rules || die
+ fi
# We moved the binaries around
sed -i -e 's:$BINPATH/ekey-ulusbd:/usr/libexec/ekey-ulusbd:' \
@@ -109,12 +117,11 @@ src_install() {
dodoc daemon/README* AUTHORS WARNING ChangeLog || die
if use kernel_linux; then
- insinto /etc/udev/rules.d
- if use usb; then
- newins doc/60-UDEKEY01-UDS.rules 70-ekey-ulusbd.rules || die
- else
- newins doc/60-UDEKEY01.rules 70-${PN}.rules || die
- fi
+ local rules=doc/60-UDEKEY01.rules
+ use usb && rules=doc/60-UDEKEY01-UDS.rules
+
+ insinto /$(get_libdir)/udev/rules.d
+ newins ${rules} 70-${PN}.rules || die
exeinto /$(get_libdir)/udev
doexe doc/ekeyd-udev || die
diff --git a/app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch b/app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch
new file mode 100644
index 000000000000..fc709108bc74
--- /dev/null
+++ b/app-crypt/ekeyd/files/ekeyd-1.1.3-slashes.patch
@@ -0,0 +1,26 @@
+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"