From a632597c992ce53a9d43f3467ee8b3e816b5b300 Mon Sep 17 00:00:00 2001 From: HanzZ Date: Mar 29 2013 06:46:42 +0000 Subject: fix #928995 - do not print white-space in the end of fsmagic --- diff --git a/file-5.14-bad-fsmagic-space.patch b/file-5.14-bad-fsmagic-space.patch new file mode 100644 index 0000000..8875b24 --- /dev/null +++ b/file-5.14-bad-fsmagic-space.patch @@ -0,0 +1,14 @@ +diff --git a/src/fsmagic.c b/src/fsmagic.c +index bf5f92a..fd1161d 100644 +--- a/src/fsmagic.c ++++ b/src/fsmagic.c +@@ -367,9 +367,5 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + /*NOTREACHED*/ + } + +- if (!mime && did) { +- if (file_printf(ms, " ") == -1) +- return -1; +- } + return ret; + } diff --git a/file.spec b/file.spec index 40b25d2..1474fe9 100644 --- a/file.spec +++ b/file.spec @@ -3,7 +3,7 @@ Summary: A utility for determining file types Name: file Version: 5.14 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -19,6 +19,7 @@ Patch6: file-5.04-generic-msdos.patch Patch7: file-5.14-x86boot.patch Patch8: file-5.14-perl.patch Patch9: file-5.14-elfspace.patch +Patch10: file-5.14-bad-fsmagic-space.patch URL: http://www.darwinsys.com/file/ Requires: file-libs = %{version}-%{release} BuildRequires: zlib-devel @@ -73,6 +74,7 @@ file(1) command. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ touch -r doc/libmagic.man doc/libmagic.man_ @@ -150,6 +152,9 @@ cd python %endif %changelog +* Fri Mar 29 2013 Jan Kaluza - 5.14-3 +- fix #928995 - do not print white-space in the end of fsmagic + * Mon Mar 25 2013 Jan Kaluza - 5.14-2 - fix useless space in ELF output which could break libtool