[arch-commits] Commit in file/repos (12 files)

Sébastien Luttringer seblu at archlinux.org
Fri Dec 19 18:32:32 UTC 2014


    Date: Friday, December 19, 2014 @ 19:32:32
  Author: seblu
Revision: 227796

db-move: moved file from [testing] to [core] (i686, x86_64)

Added:
  file/repos/core-i686/01-fix-broken-xz.patch
    (from rev 227795, file/repos/testing-i686/01-fix-broken-xz.patch)
  file/repos/core-i686/02-ignore-exit-code-from-uncompress.patch
    (from rev 227795, file/repos/testing-i686/02-ignore-exit-code-from-uncompress.patch)
  file/repos/core-i686/PKGBUILD
    (from rev 227795, file/repos/testing-i686/PKGBUILD)
  file/repos/core-x86_64/01-fix-broken-xz.patch
    (from rev 227795, file/repos/testing-x86_64/01-fix-broken-xz.patch)
  file/repos/core-x86_64/02-ignore-exit-code-from-uncompress.patch
    (from rev 227795, file/repos/testing-x86_64/02-ignore-exit-code-from-uncompress.patch)
  file/repos/core-x86_64/PKGBUILD
    (from rev 227795, file/repos/testing-x86_64/PKGBUILD)
Deleted:
  file/repos/core-i686/01-cve-2014-3710.patch
  file/repos/core-i686/PKGBUILD
  file/repos/core-x86_64/01-cve-2014-3710.patch
  file/repos/core-x86_64/PKGBUILD
  file/repos/testing-i686/
  file/repos/testing-x86_64/

-------------------------------------------------------+
 /PKGBUILD                                             |   84 ++++++++++++++++
 core-i686/01-cve-2014-3710.patch                      |   18 ---
 core-i686/01-fix-broken-xz.patch                      |   44 ++++++++
 core-i686/02-ignore-exit-code-from-uncompress.patch   |   34 ++++++
 core-i686/PKGBUILD                                    |   38 -------
 core-x86_64/01-cve-2014-3710.patch                    |   18 ---
 core-x86_64/01-fix-broken-xz.patch                    |   44 ++++++++
 core-x86_64/02-ignore-exit-code-from-uncompress.patch |   34 ++++++
 core-x86_64/PKGBUILD                                  |   38 -------
 9 files changed, 240 insertions(+), 112 deletions(-)

