Browse Source

Refresh patch queue

* Remove patches cherry-picked from upstream
* Remove disable-detection-of-vax-coff-executables.patch, upstream improved
  the patterns.
Christoph Biedl 4 years ago
parent
commit
009654379c

+ 0 - 47
debian/patches/cherry-pick.FILE5_37-29-gfa46ca9d.allow-only-the-ioctls-we-use-shankara-pailoor.patch

@@ -1,47 +0,0 @@
-Subject: Allow only the ioctls we use (Shankara Pailoor)
-Origin: FILE5_37-29-gfa46ca9d <https://github.com/file/file/commit/FILE5_37-29-gfa46ca9d>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Fri Jun 21 16:44:23 2019 +0000
-
---- a/src/seccomp.c
-+++ b/src/seccomp.c
-@@ -33,6 +33,7 @@
- #if HAVE_LIBSECCOMP
- #include <seccomp.h> /* libseccomp */
- #include <sys/prctl.h> /* prctl */
-+#include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <fcntl.h>
- #include <stdlib.h>
-@@ -49,8 +50,14 @@
- 	    goto out; \
-     while (/*CONSTCOND*/0)
- 
--static scmp_filter_ctx ctx;
-+#define ALLOW_IOCTL_RULE(param) \
-+    do \
-+	if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(ioctl), 1, \
-+	    SCMP_CMP(1, SCMP_CMP_EQ, param)) == -1) \
-+		goto out; \
-+    while (/*CONSTCOND*/0)
- 
-+static scmp_filter_ctx ctx;
- 
- int
- enable_sandbox_basic(void)
-@@ -171,7 +178,14 @@
- #ifdef __NR_getdents64
- 	ALLOW_RULE(getdents64);
- #endif
--	ALLOW_RULE(ioctl);
-+#ifdef FIONREAD
-+	// called in src/compress.c under sread
-+	ALLOW_IOCTL_RULE(FIONREAD);
-+#endif
-+#ifdef TIOCGWINSZ
-+	// musl libc may call ioctl TIOCGWINSZ when calling stdout
-+	ALLOW_IOCTL_RULE(TIOCGWINSZ);
-+#endif
- 	ALLOW_RULE(lseek);
-  	ALLOW_RULE(_llseek);
- 	ALLOW_RULE(lstat);

+ 0 - 15
debian/patches/cherry-pick.FILE5_37-40-g3c6390a4.add-umask-2-from-shankara-pailoor.patch

@@ -1,15 +0,0 @@
-Subject: Add umask(2) (from Shankara Pailoor)
-Origin: FILE5_37-40-g3c6390a4 <https://github.com/file/file/commit/FILE5_37-40-g3c6390a4>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Wed Jul 3 15:33:20 2019 +0000
-
---- a/src/seccomp.c
-+++ b/src/seccomp.c
-@@ -211,6 +211,7 @@
- 	ALLOW_RULE(stat);
- 	ALLOW_RULE(stat64);
- 	ALLOW_RULE(sysinfo);
-+	ALLOW_RULE(umask);	// Used in file_pipe2file()
- 	ALLOW_RULE(unlink);
- 	ALLOW_RULE(write);
- 

+ 0 - 13
debian/patches/cherry-pick.FILE5_37-46-g103c6ec2.dont-print-the-string-entry-unless-the-zip-entry-matched-christoph-biedl.patch

@@ -1,13 +0,0 @@
-Subject: Don't print the string entry unless the zip entry matched (Christoph Biedl)
-Origin: FILE5_37-46-g103c6ec2 <https://github.com/file/file/commit/FILE5_37-46-g103c6ec2>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Sat Jul 6 19:25:06 2019 +0000
-
---- a/magic/Magdir/zip
-+++ b/magic/Magdir/zip
-@@ -60,4 +60,4 @@
- #>10	leshort		>1		\b, %d central directories
- #>12	lelong		x		\b, %d central directory bytes
- >(16.l)	use		zipcd
-->20	pstring/l	>0		\b, %s
-+>>20	pstring/l	>0		\b, %s

+ 0 - 34
debian/patches/cherry-pick.FILE5_37-47-g62de35af.disable-gem-gdos-fonts-for-now-needs-to-be-stronger.patch

