[rpm] - adjust perl and python detection rules for libmagic change (#772699)

Panu Matilainen pmatilai at fedoraproject.org
Tue Jan 10 08:52:26 UTC 2012


commit c3ac54c9d5e3a2393d976c2dcd6771f476620f7a
Author: Panu Matilainen <pmatilai at redhat.com>
Date:   Tue Jan 10 10:55:04 2012 +0200

    - adjust perl and python detection rules for libmagic change (#772699)

 rpm-4.9.1.2-perl-python-attr.patch |   35 +++++++++++++++++++++++++++++++++++
 rpm.spec                           |    7 ++++++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/rpm-4.9.1.2-perl-python-attr.patch b/rpm-4.9.1.2-perl-python-attr.patch
new file mode 100644
index 0000000..b0221cb
--- /dev/null
+++ b/rpm-4.9.1.2-perl-python-attr.patch
@@ -0,0 +1,35 @@
+commit 9ddcc23d2b7ecaf5336530dbe37195b0057d0396
+Author: Ville Skyttä <ville.skytta at iki.fi>
+Date:   Tue Jan 10 10:48:13 2012 +0200
+
+    Adapt perl and python fileattrs to file 5.10 magics
+    
+    - file 5.10 has changed magics at least for perl and python scripts, samples:
+    
+      5.09: a /usr/bin/perl -w script, ASCII text executable, with very long lines
+      5.10: Perl script, ASCII text executable, with very long lines
+    
+      5.09: a /usr/bin/python script, ASCII text executable
+      5.10: Python script, ASCII text executable
+    
+    Signed-off-by: Panu Matilainen <pmatilai at redhat.com>
+
+diff --git a/fileattrs/perl.attr b/fileattrs/perl.attr
+index 23b873f..0daef58 100644
+--- a/fileattrs/perl.attr
++++ b/fileattrs/perl.attr
+@@ -1,3 +1,3 @@
+ %__perl_requires	%{_rpmconfigdir}/perl.req
+-%__perl_magic		^.*perl .*$
++%__perl_magic		^.*[Pp]erl .*$
+ %__perl_flags		exeonly
+diff --git a/fileattrs/python.attr b/fileattrs/python.attr
+index 5b48f75..4eaad76 100644
+--- a/fileattrs/python.attr
++++ b/fileattrs/python.attr
+@@ -1,4 +1,4 @@
+ %__python_provides	%{_rpmconfigdir}/pythondeps.sh --provides
+ %__python_requires	%{_rpmconfigdir}/pythondeps.sh --requires
+ %__python_path	^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$
+-%__python_magic		^python.*(executable|byte-compiled)$
++%__python_magic		^[Pp]ython.*(executable|byte-compiled)$
diff --git a/rpm.spec b/rpm.spec
index a318598..c71697d 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}9%{?dist}
+Release: %{?snapver:0.%{snapver}.}10%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.9.x/%{name}-%{srcver}.tar.bz2
@@ -44,6 +44,7 @@ Patch5: rpm-4.9.0-armhfp.patch
 # Patches already in upstream
 Patch100: rpm-4.9.x-fontattr.patch
 Patch101: rpm-4.9.x-elfattr.patch
+Patch102: rpm-4.9.1.2-perl-python-attr.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -223,6 +224,7 @@ packages on a system.
 
 %patch100 -p1 -b .fontattr
 %patch101 -p1 -b .elfattr
+%patch102 -p1 -b .perl-python-attr
 
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
@@ -451,6 +453,9 @@ exit 0
 %doc COPYING doc/librpm/html/*
 
 %changelog
+* Tue Jan 10 2012 Panu Matilainen <pmatilai at redhat.com> - 4.9.1.2-10
+- adjust perl and python detection rules for libmagic change (#772699)
+
 * Mon Jan 09 2012 Jindrich Novy <jnovy at redhat.com> - 4.9.1.2-9
 - recognize perl script as perl code (#772632)
 


More information about the scm-commits mailing list