Accepting request 726289 from devel:libraries:c_c++

- Add opd deadlock patch as found and documented by Red Hat.
  (bsc#1148244)
  * 0001-OPD-deadlock-RH-BZ-1349779.patch

- 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/request/show/726289
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdb-4_8?expand=0&rev=31
This commit is contained in:
Dominique Leuenberger 2019-09-07 09:24:11 +00:00 committed by Git OBS Bridge
commit 8e1a7caae2
6 changed files with 73 additions and 37 deletions

View File

@ -0,0 +1,28 @@
From 5124401571fa1807a6595659ab7a069f17fe1068 Mon Sep 17 00:00:00 2001
From: William Brown <william@blackhats.net.au>
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)

View File

@ -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

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Aug 27 00:06:09 UTC 2019 - William Brown <william.brown@suse.com>
- 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 <tchvatal@suse.com>
- 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 <tchvatal@suse.com>

View File

@ -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,19 +26,18 @@ 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
Patch2: 0001-OPD-deadlock-RH-BZ-1349779.patch
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
@ -94,6 +93,7 @@ This package contains the header files and libraries.
%setup -q -n %{generic_name}-%{version}
%patch0
%patch1
%patch2 -p1
%build
cd dist
@ -111,11 +111,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 +135,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 +178,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 +190,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 +209,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 +225,6 @@ done
%{_bindir}/db_*
%files devel
%defattr(-,root,root)
%dir %{_includedir}/db4
%{_includedir}/db.h
%{_includedir}/db_185.h

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Aug 19 06:59:04 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- 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

View File

@ -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