Testing newer fprint ebuild

This commit is contained in:
kuratsune 2018-03-22 16:58:39 +01:00
parent f0c6d71223
commit 8802e97759
8 changed files with 247 additions and 0 deletions

View File

@ -0,0 +1,2 @@
DIST fprintd-0.8.0.tar.bz2 73740 BLAKE2B 3d8f9e16b9895c0cf0a3fb5a7a121c3ceb9eb4883f9523400224f52d8c5d1525ce09aaef87a86ddd2b908810ab03fe78e976ee349730b8136545a6158a83a16d SHA512 5750395ba9c55ca68f05ad2842b5919debe57479cd773a627e65efad7303f58b85b9f73cf663479d8bbfd42f40542d6c0d862dcc6aa24d2acba60e74c0062f8e
EBUILD fprintd-0.8.0.ebuild 1517 BLAKE2B b2da7cefc22cd6a78cf2a2541451614887b91cfb1b6df6b01a0ccb0443f0aed518219609de09d0c243506718fabd6a535945788961b68f239ac0a2d14a4f73f6 SHA512 278a8e6c01a32ffe906b3ee4a89ee579f2ee3b2ab914358bc434fab8f35883e0cd9310b9618add7d58f5b6719e82def1e9edf15e287d88a2c1a81cbf389b299c

View File

@ -0,0 +1,63 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit autotools pam systemd versionator
DESCRIPTION="D-Bus service to access fingerprint readers"
HOMEPAGE="https://cgit.freedesktop.org/libfprint/fprintd/"
MY_PV="V_$(replace_all_version_separators _)"
SRC_URI="https://cgit.freedesktop.org/libfprint/${PN}/snapshot/${MY_PV}.tar.bz2 -> ${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="doc pam static-libs"
RDEPEND="dev-libs/dbus-glib
dev-libs/glib:2
sys-auth/libfprint
sys-auth/polkit
pam? ( sys-libs/pam )"
DEPEND="${RDEPEND}
dev-util/gtk-doc
dev-util/gtk-doc-am
dev-util/intltool
doc? ( dev-libs/libxml2 dev-libs/libxslt )"
S=${WORKDIR}/${MY_PV}
src_prepare() {
eautoreconf
}
src_configure() {
econf --disable-silent-rules \
$(use_enable pam) \
$(use_enable static-libs static) \
$(use_enable doc gtk-doc-html) \
$(systemd_with_unitdir)
}
src_install() {
emake DESTDIR="${D}" install \
pammoddir=$(getpam_mod_dir)
keepdir /var/lib/fprint
find "${D}" -name "*.la" -delete || die
dodoc AUTHORS NEWS README{,.transifex} TODO
newdoc pam/README README.pam_fprintd
if use doc ; then
insinto /usr/share/doc/${PF}/html
doins doc/{fprintd-docs,version}.xml
insinto /usr/share/doc/${PF}/html/dbus
doins doc/dbus/net.reactivated.Fprint.{Device,Manager}.ref.xml
fi
}
pkg_postinst() {
elog "Please take a look at README.pam_fprintd for integration docs."
}

View File