Deleted: core-i686/01-cve-2014-3710.patch
===================================================================
--- core-i686/01-cve-2014-3710.patch	2014-12-19 17:38:00 UTC (rev 227795)
+++ core-i686/01-cve-2014-3710.patch	2014-12-19 18:32:32 UTC (rev 227796)
@@ -1,18 +0,0 @@
-diff --git a/src/readelf.c b/src/readelf.c
-index 08f81f5..9ebdebd 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -477,6 +477,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
- 	uint32_t namesz, descsz;
- 	unsigned char *nbuf = CAST(unsigned char *, vbuf);
- 
-+	if (xnh_sizeof + offset > size) {
-+		/*
-+		 * We're out of note headers.
-+		 */
-+		return xnh_sizeof + offset;
-+	}
-+
- 	(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
- 	offset += xnh_sizeof;
- 

Copied: file/repos/core-i686/01-fix-broken-xz.patch (from rev 227795, file/repos/testing-i686/01-fix-broken-xz.patch)
===================================================================
--- core-i686/01-fix-broken-xz.patch	                        (rev 0)
+++ core-i686/01-fix-broken-xz.patch	2014-12-19 18:32:32 UTC (rev 227796)
@@ -0,0 +1,44 @@
+From abc95cd644418cc5205a8ad07d864f0851ac49df Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Thu, 11 Dec 2014 11:47:08 +0000
+Subject: [PATCH] PR/405: file -bizL git-2.1.3.tar.xz broke because the xz
+ decompressor dies with SIGPIPE when we stop reading from it early. ignore
+ SIGPIPE>
+
+---
+ src/compress.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/compress.c b/src/compress.c
+index fa9e07a..bf93839 100644
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -45,6 +45,7 @@ FILE_RCSID("@(#)$File: compress.c,v 1.74 2014/10/26 20:23:30 christos Exp $")
+ #endif
+ #include <string.h>
+ #include <errno.h>
++#include <signal.h>
+ #if !defined(__MINGW32__) && !defined(WIN32)
+ #include <sys/ioctl.h>
+ #endif
+@@ -103,10 +104,12 @@ file_zmagic(struct magic_set *ms, int fd, const char *name,
+ 	size_t i, nsz;
+ 	int rv = 0;
+ 	int mime = ms->flags & MAGIC_MIME;
++	sig_t osigpipe;
+ 
+ 	if ((ms->flags & MAGIC_COMPRESS) == 0)
+ 		return 0;
+ 
++	osigpipe = signal(SIGPIPE, SIG_IGN);
+ 	for (i = 0; i < ncompr; i++) {
+ 		if (nbytes < compr[i].maglen)
+ 			continue;
+@@ -133,6 +136,7 @@ file_zmagic(struct magic_set *ms, int fd, const char *name,
+ 		}
+ 	}
+ error:
++	(void)signal(SIGPIPE, osigpipe);
+ 	free(newbuf);
+ 	ms->flags |= MAGIC_COMPRESS;
+ 	return rv;

Copied: file/repos/core-i686/02-ignore-exit-code-from-uncompress.patch (from rev 227795, file/repos/testing-i686/02-ignore-exit-code-from-uncompress.patch)
===================================================================
--- core-i686/02-ignore-exit-code-from-uncompress.patch	                        (rev 0)
+++ core-i686/02-ignore-exit-code-from-uncompress.patch	2014-12-19 18:32:32 UTC (rev 227796)
@@ -0,0 +1,34 @@
+From 05463f7b3d4588a656089e20ab53a5b81b875341 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Fri, 12 Dec 2014 16:33:01 +0000
+Subject: [PATCH] PR/405: Ignore exit code from uncompress programs because
+ some (validly) exit with non-zero code when they get SIGPIPE.
+
+---
+ src/compress.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/compress.c b/src/compress.c
+index bf93839..30be569 100644
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -512,11 +512,16 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
+ 			    strerror(errno));
+ #endif
+ 			n = NODATA;
+-		} else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
++		} else if (!WIFEXITED(status)) {
+ #ifdef DEBUG
+-			(void)fprintf(stderr, "Child status (0x%x)\n", status);
++			(void)fprintf(stderr, "Child not exited (0x%x)\n",
++			    status);
++#endif
++		} else if (WEXITSTATUS(status) != 0) {
++#ifdef DEBUG
++			(void)fprintf(stderr, "Child exited (0x%d)\n",
++			    WEXITSTATUS(status));
+ #endif
+-			n = NODATA;
+ 		}
+ 
+ 		(void) close(fdin[0]);

Deleted: core-i686/PKGBUILD
===================================================================
--- core-i686/PKGBUILD	2014-12-19 17:38:00 UTC (rev 227795)
+++ core-i686/PKGBUILD	2014-12-19 18:32:32 UTC (rev 227796)
@@ -1,38 +0,0 @@
-# $Id$
-# Mainainer: Sébastien Luttringer <seblu at archlinux.org>
-# Contributor: Allan McRae <allan at archlinux.org>
-# Contributor: Andreas Radke <andyrtr at archlinux.org>
-
-pkgname=file
-pkgver=5.20
-pkgrel=2
-pkgdesc='File type identification utility'
-arch=('i686' 'x86_64')
-license=('custom')
-groups=('base' 'base-devel')
-url='http://www.darwinsys.com/file/'
-depends=('glibc' 'zlib')
-source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"
-		'01-cve-2014-3710.patch')
-md5sums=('5d5e13eb3e0e13839da869a31790faf2'
-         'dde0002f513f44c4ef6c2152f0ece4ed')
-
-prepare() {
-  # https://bugs.archlinux.org/task/42759
-  patch -p1 -d $pkgname-$pkgver < '01-cve-2014-3710.patch'
-}
-
-build() {
-  cd $pkgname-$pkgver
-  ./configure --prefix=/usr --datadir=/usr/share/file
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="$pkgdir" install
-  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
-  rmdir "$pkgdir/usr/share/man/man5"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: file/repos/core-i686/PKGBUILD (from rev 227795, file/repos/testing-i686/PKGBUILD)
===================================================================
--- core-i686/PKGBUILD	                        (rev 0)
+++ core-i686/PKGBUILD	2014-12-19 18:32:32 UTC (rev 227796)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Sébastien Luttringer <seblu at archlinux.org>
+# Contributor: Allan McRae <allan at archlinux.org>
+# Contributor: Andreas Radke <andyrtr at archlinux.org>
+
+pkgname=file
+pkgver=5.21
+pkgrel=3
+pkgdesc='File type identification utility'
+arch=('i686' 'x86_64')
+license=('custom')
+groups=('base' 'base-devel')
+url='http://www.darwinsys.com/file/'
+depends=('glibc' 'zlib')
+source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"
+        '01-fix-broken-xz.patch'
+        '02-ignore-exit-code-from-uncompress.patch')
+md5sums=('549fe96e09041eabece9de2bb28ef923'
+         '62c8d81023e1705d8826d79d0a8fdaae'
+         '39e9867b888bf6e2c1664d3c44712f3b')
+
+prepare() {
+  # https://bugs.archlinux.org/task/43078
+  patch -p1 -d $pkgname-$pkgver < '01-fix-broken-xz.patch'
+  # https://bugs.archlinux.org/task/43082
+  patch -p1 -d $pkgname-$pkgver < '02-ignore-exit-code-from-uncompress.patch'
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr --datadir=/usr/share/file
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+  rmdir "$pkgdir/usr/share/man/man5"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: core-x86_64/01-cve-2014-3710.patch
===================================================================
--- core-x86_64/01-cve-2014-3710.patch	2014-12-19 17:38:00 UTC (rev 227795)
+++ core-x86_64/01-cve-2014-3710.patch	2014-12-19 18:32:32 UTC (rev 227796)
@@ -1,18 +0,0 @@
-diff --git a/src/readelf.c b/src/readelf.c
-index 08f81f5..9ebdebd 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -477,6 +477,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
- 	uint32_t namesz, descsz;
- 	unsigned char *nbuf = CAST(unsigned char *, vbuf);
- 
-+	if (xnh_sizeof + offset > size) {
-+		/*
-+		 * We're out of note headers.
-+		 */
-+		return xnh_sizeof + offset;
-+	}
-+
- 	(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
- 	offset += xnh_sizeof;
- 

Copied: file/repos/core-x86_64/01-fix-broken-xz.patch (from rev 227795, file/repos/testing-x86_64/01-fix-broken-xz.patch)
===================================================================
--- core-x86_64/01-fix-broken-xz.patch	                        (rev 0)
+++ core-x86_64/01-fix-broken-xz.patch	2014-12-19 18:32:32 UTC (rev 227796)
@@ -0,0 +1,44 @@
+From abc95cd644418cc5205a8ad07d864f0851ac49df Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Thu, 11 Dec 2014 11:47:08 +0000
+Subject: [PATCH] PR/405: file -bizL git-2.1.3.tar.xz broke because the xz
+ decompressor dies with SIGPIPE when we stop reading from it early. ignore
+ SIGPIPE>
+
+---
+ src/compress.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/compress.c b/src/compress.c
+index fa9e07a..bf93839 100644
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -45,6 +45,7 @@ FILE_RCSID("@(#)$File: compress.c,v 1.74 2014/10/26 20:23:30 christos Exp $")
+ #endif
+ #include <string.h>
+ #include <errno.h>
++#include <signal.h>
+ #if !defined(__MINGW32__) && !defined(WIN32)
+ #include <sys/ioctl.h>
+ #endif
+@@ -103,10 +104,12 @@ file_zmagic(struct magic_set *ms, int fd, const char *name,
+ 	size_t i, nsz;
+ 	int rv = 0;
+ 	int mime = ms->flags & MAGIC_MIME;
++	sig_t osigpipe;
+ 
+ 	if ((ms->flags & MAGIC_COMPRESS) == 0)
+ 		return 0;
+ 
++	osigpipe = signal(SIGPIPE, SIG_IGN);
+ 	for (i = 0; i < ncompr; i++) {
+ 		if (nbytes < compr[i].maglen)
+ 			continue;
+@@ -133,6 +136,7 @@ file_zmagic(struct magic_set *ms, int fd, const char *name,
+ 		}
+ 	}
+ error:
++	(void)signal(SIGPIPE, osigpipe);
+ 	free(newbuf);
+ 	ms->flags |= MAGIC_COMPRESS;
+ 	return rv;

Copied: file/repos/core-x86_64/02-ignore-exit-code-from-uncompress.patch (from rev 227795, file/repos/testing-x86_64/02-ignore-exit-code-from-uncompress.patch)
===================================================================
--- core-x86_64/02-ignore-exit-code-from-uncompress.patch	                        (rev 0)
+++ core-x86_64/02-ignore-exit-code-from-uncompress.patch	2014-12-19 18:32:32 UTC (rev 227796)
@@ -0,0 +1,34 @@
+From 05463f7b3d4588a656089e20ab53a5b81b875341 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Fri, 12 Dec 2014 16:33:01 +0000
+Subject: [PATCH] PR/405: Ignore exit code from uncompress programs because
+ some (validly) exit with non-zero code when they get SIGPIPE.
+
+---
+ src/compress.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/compress.c b/src/compress.c
+index bf93839..30be569 100644
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -512,11 +512,16 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
+ 			    strerror(errno));
+ #endif
+ 			n = NODATA;
+-		} else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
++		} else if (!WIFEXITED(status)) {
+ #ifdef DEBUG
+-			(void)fprintf(stderr, "Child status (0x%x)\n", status);
++			(void)fprintf(stderr, "Child not exited (0x%x)\n",
++			    status);
++#endif
++		} else if (WEXITSTATUS(status) != 0) {
++#ifdef DEBUG
++			(void)fprintf(stderr, "Child exited (0x%d)\n",
++			    WEXITSTATUS(status));
+ #endif
+-			n = NODATA;
+ 		}
+ 
+ 		(void) close(fdin[0]);

Deleted: core-x86_64/PKGBUILD
===================================================================
--- core-x86_64/PKGBUILD	2014-12-19 17:38:00 UTC (rev 227795)
+++ core-x86_64/PKGBUILD	2014-12-19 18:32:32 UTC (rev 227796)
@@ -1,38 +0,0 @@
-# $Id$
-# Mainainer: Sébastien Luttringer <seblu at archlinux.org>
-# Contributor: Allan McRae <allan at archlinux.org>
-# Contributor: Andreas Radke <andyrtr at archlinux.org>
-
-pkgname=file
-pkgver=5.20
-pkgrel=2
-pkgdesc='File type identification utility'
-arch=('i686' 'x86_64')
-license=('custom')
-groups=('base' 'base-devel')
-url='http://www.darwinsys.com/file/'
-depends=('glibc' 'zlib')
-source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"
-		'01-cve-2014-3710.patch')
-md5sums=('5d5e13eb3e0e13839da869a31790faf2'
-         'dde0002f513f44c4ef6c2152f0ece4ed')
-
-prepare() {
-  # https://bugs.archlinux.org/task/42759
-  patch -p1 -d $pkgname-$pkgver < '01-cve-2014-3710.patch'
-}
-
-build() {
-  cd $pkgname-$pkgver
-  ./configure --prefix=/usr --datadir=/usr/share/file
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="$pkgdir" install
-  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
-  rmdir "$pkgdir/usr/share/man/man5"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: file/repos/core-x86_64/PKGBUILD (from rev 227795, file/repos/testing-x86_64/PKGBUILD)
===================================================================
--- core-x86_64/PKGBUILD	                        (rev 0)
+++ core-x86_64/PKGBUILD	2014-12-19 18:32:32 UTC (rev 227796)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Sébastien Luttringer <seblu at archlinux.org>
+# Contributor: Allan McRae <allan at archlinux.org>
+# Contributor: Andreas Radke <andyrtr at archlinux.org>
+
+pkgname=file
+pkgver=5.21
+pkgrel=3
+pkgdesc='File type identification utility'
+arch=('i686' 'x86_64')
+license=('custom')
+groups=('base' 'base-devel')
+url='http://www.darwinsys.com/file/'
+depends=('glibc' 'zlib')
+source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"
+        '01-fix-broken-xz.patch'
+        '02-ignore-exit-code-from-uncompress.patch')
+md5sums=('549fe96e09041eabece9de2bb28ef923'
+         '62c8d81023e1705d8826d79d0a8fdaae'
+         '39e9867b888bf6e2c1664d3c44712f3b')
+
+prepare() {
+  # https://bugs.archlinux.org/task/43078
+  patch -p1 -d $pkgname-$pkgver < '01-fix-broken-xz.patch'
+  # https://bugs.archlinux.org/task/43082
+  patch -p1 -d $pkgname-$pkgver < '02-ignore-exit-code-from-uncompress.patch'
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr --datadir=/usr/share/file
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+  rmdir "$pkgdir/usr/share/man/man5"
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list