diff --git a/dist b/dist new file mode 100644 index 0000000000000000000000000000000000000000..9c0e36ec42a2d9bfefacb21ac6354c9ddd910533 --- /dev/null +++ b/dist @@ -0,0 +1 @@ +an8 diff --git a/download b/download new file mode 100644 index 0000000000000000000000000000000000000000..a0e41f20460d9546ea2abbc45bab4c9feade18ba --- /dev/null +++ b/download @@ -0,0 +1 @@ +e316f8e4a3e7e4f23955be65d54fec48 gdbm-1.18.tar.gz diff --git a/gdbm-1.18-backward-compatibility.patch b/gdbm-1.18-backward-compatibility.patch new file mode 100644 index 0000000000000000000000000000000000000000..4b5b922cc22f3fa334206c73e0e4fae1e0966381 --- /dev/null +++ b/gdbm-1.18-backward-compatibility.patch @@ -0,0 +1,24 @@ +Upstream backport: 00ba17479ff31c6825f0e6f28b965f11525e83f6 +Fix problem with loading old format of databases exports + +diff -ur gdbm-1.18/src/gdbmopen.c gdbm-patch/src/gdbmopen.c +--- gdbm-1.18/src/gdbmopen.c 2018-08-03 10:46:39.000000000 +0200 ++++ gdbm-patch/src/gdbmopen.c 2022-07-01 08:56:08.000000000 +0200 +@@ -168,9 +168,14 @@ + return GDBM_BLOCK_SIZE_ERROR; + } + +- if (hdr->next_block != st->st_size) +- /* FIXME: Should return GDBM_NEED_RECOVERY instead? */ +- return GDBM_BAD_HEADER; ++ /* Technically speaking, the condition below should read ++ hdr->next_block != st->st_size ++ However, gdbm versions prior to commit 4e819c98 could leave ++ hdr->next_block pointing beyond current end of file. To ensure ++ backward compatibility with these versions, the condition has been ++ slackened to this: */ ++ if (hdr->next_block < st->st_size) ++ return GDBM_BAD_HEADER; + + /* Make sure dir and dir + dir_size fall within the file boundary */ + if (!(hdr->dir > 0 diff --git a/gdbm-1.18.tar.gz b/gdbm-1.18.tar.gz deleted file mode 100644 index e11a3d4294b9d4ec338ce9a827dc95ba0e9c0f1a..0000000000000000000000000000000000000000 Binary files a/gdbm-1.18.tar.gz and /dev/null differ diff --git a/gdbm.spec b/gdbm.spec index ef1daf653ddf841a43067d5fcfa23f1212c56680..5b207a118937cbe92ddd954010c7a4e4a618fc7a 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -4,22 +4,16 @@ Summary: A GNU set of database routines which use extensible hashing Name: gdbm Version: 1.18 -Release: 1%{anolis_release}%{?dist} +Release: 2%{anolis_release}%{?dist} Epoch: 1 License: GPLv3+ URL: http://www.gnu.org/software/gdbm/ Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz -# See https://bugzilla.redhat.com/show_bug.cgi?id=4457 -# Upstream bug http://puszcza.gnu.org.ua/bugs/?func=detailitem&item_id=151 -# Fixed in http://cvs.gnu.org.ua/viewvc/gdbm/gdbm/src/gdbmopen.c?r1=1.12&r2=1.13 -# - version 1.10 -#Patch0: gdbm-1.10-zeroheaders.patch -# NOTE-WARNING file doesn't contain distro dependent largefile note now -#Patch1: gdbm-1.10-fedora.patch - -Patch2: gdbm-1.17-coverity-fixes.patch -# backport patch from fc32 + +Patch1: gdbm-1.17-coverity-fixes.patch +# Backport of upstream commit: 00ba17479ff31c6825f0e6f28b965f11525e83f6 +Patch2: gdbm-1.18-backward-compatibility.patch Patch3: gdbm-gcc10.patch BuildRequires: gcc @@ -61,6 +55,7 @@ gdbm database library. You'll also need to install the gdbm package. %prep %setup -q +%patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -129,9 +124,14 @@ fi %{_mandir}/man3/* %changelog -* Tue Nov 23 2021 Weitao Zhou - 1:1.18-1.0.1 +* Tue Jan 03 2023 Weitao Zhou - 1:1.18-2.0.1 - remove char *parseopt_program_doc and *parseopt_program_args in parseopt.c for compatible gcc10 build +* Fri Jul 01 2022 - 1.18-2 +- Add backward compatibility patch +- Resolves: #2097704 +- Backport from upstream commit: 00ba17479ff31c6825f0e6f28b965f11525e83f6 + * Mon Sep 03 2018 mskalick@redhat.com - 1:1.18-1 - Rebase to latest release 1.18 - Fix issues found by coverity