@ -0,0 +1,6 @@
AUX libfprint-0.5.0-automake-1.13.patch 797 BLAKE2B f84501e22e85efd9e9992bfbbe89191d86dd8353efe821f457f13090ff9e19ae2899dc8ab934d26b532270ed1054daa9e6e42519dee52ea16b5ba66aea486b0e SHA512 76e059f076348beb720e4f7bf8802b101aaf1d281429cdeb8f54ca67c23a1bf198b0220e4ff67421005cc8797c310f624265d5c91e9160fd78a2a3cf9ef4a39e
AUX libfprint-0.5.0-support-147e_2020.patch 1443 BLAKE2B 77e57f424d5727d00baa82b1d50f145dbf7e464af7739d2ed8fbdf4dab367e575f8d10d9623f960f0d00689ab5619f56ed124e1a2f3f479f23faae3da7e671a3 SHA512 e8e47563fc09f5ac018a52577db4998c259884a9251b6c7c2709d4e214a1ebe5820b92739da0b1cac88114545d450409454e882591a59fd27ca981172682af9e
AUX libfprint-0.6.0-fix-udev-rules.patch 1436 BLAKE2B 0e1d31c33ba0a1462e4c5482545802a253fad032a2148debe1be9a99452257e15c3a84df7ff74c5834718aeaa404a154a23f0f8cce634bc568a6f60b6327f4b7 SHA512 b3b191814e0decccaa6e6b1edad70db23e756c319e512f0f236a62845de41ba1982b510f3b0edd699202ba8de9f56afa68a9fef000ac88a61c1ae9d8d5d8a55d
AUX libfprint-0.8.0-fix-udev-rules.patch 1436 BLAKE2B 0e1d31c33ba0a1462e4c5482545802a253fad032a2148debe1be9a99452257e15c3a84df7ff74c5834718aeaa404a154a23f0f8cce634bc568a6f60b6327f4b7 SHA512 b3b191814e0decccaa6e6b1edad70db23e756c319e512f0f236a62845de41ba1982b510f3b0edd699202ba8de9f56afa68a9fef000ac88a61c1ae9d8d5d8a55d
DIST libfprint-0.7.0.tar.bz2 333063 BLAKE2B 30b8c098c73dfa131117aedceffc4192c2182c6fac51fa1dbc5b37d120250e2072a9725e3ad721168bfe68ff400ea310e5fedcbd9a4cfb1f53a018b4b6e4c707 SHA512 edad540af00f551d50c63dd0a29d15566cb3c04ada452080bca8f24b2fc49b31ecf5867b850269e267e6cdd0fc9eb1c80e8b8c2043b2a8ae4c8ec76a6de897d3
EBUILD libfprint-0.7.0.ebuild 1218 BLAKE2B e18bd9163c3efaeae41f5ab638b98ff76757bccca7f340efeff4cf2f99531792e65be8939d3bb3d7ec6f9d690ee3a5ebaaa218abe1af012a81fd6dd8aa334b43 SHA512 308cef32fc50644531d832dd1a380896686d9f1e0e7e361b4c3dd35adde20b611f24e235fe4c07330ae1142ef057a6917ed44f0819ef70989660f1158b6d4fa9

View File

@ -0,0 +1,24 @@
From 43eca622cd49b58c87157e1ff1a2fcfdfba0934e Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Sun, 13 Jan 2013 13:42:13 +0000
Subject: configure.ac: Use AC_CONFIG_HEADERS
AM_CONFIG_HEADER is obsolete, use AC_CONFIG_HEADERS instead of it.
https://bugs.freedesktop.org/show_bug.cgi?id=59320
---
diff --git a/configure.ac b/configure.ac
index 6737256..978ef0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_INIT([libfprint], [0.5.0])
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz check-news])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([libfprint/core.c])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
# Enable silent build when available (Automake 1.11)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
--
cgit v0.9.0.2-2-gbebe

View File

