[arch-commits] Commit in file/repos/testing-x86_64 (5 files)

Evangelos Foutras foutrelis at archlinux.org
Mon May 24 14:41:44 UTC 2021


    Date: Monday, May 24, 2021 @ 14:41:44
  Author: foutrelis
Revision: 416258

archrelease: copy trunk to testing-x86_64

Added:
  file/repos/testing-x86_64/PKGBUILD
    (from rev 416257, file/trunk/PKGBUILD)
  file/repos/testing-x86_64/pr256.patch
    (from rev 416257, file/trunk/pr256.patch)
  file/repos/testing-x86_64/pr261.patch
    (from rev 416257, file/trunk/pr261.patch)
Deleted:
  file/repos/testing-x86_64/PKGBUILD
  file/repos/testing-x86_64/pr256.patch

-------------+
 PKGBUILD    |  128 +++++++++++++++++++++++++++++-----------------------------
 pr256.patch |   46 ++++++++++----------
 pr261.patch |   44 +++++++++++++++++++
 3 files changed, 132 insertions(+), 86 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-24 14:41:39 UTC (rev 416257)
+++ PKGBUILD	2021-05-24 14:41:44 UTC (rev 416258)
@@ -1,63 +0,0 @@
-# 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.40
-pkgrel=4
-pkgdesc='File type identification utility'
-arch=('x86_64')
-license=('custom')
-groups=('base-devel')
-url='https://www.darwinsys.com/file/'
-depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so')
-provides=('libmagic.so')
-source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc}
-        "pr256.patch" # fix binary detection that breaks subversion tests
-        "https://github.com/file/file/commit/9b0459afab309a82aa4e46f73a4e50dd641f3d39.patch")
-validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
-sha256sums=('167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57'
-            'SKIP'
-            'a418ec70c6086702e8a5bf62b15fc1f7d42ebe7dfedb649dfc465a25f063aff0'
-            'f5d9c964233b75d6b5ac1b95fe4cc23143fbc6070d3b136e91b542021959e7dd')
-
-prepare() {
-  cd $pkgname-$pkgver
-  # apply patch from the source array (should be a pacman feature)
-  local src
-  for src in "${source[@]}"; do
-    src="${src%%::*}"
-    src="${src##*/}"
-    [[ $src = *.patch ]] || continue
-    echo "Applying patch $src..."
-    patch -Np1 < "../$src"
-  done
-}
-
-build() {
-  cd $pkgname-$pkgver
-
-  # Fix linking libmagic (vfork needs libpthread)
-  CFLAGS+=" -pthread"
-
-  ./configure \
-    --prefix=/usr \
-    --datadir=/usr/share/file \
-    --enable-fsect-man5 \
-    --enable-libseccomp
-  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
-  make
-}
-
-check() {
-  cd $pkgname-$pkgver
-  make check
-}
-
-package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="$pkgdir" install
-  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: file/repos/testing-x86_64/PKGBUILD (from rev 416257, file/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-05-24 14:41:44 UTC (rev 416258)
@@ -0,0 +1,65 @@
+# 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.40
+pkgrel=5
+pkgdesc='File type identification utility'
+arch=('x86_64')
+license=('custom')
+groups=('base-devel')
+url='https://www.darwinsys.com/file/'
+depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so')
+provides=('libmagic.so')
+source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc}
+        "pr256.patch" # fix binary detection that breaks subversion tests
+        "pr261.patch" # follow-up patch which restores file 5.39 behavior
+        "https://github.com/file/file/commit/9b0459afab309a82aa4e46f73a4e50dd641f3d39.patch")
+validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
+sha256sums=('167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57'
+            'SKIP'
+            '5fd8dc41a10ee8097ddbffad37e07ea417b6ea5ff9d416d4aadfe15bc33a46df'
+            'c149311a54ee2539344d6ace2cb733e45bc1c134cd91d50d462dd9edbff916f5'
+            'f5d9c964233b75d6b5ac1b95fe4cc23143fbc6070d3b136e91b542021959e7dd')
+
+prepare() {
+  cd $pkgname-$pkgver
+  # apply patch from the source array (should be a pacman feature)
+  local src
+  for src in "${source[@]}"; do
+    src="${src%%::*}"
+    src="${src##*/}"
+    [[ $src = *.patch ]] || continue
+    echo "Applying patch $src..."
+    patch -Np1 < "../$src"
+  done
+}
+
+build() {
+  cd $pkgname-$pkgver
+
+  # Fix linking libmagic (vfork needs libpthread)
+  CFLAGS+=" -pthread"
+
+  ./configure \
+    --prefix=/usr \
+    --datadir=/usr/share/file \
+    --enable-fsect-man5 \
+    --enable-libseccomp
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make
+}
+
+check() {
+  cd $pkgname-$pkgver
+  make check
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: pr256.patch
===================================================================
--- pr256.patch	2021-05-24 14:41:39 UTC (rev 416257)
+++ pr256.patch	2021-05-24 14:41:44 UTC (rev 416258)
@@ -1,23 +0,0 @@
-From 749e1ecfc3d333e5ec8b1a2e639da7ccb2498c34 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos at zoulas.com>
-Date: Mon, 19 Apr 2021 18:38:04 +0000
-Subject: [PATCH] PR/256: mutableVoid: If the file is less than 3 bytes, use
- the file length to determine type
-
----
- src/encoding.c | 4 ++--
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/encoding.c b/src/encoding.c
-index 0fb1f47b..31d4d125 100644
---- a/src/encoding.c
-+++ b/src/encoding.c
-@@ -285,7 +285,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
- 		if (dist[i]) \
- 			u++; \
- 	} \
--	if (u < 3) \
-+	if (u < MIN(nbytes, 3)) \
- 		return 0; \
- \
- 	return 1; \