@@ -1,34 +0,0 @@
-Subject: Disable GEM GDOS fonts for now, needs to be stronger
-Origin: FILE5_37-47-g62de35af <https://github.com/file/file/commit/FILE5_37-47-g62de35af>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Sat Jul 6 19:31:36 2019 +0000
-
---- a/magic/Magdir/fonts
-+++ b/magic/Magdir/fonts
-@@ -133,19 +133,19 @@
- # Reference: http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt
- #
- # usual case with lightening mask and skewing mask 5555h~UU
--62	ulelong		0x55555555
-->0	use		gdos-font
-+#62	ulelong		0x55555555
-+#>0	use		gdos-font
- # BOX18.GFT COWBOY30.GFT ROYALK30.GFT
--62	ulelong		0
-+#62	ulelong		0
- # skip ISO 9660 CD-ROM ./filesystem by looking for low positive face size
-->2	uleshort	>2
-+#>2	uleshort	>2
- # skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 48
-->>2	uleshort	<49
-+#>>2	uleshort	<49
- # skip MS Windows ICO ./msdos by looking for valid face name
-->>>4	ubeshort	>0x1F00
-+#>>>4	ubeshort	>0x1F00
- # skip DOS executable BACKM212.COM by looking for horizontal offset table after header
- #>>>>68	ulelong		>87		OFFSET_OK
-->>>>0	use		gdos-font
-+#>>>>0	use		gdos-font
- 0	name		gdos-font
- >0	uleshort	x		GEM GDOS font
- !:mime	application/x-font-gdos

+ 0 - 31
debian/patches/cherry-pick.FILE5_37-50-g2a1bb655.always-support-the-no-sandbox-option.patch

@@ -1,31 +0,0 @@
-Subject: Always support the --no-sandbox option
-Origin: FILE5_37-50-g2a1bb655 <https://github.com/file/file/commit/FILE5_37-50-g2a1bb655>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Sat Jul 13 16:23:58 2019 +0000
-
---- a/src/file.c
-+++ b/src/file.c
-@@ -297,11 +297,11 @@
- 		case 's':
- 			flags |= MAGIC_DEVICES;
- 			break;
--#ifdef HAVE_LIBSECCOMP
- 		case 'S':
-+#ifdef HAVE_LIBSECCOMP
- 			sandbox = 0;
--			break;
- #endif
-+			break;
- 		case 'v':
- 			if (magicfile == NULL)
- 				magicfile = magic_getpath(magicfile, action);
-@@ -309,6 +309,9 @@
- 			    VERSION);
- 			(void)fprintf(stdout, "magic file from %s\n",
- 			    magicfile);
-+#ifdef HAVE_LIBSECCOMP
-+			(void)fprintf(stdout, "seccomp support included\n");
-+#endif
- 			return 0;
- 		case 'z':
- 			flags |= MAGIC_COMPRESS;

+ 0 - 92
debian/patches/cherry-pick.FILE5_37-54-g119cc185.add-lzma-decompression-support.patch

