summaryrefslogtreecommitdiff
path: root/extra/libtar
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-04-10 00:01:08 +0000
committerroot <root@rshg054.dnsready.net>2012-04-10 00:01:08 +0000
commit223ca251f3ce07eb5484be845e631d6ca645b263 (patch)
treea9e543c45cd0d58c82e39617f602a718d86976c4 /extra/libtar
parent1fed401c439c264bd92a4c13af1bea0bea458cb4 (diff)
Tue Apr 10 00:01:08 UTC 2012
Diffstat (limited to 'extra/libtar')
-rw-r--r--extra/libtar/PKGBUILD25
-rw-r--r--extra/libtar/libtar-1.2.11-tar_header.patch15
2 files changed, 31 insertions, 9 deletions
diff --git a/extra/libtar/PKGBUILD b/extra/libtar/PKGBUILD
index 3c47ca2e9..e1b54e3ce 100644
--- a/extra/libtar/PKGBUILD
+++ b/extra/libtar/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 151100 2012-02-24 21:37:32Z giovanni $
+# $Id: PKGBUILD 155876 2012-04-08 10:03:47Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Biru Ionut <ionut@archlinux.ro>
# Contributor: Eric Belanger <eric@archlinux.org>
@@ -6,29 +6,36 @@
pkgname=libtar
pkgver=1.2.11
-pkgrel=3
+pkgrel=4
pkgdesc="C library for manipulating POSIX tar files"
arch=('i686' 'x86_64')
url="http://www.feep.net/libtar/"
license=('BSD')
depends=('zlib')
-source=("ftp://ftp.feep.net/pub/software/$pkgname/$pkgname-$pkgver.tar.gz"
+source=("ftp://ftp.feep.net/pub/software/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'libtar-1.2.11-tar_header.patch'
'libtar-1.2.11.patch')
-md5sums=('604238e8734ce6e25347a58c4f1a1d7e'
+md5sums=('604238e8734ce6e25347a58c4f1a1d7e'
+ '94b03c0fdee20671e1f6d1ecaf187258'
'baef7da841c186e1830566296859c35b')
build() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "${srcdir}/${pkgname}-${pkgver}"
export CFLAGS+=" -fPIC"
+
+ # Fix FS#29322
+ patch -Np1 -i "${srcdir}/libtar-1.2.11-tar_header.patch"
+
patch -Np1 -i "${srcdir}/libtar-1.2.11.patch"
- ./configure --prefix=/usr --mandir=/usr/share/man
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
make
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="$pkgdir" install
- install -D -m644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/extra/libtar/libtar-1.2.11-tar_header.patch b/extra/libtar/libtar-1.2.11-tar_header.patch
new file mode 100644
index 000000000..161f7da7b
--- /dev/null
+++ b/extra/libtar/libtar-1.2.11-tar_header.patch
@@ -0,0 +1,15 @@
+diff -Naur libtar-1.2.11/lib/encode.c libtar-1.2.11.tar_header/lib/encode.c
+--- libtar-1.2.11/lib/encode.c 2003-01-07 07:10:59.000000000 +0530
++++ libtar-1.2.11.tar_header/lib/encode.c 2009-11-20 11:13:25.166756167 +0530
+@@ -30,7 +30,10 @@
+ int i, sum = 0;
+
+ if (t->options & TAR_GNU)
+- strncpy(t->th_buf.magic, "ustar ", 8);
++ {
++ memcpy(t->th_buf.magic, "ustar ", 6);
++ memcpy(t->th_buf.version, " \0", 2);
++ }
+ else
+ {
+ strncpy(t->th_buf.version, TVERSION, TVERSLEN);