[packages/file] partially revert change causing regression in find-debuginfo; rel 2

atler atler at pld-linux.org
Sun Jun 12 23:54:04 CEST 2022


commit a886b8d910f935237f739015d74796dc090629af
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Jun 12 23:50:13 2022 +0200

    partially revert change causing regression in find-debuginfo; rel 2
    
    see https://bugs.astron.com/view.php?id=358

 file.spec             |  4 +++-
 stdin-filenames.patch | 14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/file.spec b/file.spec
index 95c2d8e..ae9401b 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.42
-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:		stdin-filenames.patch
 URL:		http://www.darwinsys.com/file/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -284,6 +285,7 @@ Wiązania Pythona 3 do biblioteki libmagic.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %if "%{_ver_lt '%{cc_version}' '3.4'}" == "1"
 %{__sed} -i -e 's,-Wextra,,' configure.ac
diff --git a/stdin-filenames.patch b/stdin-filenames.patch
new file mode 100644
index 0000000..40997f8
--- /dev/null
+++ b/stdin-filenames.patch
@@ -0,0 +1,14 @@
+diff --git a/src/file.c b/src/file.c
+index 5300e5af..6f42fd1d 100644
+--- a/src/file.c
++++ b/src/file.c
+@@ -554,8 +554,7 @@ process(struct magic_set *ms, const char *inname, int wid)
+ 	    file_err(EXIT_FAILURE, "Can't allocate %zu bytes", plen);
+ 
+ 	if (wid > 0 && !bflag) {
+-		pname = file_printable(ms, pbuf, plen, inname, wid);
+-		(void)printf("%s", std_in ? "/dev/stdin" : pname);
++		(void)printf("%s", std_in ? "/dev/stdin" : inname);
+ 		if (nulsep)
+ 			(void)putc('\0', stdout);
+ 		if (nulsep < 2) {
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list