@@ -1,92 +0,0 @@
-Subject: Add lzma decompression support
-Origin: FILE5_37-54-g119cc185 <https://github.com/file/file/commit/FILE5_37-54-g119cc185>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Thu Jul 18 15:43:54 2019 +0000
-
---- a/src/compress.c
-+++ b/src/compress.c
-@@ -113,6 +113,16 @@
- }
- #endif
- 
-+static int
-+lzmacmp(const unsigned char *buf)
-+{
-+	if (buf[0] != 0x5d || buf[1] || buf[2])
-+		return 0;
-+	if (buf[12] && buf[12] != 0xff)
-+		return 0;
-+	return 1;
-+}
-+
- #define gzip_flags "-cd"
- #define lrzip_flags "-do"
- #define lzip_flags gzip_flags
-@@ -147,29 +157,30 @@
- 
- private const struct {
- 	const void *magic;
--	size_t maglen;
-+	int maglen;
- 	const char **argv;
- 	void *unused;
- } compr[] = {
--	{ "\037\235",	2, gzip_args, NULL },		/* compressed */
-+	{ "\037\235",	2, gzip_args, NULL },		/* 0, compressed */
- 	/* Uncompress can get stuck; so use gzip first if we have it
- 	 * Idea from Damien Clark, thanks! */
--	{ "\037\235",	2, uncompress_args, NULL },	/* compressed */
--	{ "\037\213",	2, gzip_args, do_zlib },	/* gzipped */
--	{ "\037\236",	2, gzip_args, NULL },		/* frozen */
--	{ "\037\240",	2, gzip_args, NULL },		/* SCO LZH */
-+	{ "\037\235",	2, uncompress_args, NULL },	/* 1, compressed */
-+	{ "\037\213",	2, gzip_args, do_zlib },	/* 2, gzipped */
-+	{ "\037\236",	2, gzip_args, NULL },		/* 3, frozen */
-+	{ "\037\240",	2, gzip_args, NULL },		/* 4, SCO LZH */
- 	/* the standard pack utilities do not accept standard input */
--	{ "\037\036",	2, gzip_args, NULL },		/* packed */
--	{ "PK\3\4",	4, gzip_args, NULL },		/* pkzipped, */
-+	{ "\037\036",	2, gzip_args, NULL },		/* 5, packed */
-+	{ "PK\3\4",	4, gzip_args, NULL },		/* 6, pkzipped, */
- 	/* ...only first file examined */
--	{ "BZh",	3, bzip2_args, do_bzlib },	/* bzip2-ed */
--	{ "LZIP",	4, lzip_args, NULL },		/* lzip-ed */
-- 	{ "\3757zXZ\0",	6, xz_args, NULL },		/* XZ Utils */
-- 	{ "LRZI",	4, lrzip_args, NULL },	/* LRZIP */
-- 	{ "\004\"M\030",4, lz4_args, NULL },		/* LZ4 */
-- 	{ "\x28\xB5\x2F\xFD", 4, zstd_args, NULL },	/* zstd */
-+	{ "BZh",	3, bzip2_args, do_bzlib },	/* 7, bzip2-ed */
-+	{ "LZIP",	4, lzip_args, NULL },		/* 8, lzip-ed */
-+ 	{ "\3757zXZ\0",	6, xz_args, NULL },		/* 9, XZ Utils */
-+ 	{ "LRZI",	4, lrzip_args, NULL },	/* 10, LRZIP */
-+ 	{ "\004\"M\030",4, lz4_args, NULL },		/* 11, LZ4 */
-+ 	{ "\x28\xB5\x2F\xFD", 4, zstd_args, NULL },	/* 12, zstd */
-+	{ RCAST(const void *, lzmacmp),	-13, xz_args, NULL },	/* 13, lzma */
- #ifdef ZLIBSUPPORT
--	{ RCAST(const void *, zlibcmp),	0, zlib_args, NULL },	/* zlib */
-+	{ RCAST(const void *, zlibcmp),	-2, zlib_args, NULL },	/* 14, zlib */
- #endif
- };
- 
-@@ -234,15 +245,15 @@
- 
- 	for (i = 0; i < ncompr; i++) {
- 		int zm;
--		if (nbytes < compr[i].maglen)
-+		if (nbytes < CAST(size_t, abs(compr[i].maglen)))
- 			continue;
--#ifdef ZLIBSUPPORT
--		if (compr[i].maglen == 0)
-+		if (compr[i].maglen < 0) {
- 			zm = (RCAST(int (*)(const unsigned char *),
- 			    CCAST(void *, compr[i].magic)))(buf);
--		else
--#endif
--			zm = memcmp(buf, compr[i].magic, compr[i].maglen) == 0;
-+		} else {
-+			zm = memcmp(buf, compr[i].magic,
-+			    CAST(size_t, compr[i].maglen)) == 0;
-+		}
- 
- 		if (!zm)
- 			continue;

+ 0 - 225
debian/patches/cherry-pick.FILE5_37-55-gb259a07e.add-lzma-and-bzip-built-in-decompression-support.patch

@@ -1,225 +0,0 @@
-Subject: Add lzma and bzip built-in decompression support
-Origin: FILE5_37-55-gb259a07e <https://github.com/file/file/commit/FILE5_37-55-gb259a07e>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Thu Jul 18 20:32:06 2019 +0000
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -39,6 +39,16 @@
- [AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])])
- AC_MSG_RESULT($enable_zlib)
- 
-+AC_MSG_CHECKING(for bzlib support)
-+AC_ARG_ENABLE([bzlib],
-+[AS_HELP_STRING([--disable-bzlib], [disable bz2lib compression support @<:@default=auto@:>@])])
-+AC_MSG_RESULT($enable_bzlib)
-+
-+AC_MSG_CHECKING(for xzlib support)
-+AC_ARG_ENABLE([xzlib],
-+[AS_HELP_STRING([--disable-xzlib], [disable liblzma/xz compression support @<:@default=auto@:>@])])
-+AC_MSG_RESULT($enable_xzlib)
-+
- AC_MSG_CHECKING(for libseccomp support)
- AC_ARG_ENABLE([libseccomp],
- [AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing @<:@default=auto@:>@])])
-@@ -97,6 +107,12 @@
- if test "$enable_zlib" != "no"; then
-   AC_CHECK_HEADERS(zlib.h)
- fi
-+if test "$enable_bzlib" != "no"; then
-+  AC_CHECK_HEADERS(bzlib.h)
-+fi
-+if test "$enable_xzlib" != "no"; then
-+  AC_CHECK_HEADERS(lzma.h)
-+fi
- AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include <signal.h>])
- 
- dnl Checks for typedefs, structures, and compiler characteristics.
-@@ -160,6 +176,12 @@
- if test "$enable_zlib" != "no"; then
-   AC_CHECK_LIB(z, gzopen)
- fi
-+if test "$enable_bzlib" != "no"; then
-+  AC_CHECK_LIB(bz2, BZ2_bzCompressInit)
-+fi
-+if test "$enable_xzlib" != "no"; then
-+  AC_CHECK_LIB(lzma, lzma_stream_decoder)
-+fi
- if test "$enable_libseccomp" != "no"; then
-     AC_CHECK_LIB(seccomp, seccomp_init)
- fi
-@@ -179,6 +201,22 @@
- if  test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then
-   AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support])
- fi
-+if test "$enable_bzlib" = "yes"; then
-+  if test "$ac_cv_header_bzlib_h$ac_cv_lib_bz2_BZ2_bzCompressInit" != "yesyes"; then
-+    AC_MSG_ERROR([bzlib support requested but not found])
-+  fi
-+fi
-+if  test "$ac_cv_header_bzlib_h$ac_cv_lib_bz2_BZ2_bzCompressInit" = "yesyes"; then
-+  AC_DEFINE([BZLIBSUPPORT], 1, [Enable bzlib compression support])
-+fi
-+if test "$enable_xzlib" = "yes"; then
-+  if test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_stream_decoder" != "yesyes"; then
-+    AC_MSG_ERROR([xzlib support requested but not found])
-+  fi
-+fi
-+if  test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_stream_decoder" = "yesyes"; then
-+  AC_DEFINE([XZLIBSUPPORT], 1, [Enable xzlib compression support])
-+fi
- 
- AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile])
- AC_OUTPUT
---- a/src/compress.c
-+++ b/src/compress.c
-@@ -66,11 +66,16 @@
- #include <zlib.h>
- #endif
- 
--#if defined(HAVE_BZLIB_H)
-+#if defined(HAVE_BZLIB_H) || defined(BZLIBSUPPORT)
- #define BUILTIN_BZLIB
- #include <bzlib.h>
- #endif
- 
-+#if defined(HAVE_XZLIB_H) || defined(XZLIBSUPPORT)
-+#define BUILTIN_XZLIB
-+#include <lzma.h>
-+#endif
-+
- #ifdef DEBUG
- int tty = -1;
- #define DPRINTF(...)	do { \
-@@ -201,7 +206,11 @@
- #endif
- #ifdef BUILTIN_BZLIB
- private int uncompressbzlib(const unsigned char *, unsigned char **, size_t,
--    size_t *, int);
-+    size_t *);
-+#endif
-+#ifdef BUILTIN_XZLIB
-+private int uncompressxzlib(const unsigned char *, unsigned char **, size_t,
-+    size_t *);
- #endif
- 
- static int makeerror(unsigned char **, size_t *, const char *, ...)
-@@ -581,6 +590,90 @@
- }
- #endif
- 
-+#ifdef BUILTIN_BZLIB
-+private int
-+uncompressbzlib(const unsigned char *old, unsigned char **newch,
-+    size_t bytes_max, size_t *n)
-+{
-+	int rc;
-+	bz_stream bz;
-+
-+	memset(&bz, 0, sizeof(bz));
-+	rc = BZ2_bzDecompressInit(&bz, 0, 0);
-+	if (rc != BZ_OK)
-+		goto err;
-+
-+	if ((*newch = CAST(unsigned char *, malloc(bytes_max + 1))) == NULL)
-+		return makeerror(newch, n, "No buffer, %s", strerror(errno));
-+
-+	bz.next_in = CCAST(char *, RCAST(const char *, old));
-+	bz.avail_in = CAST(uint32_t, *n);
-+	bz.next_out = RCAST(char *, *newch);
-+	bz.avail_out = CAST(unsigned int, bytes_max);
-+
-+	rc = BZ2_bzDecompress(&bz);
-+	if (rc != BZ_OK && rc != BZ_STREAM_END)
-+		goto err;
-+
-+	/* Assume byte_max is within 32bit */
-+	/* assert(bz.total_out_hi32 == 0); */
-+	*n = CAST(size_t, bz.total_out_lo32);
-+	rc = BZ2_bzDecompressEnd(&bz);
-+	if (rc != BZ_OK)
-+		goto err;
-+
-+	/* let's keep the nul-terminate tradition */
-+	(*newch)[*n] = '\0';
-+
-+	return OKDATA;
-+err:
-+	snprintf(RCAST(char *, *newch), bytes_max, "bunzip error %d", rc);
-+	*n = strlen(RCAST(char *, *newch));
-+	return ERRDATA;
-+}
-+#endif
-+
-+#ifdef BUILTIN_XZLIB
-+private int
-+uncompressxzlib(const unsigned char *old, unsigned char **newch,
-+    size_t bytes_max, size_t *n)
-+{
-+	int rc;
-+	lzma_stream xz;
-+
-+	memset(&xz, 0, sizeof(xz));
-+	rc = lzma_auto_decoder(&xz, UINT64_MAX, 0);
-+	if (rc != LZMA_OK)
-+		goto err;
-+
-+	if ((*newch = CAST(unsigned char *, malloc(bytes_max + 1))) == NULL)
-+		return makeerror(newch, n, "No buffer, %s", strerror(errno));
-+
-+	xz.next_in = CCAST(const uint8_t *, old);
-+	xz.avail_in = CAST(uint32_t, *n);
-+	xz.next_out = RCAST(uint8_t *, *newch);
-+	xz.avail_out = CAST(unsigned int, bytes_max);
-+
-+	rc = lzma_code(&xz, LZMA_RUN);
-+	if (rc != LZMA_OK && rc != LZMA_STREAM_END)
-+		goto err;
-+
-+	*n = CAST(size_t, xz.total_out);
-+
-+	lzma_end(&xz);
-+
-+	/* let's keep the nul-terminate tradition */
-+	(*newch)[*n] = '\0';
-+
-+	return OKDATA;
-+err:
-+	snprintf(RCAST(char *, *newch), bytes_max, "unxz error %d", rc);
-+	*n = strlen(RCAST(char *, *newch));
-+	return ERRDATA;
-+}
-+#endif
-+
-+
- static int
- makeerror(unsigned char **buf, size_t *len, const char *fmt, ...)
- {
-@@ -713,6 +806,15 @@
- 	if (compr[method].maglen == 0)
- 		return uncompresszlib(old, newch, bytes_max, n, 1);
- #endif
-+#ifdef BUILTIN_BZLIB
-+	if (method == 7)
-+		return uncompressbzlib(old, newch, bytes_max, n);
-+#endif
-+#ifdef BUILTIN_XZLIB
-+	if (method == 9 || method == 13)
-+		return uncompressxzlib(old, newch, bytes_max, n);
-+#endif
-+
- 	(void)fflush(stdout);
- 	(void)fflush(stderr);
- 
---- a/src/seccomp.c
-+++ b/src/seccomp.c
-@@ -174,6 +174,9 @@
-  	ALLOW_RULE(fcntl64);
- 	ALLOW_RULE(fstat);
-  	ALLOW_RULE(fstat64);
-+#ifdef XZLIBSUPPORT
-+	ALLOW_RULE(futex);
-+#endif
- 	ALLOW_RULE(getdents);
- #ifdef __NR_getdents64
- 	ALLOW_RULE(getdents64);

+ 0 - 38
debian/patches/cherry-pick.FILE5_37-67-g46a8443f.limit-the-number-of-elements-in-a-vector-found-by-oss-fuzz.patch

@@ -1,38 +0,0 @@
-Subject: Limit the number of elements in a vector (found by oss-fuzz)
-Origin: FILE5_37-67-g46a8443f <https://github.com/file/file/commit/FILE5_37-67-g46a8443f>
-Upstream-Author: Christos Zoulas <christos@zoulas.com>
-Date: Mon Aug 26 14:31:39 2019 +0000
-
---- a/src/cdf.c
-+++ b/src/cdf.c
-@@ -1013,8 +1013,9 @@
- 				goto out;
- 			}
- 			nelements = CDF_GETUINT32(q, 1);
--			if (nelements == 0) {
--				DPRINTF(("CDF_VECTOR with nelements == 0\n"));
-+			if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
-+				DPRINTF(("CDF_VECTOR with nelements == %"
-+				    SIZE_T_FORMAT "u\n", nelements));
- 				goto out;
- 			}
- 			slen = 2;
-@@ -1056,8 +1057,6 @@
- 					goto out;
- 				inp += nelem;
- 			}
--			DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
--			    nelements));
- 			for (j = 0; j < nelements && i < sh.sh_properties;
- 			    j++, i++)
- 			{
---- a/src/cdf.h
-+++ b/src/cdf.h
-@@ -48,6 +48,7 @@
- typedef int32_t cdf_secid_t;
- 
- #define CDF_LOOP_LIMIT					10000
-+#define CDF_ELEMENT_LIMIT				100000
- 
- #define CDF_SECID_NULL					0
- #define CDF_SECID_FREE					-1

+ 0 - 28
debian/patches/local.disable-detection-of-vax-coff-executables.patch

@@ -1,28 +0,0 @@
-Subject: Disable detection of VAX COFF executables
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Date: Wed, 16 Sep 2015 23:59:58 +0200
-Bug-Debian: https://bugs.debian.org/697846
-
-    zlib compress data very often begins with \x78\x01 (deflate, 32k
-    window size). This clashes with VAX COFF where the latter has a
-    bigger strength. Additional havoc is created by the fact the
-    latter is considered an executable.
-
-    Disable "VAX COFF executable" for the time being. It's the lesser
-    evil.
-
---- a/magic/Magdir/vax
-+++ b/magic/Magdir/vax
-@@ -19,9 +19,9 @@
- # The `versions' were commented out, but have been un-commented out.
- # (Was the problem just one of endianness?)
- #
--0	leshort		0570		VAX COFF executable
-->12	lelong		>0		not stripped
-->22	leshort		>0		- version %d
-+#0	leshort		0570		VAX COFF executable
-+#>12	lelong		>0		not stripped
-+#>22	leshort		>0		- version %d
- 0	leshort		0575		VAX COFF pure executable
- >12	lelong		>0		not stripped
- >22	leshort		>0		- version %d

+ 1 - 1
debian/patches/local.don-t-include-libs-in-build.patch

@@ -6,7 +6,7 @@ Last-Update: 2016-06-27
 
 --- a/src/Makefile.in
 +++ b/src/Makefile.in
-@@ -481,7 +481,7 @@
+@@ -500,7 +500,7 @@
  
  file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES) $(EXTRA_file_DEPENDENCIES) 
  	@rm -f file$(EXEEXT)

