forked from jengelh/openldap2
- Handle the libdb-4_5 -> libdb-4_8 Version update by opening the
Databases with DB_RECOVER if a version mismatch is detected. OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=51
This commit is contained in:
parent
908edbc7f9
commit
7b53140e1c
35
0007-No-Build-date-and-time-in-binaries.dif
Normal file
35
0007-No-Build-date-and-time-in-binaries.dif
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From 6a15b4e4d5ae00b11317443a0ed96a7e38692735 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cristian Rodriguez <cristian.rodriguez@opensuse.org>
|
||||||
|
Date: Tue, 5 Oct 2010 13:59:40 +0200
|
||||||
|
Subject: [PATCH 7/7] No Build date and time in binaries
|
||||||
|
|
||||||
|
This avoids build-compare failures and unhelpful rebuilds/republishes in
|
||||||
|
the openSUSE buildservice.
|
||||||
|
|
||||||
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/build/mkversion b/build/mkversion
|
||||||
|
index 22943d7..60e8381 100755
|
||||||
|
--- a/build/mkversion
|
||||||
|
+++ b/build/mkversion
|
||||||
|
@@ -50,7 +50,7 @@ if test $# != 1 ; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
APPLICATION=$1
|
||||||
|
-WHOWHERE="$USER@`uname -n`:`pwd`"
|
||||||
|
+WHOWHERE="opensuse-buildservice@opensuse.org"
|
||||||
|
|
||||||
|
cat << __EOF__
|
||||||
|
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||||
|
@@ -72,7 +72,7 @@ static const char copyright[] =
|
||||||
|
"COPYING RESTRICTIONS APPLY\n";
|
||||||
|
|
||||||
|
$static $const char $SYMBOL[] =
|
||||||
|
-"@(#) \$$PACKAGE: $APPLICATION $VERSION (" __DATE__ " " __TIME__ ") \$\n"
|
||||||
|
+"@(#) \$$PACKAGE: $APPLICATION $VERSION \$\n"
|
||||||
|
"\t$WHOWHERE\n";
|
||||||
|
|
||||||
|
__EOF__
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
31
0008-Recover-on-DB-version-change.dif
Normal file
31
0008-Recover-on-DB-version-change.dif
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 62ea7479d3cfe72cb3780ac4ab9cf5942c408406 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ralf Haferkamp <rhafer@suse.de>
|
||||||
|
Date: Tue, 5 Oct 2010 14:20:22 +0200
|
||||||
|
Subject: [PATCH 8/8] 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.
|
||||||
|
|
||||||
|
1 files changed, 7 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c
|
||||||
|
index 9bb1024..aa8cac3 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.1
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
--- build/mkversion.orig
|
|
||||||
+++ build/mkversion
|
|
||||||
@@ -50,7 +50,7 @@ if test $# != 1 ; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
APPLICATION=$1
|
|
||||||
-WHOWHERE="$USER@`uname -n`:`pwd`"
|
|
||||||
+WHOWHERE="opensuse-buildservice@opensuse.org"
|
|
||||||
|
|
||||||
cat << __EOF__
|
|
||||||
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
||||||
@@ -72,7 +72,7 @@ static const char copyright[] =
|
|
||||||
"COPYING RESTRICTIONS APPLY\n";
|
|
||||||
|
|
||||||
$static $const char $SYMBOL[] =
|
|
||||||
-"@(#) \$$PACKAGE: $APPLICATION $VERSION (" __DATE__ " " __TIME__ ") \$\n"
|
|
||||||
+"@(#) \$$PACKAGE: $APPLICATION $VERSION \$\n"
|
|
||||||
"\t$WHOWHERE\n";
|
|
||||||
|
|
||||||
__EOF__
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 5 14:39:46 UTC 2010 - rhafer@novell.com
|
||||||
|
|
||||||
|
- Handle the libdb-4_5 -> libdb-4_8 Version update by opening the
|
||||||
|
Databases with DB_RECOVER if a version mismatch is detected.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Oct 3 22:55:34 UTC 2010 - cristian.rodriguez@opensuse.org
|
Sun Oct 3 22:55:34 UTC 2010 - cristian.rodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -59,9 +59,10 @@ Patch3: 0003-LDAPI-socket-location.dif
|
|||||||
Patch4: 0004-libldap-use-gethostbyname_r.dif
|
Patch4: 0004-libldap-use-gethostbyname_r.dif
|
||||||
Patch5: 0005-pie-compile.dif
|
Patch5: 0005-pie-compile.dif
|
||||||
Patch6: 0006-assorted-fixes-for-back-config-DELETE-support.dif
|
Patch6: 0006-assorted-fixes-for-back-config-DELETE-support.dif
|
||||||
|
Patch7: 0007-No-Build-date-and-time-in-binaries.dif
|
||||||
|
Patch8: 0008-Recover-on-DB-version-change.dif
|
||||||
Patch100: openldap-2.3.37.dif
|
Patch100: openldap-2.3.37.dif
|
||||||
Patch200: slapd_getaddrinfo_dupl.dif
|
Patch200: slapd_getaddrinfo_dupl.dif
|
||||||
Patch201: openldap-2.4.23-no-build-dates.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if "%{name}" == "openldap2"
|
%if "%{name}" == "openldap2"
|
||||||
|
|
||||||
@ -194,14 +195,14 @@ Authors:
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
%if %suse_version == 1100
|
%if %suse_version == 1100
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201
|
|
||||||
%endif
|
%endif
|
||||||
cp %{SOURCE5} .
|
cp %{SOURCE5} .
|
||||||
cd ../openldap-2.3.37
|
cd ../openldap-2.3.37
|
||||||
%patch100
|
%patch100
|
||||||
%patch201
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{?suse_update_config:%{suse_update_config -f build}}
|
%{?suse_update_config:%{suse_update_config -f build}}
|
||||||
@ -260,6 +261,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED"
|
|||||||
--enable-dynamic=no --enable-shared=no
|
--enable-dynamic=no --enable-shared=no
|
||||||
make depend
|
make depend
|
||||||
make %{?jobs:-j%jobs}
|
make %{?jobs:-j%jobs}
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 5 14:39:46 UTC 2010 - rhafer@novell.com
|
||||||
|
|
||||||
|
- Handle the libdb-4_5 -> libdb-4_8 Version update by opening the
|
||||||
|
Databases with DB_RECOVER if a version mismatch is detected.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Oct 3 22:55:34 UTC 2010 - cristian.rodriguez@opensuse.org
|
Sun Oct 3 22:55:34 UTC 2010 - cristian.rodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -59,9 +59,10 @@ Patch3: 0003-LDAPI-socket-location.dif
|
|||||||
Patch4: 0004-libldap-use-gethostbyname_r.dif
|
Patch4: 0004-libldap-use-gethostbyname_r.dif
|
||||||
Patch5: 0005-pie-compile.dif
|
Patch5: 0005-pie-compile.dif
|
||||||
Patch6: 0006-assorted-fixes-for-back-config-DELETE-support.dif
|
Patch6: 0006-assorted-fixes-for-back-config-DELETE-support.dif
|
||||||
|
Patch7: 0007-No-Build-date-and-time-in-binaries.dif
|
||||||
|
Patch8: 0008-Recover-on-DB-version-change.dif
|
||||||
Patch100: openldap-2.3.37.dif
|
Patch100: openldap-2.3.37.dif
|
||||||
Patch200: slapd_getaddrinfo_dupl.dif
|
Patch200: slapd_getaddrinfo_dupl.dif
|
||||||
Patch201: openldap-2.4.23-no-build-dates.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if "%{name}" == "openldap2"
|
%if "%{name}" == "openldap2"
|
||||||
|
|
||||||
@ -194,14 +195,14 @@ Authors:
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
%if %suse_version == 1100
|
%if %suse_version == 1100
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201
|
|
||||||
%endif
|
%endif
|
||||||
cp %{SOURCE5} .
|
cp %{SOURCE5} .
|
||||||
cd ../openldap-2.3.37
|
cd ../openldap-2.3.37
|
||||||
%patch100
|
%patch100
|
||||||
%patch201
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{?suse_update_config:%{suse_update_config -f build}}
|
%{?suse_update_config:%{suse_update_config -f build}}
|
||||||
@ -260,6 +261,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED"
|
|||||||
--enable-dynamic=no --enable-shared=no
|
--enable-dynamic=no --enable-shared=no
|
||||||
make depend
|
make depend
|
||||||
make %{?jobs:-j%jobs}
|
make %{?jobs:-j%jobs}
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user