[packages/file] - fix handling wasm files (x.wasm failed: Bad magic format `version %#x (MVP)' (bad format char: #))

baggins baggins at pld-linux.org
Sat Aug 8 20:39:53 CEST 2020


commit f8bdc9cdeed853e1c340d159c9afa3cb38e90d8b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Aug 8 20:38:43 2020 +0200

    - fix handling wasm files (x.wasm failed: Bad magic format `version %#x (MVP)' (bad format char: #))
    - rel 2

 file.spec  |  4 +++-
 wasm.patch | 23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/file.spec b/file.spec
index 9662a0e..aa1b0fe 100644
--- a/file.spec
+++ b/file.spec
@@ -30,7 +30,7 @@ Summary(zh_CN.UTF-8):	判定文件类型的工具。
 Summary(zh_TW.UTF-8):	用於決定檔案類型的一個工具程式。
 Name:		file
 Version:	5.39
-Release:	1
+Release:	2
 License:	distributable
 Group:		Applications/File
 Source0:	ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
@@ -44,6 +44,7 @@ Patch0:		%{name}-selinux.patch
 Patch1:		searchpath.patch
 Patch2:		automake.patch
 Patch4:		name-use-count.patch
+Patch5:		wasm.patch
 URL:		http://www.darwinsys.com/file/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -273,6 +274,7 @@ Wiązania Pythona 3 do biblioteki libmagic.
 %patch1 -p1
 %patch2 -p1
 %patch4 -p1
+%patch5 -p1
 
 %if "%(echo %{cc_version} | sed -e 's/^[0-9]\./0&/)" < "03.4"
 %{__sed} -i -e 's,-Wextra,,' configure.ac
diff --git a/wasm.patch b/wasm.patch
new file mode 100644
index 0000000..508f933
--- /dev/null
+++ b/wasm.patch
@@ -0,0 +1,23 @@
+From 85b7ab83257b3191a1a7ca044589a092bcef2bb3 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Thu, 25 Jun 2020 16:52:48 +0000
+Subject: [PATCH] Include # (alternate format) to the list of uninteresting
+ formats Reported by Werner Fink
+
+---
+ src/funcs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/funcs.c b/src/funcs.c
+index 299b8f022..ecbfa28c5 100644
+--- a/src/funcs.c
++++ b/src/funcs.c
+@@ -93,7 +93,7 @@ file_checkfmt(char *msg, size_t mlen, const char *fmt)
+ 		if (*++p == '%')
+ 			continue;
+ 		// Skip uninteresting.
+-		while (strchr("0.'+- ", *p) != NULL)
++		while (strchr("#0.'+- ", *p) != NULL)
+ 			p++;
+ 		if (*p == '*') {
+ 			if (msg)
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list