[arch-commits] Commit in libtar/repos (10 files)

Giovanni Scafora giovanni at archlinux.org
Sun Apr 8 06:03:47 EDT 2012


    Date: Sunday, April 8, 2012 @ 06:03:47
  Author: giovanni
Revision: 155876

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  libtar/repos/extra-i686/PKGBUILD
    (from rev 155875, libtar/trunk/PKGBUILD)
  libtar/repos/extra-i686/libtar-1.2.11-tar_header.patch
    (from rev 155875, libtar/trunk/libtar-1.2.11-tar_header.patch)
  libtar/repos/extra-i686/libtar-1.2.11.patch
    (from rev 155875, libtar/trunk/libtar-1.2.11.patch)
  libtar/repos/extra-x86_64/PKGBUILD
    (from rev 155875, libtar/trunk/PKGBUILD)
  libtar/repos/extra-x86_64/libtar-1.2.11-tar_header.patch
    (from rev 155875, libtar/trunk/libtar-1.2.11-tar_header.patch)
  libtar/repos/extra-x86_64/libtar-1.2.11.patch
    (from rev 155875, libtar/trunk/libtar-1.2.11.patch)
Deleted:
  libtar/repos/extra-i686/PKGBUILD
  libtar/repos/extra-i686/libtar-1.2.11.patch
  libtar/repos/extra-x86_64/PKGBUILD
  libtar/repos/extra-x86_64/libtar-1.2.11.patch

---------------------------------------------+
 extra-i686/PKGBUILD                         |   75 ++++-----
 extra-i686/libtar-1.2.11-tar_header.patch   |   15 +
 extra-i686/libtar-1.2.11.patch              |  216 +++++++++++++-------------
 extra-x86_64/PKGBUILD                       |   75 ++++-----
 extra-x86_64/libtar-1.2.11-tar_header.patch |   15 +
 extra-x86_64/libtar-1.2.11.patch            |  216 +++++++++++++-------------
 6 files changed, 328 insertions(+), 284 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2012-04-08 10:03:19 UTC (rev 155875)
+++ extra-i686/PKGBUILD	2012-04-08 10:03:47 UTC (rev 155876)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: Giovanni Scafora <giovanni at archlinux.org> 
-# Contributor: Biru Ionut <ionut at archlinux.ro>
-# Contributor: Eric Belanger <eric at archlinux.org>
-# Contributor: Aurelien Foret <orelien at chez.com>
-
-pkgname=libtar
-pkgver=1.2.11
-pkgrel=3
-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"
-        'libtar-1.2.11.patch')
-md5sums=('604238e8734ce6e25347a58c4f1a1d7e' 
-         'baef7da841c186e1830566296859c35b')
-
-build() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  export CFLAGS+=" -fPIC"
-  patch -Np1 -i "${srcdir}/libtar-1.2.11.patch"
-  ./configure --prefix=/usr --mandir=/usr/share/man
-  make
-}
-
-package() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  make DESTDIR="$pkgdir" install
-  install -D -m644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: libtar/repos/extra-i686/PKGBUILD (from rev 155875, libtar/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2012-04-08 10:03:47 UTC (rev 155876)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Giovanni Scafora <giovanni at archlinux.org> 
+# Contributor: Biru Ionut <ionut at archlinux.ro>
+# Contributor: Eric Belanger <eric at archlinux.org>
+# Contributor: Aurelien Foret <orelien at chez.com>
+
+pkgname=libtar
+pkgver=1.2.11
+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"
+        'libtar-1.2.11-tar_header.patch'
+        'libtar-1.2.11.patch')
+md5sums=('604238e8734ce6e25347a58c4f1a1d7e'
+         '94b03c0fdee20671e1f6d1ecaf187258'   
+         'baef7da841c186e1830566296859c35b')
+
+build() {
+  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
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+  install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Copied: libtar/repos/extra-i686/libtar-1.2.11-tar_header.patch (from rev 155875, libtar/trunk/libtar-1.2.11-tar_header.patch)
===================================================================
--- extra-i686/libtar-1.2.11-tar_header.patch	                        (rev 0)
+++ extra-i686/libtar-1.2.11-tar_header.patch	2012-04-08 10:03:47 UTC (rev 155876)
@@ -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);

Deleted: extra-i686/libtar-1.2.11.patch
===================================================================
--- extra-i686/libtar-1.2.11.patch	2012-04-08 10:03:19 UTC (rev 155875)
+++ extra-i686/libtar-1.2.11.patch	2012-04-08 10:03:47 UTC (rev 155876)
@@ -1,108 +0,0 @@
-diff -Naur libtar-1.2.11-orig/lib/decode.c libtar-1.2.11/lib/decode.c
---- libtar-1.2.11-orig/lib/decode.c	2003-01-06 17:40:59.000000000 -0800
-+++ libtar-1.2.11/lib/decode.c	2004-08-13 12:26:34.000000000 -0700
-@@ -26,7 +26,7 @@
- char *
- th_get_pathname(TAR *t)
- {
--	char filename[MAXPATHLEN];
-+	static char filename[MAXPATHLEN];
- 
- 	if (t->th_buf.gnu_longname)
- 		return t->th_buf.gnu_longname;
-@@ -35,11 +35,11 @@
- 	{
- 		snprintf(filename, sizeof(filename), "%.155s/%.100s",
- 			 t->th_buf.prefix, t->th_buf.name);
--		return strdup(filename);
-+		return filename;
- 	}
- 
- 	snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name);
--	return strdup(filename);
-+	return filename;
- }
- 
- 
-diff -Naur libtar-1.2.11-orig/lib/extract.c libtar-1.2.11/lib/extract.c
---- libtar-1.2.11-orig/lib/extract.c	2003-03-02 15:58:07.000000000 -0800
-+++ libtar-1.2.11/lib/extract.c	2004-08-13 12:26:34.000000000 -0700
-@@ -28,14 +28,6 @@
- #endif
- 
- 
--struct linkname
--{
--	char ln_save[MAXPATHLEN];
--	char ln_real[MAXPATHLEN];
--};
--typedef struct linkname linkname_t;
--
--
- static int
- tar_set_file_perms(TAR *t, char *realname)
- {
-@@ -98,7 +90,9 @@
- tar_extract_file(TAR *t, char *realname)
- {
- 	int i;
--	linkname_t *lnp;
-+	char *lnp;
-+	int pathname_len;
-+	int realname_len;
- 
- 	if (t->options & TAR_NOOVERWRITE)
- 	{
-@@ -137,11 +131,13 @@
- 	if (i != 0)
- 		return i;
- 
--	lnp = (linkname_t *)calloc(1, sizeof(linkname_t));
-+	pathname_len = strlen(th_get_pathname(t)) + 1;
-+	realname_len = strlen(realname) + 1;
-+	lnp = (char *)calloc(1, pathname_len + realname_len);
- 	if (lnp == NULL)
- 		return -1;
--	strlcpy(lnp->ln_save, th_get_pathname(t), sizeof(lnp->ln_save));
--	strlcpy(lnp->ln_real, realname, sizeof(lnp->ln_real));
-+	strcpy(&lnp[0], th_get_pathname(t));
-+	strcpy(&lnp[pathname_len], realname);
- #ifdef DEBUG
- 	printf("tar_extract_file(): calling libtar_hash_add(): key=\"%s\", "
- 	       "value=\"%s\"\n", th_get_pathname(t), realname);
-@@ -288,7 +284,7 @@
- {
- 	char *filename;
- 	char *linktgt = NULL;
--	linkname_t *lnp;
-+	char *lnp;
- 	libtar_hashptr_t hp;
- 
- 	if (!TH_ISLNK(t))
-@@ -304,8 +300,8 @@
- 	if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t),
- 			       (libtar_matchfunc_t)libtar_str_match) != 0)
- 	{
--		lnp = (linkname_t *)libtar_hashptr_data(&hp);
--		linktgt = lnp->ln_real;
-+		lnp = (char *)libtar_hashptr_data(&hp);
-+		linktgt = &lnp[strlen(lnp) + 1];
- 	}
- 	else
- 		linktgt = th_get_linkname(t);
-diff -Naur libtar-1.2.11-orig/lib/libtar.h libtar-1.2.11/lib/libtar.h
---- libtar-1.2.11-orig/lib/libtar.h	2003-01-06 17:40:59.000000000 -0800
-+++ libtar-1.2.11/lib/libtar.h	2004-08-13 12:26:52.000000000 -0700
-@@ -63,9 +63,9 @@
- /***** handle.c ************************************************************/
- 
- typedef int (*openfunc_t)(const char *, int, ...);
--typedef int (*closefunc_t)(int);
--typedef ssize_t (*readfunc_t)(int, void *, size_t);
--typedef ssize_t (*writefunc_t)(int, const void *, size_t);
-+typedef int (*closefunc_t)(long);
-+typedef ssize_t (*readfunc_t)(long, void *, size_t);
-+typedef ssize_t (*writefunc_t)(long, const void *, size_t);
- 
- typedef struct
- {

Copied: libtar/repos/extra-i686/libtar-1.2.11.patch (from rev 155875, libtar/trunk/libtar-1.2.11.patch)
===================================================================
--- extra-i686/libtar-1.2.11.patch	                        (rev 0)
+++ extra-i686/libtar-1.2.11.patch	2012-04-08 10:03:47 UTC (rev 155876)
@@ -0,0 +1,108 @@
+diff -Naur libtar-1.2.11-orig/lib/decode.c libtar-1.2.11/lib/decode.c
+--- libtar-1.2.11-orig/lib/decode.c	2003-01-06 17:40:59.000000000 -0800
++++ libtar-1.2.11/lib/decode.c	2004-08-13 12:26:34.000000000 -0700
+@@ -26,7 +26,7 @@
+ char *
+ th_get_pathname(TAR *t)
+ {
+-	char filename[MAXPATHLEN];
++	static char filename[MAXPATHLEN];
+ 
+ 	if (t->th_buf.gnu_longname)
+ 		return t->th_buf.gnu_longname;
+@@ -35,11 +35,11 @@
+ 	{
+ 		snprintf(filename, sizeof(filename), "%.155s/%.100s",
+ 			 t->th_buf.prefix, t->th_buf.name);
+-		return strdup(filename);
++		return filename;
+ 	}
+ 
+ 	snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name);
+-	return strdup(filename);
++	return filename;
+ }
+ 
+ 
+diff -Naur libtar-1.2.11-orig/lib/extract.c libtar-1.2.11/lib/extract.c
+--- libtar-1.2.11-orig/lib/extract.c	2003-03-02 15:58:07.000000000 -0800
++++ libtar-1.2.11/lib/extract.c	2004-08-13 12:26:34.000000000 -0700
+@@ -28,14 +28,6 @@
+ #endif
+ 
+ 
+-struct linkname
+-{
+-	char ln_save[MAXPATHLEN];
+-	char ln_real[MAXPATHLEN];
+-};
+-typedef struct linkname linkname_t;
+-
+-
+ static int
+ tar_set_file_perms(TAR *t, char *realname)
+ {
+@@ -98,7 +90,9 @@
+ tar_extract_file(TAR *t, char *realname)
+ {
+ 	int i;
+-	linkname_t *lnp;
++	char *lnp;
++	int pathname_len;
++	int realname_len;
+ 
+ 	if (t->options & TAR_NOOVERWRITE)
+ 	{
+@@ -137,11 +131,13 @@
+ 	if (i != 0)
+ 		return i;
+ 
+-	lnp = (linkname_t *)calloc(1, sizeof(linkname_t));
++	pathname_len = strlen(th_get_pathname(t)) + 1;
++	realname_len = strlen(realname) + 1;
++	lnp = (char *)calloc(1, pathname_len + realname_len);
+ 	if (lnp == NULL)
+ 		return -1;
+-	strlcpy(lnp->ln_save, th_get_pathname(t), sizeof(lnp->ln_save));
+-	strlcpy(lnp->ln_real, realname, sizeof(lnp->ln_real));
++	strcpy(&lnp[0], th_get_pathname(t));
++	strcpy(&lnp[pathname_len], realname);
+ #ifdef DEBUG
+ 	printf("tar_extract_file(): calling libtar_hash_add(): key=\"%s\", "
+ 	       "value=\"%s\"\n", th_get_pathname(t), realname);
+@@ -288,7 +284,7 @@
+ {
+ 	char *filename;
+ 	char *linktgt = NULL;
+-	linkname_t *lnp;
++	char *lnp;
+ 	libtar_hashptr_t hp;
+ 
+ 	if (!TH_ISLNK(t))
+@@ -304,8 +300,8 @@
+ 	if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t),
+ 			       (libtar_matchfunc_t)libtar_str_match) != 0)
+ 	{
+-		lnp = (linkname_t *)libtar_hashptr_data(&hp);
+-		linktgt = lnp->ln_real;
++		lnp = (char *)libtar_hashptr_data(&hp);
++		linktgt = &lnp[strlen(lnp) + 1];
+ 	}
+ 	else
+ 		linktgt = th_get_linkname(t);
+diff -Naur libtar-1.2.11-orig/lib/libtar.h libtar-1.2.11/lib/libtar.h
+--- libtar-1.2.11-orig/lib/libtar.h	2003-01-06 17:40:59.000000000 -0800
++++ libtar-1.2.11/lib/libtar.h	2004-08-13 12:26:52.000000000 -0700
+@@ -63,9 +63,9 @@
+ /***** handle.c ************************************************************/
+ 
+ typedef int (*openfunc_t)(const char *, int, ...);
+-typedef int (*closefunc_t)(int);
+-typedef ssize_t (*readfunc_t)(int, void *, size_t);
+-typedef ssize_t (*writefunc_t)(int, const void *, size_t);
++typedef int (*closefunc_t)(long);
++typedef ssize_t (*readfunc_t)(long, void *, size_t);
++typedef ssize_t (*writefunc_t)(long, const void *, size_t);
+ 
+ typedef struct
+ {

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2012-04-08 10:03:19 UTC (rev 155875)
+++ extra-x86_64/PKGBUILD	2012-04-08 10:03:47 UTC (rev 155876)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: Giovanni Scafora <giovanni at archlinux.org> 
-# Contributor: Biru Ionut <ionut at archlinux.ro>
-# Contributor: Eric Belanger <eric at archlinux.org>
-# Contributor: Aurelien Foret <orelien at chez.com>
-
-pkgname=libtar
-pkgver=1.2.11
-pkgrel=3
-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"
-        'libtar-1.2.11.patch')
-md5sums=('604238e8734ce6e25347a58c4f1a1d7e' 
-         'baef7da841c186e1830566296859c35b')
-
-build() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  export CFLAGS+=" -fPIC"
-  patch -Np1 -i "${srcdir}/libtar-1.2.11.patch"
-  ./configure --prefix=/usr --mandir=/usr/share/man
-  make
-}
-
-package() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  make DESTDIR="$pkgdir" install
-  install -D -m644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: libtar/repos/extra-x86_64/PKGBUILD (from rev 155875, libtar/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2012-04-08 10:03:47 UTC (rev 155876)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Giovanni Scafora <giovanni at archlinux.org> 
+# Contributor: Biru Ionut <ionut at archlinux.ro>
+# Contributor: Eric Belanger <eric at archlinux.org>
+# Contributor: Aurelien Foret <orelien at chez.com>
+
+pkgname=libtar
+pkgver=1.2.11
+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"
+        'libtar-1.2.11-tar_header.patch'
+        'libtar-1.2.11.patch')
+md5sums=('604238e8734ce6e25347a58c4f1a1d7e'
+         '94b03c0fdee20671e1f6d1ecaf187258'   
+         'baef7da841c186e1830566296859c35b')
+
+build() {
+  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
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+  install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Copied: libtar/repos/extra-x86_64/libtar-1.2.11-tar_header.patch (from rev 155875, libtar/trunk/libtar-1.2.11-tar_header.patch)
===================================================================
--- extra-x86_64/libtar-1.2.11-tar_header.patch	                        (rev 0)
+++ extra-x86_64/libtar-1.2.11-tar_header.patch	2012-04-08 10:03:47 UTC (rev 155876)
@@ -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);

Deleted: extra-x86_64/libtar-1.2.11.patch
===================================================================
--- extra-x86_64/libtar-1.2.11.patch	2012-04-08 10:03:19 UTC (rev 155875)
+++ extra-x86_64/libtar-1.2.11.patch	2012-04-08 10:03:47 UTC (rev 155876)
@@ -1,108 +0,0 @@
-diff -Naur libtar-1.2.11-orig/lib/decode.c libtar-1.2.11/lib/decode.c
---- libtar-1.2.11-orig/lib/decode.c	2003-01-06 17:40:59.000000000 -0800
-+++ libtar-1.2.11/lib/decode.c	2004-08-13 12:26:34.000000000 -0700
-@@ -26,7 +26,7 @@
- char *
- th_get_pathname(TAR *t)
- {
--	char filename[MAXPATHLEN];
-+	static char filename[MAXPATHLEN];
- 
- 	if (t->th_buf.gnu_longname)
- 		return t->th_buf.gnu_longname;
-@@ -35,11 +35,11 @@
- 	{
- 		snprintf(filename, sizeof(filename), "%.155s/%.100s",
- 			 t->th_buf.prefix, t->th_buf.name);
--		return strdup(filename);
-+		return filename;
- 	}
- 
- 	snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name);
--	return strdup(filename);
-+	return filename;
- }
- 
- 
-diff -Naur libtar-1.2.11-orig/lib/extract.c libtar-1.2.11/lib/extract.c
---- libtar-1.2.11-orig/lib/extract.c	2003-03-02 15:58:07.000000000 -0800
-+++ libtar-1.2.11/lib/extract.c	2004-08-13 12:26:34.000000000 -0700
-@@ -28,14 +28,6 @@
- #endif
- 
- 
--struct linkname
--{
--	char ln_save[MAXPATHLEN];
--	char ln_real[MAXPATHLEN];
--};
--typedef struct linkname linkname_t;
--
--
- static int
- tar_set_file_perms(TAR *t, char *realname)
- {
-@@ -98,7 +90,9 @@
- tar_extract_file(TAR *t, char *realname)
- {
- 	int i;
--	linkname_t *lnp;
-+	char *lnp;
-+	int pathname_len;
-+	int realname_len;
- 
- 	if (t->options & TAR_NOOVERWRITE)
- 	{
-@@ -137,11 +131,13 @@
- 	if (i != 0)
- 		return i;
- 
--	lnp = (linkname_t *)calloc(1, sizeof(linkname_t));
-+	pathname_len = strlen(th_get_pathname(t)) + 1;
-+	realname_len = strlen(realname) + 1;
-+	lnp = (char *)calloc(1, pathname_len + realname_len);
- 	if (lnp == NULL)
- 		return -1;
--	strlcpy(lnp->ln_save, th_get_pathname(t), sizeof(lnp->ln_save));
--	strlcpy(lnp->ln_real, realname, sizeof(lnp->ln_real));
-+	strcpy(&lnp[0], th_get_pathname(t));
-+	strcpy(&lnp[pathname_len], realname);
- #ifdef DEBUG
- 	printf("tar_extract_file(): calling libtar_hash_add(): key=\"%s\", "
- 	       "value=\"%s\"\n", th_get_pathname(t), realname);
-@@ -288,7 +284,7 @@
- {
- 	char *filename;
- 	char *linktgt = NULL;
--	linkname_t *lnp;
-+	char *lnp;
- 	libtar_hashptr_t hp;
- 
- 	if (!TH_ISLNK(t))
-@@ -304,8 +300,8 @@
- 	if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t),
- 			       (libtar_matchfunc_t)libtar_str_match) != 0)
- 	{
--		lnp = (linkname_t *)libtar_hashptr_data(&hp);
--		linktgt = lnp->ln_real;
-+		lnp = (char *)libtar_hashptr_data(&hp);
-+		linktgt = &lnp[strlen(lnp) + 1];
- 	}
- 	else
- 		linktgt = th_get_linkname(t);
-diff -Naur libtar-1.2.11-orig/lib/libtar.h libtar-1.2.11/lib/libtar.h
---- libtar-1.2.11-orig/lib/libtar.h	2003-01-06 17:40:59.000000000 -0800
-+++ libtar-1.2.11/lib/libtar.h	2004-08-13 12:26:52.000000000 -0700
-@@ -63,9 +63,9 @@
- /***** handle.c ************************************************************/
- 
- typedef int (*openfunc_t)(const char *, int, ...);
--typedef int (*closefunc_t)(int);
--typedef ssize_t (*readfunc_t)(int, void *, size_t);
--typedef ssize_t (*writefunc_t)(int, const void *, size_t);
-+typedef int (*closefunc_t)(long);
-+typedef ssize_t (*readfunc_t)(long, void *, size_t);
-+typedef ssize_t (*writefunc_t)(long, const void *, size_t);
- 
- typedef struct
- {

Copied: libtar/repos/extra-x86_64/libtar-1.2.11.patch (from rev 155875, libtar/trunk/libtar-1.2.11.patch)
===================================================================
--- extra-x86_64/libtar-1.2.11.patch	                        (rev 0)
+++ extra-x86_64/libtar-1.2.11.patch	2012-04-08 10:03:47 UTC (rev 155876)
@@ -0,0 +1,108 @@
+diff -Naur libtar-1.2.11-orig/lib/decode.c libtar-1.2.11/lib/decode.c
+--- libtar-1.2.11-orig/lib/decode.c	2003-01-06 17:40:59.000000000 -0800
++++ libtar-1.2.11/lib/decode.c	2004-08-13 12:26:34.000000000 -0700
+@@ -26,7 +26,7 @@
+ char *
+ th_get_pathname(TAR *t)
+ {
+-	char filename[MAXPATHLEN];
++	static char filename[MAXPATHLEN];
+ 
+ 	if (t->th_buf.gnu_longname)
+ 		return t->th_buf.gnu_longname;
+@@ -35,11 +35,11 @@
+ 	{
+ 		snprintf(filename, sizeof(filename), "%.155s/%.100s",
+ 			 t->th_buf.prefix, t->th_buf.name);
+-		return strdup(filename);
++		return filename;
+ 	}
+ 
+ 	snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name);
+-	return strdup(filename);
++	return filename;
+ }
+ 
+ 
+diff -Naur libtar-1.2.11-orig/lib/extract.c libtar-1.2.11/lib/extract.c
+--- libtar-1.2.11-orig/lib/extract.c	2003-03-02 15:58:07.000000000 -0800
++++ libtar-1.2.11/lib/extract.c	2004-08-13 12:26:34.000000000 -0700
+@@ -28,14 +28,6 @@
+ #endif
+ 
+ 
+-struct linkname
+-{
+-	char ln_save[MAXPATHLEN];
+-	char ln_real[MAXPATHLEN];
+-};
+-typedef struct linkname linkname_t;
+-
+-
+ static int
+ tar_set_file_perms(TAR *t, char *realname)
+ {
+@@ -98,7 +90,9 @@
+ tar_extract_file(TAR *t, char *realname)
+ {
+ 	int i;
+-	linkname_t *lnp;
++	char *lnp;
++	int pathname_len;
++	int realname_len;
+ 
+ 	if (t->options & TAR_NOOVERWRITE)
+ 	{
+@@ -137,11 +131,13 @@
+ 	if (i != 0)
+ 		return i;
+ 
+-	lnp = (linkname_t *)calloc(1, sizeof(linkname_t));
++	pathname_len = strlen(th_get_pathname(t)) + 1;
++	realname_len = strlen(realname) + 1;
++	lnp = (char *)calloc(1, pathname_len + realname_len);
+ 	if (lnp == NULL)
+ 		return -1;
+-	strlcpy(lnp->ln_save, th_get_pathname(t), sizeof(lnp->ln_save));
+-	strlcpy(lnp->ln_real, realname, sizeof(lnp->ln_real));
++	strcpy(&lnp[0], th_get_pathname(t));
++	strcpy(&lnp[pathname_len], realname);
+ #ifdef DEBUG
+ 	printf("tar_extract_file(): calling libtar_hash_add(): key=\"%s\", "
+ 	       "value=\"%s\"\n", th_get_pathname(t), realname);
+@@ -288,7 +284,7 @@
+ {
+ 	char *filename;
+ 	char *linktgt = NULL;
+-	linkname_t *lnp;
++	char *lnp;
+ 	libtar_hashptr_t hp;
+ 
+ 	if (!TH_ISLNK(t))
+@@ -304,8 +300,8 @@
+ 	if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t),
+ 			       (libtar_matchfunc_t)libtar_str_match) != 0)
+ 	{
+-		lnp = (linkname_t *)libtar_hashptr_data(&hp);
+-		linktgt = lnp->ln_real;
++		lnp = (char *)libtar_hashptr_data(&hp);
++		linktgt = &lnp[strlen(lnp) + 1];
+ 	}
+ 	else
+ 		linktgt = th_get_linkname(t);
+diff -Naur libtar-1.2.11-orig/lib/libtar.h libtar-1.2.11/lib/libtar.h
+--- libtar-1.2.11-orig/lib/libtar.h	2003-01-06 17:40:59.000000000 -0800
++++ libtar-1.2.11/lib/libtar.h	2004-08-13 12:26:52.000000000 -0700
+@@ -63,9 +63,9 @@
+ /***** handle.c ************************************************************/
+ 
+ typedef int (*openfunc_t)(const char *, int, ...);
+-typedef int (*closefunc_t)(int);
+-typedef ssize_t (*readfunc_t)(int, void *, size_t);
+-typedef ssize_t (*writefunc_t)(int, const void *, size_t);
++typedef int (*closefunc_t)(long);
++typedef ssize_t (*readfunc_t)(long, void *, size_t);
++typedef ssize_t (*writefunc_t)(long, const void *, size_t);
+ 
+ typedef struct
+ {



More information about the arch-commits mailing list