Gentoo Archives: gentoo-commits

From: Quentin Retornaz <gentoo@××××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/libressl:master commit in: app-crypt/mit-krb5/, app-crypt/mit-krb5/files/
Date: Wed, 23 Jun 2021 15:10:25
Message-Id: 1624460910.394c0a40c889721c0d8a2ff7c0c2187c09d2e007.quentin@gentoo
1 commit: 394c0a40c889721c0d8a2ff7c0c2187c09d2e007
2 Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
3 AuthorDate: Wed Jun 23 15:08:30 2021 +0000
4 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
5 CommitDate: Wed Jun 23 15:08:30 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=394c0a40
7
8 app-crypt/mit-krb5: revbump to 1.18.2-r4
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
12
13 .../files/mit-krb5-1.18.2-autoconf-2.70.patch | 35 +++++
14 .../files/mit-krb5-1.18.2-krb5-config.patch | 15 ++
15 app-crypt/mit-krb5/mit-krb5-1.18.2-r4.ebuild | 168 +++++++++++++++++++++
16 3 files changed, 218 insertions(+)
17
18 diff --git a/app-crypt/mit-krb5/files/mit-krb5-1.18.2-autoconf-2.70.patch b/app-crypt/mit-krb5/files/mit-krb5-1.18.2-autoconf-2.70.patch
19 new file mode 100644
20 index 0000000..6741c47
21 --- /dev/null
22 +++ b/app-crypt/mit-krb5/files/mit-krb5-1.18.2-autoconf-2.70.patch
23 @@ -0,0 +1,35 @@
24 +https://bugs.gentoo.org/778167
25 +
26 +From f78edbe30816f049e1360cb6e203fabfdf7b98df Mon Sep 17 00:00:00 2001
27 +From: Sergei Trofimovich <slyfox@g.o>
28 +Date: Fri, 6 Nov 2020 08:14:57 +0000
29 +Subject: [PATCH] Fix compatibility with upcoming autoconf 2.70
30 +
31 +Mainline autoconf generates no shell code for AC_CONFIG_AUX_DIR().
32 +Call it unconditionally to avoid a syntax error.
33 +
34 +[ghudson@×××.edu: rewrote commit message]
35 +
36 +ticket: 8960 (new)
37 +tags: pullup
38 +target_version: 1.18-next
39 +target_version: 1.17-next
40 +---
41 + src/aclocal.m4 | 6 +-----
42 + 1 file changed, 1 insertion(+), 5 deletions(-)
43 +
44 +--- src/aclocal.m4
45 ++++ src/aclocal.m4
46 +@@ -13,11 +13,7 @@ fi
47 + ac_topdir=$srcdir/$ac_reltopdir
48 + ac_config_fragdir=$ac_reltopdir/config
49 + # echo "Looking for $srcdir/$ac_config_fragdir"
50 +-if test -d "$srcdir/$ac_config_fragdir"; then
51 +- AC_CONFIG_AUX_DIR(K5_TOPDIR/config)
52 +-else
53 +- AC_MSG_ERROR([can not find config/ directory in $ac_reltopdir])
54 +-fi
55 ++AC_CONFIG_AUX_DIR(K5_TOPDIR/config)
56 + ])dnl
57 + dnl
58 + dnl Version info.
59
60 diff --git a/app-crypt/mit-krb5/files/mit-krb5-1.18.2-krb5-config.patch b/app-crypt/mit-krb5/files/mit-krb5-1.18.2-krb5-config.patch
61 new file mode 100644
62 index 0000000..ec901ce
63 --- /dev/null
64 +++ b/app-crypt/mit-krb5/files/mit-krb5-1.18.2-krb5-config.patch
65 @@ -0,0 +1,15 @@
66 +--- a/build-tools/krb5-config.in
67 ++++ b/build-tools/krb5-config.in
68 +@@ -208,12 +208,6 @@
69 +
70 +
71 + if test -n "$do_libs"; then
72 +- # Assumes /usr/lib is the standard library directory everywhere...
73 +- if test "$libdir" = /usr/lib; then
74 +- libdirarg=
75 +- else
76 +- libdirarg="-L$libdir"
77 +- fi
78 + # Ugly gross hack for our build tree
79 + lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
80 + -e 's/\$(PURE)//' \
81
82 diff --git a/app-crypt/mit-krb5/mit-krb5-1.18.2-r4.ebuild b/app-crypt/mit-krb5/mit-krb5-1.18.2-r4.ebuild
83 new file mode 100644
84 index 0000000..1f88d29
85 --- /dev/null
86 +++ b/app-crypt/mit-krb5/mit-krb5-1.18.2-r4.ebuild
87 @@ -0,0 +1,168 @@
88 +# Copyright 1999-2021 Gentoo Authors
89 +# Distributed under the terms of the GNU General Public License v2
90 +
91 +EAPI=7
92 +
93 +PYTHON_COMPAT=( python3_{7,8,9} )
94 +inherit autotools flag-o-matic multilib-minimal python-any-r1 systemd toolchain-funcs
95 +
96 +MY_P="${P/mit-}"
97 +P_DIR=$(ver_cut 1-2)
98 +DESCRIPTION="MIT Kerberos V"
99 +HOMEPAGE="https://web.mit.edu/kerberos/www/"
100 +SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
101 +
102 +LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
103 +SLOT="0"
104 +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
105 +IUSE="cpu_flags_x86_aes doc +keyutils lmdb nls openldap +pkinit selinux +threads test xinetd"
106 +
107 +# Test suite requires network access
108 +RESTRICT="test"
109 +
110 +DEPEND="
111 + !!app-crypt/heimdal
112 + >=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}]
113 + || (
114 + >=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}]
115 + >=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}]
116 + )
117 + keyutils? ( >=sys-apps/keyutils-1.5.8:=[${MULTILIB_USEDEP}] )
118 + lmdb? ( dev-db/lmdb )
119 + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
120 + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
121 + pkinit? (
122 + >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
123 + )
124 + xinetd? ( sys-apps/xinetd )
125 + "
126 +BDEPEND="
127 + ${PYTHON_DEPS}
128 + virtual/yacc
129 + cpu_flags_x86_aes? (
130 + amd64? ( dev-lang/yasm )
131 + x86? ( dev-lang/yasm )
132 + )
133 + doc? ( virtual/latex-base )
134 + test? (
135 + ${PYTHON_DEPS}
136 + dev-lang/tcl:0
137 + dev-util/dejagnu
138 + dev-util/cmocka
139 + )"
140 +RDEPEND="${DEPEND}
141 + selinux? ( sec-policy/selinux-kerberos )"
142 +
143 +S=${WORKDIR}/${MY_P}/src
144 +
145 +PATCHES=(
146 + "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
147 + "${FILESDIR}/${PN}-config_LDFLAGS-r1.patch"
148 + "${FILESDIR}/${PN}-1.16.3-libressl-r1.patch"
149 + "${FILESDIR}/${PN}_dont_create_run.patch"
150 + "${FILESDIR}/${PN}-1.18-libressl.patch"
151 + "${FILESDIR}/CVE-2020-28196.patch"
152 + "${FILESDIR}/${PN}-1.18.2-krb5-config.patch"
153 + "${FILESDIR}/${PN}-1.18.2-autoconf-2.70.patch"
154 +)
155 +
156 +MULTILIB_CHOST_TOOLS=(
157 + /usr/bin/krb5-config
158 +)
159 +
160 +src_prepare() {
161 + default
162 + # Make sure we always use the system copies.
163 + rm -rf util/{et,ss,verto}
164 + sed -i 's:^[[:space:]]*util/verto$::' configure.ac || die
165 +
166 + eautoreconf
167 +}
168 +
169 +src_configure() {
170 + # QA
171 + append-flags -fno-strict-aliasing
172 + append-flags -fno-strict-overflow
173 +
174 + multilib-minimal_src_configure
175 +}
176 +
177 +multilib_src_configure() {
178 + ECONF_SOURCE=${S} \
179 + WARN_CFLAGS="set" \
180 + econf \
181 + $(use_with openldap ldap) \
182 + "$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
183 + $(use_enable nls) \
184 + $(use_enable pkinit) \
185 + $(use_enable threads thread-support) \
186 + $(use_with lmdb) \
187 + $(use_with keyutils) \
188 + --without-hesiod \
189 + --enable-shared \
190 + --with-system-et \
191 + --with-system-ss \
192 + --enable-dns-for-realm \
193 + --enable-kdc-lookaside-cache \
194 + --with-system-verto \
195 + --disable-rpath \
196 + \
197 + AR="$(tc-getAR)"
198 +}
199 +
200 +multilib_src_compile() {
201 + emake -j1
202 +}
203 +
204 +multilib_src_test() {
205 + multilib_is_native_abi && emake -j1 check
206 +}
207 +
208 +multilib_src_install() {
209 + emake \
210 + DESTDIR="${D}" \
211 + EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \
212 + install
213 +}
214 +
215 +multilib_src_install_all() {
216 + # default database dir
217 + keepdir /var/lib/krb5kdc
218 +
219 + cd ..
220 + dodoc README
221 +
222 + if use doc; then
223 + dodoc -r doc/html
224 + docinto pdf
225 + dodoc doc/pdf/*.pdf
226 + fi
227 +
228 + newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind
229 + newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc
230 + newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd
231 + newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind
232 + newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc
233 + newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd
234 +
235 + systemd_newunit "${FILESDIR}"/mit-krb5kadmind.service mit-krb5kadmind.service
236 + systemd_newunit "${FILESDIR}"/mit-krb5kdc.service mit-krb5kdc.service
237 + systemd_newunit "${FILESDIR}"/mit-krb5kpropd.service mit-krb5kpropd.service
238 + systemd_newunit "${FILESDIR}"/mit-krb5kpropd_at.service "mit-krb5kpropd@.service"
239 + systemd_newunit "${FILESDIR}"/mit-krb5kpropd.socket mit-krb5kpropd.socket
240 +
241 + insinto /etc
242 + newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example
243 + insinto /var/lib/krb5kdc
244 + newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example
245 +
246 + if use openldap ; then
247 + insinto /etc/openldap/schema
248 + doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema"
249 + fi
250 +
251 + if use xinetd ; then
252 + insinto /etc/xinetd.d
253 + newins "${FILESDIR}/kpropd.xinetd" kpropd
254 + fi
255 +}