[arch-commits] Commit in gdbm/trunk (PKGBUILD gdbm-1.10-zeroheaders.patch)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Mon Mar 13 09:03:13 UTC 2017
Date: Monday, March 13, 2017 @ 09:03:13
Author: bpiotrowski
Revision: 290777
upgpkg: gdbm 1.13-1
new upstream release
Modified:
gdbm/trunk/PKGBUILD
Deleted:
gdbm/trunk/gdbm-1.10-zeroheaders.patch
-----------------------------+
PKGBUILD | 52 +++++++++++++++---------------------------
gdbm-1.10-zeroheaders.patch | 33 --------------------------
2 files changed, 19 insertions(+), 66 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-03-13 08:40:15 UTC (rev 290776)
+++ PKGBUILD 2017-03-13 09:03:13 UTC (rev 290777)
@@ -5,51 +5,37 @@
# Contributor: judd <jvinet at zeroflux.org>
pkgname=gdbm
-pkgver=1.12
-pkgrel=2
-pkgdesc="GNU database library"
-url="http://www.gnu.org/software/gdbm/gdbm.html"
-license=('GPL3')
-arch=('i686' 'x86_64')
-depends=('glibc' 'sh')
-options=('!makeflags')
-source=(ftp://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz{,.sig}
- gdbm-1.10-zeroheaders.patch)
+pkgver=1.13
+pkgrel=1
+pkgdesc='GNU database library'
+url='http://www.gnu.org/software/gdbm/gdbm.html'
+license=(GPL3)
+arch=(i686 x86_64)
+depends=(glibc sh)
+options=(!makeflags)
+source=(http://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz{,.sig})
validpgpkeys=('325F650C4C2B6AD58807327A3602B07F55D0C732')
-md5sums=('9ce96ff4c99e74295ea19040931c8fb9'
- 'SKIP'
- 'ac255b10452005237836cd2d3a470733')
+md5sums=('8929dcda2a8de3fd2367bdbf66769376'
+ 'SKIP')
-prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # Prevent gdbm from storing uninitialized memory content
- # to database files. This patch improves security, as the
- # uninitialized memory might contain sensitive informations
- # from other applications.
- # https://bugzilla.redhat.com/show_bug.cgi?id=4457
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927
- patch -Np1 -i ../gdbm-1.10-zeroheaders.patch
-}
-
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd $pkgname-$pkgver
./configure --prefix=/usr --enable-libgdbm-compat
make
}
check() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd $pkgname-$pkgver
make check
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
# create symlinks for compatibility
- install -dm755 "${pkgdir}"/usr/include/gdbm
- ln -sf ../gdbm.h "${pkgdir}"/usr/include/gdbm/gdbm.h
- ln -sf ../ndbm.h "${pkgdir}"/usr/include/gdbm/ndbm.h
- ln -sf ../dbm.h "${pkgdir}"/usr/include/gdbm/dbm.h
+ install -dm755 "$pkgdir"/usr/include/gdbm
+ ln -sf ../gdbm.h "$pkgdir"/usr/include/gdbm/gdbm.h
+ ln -sf ../ndbm.h "$pkgdir"/usr/include/gdbm/ndbm.h
+ ln -sf ../dbm.h "$pkgdir"/usr/include/gdbm/dbm.h
}
Deleted: gdbm-1.10-zeroheaders.patch
===================================================================
--- gdbm-1.10-zeroheaders.patch 2017-03-13 08:40:15 UTC (rev 290776)
+++ gdbm-1.10-zeroheaders.patch 2017-03-13 09:03:13 UTC (rev 290777)
@@ -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;
More information about the arch-commits
mailing list