public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Remember to add the osgideps patch..
Date: Mon, 23 Nov 2026 09:24:38 GMT	[thread overview]
Message-ID: <179542587853.1.8306658331985616408.rpms-rpm-6a747fab31ae@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 6a747fab31ae09ec31a1790aa874d5968b1c0569
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date   : 2007-10-12T05:48:22+00:00
Stats  : +197/-0 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/6a747fab31ae09ec31a1790aa874d5968b1c0569?branch=pmatilai-v6

Log:
Remember to add the osgideps patch..

---
diff --git a/rpm-4.4.2.2-osgideps.patch b/rpm-4.4.2.2-osgideps.patch
new file mode 100644
index 0000000..877fee4
--- /dev/null
+++ b/rpm-4.4.2.2-osgideps.patch
@@ -0,0 +1,197 @@
+changeset:   6184:9de21aa6bd62
+tag:         tip
+user:        Panu Matilainen <pmatilai@redhat.com>
+date:        Thu Sep 06 08:19:03 2007 +0300
+files:       scripts/Makefile.am scripts/osgideps.pl
+description:
+Add OSGi dependency extractor script from Kyu Lee
+(transplanted from 838c8ccfcf2619369e76bdca375721e049052dc8)
+
+
+diff -r 358dd9d838a6 -r 9de21aa6bd62 scripts/Makefile.am
+--- a/scripts/Makefile.am	Thu Oct 11 14:14:00 2007 +0300
++++ b/scripts/Makefile.am	Thu Sep 06 08:19:03 2007 +0300
+@@ -21,7 +21,7 @@ EXTRA_DIST = \
+ 	sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
+ 	vpkg-provides.sh vpkg-provides2.sh \
+ 	macros.perl* macros.python* \
+-	macros.php* find-*.php find-php-* mono-find*
++	macros.php* find-*.php find-php-* mono-find* osgideps.pl
+ 
+ installprefix = $(DESTDIR)
+ 
+@@ -38,7 +38,7 @@ config_SCRIPTS = \
+ 	cpanflute cpanflute2 Specfile.pm find-provides.perl \
+ 	find-requires.perl freshen.sh get_magic.pl getpo.sh http.req \
+ 	magic.prov magic.req perldeps.pl perl.prov perl.req pythondeps.sh \
+-	mono-find-requires mono-find-provides \
++	mono-find-requires mono-find-provides osgideps.pl \
+ 	rpmdb_loadcvt rpmdiff rpmdiff.cgi \
+ 	rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
+ 	sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
+diff -r 358dd9d838a6 -r 9de21aa6bd62 scripts/osgideps.pl
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/osgideps.pl	Thu Sep 06 08:19:03 2007 +0300
+@@ -0,0 +1,161 @@
++#!/usr/bin/perl
++
++
++use Cwd;
++use Getopt::Long;
++
++
++$cdir = getcwd();
++$TEMPDIR="/tmp";
++$MANIFEST_NAME="META-INF/MANIFEST.MF";
++
++
++# prepare temporary directory
++if (! (-d $TEMPDIR)) {
++        if (($_ = `mkdir $TEMPDIR`) != 0) {exit 1;}
++        elsif (! (-w $TEMPDIR) && (-x $TEMPDIR)) {exit 1;}
++}
++
++# parse options
++my ($show_provides, $show_requires);
++
++my $result = GetOptions("provides" => \$show_provides,
++			"requires" => \$show_requires);
++
++exit(1) if (not $result);
++
++
++
++@allfiles = <STDIN>;
++
++if ($show_provides) {
++	do_provides(@allfiles);
++}
++
++if ($show_requires) {
++	do_requires(@allfiles);
++}
++
++
++exit(0);
++
++
++
++sub do_provides {
++
++
++foreach $jar (@_) {
++
++next if -f $jar && -r $jar;
++ $jar =~ s/[^[:print:]]//g;
++        # if this jar contains MANIFEST.MF file
++        if (`jar tf $jar | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n") {
++                # extract MANIFEST.MF file from jar to temporary directory
++                chdir $TEMPDIR;
++                `jar xf $cdir/$jar $MANIFEST_NAME`;
++                open(MANIFEST, "$MANIFEST_NAME");
++                my $bundleName = "";
++                my $bundleVersion = "";
++                # parse bundle name and version
++                while(<MANIFEST>) {
++                        # get rid of non-print chars (some manifest files contain weird chars
++                        s/[^[:print]]//g;
++                        if (m/(^Bundle-SymbolicName: )((\w|\.)+)(\;*)(.*\n)/) {
++                                $bundleName = $2;
++                        }
++                        if (m/(^Bundle-Version: )(.*)/) {
++                                $bundleVersion = $2;
++                        }
++                }
++                # skip this jar if no bundle name exists
++                if (! $bundleName eq "") {
++                        if (! $bundleVersion eq "") {
++                                print "osgi(".$bundleName.") = ".$bundleVersion."\n";
++                        } else {
++                                print "osgi(".$bundleName.")\n";
++                        }
++                }
++                chdir $cdir;
++        }
++	
++}
++
++}
++
++
++sub do_requires {
++
++foreach $jar (@_) {
++next if -f $jar && -r $jar;
++$jar =~ s/[^[:print:]]//g;
++        if (`jar tf $jar | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n") {
++                chdir $TEMPDIR;
++                `jar xf $cdir/$jar $MANIFEST_NAME`;
++                open(MANIFEST, "$MANIFEST_NAME") or die;
++                my %reqcomp = ();
++                while(<MANIFEST>) {
++                        if (m/(^(Require-Bundle|Import-Package): )(.*)$/) {
++                                my $reqlist = "$3"."\n";
++                                while(<MANIFEST>) {
++                                        if (m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/) {
++                                                $len = length $_;
++                                                seek MANIFEST, $len*-1 , 1;
++                                                last;
++                                        }
++                                        $reqlist.="$_";
++                                }
++                                push @requirelist,  parseReqString($reqlist);
++                        }
++
++                }
++                chdir $cdir;
++	}
++
++}
++
++$list = "";
++for $require (@requirelist) {
++        $list .= "osgi(".$require->{NAME}.")".$require->{VERSION}."\n";
++}
++#$abc = `echo \"$list\"|grep -e \^osgi\\(.*\\)| sort|uniq`;
++print $list;
++
++}
++
++sub parseReqString {
++        my $reqstr = $_[0];
++        my @return;
++        $reqstr =~ s/ //g;
++        $reqstr =~ s/\n//g;
++        $reqstr =~ s/[^[:print:]]//g;
++        $reqstr =~ s/("[[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+)(,)([[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+")/$1 $3/g;
++        @reqcomp = split /,/g, $reqstr;
++        foreach $reqelement (@reqcomp) {
++                @reqelementfrmnt = split /;/g, $reqelement;
++                $name="";
++                $version="";
++                $name = $reqelementfrmnt[0];
++                for $i (1 .. $#reqelementfrmnt) {
++                        if ($reqelementfrmnt[$i] =~ m/(^(bundle-|)version=")(.*)(")/){
++                                $version = $3;
++                                last;
++                        }
++                }
++                $version = parseVersion($version);
++                push @return, { NAME=>"$name", VERSION=>"$version"};
++        }
++
++        return @return;
++}
++
++sub parseVersion {
++        my $ver = $_[0];
++        if ($ver eq "") { return "";}
++        if ($ver =~ m/(^[\[|\(])(.+)\ (.+)([\]|\)]$)/) {
++                ($1 eq "\[") ? return " <= $2" : return " < $2";
++        } else {
++                return " = $ver";
++        }
++        return $ver;
++}
++
+

                 reply	other threads:[~2026-11-23  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542587853.1.8306658331985616408.rpms-rpm-6a747fab31ae@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox