Gentoo Archives: gentoo-commits

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