From a836ad166aff8150dc0ac581c7aa90779a0145b4 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 15 Aug 2007 09:36:37 +0000 Subject: [PATCH] =?UTF-8?q?-=20improved=20perl=20dependency=20extraction?= =?UTF-8?q?=20(#198033,=20#249135)=20by=20Ville=20Skytt=C3=A4=20=20=20=20?= =?UTF-8?q?=20and=20John=20Owens=20-=20make=20find-lang=20--with-gnome=20p?= =?UTF-8?q?ick=20up=20.omf=20files=20(#251400)=20by=20Matthias=20=20=20=20?= =?UTF-8?q?=20Clasen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rpm-4.4.2.1-findlang-omf.patch | 29 +++++++++ rpm-4.4.2.1-perl-reqprov.patch | 112 +++++++++++++++++++++++++++++++++ rpm.spec | 13 +++- 3 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 rpm-4.4.2.1-findlang-omf.patch create mode 100644 rpm-4.4.2.1-perl-reqprov.patch diff --git a/rpm-4.4.2.1-findlang-omf.patch b/rpm-4.4.2.1-findlang-omf.patch new file mode 100644 index 0000000..4fa6745 --- /dev/null +++ b/rpm-4.4.2.1-findlang-omf.patch @@ -0,0 +1,29 @@ +changeset: 6304:03206d67072c +tag: tip +user: Panu Matilainen +date: Wed Aug 15 12:07:31 2007 +0300 +files: scripts/find-lang.sh +description: +Make find-lang.sh --with-gnome pick up omf files (rhbz#251400) +Patch from Matthias Clasen. + + +diff -r 7f45c685a512 -r 03206d67072c scripts/find-lang.sh +--- a/scripts/find-lang.sh Wed Aug 15 09:12:25 2007 +0200 ++++ b/scripts/find-lang.sh Wed Aug 15 12:07:31 2007 +0300 +@@ -106,6 +106,14 @@ s:%lang(C) :: + s:%lang(C) :: + /^$/d' >> $MO_NAME + ++find $TOP_DIR -type f|sed ' ++s:'"$TOP_DIR"':: ++'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\).omf\):%lang(\2) \1: ++'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\).omf\):%lang(\2) \1: ++s:^[^%].*:: ++s:%lang(C) :: ++/^$/d' >> $MO_NAME ++ + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: + '"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: + diff --git a/rpm-4.4.2.1-perl-reqprov.patch b/rpm-4.4.2.1-perl-reqprov.patch new file mode 100644 index 0000000..dce3d30 --- /dev/null +++ b/rpm-4.4.2.1-perl-reqprov.patch @@ -0,0 +1,112 @@ +diff -r 9f1a7ebe1223 -r 9f0012fffce1 scripts/perl.req +--- a/scripts/perl.req Fri Aug 10 10:02:25 2007 +0200 ++++ b/scripts/perl.req Fri Aug 10 11:41:24 2007 +0300 +@@ -1,6 +1,6 @@ + #!/usr/bin/perl + +-# RPM (and it's source code) is covered under two separate licenses. ++# RPM (and its source code) is covered under two separate licenses. + + # The entire code base may be distributed under the terms of the GNU + # General Public License (GPL), which appears immediately below. +@@ -17,7 +17,7 @@ + # Any questions regarding the licensing of RPM should be addressed to + # Erik Troan . + +-# a simple makedepends like script for perl. ++# a simple makedepend like script for perl. + + # To save development time I do not parse the perl grammmar but + # instead just lex it looking for what I want. I take special care to +@@ -59,9 +59,9 @@ foreach $module (sort keys %require) { + print "perl($module)\n"; + } else { + +- # I am not using rpm3.0 so I do not want spaces arround my ++ # I am not using rpm3.0 so I do not want spaces around my + # operators. Also I will need to change the processing of the +- # $RPM_* vairable when I upgrage. ++ # $RPM_* variable when I upgrade. + + print "perl($module) >= $require{$module}\n"; + } +@@ -82,11 +82,22 @@ sub process_file { + + # skip the "= <<" block + +- if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/i) || +- ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/i) ) { ++ if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) || ++ ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) { + $tag = $2; + while () { + ( $_ =~ /^$tag/) && last; ++ } ++ } ++ ++ # skip q{} quoted sections - just hope we don't have curly brackets ++ # within the quote, nor an escaped hash mark that isn't a comment ++ # marker, such as occurs right here. Draw the line somewhere. ++ if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) { ++ $tag = $1; ++ $tag =~ tr/{\(\[\#|\//})]#|\//; ++ while () { ++ ( $_ =~ m/\}/ ) && last; + } + } + +@@ -153,7 +164,7 @@ sub process_file { + + ($module =~ m/\$/) && next; + +- # skip if the phrase was "use of" -- shows up in gimp-perl, et al ++ # skip if the phrase was "use of" -- shows up in gimp-perl, et al. + next if $module eq 'of'; + + # if the module ends in a comma we probaly caught some +@@ -175,7 +186,7 @@ sub process_file { + next; + } + +- # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc ++ # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc. + # we can strip qw.*$, as well as (.*$: + $module =~ s/qw.*$//; + $module =~ s/\(.*$//; +@@ -187,7 +198,7 @@ sub process_file { + + $module =~ s/\//::/; + +- # trim off trailing parenthesis if any. Sometimes people pass ++ # trim off trailing parentheses if any. Sometimes people pass + # the module an empty list. + + $module =~ s/\(\s*\)$//; +@@ -208,7 +219,7 @@ sub process_file { + }; + + # ph files do not use the package name inside the file. +- # perlmodlib documentation says: ++ # perlmodlib documentation says: + + # the .ph files made by h2ph will probably end up as + # extension modules made by h2xs. + +diff -r fb37e4dccbf3 -r 0408b648de46 scripts/perl.prov +--- a/scripts/perl.prov Sat Jul 21 15:05:19 2007 +0300 ++++ b/scripts/perl.prov Sat Jul 21 15:48:03 2007 +0300 +@@ -144,11 +144,12 @@ sub process_file { + #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.9 $, 10; + #CGI/Apache.pm:$VERSION = (qw$Revision: 1.9 $)[1]; + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning ++ #General.pm:$Config::General::VERSION = 2.33; + # + # or with the new "our" pragma you could (read will) see: + # + # our $VERSION = '1.00' +- if (($package) && (m/^\s*(our\s+)?\$VERSION\s*=\s+/)) { ++ if (($package) && (m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/)) { + + # first see if the version string contains the string + # '$Revision' this often causes bizzare strings and is the most + diff --git a/rpm.spec b/rpm.spec index 14d4040..9a16bd1 100644 --- a/rpm.spec +++ b/rpm.spec @@ -14,7 +14,7 @@ Summary: The RPM package management system Name: rpm Version: 4.4.2.1 %{expand: %%define rpm_version %{version}} -Release: 7%{?dist} +Release: 8%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source: rpm-%{rpm_version}.tar.gz @@ -37,6 +37,8 @@ Patch16: rpm-4.4.2.1-strict-docdir.patch Patch17: rpm-4.4.2.1-buildid-thinko.patch Patch18: rpm-4.4.2.1-estale.patch Patch19: rpm-4.4.2.1-debuginfo-names.patch +Patch20: rpm-4.4.2.1-perl-reqprov.patch +Patch21: rpm-4.4.2.1-findlang-omf.patch # XXX Beware, this is one murky license, partially GPL/LGPL dual-licensed # and several different components with their own licenses included... License: (GPLv2 and LGPLv2 with exceptions) and BSD and MIT and Sleepycat @@ -59,6 +61,8 @@ BuildRequires: readline-devel zlib-devel BuildRequires: beecrypt-devel >= 4.1.2 Requires: beecrypt >= 4.1.2 +# XXX not yet... +# BuildRequires: popt-devel BuildConflicts: neon-devel BuildRequires: sqlite-devel BuildRequires: gettext-devel @@ -168,6 +172,8 @@ shell-like rules. %patch17 -p1 -b .buildid-thinko %patch18 -p1 -b .estale %patch19 -p1 -b .debugedit-names +%patch20 -p1 -b .perl-reqprov +%patch21 -p1 -b .findlang-omf cp -f %{SOURCE2} scripts/find-debuginfo.sh @@ -473,6 +479,11 @@ exit 0 %{__includedir}/popt.h %changelog +* Wed Aug 15 2007 Panu Matilainen - 4.4.2.1-8 +- improved perl dependency extraction (#198033, #249135) by Ville Skyttä + and John Owens +- make find-lang --with-gnome pick up .omf files (#251400) by Matthias Clasen + * Mon Aug 13 2007 Panu Matilainen - 4.4.2.1-7 - another debugedit fix and updated find-debuginfo script from Roland McGrath - make popt provide popt-devel to further ease split-off transition