Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/gnupg/
Date: Sat, 15 Aug 2020 00:08:02
Message-Id: 1597450073.8c51159bf2a2ee66bba995269a8fcda33d57c75d.whissi@gentoo
1 commit: 8c51159bf2a2ee66bba995269a8fcda33d57c75d
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 15 00:02:09 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 15 00:07:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c51159b
7
8 app-crypt/gnupg: bump to v2.2.21
9
10 Closes: https://bugs.gentoo.org/737160
11 Package-Manager: Portage-3.0.2, Repoman-2.3.23
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 app-crypt/gnupg/Manifest | 1 +
15 app-crypt/gnupg/gnupg-2.2.21.ebuild | 166 ++++++++++++++++++++++++++++++++++++
16 2 files changed, 167 insertions(+)
17
18 diff --git a/app-crypt/gnupg/Manifest b/app-crypt/gnupg/Manifest
19 index c7e6dd6cb8b..2eaa97cae3d 100644
20 --- a/app-crypt/gnupg/Manifest
21 +++ b/app-crypt/gnupg/Manifest
22 @@ -1 +1,2 @@
23 DIST gnupg-2.2.20.tar.bz2 6786913 BLAKE2B 43cf9402a26e67d6c7c2444eb2faaee3f06ea0bf6c07708a50834c5d7424db2f9c38e1f0046dd3a35082abc08d401b2951655e7e068f0873db297560b87d2667 SHA512 3e69f102366ec3415f439ab81aae2458182fa1a18dfb86565b1d9dc638f3fc4c179a5947f0042b7c5a813345676285a662793664a1803ea9ad8328f0548e0edc
24 +DIST gnupg-2.2.21.tar.bz2 6813160 BLAKE2B b4708fd34c23dec8ec5be0740a502d155b649b4c88a89e5cc6f3cb99a15f7c6e31c50247ccacfedad55600dac3e7f91a8567424d335ab5e537082261dc98aceb SHA512 b4eac75253d4a1cac341c8a1ba7bb275e849a88d5377035497777c7bcd49b5a4c91b77000311695eb7d4083856975b2b2d14518f24ab94846027280bd8c301f9
25
26 diff --git a/app-crypt/gnupg/gnupg-2.2.21.ebuild b/app-crypt/gnupg/gnupg-2.2.21.ebuild
27 new file mode 100644
28 index 00000000000..69c3b392a83
29 --- /dev/null
30 +++ b/app-crypt/gnupg/gnupg-2.2.21.ebuild
31 @@ -0,0 +1,166 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit flag-o-matic systemd toolchain-funcs
38 +
39 +MY_P="${P/_/-}"
40 +
41 +DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
42 +HOMEPAGE="https://gnupg.org/"
43 +SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
44 +
45 +LICENSE="GPL-3"
46 +SLOT="0"
47 +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"
48 +IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server"
49 +
50 +# Existence of executables is checked during configuration.
51 +DEPEND="!app-crypt/dirmngr
52 + >=dev-libs/libassuan-2.5.0
53 + >=dev-libs/libgcrypt-1.7.3
54 + >=dev-libs/libgpg-error-1.28
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 + "${FILESDIR}/${PN}-2.2.20-fix-dirmngr-for-non-ipv6-enabled-hosts.patch"
86 +)
87 +
88 +src_prepare() {
89 + default
90 +
91 + # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
92 + # idea borrowed from libdbus, see
93 + # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
94 + #
95 + # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
96 + # which in turn requires discovery in Autoconf, something that upstream deeply resents.
97 + sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
98 + -i doc/examples/systemd-user/gpg-agent-ssh.socket || die
99 +}
100 +
101 +src_configure() {
102 + local myconf=()
103 +
104 + if use prefix && use usb; then
105 + # bug #649598
106 + append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0"
107 + fi
108 +
109 + if use elibc_SunOS || use elibc_AIX; then
110 + myconf+=( --disable-symcryptrun )
111 + else
112 + myconf+=( --enable-symcryptrun )
113 + fi
114 +
115 + #bug 663142
116 + if use user-socket; then
117 + myconf+=( --enable-run-gnupg-user-socket )
118 + fi
119 +
120 + # glib fails and picks up clang's internal stdint.h causing weird errors
121 + [[ ${CC} == *clang ]] && \
122 + export gl_cv_absolute_stdint_h=/usr/include/stdint.h
123 +
124 + # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
125 + # As of GnuPG 2.3, the mailprog substitution is used for the binary called
126 + # by wks-client & wks-server; and if it's autodetected but not not exist at
127 + # build time, then then 'gpg-wks-client --send' functionality will not
128 + # work. This has an unwanted side-effect in stage3 builds: there was a
129 + # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
130 + # the build where the install guide previously make the user chose the
131 + # logger & mta early in the install.
132 +
133 + econf \
134 + "${myconf[@]}" \
135 + $(use_enable bzip2) \
136 + $(use_enable nls) \
137 + $(use_enable smartcard scdaemon) \
138 + $(use_enable ssl gnutls) \
139 + $(use_enable tofu) \
140 + $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') \
141 + $(use_enable wks-server wks-tools) \
142 + $(use_with ldap) \
143 + $(use_with readline) \
144 + --with-mailprog=/usr/libexec/sendmail \
145 + --disable-ntbtls \
146 + --enable-all-tests \
147 + --enable-gpg \
148 + --enable-gpgsm \
149 + --enable-large-secmem \
150 + CC_FOR_BUILD="$(tc-getBUILD_CC)" \
151 + GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config" \
152 + KSBA_CONFIG="${EROOT}/usr/bin/ksba-config" \
153 + LIBASSUAN_CONFIG="${EROOT}/usr/bin/libassuan-config" \
154 + LIBGCRYPT_CONFIG="${EROOT}/usr/bin/${CHOST}-libgcrypt-config" \
155 + NPTH_CONFIG="${EROOT}/usr/bin/npth-config" \
156 + $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
157 +}
158 +
159 +src_compile() {
160 + default
161 +
162 + use doc && emake -C doc html
163 +}
164 +
165 +src_test() {
166 + #Bug: 638574
167 + use tofu && export TESTFLAGS=--parallel
168 + default
169 +}
170 +
171 +src_install() {
172 + default
173 +
174 + use tools &&
175 + dobin \
176 + tools/{convert-from-106,gpg-check-pattern} \
177 + tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
178 + tools/make-dns-cert
179 +
180 + dosym gpg /usr/bin/gpg2
181 + dosym gpgv /usr/bin/gpgv2
182 + echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
183 + echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
184 +
185 + dodir /etc/env.d
186 + echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
187 +
188 + use doc && dodoc doc/gnupg.html/* doc/*.png
189 +
190 + systemd_douserunit doc/examples/systemd-user/*.{service,socket}
191 +}
192 +
193 +pkg_postinst() {
194 + elog "See https://wiki.gentoo.org/wiki/GnuPG for documentation on gnupg"
195 + elog
196 + elog "If you wish to use 'gpg-wks-client --send', you must install an MTA!"
197 +}