@ -0,0 +1,48 @@
From 3b3679c900f6739f7067f8d720e15d548bb39be9 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Sun, 13 Jan 2013 13:43:38 +0000
Subject: upeke2: Add support for 147e:2020 ID
https://bugs.freedesktop.org/show_bug.cgi?id=59320
---
diff --git a/libfprint/drivers/upeke2.c b/libfprint/drivers/upeke2.c
index ed8f43d..a7db54d 100644
--- a/libfprint/drivers/upeke2.c
+++ b/libfprint/drivers/upeke2.c
@@ -46,6 +46,11 @@
#define MSG_READ_BUF_SIZE 0x40
#define MAX_DATA_IN_READ_BUF (MSG_READ_BUF_SIZE - 9)
+enum {
+ UPEKE2_2016,
+ UPEKE2_2020,
+};
+
struct upeke2_dev {
gboolean enroll_passed;
gboolean first_verify_iteration;
@@ -848,8 +853,10 @@ static struct fpi_ssm *deinitsm_new(struct fp_dev *dev)
static int discover(struct libusb_device_descriptor *dsc, uint32_t *devtype)
{
- /* Revision 2 is what we're interested in */
- if (dsc->bcdDevice == 2)
+ if (dsc->idProduct == 0x2016 && dsc->bcdDevice == 2)
+ return 1;
+
+ if (dsc->idProduct == 0x2020 && dsc->bcdDevice == 1)
return 1;
return 0;
@@ -1453,7 +1460,8 @@ static int verify_stop(struct fp_dev *dev, gboolean iterating)
}
static const struct usb_id id_table[] = {
- { .vendor = 0x147e, .product = 0x2016 },
+ { .vendor = 0x147e, .product = 0x2016, .driver_data = UPEKE2_2016 },
+ { .vendor = 0x147e, .product = 0x2020, .driver_data = UPEKE2_2020 },
{ 0, 0, 0, }, /* terminating entry */
};
--
cgit v0.9.0.2-2-gbebe

View File

@ -0,0 +1,23 @@
Remove spurious \n to fix udev rule generation
Steven Newbury <steve@snewbury.org.uk>:
libfprint generates 60-fprint-autosuspend.rules for all supported devices,
however there's a spurious \n before the ', MODE="0666"' which results in it
appearing on a new line after the match criteria. At least on current
systemd/udev this results in MODE="0666" being applied unconditionally to all
device nodes. This is an extremely serious security problem and effectively
gives root access to all users simply by having the ebuild emerged.
https://bugs.gentoo.org/562218
--- a/libfprint/fprint-list-udev-rules.c
+++ b/libfprint/fprint-list-udev-rules.c
@@ -74,7 +74,7 @@
if (num_printed == 0)
printf ("# %s\n", driver->full_name);
- printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\"\n, MODE=\"0666\"\n", driver->id_table[i].vendor, driver->id_table[i].product);
+ printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\", MODE=\"0666\"\n", driver->id_table[i].vendor, driver->id_table[i].product);
printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{LIBFPRINT_DRIVER}=\"%s\"\n", driver->id_table[i].vendor, driver->id_table[i].product, driver->full_name);
num_printed++;
}

View File

@ -0,0 +1,23 @@
Remove spurious \n to fix udev rule generation
Steven Newbury <steve@snewbury.org.uk>:
libfprint generates 60-fprint-autosuspend.rules for all supported devices,
however there's a spurious \n before the ', MODE="0666"' which results in it
appearing on a new line after the match criteria. At least on current
systemd/udev this results in MODE="0666" being applied unconditionally to all
device nodes. This is an extremely serious security problem and effectively
gives root access to all users simply by having the ebuild emerged.
https://bugs.gentoo.org/562218
--- a/libfprint/fprint-list-udev-rules.c
+++ b/libfprint/fprint-list-udev-rules.c
@@ -74,7 +74,7 @@
if (num_printed == 0)
printf ("# %s\n", driver->full_name);
- printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\"\n, MODE=\"0666\"\n", driver->id_table[i].vendor, driver->id_table[i].product);
+ printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\", MODE=\"0666\"\n", driver->id_table[i].vendor, driver->id_table[i].product);
printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{LIBFPRINT_DRIVER}=\"%s\"\n", driver->id_table[i].vendor, driver->id_table[i].product, driver->full_name);
num_printed++;
}

View File

@ -0,0 +1,58 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools eutils udev vcs-snapshot
MY_PV="V_${PV//./_}"
DESCRIPTION="library to add support for consumer fingerprint readers"
HOMEPAGE="https://cgit.freedesktop.org/libfprint/libfprint/"
SRC_URI="https://cgit.freedesktop.org/${PN}/${PN}/snapshot/${MY_PV}.tar.bz2 -> ${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~x86"
IUSE="debug static-libs vanilla"
RDEPEND="virtual/libusb:1
dev-libs/glib:2
dev-libs/nss
x11-libs/pixman"
DEPEND="${RDEPEND}
virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${P}-fix-udev-rules.patch"
)
src_prepare() {
if ! use vanilla ; then
eapply "${WORKDIR}"/${P}_vfs0050.patch
fi
default
# upeke2 and fdu2000 were missing from all_drivers.
sed -e '/^all_drivers=/s:"$: upeke2 fdu2000":' \
-i configure.ac || die
eautoreconf
}
src_configure() {
econf \
--with-drivers=all \
$(use_enable debug debug-log) \
$(use_enable static-libs static) \
-enable-udev-rules \
--with-udev-rules-dir=$(get_udevdir)/rules.d
}
src_install() {
default
prune_libtool_files
dodoc AUTHORS HACKING NEWS README THANKS TODO
}