- move sasldb auxprop modules into the -lib subpackage, so that we'll pick

it up for multilib systems
- install config files and init scripts using -p
- pull in patch to build with current automake (#229010, Jacek Konieczny
    and Robert Scheck)
- remove prereq on ldconfig: RPM should pick it up based on the -libs
    scriptlets
- pull in patch to correctly detect gsskrb5_register_acceptor_identity
    (#200892, Mirko Streckenbach)
- pull CVS fix for not tripping over extra commas in digest-md5 challenges
    (#229640)
- drop patches which were needed to keep static builds going
- remove static build, which is no longer a useful option because not all
    of our dependencies are available as static libraries
- drop gssapi-generic patch due to lack of interest
- update the bundled copy of db to 4.5.20 (#229012)
- drop dbconverter-2, as we haven't bundled v1 libraries since FC4
This commit is contained in:
Nalin Dahyabhai 2007-02-26 21:23:11 +00:00
parent 97964c327a
commit f9c172ba3a
7 changed files with 413 additions and 162 deletions

View File

@ -1,5 +1,6 @@
"Speak" the saslauthd version 1 protocol if "saslauthd_version" is "1". I "Speak" the saslauthd version 1 protocol if "saslauthd_version" is "1". I
don't think we'll be using this, but here for the sake of completeness. don't think we'll be using this (the other way around was far more useful),
but here for the sake of completeness.
--- cyrus-sasl-2.1.17/lib/checkpw.c 2003-09-09 11:38:13.000000000 -0400 --- cyrus-sasl-2.1.17/lib/checkpw.c 2003-09-09 11:38:13.000000000 -0400
+++ cyrus-sasl-2.1.17/lib/checkpw.c 2004-01-20 16:57:52.000000000 -0500 +++ cyrus-sasl-2.1.17/lib/checkpw.c 2004-01-20 16:57:52.000000000 -0500

View File

@ -1,4 +1,4 @@
--- cyrus-sasl-2.1.18/cmulocal/cyrus.m4.no_rpath 2004-05-13 14:32:14.341038898 +0200 --- cyrus-sasl-2.1.18/cmulocal/cyrus.m4 2004-05-13 14:32:14.341038898 +0200
+++ cyrus-sasl-2.1.18/cmulocal/cyrus.m4 2004-05-13 14:34:18.471968788 +0200 +++ cyrus-sasl-2.1.18/cmulocal/cyrus.m4 2004-05-13 14:34:18.471968788 +0200
@@ -32,14 +32,5 @@ @@ -32,14 +32,5 @@
dnl runpath initialization dnl runpath initialization

View File

@ -0,0 +1,39 @@
diff -u -r cyrus-sasl-2.1.21-orig/cmulocal/sasl2.m4 cyrus-sasl-2.1.21/cmulocal/sasl2.m4
--- cyrus-sasl-2.1.21-orig/cmulocal/sasl2.m4 2006-08-01 08:29:59.000000000 +0200
+++ cyrus-sasl-2.1.21/cmulocal/sasl2.m4 2006-08-01 08:31:32.000000000 +0200
@@ -257,7 +257,21 @@
cmu_save_LIBS="$LIBS"
LIBS="$LIBS $GSSAPIBASE_LIBS"
- AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
+ dnl AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
+ AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_KRB5_H,,[Define if you have the gssapi/gssapi_krb5.h header file]))
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_GSSAPI_H
+#include <gssapi.h>
+#else
+#include <gssapi/gssapi.h>
+#endif
+#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
+#include <gssapi/gssapi_krb5.h>
+#endif
+]],[[gsskrb5_register_acceptor_identity("");]])
+],[AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,,
+ [Define if your GSSAPI implimentation defines GSSKRB5_REGISTER_ACCEPTOR_IDENTITY])
+])
LIBS="$cmu_save_LIBS"
else
AC_MSG_RESULT([disabled])
diff -u -r cyrus-sasl-2.1.21-orig/plugins/gssapi.c cyrus-sasl-2.1.21/plugins/gssapi.c
--- cyrus-sasl-2.1.21-orig/plugins/gssapi.c 2004-07-21 16:39:06.000000000 +0200
+++ cyrus-sasl-2.1.21/plugins/gssapi.c 2006-08-01 08:30:26.000000000 +0200
@@ -50,6 +50,9 @@
#else
#include <gssapi/gssapi.h>
#endif
+#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
+#include <gssapi/gssapi_krb5.h>
+#endif
#ifdef WIN32
# include <winsock2.h>

View File

