diff options
author | Eray Aslan <eras@gentoo.org> | 2011-05-08 19:38:13 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2011-05-08 19:38:13 +0000 |
commit | fa8ada31fb8912b8f6790b7defe1d798bff81d21 (patch) | |
tree | c6098e37ab5468f403393caf92c6d4925d0fbfc1 /dev-libs/cyrus-sasl | |
parent | Describe new sane-backends. (diff) | |
download | gentoo-2-fa8ada31fb8912b8f6790b7defe1d798bff81d21.tar.gz gentoo-2-fa8ada31fb8912b8f6790b7defe1d798bff81d21.tar.bz2 gentoo-2-fa8ada31fb8912b8f6790b7defe1d798bff81d21.zip |
Drop sqlite USE flag bug #245072. Drop pg_config from configure script
bug #296391. Cherry pick and add debian patches. EAPI bump.
(Portage version: 2.1.9.47/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/cyrus-sasl')
12 files changed, 543 insertions, 1 deletions
diff --git a/dev-libs/cyrus-sasl/ChangeLog b/dev-libs/cyrus-sasl/ChangeLog index 640cee350fa2..5b773bf85774 100644 --- a/dev-libs/cyrus-sasl/ChangeLog +++ b/dev-libs/cyrus-sasl/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for dev-libs/cyrus-sasl # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v 1.217 2011/05/08 16:44:56 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v 1.218 2011/05/08 19:38:13 eras Exp $ + +*cyrus-sasl-2.1.23-r3 (08 May 2011) + + 08 May 2011; Eray Aslan <eras@gentoo.org> + +files/cyrus-sasl-0001_versioned_symbols.patch, +cyrus-sasl-2.1.23-r3.ebuild, + +files/cyrus-sasl-0002_testsuite.patch, + +files/cyrus-sasl-0006_library_mutexes.patch, + +files/cyrus-sasl-0008_one_time_sasl_set_alloc.patch, + +files/cyrus-sasl-0010_maintainer_mode.patch, + +files/cyrus-sasl-0011_saslauthd_ac_prog_libtool.patch, + +files/cyrus-sasl-0012_xopen_crypt_prototype.patch, + +files/cyrus-sasl-0014_avoid_pic_overwrite.patch, + +files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch, + +files/cyrus-sasl-0026_drop_krb5support_dependency.patch: + Drop sqlite USE flag bug #245072. Drop pg_config from configure script bug + #296391. Cherry pick and add debian patches. EAPI bump. 08 May 2011; Eray Aslan <eras@gentoo.org> -cyrus-sasl-2.1.22-r2.ebuild, -cyrus-sasl-2.1.23.ebuild: diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r3.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r3.ebuild new file mode 100644 index 000000000000..d6b5bad1f353 --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r3.ebuild @@ -0,0 +1,249 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r3.ebuild,v 1.1 2011/05/08 19:38:13 eras Exp $ + +EAPI=2 + +inherit eutils flag-o-matic multilib autotools pam java-pkg-opt-2 db-use + +ntlm_patch="${P}-ntlm_impl-spnego.patch.gz" +SASLAUTHD_CONF_VER="2.1.21" + +DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)." +HOMEPAGE="http://asg.web.cmu.edu/sasl/" +SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz + ntlm_unsupported_patch? ( mirror://gentoo/${ntlm_patch} )" + +LICENSE="as-is" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="authdaemond berkdb crypt gdbm kerberos ldap mysql ntlm_unsupported_patch pam postgres sample srp ssl urandom" + +DEPEND="authdaemond? ( || ( >=net-mail/courier-imap-3.0.7 >=mail-mta/courier-0.46 ) ) + berkdb? ( >=sys-libs/db-3.2 ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + kerberos? ( virtual/krb5 ) + ldap? ( >=net-nds/openldap-2.0.25 ) + mysql? ( virtual/mysql ) + ntlm_unsupported_patch? ( >=net-fs/samba-3.0.9 ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql-base ) + ssl? ( >=dev-libs/openssl-0.9.6d ) + java? ( >=virtual/jdk-1.4 )" +RDEPEND="${DEPEND}" + +pkg_setup() { + if use gdbm && use berkdb ; then + echo + ewarn "You have both 'gdbm' and 'berkdb' USE flags enabled." + ewarn "gdbm will be selected." + echo + fi + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + # Fix default port name for rimap auth mechanism. + sed -e '/define DEFAULT_REMOTE_SERVICE/s:imap:imap2:' \ + -i saslauthd/auth_rimap.c || die "sed failed" + + # UNSUPPORTED ntlm patch #81342 + use ntlm_unsupported_patch && epatch "${DISTDIR}/${ntlm_patch}" + epatch "${FILESDIR}"/${PN}-2.1.17-pgsql-include.patch + epatch "${FILESDIR}"/${PN}-2.1.22-as-needed.patch + use crypt && epatch "${FILESDIR}"/${PN}-2.1.19-checkpw.c.patch #45181 + epatch "${FILESDIR}"/${PN}-2.1.22-crypt.patch #152544 + epatch "${FILESDIR}"/${PN}-2.1.22-qa.patch + epatch "${FILESDIR}/${PN}-2.1.22-gcc44.patch" #248738 + epatch "${FILESDIR}"/${P}-authd-fix.patch + epatch "${FILESDIR}"/${P}+db-5.0.patch + epatch "${FILESDIR}/${PN}-0001_versioned_symbols.patch" + epatch "${FILESDIR}/${PN}-0002_testsuite.patch" + epatch "${FILESDIR}/${PN}-0006_library_mutexes.patch" + epatch "${FILESDIR}/${PN}-0008_one_time_sasl_set_alloc.patch" + epatch "${FILESDIR}/${PN}-0010_maintainer_mode.patch" + epatch "${FILESDIR}/${PN}-0011_saslauthd_ac_prog_libtool.patch" + epatch "${FILESDIR}/${PN}-0012_xopen_crypt_prototype.patch" + epatch "${FILESDIR}/${PN}-0014_avoid_pic_overwrite.patch" + epatch "${FILESDIR}/${PN}-0016_pid_file_lock_creation_mask.patch" + epatch "${FILESDIR}/${PN}-0026_drop_krb5support_dependency.patch" + + sed -i -e '/for dbname in/s:db-4.* db:'$(db_libname)':' \ + "${S}"/cmulocal/berkdb.m4 + + # Upstream doesn't even honor their own configure options... grumble + sed -i '/^sasldir =/s:=.*:= $(plugindir):' \ + "${S}"/plugins/Makefile.{am,in} || die "sed failed" + + # make sure to use common plugin ldflags + sed -i '/_la_LDFLAGS = /s:=:= $(AM_LDFLAGS) :' plugins/Makefile.am || die + + # Recreate configure. + rm -f "${S}/config/libtool.m4" || die "rm libtool.m4 failed" + AT_M4DIR="${S}/cmulocal ${S}/config" eautoreconf +} + +src_configure() { + # Fix QA issues. + append-flags -fno-strict-aliasing + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED + + # Java support. + use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myconf + + # Add authdaemond support (bug #56523). + if use authdaemond ; then + myconf="${myconf} --with-authdaemond=/var/lib/courier/authdaemon/socket" + fi + + # Fix for bug #59634. + if ! use ssl ; then + myconf="${myconf} --without-des" + fi + + if use mysql || use postgres || use sqlite ; then + myconf="${myconf} --enable-sql" + else + myconf="${myconf} --disable-sql" + fi + + # Default to GDBM if both 'gdbm' and 'berkdb' are present. + if use gdbm ; then + einfo "Building with GNU DB as database backend for your SASLdb" + myconf="${myconf} --with-dblib=gdbm" + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myconf="${myconf} --with-dblib=berkeley --with-bdb-incdir=$(db_includedir)" + else + einfo "Building without SASLdb support" + myconf="${myconf} --with-dblib=none" + fi + + # Use /dev/urandom instead of /dev/random (bug #46038). + use urandom && myconf="${myconf} --with-devrandom=/dev/urandom" + + econf \ + --enable-login \ + --enable-ntlm \ + --enable-auth-sasldb \ + --disable-krb4 \ + --disable-otp \ + --without-sqlite \ + --with-saslauthd=/var/lib/sasl2 \ + --with-pwcheck=/var/lib/sasl2 \ + --with-configdir=/etc/sasl2 \ + --with-plugindir=/usr/$(get_libdir)/sasl2 \ + --with-dbpath=/etc/sasl2/sasldb2 \ + $(use_with ssl openssl) \ + $(use_with pam) \ + $(use_with ldap) \ + $(use_enable ldap ldapdb) \ + $(use_enable sample) \ + $(use_enable kerberos gssapi) \ + $(use_enable java) \ + $(use_with java javahome ${JAVA_HOME}) \ + $(use_with mysql) \ + $(use_with postgres pgsql) \ + $(use_enable srp) \ + ${myconf} +} + +src_compile() { + # We force -j1 for bug #110066. + emake -j1 || die "emake failed" + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + cd "${S}" + if use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi + + # Add testsaslauthd (bug #58768). + cd "${S}/saslauthd" + emake testsaslauthd || die "emake testsaslauthd failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + keepdir /var/lib/sasl2 /etc/sasl2 + + # Install everything necessary so users can build sample + # client/server (bug #64733). + if use sample ; then + insinto /usr/share/${PN}-2/examples + doins aclocal.m4 config.h config.status configure.in + dosym /usr/include/sasl /usr/share/${PN}-2/examples/include + exeinto /usr/share/${PN}-2/examples + doexe libtool + insinto /usr/share/${PN}-2/examples/sample + doins sample/*.{c,h} sample/*Makefile* + insinto /usr/share/${PN}-2/examples/sample/.deps + doins sample/.deps/* + dodir /usr/share/${PN}-2/examples/lib + dosym /usr/$(get_libdir)/libsasl2.la /usr/share/${PN}-2/examples/lib/libsasl2.la + dodir /usr/share/${PN}-2/examples/lib/.libs + dosym /usr/$(get_libdir)/libsasl2.so /usr/share/${PN}-2/examples/lib/.libs/libsasl2.so + fi + + # Default location for java classes breaks OpenOffice (bug #60769). + if use java ; then + java-pkg_dojar ${PN}.jar + java-pkg_regso "${D}/usr/$(get_libdir)/libjavasasl.so" + # hackish, don't wanna dig through makefile + rm -Rf "${D}/usr/$(get_libdir)/java" + docinto "java" + dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/* + dodir "/usr/share/doc/${PF}/java/Test" + insinto "/usr/share/doc/${PF}/java/Test" + doins "${S}"/java/Test/*.java || die "Failed to copy java files to /usr/share/doc/${PF}/java/Test" + fi + + docinto "" + dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt + newdoc pwcheck/README README.pwcheck + dohtml doc/*.html + + docinto "saslauthd" + dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README} + + newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd || die "Failed to install saslauthd to /etc/pam.d" + + newinitd "${FILESDIR}/pwcheck.rc6" pwcheck || die "Failed to install pwcheck to /etc/init.d" + + newinitd "${FILESDIR}/saslauthd2.rc6" saslauthd || die "Failed to install saslauthd to /etc/init.d" + newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd || die "Failed to install saslauthd to /etc/conf.d" + + exeinto /usr/sbin + newexe "${S}/saslauthd/testsaslauthd" testsaslauthd || die "Failed to install testsaslauthd" +} + +pkg_postinst () { + # Generate an empty sasldb2 with correct permissions. + if ( use berkdb || use gdbm ) && [[ ! -f "${ROOT}/etc/sasl2/sasldb2" ]] ; then + einfo "Generating an empty sasldb2 with correct permissions ..." + echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login \ + || die "Failed to generate sasldb2" + "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -d login \ + || die "Failed to delete temp user" + chown root:mail "${ROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chown ${ROOT}/etc/sasl2/sasldb2" + chmod 0640 "${ROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chmod ${ROOT}/etc/sasl2/sasldb2" + fi + + if use sample ; then + elog "You have chosen to install sources for the example client and server." + elog "To build these, please type:" + elog "\tcd /usr/share/${PN}-2/examples/sample && make" + fi + + if use authdaemond ; then + elog "You need to add a user running a service using Courier's" + elog "authdaemon to the 'mail' group. For example, do:" + elog " gpasswd -a postfix mail" + elog "to add the 'postfix' user to the 'mail' group." + fi +} diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0001_versioned_symbols.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0001_versioned_symbols.patch new file mode 100644 index 000000000000..312afc8ff57a --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0001_versioned_symbols.patch @@ -0,0 +1,30 @@ +Author: Fabian Fagerholm <fabbe@debian.org> + + Use versioned symbols for libsasl2. + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index e09fe6e..e74c507 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -61,8 +61,8 @@ LIB_DOOR= @LIB_DOOR@ + lib_LTLIBRARIES = libsasl2.la + + libsasl2_la_SOURCES = $(common_sources) $(common_headers) +-libsasl2_la_LDFLAGS = -version-info $(sasl_version) +-libsasl2_la_DEPENDENCIES = $(LTLIBOBJS) ++libsasl2_la_LDFLAGS = -version-info $(sasl_version) -Wl,--version-script=$(top_srcdir)/Versions ++libsasl2_la_DEPENDENCIES = $(LTLIBOBJS) $(top_srcdir)/Versions + libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) $(LIB_CRYPT) + + if MACOSX +new file mode 100644 +index 0000000..ff7190d +--- /dev/null ++++ b/Versions +@@ -0,0 +1,6 @@ ++SASL2 { ++ global: ++ sasl_*; prop_*; auxprop_plugin_info; _sasl_MD5*; ++}; ++ ++HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0002_testsuite.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0002_testsuite.patch new file mode 100644 index 000000000000..c550927962bc --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0002_testsuite.patch @@ -0,0 +1,26 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Rename the testsuite program to sasltestsuite and use /etc/sasldb2 +instead of ./sasldb as default path for the sasldb database file. +--- trunk.orig/utils/testsuite.c ++++ trunk/utils/testsuite.c +@@ -464,9 +464,9 @@ + *len = (unsigned) strlen("sasldb"); + return SASL_OK; + } else if (!strcmp(option, "sasldb_path")) { +- *result = "./sasldb"; ++ *result = "/etc/sasldb2"; + if (len) +- *len = (unsigned) strlen("./sasldb"); ++ *len = (unsigned) strlen("/etc/sasldb2"); + return SASL_OK; + } else if (!strcmp(option, "canon_user_plugin")) { + *result = cu_plugin; +@@ -2925,7 +2925,7 @@ + void usage(void) + { + printf("Usage:\n" \ +- " testsuite [-g name] [-s seed] [-r tests] -a -M\n" \ ++ " sasltestsuite [-g name] [-s seed] [-r tests] -a -M\n" \ + " g -- gssapi service name to use (default: host)\n" \ + " r -- # of random tests to do (default: 25)\n" \ + " a -- do all corruption tests (and ignores random ones unless -r specified)\n" \ diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0006_library_mutexes.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0006_library_mutexes.patch new file mode 100644 index 000000000000..539bc06742e7 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0006_library_mutexes.patch @@ -0,0 +1,25 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Exact description unknown; make sure mutex-related code works. +--- trunk.orig/lib/common.c ++++ trunk/lib/common.c +@@ -771,7 +771,7 @@ + result = sasl_canonuser_add_plugin("INTERNAL", internal_canonuser_init); + if(result != SASL_OK) return result; + +- if (!free_mutex) ++ if (!free_mutex || free_mutex == 0x1) + free_mutex = sasl_MUTEX_ALLOC(); + if (!free_mutex) return SASL_FAIL; + +@@ -790,6 +790,11 @@ + + /* serialize disposes. this is necessary because we can't + dispose of conn->mutex if someone else is locked on it */ ++ ++ if (!free_mutex || free_mutex == 0x1) ++ free_mutex = sasl_MUTEX_ALLOC(); ++ if (!free_mutex) return SASL_FAIL; ++ + result = sasl_MUTEX_LOCK(free_mutex); + if (result!=SASL_OK) return; + diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0008_one_time_sasl_set_alloc.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0008_one_time_sasl_set_alloc.patch new file mode 100644 index 000000000000..e252bab568b1 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0008_one_time_sasl_set_alloc.patch @@ -0,0 +1,67 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Make sasl_set_alloc a one-time function. +This patch will divert all allocations to whomever called +sasl_set_alloc first, hopefully that will be the application. If +not, we sure *hope* the library doing stupid things has sane +sasl_set_alloc semantics... +It will also deny any futher tries to sasl_set_alloc after one +of the _init functions are called. +This patch was introduced and works fine in SASL 1.5, and no +applications started behaving in insane ways, so chances are it +will also work with SASL 2.1 +Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=139568 +Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=274087 +Reference: https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2525 +--- trunk.orig/lib/client.c ++++ trunk/lib/client.c +@@ -202,6 +202,9 @@ + { NULL, NULL } + }; + ++ /* lock allocation type */ ++ _sasl_allocation_locked++; ++ + if(_sasl_client_active) { + /* We're already active, just increase our refcount */ + /* xxx do something with the callback structure? */ +--- trunk.orig/lib/common.c ++++ trunk/lib/common.c +@@ -107,6 +107,7 @@ + (sasl_realloc_t *) &realloc, + (sasl_free_t *) &free + }; ++int _sasl_allocation_locked = 0; + + #define SASL_ENCODEV_EXTRA 4096 + +@@ -637,6 +638,8 @@ + sasl_realloc_t *r, + sasl_free_t *f) + { ++ if (_sasl_allocation_locked++) return; ++ + _sasl_allocation_utils.malloc=m; + _sasl_allocation_utils.calloc=c; + _sasl_allocation_utils.realloc=r; +--- trunk.orig/lib/saslint.h ++++ trunk/lib/saslint.h +@@ -300,6 +300,7 @@ + + extern sasl_allocation_utils_t _sasl_allocation_utils; + extern sasl_mutex_utils_t _sasl_mutex_utils; ++extern int _sasl_allocation_locked; + + /* + * checkpw.c +--- trunk.orig/lib/server.c ++++ trunk/lib/server.c +@@ -698,6 +698,9 @@ + { NULL, NULL } + }; + ++ /* lock allocation type */ ++ _sasl_allocation_locked++; ++ + /* we require the appname (if present) to be short enough to be a path */ + if (appname != NULL && strlen(appname) >= PATH_MAX) + return SASL_BADPARAM; diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0010_maintainer_mode.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0010_maintainer_mode.patch new file mode 100644 index 000000000000..14d4456494f4 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0010_maintainer_mode.patch @@ -0,0 +1,13 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Enable maintainer mode to avoid auto* problems. +--- trunk.orig/configure.in ++++ trunk/configure.in +@@ -62,6 +62,8 @@ + AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.23) + CMU_INIT_AUTOMAKE + ++AM_MAINTAINER_MODE ++ + # and include our config dir scripts + ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config" + diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0011_saslauthd_ac_prog_libtool.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0011_saslauthd_ac_prog_libtool.patch new file mode 100644 index 000000000000..e9b92a40d8e0 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0011_saslauthd_ac_prog_libtool.patch @@ -0,0 +1,12 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: Enable libtool use. +--- trunk.orig/saslauthd/configure.in ++++ trunk/saslauthd/configure.in +@@ -25,6 +25,7 @@ + AC_PROG_MAKE_SET + AC_PROG_LN_S + AC_PROG_INSTALL ++AC_PROG_LIBTOOL + + dnl Checks for build foo + CMU_C___ATTRIBUTE__ diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0012_xopen_crypt_prototype.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0012_xopen_crypt_prototype.patch new file mode 100644 index 000000000000..d9daad7d89c9 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0012_xopen_crypt_prototype.patch @@ -0,0 +1,15 @@ +Author: Dann Frazier <dannf@debian.org> +Description: When _XOPEN_SOURCE is defined, the subsequent #include <unistd.h> +will define a correct function prototype for the crypt function. This avoids +segfaults on architectures where the size of a pointer is greater than the size +of an integer (ia64 and amd64 are examples). This may be detected by looking +for build log lines such as the following: +auth_shadow.c:183: warning: implicit declaration of function ‘crypt’ +auth_shadow.c:183: warning: cast to pointer from integer of different size +--- trunk.orig/saslauthd/auth_shadow.c ++++ trunk/saslauthd/auth_shadow.c +@@ -1,3 +1,4 @@ ++#define _XOPEN_SOURCE + #define PWBUFSZ 256 /***SWB***/ + + /* MODULE: auth_shadow */ diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0014_avoid_pic_overwrite.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0014_avoid_pic_overwrite.patch new file mode 100644 index 000000000000..ffc69b77ccaf --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0014_avoid_pic_overwrite.patch @@ -0,0 +1,27 @@ +Author: Fabian Fagerholm <fabbe@debian.org> +Description: This patch makes sure the non-PIC version of libsasldb.a, which +is created out of non-PIC objects, is not going to overwrite the PIC version, +which is created out of PIC objects. The PIC version is placed in .libs, and +the non-PIC version in the current directory. This ensures that both non-PIC +and PIC versions are available in the correct locations. +--- trunk.orig/lib/Makefile.am ++++ trunk/lib/Makefile.am +@@ -76,7 +76,7 @@ + + libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) + @echo adding static plugins and dependencies +- $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) ++ $(AR) cru $@ $(SASL_STATIC_OBJS) + @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ + if test ! -f $$i; then continue; fi; . $$i; \ + for j in $$dependency_libs foo; do \ +--- trunk.orig/sasldb/Makefile.am ++++ trunk/sasldb/Makefile.am +@@ -63,6 +63,6 @@ + EXTRA_libsasldb_a_SOURCES = + + libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC) +- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC) ++ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC) + + diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch new file mode 100644 index 000000000000..a80ca0639690 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0016_pid_file_lock_creation_mask.patch @@ -0,0 +1,24 @@ +Author: Sam Hocevar <sam@zoy.org> +Description: pid_file_lock is created with a mask of 644 instead of 0644. This +patch fixes this octal/decimal confusion as well as the (harmless) one in the +previous umask() call. +--- trunk.orig/saslauthd/saslauthd-main.c ++++ trunk/saslauthd/saslauthd-main.c +@@ -276,7 +276,7 @@ + exit(1); + } + +- umask(077); ++ umask(0077); + + pid_file_size = strlen(run_path) + sizeof(PID_FILE_LOCK) + 1; + if ((pid_file_lock = malloc(pid_file_size)) == NULL) { +@@ -287,7 +287,7 @@ + strlcpy(pid_file_lock, run_path, pid_file_size); + strlcat(pid_file_lock, PID_FILE_LOCK, pid_file_size); + +- if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 644)) < 0) { ++ if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) { + rc = errno; + logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock); + logger(L_ERR, L_FUNC, "open: %s", strerror(rc)); diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-0026_drop_krb5support_dependency.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-0026_drop_krb5support_dependency.patch new file mode 100644 index 000000000000..4df6a5aba42c --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-0026_drop_krb5support_dependency.patch @@ -0,0 +1,38 @@ +Author: Roberto C. Sanchez <roberto@connexer.com> +Description: Drop gratuitous dependency on krb5support +--- trunk.orig/aclocal.m4 ++++ trunk/aclocal.m4 +@@ -2924,9 +2924,6 @@ + fi + + if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then +- # check for libkrb5support first +- AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) +- + gss_failed=0 + AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, + ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) +--- trunk.orig/cmulocal/sasl2.m4 ++++ trunk/cmulocal/sasl2.m4 +@@ -110,9 +110,6 @@ + fi + + if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then +- # check for libkrb5support first +- AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) +- + gss_failed=0 + AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, + ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) +--- trunk.orig/saslauthd/aclocal.m4 ++++ trunk/saslauthd/aclocal.m4 +@@ -1333,9 +1333,6 @@ + fi + + if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then +- # check for libkrb5support first +- AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) +- + gss_failed=0 + AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, + ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) |