[packages/file] - upstream fix for xz files detection regression, rel 2

baggins baggins at pld-linux.org
Wed Sep 29 23:53:04 CEST 2021


commit cf6d839f20abc87952af1704dc580457d4b366db
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Sep 29 23:52:26 2021 +0200

    - upstream fix for xz files detection regression, rel 2

 file.spec      |  3 ++-
 magic-xz.patch | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/file.spec b/file.spec
index 75f2c70..338fd84 100644
--- a/file.spec
+++ b/file.spec
@@ -35,7 +35,7 @@ Summary(zh_CN.UTF-8):	判定文件类型的工具。
 Summary(zh_TW.UTF-8):	用於決定檔案類型的一個工具程式。
 Name:		file
 Version:	5.40
-Release:	1
+Release:	2
 License:	distributable
 Group:		Applications/File
 Source0:	ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
@@ -50,6 +50,7 @@ Patch1:		searchpath.patch
 Patch2:		automake.patch
 Patch3:		%{name}-gettext-no-random-translations.patch
 Patch4:		name-use-count.patch
+Patch5:		magic-xz.patch
 URL:		http://www.darwinsys.com/file/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
diff --git a/magic-xz.patch b/magic-xz.patch
new file mode 100644
index 0000000..e4fed04
--- /dev/null
+++ b/magic-xz.patch
@@ -0,0 +1,37 @@
+From 9b0459afab309a82aa4e46f73a4e50dd641f3d39 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Mon, 19 Apr 2021 17:01:45 +0000
+Subject: [PATCH] PR/257: cuihao: put attributes inside the xz magic.
+
+---
+ magic/Magdir/compress | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/magic/Magdir/compress b/magic/Magdir/compress
+index 64d11a736..41a65738f 100644
+--- a/magic/Magdir/compress
++++ b/magic/Magdir/compress
+@@ -1,5 +1,5 @@
+ #------------------------------------------------------------------------------
+-# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $
++# $File: compress,v 1.81 2021/04/19 17:01:45 christos Exp $
+ # compress:  file(1) magic for pure-compression formats (no archives)
+ #
+ # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
+@@ -265,14 +265,13 @@
+ 
+ # http://tukaani.org/xz/xz-file-format.txt
+ 0	ustring		\xFD7zXZ\x00		XZ compressed data, checksum
++!:strength * 2
++!:mime	application/x-xz
+ >7	byte&0xf	0x0			NONE
+ >7	byte&0xf	0x1			CRC32
+ >7	byte&0xf	0x4			CRC64
+ >7	byte&0xf	0xa			SHA-256
+ 
+-!:strength * 2
+-!:mime	application/x-xz
+-
+ # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
+ 0	string		LRZI			LRZIP compressed data
+ >4	byte		x			- version %d
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/file.git/commitdiff/cf6d839f20abc87952af1704dc580457d4b366db



More information about the pld-cvs-commit mailing list