@ -0,0 +1,94 @@
Re-merged patch by Robert Scheck <redhat@linuxnetz.de> for cyrus-sasl >= 2.1.22, which was
originally written by Jacek Konieczny <jajcus@pld-linux.org> and makes cyrus-sasl building
using automake 1.10.
--- cyrus-sasl-2.1.22/plugins/Makefile.am 2006-05-17 18:46:16.000000000 +0200
+++ cyrus-sasl-2.1.22/plugins/Makefile.am.am110 2007-02-16 15:42:07.000000000 +0100
@@ -82,73 +82,73 @@
libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
-libplain_la_LDFLAGS = -version-info $(plain_version)
+libplain_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(plain_version)
libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
-libanonymous_la_LDFLAGS = -version-info $(anonymous_version)
+libanonymous_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(anonymous_version)
libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
libanonymous_la_LIBADD = $(COMPAT_OBJS)
libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
-libkerberos4_la_LDFLAGS = -version-info $(kerberos4_version)
+libkerberos4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(kerberos4_version)
libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources)
-libgssapiv2_la_LDFLAGS = -version-info $(gssapiv2_version)
+libgssapiv2_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(gssapiv2_version)
libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS)
libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
-libcrammd5_la_LDFLAGS = -version-info $(crammd5_version)
+libcrammd5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(crammd5_version)
libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
libcrammd5_la_LIBADD = $(COMPAT_OBJS)
libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
-libdigestmd5_la_LDFLAGS = -version-info $(digestmd5_version)
+libdigestmd5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(digestmd5_version)
libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
liblogin_la_SOURCES = login.c login_init.c $(common_sources)
-liblogin_la_LDFLAGS = -version-info $(login_version)
+liblogin_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(login_version)
liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
-libsrp_la_LDFLAGS = -version-info $(srp_version)
+libsrp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(srp_version)
libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
-libotp_la_LDFLAGS = -version-info $(otp_version)
+libotp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(otp_version)
libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
-libntlm_la_LDFLAGS = -version-info $(ntlm_version)
+libntlm_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ntlm_version)
libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
-libpassdss_la_LDFLAGS = -version-info $(passdss_version)
+libpassdss_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(passdss_version)
libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
# Auxprop Plugins
libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
-libsasldb_la_LDFLAGS = -version-info $(sasldb_version)
+libsasldb_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(sasldb_version)
libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
-libldapdb_la_LDFLAGS = $(LIB_LDAP) -version-info $(ldapdb_version)
+libldapdb_la_LDFLAGS = $(AM_LDFLAGS) $(LIB_LDAP) -version-info $(ldapdb_version)
libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
libldapdb_la_LIBADD = $(COMPAT_OBJS)
libsql_la_SOURCES = sql.c sql_init.c $(common_sources)
-libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) -version-info $(sql_version)
+libsql_la_LDFLAGS = $(AM_LDFLAGS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) -version-info $(sql_version)
libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
libsql_la_LIBADD = $(COMPAT_OBJS)

View File

