Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/gnupg/
Date: Thu, 03 Sep 2020 18:35:51
Message-Id: 1599158144.3c2d796b8ffb2071e2276656b5fc20aae59c7fcf.polynomial-c@gentoo
1 commit: 3c2d796b8ffb2071e2276656b5fc20aae59c7fcf
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 3 18:35:03 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 3 18:35:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c2d796b
7
8 app-crypt/gnupg: Bump to version 2.2.23
9
10 Package-Manager: Portage-3.0.5, Repoman-3.0.1
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-crypt/gnupg/Manifest | 1 +
14 app-crypt/gnupg/gnupg-2.2.23.ebuild | 164 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 165 insertions(+)
16
17 diff --git a/app-crypt/gnupg/Manifest b/app-crypt/gnupg/Manifest
18 index 4adaaa9f921..57c6cc33249 100644
19 --- a/app-crypt/gnupg/Manifest
20 +++ b/app-crypt/gnupg/Manifest
21 @@ -1,3 +1,4 @@
22 DIST gnupg-2.2.20.tar.bz2 6786913 BLAKE2B 43cf9402a26e67d6c7c2444eb2faaee3f06ea0bf6c07708a50834c5d7424db2f9c38e1f0046dd3a35082abc08d401b2951655e7e068f0873db297560b87d2667 SHA512 3e69f102366ec3415f439ab81aae2458182fa1a18dfb86565b1d9dc638f3fc4c179a5947f0042b7c5a813345676285a662793664a1803ea9ad8328f0548e0edc
23 DIST gnupg-2.2.21.tar.bz2 6813160 BLAKE2B b4708fd34c23dec8ec5be0740a502d155b649b4c88a89e5cc6f3cb99a15f7c6e31c50247ccacfedad55600dac3e7f91a8567424d335ab5e537082261dc98aceb SHA512 b4eac75253d4a1cac341c8a1ba7bb275e849a88d5377035497777c7bcd49b5a4c91b77000311695eb7d4083856975b2b2d14518f24ab94846027280bd8c301f9
24 DIST gnupg-2.2.22.tar.bz2 7098444 BLAKE2B b5f306485032acadc852f4f71f2e968795843faacd5dda24ed2b20df78a3d38a364c2feade7ef8389a203e8b037fbb92129207cbc6d60b89cfb0945dded56a97 SHA512 3e5a8bb91c122f97acee2a93e3233db89bff9b96c6ec052c95bd2fe7e46c79a8afaac536c05675a7129e332272d62c677722a12cb05386b54a8d12ef82b6c5fa
25 +DIST gnupg-2.2.23.tar.bz2 7099806 BLAKE2B 0b9c1f5c8931399cfd9d95f107f91869733c4a986476ea43631b4265b1a5c26cfb8c9bb24ef6a295af7aa803749caaedde26365f6f50a7c946c1f86c867d855d SHA512 736b39628f7e4adc650b3f9937c81f27e9ad41e77f5345dc54262c91c1cf7004243fa7f932313bcde955e0e9b3f1afc639bac18023ae878b1d26e3c5a3cabb90
26
27 diff --git a/app-crypt/gnupg/gnupg-2.2.23.ebuild b/app-crypt/gnupg/gnupg-2.2.23.ebuild
28 new file mode 100644
29 index 00000000000..10dd1e9eb42
30 --- /dev/null
31 +++ b/app-crypt/gnupg/gnupg-2.2.23.ebuild
32 @@ -0,0 +1,164 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit flag-o-matic systemd toolchain-funcs
39 +
40 +MY_P="${P/_/-}"
41 +
42 +DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
43 +HOMEPAGE="https://gnupg.org/"
44 +SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
45 +
46 +LICENSE="GPL-3"
47 +SLOT="0"
48 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
49 +IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server"
50 +
51 +# Existence of executables is checked during configuration.
52 +DEPEND=">=dev-libs/libassuan-2.5.0
53 + >=dev-libs/libgcrypt-1.7.3
54 + >=dev-libs/libgpg-error-1.29
55 + >=dev-libs/libksba-1.3.4
56 + >=dev-libs/npth-1.2
57 + >=net-misc/curl-7.10
58 + bzip2? ( app-arch/bzip2 )
59 + ldap? ( net-nds/openldap )
60 + readline? ( sys-libs/readline:0= )
61 + smartcard? ( usb? ( virtual/libusb:1 ) )
62 + ssl? ( >=net-libs/gnutls-3.0:0= )
63 + sys-libs/zlib
64 + tofu? ( >=dev-db/sqlite-3.7 )"
65 +
66 +RDEPEND="${DEPEND}
67 + app-crypt/pinentry
68 + nls? ( virtual/libintl )
69 + selinux? ( sec-policy/selinux-gpg )
70 + wks-server? ( virtual/mta )"
71 +
72 +BDEPEND="virtual/pkgconfig
73 + doc? ( sys-apps/texinfo )
74 + nls? ( sys-devel/gettext )"
75 +
76 +S="${WORKDIR}/${MY_P}"
77 +
78 +DOCS=(
79 + ChangeLog NEWS README THANKS TODO VERSION
80 + doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
81 +)
82 +
83 +PATCHES=(
84 + "${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
85 +)
86 +
87 +src_prepare() {
88 + default
89 +
90 + # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
91 + # idea borrowed from libdbus, see
92 + # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
93 + #
94 + # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
95 + # which in turn requires discovery in Autoconf, something that upstream deeply resents.
96 + sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
97 + -i doc/examples/systemd-user/gpg-agent-ssh.socket || die
98 +}
99 +
100 +src_configure() {
101 + local myconf=(
102 + $(use_enable bzip2)
103 + $(use_enable nls)
104 + $(use_enable smartcard scdaemon)
105 + $(use_enable ssl gnutls)
106 + $(use_enable tofu)
107 + $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
108 + $(use_enable wks-server wks-tools)
109 + $(use_with ldap)
110 + $(use_with readline)
111 + --with-mailprog=/usr/libexec/sendmail
112 + --disable-ntbtls
113 + --enable-all-tests
114 + --enable-gpg
115 + --enable-gpgsm
116 + --enable-large-secmem
117 + CC_FOR_BUILD="$(tc-getBUILD_CC)"
118 + GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
119 + KSBA_CONFIG="${EROOT}/usr/bin/ksba-config"
120 + LIBASSUAN_CONFIG="${EROOT}/usr/bin/libassuan-config"
121 + LIBGCRYPT_CONFIG="${EROOT}/usr/bin/${CHOST}-libgcrypt-config"
122 + NPTH_CONFIG="${EROOT}/usr/bin/npth-config"
123 + $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
124 + )
125 +
126 + if use prefix && use usb; then
127 + # bug #649598
128 + append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0"
129 + fi
130 +
131 + if use elibc_SunOS || use elibc_AIX; then
132 + myconf+=( --disable-symcryptrun )
133 + else
134 + myconf+=( --enable-symcryptrun )
135 + fi
136 +
137 + #bug 663142
138 + if use user-socket; then
139 + myconf+=( --enable-run-gnupg-user-socket )
140 + fi
141 +
142 + # glib fails and picks up clang's internal stdint.h causing weird errors
143 + [[ ${CC} == *clang ]] && \
144 + export gl_cv_absolute_stdint_h=/usr/include/stdint.h
145 +
146 + # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
147 + # As of GnuPG 2.3, the mailprog substitution is used for the binary called
148 + # by wks-client & wks-server; and if it's autodetected but not not exist at
149 + # build time, then then 'gpg-wks-client --send' functionality will not
150 + # work. This has an unwanted side-effect in stage3 builds: there was a
151 + # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
152 + # the build where the install guide previously make the user chose the
153 + # logger & mta early in the install.
154 +
155 + econf "${myconf[@]}"
156 +}
157 +
158 +src_compile() {
159 + default
160 +
161 + use doc && emake -C doc html
162 +}
163 +
164 +src_test() {
165 + #Bug: 638574
166 + use tofu && export TESTFLAGS=--parallel
167 + default
168 +}
169 +
170 +src_install() {
171 + default
172 +
173 + use tools &&
174 + dobin \
175 + tools/{convert-from-106,gpg-check-pattern} \
176 + tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
177 + tools/make-dns-cert
178 +
179 + dosym gpg /usr/bin/gpg2
180 + dosym gpgv /usr/bin/gpgv2
181 + echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
182 + echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
183 +
184 + dodir /etc/env.d
185 + echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
186 +
187 + use doc && dodoc doc/gnupg.html/* doc/*.png
188 +
189 + systemd_douserunit doc/examples/systemd-user/*.{service,socket}
190 +}
191 +
192 +pkg_postinst() {
193 + elog "See https://wiki.gentoo.org/wiki/GnuPG for documentation on gnupg"
194 + elog
195 + elog "If you wish to use 'gpg-wks-client --send', you must install an MTA!"
196 +}