Copied: file/repos/testing-x86_64/pr256.patch (from rev 416257, file/trunk/pr256.patch)
===================================================================
--- pr256.patch	                        (rev 0)
+++ pr256.patch	2021-05-24 14:41:44 UTC (rev 416258)
@@ -0,0 +1,23 @@
+From 749e1ecfc3d333e5ec8b1a2e639da7ccb2498c34 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Mon, 19 Apr 2021 18:38:04 +0000
+Subject: [PATCH] PR/256: mutableVoid: If the file is less than 3 bytes, use
+ the file length to determine type
+
+---
+ src/encoding.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/encoding.c b/src/encoding.c
+index 0fb1f47b..31d4d125 100644
+--- a/src/encoding.c
++++ b/src/encoding.c
+@@ -285,7 +285,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
+ 		if (dist[i]) \
+ 			u++; \
+ 	} \
+-	if (u < 3) \
++	if (u < MIN(nbytes, 3)) \
+ 		return 0; \
+ \
+ 	return 1; \

Copied: file/repos/testing-x86_64/pr261.patch (from rev 416257, file/trunk/pr261.patch)
===================================================================
--- pr261.patch	                        (rev 0)
+++ pr261.patch	2021-05-24 14:41:44 UTC (rev 416258)
@@ -0,0 +1,44 @@
+From c07e242e766242a44ff720c149b1bdd4924ec247 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Tue, 27 Apr 2021 19:37:14 +0000
+Subject: [PATCH] Revert the fix for PR/180. It lead to PR/261. Using character
+ count heuristics ends up with confusing behavior, the following should not be
+ producing different results:     echo -n xx | ./file -     echo -n xy |
+ ./file -
+
+---
+ src/encoding.c | 13 +-------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/src/encoding.c b/src/encoding.c
+index 31d4d1251..3647a481d 100644
+--- a/src/encoding.c
++++ b/src/encoding.c
+@@ -265,9 +265,7 @@ private int \
+ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
+     size_t *ulen) \
+ { \
+-	size_t i, u; \
+-	unsigned char dist[256]; \
+-	memset(dist, 0, sizeof(dist)); \
++	size_t i; \
+ \
+ 	*ulen = 0; \
+ \
+@@ -278,16 +276,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
+ 			return 0; \
+ \
+ 		ubuf[(*ulen)++] = buf[i]; \
+-		dist[buf[i]]++; \
+ 	} \
+-	u = 0; \
+-	for (i = 0; i < __arraycount(dist); i++) { \
+-		if (dist[i]) \
+-			u++; \
+-	} \
+-	if (u < MIN(nbytes, 3)) \
+-		return 0; \
+-\
+ 	return 1; \
+ }
+ 



More information about the arch-commits mailing list