From 2f2259a4d3a2ed0017f2fe0727db01c553b9e6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Skalick=C3=BD?= Date: Mon, 27 Mar 2017 09:52:05 +0200 Subject: [PATCH] Upgrade to gdbm 1.13 --- gdbm-1.10-zeroheaders.patch | 33 --------------------------------- gdbm.spec | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 45 deletions(-) delete mode 100644 gdbm-1.10-zeroheaders.patch diff --git a/gdbm-1.10-zeroheaders.patch b/gdbm-1.10-zeroheaders.patch deleted file mode 100644 index a268f6b..0000000 --- a/gdbm-1.10-zeroheaders.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up gdbm-1.10/src/falloc.c.zeroheaders gdbm-1.10/src/falloc.c ---- gdbm-1.10/src/falloc.c.zeroheaders 2011-11-11 11:59:11.000000000 +0100 -+++ gdbm-1.10/src/falloc.c 2011-11-14 17:34:32.487604027 +0100 -@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf) - - - /* Split the header block. */ -- temp = (avail_block *) malloc (av_size); -+ temp = (avail_block *) calloc (1, av_size); - if (temp == NULL) _gdbm_fatal (dbf, _("malloc error")); - /* Set the size to be correct AFTER the pop_avail_block. */ - temp->size = dbf->header->avail.size; -diff -up gdbm-1.10/src/gdbmopen.c.zeroheaders gdbm-1.10/src/gdbmopen.c ---- gdbm-1.10/src/gdbmopen.c.zeroheaders 2011-11-11 19:39:42.000000000 +0100 -+++ gdbm-1.10/src/gdbmopen.c 2011-11-14 17:33:24.867608650 +0100 -@@ -264,7 +264,7 @@ gdbm_open (const char *file, int block_s - (dbf->header->block_size - sizeof (hash_bucket)) - / sizeof (bucket_element) + 1; - dbf->header->bucket_size = dbf->header->block_size; -- dbf->bucket = (hash_bucket *) malloc (dbf->header->bucket_size); -+ dbf->bucket = (hash_bucket *) calloc (1, dbf->header->bucket_size); - if (dbf->bucket == NULL) - { - gdbm_close (dbf); -@@ -456,7 +456,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s - for(index = 0; index < size; index++) - { - (dbf->bucket_cache[index]).ca_bucket -- = (hash_bucket *) malloc (dbf->header->bucket_size); -+ = (hash_bucket *) calloc (1, dbf->header->bucket_size); - if ((dbf->bucket_cache[index]).ca_bucket == NULL) - { - gdbm_errno = GDBM_MALLOC_ERROR; diff --git a/gdbm.spec b/gdbm.spec index 1f50199..4823e2d 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -1,24 +1,22 @@ %bcond_with largefile Summary: A GNU set of database routines which use extensible hashing Name: gdbm -Version: 1.12 -Release: 2%{?dist} +Version: 1.13 +Release: 1%{?dist} Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz -# Prevent gdbm from storing uninitialized memory content -# to database files. -# The change allows Valgrind users to debug their packages without -# dealing with gdbm-related noise. It also improves security, as -# the uninitialized memory might contain sensitive informations -# from other applications. The patch is taken from Debian. # See https://bugzilla.redhat.com/show_bug.cgi?id=4457 -# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927 -Patch0: gdbm-1.10-zeroheaders.patch +# 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 + Patch1: gdbm-1.10-fedora.patch License: GPLv3+ URL: http://www.gnu.org/software/gdbm/ Group: System Environment/Libraries BuildRequires: libtool BuildRequires: gettext +BuildRequires: readline-devel %description Gdbm is a GNU database indexing library, including routines which use @@ -48,16 +46,18 @@ gdbm database library. You'll also need to install the gdbm package. %prep %setup -q -%patch0 -p1 -b .zeroheaders %patch1 -p1 -b .fedora %build %configure \ --disable-static \ %{!?with_largefile: --disable-largefile} \ + --disable-rpath \ --enable-libgdbm-compat # get rid of rpath (as per https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath) +# currently --disable-rpath doesn't work for gdbm_dump|load, gdbmtool and libgdbm_compat.so.4 +# https://puszcza.gnu.org.ua/bugs/index.php?359 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -80,7 +80,7 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm_compat.la rm -f $RPM_BUILD_ROOT/%{_infodir}/dir %check -export LD_LIBRARY_PATH=`pwd`/src/.libs/ +export LD_LIBRARY_PATH=`pwd`/src/.libs/:`pwd`/compat/.libs/ make check %post -p /sbin/ldconfig @@ -114,6 +114,9 @@ fi %{_mandir}/man3/* %changelog +* Thu Mar 23 2017 Marek Skalický - 1.13-1 +- Upgrade to gdbm 1.13 + * Fri Feb 10 2017 Fedora Release Engineering - 1.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild