From 85b59a50e155f872d2c34698b311d8eba165ff4e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 07 2021 18:36:55 +0000 Subject: import libdb-5.3.28-53.el9 --- diff --git a/SOURCES/db-5.3.28-mmap-high-cpu-usage.patch b/SOURCES/db-5.3.28-mmap-high-cpu-usage.patch new file mode 100644 index 0000000..b11ce08 --- /dev/null +++ b/SOURCES/db-5.3.28-mmap-high-cpu-usage.patch @@ -0,0 +1,19 @@ +Author: Filip Januš +Date: 6 Sep 2021 +Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402 +Patch was created based on the discussion in the previous link +diff -ur db-5.3.28/src/os/os_map.c db_patch/src/os/os_map.c +--- db-5.3.28/src/os/os_map.c 2013-09-09 17:35:09.000000000 +0200 ++++ db_patch/src/os/os_map.c 2021-09-09 07:33:12.027328265 +0200 +@@ -213,7 +213,10 @@ + if (rp->max < rp->size) + rp->max = rp->size; + if (ret == 0 && F_ISSET(infop, REGION_CREATE)) { +- if (F_ISSET(dbenv, DB_ENV_REGION_INIT)) ++ ++ rp->size = rp->max; ++ ++ if (F_ISSET(dbenv, DB_ENV_REGION_INIT)) + ret = __db_file_write(env, infop->fhp, + rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00); + else diff --git a/SPECS/libdb.spec b/SPECS/libdb.spec index 6489fca..c81f443 100644 --- a/SPECS/libdb.spec +++ b/SPECS/libdb.spec @@ -5,7 +5,7 @@ Summary: The Berkeley DB database library for C Name: libdb Version: 5.3.28 -Release: 51%{?dist} +Release: 53%{?dist} Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz # For mt19937db.c @@ -58,6 +58,7 @@ Patch39: libdb-5.3.21-trickle_cpu.patch Patch40: db-5.3.28_cve-2019-2708.patch # Downstream covscan patch Patch41: db-5.3.28-fix-CWE-686-398.patch +Patch42: db-5.3.28-mmap-high-cpu-usage.patch URL: http://www.oracle.com/database/berkeley-db/ License: BSD and LGPLv2 and Sleepycat @@ -229,6 +230,7 @@ popd %patch39 -p1 %patch40 -p1 -b .cve-2019-2708 %patch41 -p1 +%patch42 -p1 cd dist ./s_config @@ -244,8 +246,8 @@ make -C db.1.85/PORT/%{_os} OORG="$CFLAGS" test -d dist/dist-tls || mkdir dist/dist-tls # Static link db_dump185 with old db-185 libraries. -/bin/sh libtool --tag=CC --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c util/db_dump185.c -o dist/dist-tls/db_dump185.lo -/bin/sh libtool --tag=LD --mode=link %{__cc} -o dist/dist-tls/db_dump185 dist/dist-tls/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a +/bin/sh libtool --tag=CC --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c util/db_dump185.c -o dist/dist-tls/db_dump185.lo +/bin/sh libtool --tag=LD --mode=link %{__cc} $RPM_LD_FLAGS -o dist/dist-tls/db_dump185 dist/dist-tls/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a # Update config files to understand aarch64 for dir in dist lang/sql/sqlite lang/sql/jdbc lang/sql/odbc; do @@ -390,6 +392,15 @@ mv man/* ${RPM_BUILD_ROOT}%{_mandir}/man1 %{_includedir}/%{name}/dbsql.h %changelog +* Wed Nov 24 2021 Filip Januš - 5.3.28-53 +- Add missing RPM_LD_FLAGS for db_dump185 +- Resolves: #2026417 + +* Mon Sep 13 2021 Filip Januš - 5.3.28-52 +- Bad order of sys calls cause high CPU usage +- Related: #2002186 +- Patch no. 42 was added + * Mon Aug 09 2021 Mohan Boddu - 5.3.28-51 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688