[arch-commits] Commit in gnupg/repos (8 files)

Gaëtan Bisson bisson at archlinux.org
Sat Feb 18 17:20:26 UTC 2017


    Date: Saturday, February 18, 2017 @ 17:20:25
  Author: bisson
Revision: 289208

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  gnupg/repos/testing-i686/
  gnupg/repos/testing-i686/PKGBUILD
    (from rev 289207, gnupg/trunk/PKGBUILD)
  gnupg/repos/testing-i686/install
    (from rev 289207, gnupg/trunk/install)
  gnupg/repos/testing-i686/scd.patch
    (from rev 289207, gnupg/trunk/scd.patch)
  gnupg/repos/testing-x86_64/
  gnupg/repos/testing-x86_64/PKGBUILD
    (from rev 289207, gnupg/trunk/PKGBUILD)
  gnupg/repos/testing-x86_64/install
    (from rev 289207, gnupg/trunk/install)
  gnupg/repos/testing-x86_64/scd.patch
    (from rev 289207, gnupg/trunk/scd.patch)

--------------------------+
 testing-i686/PKGBUILD    |   70 ++++++++++++++++++++++++++++++++
 testing-i686/install     |   10 ++++
 testing-i686/scd.patch   |   97 +++++++++++++++++++++++++++++++++++++++++++++
 testing-x86_64/PKGBUILD  |   70 ++++++++++++++++++++++++++++++++
 testing-x86_64/install   |   10 ++++
 testing-x86_64/scd.patch |   97 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 354 insertions(+)

Copied: gnupg/repos/testing-i686/PKGBUILD (from rev 289207, gnupg/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2017-02-18 17:20:25 UTC (rev 289208)
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Andreas Radke <andyrtr at archlinux.org>
+# Contributor: Judd Vinet <jvinet at zeroflux.org>
+
+pkgname=gnupg
+pkgver=2.1.18
+pkgrel=2
+pkgdesc='Complete and free implementation of the OpenPGP standard'
+url='http://www.gnupg.org/'
+license=('GPL')
+arch=('i686' 'x86_64')
+optdepends=('libldap: gpg2keys_ldap'
+            'libusb-compat: scdaemon')
+makedepends=('libldap' 'libusb-compat')
+depends=('npth' 'libgpg-error' 'libgcrypt' 'libksba' 'libassuan'
+         'pinentry' 'bzip2' 'readline' 'gnutls' 'sqlite')
+validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6'
+              '46CC730865BB5C78EBABADCF04376F3EE0856959'
+              '031EC2536E580D8EA286A9F22071B08A33BD3F06'
+              'D238EA65D64C67ED4C3073F28A861B1C7EFD60D9')
+source=("https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
+        'scd.patch')
+sha1sums=('b698012cc2d77c2652afd168a15e679d1394fa89' 'SKIP'
+          '568f48e1048f1dac721dd4055447a93485f6b2b1')
+
+install=install
+
+conflicts=('dirmngr' 'gnupg2')
+provides=('dirmngr' "gnupg2=${pkgver}")
+replaces=('dirmngr' 'gnupg2')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	sed '/noinst_SCRIPTS = gpg-zip/c sbin_SCRIPTS += gpg-zip' -i tools/Makefile.in
+	patch -p1 -i ../scd.patch
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	./configure \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--sbindir=/usr/bin \
+		--libexecdir=/usr/lib/gnupg \
+		--enable-maintainer-mode \
+		--enable-symcryptrun \
+
+	make
+}
+
+check() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make check || [[ $CARCH = i686 ]]
+	# https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032364.html
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make DESTDIR="${pkgdir}" install
+	ln -s gpg2 "${pkgdir}"/usr/bin/gpg
+	ln -s gpgv2 "${pkgdir}"/usr/bin/gpgv
+	ln -s gpg2.1.gz "${pkgdir}"/usr/share/man/man1/gpg.1.gz
+
+	cd doc/examples/systemd-user
+	for i in *.*; do
+		install -Dm644 "$i" "${pkgdir}/usr/lib/systemd/user/$i"
+	done
+}

