From 1cefad535cc6e605253a14935a901dd100367e83 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 22 May 2013 08:48:55 +0300 Subject: [PATCH] - only consider files with .pm suffix as perl modules (#927211) --- rpm-4.11.x-perllib-attr.patch | 20 ++++++++++++++++++++ rpm.spec | 8 +++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 rpm-4.11.x-perllib-attr.patch diff --git a/rpm-4.11.x-perllib-attr.patch b/rpm-4.11.x-perllib-attr.patch new file mode 100644 index 0000000..f2071ab --- /dev/null +++ b/rpm-4.11.x-perllib-attr.patch @@ -0,0 +1,20 @@ +commit 9b734cee5dc9805a6f8d24c3f30ed82a7aef5673 +Author: Panu Matilainen +Date: Wed May 22 08:38:53 2013 +0300 + + Only consider files with .pm suffix as perl modules (RhBug:927211) + + - Newer file is more eager to flag files as Perl module source, + causing false provides to be generated. Require both magic + and path to match for perllib classification to reduce the pain. + +diff --git a/fileattrs/perllib.attr b/fileattrs/perllib.attr +index 4e54225..fcad480 100644 +--- a/fileattrs/perllib.attr ++++ b/fileattrs/perllib.attr +@@ -1,3 +1,5 @@ + %__perllib_provides %{_rpmconfigdir}/perl.prov + %__perllib_requires %{_rpmconfigdir}/perl.req + %__perllib_magic ^Perl[[:digit:]] module source.* ++%__perllib_path \\.pm$ ++%__perllib_flags magic_and_path diff --git a/rpm.spec b/rpm.spec index d623712..64ff0bc 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}.}5%{?dist} +Release: %{?snapver:0.%{snapver}.}6%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -51,6 +51,8 @@ Patch100: 0001-Finish-lua-5.2-support-trac-865.patch Patch101: rpm-4.11.x-cursor-failchk.patch # Filter soname dependencies by name Patch102: rpm-4.11.x-filter-soname-deps.patch +# Stricter perllib classification +Patch103: rpm-4.11.x-perllib-attr.patch # These are not yet upstream Patch301: rpm-4.6.0-niagara.patch @@ -232,6 +234,7 @@ packages on a system. %patch100 -p1 -b .lua-5.2 %patch101 -p1 -b .cursor-failchk %patch102 -p1 -b .filter-soname-deps +%patch103 -p1 -b .perllib-attr %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -465,6 +468,9 @@ exit 0 %doc COPYING doc/librpm/html/* %changelog +* Wed May 22 2013 Panu Matilainen - - 4.11.0.1-6 +- only consider files with .pm suffix as perl modules (#927211) + * Fri May 17 2013 Panu Matilainen - - 4.11.0.1-5 - filter out non-library soname dependencies