@ -0,0 +1,148 @@
Pulled from CVS, Ident strings removed to let the patch apply pretty cleanly.
===================================================================
RCS file: /afs/andrew.cmu.edu/system/cvs/src/sasl/plugins/digestmd5.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- src/sasl/plugins/digestmd5.c 2006/11/27 20:41:55 1.183
+++ src/sasl/plugins/digestmd5.c 2007/02/14 17:16:14 1.184
@@ -556,12 +556,17 @@
return SASL_OK;
}
+static int is_lws_char (char c)
+{
+ return (c == ' ' || c == HT || c == CR || c == LF);
+}
+
static char *skip_lws (char *s)
{
if (!s) return NULL;
/* skipping spaces: */
- while (s[0] == ' ' || s[0] == HT || s[0] == CR || s[0] == LF) {
+ while (is_lws_char(s[0])) {
if (s[0] == '\0') break;
s++;
}
@@ -750,17 +755,30 @@
static void get_pair(char **in, char **name, char **value)
{
char *endpair;
- /* int inQuotes; */
char *curp = *in;
*name = NULL;
*value = NULL;
if (curp == NULL) return;
- if (curp[0] == '\0') return;
-
- /* skipping spaces: */
- curp = skip_lws(curp);
-
+
+ while (curp[0] != '\0') {
+ /* skipping spaces: */
+ curp = skip_lws(curp);
+
+ /* 'LWS "," LWS "," ...' is allowed by the DIGEST-MD5 ABNF */
+ if (curp[0] == ',') {
+ curp++;
+ } else {
+ break;
+ }
+ }
+
+ if (curp[0] == '\0') {
+ /* End of the string is not an error */
+ *name = "";
+ return;
+ }
+
*name = curp;
curp = skip_token(curp,1);
@@ -787,22 +805,24 @@
endpair = unquote (curp);
if (endpair == NULL) { /* Unbalanced quotes */
*name = NULL;
+ *value = NULL;
return;
}
- if (endpair[0] != ',') {
- if (endpair[0]!='\0') {
- *endpair++ = '\0';
- }
+
+ /* An optional LWS is allowed after the value. Skip it. */
+ if (is_lws_char (endpair[0])) {
+ /* Remove the trailing LWS from the value */
+ *endpair++ = '\0';
+ endpair = skip_lws(endpair);
}
-
- endpair = skip_lws(endpair);
-
+
/* syntax check: MUST be '\0' or ',' */
if (endpair[0] == ',') {
endpair[0] = '\0';
endpair++; /* skipping <,> */
} else if (endpair[0] != '\0') {
*name = NULL;
+ *value = NULL;
return;
}
@@ -2090,9 +2110,17 @@
char *name = NULL, *value = NULL;
get_pair(&in, &name, &value);
- if (name == NULL)
- break;
+ if (name == NULL) {
+ SETERROR(sparams->utils,
+ "Parse error");
+ result = SASL_BADAUTH;
+ goto FreeAllMem;
+ }
+ if (*name == '\0') {
+ break;
+ }
+
/* Extracting parameters */
/*
@@ -3222,10 +3250,14 @@
/* if parse error */
if (name == NULL) {
params->utils->seterror(params->utils->conn, 0, "Parse error");
- result = SASL_FAIL;
+ result = SASL_BADAUTH;
goto FreeAllocatedMem;
}
+ if (*name == '\0') {
+ break;
+ }
+
if (strcasecmp(name, "realm") == 0) {
nrealm++;
@@ -3887,9 +3919,14 @@
if (name == NULL) {
params->utils->seterror(params->utils->conn, 0,
"DIGEST-MD5 Received Garbage");
+ result = SASL_BADAUTH;
break;
}
+ if (*name == '\0') {
+ break;
+ }
+
if (strcasecmp(name, "rspauth") == 0) {
if (strcmp(text->response_value, value) != 0) {

View File

@ -1,15 +1,14 @@
%define _plugindir %{_libdir}/sasl
%define _plugindir2 %{_libdir}/sasl2 %define _plugindir2 %{_libdir}/sasl2
%define db_version 4.3.27 %define db_version 4.5.20
%define bootstrap_cyrus_sasl 0 %define bootstrap_cyrus_sasl 0
Summary: The Cyrus SASL library. Summary: The Cyrus SASL library
Name: cyrus-sasl Name: cyrus-sasl
Version: 2.1.22 Version: 2.1.22
Release: 5 Release: 6
License: Freely Distributable License: BSD
Group: System Environment/Libraries Group: System Environment/Libraries
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/, and # Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
# make-no-dlcompat-tarball.sh removes the "dlcompat" subdirectory and builds a # make-no-dlcompat-tarball.sh removes the "dlcompat" subdirectory and builds a
# new tarball. # new tarball.
Source0: cyrus-sasl-%{version}-nodlcompat.tar.gz Source0: cyrus-sasl-%{version}-nodlcompat.tar.gz
@ -21,31 +20,22 @@ Source9: saslauthd.sysconfig
Source10: make-no-dlcompat-tarball.sh Source10: make-no-dlcompat-tarball.sh
URL: http://asg.web.cmu.edu/sasl/sasl-library.html URL: http://asg.web.cmu.edu/sasl/sasl-library.html
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Patch5: cyrus-sasl-2.1.22-gdbm.patch
Patch6: cyrus-sasl-2.1.10-des.patch
Patch7: cyrus-sasl-2.1.20-gssapi-dynamic.patch
Patch9: cyrus-sasl-2.1.17-saslauthd1.patch
Patch10: cyrus-sasl-2.1.22-db_bundle.patch Patch10: cyrus-sasl-2.1.22-db_bundle.patch
Patch11: cyrus-sasl-2.1.18-no_rpath.patch Patch11: cyrus-sasl-2.1.18-no_rpath.patch
Patch13: cyrus-sasl-2.1.20-notgnu.patch
Patch14: cyrus-sasl-2.1.20-conflict.patch
Patch15: cyrus-sasl-2.1.20-saslauthd.conf-path.patch Patch15: cyrus-sasl-2.1.20-saslauthd.conf-path.patch
Patch16: cyrus-sasl-2.1.22-builddir.patch
Patch18: cyrus-sasl-2.1.21-linksrcs.patch
Patch21: cyrus-sasl-2.1.22-no-static-deps.patch
Patch22: cyrus-sasl-2.1.21-gssapi-generic.patch
Patch23: cyrus-sasl-2.1.19-omit_realm.patch
Patch24: cyrus-sasl-2.1.21-sizes.patch Patch24: cyrus-sasl-2.1.21-sizes.patch
Patch25: cyrus-sasl-2.1.22-typo.patch Patch25: cyrus-sasl-2.1.22-typo.patch
Patch50: db-4.3.27-initmem.patch Patch26: cyrus-sasl-2.1.22-digest-commas.patch
Buildroot: %{_tmppath}/%{name}-root Patch27: cyrus-sasl-2.1.22-automake-1.10.patch
BuildPrereq: autoconf, automake17, libtool, gdbm-devel, groff Patch28: cyrus-sasl-2.1.21-keytab.patch
BuildPrereq: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildPrereq: mysql-devel, postgresql-devel, zlib-devel BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
BuildRequires: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig
BuildRequires: mysql-devel, postgresql-devel, zlib-devel
%if ! %{bootstrap_cyrus_sasl} %if ! %{bootstrap_cyrus_sasl}
BuildPrereq: openldap-devel BuildRequires: openldap-devel
%endif %endif
Prereq: /sbin/ldconfig, chkconfig, /sbin/service Requires(post): chkconfig, /sbin/service
%description %description
The %{name} package contains the Cyrus implementation of SASL. The %{name} package contains the Cyrus implementation of SASL.
@ -54,7 +44,7 @@ adding authentication support to connection-based protocols.
%package lib %package lib
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: Shared libraries needed by applications which use Cyrus SASL. Summary: Shared libraries needed by applications which use Cyrus SASL
%description lib %description lib
The %{name}-lib package contains shared libraries which are needed by The %{name}-lib package contains shared libraries which are needed by
@ -63,7 +53,7 @@ applications which use the Cyrus SASL library.
%package devel %package devel
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: Development/Libraries Group: Development/Libraries
Summary: Files needed for developing applications with Cyrus SASL. Summary: Files needed for developing applications with Cyrus SASL
%description devel %description devel
The %{name}-devel package contains files needed for developing and The %{name}-devel package contains files needed for developing and
@ -72,7 +62,7 @@ compiling applications which use the Cyrus SASL library.
%package gssapi %package gssapi
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: GSSAPI authentication support for Cyrus SASL. Summary: GSSAPI authentication support for Cyrus SASL
%description gssapi %description gssapi
The %{name}-gssapi package contains the Cyrus SASL plugins which The %{name}-gssapi package contains the Cyrus SASL plugins which
@ -82,7 +72,7 @@ authentication.
%package plain %package plain
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: PLAIN and LOGIN authentication support for Cyrus SASL. Summary: PLAIN and LOGIN authentication support for Cyrus SASL
%description plain %description plain
The %{name}-plain package contains the Cyrus SASL plugins which support The %{name}-plain package contains the Cyrus SASL plugins which support
@ -91,7 +81,7 @@ PLAIN and LOGIN authentication schemes.
%package md5 %package md5
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: CRAM-MD5 and DIGEST-MD5 authentication support for Cyrus SASL. Summary: CRAM-MD5 and DIGEST-MD5 authentication support for Cyrus SASL
%description md5 %description md5
The %{name}-md5 package contains the Cyrus SASL plugins which support The %{name}-md5 package contains the Cyrus SASL plugins which support
@ -100,7 +90,7 @@ CRAM-MD5 and DIGEST-MD5 authentication schemes.
%package ntlm %package ntlm
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: NTLM authentication support for Cyrus SASL. Summary: NTLM authentication support for Cyrus SASL
%description ntlm %description ntlm
The %{name}-ntlm package contains the Cyrus SASL plugin which supports The %{name}-ntlm package contains the Cyrus SASL plugin which supports
@ -110,7 +100,7 @@ the NTLM authentication scheme.
%package sql %package sql
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: SQL auxprop support for Cyrus SASL. Summary: SQL auxprop support for Cyrus SASL
%description sql %description sql
The %{name}-sql package contains the Cyrus SASL plugin which supports The %{name}-sql package contains the Cyrus SASL plugin which supports
@ -120,7 +110,7 @@ using a RDBMS for storing shared secrets.
%package ldap %package ldap
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: LDAP auxprop support for Cyrus SASL. Summary: LDAP auxprop support for Cyrus SASL
%description ldap %description ldap
The %{name}-ldap package contains the Cyrus SASL plugin which supports using The %{name}-ldap package contains the Cyrus SASL plugin which supports using
@ -128,51 +118,38 @@ a directory server, accessed using LDAP, for storing shared secrets.
%prep %prep
%setup -q -a 6 %setup -q -a 6
chmod -x doc/*.html
pushd db-%{db_version}
%patch50 -p2 -b .initmem
popd
%patch5 -p1 -b .gdbm
%patch6 -p1 -b .des
%patch7 -p1 -b .gssapi-dynamic
#%patch9 -p1 -b .saslauthd1
%patch10 -p1 -b .db_bundle %patch10 -p1 -b .db_bundle
%patch11 -p1 -b .no_rpath %patch11 -p1 -b .no_rpath
%patch13 -p1 -b .notgnu
%patch14 -p1 -b .conflict
%patch15 -p1 -b .path %patch15 -p1 -b .path
%patch16 -p1 -b .builddir
%patch18 -p1 -b .linksrcs
%patch21 -p1 -b .no-static-deps
%patch22 -p1 -b .gssapi-generic
#%patch23 -p1 -b .omit_realm
%patch24 -p1 -b .sizes %patch24 -p1 -b .sizes
%patch25 -p1 -b .typo %patch25 -p1 -b .typo
# FIXME - this is just weird %patch26 -p2 -b .digest-commas
rm config/ltconfig config/libtool.m4 %patch27 -p1 -b .automake-1.10
%patch28 -p1 -b .keytab
# FIXME - we remove these files directly so that we can avoid using the -f
# flag, which has a nasty habit of overwriting files like COPYING.
rm -f config/config.guess config/config.sub
rm -f config/ltconfig config/ltmain.sh config/libtool.m4
rm -fr autom4te.cache rm -fr autom4te.cache
libtoolize -f -c libtoolize -c
aclocal-1.7 -I config -I cmulocal aclocal -I config -I cmulocal
automake-1.7 -a -c -f automake -a -c
autoheader autoheader
autoconf -f autoconf
pushd saslauthd pushd saslauthd
# FIXME - this is just weird rm -f config/config.guess config/config.sub
rm config/ltconfig rm -f config/ltconfig config/ltmain.sh config/libtool.m4
rm -fr autom4te.cache rm -fr autom4te.cache
libtoolize -f -c libtoolize -c
aclocal-1.7 -I config -I ../cmulocal -I ../config aclocal -I config -I ../cmulocal -I ../config
automake-1.7 -a -c -f automake -a -c
autoheader autoheader
autoconf -f autoconf
popd popd
mkdir build-static build-shared
ln -s ../configure build-static
ln -s ../configure build-shared
%build %build
CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
@ -180,11 +157,11 @@ CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
topdir=`pwd` topdir=`pwd`
pushd db-%{db_version}/build_unix pushd db-%{db_version}/build_unix
../dist/configure \ ../dist/configure \
--with-mutex=UNIX/fcntl --disable-shared --enable-static --with-pic \ --with-mutex=UNIX/fcntl --disable-shared --enable-static --with-pic \
--with-uniquename=_cyrus_sasl_sasldb_rh \ --with-uniquename=_cyrus_sasl_sasldb_rh \
--prefix=${topdir}/db-instroot \ --prefix=${topdir}/db-instroot \
--includedir=${topdir}/db-instroot/include \ --includedir=${topdir}/db-instroot/include \
--libdir=${topdir}/db-instroot/lib --libdir=${topdir}/db-instroot/lib
make make
make install make install
popd popd
@ -192,17 +169,19 @@ popd
# Find Kerberos. # Find Kerberos.
krb5_prefix=`krb5-config --prefix` krb5_prefix=`krb5-config --prefix`
if test x$krb5_prefix = x%{_prefix} ; then if test x$krb5_prefix = x%{_prefix} ; then
krb5_prefix= krb5_prefix=
else else
CPPFLAGS="-I${krb5_prefix}/include"; export CPPFLAGS CPPFLAGS="-I${krb5_prefix}/include"; export CPPFLAGS
CFLAGS="-I${krb5_prefix}/include $CFLAGS" CFLAGS="-I${krb5_prefix}/include $CFLAGS"
LDFLAGS="-L${krb5_prefix}/%{_lib}"; export LDFLAGS LDFLAGS="-L${krb5_prefix}/%{_lib}"; export LDFLAGS
fi fi
# Find OpenSSL.
LIBS="-lcrypt"; export LIBS LIBS="-lcrypt"; export LIBS
if pkg-config openssl ; then if pkg-config openssl ; then
CPPFLAGS="`pkg-config --cflags-only-I openssl` $CPPFLAGS"; export CPPFLAGS CPPFLAGS="`pkg-config --cflags-only-I openssl` $CPPFLAGS"; export CPPFLAGS
CFLAGS="`pkg-config --cflags openssl` $CFLAGS"; export CFLAGS CFLAGS="`pkg-config --cflags openssl` $CFLAGS"; export CFLAGS
LDFLAGS="`pkg-config --libs-only-L openssl` $LDFLAGS"; export LDFLAGS LDFLAGS="`pkg-config --libs-only-L openssl` $LDFLAGS"; export LDFLAGS
fi fi
# Find the SQL libraries used needed by the SQL auxprop plugin. # Find the SQL libraries used needed by the SQL auxprop plugin.
@ -218,115 +197,84 @@ SQL_LIBS=`eval echo "$SQL_LIBS" | sed -e 's,-[^l][^ ]*,,g'`
echo $SQL_LIBS echo $SQL_LIBS
cleanup_flags() { cleanup_flags() {
sed -r -e 's,-D_GNU_SOURCE(=[^[:blank:]]+)?,,g' \ sed -r -e 's,-D_GNU_SOURCE(=[^[:blank:]]+)?,,g' \
-e 's,-D_FILE_OFFSET_BITS=[[:digit:]]+,,g' \ -e 's,-D_FILE_OFFSET_BITS=[[:digit:]]+,,g' \
-e 's,-D_LARGEFILE_SOURCE(=[^[:blank:]]+)?,,g' \ -e 's,-D_LARGEFILE_SOURCE(=[^[:blank:]]+)?,,g' \
-e 's,[[:blank:]]+, ,g' -e 's,[[:blank:]]+, ,g'
} }
CFLAGS=`echo $CFLAGS $SQL_CFLAGS | cleanup_flags`; export CFLAGS CFLAGS=`echo $CFLAGS $SQL_CFLAGS | cleanup_flags`; export CFLAGS
CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | cleanup_flags`; export CPPFLAGS CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | cleanup_flags`; export CPPFLAGS
LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | cleanup_flags`; export LDFLAGS LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | cleanup_flags`; export LDFLAGS
build() {
pushd build-$1
shift
%configure \ %configure \
--enable-shared --enable-static \ --enable-shared --disable-static \
--disable-java \ --disable-java \
--with-plugindir=%{_plugindir2} \ --with-plugindir=%{_plugindir2} \
--with-configdir=%{_plugindir2}:%{_sysconfdir}/sasl2 \ --with-configdir=%{_plugindir2}:%{_sysconfdir}/sasl2 \
--disable-krb4 \ --disable-krb4 \
--enable-gssapi${krb5_prefix:+=${krb5_prefix}} \ --enable-gssapi${krb5_prefix:+=${krb5_prefix}} \
--with-gss_impl=mit \ --with-gss_impl=mit \
--with-rc4 \ --with-rc4 \
--with-dblib=berkeley \ --with-dblib=berkeley \
--with-bdb-incdir=${topdir}/db-instroot/include \ --with-bdb-incdir=${topdir}/db-instroot/include \
--with-bdb-libdir=${topdir}/db-instroot/lib \ --with-bdb-libdir=${topdir}/db-instroot/lib \
--with-saslauthd=/var/run/saslauthd --without-pwcheck \ --with-saslauthd=/var/run/saslauthd --without-pwcheck \
--with-ldap \ --with-ldap \
--with-devrandom=/dev/urandom \ --with-devrandom=/dev/urandom \
--enable-anon \ --enable-anon \
--enable-cram \ --enable-cram \
--enable-digest \ --enable-digest \
--enable-ntlm \ --enable-ntlm \
--enable-plain \ --enable-plain \
--enable-login \ --enable-login \
--disable-otp \ --disable-otp \
--enable-ldapdb \ --enable-ldapdb \
--enable-sql --with-mysql=%{_prefix} --with-pgsql=%{_prefix} \ --enable-sql --with-mysql=%{_prefix} --with-pgsql=%{_prefix} \
--without-sqlite \ --without-sqlite \
"$@" "$@"
# --enable-auth-sasldb -- EXPERIMENTAL # --enable-auth-sasldb -- EXPERIMENTAL
make sasldir=%{_plugindir2} make sasldir=%{_plugindir2}
make -C saslauthd testsaslauthd make -C saslauthd testsaslauthd
make -C sample make -C sample
popd
}
# Build the static library without sql or ldapdb auxprop support. Hopefully # Build a small program to list the available mechanisms, because I need it.
# the only users of the static library will be clients, which don't use auxprop pushd lib
# functionality anyway. ../libtool --tag=CC --mode=link %{__cc} -o sasl2-shared-mechlist -I../include $CFLAGS %{SOURCE7} $LDFLAGS ./libsasl2.la
build static --enable-static --disable-ldapdb --disable-shared --disable-sql
# Build the shared library with all that good stuff.
build shared --enable-static --enable-shared
# Merge our static libdb in with libsasl, because we won't be installing it.
pushd build-static/lib
ar x ${topdir}/db-instroot/lib/libdb.a
ar cru libsasl2.a `ar t ${topdir}/db-instroot/lib/libdb.a`
tagname=CC ../libtool --mode=link %{__cc} -o sasl2-static-mechlist -I../../include $CFLAGS $RPM_SOURCE_DIR/sasl-mechlist.c $LDFLAGS ./libsasl2.la
popd
# Build small programs to list the available mechanisms, because I need them.
pushd build-shared/lib
tagname=CC ../libtool --mode=link %{__cc} -o sasl2-shared-mechlist -I../../include $CFLAGS $RPM_SOURCE_DIR/sasl-mechlist.c $LDFLAGS ./libsasl2.la
popd
%install %install
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
pushd build-shared
make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2} make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2}
cd ../build-static
make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2}
cd ../build-shared
make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2} -C plugins make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2} -C plugins
install -m755 -d $RPM_BUILD_ROOT%{_bindir}
libtool --mode=install \ install -m755 -d $RPM_BUILD_ROOT%{_bindir}
./libtool --tag=CC --mode=install \
install -m755 sample/client $RPM_BUILD_ROOT%{_bindir}/sasl2-sample-client install -m755 sample/client $RPM_BUILD_ROOT%{_bindir}/sasl2-sample-client
libtool --mode=install \ ./libtool --tag=CC --mode=install \
install -m755 sample/server $RPM_BUILD_ROOT%{_bindir}/sasl2-sample-server install -m755 sample/server $RPM_BUILD_ROOT%{_bindir}/sasl2-sample-server
libtool --mode=install \ ./libtool --tag=CC --mode=install \
install -m755 saslauthd/testsaslauthd $RPM_BUILD_ROOT%{_sbindir}/testsaslauthd install -m755 saslauthd/testsaslauthd $RPM_BUILD_ROOT%{_sbindir}/testsaslauthd
libtool --mode=install \
install -m755 utils/dbconverter-2 $RPM_BUILD_ROOT%{_sbindir}/dbconverter-2
# Install the saslauthd mdoc page in the expected location. Sure, it's not # Install the saslauthd mdoc page in the expected location. Sure, it's not
# really a man page, but groff seems to be able to cope with it. # really a man page, but groff seems to be able to cope with it.
install -m755 -d $RPM_BUILD_ROOT%{_mandir}/man8/ install -m755 -d $RPM_BUILD_ROOT%{_mandir}/man8/
install -m644 ../saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8 install -m644 -p saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8
popd
# Create the saslauthd listening directory. # Create the saslauthd listening directory.
install -m755 -d $RPM_BUILD_ROOT/var/run/saslauthd install -m755 -d $RPM_BUILD_ROOT/var/run/saslauthd
# Install the init script. # Install the init script for saslauthd and the init script's config file.
install -m755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d $RPM_BUILD_ROOT/etc/sysconfig install -m755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d $RPM_BUILD_ROOT/etc/sysconfig
install -m755 $RPM_SOURCE_DIR/saslauthd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd install -m755 -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd
install -m644 $RPM_SOURCE_DIR/saslauthd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/saslauthd install -m644 -p %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd
# Install the config dirs if they're not already there. # Install the config dirs if they're not already there.
install -m755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2 install -m755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
install -m755 -d $RPM_BUILD_ROOT/%{_plugindir2} install -m755 -d $RPM_BUILD_ROOT/%{_plugindir2}
# Provide an easy way to query the list of available mechanisms. # Provide an easy way to query the list of available mechanisms.
libtool --mode=install \ ./libtool --tag=CC --mode=install \
install -m755 build-static/lib/sasl2-static-mechlist \ install -m755 lib/sasl2-shared-mechlist $RPM_BUILD_ROOT/%{_sbindir}/
$RPM_BUILD_ROOT%{_sbindir}/
libtool --mode=install \
install -m755 build-shared/lib/sasl2-shared-mechlist \
$RPM_BUILD_ROOT%{_sbindir}/
# Remove unpackaged files from the buildroot. # Remove unpackaged files from the buildroot.
rm -f $RPM_BUILD_ROOT%{_libdir}/sasl2/libotp.* rm -f $RPM_BUILD_ROOT%{_libdir}/sasl2/libotp.*
@ -342,12 +290,13 @@ test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
%preun %preun
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
/sbin/chkconfig --del saslauthd /sbin/service saslauthd stop 2>&1 > /dev/null
/sbin/chkconfig --del saslauthd
fi fi
%postun %postun
if [ $1 -ne 0 ] ; then if [ $1 -ne 0 ] ; then
/sbin/service saslauthd condrestart 2>&1 > /dev/null /sbin/service saslauthd condrestart 2>&1 > /dev/null
fi fi
%post lib -p /sbin/ldconfig %post lib -p /sbin/ldconfig
@ -357,13 +306,8 @@ fi
%defattr(-,root,root) %defattr(-,root,root)
%doc saslauthd/LDAP_SASLAUTHD %doc saslauthd/LDAP_SASLAUTHD
%dir %{_plugindir2}/ %dir %{_plugindir2}/
%{_plugindir2}/*sasldb*.so*
%{_plugindir2}/*sasldb*.la
%{_mandir}/man8/* %{_mandir}/man8/*
%{_sbindir}/dbconverter-2
%{_sbindir}/pluginviewer %{_sbindir}/pluginviewer
%{_sbindir}/saslpasswd2
%{_sbindir}/sasldblistusers2
%{_sbindir}/saslauthd %{_sbindir}/saslauthd
%{_sbindir}/testsaslauthd %{_sbindir}/testsaslauthd
%config(noreplace) /etc/sysconfig/saslauthd %config(noreplace) /etc/sysconfig/saslauthd
@ -378,6 +322,10 @@ fi
%dir %{_plugindir2}/ %dir %{_plugindir2}/
%{_plugindir2}/*anonymous*.so* %{_plugindir2}/*anonymous*.so*
%{_plugindir2}/*anonymous*.la %{_plugindir2}/*anonymous*.la
%{_plugindir2}/*sasldb*.so*
%{_plugindir2}/*sasldb*.la
%{_sbindir}/saslpasswd2
%{_sbindir}/sasldblistusers2
%files plain %files plain
%defattr(-,root,root) %defattr(-,root,root)
@ -419,13 +367,34 @@ fi
%{_bindir}/sasl2-sample-client %{_bindir}/sasl2-sample-client
%{_bindir}/sasl2-sample-server %{_bindir}/sasl2-sample-server
%{_includedir}/* %{_includedir}/*
%{_libdir}/libsasl*.a
%{_libdir}/libsasl*.*so %{_libdir}/libsasl*.*so
%{_mandir}/man3/* %{_mandir}/man3/*
%{_sbindir}/sasl2-static-mechlist
%{_sbindir}/sasl2-shared-mechlist %{_sbindir}/sasl2-shared-mechlist
%changelog %changelog
* Mon Feb 26 2007 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-6
- install config files and init scripts using -p
- pull in patch to build with current automake (#229010, Jacek Konieczny
and Robert Scheck)
- remove prereq on ldconfig, RPM should pick it up based on the -libs
scriptlets
- pull in patch to correctly detect gsskrb5_register_acceptor_identity
(#200892, Mirko Streckenbach)
- move sasldb auxprop modules into the -lib subpackage, so that we'll pick
it up for multilib systems
* Thu Feb 22 2007 Nalin Dahyabhai <nalin@redhat.com>
- pull CVS fix for not tripping over extra commas in digest-md5
challenges (#229640)
* Fri Feb 16 2007 Nalin Dahyabhai <nalin@redhat.com>
- remove static build, which is no longer a useful option because not all of
our dependencies are available as static libraries
- drop patches which were needed to keep static builds going
- drop gssapi-generic patch due to lack of interest
- update the bundled copy of db to 4.5.20 (#229012)
- drop dbconverter-2, as we haven't bundled v1 libraries since FC4
* Tue Dec 5 2006 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-5 * Tue Dec 5 2006 Nalin Dahyabhai <nalin@redhat.com> 2.1.22-5
- rebuild - rebuild
- add 'authentication' or 'auxprop' to summaries for plugin packages to - add 'authentication' or 'auxprop' to summaries for plugin packages to

View File

@ -1,2 +1,2 @@
c5c56c86a1397443d3b75b6864cb630d cyrus-sasl-2.1.22-nodlcompat.tar.gz c5c56c86a1397443d3b75b6864cb630d cyrus-sasl-2.1.22-nodlcompat.tar.gz
fcc481d52c3b80e20a328f8c0cb042bd db-4.3.27.tar.gz b0f1c777708cb8e9d37fb47e7ed3312d db-4.5.20.tar.gz