1 |
commit: a065bacc267e31d5dd4a64d416de800cb6bc6fdd |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 23 00:52:37 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 23 00:53:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a065bacc |
7 |
|
8 |
dev-libs/cyrus-sasl: add 2.1.28 |
9 |
|
10 |
Java bindings dropped upstream. Fair amount of autotools changed upstream |
11 |
too so hopefully those issues are fixed. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/539632 |
14 |
Bug: https://bugs.gentoo.org/591358 |
15 |
Bug: https://bugs.gentoo.org/409897 |
16 |
Closes: https://bugs.gentoo.org/476392 |
17 |
Closes: https://bugs.gentoo.org/818145 |
18 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
19 |
|
20 |
dev-libs/cyrus-sasl/Manifest | 1 + |
21 |
dev-libs/cyrus-sasl/cyrus-sasl-2.1.28.ebuild | 220 +++++++++++++++++++++ |
22 |
...yrus-sasl-2.1.28-fix-configure-time-check.patch | 50 +++++ |
23 |
3 files changed, 271 insertions(+) |
24 |
|
25 |
diff --git a/dev-libs/cyrus-sasl/Manifest b/dev-libs/cyrus-sasl/Manifest |
26 |
index da2a2265fd42..0de2b299de60 100644 |
27 |
--- a/dev-libs/cyrus-sasl/Manifest |
28 |
+++ b/dev-libs/cyrus-sasl/Manifest |
29 |
@@ -1,2 +1,3 @@ |
30 |
DIST cyrus-sasl-2.1.27-r6-patches.tar.bz2 5169 BLAKE2B 43a2f0db4a8589ec1cde7807b31a93459eacb04d27ba36751a69dd5f4e669d1b28342194b0e1a5382e281a52a35e88168877b54065cfba01b9bd33e87fbd23f1 SHA512 41c4ca7c8f7b79e03faf5d826a6ff0ed398137239b93fb0046ccbf385f6ddeab2b9fb2f51d7a263dc74626e5fdbefb28615a1ee22aabe57ed57f10a52d382797 |
31 |
DIST cyrus-sasl-2.1.27.tar.gz 4111249 BLAKE2B 82c9acce8534521ce5c5806f093e927f1854b4bc4b83ea7db1b32ceaa811adc1a5b6fc16d03233d729194cd603836f6e58de67f915abab2cb74561a80d03f5a8 SHA512 d11549a99b3b06af79fc62d5478dba3305d7e7cc0824f4b91f0d2638daafbe940623eab235f85af9be38dcf5d42fc131db531c177040a85187aee5096b8df63b |
32 |
+DIST cyrus-sasl-2.1.28.tar.gz 4034803 BLAKE2B 6cca8c26cebb9c2ee5d539c43797d30b6309a476ec4233225789978e1d7315c4ea5d2abbc7f5464be0f3c0de5fd9212706b43fbc92f40b76cd0b1013cc00f823 SHA512 db15af9079758a9f385457a79390c8a7cd7ea666573dace8bf4fb01bb4b49037538d67285727d6a70ad799d2e2318f265c9372e2427de9371d626a1959dd6f78 |
33 |
|
34 |
diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.28.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.28.ebuild |
35 |
new file mode 100644 |
36 |
index 000000000000..84382b93e147 |
37 |
--- /dev/null |
38 |
+++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.28.ebuild |
39 |
@@ -0,0 +1,220 @@ |
40 |
+# Copyright 1999-2022 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=7 |
44 |
+ |
45 |
+inherit autotools edos2unix flag-o-matic multilib multilib-minimal pam db-use systemd toolchain-funcs tmpfiles |
46 |
+ |
47 |
+SASLAUTHD_CONF_VER="2.1.26" |
48 |
+MY_PATCH_VER="${PN}-2.1.27-r6-patches" |
49 |
+DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)" |
50 |
+HOMEPAGE="https://www.cyrusimap.org/sasl/" |
51 |
+#SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz" |
52 |
+SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz" |
53 |
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCH_VER}.tar.bz2" |
54 |
+ |
55 |
+LICENSE="BSD-with-attribution" |
56 |
+SLOT="2" |
57 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
58 |
+IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom" |
59 |
+REQUIRED_USE="ldapdb? ( openldap )" |
60 |
+ |
61 |
+DEPEND="net-mail/mailbase |
62 |
+ virtual/libcrypt:= |
63 |
+ authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) |
64 |
+ berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) |
65 |
+ gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) |
66 |
+ kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) |
67 |
+ openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) |
68 |
+ mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] ) |
69 |
+ pam? ( >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}] ) |
70 |
+ postgres? ( dev-db/postgresql:* ) |
71 |
+ sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) |
72 |
+ ssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )" |
73 |
+RDEPEND="${DEPEND} |
74 |
+ selinux? ( sec-policy/selinux-sasl )" |
75 |
+ |
76 |
+MULTILIB_WRAPPED_HEADERS=( |
77 |
+ /usr/include/sasl/md5global.h |
78 |
+) |
79 |
+ |
80 |
+PATCHES=( |
81 |
+ "${WORKDIR}"/${MY_PATCH_VER}/cyrus-sasl-2.1.25-auxprop.patch |
82 |
+ "${WORKDIR}"/${MY_PATCH_VER}/cyrus-sasl-2.1.27-avoid_pic_overwrite.patch |
83 |
+ "${WORKDIR}"/${MY_PATCH_VER}/cyrus-sasl-2.1.27-gss_c_nt_hostbased_service.patch |
84 |
+ "${FILESDIR}"/cyrus-sasl-2.1.28-fix-configure-time-check.patch |
85 |
+) |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ default |
89 |
+ |
90 |
+ # Use plugindir for sasldir |
91 |
+ sed -i '/^sasldir =/s:=.*:= $(plugindir):' \ |
92 |
+ "${S}"/plugins/Makefile.{am,in} || die "sed failed" |
93 |
+ |
94 |
+ # bug #486740 and bug #468556 (dropped AM_CONFIG_HEADER sed in 2.1.28) |
95 |
+ sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' configure.ac || die |
96 |
+ |
97 |
+ eautoreconf |
98 |
+} |
99 |
+ |
100 |
+src_configure() { |
101 |
+ export CC_FOR_BUILD="$(tc-getBUILD_CC)" |
102 |
+ |
103 |
+ append-flags -fno-strict-aliasing |
104 |
+ |
105 |
+ if [[ ${CHOST} == *-solaris* ]] ; then |
106 |
+ # getpassphrase is defined in /usr/include/stdlib.h |
107 |
+ append-cppflags -DHAVE_GETPASSPHRASE |
108 |
+ else |
109 |
+ # this horrendously breaks things on Solaris |
110 |
+ append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED |
111 |
+ # replaces BSD_SOURCE (bug #579218) |
112 |
+ append-cppflags -D_DEFAULT_SOURCE |
113 |
+ fi |
114 |
+ |
115 |
+ multilib-minimal_src_configure |
116 |
+} |
117 |
+ |
118 |
+multilib_src_configure() { |
119 |
+ local myeconfargs=( |
120 |
+ --enable-login |
121 |
+ --enable-ntlm |
122 |
+ --enable-auth-sasldb |
123 |
+ --disable-cmulocal |
124 |
+ --disable-krb4 |
125 |
+ --disable-macos-framework |
126 |
+ --enable-otp |
127 |
+ --without-sqlite |
128 |
+ --with-saslauthd="${EPREFIX}"/run/saslauthd |
129 |
+ --with-pwcheck="${EPREFIX}"/run/saslauthd |
130 |
+ --with-configdir="${EPREFIX}"/etc/sasl2 |
131 |
+ --with-plugindir="${EPREFIX}/usr/$(get_libdir)/sasl2" |
132 |
+ --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2 |
133 |
+ --with-sphinx-build=no |
134 |
+ $(use_with ssl openssl) |
135 |
+ $(use_with pam) |
136 |
+ $(use_with openldap ldap) |
137 |
+ $(use_enable ldapdb) |
138 |
+ $(multilib_native_use_enable sample) |
139 |
+ $(use_enable kerberos gssapi) |
140 |
+ $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr) |
141 |
+ $(multilib_native_use_with postgres pgsql "${EPREFIX}/usr/$(get_libdir)/postgresql") |
142 |
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr/$(get_libdir)") |
143 |
+ $(use_enable srp) |
144 |
+ $(use_enable static-libs static) |
145 |
+ |
146 |
+ # Add authdaemond support (bug #56523). |
147 |
+ $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '') |
148 |
+ |
149 |
+ # Fix for bug #59634. |
150 |
+ $(usex ssl '' --without-des) |
151 |
+ |
152 |
+ # Use /dev/urandom instead of /dev/random (bug #46038). |
153 |
+ $(usex urandom --with-devrandom=/dev/urandom '') |
154 |
+ ) |
155 |
+ |
156 |
+ if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then |
157 |
+ myeconfargs+=( --enable-sql ) |
158 |
+ else |
159 |
+ myeconfargs+=( --disable-sql ) |
160 |
+ fi |
161 |
+ |
162 |
+ # Default to GDBM if both 'gdbm' and 'berkdb' are present. |
163 |
+ if use gdbm ; then |
164 |
+ einfo "Building with GNU DB as database backend for your SASLdb" |
165 |
+ myeconfargs+=( --with-dblib=gdbm ) |
166 |
+ elif use berkdb ; then |
167 |
+ einfo "Building with BerkeleyDB as database backend for your SASLdb" |
168 |
+ myeconfargs+=( |
169 |
+ --with-dblib=berkeley |
170 |
+ --with-bdb-incdir="$(db_includedir)" |
171 |
+ ) |
172 |
+ else |
173 |
+ einfo "Building without SASLdb support" |
174 |
+ myeconfargs+=( --with-dblib=none ) |
175 |
+ fi |
176 |
+ |
177 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
178 |
+} |
179 |
+ |
180 |
+multilib_src_install() { |
181 |
+ default |
182 |
+ |
183 |
+ if multilib_is_native_abi; then |
184 |
+ if use sample ; then |
185 |
+ docinto sample |
186 |
+ dodoc "${S}"/sample/*.c |
187 |
+ exeinto /usr/share/doc/${P}/sample |
188 |
+ doexe sample/client sample/server |
189 |
+ fi |
190 |
+ |
191 |
+ dosbin saslauthd/testsaslauthd |
192 |
+ fi |
193 |
+} |
194 |
+ |
195 |
+multilib_src_install_all() { |
196 |
+ doman man/* |
197 |
+ |
198 |
+ keepdir /etc/sasl2 |
199 |
+ |
200 |
+ # Reset docinto to default value (bug #674296) |
201 |
+ docinto |
202 |
+ dodoc AUTHORS ChangeLog doc/legacy/TODO |
203 |
+ newdoc pwcheck/README README.pwcheck |
204 |
+ |
205 |
+ newdoc docsrc/sasl/release-notes/$(ver_cut 1-2)/index.rst release-notes |
206 |
+ edos2unix "${ED}"/usr/share/doc/${PF}/release-notes |
207 |
+ |
208 |
+ docinto html |
209 |
+ dodoc doc/html/*.html |
210 |
+ |
211 |
+ if use pam; then |
212 |
+ newpamd "${FILESDIR}"/saslauthd.pam-include saslauthd |
213 |
+ fi |
214 |
+ |
215 |
+ newinitd "${FILESDIR}"/pwcheck.rc6 pwcheck |
216 |
+ systemd_dounit "${FILESDIR}"/pwcheck.service |
217 |
+ |
218 |
+ newinitd "${FILESDIR}"/saslauthd2.rc7 saslauthd |
219 |
+ newconfd "${FILESDIR}"/saslauthd-${SASLAUTHD_CONF_VER}.conf saslauthd |
220 |
+ systemd_dounit "${FILESDIR}"/saslauthd.service |
221 |
+ dotmpfiles "${FILESDIR}"/${PN}.conf |
222 |
+ |
223 |
+ # The get_modname bit is important: do not remove the .la files on |
224 |
+ # platforms where the lib isn't called .so for cyrus searches the .la to |
225 |
+ # figure out what the name is supposed to be instead |
226 |
+ if ! use static-libs && [[ $(get_modname) == .so ]] ; then |
227 |
+ find "${ED}" -name "*.la" -delete || die |
228 |
+ fi |
229 |
+} |
230 |
+ |
231 |
+pkg_postinst() { |
232 |
+ tmpfiles_process ${PN}.conf |
233 |
+ |
234 |
+ # Generate an empty sasldb2 with correct permissions. |
235 |
+ if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then |
236 |
+ einfo "Generating an empty sasldb2 with correct permissions ..." |
237 |
+ |
238 |
+ echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \ |
239 |
+ || die "Failed to generate sasldb2" |
240 |
+ |
241 |
+ "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \ |
242 |
+ || die "Failed to delete temp user" |
243 |
+ |
244 |
+ chown root:mail "${EROOT}/etc/sasl2/sasldb2" \ |
245 |
+ || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2" |
246 |
+ chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \ |
247 |
+ || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2" |
248 |
+ fi |
249 |
+ |
250 |
+ if use authdaemond ; then |
251 |
+ elog "You need to add a user running a service using Courier's" |
252 |
+ elog "authdaemon to the 'mail' group. For example, do:" |
253 |
+ elog " gpasswd -a postfix mail" |
254 |
+ elog "to add the 'postfix' user to the 'mail' group." |
255 |
+ fi |
256 |
+ |
257 |
+ elog "pwcheck and saslauthd home directories have moved to:" |
258 |
+ elog " /run/saslauthd, using tmpfiles.d" |
259 |
+} |
260 |
|
261 |
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.28-fix-configure-time-check.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.28-fix-configure-time-check.patch |
262 |
new file mode 100644 |
263 |
index 000000000000..873dac53fe03 |
264 |
--- /dev/null |
265 |
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.28-fix-configure-time-check.patch |
266 |
@@ -0,0 +1,50 @@ |
267 |
+https://github.com/cyrusimap/cyrus-sasl/pull/709 |
268 |
+ |
269 |
+From 399625c3413c313e93432d0f5907350722b861c7 Mon Sep 17 00:00:00 2001 |
270 |
+From: Sam James <sam@g.o> |
271 |
+Date: Wed, 23 Feb 2022 00:45:15 +0000 |
272 |
+Subject: [PATCH] Fix <time.h> check |
273 |
+MIME-Version: 1.0 |
274 |
+Content-Type: text/plain; charset=UTF-8 |
275 |
+Content-Transfer-Encoding: 8bit |
276 |
+ |
277 |
+We're conditionally including based on HAVE_TIME_H in a bunch of places, |
278 |
+but we're not actually checking for time.h, so that's never going to be defined. |
279 |
+ |
280 |
+While at it, add in a missing include in the cram plugin. |
281 |
+ |
282 |
+This fixes a bunch of implicit declaration warnings: |
283 |
+``` |
284 |
+ * cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] |
285 |
+ * cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration] |
286 |
+ * cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] |
287 |
+ * cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] |
288 |
+ * cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration] |
289 |
+ * cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] |
290 |
+``` |
291 |
+ |
292 |
+Signed-off-by: Sam James <sam@g.o> |
293 |
+--- a/configure.ac |
294 |
++++ b/configure.ac |
295 |
+@@ -1290,7 +1290,7 @@ AC_CHECK_HEADERS_ONCE([sys/time.h]) |
296 |
+ |
297 |
+ AC_HEADER_DIRENT |
298 |
+ AC_HEADER_SYS_WAIT |
299 |
+-AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h) |
300 |
++AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h time.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h) |
301 |
+ |
302 |
+ IPv6_CHECK_SS_FAMILY() |
303 |
+ IPv6_CHECK_SA_LEN() |
304 |
+--- a/plugins/cram.c |
305 |
++++ b/plugins/cram.c |
306 |
+@@ -53,6 +53,10 @@ |
307 |
+ #endif |
308 |
+ #include <fcntl.h> |
309 |
+ |
310 |
++#ifdef HAVE_TIME_H |
311 |
++#include <time.h> |
312 |
++#endif |
313 |
++ |
314 |
+ #include <sasl.h> |
315 |
+ #include <saslplug.h> |
316 |
+ #include <saslutil.h> |