[packages/db6.1] Up to 6.1.38
arekm
arekm at pld-linux.org
Sun Aug 9 13:20:19 CEST 2026
commit dc01bda6ecf9d6325feb10305de99ab750cdb63d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Aug 9 13:20:01 2026 +0200
Up to 6.1.38
db6.1-initstate_r.patch | 14 ++++++++++++++
db6.1-jbj13.patch | 15 ---------------
db6.1-tls-detect.patch | 27 +++++++++++++++++++++++++++
db6.1.spec | 28 ++++++++++++++++++++--------
4 files changed, 61 insertions(+), 23 deletions(-)
---
diff --git a/db6.1.spec b/db6.1.spec
index 51638eb..f80e19a 100644
--- a/db6.1.spec
+++ b/db6.1.spec
@@ -1,3 +1,6 @@
+# WARNING:
+# - 6.1.29->6.1.36 changes __db_env ABI (adds convert in the middle of public handle list in struct)
+# - contains changes similar to 6.2.32, which is not compatible with rpm 5.4.17
#
# Conditional build:
%bcond_without java # don't build Java bindings
@@ -9,21 +12,24 @@
%define major 6
%define libver %{major}.1
-%define ver %{libver}.29
+%define ver %{libver}.38
%define patchlevel 0
Summary: Berkeley DB database library for C
Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
Name: db6.1
Version: %{ver}.%{patchlevel}
-Release: 2
+Release: 1
License: AGPL v3
Group: Libraries
-#Source0Download: http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html
-Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
-# Source0-md5: 7f4d47302dfec698fe088e5285c9098e
+#Source0Download: https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html
+# no longer available without login, use gentoo distfiles URL
+#Source0: https://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
+Source0: http://distfiles.gentoo.org/distfiles/db-%{ver}.tar.gz
+# Source0-md5: c24228c6725e9ba67720a3111ca650f8
Patch0: %{name}-sql-features.patch
-Patch1: %{name}-jbj13.patch
-URL: http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html
+Patch1: %{name}-initstate_r.patch
+Patch2: %{name}-tls-detect.patch
+URL: https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html
BuildRequires: automake
%if %{with java}
BuildRequires: jdk
@@ -370,6 +376,7 @@ poleceń.
%setup -q -n db-%{ver}
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
%build
cp -f /usr/share/automake/config.sub dist
@@ -384,7 +391,7 @@ cd build_unix.static
CC="%{__cc}"
CXX="%{__cxx}"
-CFLAGS="%{rpmcflags}"
+CFLAGS="%{rpmcflags} -std=gnu17"
CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
LDFLAGS="%{rpmcflags} %{rpmldflags}"
export CC CXX CFLAGS CXXFLAGS LDFLAGS
@@ -408,6 +415,11 @@ cd ..
cd build_unix
+unset CFLAGS CXXFLAGS LDFLAGS
+%{set_build_flags}
+CFLAGS="$CFLAGS -std=gnu17"
+export CFLAGS
+
%define configuredir ../dist
%configure \
--prefix=%{_prefix} \
diff --git a/db6.1-initstate_r.patch b/db6.1-initstate_r.patch
new file mode 100644
index 0000000..95ecdc9
--- /dev/null
+++ b/db6.1-initstate_r.patch
@@ -0,0 +1,14 @@
+random_state is char[64], so &random_state is char (*)[64] while
+initstate_r() takes char *. The address is the same, the type is not.
+
+--- db-6.1.38/src/os/os_uid.c.orig 2019-04-15 00:00:00.000000000 +0200
++++ db-6.1.38/src/os/os_uid.c 2019-04-15 00:00:00.000000000 +0200
+@@ -57,7 +57,7 @@
+ {
+ DB_GLOBAL(random_seeded) = 1;
+ #ifdef HAVE_RANDOM_R
+- (void)initstate_r(seed, &DB_GLOBAL(random_state),
++ (void)initstate_r(seed, DB_GLOBAL(random_state),
+ sizeof(DB_GLOBAL(random_state)), &DB_GLOBAL(random_data));
+ (void)srandom_r(seed, &DB_GLOBAL(random_data));
+ #elif defined(HAVE_RANDOM)
diff --git a/db6.1-jbj13.patch b/db6.1-jbj13.patch
deleted file mode 100644
index b26c87a..0000000
--- a/db6.1-jbj13.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -up db-6.2.23/src/env/env_failchk.c.jbj db-6.2.23/src/env/env_failchk.c
---- db-6.2.23/src/env/env_failchk.c.jbj 2016-03-28 15:45:54.000000000 -0400
-+++ db-6.2.23/src/env/env_failchk.c 2016-05-08 14:03:58.153742935 -0400
-@@ -528,7 +528,11 @@ __env_set_state(env, ipp, state)
- DB_ASSERT(env, ip != NULL && ip->dbth_state != THREAD_OUT);
- if (ipp != NULL)
- *ipp = ip;
-+#ifdef NOTYET
- if (ip == NULL || ip->dbth_state == THREAD_OUT)
-+#else
-+ if (ip == NULL) /* The control block wasn't found */
-+#endif
- return (USR_ERR(env, EINVAL));
- else
- return (0);
diff --git a/db6.1-tls-detect.patch b/db6.1-tls-detect.patch
new file mode 100644
index 0000000..ee01e52
--- /dev/null
+++ b/db6.1-tls-detect.patch
@@ -0,0 +1,27 @@
+The C++ TLS probe uses NULL without including a header. g++ no longer
+declares it implicitly, so the probe failed to compile, TLS was detected
+as "none" and dbstl refused to build. Patch the generated configure too,
+as the build does not regenerate it.
+
+--- db-6.1.38/dist/aclocal/tls.m4.orig 2019-04-15 00:00:00.000000000 +0200
++++ db-6.1.38/dist/aclocal/tls.m4 2019-04-15 00:00:00.000000000 +0200
+@@ -15,7 +15,8 @@
+ for ax_tls_defn_keyword in $ax_tls_keywords ""; do
+ test -z "$ax_tls_decl_keyword" &&
+ test -z "$ax_tls_defn_keyword" && continue
+- AC_TRY_COMPILE([template <typename T>class TLSClass {
++ AC_TRY_COMPILE([#include <stddef.h>
++ template <typename T>class TLSClass {
+ public: static ] $ax_tls_decl_keyword [ T *tlsvar;
+ };
+ class TLSClass2 {
+--- db-6.1.38/dist/configure.orig 2019-04-15 00:00:00.000000000 +0200
++++ db-6.1.38/dist/configure 2019-04-15 00:00:00.000000000 +0200
+@@ -19280,6 +19280,7 @@
+ test -z "$ax_tls_defn_keyword" && continue
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stddef.h>
+ template <typename T>class TLSClass {
+ public: static $ax_tls_decl_keyword T *tlsvar;
+ };
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/db6.1.git/commitdiff/dc01bda6ecf9d6325feb10305de99ab750cdb63d
More information about the pld-cvs-commit
mailing list