rpm/rpm-4.9.0-file-compat.patch
Panu Matilainen 23ac61a41f - fix crash if prep or changelog section in spec is empty (#706959)
- fix crash on macro which undefines itself
- fix script dependency generation with file 5.07 string changes (#712251)
2011-06-10 12:32:12 +03:00

40 lines
1.6 KiB
Diff

commit db4905f51eb80b55c408e3a659bab6b4ec5d9e3b
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Fri Jun 10 12:08:45 2011 +0300
Adjust script detection rules to work with file >= 5.07 too (RhBug:712251)
- Somewhere between file 5.05 and 5.07 it started adding encoding
to script descriptions, eg "<mumble> script text executable" became
"<mumble> script, <encoding> text executable" breaking what had
been working for 10+ years in the case of old find-requires.
- Permit either comma or space after "script", this works for both
old and new file.
diff --git a/autodeps/linux.req b/autodeps/linux.req
index cf60bd9..b9a8f99 100644
--- a/autodeps/linux.req
+++ b/autodeps/linux.req
@@ -20,10 +20,11 @@ fi
# --- Grab the file manifest and classify files.
#filelist=`sed "s/['\"]/\\\&/g"`
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
-exelist=`echo $filelist | xargs -r file | grep -Ev ":.* (commands|script) " | \
+exelist=`echo $filelist | xargs -r file | \
+ grep -Ev ":.* (commands|script)[, ]" | \
grep ":.*executable" | cut -d: -f1`
scriptlist=`echo $filelist | xargs -r file | \
- grep -E ":.* (commands|script) " | cut -d: -f1`
+ grep -E ":.* (commands|script)[, ]" | cut -d: -f1`
liblist=`echo $filelist | xargs -r file | \
grep ":.*shared object" | cut -d : -f1`
diff --git a/fileattrs/script.attr b/fileattrs/script.attr
index 13b8ba0..79f4d73 100644
--- a/fileattrs/script.attr
+++ b/fileattrs/script.attr
@@ -1,3 +1,3 @@
%__script_requires %{_rpmconfigdir}/script.req
-%__script_magic ^.* script text.*$
+%__script_magic ^.* script[, ].*$
%__script_flags exeonly