Mail archive
alpine-aports

(unknown charset) Re: [alpine-aports] [PATCH] main/gnupg: Enabled smartcard support as subpkg

From: (unknown charset) Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
Date: Mon, 4 Jun 2018 09:41:05 +0200

Hi,

sorry for the late reply. I just tested it two times and the unit tests ran
just fine. Please check if the unit tests are passed on your machine without my
modifications, as the enabled smart card driver is not tested in the unit tests
at all (as far as I know). Thus, the hang in the unit test might be unrelated
to the modifications.

(I noticed that I incremented the pkgrel two times :-( I atteched a patch with
that fixed.)

Kind regards,
Marian

On Thu, 31 May 2018 11:54:02 +0200
Leonardo Arena <rnalrd_at_gmail.com> wrote:

> Hi,
>
> it appears that while running the tests it stucks whenever signing is used:
>
> sigs.scm, sigs-dsa.scm, seat.scm, clearsig.scm, detach.scm are just some
> examples.
>
> Here is the last test I run (after disabling those above), detachm.scm.
> Eventually I stopped it:
>
> Checking armored signatures
> > plain-1 plain-2 ^Cmake[2]: *** [Makefile:942: xcheck] Interrupt
> make[1]: *** [Makefile:534: check-recursive] Interrupt
> make: *** [Makefile:590: check-recursive] Interrupt
>
> I've let them run for several minutes but they do not appear to make any
> progress. I did not investigate further.
>
> How about your environment? Do they behave the same? May be not since you
> submitted the patch...
>
> Thanks!
>
> /eo
>
>
>
> On Wed, May 9, 2018 at 11:26 PM, Marian Buschsieweke <
> marian.buschsieweke_at_ovgu.de> wrote:
>
> > - Added gnupg-scdaemon as subpackage
> > - Enabled internal CCID driver (support for Gnuk, NitroKey, YubiKey, ...)
> > - Added 60-scdaemon.rules udev rules to provide access to group gnupg
> > - Added pre-install for subpackage to create group gnupg
> >
> > This feature was requested here: https://bugs.alpinelinux.org/issues/8621
> > ---
> > main/gnupg/60-scdaemon.rules | 63 +++++++++++++++++++++++++++
> > main/gnupg/APKBUILD | 29 +++++++++---
> > main/gnupg/gnupg-scdaemon.pre-install | 2 +
> > 3 files changed, 88 insertions(+), 6 deletions(-)
> > create mode 100644 main/gnupg/60-scdaemon.rules
> > create mode 100644 main/gnupg/gnupg-scdaemon.pre-install
> >
> > diff --git a/main/gnupg/60-scdaemon.rules b/main/gnupg/60-scdaemon.rules
> > new file mode 100644
> > index 0000000000..55ca5c1663
> > --- /dev/null
> > +++ b/main/gnupg/60-scdaemon.rules
> > _at_@ -0,0 +1,63 @@
> > +# do not edit this file, it will be overwritten on update
> > +
> > +SUBSYSTEM!="usb", GOTO="gnupg_rules_end"
> > +ACTION!="add", GOTO="gnupg_rules_end"
> > +
> > +# USB SmartCard Readers
> > +## Cherry GmbH (XX33, ST2000)
> > +ATTR{idVendor}=="046a", ATTR{idProduct}=="0005",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="046a", ATTR{idProduct}=="0010",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="046a", ATTR{idProduct}=="003e",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## SCM Microsystems, Inc (SCR331-DI, SCR335, SCR3320, SCR331, SCR3310 and
> > SPR532)
> > +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5111",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5115",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5116",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="04e6", ATTR{idProduct}=="5117",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="04e6", ATTR{idProduct}=="e001",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="04e6", ATTR{idProduct}=="e003",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Omnikey AG (CardMan 3821, CardMan 6121)
> > +ATTR{idVendor}=="076b", ATTR{idProduct}=="3821",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="076b", ATTR{idProduct}=="6622",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Gemalto
> > +ATTR{idVendor}=="08e6", ATTR{idProduct}=="3437",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="08e6", ATTR{idProduct}=="3438",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="08e6", ATTR{idProduct}=="3478",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="08e6", ATTR{idProduct}=="34c2",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="08e6", ATTR{idProduct}=="34ec",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Reiner (SCT cyberJack)
> > +ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0500",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Kobil (KAAN)
> > +ATTR{idVendor}=="0d46", ATTR{idProduct}=="2012",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## VASCO (DIGIPASS 920)
> > +ATTR{idVendor}=="1a44", ATTR{idProduct}=="0920",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Crypto Stick
> > +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4107",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Nitrokey
> > +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4108",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4109",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +ATTR{idVendor}=="20a0", ATTR{idProduct}=="4211",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Gnuk Token
> > +ATTR{idVendor}=="234b", ATTR{idProduct}=="0000",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Alcor Micro Corp cardreader (in ThinkPad X250)
> > +ATTR{idVendor}=="058f", ATTR{idProduct}=="9540",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Fujitsu Siemens
> > +ATTR{idVendor}=="0bf8", ATTR{idProduct}=="1006",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +## Yubico
> > +# Yubikey NEO OTP+CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0111",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey NEO CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0112",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey NEO U2F+CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0115",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey NEO OTP+U2F+CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0116",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey 4 CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0404",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey 4 OTP+CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0405",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey 4 U2F+CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0406",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +# Yubikey 4 OTP+U2F+CCID
> > +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0407",
> > ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg",
> > GROUP+="gnupg"
> > +
> > +LABEL="gnupg_rules_end"
> > diff --git a/main/gnupg/APKBUILD b/main/gnupg/APKBUILD
> > index b2a7978e62..7a9620b523 100644
> > --- a/main/gnupg/APKBUILD
> > +++ b/main/gnupg/APKBUILD
> > _at_@ -3,7 +3,7 @@
> > pkgname=gnupg
> > pkgver=2.2.6
> > _ver=${pkgver/_beta/-beta}
> > -pkgrel=0
> > +pkgrel=2
> > pkgdesc="GNU Privacy Guard 2 - a PGP replacement tool"
> > url="https://www.gnupg.org/"
> > arch="all"
> > _at_@ -12,11 +12,13 @@ options=""
> > depends="pinentry"
> > makedepends="gnutls-dev libksba-dev libgcrypt-dev libgpg-error-dev
> > npth-dev zlib-dev libassuan-dev openldap-dev bzip2-dev
> > - sqlite-dev"
> > -subpackages="$pkgname-doc"
> > + sqlite-dev libusb-dev"
> > +subpackages="$pkgname-doc $pkgname-scdaemon"
> > source="https://gnupg.org/ftp/gcrypt/$pkgname/$pkgname-$_ver.tar.bz2
> > 0001-Include-sys-select.h-for-FD_SETSIZE.patch
> > - fix-i18n.patch"
> > + fix-i18n.patch
> > + 60-scdaemon.rules"
> > +install="$pkgname-scdaemon.pre-install"
> > builddir="$srcdir"/$pkgname-$_ver
> >
> > build() {
> > _at_@ -31,7 +33,9 @@ build() {
> > --localstatedir=/var \
> > --disable-nls \
> > --enable-bzip2 \
> > - --enable-tofu
> > + --enable-tofu \
> > + --enable-scdaemon \
> > + --enable-ccid-driver
> > make
> > }
> >
> > _at_@ -49,6 +53,19 @@ package() {
> > ln -s gpgv "$pkgdir"/usr/bin/gpgv2
> > }
> >
> > +scdaemon() {
> > + pkgdesc="GNU Privacy Guard 2 - smart card support"
> > + depends="gnupg"
> > +
> > + mkdir -p "${subpkgdir}/usr/libexec"
> > + mkdir -p "${subpkgdir}/lib/udev/rules.d"
> > +
> > + install -Dm644 -t "${subpkgdir}/lib/udev/rules.d/" \
> > + "${srcdir}/60-scdaemon.rules"
> > + mv "${pkgdir}/usr/libexec/scdaemon" "${subpkgdir}/usr/libexec/"
> > +}
> > +
> > sha512sums="ad0861c86c1886f701ae05e7cd439449cf0684a7bf461ca2b729c5e93833
> > ee36f8438cd4d7f73a4c60e57060f3d8f4890a809b2bbc31b083f9f61d2f66ccacc4
> > gnupg-2.2.6.tar.bz2
> > c6cc4595081c5b025913fa3ebecf0dff87a84f3c669e3fef106e4fa040f1
> > d4314ee52dd4c0e0002b213034fb0810221cfdd0033eae5349b6e3978f05d08bcac7
> > 0001-Include-sys-select.h-for-FD_SETSIZE.patch
> > -b19a44dacf061dd02b439ab8bd820e3c721aab77168f705f5ce65661f265
> > 27b03ea88eec16d78486a633c474120589ec8736692ebff57ab9b95f52f57190ba6b
> > fix-i18n.patch"
> > +b19a44dacf061dd02b439ab8bd820e3c721aab77168f705f5ce65661f265
> > 27b03ea88eec16d78486a633c474120589ec8736692ebff57ab9b95f52f57190ba6b
> > fix-i18n.patch
> > +4bfb9742279c2d1c872d63cd4bcb01f6a2a13d94618eff954d3a37451fa8
> > 70a9bb29687330854ee47e8876d6e60dc81cb2569c3931beaefacda33db23c464402
> > 60-scdaemon.rules"
> > diff --git a/main/gnupg/gnupg-scdaemon.pre-install
> > b/main/gnupg/gnupg-scdaemon.pre-install
> > new file mode 100644
> > index 0000000000..8d8262ceea
> > --- /dev/null
> > +++ b/main/gnupg/gnupg-scdaemon.pre-install
> > _at_@ -0,0 +1,2 @@
> > +#!/bin/sh
> > +addgroup -S gnupg 2> /dev/null
> > --
> > 2.17.0
> >
> >
> >
> > ---
> > Unsubscribe: alpine-aports+unsubscribe_at_lists.alpinelinux.org
> > Help: alpine-aports+help_at_lists.alpinelinux.org
> > ---
> >
> >







---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Jun 04 2018 - 09:41:05 GMT