From 207da735cb9961e40f3739a8f2a86871a1ebb35117ab2ffe0a795495ed9624b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 19 Aug 2019 07:32:37 +0000 Subject: [PATCH 1/3] - Remove the getpatches as it does not work at all, oracle removed the pages - Use spec-cleaner - Fix stripped debuginfo to make sure we can debug with libdb - Remove the getpatches as it does not work at all, oracle removed the pages - Use spec-cleaner - Fix stripped debuginfo to make sure we can debug with libdb OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=57 --- getpatches | 10 ---------- libdb-4_8.changes | 8 ++++++++ libdb-4_8.spec | 27 +++++++++++---------------- libdb_java-4_8.changes | 8 ++++++++ libdb_java-4_8.spec | 20 +++++++++----------- 5 files changed, 36 insertions(+), 37 deletions(-) delete mode 100644 getpatches diff --git a/getpatches b/getpatches deleted file mode 100644 index a066557..0000000 --- a/getpatches +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -VERSION=4.8.30 - -if [ ! $DELETE = false ] -then - DELETE=true -fi - -wget http://www.oracle.com/technology/products/berkeley-db/db/update/$VERSION/patch.$VERSION.html -r -l1 -for file in `find www.oracle.com/ -name "patch\.*" | grep -v html`; do cp $file .; done diff --git a/libdb-4_8.changes b/libdb-4_8.changes index fdc6d17..b4284b6 100644 --- a/libdb-4_8.changes +++ b/libdb-4_8.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Aug 19 06:59:04 UTC 2019 - Tomáš Chvátal + +- Remove the getpatches as it does not work at all, oracle + removed the pages +- Use spec-cleaner +- Fix stripped debuginfo to make sure we can debug with libdb + ------------------------------------------------------------------- Thu Dec 20 12:41:18 UTC 2018 - Tomáš Chvátal diff --git a/libdb-4_8.spec b/libdb-4_8.spec index 0290dbf..36564c5 100644 --- a/libdb-4_8.spec +++ b/libdb-4_8.spec @@ -1,7 +1,7 @@ # # spec file for package libdb-4_8 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,11 +26,10 @@ Release: 0 Summary: Berkeley DB Database Library Version 4.8 License: Sleepycat Group: System/Libraries -Url: http://oracle.com/technetwork/products/berkeleydb/ +URL: https://oracle.com/technetwork/products/berkeleydb/ Source: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz Source1: %{name}.changes Source2: baselibs.conf -Source9: getpatches Patch0: db-%{version}.patch # PATCH-FIX-OPENSUSE Fix build with GCC8, conflict with reserved builtin name Patch1: libdb-fix-atomic.patch @@ -38,7 +37,6 @@ BuildRequires: autoconf BuildRequires: fdupes BuildRequires: gcc-c++ Provides: db = %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The Berkeley DB Database is a programmatic toolkit that provides @@ -111,11 +109,13 @@ export CFLAGS CXXFLAGS CC # mkdir ../build_nptl cd ../build_nptl -../dist/configure --prefix=%{_prefix} \ - --libdir=%{_libdir} --enable-compat185 --disable-dump185 \ - --enable-shared --disable-static --enable-cxx \ +%define _configure ../dist/configure +%configure \ + --enable-compat185 --disable-dump185 \ + --enable-shared --disable-static \ + --enable-cxx \ --with-mutex="POSIX/pthreads/library" \ -%ifarch %arm +%ifarch %{arm} %{_target_cpu}-suse-linux-gnueabi %else %{_target_cpu}-suse-linux @@ -133,7 +133,7 @@ make %{?_smp_mflags} LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -l mkdir -p %{buildroot}%{_includedir}/db4 mkdir -p %{buildroot}%{_libdir} cd build_nptl -make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} strip=true install +%make_install STRIP=true cd .. # make ldd happy: chmod 755 %{buildroot}%{_libdir}/libdb*.so @@ -176,7 +176,6 @@ done %post -p /sbin/ldconfig %postun -p /sbin/ldconfig - %post -n db48-utils for i in %{util_list}; do update-alternatives --install "%{_bindir}/db_$i" \ @@ -189,17 +188,15 @@ for i in %{util_list}; do done %files -%defattr(-,root,root) %{_libdir}/libdb-%{major}.%{minor}.so %{_libdir}/libdb_cxx-%{major}.%{minor}.so %files -n db48-doc -%defattr(-,root,root) %dir %{_docdir}/%{name} -%doc %{_docdir}/%{name}/LICENSE +%license %{_docdir}/%{name}/LICENSE %doc %{_docdir}/%{name}/README %doc %{_docdir}/%{name}/index.html -%doc %{_docdir}/%{name}/license +%license %{_docdir}/%{name}/license %doc %{_docdir}/%{name}/articles %doc %{_docdir}/%{name}/api_reference %doc %{_docdir}/%{name}/examples_c @@ -210,7 +207,6 @@ done %doc %{_docdir}/%{name}/tutorial %files -n db48-utils -%defattr(-,root,root) %{_bindir}/db48_* %ghost %{_sysconfdir}/alternatives/db_archive %ghost %{_sysconfdir}/alternatives/db_checkpoint @@ -227,7 +223,6 @@ done %{_bindir}/db_* %files devel -%defattr(-,root,root) %dir %{_includedir}/db4 %{_includedir}/db.h %{_includedir}/db_185.h diff --git a/libdb_java-4_8.changes b/libdb_java-4_8.changes index e46d095..c063890 100644 --- a/libdb_java-4_8.changes +++ b/libdb_java-4_8.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Aug 19 06:59:04 UTC 2019 - Tomáš Chvátal + +- Remove the getpatches as it does not work at all, oracle + removed the pages +- Use spec-cleaner +- Fix stripped debuginfo to make sure we can debug with libdb + ------------------------------------------------------------------- Mon Apr 9 05:32:56 UTC 2018 - fstrba@suse.com diff --git a/libdb_java-4_8.spec b/libdb_java-4_8.spec index 96a5b6e..8e7426a 100644 --- a/libdb_java-4_8.spec +++ b/libdb_java-4_8.spec @@ -1,7 +1,7 @@ # # spec file for package libdb_java-4_8 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,10 +25,9 @@ Release: 0 Summary: Java Bindings for the Berkeley DB License: BSD-3-Clause Group: Productivity/Databases/Servers -Url: http://oracle.com/technetwork/products/berkeleydb/ +URL: https://oracle.com/technetwork/products/berkeleydb/ Source: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz Source1: %{name}.changes -Source9: getpatches Patch0: db-%{version}.patch # PATCH-FIX-OPENSUSE Fix compilation with Java 10 (10-internal) Patch1: libdb_java-4_8-fix-java10-comp.patch @@ -41,7 +40,6 @@ BuildRequires: unzip Requires: libdb-%{major}_%{minor} = %{version} Conflicts: libdb_java-4_5 Provides: db-java = %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description These are the Java bindings for the Berkeley DB. They are needed for @@ -83,12 +81,14 @@ export CFLAGS CXXFLAGS CC # mkdir ../build_nptl cd ../build_nptl -../dist/configure --prefix=%{_prefix} \ - --libdir=%{_libdir} --enable-compat185 --disable-dump185 \ - --enable-shared --disable-static --enable-cxx \ +%define _configure ../dist/configure +%configure \ + --enable-compat185 --disable-dump185 \ + --enable-shared --disable-static \ + --enable-cxx \ --with-mutex="POSIX/pthreads/library" \ --enable-java JAVACFLAGS="-source 1.6 -target 1.6" \ -%ifarch %arm +%ifarch %{arm} %{_target_cpu}-suse-linux-gnueabi %else %{_target_cpu}-suse-linux @@ -106,7 +106,7 @@ make %{?_smp_mflags} LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -l mkdir -p %{buildroot}%{_includedir}/db4 mkdir -p %{buildroot}%{_libdir} cd build_nptl -make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} strip=true install +%make_install STRIP=true cd .. # make ldd happy: chmod 755 %{buildroot}%{_libdir}/libdb*.so @@ -148,12 +148,10 @@ ln -sf %{_javadir}/db-%{version}.jar %{buildroot}/%{_javadir}/db.jar %postun -p /sbin/ldconfig %files -%defattr(-,root,root) %{_javadir}/* %{_libdir}/libdb_java-%{major}.%{minor}.so %files devel -%defattr(-,root,root) %{_libdir}/*_g.so %{_libdir}/libdb_java.so %{_libdir}/libdb_java-%{major}.so From f0e22f45562e6398d3338aebc58763679b22346f67b298159369153abdf7a376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 27 Aug 2019 02:42:06 +0000 Subject: [PATCH 2/3] Accepting request 726287 from home:firstyear:branches:devel:libraries:c_c++ - Add opd deadlock patch as found and documented by Red Hat. (bsc#1148244) OBS-URL: https://build.opensuse.org/request/show/726287 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=58 --- 0001-OPD-deadlock-RH-BZ-1349779.patch | 28 +++++++++++++++++++++++++++ libdb-4_8.changes | 6 ++++++ libdb-4_8.spec | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 0001-OPD-deadlock-RH-BZ-1349779.patch diff --git a/0001-OPD-deadlock-RH-BZ-1349779.patch b/0001-OPD-deadlock-RH-BZ-1349779.patch new file mode 100644 index 0000000..9b596fd --- /dev/null +++ b/0001-OPD-deadlock-RH-BZ-1349779.patch @@ -0,0 +1,28 @@ +From 5124401571fa1807a6595659ab7a069f17fe1068 Mon Sep 17 00:00:00 2001 +From: William Brown +Date: Tue, 27 Aug 2019 10:01:54 +1000 +Subject: [PATCH] OPD deadlock: RH BZ 1349779 + +--- + db/db_cam.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/db/db_cam.c b/db/db_cam.c +index 4c1322d..7f133e5 100644 +--- a/db/db_cam.c ++++ b/db/db_cam.c +@@ -850,6 +850,11 @@ __dbc_iget(dbc, key, data, flags) + flags == DB_PREV || flags == DB_PREV_DUP)) { + if (tmp_rmw && (ret = dbc->am_writelock(dbc)) != 0) + goto err; ++ /* Latch the primary tree page here in order to not deadlock later. */ ++ if (cp->page == NULL && ++ (ret = __memp_fget(mpf, &cp->pgno, ++ dbc->thread_info, dbc->txn, 0, &cp->page)) != 0) ++ goto err; + if (F_ISSET(dbc, DBC_TRANSIENT)) + opd = cp->opd; + else if ((ret = __dbc_idup(cp->opd, &opd, DB_POSITION)) != 0) +-- +2.20.1 (Apple Git-117) + diff --git a/libdb-4_8.changes b/libdb-4_8.changes index b4284b6..66aac44 100644 --- a/libdb-4_8.changes +++ b/libdb-4_8.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 27 00:06:09 UTC 2019 - William Brown + +- Add opd deadlock patch as found and documented by Red Hat. + (bsc#1148244) + ------------------------------------------------------------------- Mon Aug 19 06:59:04 UTC 2019 - Tomáš Chvátal diff --git a/libdb-4_8.spec b/libdb-4_8.spec index 36564c5..9c1e026 100644 --- a/libdb-4_8.spec +++ b/libdb-4_8.spec @@ -33,6 +33,7 @@ Source2: baselibs.conf Patch0: db-%{version}.patch # PATCH-FIX-OPENSUSE Fix build with GCC8, conflict with reserved builtin name Patch1: libdb-fix-atomic.patch +Patch2: 0001-OPD-deadlock-RH-BZ-1349779.patch BuildRequires: autoconf BuildRequires: fdupes BuildRequires: gcc-c++ @@ -92,6 +93,7 @@ This package contains the header files and libraries. %setup -q -n %{generic_name}-%{version} %patch0 %patch1 +%patch2 -p1 %build cd dist From e3b02da9d5dd65fe110e1d6e4f75593ff7d6576fb2c5cd7c9bb3bff1da08b1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 27 Aug 2019 02:51:53 +0000 Subject: [PATCH 3/3] * 0001-OPD-deadlock-RH-BZ-1349779.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=59 --- libdb-4_8.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/libdb-4_8.changes b/libdb-4_8.changes index 66aac44..433bede 100644 --- a/libdb-4_8.changes +++ b/libdb-4_8.changes @@ -3,6 +3,7 @@ Tue Aug 27 00:06:09 UTC 2019 - William Brown - Add opd deadlock patch as found and documented by Red Hat. (bsc#1148244) + * 0001-OPD-deadlock-RH-BZ-1349779.patch ------------------------------------------------------------------- Mon Aug 19 06:59:04 UTC 2019 - Tomáš Chvátal