+ 2 - 2
debian/patches/local.manpage-seccomp-is-disabled.patch

@@ -5,10 +5,10 @@ Bug-Debian: https://bugs.debian.org/917930
 
 --- a/doc/file.man
 +++ b/doc/file.man
-@@ -368,6 +368,10 @@
- i.e. when the
+@@ -371,6 +371,10 @@
  .Fl z
  flag is specified and the built-in decompressors are not available.
+ On systems where sandboxing is not available, this option has no effect.
 +.Pp
 +.Em Note:
 +This Debian version of file was built without seccomp support, so this option

+ 1 - 1
debian/patches/local.mention-posixly-correct-dependent-behaviour-in-usage-message.patch

@@ -5,7 +5,7 @@ Last-Update: 2016-06-27
 
 --- a/src/file_opts.h
 +++ b/src/file_opts.h
-@@ -36,8 +36,8 @@
+@@ -39,8 +39,8 @@
  OPT('k', "keep-going", 0, 0, "           don't stop at the first match\n")
  OPT('l', "list", 0, 0, "                 list magic strength\n")
  #ifdef S_IFLNK

+ 3 - 3
debian/patches/local.support-local-definitions-in-etc-magic.patch

@@ -47,7 +47,7 @@ Last-Update: 2016-06-27
  libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \
 --- a/src/Makefile.in
 +++ b/src/Makefile.in
