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: dev-libs/cyrus-sasl/files/, dev-libs/cyrus-sasl/
Date: Mon, 09 Sep 2019 09:33:15
Message-Id: 1568021587.1a2e6530f5a3c2ceb3aea515b6c00da0d91fb3b9.polynomial-c@gentoo
1 commit: 1a2e6530f5a3c2ceb3aea515b6c00da0d91fb3b9
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 9 09:32:54 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 9 09:33:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a2e6530
7
8 dev-libs/cyrus-sasl: Removed old
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 dev-libs/cyrus-sasl/Manifest | 1 -
14 dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild | 245 --------------
15 dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r12.ebuild | 260 ---------------
16 dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild | 260 ---------------
17 dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r9.ebuild | 242 --------------
18 dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r1.ebuild | 256 ---------------
19 ...us-sasl-2.1.23-gss_c_nt_hostbased_service.patch | 16 -
20 .../files/cyrus-sasl-2.1.25-as_needed.patch | 27 --
21 .../files/cyrus-sasl-2.1.25-autotools_fixes.patch | 114 -------
22 .../cyrus-sasl-2.1.25-avoid_pic_overwrite.patch | 27 --
23 .../files/cyrus-sasl-2.1.25-fix_heimdal.patch | 27 --
24 .../files/cyrus-sasl-2.1.25-missing_header.patch | 10 -
25 .../cyrus-sasl-2.1.25-saslauthd_libtool.patch | 12 -
26 .../files/cyrus-sasl-2.1.25-sasldb_al.patch | 14 -
27 .../files/cyrus-sasl-2.1.25-service_keytabs.patch | 27 --
28 .../files/cyrus-sasl-2.1.26-CVE-2013-4122.patch | 116 -------
29 ...26-canonuser-ldapdb-garbage-in-out-buffer.patch | 10 -
30 ...us-sasl-2.1.26-fix_dovecot_authentication.patch | 90 ------
31 .../files/cyrus-sasl-2.1.26-openssl-1.1.patch | 353 ---------------------
32 .../files/cyrus-sasl-2.1.26-send-imap-logout.patch | 48 ---
33 20 files changed, 2155 deletions(-)
34
35 diff --git a/dev-libs/cyrus-sasl/Manifest b/dev-libs/cyrus-sasl/Manifest
36 index 5a11cc2bfeb..843afea7db8 100644
37 --- a/dev-libs/cyrus-sasl/Manifest
38 +++ b/dev-libs/cyrus-sasl/Manifest
39 @@ -1,2 +1 @@
40 -DIST cyrus-sasl-2.1.26.tar.gz 5220231 BLAKE2B 08fe5c1624e7cccb4b5e562f6987fddd047e1221b671cedbbb684d5a2f39e09a438ad14ffcedb5f398c203ca0b6e23574106c87f43a632028d50a69619c54970 SHA512 78819cb9bb38bea4537d6770d309deeeef09ff44a67526177609d3e1257ff4334d2b5e5131d5a1e4dea7430d8db1918ea9d171f0dee38b5e8337f4b72ed068f0
41 DIST cyrus-sasl-2.1.27.tar.gz 4111249 BLAKE2B 82c9acce8534521ce5c5806f093e927f1854b4bc4b83ea7db1b32ceaa811adc1a5b6fc16d03233d729194cd603836f6e58de67f915abab2cb74561a80d03f5a8 SHA512 d11549a99b3b06af79fc62d5478dba3305d7e7cc0824f4b91f0d2638daafbe940623eab235f85af9be38dcf5d42fc131db531c177040a85187aee5096b8df63b
42
43 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild
44 deleted file mode 100644
45 index ab28a3dd43b..00000000000
46 --- a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r10.ebuild
47 +++ /dev/null
48 @@ -1,245 +0,0 @@
49 -# Copyright 1999-2018 Gentoo Authors
50 -# Distributed under the terms of the GNU General Public License v2
51 -
52 -EAPI=5
53 -
54 -inherit eutils flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd
55 -
56 -SASLAUTHD_CONF_VER="2.1.26"
57 -
58 -DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
59 -HOMEPAGE="https://www.cyrusimap.org/sasl/"
60 -SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
61 -
62 -LICENSE="BSD-with-attribution"
63 -SLOT="2"
64 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
65 -IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite
66 -srp ssl static-libs urandom"
67 -
68 -DEPEND="net-mail/mailbase
69 - authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
70 - berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
71 - gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
72 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
73 - openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
74 - mysql? ( virtual/mysql )
75 - pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
76 - postgres? ( dev-db/postgresql:= )
77 - sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
78 - ssl? (
79 - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
80 - libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
81 - )
82 - java? ( >=virtual/jdk-1.4:= )"
83 -RDEPEND="${DEPEND}
84 - selinux? ( sec-policy/selinux-sasl )"
85 -
86 -MULTILIB_WRAPPED_HEADERS=(
87 - /usr/include/sasl/md5global.h
88 -)
89 -
90 -pkg_setup() {
91 - java-pkg-opt-2_pkg_setup
92 -}
93 -
94 -src_prepare() {
95 - epatch "${FILESDIR}"/${PN}-2.1.25-sasldb_al.patch
96 - epatch "${FILESDIR}"/${PN}-2.1.25-saslauthd_libtool.patch
97 - epatch "${FILESDIR}"/${PN}-2.1.25-avoid_pic_overwrite.patch
98 - epatch "${FILESDIR}"/${PN}-2.1.25-autotools_fixes.patch
99 - epatch "${FILESDIR}"/${PN}-2.1.25-as_needed.patch
100 - epatch "${FILESDIR}"/${PN}-2.1.25-missing_header.patch
101 - epatch "${FILESDIR}"/${PN}-2.1.25-fix_heimdal.patch
102 - epatch "${FILESDIR}"/${PN}-2.1.25-auxprop.patch
103 - epatch "${FILESDIR}"/${PN}-2.1.23-gss_c_nt_hostbased_service.patch
104 - epatch "${FILESDIR}"/${PN}-2.1.25-service_keytabs.patch
105 - epatch "${FILESDIR}"/${PN}-2.1.26-missing-size_t.patch
106 - epatch "${FILESDIR}"/${PN}-2.1.26-CVE-2013-4122.patch
107 - epatch "${FILESDIR}"/${PN}-2.1.26-send-imap-logout.patch
108 - epatch "${FILESDIR}"/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch
109 - epatch "${FILESDIR}"/${PN}-2.1.26-fix_dovecot_authentication.patch
110 -
111 - # Get rid of the -R switch (runpath_switch for Sun)
112 - # >=gcc-4.6 errors out with unknown option
113 - sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
114 - configure.in || die
115 -
116 - # Use plugindir for sasldir
117 - sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
118 - "${S}"/plugins/Makefile.{am,in} || die "sed failed"
119 -
120 - # #486740 #468556
121 - sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
122 - -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
123 - configure.in || die
124 - sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
125 - saslauthd/configure.in || die
126 -
127 - eautoreconf
128 -}
129 -
130 -src_configure() {
131 - append-flags -fno-strict-aliasing
132 - append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
133 -
134 - multilib-minimal_src_configure
135 -}
136 -
137 -multilib_src_configure() {
138 - # Java support.
139 - multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
140 -
141 - local myconf=()
142 -
143 - # Add authdaemond support (bug #56523).
144 - if use authdaemond ; then
145 - myconf+=( --with-authdaemond=/var/lib/courier/authdaemon/socket )
146 - fi
147 -
148 - # Fix for bug #59634.
149 - if ! use ssl ; then
150 - myconf+=( --without-des )
151 - fi
152 -
153 - if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
154 - myconf+=( --enable-sql )
155 - else
156 - myconf+=( --disable-sql )
157 - fi
158 -
159 - # Default to GDBM if both 'gdbm' and 'berkdb' are present.
160 - if use gdbm ; then
161 - einfo "Building with GNU DB as database backend for your SASLdb"
162 - myconf+=( --with-dblib=gdbm )
163 - elif use berkdb ; then
164 - einfo "Building with BerkeleyDB as database backend for your SASLdb"
165 - myconf+=(
166 - --with-dblib=berkeley
167 - --with-bdb-incdir="$(db_includedir)"
168 - )
169 - else
170 - einfo "Building without SASLdb support"
171 - myconf+=( --with-dblib=none )
172 - fi
173 -
174 - # Use /dev/urandom instead of /dev/random (bug #46038).
175 - if use urandom ; then
176 - myconf+=( --with-devrandom=/dev/urandom )
177 - fi
178 -
179 - ECONF_SOURCE=${S} \
180 - econf \
181 - --enable-login \
182 - --enable-ntlm \
183 - --enable-auth-sasldb \
184 - --disable-cmulocal \
185 - --disable-krb4 \
186 - --enable-otp \
187 - --without-sqlite \
188 - --with-saslauthd=/run/saslauthd \
189 - --with-pwcheck=/run/saslauthd \
190 - --with-configdir=/etc/sasl2 \
191 - --with-plugindir=/usr/$(get_libdir)/sasl2 \
192 - --with-dbpath=/etc/sasl2/sasldb2 \
193 - $(use_with ssl openssl) \
194 - $(use_with pam) \
195 - $(use_with openldap ldap) \
196 - $(use_enable ldapdb) \
197 - $(multilib_native_use_enable sample) \
198 - $(use_enable kerberos gssapi) \
199 - $(multilib_native_use_enable java) \
200 - $(multilib_native_use_with java javahome ${JAVA_HOME}) \
201 - $(multilib_native_use_with mysql mysql /usr) \
202 - $(multilib_native_use_with postgres pgsql) \
203 - $(use_with sqlite sqlite3 /usr/$(get_libdir)) \
204 - $(use_enable srp) \
205 - $(use_enable static-libs static) \
206 - "${myconf[@]}"
207 -}
208 -
209 -multilib_src_compile() {
210 - emake
211 -
212 - # Default location for java classes breaks OpenOffice (bug #60769).
213 - # Thanks to axxo@g.o for the solution.
214 - if multilib_is_native_abi && use java ; then
215 - jar -cvf ${PN}.jar -C java $(find java -name "*.class")
216 - fi
217 -}
218 -
219 -multilib_src_install() {
220 - default
221 -
222 - if multilib_is_native_abi; then
223 - if use sample ; then
224 - docinto sample
225 - dodoc "${S}"/sample/*.c
226 - exeinto /usr/share/doc/${P}/sample
227 - doexe sample/client sample/server
228 - fi
229 -
230 - # Default location for java classes breaks OpenOffice (bug #60769).
231 - if use java ; then
232 - java-pkg_dojar ${PN}.jar
233 - java-pkg_regso "${D}/usr/$(get_libdir)/libjavasasl.so"
234 - # hackish, don't wanna dig through makefile
235 - rm -Rf "${D}/usr/$(get_libdir)/java"
236 - docinto "java"
237 - dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
238 - dodir "/usr/share/doc/${PF}/java/Test"
239 - insinto "/usr/share/doc/${PF}/java/Test"
240 - doins "${S}"/java/Test/*.java
241 - fi
242 -
243 - dosbin saslauthd/testsaslauthd
244 - fi
245 -}
246 -
247 -multilib_src_install_all() {
248 - keepdir /etc/sasl2
249 -
250 - dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
251 - newdoc pwcheck/README README.pwcheck
252 - dohtml doc/*.html
253 -
254 - docinto "saslauthd"
255 - dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
256 -
257 - newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
258 -
259 - newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
260 - systemd_dounit "${FILESDIR}/pwcheck.service"
261 -
262 - newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
263 - newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
264 - systemd_dounit "${FILESDIR}/saslauthd.service"
265 - systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
266 -
267 - prune_libtool_files --modules
268 -}
269 -
270 -pkg_postinst () {
271 - # Generate an empty sasldb2 with correct permissions.
272 - if ( use berkdb || use gdbm ) && [[ ! -f "${ROOT}/etc/sasl2/sasldb2" ]] ; then
273 - einfo "Generating an empty sasldb2 with correct permissions ..."
274 - echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login \
275 - || die "Failed to generate sasldb2"
276 - "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -d login \
277 - || die "Failed to delete temp user"
278 - chown root:mail "${ROOT}/etc/sasl2/sasldb2" \
279 - || die "Failed to chown ${ROOT}/etc/sasl2/sasldb2"
280 - chmod 0640 "${ROOT}/etc/sasl2/sasldb2" \
281 - || die "Failed to chmod ${ROOT}/etc/sasl2/sasldb2"
282 - fi
283 -
284 - if use authdaemond ; then
285 - elog "You need to add a user running a service using Courier's"
286 - elog "authdaemon to the 'mail' group. For example, do:"
287 - elog " gpasswd -a postfix mail"
288 - elog "to add the 'postfix' user to the 'mail' group."
289 - fi
290 -
291 - elog "pwcheck and saslauthd home directories have moved to:"
292 - elog " /run/saslauthd, using tmpfiles.d"
293 -}
294
295 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r12.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r12.ebuild
296 deleted file mode 100644
297 index fab53dab97e..00000000000
298 --- a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r12.ebuild
299 +++ /dev/null
300 @@ -1,260 +0,0 @@
301 -# Copyright 1999-2018 Gentoo Authors
302 -# Distributed under the terms of the GNU General Public License v2
303 -
304 -EAPI=6
305 -
306 -inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd
307 -
308 -SASLAUTHD_CONF_VER="2.1.26"
309 -
310 -DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
311 -HOMEPAGE="https://www.cyrusimap.org/sasl/"
312 -SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
313 -
314 -LICENSE="BSD-with-attribution"
315 -SLOT="2"
316 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
317 -IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite
318 -srp ssl static-libs urandom"
319 -
320 -DEPEND="
321 - net-mail/mailbase
322 - authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
323 - berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
324 - gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
325 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
326 - openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
327 - mysql? ( virtual/mysql )
328 - pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
329 - postgres? ( dev-db/postgresql:* )
330 - sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
331 - ssl? (
332 - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
333 - libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
334 - )
335 - java? ( >=virtual/jdk-1.6:= )"
336 -
337 -RDEPEND="
338 - ${DEPEND}
339 - selinux? ( sec-policy/selinux-sasl )"
340 -
341 -MULTILIB_WRAPPED_HEADERS=(
342 - /usr/include/sasl/md5global.h
343 -)
344 -
345 -PATCHES=(
346 - "${FILESDIR}/${PN}-2.1.25-sasldb_al.patch"
347 - "${FILESDIR}/${PN}-2.1.25-saslauthd_libtool.patch"
348 - "${FILESDIR}/${PN}-2.1.25-avoid_pic_overwrite.patch"
349 - "${FILESDIR}/${PN}-2.1.25-autotools_fixes.patch"
350 - "${FILESDIR}/${PN}-2.1.25-as_needed.patch"
351 - "${FILESDIR}/${PN}-2.1.25-missing_header.patch"
352 - "${FILESDIR}/${PN}-2.1.25-fix_heimdal.patch"
353 - "${FILESDIR}/${PN}-2.1.25-auxprop.patch"
354 - "${FILESDIR}/${PN}-2.1.23-gss_c_nt_hostbased_service.patch"
355 - "${FILESDIR}/${PN}-2.1.25-service_keytabs.patch"
356 - "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch"
357 - "${FILESDIR}/${PN}-2.1.26-CVE-2013-4122.patch"
358 - "${FILESDIR}/${PN}-2.1.26-send-imap-logout.patch"
359 - "${FILESDIR}/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch"
360 - "${FILESDIR}/${PN}-2.1.26-fix_dovecot_authentication.patch"
361 - "${FILESDIR}/${PN}-2.1.26-openssl-1.1.patch" #592528
362 -)
363 -
364 -pkg_setup() {
365 - java-pkg-opt-2_pkg_setup
366 -}
367 -
368 -src_prepare() {
369 - default
370 -
371 - # Get rid of the -R switch (runpath_switch for Sun)
372 - # >=gcc-4.6 errors out with unknown option
373 - sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
374 - configure.in || die
375 -
376 - # Use plugindir for sasldir
377 - sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
378 - "${S}"/plugins/Makefile.{am,in} || die "sed failed"
379 -
380 - # #486740 #468556
381 - sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
382 - -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
383 - configure.in || die
384 - sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
385 - saslauthd/configure.in || die
386 -
387 - eautoreconf
388 -}
389 -
390 -src_configure() {
391 - append-flags -fno-strict-aliasing
392 - if [[ ${CHOST} == *-solaris* ]] ; then
393 - # getpassphrase is defined in /usr/include/stdlib.h
394 - append-cppflags -DHAVE_GETPASSPHRASE
395 - else
396 - # this horrendously breaks things on Solaris
397 - append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
398 - fi
399 -
400 - multilib-minimal_src_configure
401 -}
402 -
403 -multilib_src_configure() {
404 - # Java support.
405 - multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
406 -
407 - local myeconfargs=(
408 - --enable-login
409 - --enable-ntlm
410 - --enable-auth-sasldb
411 - --disable-cmulocal
412 - --disable-krb4
413 - --disable-macos-framework
414 - --enable-otp
415 - --without-sqlite
416 - --with-saslauthd="${EPREFIX}"/run/saslauthd
417 - --with-pwcheck="${EPREFIX}"/run/saslauthd
418 - --with-configdir="${EPREFIX}"/etc/sasl2
419 - --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2
420 - --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2
421 - $(use_with ssl openssl)
422 - $(use_with pam)
423 - $(use_with openldap ldap)
424 - $(use_enable ldapdb)
425 - $(multilib_native_use_enable sample)
426 - $(use_enable kerberos gssapi)
427 - $(multilib_native_use_enable java)
428 - $(multilib_native_use_with java javahome ${JAVA_HOME})
429 - $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr)
430 - $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql)
431 - $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir))
432 - $(use_enable srp)
433 - $(use_enable static-libs static)
434 -
435 - # Add authdaemond support (bug #56523).
436 - $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '')
437 -
438 - # Fix for bug #59634.
439 - $(usex ssl '' --without-des)
440 -
441 - # Use /dev/urandom instead of /dev/random (bug #46038).
442 - $(usex urandom --with-devrandom=/dev/urandom '')
443 - )
444 -
445 - if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
446 - myeconfargs+=( --enable-sql )
447 - else
448 - myeconfargs+=( --disable-sql )
449 - fi
450 -
451 - # Default to GDBM if both 'gdbm' and 'berkdb' are present.
452 - if use gdbm ; then
453 - einfo "Building with GNU DB as database backend for your SASLdb"
454 - myeconfargs+=( --with-dblib=gdbm )
455 - elif use berkdb ; then
456 - einfo "Building with BerkeleyDB as database backend for your SASLdb"
457 - myeconfargs+=(
458 - --with-dblib=berkeley
459 - --with-bdb-incdir="$(db_includedir)"
460 - )
461 - else
462 - einfo "Building without SASLdb support"
463 - myeconfargs+=( --with-dblib=none )
464 - fi
465 -
466 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
467 -}
468 -
469 -multilib_src_compile() {
470 - emake
471 -
472 - # Default location for java classes breaks OpenOffice (bug #60769).
473 - # Thanks to axxo@g.o for the solution.
474 - if multilib_is_native_abi && use java ; then
475 - jar -cvf ${PN}.jar -C java $(find java -name "*.class")
476 - fi
477 -}
478 -
479 -multilib_src_install() {
480 - default
481 -
482 - if multilib_is_native_abi; then
483 - if use sample ; then
484 - docinto sample
485 - dodoc "${S}"/sample/*.c
486 - exeinto /usr/share/doc/${P}/sample
487 - doexe sample/client sample/server
488 - fi
489 -
490 - # Default location for java classes breaks OpenOffice (bug #60769).
491 - if use java; then
492 - java-pkg_dojar ${PN}.jar
493 - java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)"
494 - # hackish, don't wanna dig through makefile
495 - rm -rf "${ED}/usr/$(get_libdir)/java" || die
496 - docinto "java"
497 - dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
498 - dodir "/usr/share/doc/${PF}/java/Test"
499 - insinto "/usr/share/doc/${PF}/java/Test"
500 - doins "${S}"/java/Test/*.java
501 - fi
502 -
503 - dosbin saslauthd/testsaslauthd
504 - fi
505 -}
506 -
507 -multilib_src_install_all() {
508 - keepdir /etc/sasl2
509 -
510 - dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
511 - newdoc pwcheck/README README.pwcheck
512 -
513 - docinto html
514 - dodoc doc/*.html
515 -
516 - docinto "saslauthd"
517 - dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
518 -
519 - newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
520 -
521 - newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
522 - systemd_dounit "${FILESDIR}/pwcheck.service"
523 -
524 - newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
525 - newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
526 - systemd_dounit "${FILESDIR}/saslauthd.service"
527 - systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
528 -
529 - # The get_modname bit is important: do not remove the .la files on
530 - # platforms where the lib isn't called .so for cyrus searches the .la to
531 - # figure out what the name is supposed to be instead
532 - if ! use static-libs && [[ $(get_modname) == .so ]] ; then
533 - find "${ED}" -name "*.la" -delete || die
534 - fi
535 -}
536 -
537 -pkg_postinst () {
538 - # Generate an empty sasldb2 with correct permissions.
539 - if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then
540 - einfo "Generating an empty sasldb2 with correct permissions ..."
541 - echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \
542 - || die "Failed to generate sasldb2"
543 - "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \
544 - || die "Failed to delete temp user"
545 - chown root:mail "${EROOT}/etc/sasl2/sasldb2" \
546 - || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2"
547 - chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \
548 - || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2"
549 - fi
550 -
551 - if use authdaemond ; then
552 - elog "You need to add a user running a service using Courier's"
553 - elog "authdaemon to the 'mail' group. For example, do:"
554 - elog " gpasswd -a postfix mail"
555 - elog "to add the 'postfix' user to the 'mail' group."
556 - fi
557 -
558 - elog "pwcheck and saslauthd home directories have moved to:"
559 - elog " /run/saslauthd, using tmpfiles.d"
560 -}
561
562 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild
563 deleted file mode 100644
564 index fd823635a6a..00000000000
565 --- a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild
566 +++ /dev/null
567 @@ -1,260 +0,0 @@
568 -# Copyright 1999-2019 Gentoo Authors
569 -# Distributed under the terms of the GNU General Public License v2
570 -
571 -EAPI=6
572 -
573 -inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd
574 -
575 -SASLAUTHD_CONF_VER="2.1.26"
576 -
577 -DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
578 -HOMEPAGE="https://www.cyrusimap.org/sasl/"
579 -SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
580 -
581 -LICENSE="BSD-with-attribution"
582 -SLOT="2"
583 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
584 -IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite
585 -srp ssl static-libs urandom"
586 -
587 -DEPEND="
588 - net-mail/mailbase
589 - authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
590 - berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
591 - gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
592 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
593 - openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
594 - mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] )
595 - pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
596 - postgres? ( dev-db/postgresql:* )
597 - sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
598 - ssl? (
599 - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
600 - libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
601 - )
602 - java? ( >=virtual/jdk-1.6:= )"
603 -
604 -RDEPEND="
605 - ${DEPEND}
606 - selinux? ( sec-policy/selinux-sasl )"
607 -
608 -MULTILIB_WRAPPED_HEADERS=(
609 - /usr/include/sasl/md5global.h
610 -)
611 -
612 -PATCHES=(
613 - "${FILESDIR}/${PN}-2.1.25-sasldb_al.patch"
614 - "${FILESDIR}/${PN}-2.1.25-saslauthd_libtool.patch"
615 - "${FILESDIR}/${PN}-2.1.25-avoid_pic_overwrite.patch"
616 - "${FILESDIR}/${PN}-2.1.25-autotools_fixes.patch"
617 - "${FILESDIR}/${PN}-2.1.25-as_needed.patch"
618 - "${FILESDIR}/${PN}-2.1.25-missing_header.patch"
619 - "${FILESDIR}/${PN}-2.1.25-fix_heimdal.patch"
620 - "${FILESDIR}/${PN}-2.1.25-auxprop.patch"
621 - "${FILESDIR}/${PN}-2.1.23-gss_c_nt_hostbased_service.patch"
622 - "${FILESDIR}/${PN}-2.1.25-service_keytabs.patch"
623 - "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch"
624 - "${FILESDIR}/${PN}-2.1.26-CVE-2013-4122.patch"
625 - "${FILESDIR}/${PN}-2.1.26-send-imap-logout.patch"
626 - "${FILESDIR}/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch"
627 - "${FILESDIR}/${PN}-2.1.26-fix_dovecot_authentication.patch"
628 - "${FILESDIR}/${PN}-2.1.26-openssl-1.1.patch" #592528
629 -)
630 -
631 -pkg_setup() {
632 - java-pkg-opt-2_pkg_setup
633 -}
634 -
635 -src_prepare() {
636 - default
637 -
638 - # Get rid of the -R switch (runpath_switch for Sun)
639 - # >=gcc-4.6 errors out with unknown option
640 - sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
641 - configure.in || die
642 -
643 - # Use plugindir for sasldir
644 - sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
645 - "${S}"/plugins/Makefile.{am,in} || die "sed failed"
646 -
647 - # #486740 #468556
648 - sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
649 - -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
650 - configure.in || die
651 - sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
652 - saslauthd/configure.in || die
653 -
654 - eautoreconf
655 -}
656 -
657 -src_configure() {
658 - append-flags -fno-strict-aliasing
659 - if [[ ${CHOST} == *-solaris* ]] ; then
660 - # getpassphrase is defined in /usr/include/stdlib.h
661 - append-cppflags -DHAVE_GETPASSPHRASE
662 - else
663 - # this horrendously breaks things on Solaris
664 - append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
665 - fi
666 -
667 - multilib-minimal_src_configure
668 -}
669 -
670 -multilib_src_configure() {
671 - # Java support.
672 - multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
673 -
674 - local myeconfargs=(
675 - --enable-login
676 - --enable-ntlm
677 - --enable-auth-sasldb
678 - --disable-cmulocal
679 - --disable-krb4
680 - --disable-macos-framework
681 - --enable-otp
682 - --without-sqlite
683 - --with-saslauthd="${EPREFIX}"/run/saslauthd
684 - --with-pwcheck="${EPREFIX}"/run/saslauthd
685 - --with-configdir="${EPREFIX}"/etc/sasl2
686 - --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2
687 - --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2
688 - $(use_with ssl openssl)
689 - $(use_with pam)
690 - $(use_with openldap ldap)
691 - $(use_enable ldapdb)
692 - $(multilib_native_use_enable sample)
693 - $(use_enable kerberos gssapi)
694 - $(multilib_native_use_enable java)
695 - $(multilib_native_use_with java javahome ${JAVA_HOME})
696 - $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr)
697 - $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql)
698 - $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir))
699 - $(use_enable srp)
700 - $(use_enable static-libs static)
701 -
702 - # Add authdaemond support (bug #56523).
703 - $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '')
704 -
705 - # Fix for bug #59634.
706 - $(usex ssl '' --without-des)
707 -
708 - # Use /dev/urandom instead of /dev/random (bug #46038).
709 - $(usex urandom --with-devrandom=/dev/urandom '')
710 - )
711 -
712 - if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
713 - myeconfargs+=( --enable-sql )
714 - else
715 - myeconfargs+=( --disable-sql )
716 - fi
717 -
718 - # Default to GDBM if both 'gdbm' and 'berkdb' are present.
719 - if use gdbm ; then
720 - einfo "Building with GNU DB as database backend for your SASLdb"
721 - myeconfargs+=( --with-dblib=gdbm )
722 - elif use berkdb ; then
723 - einfo "Building with BerkeleyDB as database backend for your SASLdb"
724 - myeconfargs+=(
725 - --with-dblib=berkeley
726 - --with-bdb-incdir="$(db_includedir)"
727 - )
728 - else
729 - einfo "Building without SASLdb support"
730 - myeconfargs+=( --with-dblib=none )
731 - fi
732 -
733 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
734 -}
735 -
736 -multilib_src_compile() {
737 - emake
738 -
739 - # Default location for java classes breaks OpenOffice (bug #60769).
740 - # Thanks to axxo@g.o for the solution.
741 - if multilib_is_native_abi && use java ; then
742 - jar -cvf ${PN}.jar -C java $(find java -name "*.class")
743 - fi
744 -}
745 -
746 -multilib_src_install() {
747 - default
748 -
749 - if multilib_is_native_abi; then
750 - if use sample ; then
751 - docinto sample
752 - dodoc "${S}"/sample/*.c
753 - exeinto /usr/share/doc/${P}/sample
754 - doexe sample/client sample/server
755 - fi
756 -
757 - # Default location for java classes breaks OpenOffice (bug #60769).
758 - if use java; then
759 - java-pkg_dojar ${PN}.jar
760 - java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)"
761 - # hackish, don't wanna dig through makefile
762 - rm -rf "${ED}/usr/$(get_libdir)/java" || die
763 - docinto "java"
764 - dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
765 - dodir "/usr/share/doc/${PF}/java/Test"
766 - insinto "/usr/share/doc/${PF}/java/Test"
767 - doins "${S}"/java/Test/*.java
768 - fi
769 -
770 - dosbin saslauthd/testsaslauthd
771 - fi
772 -}
773 -
774 -multilib_src_install_all() {
775 - keepdir /etc/sasl2
776 -
777 - dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
778 - newdoc pwcheck/README README.pwcheck
779 -
780 - docinto html
781 - dodoc doc/*.html
782 -
783 - docinto "saslauthd"
784 - dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
785 -
786 - newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
787 -
788 - newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
789 - systemd_dounit "${FILESDIR}/pwcheck.service"
790 -
791 - newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
792 - newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
793 - systemd_dounit "${FILESDIR}/saslauthd.service"
794 - systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
795 -
796 - # The get_modname bit is important: do not remove the .la files on
797 - # platforms where the lib isn't called .so for cyrus searches the .la to
798 - # figure out what the name is supposed to be instead
799 - if ! use static-libs && [[ $(get_modname) == .so ]] ; then
800 - find "${ED}" -name "*.la" -delete || die
801 - fi
802 -}
803 -
804 -pkg_postinst () {
805 - # Generate an empty sasldb2 with correct permissions.
806 - if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then
807 - einfo "Generating an empty sasldb2 with correct permissions ..."
808 - echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \
809 - || die "Failed to generate sasldb2"
810 - "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \
811 - || die "Failed to delete temp user"
812 - chown root:mail "${EROOT}/etc/sasl2/sasldb2" \
813 - || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2"
814 - chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \
815 - || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2"
816 - fi
817 -
818 - if use authdaemond ; then
819 - elog "You need to add a user running a service using Courier's"
820 - elog "authdaemon to the 'mail' group. For example, do:"
821 - elog " gpasswd -a postfix mail"
822 - elog "to add the 'postfix' user to the 'mail' group."
823 - fi
824 -
825 - elog "pwcheck and saslauthd home directories have moved to:"
826 - elog " /run/saslauthd, using tmpfiles.d"
827 -}
828
829 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r9.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r9.ebuild
830 deleted file mode 100644
831 index 023e07bfe40..00000000000
832 --- a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r9.ebuild
833 +++ /dev/null
834 @@ -1,242 +0,0 @@
835 -# Copyright 1999-2018 Gentoo Foundation
836 -# Distributed under the terms of the GNU General Public License v2
837 -
838 -EAPI=5
839 -
840 -inherit eutils flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd
841 -
842 -SASLAUTHD_CONF_VER="2.1.26"
843 -
844 -DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
845 -HOMEPAGE="https://www.cyrusimap.org/sasl/"
846 -SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
847 -
848 -LICENSE="BSD-with-attribution"
849 -SLOT="2"
850 -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
851 -IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite
852 -srp ssl static-libs urandom"
853 -
854 -DEPEND="net-mail/mailbase
855 - authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
856 - berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
857 - gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
858 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
859 - openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
860 - mysql? ( virtual/mysql )
861 - pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
862 - postgres? ( dev-db/postgresql:= )
863 - sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
864 - ssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
865 - java? ( >=virtual/jdk-1.4:= )"
866 -RDEPEND="${DEPEND}
867 - selinux? ( sec-policy/selinux-sasl )"
868 -
869 -MULTILIB_WRAPPED_HEADERS=(
870 - /usr/include/sasl/md5global.h
871 -)
872 -
873 -pkg_setup() {
874 - java-pkg-opt-2_pkg_setup
875 -}
876 -
877 -src_prepare() {
878 - epatch "${FILESDIR}"/${PN}-2.1.25-sasldb_al.patch
879 - epatch "${FILESDIR}"/${PN}-2.1.25-saslauthd_libtool.patch
880 - epatch "${FILESDIR}"/${PN}-2.1.25-avoid_pic_overwrite.patch
881 - epatch "${FILESDIR}"/${PN}-2.1.25-autotools_fixes.patch
882 - epatch "${FILESDIR}"/${PN}-2.1.25-as_needed.patch
883 - epatch "${FILESDIR}"/${PN}-2.1.25-missing_header.patch
884 - epatch "${FILESDIR}"/${PN}-2.1.25-fix_heimdal.patch
885 - epatch "${FILESDIR}"/${PN}-2.1.25-auxprop.patch
886 - epatch "${FILESDIR}"/${PN}-2.1.23-gss_c_nt_hostbased_service.patch
887 - epatch "${FILESDIR}"/${PN}-2.1.25-service_keytabs.patch
888 - epatch "${FILESDIR}"/${PN}-2.1.26-missing-size_t.patch
889 - epatch "${FILESDIR}"/${PN}-2.1.26-CVE-2013-4122.patch
890 - epatch "${FILESDIR}"/${PN}-2.1.26-send-imap-logout.patch
891 - epatch "${FILESDIR}"/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch
892 - epatch "${FILESDIR}"/${PN}-2.1.26-fix_dovecot_authentication.patch
893 -
894 - # Get rid of the -R switch (runpath_switch for Sun)
895 - # >=gcc-4.6 errors out with unknown option
896 - sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
897 - configure.in || die
898 -
899 - # Use plugindir for sasldir
900 - sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
901 - "${S}"/plugins/Makefile.{am,in} || die "sed failed"
902 -
903 - # #486740 #468556
904 - sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
905 - -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
906 - configure.in || die
907 - sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
908 - saslauthd/configure.in || die
909 -
910 - eautoreconf
911 -}
912 -
913 -src_configure() {
914 - append-flags -fno-strict-aliasing
915 - append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
916 -
917 - multilib-minimal_src_configure
918 -}
919 -
920 -multilib_src_configure() {
921 - # Java support.
922 - multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
923 -
924 - local myconf=()
925 -
926 - # Add authdaemond support (bug #56523).
927 - if use authdaemond ; then
928 - myconf+=( --with-authdaemond=/var/lib/courier/authdaemon/socket )
929 - fi
930 -
931 - # Fix for bug #59634.
932 - if ! use ssl ; then
933 - myconf+=( --without-des )
934 - fi
935 -
936 - if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
937 - myconf+=( --enable-sql )
938 - else
939 - myconf+=( --disable-sql )
940 - fi
941 -
942 - # Default to GDBM if both 'gdbm' and 'berkdb' are present.
943 - if use gdbm ; then
944 - einfo "Building with GNU DB as database backend for your SASLdb"
945 - myconf+=( --with-dblib=gdbm )
946 - elif use berkdb ; then
947 - einfo "Building with BerkeleyDB as database backend for your SASLdb"
948 - myconf+=(
949 - --with-dblib=berkeley
950 - --with-bdb-incdir="$(db_includedir)"
951 - )
952 - else
953 - einfo "Building without SASLdb support"
954 - myconf+=( --with-dblib=none )
955 - fi
956 -
957 - # Use /dev/urandom instead of /dev/random (bug #46038).
958 - if use urandom ; then
959 - myconf+=( --with-devrandom=/dev/urandom )
960 - fi
961 -
962 - ECONF_SOURCE=${S} \
963 - econf \
964 - --enable-login \
965 - --enable-ntlm \
966 - --enable-auth-sasldb \
967 - --disable-cmulocal \
968 - --disable-krb4 \
969 - --enable-otp \
970 - --without-sqlite \
971 - --with-saslauthd=/run/saslauthd \
972 - --with-pwcheck=/run/saslauthd \
973 - --with-configdir=/etc/sasl2 \
974 - --with-plugindir=/usr/$(get_libdir)/sasl2 \
975 - --with-dbpath=/etc/sasl2/sasldb2 \
976 - $(use_with ssl openssl) \
977 - $(use_with pam) \
978 - $(use_with openldap ldap) \
979 - $(use_enable ldapdb) \
980 - $(multilib_native_use_enable sample) \
981 - $(use_enable kerberos gssapi) \
982 - $(multilib_native_use_enable java) \
983 - $(multilib_native_use_with java javahome ${JAVA_HOME}) \
984 - $(multilib_native_use_with mysql mysql /usr) \
985 - $(multilib_native_use_with postgres pgsql) \
986 - $(use_with sqlite sqlite3 /usr/$(get_libdir)) \
987 - $(use_enable srp) \
988 - $(use_enable static-libs static) \
989 - "${myconf[@]}"
990 -}
991 -
992 -multilib_src_compile() {
993 - emake
994 -
995 - # Default location for java classes breaks OpenOffice (bug #60769).
996 - # Thanks to axxo@g.o for the solution.
997 - if multilib_is_native_abi && use java ; then
998 - jar -cvf ${PN}.jar -C java $(find java -name "*.class")
999 - fi
1000 -}
1001 -
1002 -multilib_src_install() {
1003 - default
1004 -
1005 - if multilib_is_native_abi; then
1006 - if use sample ; then
1007 - docinto sample
1008 - dodoc "${S}"/sample/*.c
1009 - exeinto /usr/share/doc/${P}/sample
1010 - doexe sample/client sample/server
1011 - fi
1012 -
1013 - # Default location for java classes breaks OpenOffice (bug #60769).
1014 - if use java ; then
1015 - java-pkg_dojar ${PN}.jar
1016 - java-pkg_regso "${D}/usr/$(get_libdir)/libjavasasl.so"
1017 - # hackish, don't wanna dig through makefile
1018 - rm -Rf "${D}/usr/$(get_libdir)/java"
1019 - docinto "java"
1020 - dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
1021 - dodir "/usr/share/doc/${PF}/java/Test"
1022 - insinto "/usr/share/doc/${PF}/java/Test"
1023 - doins "${S}"/java/Test/*.java
1024 - fi
1025 -
1026 - dosbin saslauthd/testsaslauthd
1027 - fi
1028 -}
1029 -
1030 -multilib_src_install_all() {
1031 - keepdir /etc/sasl2
1032 -
1033 - dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
1034 - newdoc pwcheck/README README.pwcheck
1035 - dohtml doc/*.html
1036 -
1037 - docinto "saslauthd"
1038 - dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
1039 -
1040 - newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
1041 -
1042 - newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
1043 - systemd_dounit "${FILESDIR}/pwcheck.service"
1044 -
1045 - newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
1046 - newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
1047 - systemd_dounit "${FILESDIR}/saslauthd.service"
1048 - systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
1049 -
1050 - prune_libtool_files --modules
1051 -}
1052 -
1053 -pkg_postinst () {
1054 - # Generate an empty sasldb2 with correct permissions.
1055 - if ( use berkdb || use gdbm ) && [[ ! -f "${ROOT}/etc/sasl2/sasldb2" ]] ; then
1056 - einfo "Generating an empty sasldb2 with correct permissions ..."
1057 - echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login \
1058 - || die "Failed to generate sasldb2"
1059 - "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -d login \
1060 - || die "Failed to delete temp user"
1061 - chown root:mail "${ROOT}/etc/sasl2/sasldb2" \
1062 - || die "Failed to chown ${ROOT}/etc/sasl2/sasldb2"
1063 - chmod 0640 "${ROOT}/etc/sasl2/sasldb2" \
1064 - || die "Failed to chmod ${ROOT}/etc/sasl2/sasldb2"
1065 - fi
1066 -
1067 - if use authdaemond ; then
1068 - elog "You need to add a user running a service using Courier's"
1069 - elog "authdaemon to the 'mail' group. For example, do:"
1070 - elog " gpasswd -a postfix mail"
1071 - elog "to add the 'postfix' user to the 'mail' group."
1072 - fi
1073 -
1074 - elog "pwcheck and saslauthd home directories have moved to:"
1075 - elog " /run/saslauthd, using tmpfiles.d"
1076 -}
1077
1078 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r1.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r1.ebuild
1079 deleted file mode 100644
1080 index 1b0e7ee417d..00000000000
1081 --- a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r1.ebuild
1082 +++ /dev/null
1083 @@ -1,256 +0,0 @@
1084 -# Copyright 1999-2019 Gentoo Authors
1085 -# Distributed under the terms of the GNU General Public License v2
1086 -
1087 -EAPI=6
1088 -
1089 -inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd eapi7-ver
1090 -
1091 -SASLAUTHD_CONF_VER="2.1.26"
1092 -
1093 -DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
1094 -HOMEPAGE="https://www.cyrusimap.org/sasl/"
1095 -#SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
1096 -SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz"
1097 -
1098 -LICENSE="BSD-with-attribution"
1099 -SLOT="2"
1100 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
1101 -IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom"
1102 -
1103 -CDEPEND="
1104 - net-mail/mailbase
1105 - authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
1106 - berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
1107 - gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
1108 - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
1109 - openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
1110 - mysql? ( virtual/mysql )
1111 - pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
1112 - postgres? ( dev-db/postgresql:* )
1113 - sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
1114 - ssl? (
1115 - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
1116 - libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
1117 - )
1118 - java? ( >=virtual/jdk-1.6:= )"
1119 -
1120 -RDEPEND="
1121 - ${CDEPEND}
1122 - selinux? ( sec-policy/selinux-sasl )"
1123 -
1124 -DEPEND="${CDEPEND}"
1125 -
1126 -MULTILIB_WRAPPED_HEADERS=(
1127 - /usr/include/sasl/md5global.h
1128 -)
1129 -
1130 -PATCHES=(
1131 - "${FILESDIR}/${PN}-2.1.27-avoid_pic_overwrite.patch"
1132 - "${FILESDIR}/${PN}-2.1.27-autotools_fixes.patch"
1133 - "${FILESDIR}/${PN}-2.1.27-as_needed.patch"
1134 - "${FILESDIR}/${PN}-2.1.25-auxprop.patch"
1135 - "${FILESDIR}/${PN}-2.1.27-gss_c_nt_hostbased_service.patch"
1136 - "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch"
1137 - "${FILESDIR}/${PN}-2.1.27-doc_build_fix.patch"
1138 - "${FILESDIR}/${PN}-2.1.27-memmem.patch"
1139 -)
1140 -
1141 -pkg_setup() {
1142 - java-pkg-opt-2_pkg_setup
1143 -}
1144 -
1145 -src_prepare() {
1146 - default
1147 -
1148 - # Get rid of the -R switch (runpath_switch for Sun)
1149 - # >=gcc-4.6 errors out with unknown option
1150 - sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
1151 - configure.ac || die
1152 -
1153 - # Use plugindir for sasldir
1154 - sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
1155 - "${S}"/plugins/Makefile.{am,in} || die "sed failed"
1156 -
1157 - # #486740 #468556
1158 - sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
1159 - -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
1160 - configure.ac || die
1161 -
1162 - eautoreconf
1163 -}
1164 -
1165 -src_configure() {
1166 - append-flags -fno-strict-aliasing
1167 - if [[ ${CHOST} == *-solaris* ]] ; then
1168 - # getpassphrase is defined in /usr/include/stdlib.h
1169 - append-cppflags -DHAVE_GETPASSPHRASE
1170 - else
1171 - # this horrendously breaks things on Solaris
1172 - append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
1173 - fi
1174 -
1175 - multilib-minimal_src_configure
1176 -}
1177 -
1178 -multilib_src_configure() {
1179 - # Java support.
1180 - multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
1181 -
1182 - local myeconfargs=(
1183 - --enable-login
1184 - --enable-ntlm
1185 - --enable-auth-sasldb
1186 - --disable-cmulocal
1187 - --disable-krb4
1188 - --disable-macos-framework
1189 - --enable-otp
1190 - --without-sqlite
1191 - --with-saslauthd="${EPREFIX}"/run/saslauthd
1192 - --with-pwcheck="${EPREFIX}"/run/saslauthd
1193 - --with-configdir="${EPREFIX}"/etc/sasl2
1194 - --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2
1195 - --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2
1196 - --with-sphinx-build=no
1197 - $(use_with ssl openssl)
1198 - $(use_with pam)
1199 - $(use_with openldap ldap)
1200 - $(use_enable ldapdb)
1201 - $(multilib_native_use_enable sample)
1202 - $(use_enable kerberos gssapi)
1203 - $(multilib_native_use_enable java)
1204 - $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr)
1205 - $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql)
1206 - $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir))
1207 - $(use_enable srp)
1208 - $(use_enable static-libs static)
1209 -
1210 - # Add authdaemond support (bug #56523).
1211 - $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '')
1212 -
1213 - # Fix for bug #59634.
1214 - $(usex ssl '' --without-des)
1215 -
1216 - # Use /dev/urandom instead of /dev/random (bug #46038).
1217 - $(usex urandom --with-devrandom=/dev/urandom '')
1218 - )
1219 -
1220 - if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
1221 - myeconfargs+=( --enable-sql )
1222 - else
1223 - myeconfargs+=( --disable-sql )
1224 - fi
1225 -
1226 - # Default to GDBM if both 'gdbm' and 'berkdb' are present.
1227 - if use gdbm ; then
1228 - einfo "Building with GNU DB as database backend for your SASLdb"
1229 - myeconfargs+=( --with-dblib=gdbm )
1230 - elif use berkdb ; then
1231 - einfo "Building with BerkeleyDB as database backend for your SASLdb"
1232 - myeconfargs+=(
1233 - --with-dblib=berkeley
1234 - --with-bdb-incdir="$(db_includedir)"
1235 - )
1236 - else
1237 - einfo "Building without SASLdb support"
1238 - myeconfargs+=( --with-dblib=none )
1239 - fi
1240 -
1241 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
1242 -}
1243 -
1244 -multilib_src_compile() {
1245 - emake
1246 -
1247 - # Default location for java classes breaks OpenOffice (bug #60769).
1248 - # Thanks to axxo@g.o for the solution.
1249 - if multilib_is_native_abi && use java ; then
1250 - jar -cvf ${PN}.jar -C java $(find java -name "*.class")
1251 - fi
1252 -}
1253 -
1254 -multilib_src_install() {
1255 - default
1256 -
1257 - if multilib_is_native_abi; then
1258 - if use sample ; then
1259 - docinto sample
1260 - dodoc "${S}"/sample/*.c
1261 - exeinto /usr/share/doc/${P}/sample
1262 - doexe sample/client sample/server
1263 - fi
1264 -
1265 - # Default location for java classes breaks OpenOffice (bug #60769).
1266 - if use java; then
1267 - java-pkg_dojar ${PN}.jar
1268 - java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)"
1269 - # hackish, don't wanna dig through makefile
1270 - rm -rf "${ED}/usr/$(get_libdir)/java" || die
1271 - docinto "java"
1272 - dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
1273 - dodir "/usr/share/doc/${PF}/java/Test"
1274 - insinto "/usr/share/doc/${PF}/java/Test"
1275 - doins "${S}"/java/Test/*.java
1276 - fi
1277 -
1278 - dosbin saslauthd/testsaslauthd
1279 - fi
1280 -}
1281 -
1282 -multilib_src_install_all() {
1283 - doman man/*
1284 -
1285 - keepdir /etc/sasl2
1286 -
1287 - # Reset docinto to default value (#674296)
1288 - docinto
1289 - dodoc AUTHORS ChangeLog doc/legacy/TODO
1290 - newdoc pwcheck/README README.pwcheck
1291 -
1292 - newdoc docsrc/sasl/release-notes/$(ver_cut 1-2)/index.rst release-notes
1293 - edos2unix ${ED%/}/usr/share/doc/${PF}/release-notes
1294 -
1295 - docinto html
1296 - dodoc doc/html/*.html
1297 -
1298 - newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
1299 -
1300 - newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
1301 - systemd_dounit "${FILESDIR}/pwcheck.service"
1302 -
1303 - newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
1304 - newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
1305 - systemd_dounit "${FILESDIR}/saslauthd.service"
1306 - systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
1307 -
1308 - # The get_modname bit is important: do not remove the .la files on
1309 - # platforms where the lib isn't called .so for cyrus searches the .la to
1310 - # figure out what the name is supposed to be instead
1311 - if ! use static-libs && [[ $(get_modname) == .so ]] ; then
1312 - find "${ED}" -name "*.la" -delete || die
1313 - fi
1314 -}
1315 -
1316 -pkg_postinst () {
1317 - # Generate an empty sasldb2 with correct permissions.
1318 - if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then
1319 - einfo "Generating an empty sasldb2 with correct permissions ..."
1320 - echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \
1321 - || die "Failed to generate sasldb2"
1322 - "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \
1323 - || die "Failed to delete temp user"
1324 - chown root:mail "${EROOT}/etc/sasl2/sasldb2" \
1325 - || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2"
1326 - chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \
1327 - || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2"
1328 - fi
1329 -
1330 - if use authdaemond ; then
1331 - elog "You need to add a user running a service using Courier's"
1332 - elog "authdaemon to the 'mail' group. For example, do:"
1333 - elog " gpasswd -a postfix mail"
1334 - elog "to add the 'postfix' user to the 'mail' group."
1335 - fi
1336 -
1337 - elog "pwcheck and saslauthd home directories have moved to:"
1338 - elog " /run/saslauthd, using tmpfiles.d"
1339 -}
1340
1341 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.23-gss_c_nt_hostbased_service.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.23-gss_c_nt_hostbased_service.patch
1342 deleted file mode 100644
1343 index beea8eb28d1..00000000000
1344 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.23-gss_c_nt_hostbased_service.patch
1345 +++ /dev/null
1346 @@ -1,16 +0,0 @@
1347 -Gentoo bug #389349
1348 ---- a/cmulocal/sasl2.m4
1349 -+++ b/cmulocal/sasl2.m4
1350 -@@ -217,7 +217,11 @@
1351 - [AC_WARN([Cybersafe define not found])])
1352 -
1353 - elif test "$ac_cv_header_gssapi_h" = "yes"; then
1354 -- AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h,
1355 -+ AC_EGREP_CPP(hostbased_service_gss_nt_yes, gssapi.h,
1356 -+ [#include <gssapi.h>
1357 -+ #ifdef GSS_C_NT_HOSTBASED_SERVICE
1358 -+ hostbased_service_gss_nt_yes
1359 -+ #endif],
1360 - [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
1361 - [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
1362 - elif test "$ac_cv_header_gssapi_gssapi_h"; then
1363
1364 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-as_needed.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-as_needed.patch
1365 deleted file mode 100644
1366 index 67b48b4a499..00000000000
1367 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-as_needed.patch
1368 +++ /dev/null
1369 @@ -1,27 +0,0 @@
1370 -Author: Matthias Klose <doko@××××××.com>
1371 -Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use
1372 -it.
1373 ---- a/saslauthd/Makefile.am
1374 -+++ b/saslauthd/Makefile.am
1375 -@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c
1376 - saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
1377 - saslauthd_LDADD = @SASL_KRB_LIB@ \
1378 - @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
1379 -- @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
1380 -+ @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
1381 -
1382 - testsaslauthd_SOURCES = testsaslauthd.c utils.c
1383 - testsaslauthd_LDADD = @LIB_SOCKET@
1384 ---- a/sasldb/Makefile.am
1385 -+++ b/sasldb/Makefile.am
1386 -@@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a
1387 -
1388 - libsasldb_la_SOURCES = allockey.c sasldb.h
1389 - EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
1390 --libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
1391 --libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
1392 -+libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) $(SASL_DB_LIB)
1393 -+libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB)
1394 -
1395 - # Prevent make dist stupidity
1396 - libsasldb_a_SOURCES =
1397
1398 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-autotools_fixes.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-autotools_fixes.patch
1399 deleted file mode 100644
1400 index 5837921d4f7..00000000000
1401 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-autotools_fixes.patch
1402 +++ /dev/null
1403 @@ -1,114 +0,0 @@
1404 ---- a/configure.in
1405 -+++ b/configure.in
1406 -@@ -44,6 +44,8 @@ dnl
1407 - AC_INIT(lib/saslint.h)
1408 - AC_PREREQ([2.54])
1409 -
1410 -+AC_CONFIG_MACRO_DIR([cmulocal] [config])
1411 -+
1412 - dnl use ./config.cache as the default cache file.
1413 - dnl we require a cache file to successfully configure our build.
1414 - if test $cache_file = "/dev/null"; then
1415 ---- a/Makefile.am
1416 -+++ b/Makefile.am
1417 -@@ -43,6 +43,8 @@ AUTOMAKE_OPTIONS = 1.7
1418 - #
1419 - ################################################################
1420 -
1421 -+ACLOCAL_AMFLAGS = -I cmulocal -I config
1422 -+
1423 - if SASLAUTHD
1424 - SAD = saslauthd
1425 - else
1426 ---- a/saslauthd/configure.in
1427 -+++ b/saslauthd/configure.in
1428 -@@ -1,7 +1,8 @@
1429 - AC_INIT(mechanisms.h)
1430 - AC_PREREQ([2.54])
1431 -
1432 --AC_CONFIG_AUX_DIR(config)
1433 -+AC_CONFIG_MACRO_DIR([../cmulocal] [../config])
1434 -+AC_CONFIG_AUX_DIR([config])
1435 - AC_CANONICAL_HOST
1436 -
1437 - dnl Should we enable SASLAUTHd at all?
1438 -@@ -164,30 +165,30 @@ AC_SUBST(LTLIBOBJS)
1439 -
1440 - dnl Checks for which function macros exist
1441 - AC_MSG_CHECKING(whether $CC implements __func__)
1442 --AC_CACHE_VAL(have_func,
1443 -+AC_CACHE_VAL(_cv_have_func,
1444 - [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __func__);],
1445 --have_func=yes,
1446 --have_func=no)])
1447 --AC_MSG_RESULT($have_func)
1448 --if test "$have_func" = yes; then
1449 -+_cv_have_func=yes,
1450 -+_cv_have_func=no)])
1451 -+AC_MSG_RESULT($_cv_have_func)
1452 -+if test "$_cv_have_func" = yes; then
1453 - AC_DEFINE(HAVE_FUNC,[],[Does the compiler understand __func__])
1454 - else
1455 - AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
1456 -- AC_CACHE_VAL(have_pretty_function,
1457 -+ AC_CACHE_VAL(_cv_have_pretty_function,
1458 - [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __PRETTY_FUNCTION__);],
1459 -- have_pretty_function=yes,
1460 -- have_pretty_function=no)])
1461 -- AC_MSG_RESULT($have_pretty_function)
1462 -- if test "$have_pretty_function" = yes; then
1463 -+ _cv_have_pretty_function=yes,
1464 -+ _cv_have_pretty_function=no)])
1465 -+ AC_MSG_RESULT($_cv_have_pretty_function)
1466 -+ if test "$_cv_have_pretty_function" = yes; then
1467 - AC_DEFINE(HAVE_PRETTY_FUNCTION,[],[Does compiler understand __PRETTY_FUNCTION__])
1468 - else
1469 - AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
1470 -- AC_CACHE_VAL(have_function,
1471 -+ AC_CACHE_VAL(_cv_have_function,
1472 - [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __FUNCTION__);],
1473 -- have_function=yes,
1474 -- have_function=no)])
1475 -- AC_MSG_RESULT($have_function)
1476 -- if test "$have_function" = yes; then
1477 -+ _cv_have_function=yes,
1478 -+ _cv_have_function=no)])
1479 -+ AC_MSG_RESULT($_cv_have_function)
1480 -+ if test "$_cv_have_function" = yes; then
1481 - AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__])
1482 - fi
1483 - fi
1484 ---- a/saslauthd/Makefile.am
1485 -+++ b/saslauthd/Makefile.am
1486 -@@ -1,4 +1,6 @@
1487 - AUTOMAKE_OPTIONS = 1.7
1488 -+ACLOCAL_AMFLAGS = -I ../cmulocal -I ../config
1489 -+
1490 - sbin_PROGRAMS = saslauthd testsaslauthd
1491 - EXTRA_PROGRAMS = saslcache
1492 -
1493 ---- a/config/kerberos_v4.m4
1494 -+++ b/config/kerberos_v4.m4
1495 -@@ -89,18 +89,18 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [
1496 - dnl if we were ambitious, we would look more aggressively for the
1497 - dnl krb4 install
1498 - if test -d ${krb4}; then
1499 -- AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
1500 -+ AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [
1501 - for krbhloc in include/kerberosIV include/kerberos include
1502 - do
1503 - if test -f ${krb4}/${krbhloc}/krb.h ; then
1504 -- cyrus_krbinclude=${krb4}/${krbhloc}
1505 -+ cyrus_cv_krbinclude=${krb4}/${krbhloc}
1506 - break
1507 - fi
1508 - done
1509 - ])
1510 -
1511 -- if test -n "${cyrus_krbinclude}"; then
1512 -- CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
1513 -+ if test -n "${cyrus_cv_krbinclude}"; then
1514 -+ CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}"
1515 - fi
1516 - LDFLAGS="$LDFLAGS -L$krb4/lib"
1517 - fi
1518
1519 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-avoid_pic_overwrite.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-avoid_pic_overwrite.patch
1520 deleted file mode 100644
1521 index 2e5b1750d00..00000000000
1522 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-avoid_pic_overwrite.patch
1523 +++ /dev/null
1524 @@ -1,27 +0,0 @@
1525 -Author: Fabian Fagerholm <fabbe@××××××.org>
1526 -Description: This patch makes sure the non-PIC version of libsasldb.a, which
1527 -is created out of non-PIC objects, is not going to overwrite the PIC version,
1528 -which is created out of PIC objects. The PIC version is placed in .libs, and
1529 -the non-PIC version in the current directory. This ensures that both non-PIC
1530 -and PIC versions are available in the correct locations.
1531 ---- a/lib/Makefile.am
1532 -+++ b/lib/Makefile.am
1533 -@@ -78,7 +78,7 @@ endif
1534 -
1535 - libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
1536 - @echo adding static plugins and dependencies
1537 -- $(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
1538 -+ $(AR) cru $@ $(SASL_STATIC_OBJS)
1539 - @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
1540 - if test ! -f $$i; then continue; fi; . $$i; \
1541 - for j in $$dependency_libs foo; do \
1542 ---- a/sasldb/Makefile.am
1543 -+++ b/sasldb/Makefile.am
1544 -@@ -63,6 +63,6 @@ libsasldb_a_SOURCES =
1545 - EXTRA_libsasldb_a_SOURCES =
1546 -
1547 - libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
1548 -- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
1549 -+ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC)
1550 -
1551 -
1552
1553 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-fix_heimdal.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-fix_heimdal.patch
1554 deleted file mode 100644
1555 index 92be2600348..00000000000
1556 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-fix_heimdal.patch
1557 +++ /dev/null
1558 @@ -1,27 +0,0 @@
1559 -Fix compiling against heimdal
1560 -
1561 ---- a/sample/server.c
1562 -+++ b/sample/server.c
1563 -@@ -85,8 +85,10 @@
1564 -
1565 - #ifdef HAVE_GSS_GET_NAME_ATTRIBUTE
1566 - #include <gssapi/gssapi.h>
1567 -+#ifndef KRB5_HEIMDAL
1568 - #include <gssapi/gssapi_ext.h>
1569 - #endif
1570 -+#endif
1571 -
1572 - #include "common.h"
1573 -
1574 ---- a/plugins/gssapi.c
1575 -+++ b/plugins/gssapi.c
1576 -@@ -50,6 +50,9 @@
1577 - #else
1578 - #include <gssapi/gssapi.h>
1579 - #endif
1580 -+#ifdef KRB5_HEIMDAL
1581 -+#include <gssapi/gssapi_krb5.h>
1582 -+#endif
1583 -
1584 - #ifdef WIN32
1585 - # include <winsock2.h>
1586
1587 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-missing_header.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-missing_header.patch
1588 deleted file mode 100644
1589 index a413e00bf42..00000000000
1590 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-missing_header.patch
1591 +++ /dev/null
1592 @@ -1,10 +0,0 @@
1593 ---- a/pwcheck/pwcheck_getspnam.c
1594 -+++ b/pwcheck/pwcheck_getspnam.c
1595 -@@ -24,6 +24,7 @@
1596 - ******************************************************************/
1597 -
1598 - #include <shadow.h>
1599 -+#include <string.h>
1600 -
1601 - extern char *crypt();
1602 -
1603
1604 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-saslauthd_libtool.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-saslauthd_libtool.patch
1605 deleted file mode 100644
1606 index da1a49f1dd6..00000000000
1607 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-saslauthd_libtool.patch
1608 +++ /dev/null
1609 @@ -1,12 +0,0 @@
1610 -Author: Fabian Fagerholm <fabbe@××××××.org>
1611 -Description: Enable libtool use.
1612 ---- a/saslauthd/configure.in
1613 -+++ b/saslauthd/configure.in
1614 -@@ -25,6 +25,7 @@ AC_PROG_AWK
1615 - AC_PROG_MAKE_SET
1616 - AC_PROG_LN_S
1617 - AC_PROG_INSTALL
1618 -+AC_PROG_LIBTOOL
1619 -
1620 - dnl Checks for build foo
1621 - CMU_C___ATTRIBUTE__
1622
1623 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-sasldb_al.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-sasldb_al.patch
1624 deleted file mode 100644
1625 index 8eff5a8bdd1..00000000000
1626 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-sasldb_al.patch
1627 +++ /dev/null
1628 @@ -1,14 +0,0 @@
1629 -Author: Fabian Fagerholm <fabbe@××××××.org>
1630 -Description: Fix linking with libsasldb.a when saslauthd is built with sasldb
1631 -support.
1632 ---- a/saslauthd/configure.in
1633 -+++ b/saslauthd/configure.in
1634 -@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then
1635 - AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
1636 - SASL_DB_PATH_CHECK()
1637 - SASL_DB_CHECK()
1638 -- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
1639 -+ SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a"
1640 - fi
1641 -
1642 - AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ],
1643
1644 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-service_keytabs.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-service_keytabs.patch
1645 deleted file mode 100644
1646 index 43b6162a66f..00000000000
1647 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-service_keytabs.patch
1648 +++ /dev/null
1649 @@ -1,27 +0,0 @@
1650 -Bug #445932
1651 ---- a/cmulocal/sasl2.m4
1652 -+++ b/cmulocal/sasl2.m4
1653 -@@ -268,7 +268,11 @@
1654 -
1655 - cmu_save_LIBS="$LIBS"
1656 - LIBS="$LIBS $GSSAPIBASE_LIBS"
1657 -- AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
1658 -+ AC_CHECK_FUNCS([gsskrb5_register_acceptor_identity], [],
1659 -+ [AC_CHECK_FUNCS([krb5_gss_register_acceptor_identity],
1660 -+ [AC_CHECK_HEADERS([gssapi/gssapi_krb5.h],
1661 -+ [AC_DEFINE([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [1])]
1662 -+ )])])
1663 - AC_CHECK_FUNCS(gss_decapsulate_token)
1664 - AC_CHECK_FUNCS(gss_encapsulate_token)
1665 - AC_CHECK_FUNCS(gss_oid_equal)
1666 ---- a/plugins/gssapi.c
1667 -+++ b/plugins/gssapi.c
1668 -@@ -50,7 +50,7 @@
1669 - #else
1670 - #include <gssapi/gssapi.h>
1671 - #endif
1672 --#ifdef KRB5_HEIMDAL
1673 -+#if defined (KRB5_HEIMDAL) || defined (HAVE_GSSAPI_GSSAPI_KRB5_H)
1674 - #include <gssapi/gssapi_krb5.h>
1675 - #endif
1676 -
1677
1678 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-CVE-2013-4122.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-CVE-2013-4122.patch
1679 deleted file mode 100644
1680 index 09c9ce86c9a..00000000000
1681 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-CVE-2013-4122.patch
1682 +++ /dev/null
1683 @@ -1,116 +0,0 @@
1684 -From dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d Mon Sep 17 00:00:00 2001
1685 -From: mancha <mancha1@××××.com>
1686 -Date: Thu, 11 Jul 2013 09:08:07 +0000
1687 -Subject: Handle NULL returns from glibc 2.17+ crypt()
1688 -
1689 -Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL
1690 -(w/ NULL return) if the salt violates specifications. Additionally,
1691 -on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords
1692 -passed to crypt() fail with EPERM (w/ NULL return).
1693 -
1694 -When using glibc's crypt(), check return value to avoid a possible
1695 -NULL pointer dereference.
1696 -
1697 -Patch by mancha1@××××.com.
1698 ----
1699 -diff --git a/pwcheck/pwcheck_getpwnam.c b/pwcheck/pwcheck_getpwnam.c
1700 -index 4b34222..400289c 100644
1701 ---- a/pwcheck/pwcheck_getpwnam.c
1702 -+++ b/pwcheck/pwcheck_getpwnam.c
1703 -@@ -32,6 +32,7 @@ char *userid;
1704 - char *password;
1705 - {
1706 - char* r;
1707 -+ char* crpt_passwd;
1708 - struct passwd *pwd;
1709 -
1710 - pwd = getpwnam(userid);
1711 -@@ -41,7 +42,7 @@ char *password;
1712 - else if (pwd->pw_passwd[0] == '*') {
1713 - r = "Account disabled";
1714 - }
1715 -- else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) != 0) {
1716 -+ else if (!(crpt_passwd = crypt(password, pwd->pw_passwd)) || strcmp(pwd->pw_passwd, (const char *)crpt_passwd) != 0) {
1717 - r = "Incorrect password";
1718 - }
1719 - else {
1720 -diff --git a/pwcheck/pwcheck_getspnam.c b/pwcheck/pwcheck_getspnam.c
1721 -index 2b11286..6d607bb 100644
1722 ---- a/pwcheck/pwcheck_getspnam.c
1723 -+++ b/pwcheck/pwcheck_getspnam.c
1724 -@@ -32,13 +32,15 @@ char *userid;
1725 - char *password;
1726 - {
1727 - struct spwd *pwd;
1728 -+ char *crpt_passwd;
1729 -
1730 - pwd = getspnam(userid);
1731 - if (!pwd) {
1732 - return "Userid not found";
1733 - }
1734 -
1735 -- if (strcmp(pwd->sp_pwdp, crypt(password, pwd->sp_pwdp)) != 0) {
1736 -+ crpt_passwd = crypt(password, pwd->sp_pwdp);
1737 -+ if (!crpt_passwd || strcmp(pwd->sp_pwdp, (const char *)crpt_passwd) != 0) {
1738 - return "Incorrect password";
1739 - }
1740 - else {
1741 -diff --git a/saslauthd/auth_getpwent.c b/saslauthd/auth_getpwent.c
1742 -index fc8029d..d4ebe54 100644
1743 ---- a/saslauthd/auth_getpwent.c
1744 -+++ b/saslauthd/auth_getpwent.c
1745 -@@ -77,6 +77,7 @@ auth_getpwent (
1746 - {
1747 - /* VARIABLES */
1748 - struct passwd *pw; /* pointer to passwd file entry */
1749 -+ char *crpt_passwd; /* encrypted password */
1750 - int errnum;
1751 - /* END VARIABLES */
1752 -
1753 -@@ -105,7 +106,8 @@ auth_getpwent (
1754 - }
1755 - }
1756 -
1757 -- if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) {
1758 -+ crpt_passwd = crypt(password, pw->pw_passwd);
1759 -+ if (!crpt_passwd || strcmp(pw->pw_passwd, (const char *)crpt_passwd)) {
1760 - if (flags & VERBOSE) {
1761 - syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login);
1762 - }
1763 -diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c
1764 -index 677131b..1988afd 100644
1765 ---- a/saslauthd/auth_shadow.c
1766 -+++ b/saslauthd/auth_shadow.c
1767 -@@ -210,8 +210,8 @@ auth_shadow (
1768 - RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)");
1769 - }
1770 -
1771 -- cpw = strdup((const char *)crypt(password, sp->sp_pwdp));
1772 -- if (strcmp(sp->sp_pwdp, cpw)) {
1773 -+ cpw = crypt(password, sp->sp_pwdp);
1774 -+ if (!cpw || strcmp(sp->sp_pwdp, (const char *)cpw)) {
1775 - if (flags & VERBOSE) {
1776 - /*
1777 - * This _should_ reveal the SHADOW_PW_LOCKED prefix to an
1778 -@@ -221,10 +221,8 @@ auth_shadow (
1779 - syslog(LOG_DEBUG, "DEBUG: auth_shadow: pw mismatch: '%s' != '%s'",
1780 - sp->sp_pwdp, cpw);
1781 - }
1782 -- free(cpw);
1783 - RETURN("NO Incorrect password");
1784 - }
1785 -- free(cpw);
1786 -
1787 - /*
1788 - * The following fields will be set to -1 if:
1789 -@@ -286,7 +284,7 @@ auth_shadow (
1790 - RETURN("NO Invalid username");
1791 - }
1792 -
1793 -- if (strcmp(upw->upw_passwd, crypt(password, upw->upw_passwd)) != 0) {
1794 -+ if (!(cpw = crypt(password, upw->upw_passwd)) || (strcmp(upw->upw_passwd, (const char *)cpw) != 0)) {
1795 - if (flags & VERBOSE) {
1796 - syslog(LOG_DEBUG, "auth_shadow: pw mismatch: %s != %s",
1797 - password, upw->upw_passwd);
1798 ---
1799 -cgit v0.9.0.2
1800
1801 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch
1802 deleted file mode 100644
1803 index af382181e04..00000000000
1804 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch
1805 +++ /dev/null
1806 @@ -1,10 +0,0 @@
1807 ---- cyrus-sasl2.orig/plugins/ldapdb.c
1808 -+++ cyrus-sasl2/plugins/ldapdb.c
1809 -@@ -406,6 +406,7 @@ ldapdb_canon_server(void *glob_context,
1810 - if ( len > out_max )
1811 - len = out_max;
1812 - memcpy(out, bvals[0]->bv_val, len);
1813 -+ out[len] = '\0';
1814 - *out_ulen = len;
1815 - ber_bvecfree(bvals);
1816 - }
1817
1818 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch
1819 deleted file mode 100644
1820 index 6fc9de80287..00000000000
1821 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-fix_dovecot_authentication.patch
1822 +++ /dev/null
1823 @@ -1,90 +0,0 @@
1824 -Bug #510320
1825 ---- a/saslauthd/auth_rimap.c
1826 -+++ b/saslauthd/auth_rimap.c
1827 -@@ -371,7 +371,7 @@
1828 - if ( rc>0 ) {
1829 - /* check if there is more to read */
1830 - fd_set perm;
1831 -- int fds, ret;
1832 -+ int fds, ret, loopc;
1833 - struct timeval timeout;
1834 -
1835 - FD_ZERO(&perm);
1836 -@@ -380,6 +380,7 @@
1837 -
1838 - timeout.tv_sec = 1;
1839 - timeout.tv_usec = 0;
1840 -+ loopc = 0;
1841 - while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
1842 - if ( FD_ISSET(s, &perm) ) {
1843 - ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
1844 -@@ -387,6 +388,14 @@
1845 - rc = ret;
1846 - break;
1847 - } else {
1848 -+ if (ret == 0) {
1849 -+ loopc += 1;
1850 -+ } else {
1851 -+ loopc = 0;
1852 -+ }
1853 -+ if (loopc > sizeof(rbuf)) { // arbitrary chosen value
1854 -+ break;
1855 -+ }
1856 - rc += ret;
1857 - }
1858 - }
1859 -@@ -484,7 +493,7 @@
1860 - if ( rc>0 ) {
1861 - /* check if there is more to read */
1862 - fd_set perm;
1863 -- int fds, ret;
1864 -+ int fds, ret, loopc;
1865 - struct timeval timeout;
1866 -
1867 - FD_ZERO(&perm);
1868 -@@ -493,6 +502,7 @@
1869 -
1870 - timeout.tv_sec = 1;
1871 - timeout.tv_usec = 0;
1872 -+ loopc = 0;
1873 - while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
1874 - if ( FD_ISSET(s, &perm) ) {
1875 - ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
1876 -@@ -500,6 +510,14 @@
1877 - rc = ret;
1878 - break;
1879 - } else {
1880 -+ if (ret == 0) {
1881 -+ loopc += 1;
1882 -+ } else {
1883 -+ loopc = 0;
1884 -+ }
1885 -+ if (loopc > sizeof(rbuf)) { // arbitrary chosen value
1886 -+ break;
1887 -+ }
1888 - rc += ret;
1889 - }
1890 - }
1891 ---- a/lib/checkpw.c
1892 -+++ b/lib/checkpw.c
1893 -@@ -587,16 +587,14 @@
1894 - /* Timeout. */
1895 - errno = ETIMEDOUT;
1896 - return -1;
1897 -- case +1:
1898 -- if (FD_ISSET(fd, &rfds)) {
1899 -- /* Success, file descriptor is readable. */
1900 -- return 0;
1901 -- }
1902 -- return -1;
1903 - case -1:
1904 - if (errno == EINTR || errno == EAGAIN)
1905 - continue;
1906 - default:
1907 -+ if (FD_ISSET(fd, &rfds)) {
1908 -+ /* Success, file descriptor is readable. */
1909 -+ return 0;
1910 -+ }
1911 - /* Error catch-all. */
1912 - return -1;
1913 - }
1914
1915 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-openssl-1.1.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-openssl-1.1.patch
1916 deleted file mode 100644
1917 index 3b0ffac24f0..00000000000
1918 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-openssl-1.1.patch
1919 +++ /dev/null
1920 @@ -1,353 +0,0 @@
1921 -diff --git a/plugins/ntlm.c b/plugins/ntlm.c
1922 -index 79ea47c..554a00d 100644
1923 ---- a/plugins/ntlm.c
1924 -+++ b/plugins/ntlm.c
1925 -@@ -417,6 +417,29 @@ static unsigned char *P24(unsigned char *P24, unsigned char *P21,
1926 - return P24;
1927 - }
1928 -
1929 -+static HMAC_CTX *_plug_HMAC_CTX_new(const sasl_utils_t *utils)
1930 -+{
1931 -+ utils->log(NULL, SASL_LOG_DEBUG, "_plug_HMAC_CTX_new()");
1932 -+
1933 -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
1934 -+ return HMAC_CTX_new();
1935 -+#else
1936 -+ return utils->malloc(sizeof(EVP_MD_CTX));
1937 -+#endif
1938 -+}
1939 -+
1940 -+static void _plug_HMAC_CTX_free(HMAC_CTX *ctx, const sasl_utils_t *utils)
1941 -+{
1942 -+ utils->log(NULL, SASL_LOG_DEBUG, "_plug_HMAC_CTX_free()");
1943 -+
1944 -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
1945 -+ HMAC_CTX_free(ctx);
1946 -+#else
1947 -+ HMAC_cleanup(ctx);
1948 -+ utils->free(ctx);
1949 -+#endif
1950 -+}
1951 -+
1952 - static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
1953 - const char *authid, const char *target,
1954 - const unsigned char *challenge,
1955 -@@ -424,7 +447,7 @@ static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
1956 - const sasl_utils_t *utils,
1957 - char **buf, unsigned *buflen, int *result)
1958 - {
1959 -- HMAC_CTX ctx;
1960 -+ HMAC_CTX *ctx = NULL;
1961 - unsigned char hash[EVP_MAX_MD_SIZE];
1962 - char *upper;
1963 - unsigned int len;
1964 -@@ -435,6 +458,10 @@ static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
1965 - SETERROR(utils, "cannot allocate NTLMv2 hash");
1966 - *result = SASL_NOMEM;
1967 - }
1968 -+ else if ((ctx = _plug_HMAC_CTX_new(utils)) == NULL) {
1969 -+ SETERROR(utils, "cannot allocate HMAC CTX");
1970 -+ *result = SASL_NOMEM;
1971 -+ }
1972 - else {
1973 - /* NTLMv2hash = HMAC-MD5(NTLMhash, unicode(ucase(authid + domain))) */
1974 - P16_nt(hash, passwd, utils, buf, buflen, result);
1975 -@@ -449,17 +476,18 @@ static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
1976 - HMAC(EVP_md5(), hash, MD4_DIGEST_LENGTH, *buf, 2 * len, hash, &len);
1977 -
1978 - /* V2 = HMAC-MD5(NTLMv2hash, challenge + blob) + blob */
1979 -- HMAC_Init(&ctx, hash, len, EVP_md5());
1980 -- HMAC_Update(&ctx, challenge, NTLM_NONCE_LENGTH);
1981 -- HMAC_Update(&ctx, blob, bloblen);
1982 -- HMAC_Final(&ctx, V2, &len);
1983 -- HMAC_cleanup(&ctx);
1984 -+ HMAC_Init_ex(ctx, hash, len, EVP_md5(), NULL);
1985 -+ HMAC_Update(ctx, challenge, NTLM_NONCE_LENGTH);
1986 -+ HMAC_Update(ctx, blob, bloblen);
1987 -+ HMAC_Final(ctx, V2, &len);
1988 -
1989 - /* the blob is concatenated outside of this function */
1990 -
1991 - *result = SASL_OK;
1992 - }
1993 -
1994 -+ if (ctx) _plug_HMAC_CTX_free(ctx, utils);
1995 -+
1996 - return V2;
1997 - }
1998 -
1999 -diff --git a/plugins/otp.c b/plugins/otp.c
2000 -index dd73065..d1e9bf4 100644
2001 ---- a/plugins/otp.c
2002 -+++ b/plugins/otp.c
2003 -@@ -96,6 +96,28 @@ static algorithm_option_t algorithm_options[] = {
2004 - {NULL, 0, NULL}
2005 - };
2006 -
2007 -+static EVP_MD_CTX *_plug_EVP_MD_CTX_new(const sasl_utils_t *utils)
2008 -+{
2009 -+ utils->log(NULL, SASL_LOG_DEBUG, "_plug_EVP_MD_CTX_new()");
2010 -+
2011 -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
2012 -+ return EVP_MD_CTX_new();
2013 -+#else
2014 -+ return utils->malloc(sizeof(EVP_MD_CTX));
2015 -+#endif
2016 -+}
2017 -+
2018 -+static void _plug_EVP_MD_CTX_free(EVP_MD_CTX *ctx, const sasl_utils_t *utils)
2019 -+{
2020 -+ utils->log(NULL, SASL_LOG_DEBUG, "_plug_EVP_MD_CTX_free()");
2021 -+
2022 -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
2023 -+ EVP_MD_CTX_free(ctx);
2024 -+#else
2025 -+ utils->free(ctx);
2026 -+#endif
2027 -+}
2028 -+
2029 - /* Convert the binary data into ASCII hex */
2030 - void bin2hex(unsigned char *bin, int binlen, char *hex)
2031 - {
2032 -@@ -116,17 +138,16 @@ void bin2hex(unsigned char *bin, int binlen, char *hex)
2033 - * swabbing bytes if necessary.
2034 - */
2035 - static void otp_hash(const EVP_MD *md, char *in, size_t inlen,
2036 -- unsigned char *out, int swab)
2037 -+ unsigned char *out, int swab, EVP_MD_CTX *mdctx)
2038 - {
2039 -- EVP_MD_CTX mdctx;
2040 - char hash[EVP_MAX_MD_SIZE];
2041 - unsigned int i;
2042 - int j;
2043 - unsigned hashlen;
2044 -
2045 -- EVP_DigestInit(&mdctx, md);
2046 -- EVP_DigestUpdate(&mdctx, in, inlen);
2047 -- EVP_DigestFinal(&mdctx, hash, &hashlen);
2048 -+ EVP_DigestInit(mdctx, md);
2049 -+ EVP_DigestUpdate(mdctx, in, inlen);
2050 -+ EVP_DigestFinal(mdctx, hash, &hashlen);
2051 -
2052 - /* Fold the result into 64 bits */
2053 - for (i = OTP_HASH_SIZE; i < hashlen; i++) {
2054 -@@ -149,7 +170,9 @@ static int generate_otp(const sasl_utils_t *utils,
2055 - char *secret, char *otp)
2056 - {
2057 - const EVP_MD *md;
2058 -- char *key;
2059 -+ EVP_MD_CTX *mdctx = NULL;
2060 -+ char *key = NULL;
2061 -+ int r = SASL_OK;
2062 -
2063 - if (!(md = EVP_get_digestbyname(alg->evp_name))) {
2064 - utils->seterror(utils->conn, 0,
2065 -@@ -157,23 +180,32 @@ static int generate_otp(const sasl_utils_t *utils,
2066 - return SASL_FAIL;
2067 - }
2068 -
2069 -+ if ((mdctx = _plug_EVP_MD_CTX_new(utils)) == NULL) {
2070 -+ SETERROR(utils, "cannot allocate MD CTX");
2071 -+ r = SASL_NOMEM;
2072 -+ goto done;
2073 -+ }
2074 -+
2075 - if ((key = utils->malloc(strlen(seed) + strlen(secret) + 1)) == NULL) {
2076 - SETERROR(utils, "cannot allocate OTP key");
2077 -- return SASL_NOMEM;
2078 -+ r = SASL_NOMEM;
2079 -+ goto done;
2080 - }
2081 -
2082 - /* initial step */
2083 - strcpy(key, seed);
2084 - strcat(key, secret);
2085 -- otp_hash(md, key, strlen(key), otp, alg->swab);
2086 -+ otp_hash(md, key, strlen(key), otp, alg->swab, mdctx);
2087 -
2088 - /* computation step */
2089 - while (seq-- > 0)
2090 -- otp_hash(md, otp, OTP_HASH_SIZE, otp, alg->swab);
2091 -+ otp_hash(md, otp, OTP_HASH_SIZE, otp, alg->swab, mdctx);
2092 -
2093 -- utils->free(key);
2094 -+ done:
2095 -+ if (key) utils->free(key);
2096 -+ if (mdctx) _plug_EVP_MD_CTX_free(mdctx, utils);
2097 -
2098 -- return SASL_OK;
2099 -+ return r;
2100 - }
2101 -
2102 - static int parse_challenge(const sasl_utils_t *utils,
2103 -@@ -693,7 +725,8 @@ static int strptrcasecmp(const void *arg1, const void *arg2)
2104 -
2105 - /* Convert the 6 words into binary data */
2106 - static int word2bin(const sasl_utils_t *utils,
2107 -- char *words, unsigned char *bin, const EVP_MD *md)
2108 -+ char *words, unsigned char *bin, const EVP_MD *md,
2109 -+ EVP_MD_CTX *mdctx)
2110 - {
2111 - int i, j;
2112 - char *c, *word, buf[OTP_RESPONSE_MAX+1];
2113 -@@ -752,13 +785,12 @@ static int word2bin(const sasl_utils_t *utils,
2114 -
2115 - /* alternate dictionary */
2116 - if (alt_dict) {
2117 -- EVP_MD_CTX mdctx;
2118 - char hash[EVP_MAX_MD_SIZE];
2119 - int hashlen;
2120 -
2121 -- EVP_DigestInit(&mdctx, md);
2122 -- EVP_DigestUpdate(&mdctx, word, strlen(word));
2123 -- EVP_DigestFinal(&mdctx, hash, &hashlen);
2124 -+ EVP_DigestInit(mdctx, md);
2125 -+ EVP_DigestUpdate(mdctx, word, strlen(word));
2126 -+ EVP_DigestFinal(mdctx, hash, &hashlen);
2127 -
2128 - /* use lowest 11 bits */
2129 - x = ((hash[hashlen-2] & 0x7) << 8) | hash[hashlen-1];
2130 -@@ -802,6 +834,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2131 - char *response)
2132 - {
2133 - const EVP_MD *md;
2134 -+ EVP_MD_CTX *mdctx = NULL;
2135 - char *c;
2136 - int do_init = 0;
2137 - unsigned char cur_otp[OTP_HASH_SIZE], prev_otp[OTP_HASH_SIZE];
2138 -@@ -815,6 +848,11 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2139 - return SASL_FAIL;
2140 - }
2141 -
2142 -+ if ((mdctx = _plug_EVP_MD_CTX_new(utils)) == NULL) {
2143 -+ SETERROR(utils, "cannot allocate MD CTX");
2144 -+ return SASL_NOMEM;
2145 -+ }
2146 -+
2147 - /* eat leading whitespace */
2148 - c = response;
2149 - while (isspace((int) *c)) c++;
2150 -@@ -824,7 +862,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2151 - r = hex2bin(c+strlen(OTP_HEX_TYPE), cur_otp, OTP_HASH_SIZE);
2152 - }
2153 - else if (!strncasecmp(c, OTP_WORD_TYPE, strlen(OTP_WORD_TYPE))) {
2154 -- r = word2bin(utils, c+strlen(OTP_WORD_TYPE), cur_otp, md);
2155 -+ r = word2bin(utils, c+strlen(OTP_WORD_TYPE), cur_otp, md, mdctx);
2156 - }
2157 - else if (!strncasecmp(c, OTP_INIT_HEX_TYPE,
2158 - strlen(OTP_INIT_HEX_TYPE))) {
2159 -@@ -834,7 +872,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2160 - else if (!strncasecmp(c, OTP_INIT_WORD_TYPE,
2161 - strlen(OTP_INIT_WORD_TYPE))) {
2162 - do_init = 1;
2163 -- r = word2bin(utils, c+strlen(OTP_INIT_WORD_TYPE), cur_otp, md);
2164 -+ r = word2bin(utils, c+strlen(OTP_INIT_WORD_TYPE), cur_otp, md, mdctx);
2165 - }
2166 - else {
2167 - SETERROR(utils, "unknown OTP extended response type");
2168 -@@ -843,14 +881,14 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2169 - }
2170 - else {
2171 - /* standard response, try word first, and then hex */
2172 -- r = word2bin(utils, c, cur_otp, md);
2173 -+ r = word2bin(utils, c, cur_otp, md, mdctx);
2174 - if (r != SASL_OK)
2175 - r = hex2bin(c, cur_otp, OTP_HASH_SIZE);
2176 - }
2177 -
2178 - if (r == SASL_OK) {
2179 - /* do one more hash (previous otp) and compare to stored otp */
2180 -- otp_hash(md, cur_otp, OTP_HASH_SIZE, prev_otp, text->alg->swab);
2181 -+ otp_hash(md, cur_otp, OTP_HASH_SIZE, prev_otp, text->alg->swab, mdctx);
2182 -
2183 - if (!memcmp(prev_otp, text->otp, OTP_HASH_SIZE)) {
2184 - /* update the secret with this seq/otp */
2185 -@@ -879,23 +917,28 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2186 - *new_resp++ = '\0';
2187 - }
2188 -
2189 -- if (!(new_chal && new_resp))
2190 -- return SASL_BADAUTH;
2191 -+ if (!(new_chal && new_resp)) {
2192 -+ r = SASL_BADAUTH;
2193 -+ goto done;
2194 -+ }
2195 -
2196 - if ((r = parse_challenge(utils, new_chal, &alg, &seq, seed, 1))
2197 - != SASL_OK) {
2198 -- return r;
2199 -+ goto done;
2200 - }
2201 -
2202 -- if (seq < 1 || !strcasecmp(seed, text->seed))
2203 -- return SASL_BADAUTH;
2204 -+ if (seq < 1 || !strcasecmp(seed, text->seed)) {
2205 -+ r = SASL_BADAUTH;
2206 -+ goto done;
2207 -+ }
2208 -
2209 - /* find the MDA */
2210 - if (!(md = EVP_get_digestbyname(alg->evp_name))) {
2211 - utils->seterror(utils->conn, 0,
2212 - "OTP algorithm %s is not available",
2213 - alg->evp_name);
2214 -- return SASL_BADAUTH;
2215 -+ r = SASL_BADAUTH;
2216 -+ goto done;
2217 - }
2218 -
2219 - if (!strncasecmp(c, OTP_INIT_HEX_TYPE, strlen(OTP_INIT_HEX_TYPE))) {
2220 -@@ -903,7 +946,7 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2221 - }
2222 - else if (!strncasecmp(c, OTP_INIT_WORD_TYPE,
2223 - strlen(OTP_INIT_WORD_TYPE))) {
2224 -- r = word2bin(utils, new_resp, new_otp, md);
2225 -+ r = word2bin(utils, new_resp, new_otp, md, mdctx);
2226 - }
2227 -
2228 - if (r == SASL_OK) {
2229 -@@ -914,7 +957,10 @@ static int verify_response(server_context_t *text, const sasl_utils_t *utils,
2230 - memcpy(text->otp, new_otp, OTP_HASH_SIZE);
2231 - }
2232 - }
2233 --
2234 -+
2235 -+ done:
2236 -+ if (mdctx) _plug_EVP_MD_CTX_free(mdctx, utils);
2237 -+
2238 - return r;
2239 - }
2240 -
2241 -@@ -1443,8 +1489,10 @@ int otp_server_plug_init(const sasl_utils_t *utils,
2242 - *pluglist = otp_server_plugins;
2243 - *plugcount = 1;
2244 -
2245 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
2246 - /* Add all digests */
2247 - OpenSSL_add_all_digests();
2248 -+#endif
2249 -
2250 - return SASL_OK;
2251 - }
2252 -@@ -1844,8 +1892,10 @@ int otp_client_plug_init(sasl_utils_t *utils,
2253 - *pluglist = otp_client_plugins;
2254 - *plugcount = 1;
2255 -
2256 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
2257 - /* Add all digests */
2258 - OpenSSL_add_all_digests();
2259 -+#endif
2260 -
2261 - return SASL_OK;
2262 - }
2263 ---- a/saslauthd/lak.c
2264 -+++ b/saslauthd/lak.c
2265 -@@ -729,7 +729,7 @@ int lak_init(
2266 - return rc;
2267 - }
2268 -
2269 --#ifdef HAVE_OPENSSL
2270 -+#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
2271 - OpenSSL_add_all_digests();
2272 - #endif
2273 -
2274
2275 diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-send-imap-logout.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-send-imap-logout.patch
2276 deleted file mode 100644
2277 index d8b4b6efc3f..00000000000
2278 --- a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.26-send-imap-logout.patch
2279 +++ /dev/null
2280 @@ -1,48 +0,0 @@
2281 ---- cyrus-sasl2.orig/saslauthd/auth_rimap.c
2282 -+++ cyrus-sasl2/saslauthd/auth_rimap.c
2283 -@@ -90,6 +90,7 @@ static struct addrinfo *ai = NULL; /* re
2284 - service we connect to. */
2285 - #define TAG "saslauthd" /* IMAP command tag */
2286 - #define LOGIN_CMD (TAG " LOGIN ") /* IMAP login command (with tag) */
2287 -+#define LOGOUT_CMD (TAG " LOGOUT ") /* IMAP logout command (with tag)*/
2288 - #define NETWORK_IO_TIMEOUT 30 /* network I/O timeout (seconds) */
2289 - #define RESP_LEN 1000 /* size of read response buffer */
2290 -
2291 -@@ -307,10 +308,12 @@ auth_rimap (
2292 - int s=-1; /* socket to remote auth host */
2293 - struct addrinfo *r; /* remote socket address info */
2294 - struct iovec iov[5]; /* for sending LOGIN command */
2295 -+ struct iovec iov2[2]; /* for sending LOGOUT command */
2296 - char *qlogin; /* pointer to "quoted" login */
2297 - char *qpass; /* pointer to "quoted" password */
2298 - char *c; /* scratch pointer */
2299 - int rc; /* return code scratch area */
2300 -+ int rcl; /* return code scratch area */
2301 - char rbuf[RESP_LEN]; /* response read buffer */
2302 - char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
2303 - int saved_errno;
2304 -@@ -505,6 +508,24 @@ auth_rimap (
2305 - }
2306 - }
2307 - }
2308 -+
2309 -+ /* close remote imap */
2310 -+ iov2[0].iov_base = LOGOUT_CMD;
2311 -+ iov2[0].iov_len = sizeof(LOGOUT_CMD) - 1;
2312 -+ iov2[1].iov_base = "\r\n";
2313 -+ iov2[1].iov_len = sizeof("\r\n") - 1;
2314 -+
2315 -+ if (flags & VERBOSE) {
2316 -+ syslog(LOG_DEBUG, "auth_rimap: sending %s%s %s",
2317 -+ LOGOUT_CMD, qlogin, qpass);
2318 -+ }
2319 -+ alarm(NETWORK_IO_TIMEOUT);
2320 -+ rcl = retry_writev(s, iov2, 2);
2321 -+ alarm(0);
2322 -+ if (rcl == -1) {
2323 -+ syslog(LOG_WARNING, "auth_rimap: writev logout: %m");
2324 -+ }
2325 -+
2326 - (void) close(s); /* we're done with the remote */
2327 - if (rc == -1) {
2328 - syslog(LOG_WARNING, "auth_rimap: read (response): %m");