summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-auth/thinkfinger
downloadgentoo-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 'sys-auth/thinkfinger')
-rw-r--r--sys-auth/thinkfinger/Manifest1
-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-send-sync-event.patch50
-rw-r--r--sys-auth/thinkfinger/files/0.3-strip-strip.patch24
-rw-r--r--sys-auth/thinkfinger/files/0.3-tftoolgroup.patch64
-rw-r--r--sys-auth/thinkfinger/files/60-thinkfinger.rules5
-rw-r--r--sys-auth/thinkfinger/metadata.xml18
-rw-r--r--sys-auth/thinkfinger/thinkfinger-0.3-r3.ebuild80
9 files changed, 283 insertions, 0 deletions
diff --git a/sys-auth/thinkfinger/Manifest b/sys-auth/thinkfinger/Manifest
new file mode 100644
index 00000000000..98ea1b54334
--- /dev/null
+++ b/sys-auth/thinkfinger/Manifest
@@ -0,0 +1 @@
+DIST thinkfinger-0.3.tar.gz 372053 RMD160 7a83e7234bc6687f581df3b68b92cc06bf5b24cb SHA1 6d032ec7ad1166505b6773dff3c762c77bc72626 SHA256 9741ae205aadc9f576be73c382596266300e709371e72574a86e339ebf978f4b
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 00000000000..731f1531947
--- /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 00000000000..06723ad1306
--- /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-send-sync-event.patch b/sys-auth/thinkfinger/files/0.3-send-sync-event.patch
new file mode 100644
index 00000000000..39e0edb27ba
--- /dev/null
+++ b/sys-auth/thinkfinger/files/0.3-send-sync-event.patch
@@ -0,0 +1,50 @@
+--- pam/pam_thinkfinger-uinput.c 2009-12-27 18:42:26.000000000 +0100
++++ pam/pam_thinkfinger-uinput.c 2009-12-27 18:41:55.000000000 +0100
+@@ -34,27 +34,40 @@
+ int uinput_cr (int *fd)
+ {
+ int retval = 0, ev_size = 0;
+- struct input_event ev = {
++ struct input_event key_ev = {
+ .type = EV_KEY,
+ .code = KEY_ENTER,
+ .time = {0, }
+ };
+
+- ev_size = sizeof (ev);
++ ev_size = sizeof (key_ev);
+
+ /* key press */
+- ev.value = 1;
+- if (write (*fd, &ev, ev_size) != ev_size) {
++ key_ev.value = 1;
++ if (write (*fd, &key_ev, ev_size) != ev_size) {
+ retval = errno;
+ goto out;
+ }
+ /* key release */
+- ev.value = 0;
+- if (write (*fd, &ev, ev_size) != ev_size) {
++ key_ev.value = 0;
++ if (write (*fd, &key_ev, ev_size) != ev_size) {
+ retval = errno;
+ goto out;
+ }
+-
++
++ /* syn event */
++ struct input_event syn_ev = {
++ .time = {0, },
++ .type = EV_SYN,
++ .code = SYN_REPORT,
++ .value = 0
++ };
++
++ if (write (*fd, &syn_ev, ev_size) != ev_size) {
++ retval = errno;
++ goto out;
++ }
++
+ out:
+ return retval;
+ }
diff --git a/sys-auth/thinkfinger/files/0.3-strip-strip.patch b/sys-auth/thinkfinger/files/0.3-strip-strip.patch
new file mode 100644
index 00000000000..1339baf63a0
--- /dev/null
+++ b/sys-auth/thinkfinger/files/0.3-strip-strip.patch
@@ -0,0 +1,24 @@
+Strip is handled by the package manager.
+
+--- a/pam/Makefile.am
++++ b/pam/Makefile.am
+@@ -8,7 +8,7 @@ pam_thinkfinger_so_SOURCES = pam_thinkfinger-compat.c pam_thinkfinger-compat.h p
+ else
+ pam_thinkfinger_so_SOURCES = pam_thinkfinger-uinput.c pam_thinkfinger-uinput.h pam_thinkfinger.c
+ endif
+-pam_thinkfinger_so_LDFLAGS = -shared --strip-all -Wl,-soname,pam_thinkfinger.so -Wl,--as-needed
++pam_thinkfinger_so_LDFLAGS = -shared -Wl,-soname,pam_thinkfinger.so -Wl,--as-needed
+ pam_thinkfinger_so_CFLAGS = $(CFLAGS)
+ pam_thinkfinger_so_LDADD = $(top_builddir)/libthinkfinger/libthinkfinger.la $(PAM_LIBS) $(PTHREAD_LIBS)
+
+--- a/pam/Makefile.in
++++ b/pam/Makefile.in
+@@ -201,7 +201,7 @@ pamdir = $(SECUREDIR)
+ INCLUDES = -I$(top_srcdir)/libthinkfinger
+ @HAVE_OLD_PAM_FALSE@pam_thinkfinger_so_SOURCES = pam_thinkfinger-uinput.c pam_thinkfinger-uinput.h pam_thinkfinger.c
+ @HAVE_OLD_PAM_TRUE@pam_thinkfinger_so_SOURCES = pam_thinkfinger-compat.c pam_thinkfinger-compat.h pam_thinkfinger-uinput.c pam_thinkfinger-uinput.h pam_thinkfinger.c
+-pam_thinkfinger_so_LDFLAGS = -shared --strip-all -Wl,-soname,pam_thinkfinger.so -Wl,--as-needed
++pam_thinkfinger_so_LDFLAGS = -shared -Wl,-soname,pam_thinkfinger.so -Wl,--as-needed
+ pam_thinkfinger_so_CFLAGS = $(CFLAGS)
+ pam_thinkfinger_so_LDADD = $(top_builddir)/libthinkfinger/libthinkfinger.la $(PAM_LIBS) $(PTHREAD_LIBS)
+ all: all-am
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 00000000000..169b7cefe28
--- /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 00000000000..1ccc394d49f
--- /dev/null
+++ b/sys-auth/thinkfinger/files/60-thinkfinger.rules
@@ -0,0 +1,5 @@
+# SGS Thomson Microelectronics Fingerprint Reader
+ATTRS{idVendor}=="0483", ATTRS{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
new file mode 100644
index 00000000000..7bfe3649f4a
--- /dev/null
+++ b/sys-auth/thinkfinger/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>victor.quicksilver@gmail.com</email>
+ <name>Víctor Enríquez Miguel</name>
+</maintainer>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ <description>Proxy Maintainer</description>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">ThinkFinger</remote-id>
+</upstream>
+<longdescription></longdescription>
+</pkgmetadata>
diff --git a/sys-auth/thinkfinger/thinkfinger-0.3-r3.ebuild b/sys-auth/thinkfinger/thinkfinger-0.3-r3.ebuild
new file mode 100644
index 00000000000..01b2e922a35
--- /dev/null
+++ b/sys-auth/thinkfinger/thinkfinger-0.3-r3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools-utils user linux-info pam
+
+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 static-libs"
+
+RDEPEND="virtual/libusb:0
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-direct_set_config_usb_hello.patch
+ "${FILESDIR}"/${PV}-carriagereturn.patch
+ "${FILESDIR}"/${PV}-send-sync-event.patch
+ "${FILESDIR}"/${PV}-tftoolgroup.patch
+ "${FILESDIR}"/${PV}-strip-strip.patch
+)
+
+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_configure() {
+ local myeconfargs=(
+ $(use_enable pam) \
+ $(use_enable debug usb-debug) \
+ "--with-securedir=$(getpam_mod_dir)"
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ DOCS=( AUTHORS ChangeLog NEWS README )
+ autotools-utils_src_install
+
+ keepdir /etc/pam_thinkfinger
+ insinto /lib/udev/rules.d
+ doins "${FILESDIR}"/60-thinkfinger.rules
+}
+
+pkg_preinst() {
+ enewgroup fingerprint
+}
+
+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
+}