summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2009-02-18 15:37:39 +0000
committerTony Vroon <chainsaw@gentoo.org>2009-02-18 15:37:39 +0000
commit8e64aae915d80498b5fed2e955c923279fd941c6 (patch)
tree1baff747f756fadfbee3354e417e01a209903fe1 /sys-auth
parentMasking sci-calculators/tilp and dependencies for removal in 30 days (diff)
downloadhistorical-8e64aae915d80498b5fed2e955c923279fd941c6.tar.gz
historical-8e64aae915d80498b5fed2e955c923279fd941c6.tar.bz2
historical-8e64aae915d80498b5fed2e955c923279fd941c6.zip
Due to lack of hardware I have been unable to attend to this package. I will now however be proxy maintaining for Víctor Enríquez Miguel <victor.quicksilver@gmail.com> , metadata updated to reflect this. Add a fingerprint group so non-root users can use the software, as per the suggestions by Henning Schild <henning@wh9.tu-dresden.de> in bug #228919. Also add explicit chmod/chown statements to the installed script. Do not apply USB configuration 1 to the device, this was never necessary and broke with kernel 2.6.28 ("hello" patch). Added udev rules to make device handling automatic.
Package-Manager: portage-2.1.6.7/cvs/Linux x86_64
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/thinkfinger/ChangeLog20
-rw-r--r--sys-auth/thinkfinger/Manifest19
-rw-r--r--sys-auth/thinkfinger/files/0.3-carriagereturn.patch10
-rw-r--r--sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch31
-rw-r--r--sys-auth/thinkfinger/files/0.3-tftoolgroup.patch64
-rw-r--r--sys-auth/thinkfinger/files/60-thinkfinger.rules17
-rw-r--r--sys-auth/thinkfinger/metadata.xml5
-rw-r--r--sys-auth/thinkfinger/thinkfinger-0.3-r1.ebuild77
8 files changed, 239 insertions, 4 deletions
diff --git a/sys-auth/thinkfinger/ChangeLog b/sys-auth/thinkfinger/ChangeLog
index ad2f90407d24..818198ca8c8e 100644
--- a/sys-auth/thinkfinger/ChangeLog
+++ b/sys-auth/thinkfinger/ChangeLog
@@ -1,6 +1,22 @@
# ChangeLog for sys-auth/thinkfinger
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/thinkfinger/ChangeLog,v 1.6 2007/09/08 18:21:42 vapier Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/thinkfinger/ChangeLog,v 1.7 2009/02/18 15:37:38 chainsaw Exp $
+
+*thinkfinger-0.3-r1 (18 Feb 2009)
+
+ 18 Feb 2009; <chainsaw@gentoo.org> +files/0.3-carriagereturn.patch,
+ +files/0.3-direct_set_config_usb_hello.patch,
+ +files/0.3-tftoolgroup.patch, +files/60-thinkfinger.rules, metadata.xml,
+ +thinkfinger-0.3-r1.ebuild:
+ Due to lack of hardware I have been unable to attend to this package. I
+ will now however be proxy maintaining for Víctor Enríquez Miguel
+ <victor.quicksilver@gmail.com> , metadata updated to reflect this. Add a
+ fingerprint group so non-root users can use the software, as per the
+ suggestions by Henning Schild <henning@wh9.tu-dresden.de> in bug #228919.
+ Also add explicit chmod/chown statements to the installed script. Do not
+ apply USB configuration 1 to the device, this was never necessary and
+ broke with kernel 2.6.28 ("hello" patch). Added udev rules to make device
+ handling automatic.
08 Sep 2007; Mike Frysinger <vapier@gentoo.org> thinkfinger-0.3.ebuild:
Make kernel check a warning and use emake in src_install.
diff --git a/sys-auth/thinkfinger/Manifest b/sys-auth/thinkfinger/Manifest
index b91822af2944..eecc01175c56 100644
--- a/sys-auth/thinkfinger/Manifest
+++ b/sys-auth/thinkfinger/Manifest
@@ -1,6 +1,21 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 0.3-carriagereturn.patch 409 RMD160 22542c76ba34dc2654077e54a68d06e1b9fa1b4d SHA1 09726c9d38e36c4e193e5a122dafe1bdfd1be9ad SHA256 75b6d7093d6182a1384ada721f92975450e1055cf0e6796f2649260042738b65
+AUX 0.3-direct_set_config_usb_hello.patch 941 RMD160 e848bc1ea9331fd7e8516dc40ef875b5921031e0 SHA1 fbaf31d72fa615c3cd159504a5eb31fdc60ffe05 SHA256 285fd6ae82334e5b9b19fc0ba1e8429b0c46cb7b880a0df251989c7862969c23
+AUX 0.3-tftoolgroup.patch 1708 RMD160 66278d05abb136b69e1c1d8c654fb052a1f2f20d SHA1 95b6f6c3507f61ec75afb65b4d1d8cc138dbc1bd SHA256 d48da4d150986c21bb1b9c2b0f43dce9814ef0e8a1044f29805ca393721e4bd3
+AUX 60-thinkfinger.rules 599 RMD160 ca1107b6854139d9ff8067a19d448bc8d0b8ab41 SHA1 e0ec3f8786a8d776174048e7df5a914eb88da1d3 SHA256 cb91294c30e9feafa69b3194ba16e65ab4648772c425f5bc69fdee459795c68f
DIST thinkfinger-0.2.2.tar.gz 362593 RMD160 1cebb0df186753c8faf0cf550968c7425f38a0e8 SHA1 374ddef8bbf8fc3c5f590bc60a96c3700f2200f0 SHA256 d3acf4f2e06bee4db6cce655938e8d59136dc212957305afdbf7d470f3a931d2
DIST thinkfinger-0.3.tar.gz 372053 RMD160 7a83e7234bc6687f581df3b68b92cc06bf5b24cb SHA1 6d032ec7ad1166505b6773dff3c762c77bc72626 SHA256 9741ae205aadc9f576be73c382596266300e709371e72574a86e339ebf978f4b
EBUILD thinkfinger-0.2.2-r1.ebuild 1468 RMD160 d1859fbd84b6408652598b2afcbcf32bc148455f SHA1 8d510e8ebe69e4d7df2bd88a79b41382570ef992 SHA256 5329ef6ea5a498c73c7aa339db526ad0fcc1e9d29f4c01aa665f87d7ce8ad252
+EBUILD thinkfinger-0.3-r1.ebuild 2107 RMD160 0dcc197f376495fce3dfaab84694a6adbd9964fa SHA1 1dee0e1714a058d4bfe8f2e86bde7badc283eeae SHA256 c25c993bdc08911acfd6d12b8224aa4802fd4b4decd49090d9dd4d2505a16205
EBUILD thinkfinger-0.3.ebuild 1673 RMD160 aa40841b5eb49f071e681937937b09e6e09f8057 SHA1 6ca6a735d517972bfc26b7155be7520d460a08ff SHA256 041f8a76b2d8f62a0d2375528f0d9b28722a2e36e2fc23f8c2f4cd380c8dea3e
-MISC ChangeLog 1358 RMD160 f8515d78b281e55e8065795392eb0ef572ae51fd SHA1 b4add23b62c317f1408847b14fa591d0fccec981 SHA256 99d7a1b8dbba4bb3459bd9d730acb9cc7feec5ad50a70e1dafb6cd416fdc48a0
-MISC metadata.xml 310 RMD160 5b57282cd45b5ebfd0a5182cd665dbb684a7d25c SHA1 9f12cf187b3a67133f2ae900cf70fcc7f7a27b9a SHA256 c63ceb5c6294486637d1c424469d11db066aa906dc970e9be311c29a6563a3c6
+MISC ChangeLog 2229 RMD160 97bc6882616587fe31b5ebb756a28be6aa7c7c0b SHA1 e09243734dd3ae4f4c8a936f4f7a76b322e1bb41 SHA256 5128d04979fe3000c4f5def7d9d47cb4181eb18dd37b3f527f63b9c8124ffbaf
+MISC metadata.xml 497 RMD160 9df54748d112b4a38861c14fa9ad6a01d3c2341e SHA1 1e349cf13897948ace735d9a87e5bd685613a33f SHA256 13d0f548b65df70bb70d82e1e106b77f5cff96b1a91298815cdb9e01cc433ef2
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.10 (GNU/Linux)
+
+iEYEARECAAYFAkmcKxYACgkQp5vW4rUFj5qAiACfVOqYKqQyrtWizUK95g64jslP
+fgoAoJsDmY+pt/Aoa/ipbG3ZY6rS1EQH
+=bW+Y
+-----END PGP SIGNATURE-----
diff --git a/sys-auth/thinkfinger/files/0.3-carriagereturn.patch b/sys-auth/thinkfinger/files/0.3-carriagereturn.patch
new file mode 100644
index 000000000000..731f1531947b
--- /dev/null
+++ b/sys-auth/thinkfinger/files/0.3-carriagereturn.patch
@@ -0,0 +1,10 @@
+--- pam/pam_thinkfinger-uinput.c 2007-02-27 17:52:50.000000000 +0100
++++ pam/pam_thinkfinger-uinput.c 2009-02-17 13:56:02.013033249 +0100
+@@ -95,6 +95,7 @@
+ /* our single key keyboard */
+ i = ioctl (*fd, UI_SET_EVBIT, EV_KEY) < 0;
+ i |= ioctl (*fd, UI_SET_KEYBIT, KEY_ENTER) < 0;
++ i |= ioctl (*fd, UI_SET_KEYBIT, KEY_A) < 0;
+
+ if (write (*fd, &device, device_size) != device_size) {
+ retval = errno;
diff --git a/sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch b/sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch
new file mode 100644
index 000000000000..06723ad1306c
--- /dev/null
+++ b/sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch
@@ -0,0 +1,31 @@
+Index: libthinkfinger/libthinkfinger.c
+===================================================================
+--- libthinkfinger/libthinkfinger.c (revision 118)
++++ libthinkfinger/libthinkfinger.c (working copy)
+@@ -265,18 +265,7 @@
+ int retval = -1;
+ char dummy[] = "\x10";
+
+- /* SET_CONFIGURATION 1 -- should not be relevant */
+ retval = usb_control_msg (handle, // usb_dev_handle *dev
+- 0x00000000, // int requesttype
+- 0x00000009, // int request
+- 0x001, // int value
+- 0x000, // int index
+- dummy, // char *bytes
+- 0x00000000, // int size
+- USB_TIMEOUT); // int timeout
+- if (retval < 0)
+- goto out;
+- retval = usb_control_msg (handle, // usb_dev_handle *dev
+ 0x00000040, // int requesttype
+ 0x0000000c, // int request
+ 0x100, // int value
+@@ -285,7 +274,6 @@
+ 0x00000001, // int size
+ USB_TIMEOUT); // int timeout
+
+-out:
+ return retval;
+ }
+
diff --git a/sys-auth/thinkfinger/files/0.3-tftoolgroup.patch b/sys-auth/thinkfinger/files/0.3-tftoolgroup.patch
new file mode 100644
index 000000000000..169b7cefe286
--- /dev/null
+++ b/sys-auth/thinkfinger/files/0.3-tftoolgroup.patch
@@ -0,0 +1,64 @@
+--- tf-tool/tf-tool.c 2007-03-30 11:00:45.000000000 +0200
++++ tf-tool/tf-tool.c 2009-02-18 14:57:24.316197097 +0100
+@@ -26,6 +26,9 @@
+ #include <errno.h>
+ #include <libgen.h>
+ #include <pwd.h>
++#include <grp.h>
++#include <sys/stat.h>
++#include <unistd.h>
+
+ #include <config.h>
+ #include <libthinkfinger.h>
+@@ -54,6 +57,21 @@
+ int swipe_failed;
+ } s_tfdata;
+
++int changegroup(const char *groupname,const char *filename)
++{
++ struct group *g;
++ g = getgrnam(groupname);
++ if(g == NULL) {
++ perror("getgrnam:");
++ return 1;
++ }
++ if( chown(filename,-1,g->gr_gid) == -1) {
++ perror("chown: ");
++ return 1;
++ }
++ return 0;
++}
++
+ static void print_status (int swipe_success, int swiped_required, int swipe_failed)
+ {
+ printf ("\rPlease swipe your finger (successful swipes %i/%i, failed swipes: %i)...",
+@@ -64,6 +82,8 @@
+ static void callback (libthinkfinger_state state, void *data)
+ {
+ char *str;
++ int err;
++ gid_t gfp;
+ s_tfdata *tfdata = (s_tfdata *) data;
+
+ if (tfdata->verbose == true) {
+@@ -108,8 +128,18 @@
+ case TF_STATE_ENROLL_SUCCESS:
+ print_status (tfdata->swipe_success, 3, tfdata->swipe_failed);
+ printf (" done.\nStoring data (%s)...", tfdata->bir);
+- fflush (stdout);
+- break;
++ /*small hack to change group and chmod 640 on created bir file*/
++ err = chmod(tfdata->bir, S_IRUSR | S_IWUSR | S_IRGRP);
++ if(err == -1) {
++ printf("Couldn't change perms on file %s\n",tfdata->bir);
++ perror("chmod:");
++ fflush(stdout);
++ break;
++ }
++ changegroup("fingerprint",tfdata->bir);
++ fflush(stdout);
++ break;
++ /*done*/
+ case TF_STATE_SWIPE_FAILED:
+ print_status (tfdata->swipe_success, 3, ++tfdata->swipe_failed);
+ break;
diff --git a/sys-auth/thinkfinger/files/60-thinkfinger.rules b/sys-auth/thinkfinger/files/60-thinkfinger.rules
new file mode 100644
index 000000000000..21e1ac9461e3
--- /dev/null
+++ b/sys-auth/thinkfinger/files/60-thinkfinger.rules
@@ -0,0 +1,17 @@
+#
+# udev rules file for the thinkfinger fingerprint scanner
+#
+# gives access to the fingerprint reader to those in the "fingerprint" group
+#
+# Taken from:
+# http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger
+# which was taken and modified from:
+# http://article.gmane.org/gmane.linux.drivers.thinkfinger/329
+#
+
+# SGS Thomson Microelectronics Fingerprint Reader
+SYSFS{idVendor}=="0483", SYSFS{idProduct}=="2016", SYMLINK+="input/thinkfinger-%k", MODE="0660", GROUP="fingerprint"
+
+# the also-needed uinput device
+KERNEL=="uinput", MODE="0660", GROUP="fingerprint"
+
diff --git a/sys-auth/thinkfinger/metadata.xml b/sys-auth/thinkfinger/metadata.xml
index c20e1351f56e..a3b217981493 100644
--- a/sys-auth/thinkfinger/metadata.xml
+++ b/sys-auth/thinkfinger/metadata.xml
@@ -3,8 +3,13 @@
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
+ <email>victor.quicksilver@gmail.com</email>
+ <name>Víctor Enríquez Miguel</name>
+ </maintainer>
+ <maintainer>
<email>chainsaw@gentoo.org</email>
<name>Tony Vroon</name>
+ <description>Proxy Maintainer</description>
</maintainer>
<longdescription></longdescription>
</pkgmetadata>
diff --git a/sys-auth/thinkfinger/thinkfinger-0.3-r1.ebuild b/sys-auth/thinkfinger/thinkfinger-0.3-r1.ebuild
new file mode 100644
index 000000000000..80b5d14066d3
--- /dev/null
+++ b/sys-auth/thinkfinger/thinkfinger-0.3-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/thinkfinger/thinkfinger-0.3-r1.ebuild,v 1.1 2009/02/18 15:37:38 chainsaw Exp $
+
+inherit pam linux-info eutils
+
+DESCRIPTION="Support for the UPEK/SGS Thomson Microelectronics fingerprint reader, often seen in Thinkpads"
+HOMEPAGE="http://thinkfinger.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug pam"
+
+RDEPEND=">=dev-libs/libusb-0.1.12
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool
+ >=dev-util/pkgconfig-0.9.0"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PV}-direct_set_config_usb_hello.patch" || die
+ epatch "${FILESDIR}/${PV}-carriagereturn.patch" || die
+ epatch "${FILESDIR}/${PV}-tftoolgroup.patch" || die
+}
+
+pkg_preinst() {
+ enewgroup fingerprint
+}
+
+pkg_setup() {
+ if use pam ; then
+ CONFIG_CHECK="~INPUT_UINPUT"
+ ERROR_CFG="Your kernel needs uinput for the pam module to work"
+ check_extra_config
+ fi
+}
+
+src_compile() {
+ econf \
+ $(use_enable pam) \
+ $(use_enable debug usb-debug) \
+ "--with-securedir=$(getpam_mod_dir)" \
+ || die
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ keepdir /etc/pam_thinkfinger
+ dodoc AUTHORS ChangeLog NEWS README
+ insinto /etc/udev/rules.d/
+ doins "${FILESDIR}/60-thinkfinger.rules"
+}
+
+pkg_postinst() {
+ fowners root:fingerprint /etc/pam_thinkfinger
+ fperms 710 /etc/pam_thinkfinger
+ elog "Use tf-tool --acquire to take a finger print"
+ elog "tf-tool will write the finger print file to /tmp/test.bir"
+ elog ""
+ if use pam ; then
+ elog "To add a fingerprint to PAM, use tf-tool --add-user USERNAME"
+ elog ""
+ elog "Add the following to /etc/pam.d/system-auth after pam_env.so"
+ elog "auth sufficient pam_thinkfinger.so"
+ elog ""
+ elog "Your system-auth should look similar to:"
+ elog "auth required pam_env.so"
+ elog "auth sufficient pam_thinkfinger.so"
+ elog "auth sufficient pam_unix.so try_first_pass likeauth nullok"
+ elog ""
+ fi
+}