-@@ -340,7 +340,7 @@
+@@ -359,7 +359,7 @@
  MAGIC = $(pkgdatadir)/magic
  lib_LTLIBRARIES = libmagic.la
  nodist_include_HEADERS = magic.h
@@ -55,7 +55,7 @@ Last-Update: 2016-06-27
 +AM_CPPFLAGS = -DMAGIC='"/etc/magic:$(MAGIC)"'
  AM_CFLAGS = $(CFLAG_VISIBILITY) @WARNINGS@
  libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \
- 	encoding.c compress.c is_json.c is_tar.c readelf.c print.c fsmagic.c \
+ 	encoding.c compress.c is_csv.c is_json.c is_tar.c readelf.c print.c \
 --- a/doc/file.man
 +++ b/doc/file.man
 @@ -57,7 +57,7 @@
@@ -77,7 +77,7 @@ Last-Update: 2016-06-27
  magic file
  .Pa __MAGIC__.mgc ,
  or the files in the directory
-@@ -553,12 +554,6 @@
+@@ -556,12 +557,6 @@
  The order of entries in the magic file is significant.
  Depending on what system you are using, the order that
  they are put together may be incorrect.

+ 0 - 9
debian/patches/series

@@ -1,12 +1,4 @@
 # cherry-picked commits. Keep in upstream's chronological order
