From e8e881741e327e1302d4082489849e1fcd0a96a3 Mon Sep 17 00:00:00 2001 From: Daniel Novotny Date: Wed, 24 Mar 2010 09:31:24 +0000 Subject: [PATCH] fix #575184 --- file-5.04-separ.patch | 15 +++++++++++++++ file.spec | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 file-5.04-separ.patch diff --git a/file-5.04-separ.patch b/file-5.04-separ.patch new file mode 100644 index 0000000..a9dc767 --- /dev/null +++ b/file-5.04-separ.patch @@ -0,0 +1,15 @@ +diff -up file-5.04/src/file.c.separ file-5.04/src/file.c +--- file-5.04/src/file.c.separ 2010-03-24 10:24:19.000000000 +0100 ++++ file-5.04/src/file.c 2010-03-24 10:24:52.000000000 +0100 +@@ -406,9 +406,8 @@ process(struct magic_set *ms, const char + if (wid > 0 && !bflag) { + (void)printf("%s", std_in ? "/dev/stdin" : inname); + if (nulsep) +- (void)putc('\0', stdout); +- else +- (void)printf("%s", separator); ++ (void)putc('\0', stdout); ++ (void)printf("%s", separator); + (void)printf("%*s ", + (int) (nopad ? 0 : (wid - file_mbswidth(inname))), ""); + } diff --git a/file.spec b/file.spec index 1335ac7..e136d2a 100644 --- a/file.spec +++ b/file.spec @@ -5,7 +5,7 @@ Summary: A utility for determining file types Name: file Version: 5.04 -Release: 4%{?dist} +Release: 5%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -16,6 +16,7 @@ Patch2: file-5.00-mdmp.patch Patch3: file-5.04-ulaw-segfault.patch Patch4: file-5.04-ruby-modules.patch Patch5: file-5.04-filesystem.patch +Patch6: file-5.04-separ.patch Requires: file-libs = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -79,6 +80,8 @@ file(1) command. %patch4 -p1 #fixes #570785 %patch5 -p1 +#fixes #575184 +%patch6 -p1 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ touch -r doc/libmagic.man doc/libmagic.man_ @@ -155,6 +158,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Mar 24 2010 Daniel Novotny 5.04-5 +- fix #575184 - file command does not print separator + when --print0 option is used + * Thu Mar 11 2010 Daniel Novotny 5.04-4 - fix #570785 - "file" misidentifies filesystem type