Copied: gnupg/repos/testing-i686/install (from rev 289207, gnupg/trunk/install)
===================================================================
--- testing-i686/install	                        (rev 0)
+++ testing-i686/install	2017-02-18 17:20:25 UTC (rev 289208)
@@ -0,0 +1,10 @@
+post_install() {
+	# See FS#42798 and FS#47371
+	dirmngr </dev/null &>/dev/null || true
+}
+
+post_upgrade() {
+	if [[ $(vercmp $2 2.1.13-1) = -1 ]]; then
+		echo "==> Please kill running gpg-agent and dirmngr processes before using this release."
+	fi
+}

Copied: gnupg/repos/testing-i686/scd.patch (from rev 289207, gnupg/trunk/scd.patch)
===================================================================
--- testing-i686/scd.patch	                        (rev 0)
+++ testing-i686/scd.patch	2017-02-18 17:20:25 UTC (rev 289208)
@@ -0,0 +1,97 @@
+From da4c132cca2c6df81243c9660b7348268a848f88 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe at fsij.org>
+Date: Mon, 13 Feb 2017 11:09:13 +0900
+Subject: [PATCH 1/1] scd: Fix use case of PC/SC.
+
+* scd/apdu.c (apdu_open_reader): Add an argument APP_EMPTY.
+When CCID driver fails to open, try PC/SC if APP is nothing.
+* scd/app.c (select_application): Supply arg if APP is nothing.
+
+--
+
+After scanning available card readers by CCID driver, scdaemon should
+try PC/SC service if no APP is registered yet.  Also, when the slot
+is allocated for PC/SC (ccid.handle==NULL), it should not call
+ccid_compare_BAI, otherwise scdaemon crashes.
+
+Debian-bug-id: 852702, 854005, 854595, 854616
+
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+---
+ scd/apdu.c | 14 +++++++++++---
+ scd/apdu.h |  2 +-
+ scd/app.c  |  2 +-
+ 3 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/scd/apdu.c b/scd/apdu.c
+index 6fc62aa..82d53b1 100644
+--- a/scd/apdu.c
++++ b/scd/apdu.c
+@@ -3127,7 +3127,7 @@ apdu_open_one_reader (const char *portstr)
+ }
+ 
+ int
+-apdu_open_reader (struct dev_list *dl)
++apdu_open_reader (struct dev_list *dl, int app_empty)
+ {
+   int slot;
+ 
+@@ -3177,6 +3177,7 @@ apdu_open_reader (struct dev_list *dl)
+           /* Check identity by BAI against already opened HANDLEs.  */
+           for (slot = 0; slot < MAX_READER; slot++)
+             if (reader_table[slot].used
++                && reader_table[slot].ccid.handle
+                 && ccid_compare_BAI (reader_table[slot].ccid.handle, bai))
+               break;
+ 
+@@ -3201,12 +3202,19 @@ apdu_open_reader (struct dev_list *dl)
+             dl->idx++;
+         }
+ 
+-      slot = -1;
++      /* Not found.  Try one for PC/SC, only when it's the initial scan.  */
++      if (app_empty && dl->idx == dl->idx_max)
++        {
++          dl->idx++;
++          slot = apdu_open_one_reader (dl->portstr);
++        }
++      else
++        slot = -1;
+     }
+   else
+ #endif
+     { /* PC/SC readers.  */
+-      if (dl->idx == 0)
++      if (app_empty && dl->idx == 0)
+         {
+           dl->idx++;
+           slot = apdu_open_one_reader (dl->portstr);
+diff --git a/scd/apdu.h b/scd/apdu.h
+index 473def5..6751e8c 100644
+--- a/scd/apdu.h
++++ b/scd/apdu.h
+@@ -91,7 +91,7 @@ gpg_error_t apdu_dev_list_start (const char *portstr, struct dev_list **l_p);
+ void apdu_dev_list_finish (struct dev_list *l);
+ 
+ /* Note, that apdu_open_reader returns no status word but -1 on error. */
+-int apdu_open_reader (struct dev_list *l);
++int apdu_open_reader (struct dev_list *l, int app_empty);
+ int apdu_open_remote_reader (const char *portstr,
+                              const unsigned char *cookie, size_t length,
+                              int (*readfnc) (void *opaque,
+diff --git a/scd/app.c b/scd/app.c
+index 5b8da1c..7e72870 100644
+--- a/scd/app.c
++++ b/scd/app.c
+@@ -343,7 +343,7 @@ select_application (ctrl_t ctrl, const char *name, app_t *r_app,
+           int slot;
+           int periodical_check_needed_this;
+ 
+-          slot = apdu_open_reader (l);
++          slot = apdu_open_reader (l, !app_top);
+           if (slot < 0)
+             break;
+ 
+-- 
+2.8.0.rc3
+

Copied: gnupg/repos/testing-x86_64/PKGBUILD (from rev 289207, gnupg/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2017-02-18 17:20:25 UTC (rev 289208)
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Andreas Radke <andyrtr at archlinux.org>
+# Contributor: Judd Vinet <jvinet at zeroflux.org>
+
+pkgname=gnupg
+pkgver=2.1.18
+pkgrel=2
+pkgdesc='Complete and free implementation of the OpenPGP standard'
+url='http://www.gnupg.org/'
+license=('GPL')
+arch=('i686' 'x86_64')
+optdepends=('libldap: gpg2keys_ldap'
+            'libusb-compat: scdaemon')
+makedepends=('libldap' 'libusb-compat')
+depends=('npth' 'libgpg-error' 'libgcrypt' 'libksba' 'libassuan'
+         'pinentry' 'bzip2' 'readline' 'gnutls' 'sqlite')
+validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6'
+              '46CC730865BB5C78EBABADCF04376F3EE0856959'
+              '031EC2536E580D8EA286A9F22071B08A33BD3F06'
+              'D238EA65D64C67ED4C3073F28A861B1C7EFD60D9')
+source=("https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
+        'scd.patch')
+sha1sums=('b698012cc2d77c2652afd168a15e679d1394fa89' 'SKIP'
+          '568f48e1048f1dac721dd4055447a93485f6b2b1')
+
+install=install
+
+conflicts=('dirmngr' 'gnupg2')
+provides=('dirmngr' "gnupg2=${pkgver}")
+replaces=('dirmngr' 'gnupg2')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	sed '/noinst_SCRIPTS = gpg-zip/c sbin_SCRIPTS += gpg-zip' -i tools/Makefile.in
+	patch -p1 -i ../scd.patch
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	./configure \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--sbindir=/usr/bin \
+		--libexecdir=/usr/lib/gnupg \
+		--enable-maintainer-mode \
+		--enable-symcryptrun \
+
+	make
+}
+
+check() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make check || [[ $CARCH = i686 ]]
+	# https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032364.html
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make DESTDIR="${pkgdir}" install
+	ln -s gpg2 "${pkgdir}"/usr/bin/gpg
+	ln -s gpgv2 "${pkgdir}"/usr/bin/gpgv
+	ln -s gpg2.1.gz "${pkgdir}"/usr/share/man/man1/gpg.1.gz
+
+	cd doc/examples/systemd-user
+	for i in *.*; do
+		install -Dm644 "$i" "${pkgdir}/usr/lib/systemd/user/$i"
+	done
+}

Copied: gnupg/repos/testing-x86_64/install (from rev 289207, gnupg/trunk/install)
===================================================================
--- testing-x86_64/install	                        (rev 0)
+++ testing-x86_64/install	2017-02-18 17:20:25 UTC (rev 289208)
@@ -0,0 +1,10 @@
+post_install() {
+	# See FS#42798 and FS#47371
+	dirmngr </dev/null &>/dev/null || true
+}
+
+post_upgrade() {
+	if [[ $(vercmp $2 2.1.13-1) = -1 ]]; then
+		echo "==> Please kill running gpg-agent and dirmngr processes before using this release."
+	fi
+}

Copied: gnupg/repos/testing-x86_64/scd.patch (from rev 289207, gnupg/trunk/scd.patch)
===================================================================
--- testing-x86_64/scd.patch	                        (rev 0)
+++ testing-x86_64/scd.patch	2017-02-18 17:20:25 UTC (rev 289208)
@@ -0,0 +1,97 @@
+From da4c132cca2c6df81243c9660b7348268a848f88 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe at fsij.org>
+Date: Mon, 13 Feb 2017 11:09:13 +0900
+Subject: [PATCH 1/1] scd: Fix use case of PC/SC.
+
+* scd/apdu.c (apdu_open_reader): Add an argument APP_EMPTY.
+When CCID driver fails to open, try PC/SC if APP is nothing.
+* scd/app.c (select_application): Supply arg if APP is nothing.
+
+--
+
+After scanning available card readers by CCID driver, scdaemon should
+try PC/SC service if no APP is registered yet.  Also, when the slot
+is allocated for PC/SC (ccid.handle==NULL), it should not call
+ccid_compare_BAI, otherwise scdaemon crashes.
+
+Debian-bug-id: 852702, 854005, 854595, 854616
+
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+---
+ scd/apdu.c | 14 +++++++++++---
+ scd/apdu.h |  2 +-
+ scd/app.c  |  2 +-
+ 3 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/scd/apdu.c b/scd/apdu.c
+index 6fc62aa..82d53b1 100644
+--- a/scd/apdu.c
++++ b/scd/apdu.c
+@@ -3127,7 +3127,7 @@ apdu_open_one_reader (const char *portstr)
+ }
+ 
+ int
+-apdu_open_reader (struct dev_list *dl)
++apdu_open_reader (struct dev_list *dl, int app_empty)
+ {
+   int slot;
+ 
+@@ -3177,6 +3177,7 @@ apdu_open_reader (struct dev_list *dl)
+           /* Check identity by BAI against already opened HANDLEs.  */
+           for (slot = 0; slot < MAX_READER; slot++)
+             if (reader_table[slot].used
++                && reader_table[slot].ccid.handle
+                 && ccid_compare_BAI (reader_table[slot].ccid.handle, bai))
+               break;
+ 
+@@ -3201,12 +3202,19 @@ apdu_open_reader (struct dev_list *dl)
+             dl->idx++;
+         }
+ 
+-      slot = -1;
++      /* Not found.  Try one for PC/SC, only when it's the initial scan.  */
++      if (app_empty && dl->idx == dl->idx_max)
++        {
++          dl->idx++;
++          slot = apdu_open_one_reader (dl->portstr);
++        }
++      else
++        slot = -1;
+     }
+   else
+ #endif
+     { /* PC/SC readers.  */
+-      if (dl->idx == 0)
++      if (app_empty && dl->idx == 0)
+         {
+           dl->idx++;
+           slot = apdu_open_one_reader (dl->portstr);
+diff --git a/scd/apdu.h b/scd/apdu.h
+index 473def5..6751e8c 100644
+--- a/scd/apdu.h
++++ b/scd/apdu.h
+@@ -91,7 +91,7 @@ gpg_error_t apdu_dev_list_start (const char *portstr, struct dev_list **l_p);
+ void apdu_dev_list_finish (struct dev_list *l);
+ 
+ /* Note, that apdu_open_reader returns no status word but -1 on error. */
+-int apdu_open_reader (struct dev_list *l);
++int apdu_open_reader (struct dev_list *l, int app_empty);
+ int apdu_open_remote_reader (const char *portstr,
+                              const unsigned char *cookie, size_t length,
+                              int (*readfnc) (void *opaque,
+diff --git a/scd/app.c b/scd/app.c
+index 5b8da1c..7e72870 100644
+--- a/scd/app.c
++++ b/scd/app.c
+@@ -343,7 +343,7 @@ select_application (ctrl_t ctrl, const char *name, app_t *r_app,
+           int slot;
+           int periodical_check_needed_this;
+ 
+-          slot = apdu_open_reader (l);
++          slot = apdu_open_reader (l, !app_top);
+           if (slot < 0)
+             break;
+ 
+-- 
+2.8.0.rc3
+



More information about the arch-commits mailing list