From 02fcfa453d52658246d8d9d6033fc67789cdec770dc978791c504953adba86a2 Mon Sep 17 00:00:00 2001 From: Howard Guo Date: Mon, 25 Jan 2016 13:05:16 +0000 Subject: [PATCH] bring back accidentally removed patches OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=147 --- 0001-build-adjustments.dif | 39 ------------------- 0004-libldap-use-gethostbyname_r.dif | 31 --------------- 0007-Recover-on-DB-version-change.dif | 29 ++++++++++++++ ...nd-do-not-return-Connection0-entries.patch | 29 ++++++++++++++ ...0010-Enforce-minimum-DH-size-of-1024.patch | 0 ....patch => 0011-openldap-re24-its7796.patch | 0 ....patch => 0012-openldap-re24-its8336.patch | 0 openldap2-client.changes | 6 ++- openldap2-client.spec | 11 ++++-- openldap2.changes | 6 ++- openldap2.spec | 11 ++++-- 11 files changed, 80 insertions(+), 82 deletions(-) delete mode 100644 0001-build-adjustments.dif delete mode 100644 0004-libldap-use-gethostbyname_r.dif create mode 100644 0007-Recover-on-DB-version-change.dif create mode 100644 0008-In-monitor-backend-do-not-return-Connection0-entries.patch rename 0011-Enforce-minimum-DH-size-of-1024.patch => 0010-Enforce-minimum-DH-size-of-1024.patch (100%) rename openldap-re24-its7796.patch => 0011-openldap-re24-its7796.patch (100%) rename openldap-re24-its8336.patch => 0012-openldap-re24-its8336.patch (100%) diff --git a/0001-build-adjustments.dif b/0001-build-adjustments.dif deleted file mode 100644 index f7327da..0000000 --- a/0001-build-adjustments.dif +++ /dev/null @@ -1,39 +0,0 @@ -From 39e5cc1cbae0f7c64ba242357a5d50f23a8475ba Mon Sep 17 00:00:00 2001 -From: Ralf Haferkamp -Date: Wed, 16 Jun 2010 14:04:07 +0200 -Subject: build-adjustments - -- Adjusted modules path -- don't use automake macro - -diff --git a/build/top.mk b/build/top.mk -index 14e291e..633c9a4 100644 ---- a/build/top.mk -+++ b/build/top.mk -@@ -40,7 +40,7 @@ libdir = @libdir@ - libexecdir = @libexecdir@ - localstatedir = @localstatedir@ - mandir = @mandir@ --moduledir = @libexecdir@$(ldap_subdir) -+moduledir = @libexecdir@/modules - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - sysconfdir = @sysconfdir@$(ldap_subdir) -diff --git a/configure.in b/configure.in -index 792cf0c..6c357ee 100644 ---- a/configure.in -+++ b/configure.in -@@ -69,7 +69,9 @@ dnl Determine host platform - dnl we try not to use this for much - AC_CANONICAL_TARGET([]) - --AM_INIT_AUTOMAKE([$OL_PACKAGE],[$OL_VERSION], [no defines])dnl -+AC_PROG_MAKE_SET -+PACKAGE=$OL_PACKAGE -+VERSION=$OL_VERSION - AC_SUBST(PACKAGE)dnl - AC_SUBST(VERSION)dnl - AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package) --- -1.7.10.4 - diff --git a/0004-libldap-use-gethostbyname_r.dif b/0004-libldap-use-gethostbyname_r.dif deleted file mode 100644 index cc01842..0000000 --- a/0004-libldap-use-gethostbyname_r.dif +++ /dev/null @@ -1,31 +0,0 @@ -From a36c907fe49e96a304c294a0d46b34c374c29c7f Mon Sep 17 00:00:00 2001 -From: Ralf Haferkamp -Date: Wed, 16 Jun 2010 14:08:03 +0200 -Subject: libldap use gethostbyname_r - - -diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c -index 3510aec..666cdad 100644 ---- a/libraries/libldap/util-int.c -+++ b/libraries/libldap/util-int.c -@@ -52,7 +52,7 @@ extern int h_errno; - #ifndef LDAP_R_COMPILE - # undef HAVE_REENTRANT_FUNCTIONS - # undef HAVE_CTIME_R --# undef HAVE_GETHOSTBYNAME_R -+/* # undef HAVE_GETHOSTBYNAME_R */ - # undef HAVE_GETHOSTBYADDR_R - - #else -@@ -317,7 +317,7 @@ ldap_pvt_csnstr(char *buf, size_t len, unsigned int replica, unsigned int mod) - #define BUFSTART (1024-32) - #define BUFMAX (32*1024-32) - --#if defined(LDAP_R_COMPILE) -+#if defined(LDAP_R_COMPILE) || defined(HAVE_GETHOSTBYNAME_R) - static char *safe_realloc( char **buf, int len ); - - #if !(defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R)) --- -1.7.10.4 - diff --git a/0007-Recover-on-DB-version-change.dif b/0007-Recover-on-DB-version-change.dif new file mode 100644 index 0000000..37f109b --- /dev/null +++ b/0007-Recover-on-DB-version-change.dif @@ -0,0 +1,29 @@ +From 895fa6d9b49344e1a92f7df3ed65458519e22f98 Mon Sep 17 00:00:00 2001 +From: Ralf Haferkamp +Date: Tue, 5 Oct 2010 14:20:22 +0200 +Subject: Recover on DB version change + +If the libdb Version changed try to recover the database. Note: This will +only succeed if only the format of transaction logs changed. + +diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c +index ac5a6d5..fea5cb4 100644 +--- a/servers/slapd/back-bdb/init.c ++++ b/servers/slapd/back-bdb/init.c +@@ -330,6 +330,13 @@ shm_retry: + rc = (bdb->bi_dbenv->open)( bdb->bi_dbenv, dbhome, + flags | do_recover, bdb->bi_dbenv_mode ); + ++ if ( rc == DB_VERSION_MISMATCH ) { ++ Debug( LDAP_DEBUG_ANY, ++ LDAP_XSTRING(bdb_db_open) ": bdb version change detected " ++ "trying to recover\n", 0, 0, 0 ); ++ rc = (bdb->bi_dbenv->open)( bdb->bi_dbenv, dbhome, ++ flags | DB_RECOVER, bdb->bi_dbenv_mode ); ++ } + if ( rc ) { + /* Regular open failed, probably a missing shm environment. + * Start over, do a recovery. +-- +1.7.10.4 + diff --git a/0008-In-monitor-backend-do-not-return-Connection0-entries.patch b/0008-In-monitor-backend-do-not-return-Connection0-entries.patch new file mode 100644 index 0000000..1cdb257 --- /dev/null +++ b/0008-In-monitor-backend-do-not-return-Connection0-entries.patch @@ -0,0 +1,29 @@ +From d4b247e43fe1ea1b3713f3d8f493422d5adcc537 Mon Sep 17 00:00:00 2001 +From: HouzuoGuo +Date: Fri, 13 Mar 2015 16:14:10 +0100 +Subject: [PATCH] In monitor backend, do not return Connection0 entries as they + are created for internal use only. + +--- + servers/slapd/back-monitor/conn.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c +index c1995b0..2d27738 100644 +--- a/servers/slapd/back-monitor/conn.c ++++ b/servers/slapd/back-monitor/conn.c +@@ -454,6 +454,11 @@ monitor_subsys_conn_create( + c != NULL; + c = connection_next( c, &connindex ) ) + { ++ /* Connection 0 is created by connection_client_setup for internal use only */ ++ if (c->c_connid == 0) { ++ continue; ++ } ++ + monitor_entry_t *mp; + + if ( conn_create( mi, c, &e, ms ) != SLAP_CB_CONTINUE +-- +2.1.4 + diff --git a/0011-Enforce-minimum-DH-size-of-1024.patch b/0010-Enforce-minimum-DH-size-of-1024.patch similarity index 100% rename from 0011-Enforce-minimum-DH-size-of-1024.patch rename to 0010-Enforce-minimum-DH-size-of-1024.patch diff --git a/openldap-re24-its7796.patch b/0011-openldap-re24-its7796.patch similarity index 100% rename from openldap-re24-its7796.patch rename to 0011-openldap-re24-its7796.patch diff --git a/openldap-re24-its8336.patch b/0012-openldap-re24-its8336.patch similarity index 100% rename from openldap-re24-its8336.patch rename to 0012-openldap-re24-its8336.patch diff --git a/openldap2-client.changes b/openldap2-client.changes index 34efd1f..a43812c 100644 --- a/openldap2-client.changes +++ b/openldap2-client.changes @@ -23,12 +23,14 @@ Tue Dec 8 11:36:16 UTC 2015 - michael@stroeder.com - Set OPENLDAP_START_LDAPI="yes" in /etc/sysconfig/openldap - Set OPENLDAP_REGISTER_SLP="no" in /etc/sysconfig/openldap - Added patch for OpenLDAP ITS#7796 to avoid excessive - "not index" logging + "not index" logging: + 0011-openldap-re24-its7796.patch - Replaced openldap-rc.tgz with single source files - Added soft dependency (Recommends) to cyrus-sasl - Added soft dependency (Recommends) to cyrus-sasl-devel to openldap2-devel -- Added patch for OpenLDAP ITS#8336 (assert in liblmdb) +- Added patch for OpenLDAP ITS#8336 (assert in liblmdb): + 0012-openldap-re24-its8336.patch ------------------------------------------------------------------- Wed Dec 2 12:50:47 UTC 2015 - hguo@suse.com diff --git a/openldap2-client.spec b/openldap2-client.spec index 5e68726..2545dea 100644 --- a/openldap2-client.spec +++ b/openldap2-client.spec @@ -48,13 +48,14 @@ Source15: SuSEfirewall2.openldap Source16: sysconfig.openldap Patch2: 0002-slapd.conf.dif Patch3: 0003-LDAPI-socket-location.dif -#Patch4: 0004-libldap-use-gethostbyname_r.dif Patch5: 0005-pie-compile.dif Patch6: 0006-No-Build-date-and-time-in-binaries.dif +Patch7: 0007-Recover-on-DB-version-change.dif +Patch8: 0008-In-monitor-backend-do-not-return-Connection0-entries.patch Patch9: 0009-Fix-ldap-host-lookup-ipv6.patch -Patch10: openldap-re24-its7796.patch -Patch11: 0011-Enforce-minimum-DH-size-of-1024.patch -Patch12: openldap-re24-its8336.patch +Patch10: 0010-Enforce-minimum-DH-size-of-1024.patch +Patch11: 0011-openldap-re24-its7796.patch +Patch12: 0012-openldap-re24-its8336.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cyrus-sasl-devel BuildRequires: groff @@ -213,6 +214,8 @@ This package contains the OpenLDAP client libraries. #%patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 diff --git a/openldap2.changes b/openldap2.changes index 34efd1f..a43812c 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -23,12 +23,14 @@ Tue Dec 8 11:36:16 UTC 2015 - michael@stroeder.com - Set OPENLDAP_START_LDAPI="yes" in /etc/sysconfig/openldap - Set OPENLDAP_REGISTER_SLP="no" in /etc/sysconfig/openldap - Added patch for OpenLDAP ITS#7796 to avoid excessive - "not index" logging + "not index" logging: + 0011-openldap-re24-its7796.patch - Replaced openldap-rc.tgz with single source files - Added soft dependency (Recommends) to cyrus-sasl - Added soft dependency (Recommends) to cyrus-sasl-devel to openldap2-devel -- Added patch for OpenLDAP ITS#8336 (assert in liblmdb) +- Added patch for OpenLDAP ITS#8336 (assert in liblmdb): + 0012-openldap-re24-its8336.patch ------------------------------------------------------------------- Wed Dec 2 12:50:47 UTC 2015 - hguo@suse.com diff --git a/openldap2.spec b/openldap2.spec index 53638f6..1ee5ca8 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -48,13 +48,14 @@ Source15: SuSEfirewall2.openldap Source16: sysconfig.openldap Patch2: 0002-slapd.conf.dif Patch3: 0003-LDAPI-socket-location.dif -#Patch4: 0004-libldap-use-gethostbyname_r.dif Patch5: 0005-pie-compile.dif Patch6: 0006-No-Build-date-and-time-in-binaries.dif +Patch7: 0007-Recover-on-DB-version-change.dif +Patch8: 0008-In-monitor-backend-do-not-return-Connection0-entries.patch Patch9: 0009-Fix-ldap-host-lookup-ipv6.patch -Patch10: openldap-re24-its7796.patch -Patch11: 0011-Enforce-minimum-DH-size-of-1024.patch -Patch12: openldap-re24-its8336.patch +Patch10: 0010-Enforce-minimum-DH-size-of-1024.patch +Patch11: 0011-openldap-re24-its7796.patch +Patch12: 0012-openldap-re24-its8336.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cyrus-sasl-devel BuildRequires: groff @@ -213,6 +214,8 @@ This package contains the OpenLDAP client libraries. #%patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1