-cherry-pick.FILE5_37-29-gfa46ca9d.allow-only-the-ioctls-we-use-shankara-pailoor.patch
-cherry-pick.FILE5_37-40-g3c6390a4.add-umask-2-from-shankara-pailoor.patch
-cherry-pick.FILE5_37-46-g103c6ec2.dont-print-the-string-entry-unless-the-zip-entry-matched-christoph-biedl.patch
-cherry-pick.FILE5_37-47-g62de35af.disable-gem-gdos-fonts-for-now-needs-to-be-stronger.patch
-cherry-pick.FILE5_37-50-g2a1bb655.always-support-the-no-sandbox-option.patch
-cherry-pick.FILE5_37-54-g119cc185.add-lzma-decompression-support.patch
-cherry-pick.FILE5_37-55-gb259a07e.add-lzma-and-bzip-built-in-decompression-support.patch
-cherry-pick.FILE5_37-67-g46a8443f.limit-the-number-of-elements-in-a-vector-found-by-oss-fuzz.patch
 
 # patches that should go upstream
 
@@ -14,7 +6,6 @@ cherry-pick.FILE5_37-67-g46a8443f.limit-the-number-of-elements-in-a-vector-found
 local.support-local-definitions-in-etc-magic.patch
 local.don-t-include-libs-in-build.patch
 local.mention-posixly-correct-dependent-behaviour-in-usage-message.patch
-local.disable-detection-of-vax-coff-executables.patch
 local.disable-algol68-detection.patch
 local.extra-magic.patch
 local.manpage-seccomp-is-disabled.patch