Hello community,
here is the log from the commit of package build for openSUSE:Factory
checked in at Mon Aug 2 11:53:53 CEST 2010.
--------
--- build/build.changes 2010-07-08 15:16:33.000000000 +0200
+++ build/build.changes 2010-07-28 15:48:13.000000000 +0200
@@ -1,0 +2,15 @@
+Wed Jul 28 15:44:41 CEST 2010 - mls@suse.de
+
+- update to current git
+ * document --repo and --dist
+ * update wiki links
+ * fix bugs in repo handling
+ * fix distribution autodetection code
+
+-------------------------------------------------------------------
+Thu Jul 22 09:22:03 UTC 2010 - adrian@suse.de
+
+- update to current git
+ * support for Files provide
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
build-2010.07.08.tar.gz
New:
----
build-2010.07.28.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.TKUkcQ/_old 2010-08-02 11:52:47.000000000 +0200
+++ /var/tmp/diff_new_pack.TKUkcQ/_new 2010-08-02 11:52:47.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package build (Version 2010.07.08)
+# spec file for package build (Version 2010.07.28)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,7 +23,7 @@
Group: Development/Tools/Building
AutoReqProv: on
Summary: A Script to Build SUSE Linux RPMs
-Version: 2010.07.08
+Version: 2010.07.28
Release: 1
# osc rm build-*tar.bz2
# REVISION=$(svn info https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/build | sed -ne "/Revision: /s///p")
++++++ build-2010.07.08.tar.gz -> build-2010.07.28.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/Build.pm new/build-2010.07.28/Build.pm
--- old/build-2010.07.08/Build.pm 2010-05-04 10:25:18.000000000 +0200
+++ new/build-2010.07.28/Build.pm 2010-07-28 15:14:43.000000000 +0200
@@ -151,6 +151,7 @@
$config->{'release'} = '.';
$config->{'repotype'} = [];
$config->{'patterntype'} = [];
+ $config->{'fileprovides'} = {};
for my $l (@spec) {
$l = $l->[1] if ref $l;
next unless defined $l;
@@ -188,6 +189,16 @@
} else {
$config->{'substitute'}->{$ll} = [ @l ];
}
+ } elsif ($l0 eq 'fileprovides:') {
+ next unless @l;
+ $ll = shift @l;
+ if ($ll eq '!*') {
+ $config->{'fileprovides'} = {};
+ } elsif ($ll =~ /^!(.*)$/) {
+ delete $config->{'fileprovides'}->{$1};
+ } else {
+ $config->{'fileprovides'}->{$ll} = [ @l ];
+ }
} elsif ($l0 eq 'exportfilter:') {
next unless @l;
$ll = shift @l;
@@ -375,10 +386,10 @@
sub readdeps {
my ($config, $pkginfo, @depfiles) = @_;
- my %whatprovides = ();
my %requires = ();
local *F;
my %provides;
+ my $dofileprovides = %{$config->{'fileprovides'}};
for my $depfile (@depfiles) {
if (ref($depfile) eq 'HASH') {
for my $rr (keys %$depfile) {
@@ -394,7 +405,7 @@
my $s = shift @s;
my @ss;
while (@s) {
- if ($s[0] =~ /^\//) {
+ if (!$dofileprovides && $s[0] =~ /^\//) {
shift @s;
next;
}
@@ -440,14 +451,27 @@
}
close F;
}
- for my $p (keys %provides) {
- my @pp = @{$provides{$p}};
+ $config->{'providesh'} = \%provides;
+ $config->{'requiresh'} = \%requires;
+ makewhatprovidesh($config);
+}
+
+sub makewhatprovidesh {
+ my ($config) = @_;
+
+ my %whatprovides;
+ my $provides = $config->{'providesh'};
+
+ for my $p (keys %$provides) {
+ my @pp = @{$provides->{$p}};
s/[ <=>].*// for @pp;
push @{$whatprovides{$_}}, $p for unify(@pp);
}
- $config->{'providesh'} = \%provides;
+ for my $p (keys %{$config->{'fileprovides'}}) {
+ my @pp = map {@{$whatprovides{$_} || []}} @{$config->{'fileprovides'}->{$p}};
+ @{$whatprovides{$p}} = unify(@{$whatprovides{$p} || []}, @pp) if @pp;
+ }
$config->{'whatprovidesh'} = \%whatprovides;
- $config->{'requiresh'} = \%requires;
}
sub setdeps {
@@ -588,6 +612,7 @@
if ($r eq $p) {
push @rerror, "nothing provides $r";
} else {
+ next if $r =~ /^\//;
push @rerror, "nothing provides $r needed by $p";
}
next;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/build new/build-2010.07.28/build
--- old/build-2010.07.08/build 2010-07-08 15:13:32.000000000 +0200
+++ new/build-2010.07.28/build 2010-07-28 15:14:43.000000000 +0200
@@ -1397,12 +1397,12 @@
fi
if [ "$VM_TYPE" = 'xen' ]; then
- XMROOT=file:$VM_IMAGE
+ XMROOT="file:$(readlink -f $VM_IMAGE)"
XMROOT=${XMROOT/#file:\/dev/phy:/dev}
XMROOT="disk=$XMROOT,hda1,w"
XMSWAP=
if test -n "$VM_SWAP" ; then
- XMSWAP=file:$VM_SWAP
+ XMSWAP="file:$(readlink -f $VM_SWAP)"
XMSWAP=${XMSWAP/#file:\/dev/phy:/dev}
XMSWAP="disk=$XMSWAP,hda2,w"
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/build.1 new/build-2010.07.28/build.1
--- old/build-2010.07.08/build.1 2010-05-04 10:25:18.000000000 +0200
+++ new/build-2010.07.28/build.1 2010-07-28 15:44:18.000000000 +0200
@@ -73,6 +73,15 @@
automatically sets this to a sensible value for your host if you
don't specify this option.
.TP
+.BI "\-\-repo " url_or_dir
+Also use the specified repository to create the build system.
+The repositories may be either of type rpmmd, yast2 (susetags),
+or a simple directory. Multiple --repo options may be given.
+As a special form, 'zypp://reponame' can be used to specify
+a system repository. 'zypp://' selects all enabled system
+repositories. This is also the default if BUILD_RPMS is not
+set and no --rpms or --repo option is used.
+.TP
.BI "\-\-root " buildroot
Specifies where the build system is set up. Overrides the
BUILD_ROOT enviroment variable.
@@ -92,6 +101,14 @@
.TP
.B --verify
verify the files in an existing build system.
+.TP
+.BI "\-\--dist " distribution
+Set the distribution. If this option is not given, build tries to
+calculate the distribution by looking at the rpm package used in the
+build.
+The specified distribution can either be a string
+like "11.2" or "sles9", or the pathname of the build configuration to
+use.
.SH .spec FILE OPTIONS
The
@@ -131,8 +148,7 @@
.TP
.B BUILD_RPMS
Where build can find the SuSE Linux RPMs. build needs them to create the
-build system. "/media/dvd/suse" is the default value which will do
-the trick if you have the SuSE Linux DVD mounted.
+build system.
.TP
.B BUILD_RPM_BUILD_STAGE
The rpm build stage (-ba, -bb, ...). This is just passed through to
@@ -147,7 +163,7 @@
.I http://www.rpm.org/max-rpm/
.TP
.BR "cross distribution packaging":
-.I http://en.opensuse.org/Build_Service/cross_distribution_package_how_to
+.I http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
.TP
-.BR "SUSE packaging standards and guidelines":
-.I http://en.opensuse.org/Packaging
+.BR "openSUSE packaging standards and guidelines":
+.I http://en.opensuse.org/Portal:Packaging
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/createrepomddeps new/build-2010.07.28/createrepomddeps
--- old/build-2010.07.08/createrepomddeps 2010-05-04 10:25:18.000000000 +0200
+++ new/build-2010.07.28/createrepomddeps 2010-07-28 15:14:43.000000000 +0200
@@ -57,11 +57,12 @@
'rpm:obsoletes' => { 'rpm:entry' => { _start => \&primary_handle_package_obsoletes }, },
'rpm:buildhost' => { _text => \&primary_collect_text, _end => \&primary_store_text },
'rpm:sourcerpm' => { _text => \&primary_collect_text, _end => \&primary_store_text },
- file => {
- _start => \&primary_handle_file_start,
- _text => \&primary_collect_text,
- _end => \&primary_handle_file_end
- },
+### currently commented out, as we ignore file provides in createrpmdeps
+# file => {
+# _start => \&primary_handle_file_start,
+# _text => \&primary_collect_text,
+# _end => \&primary_handle_file_end
+# },
},
location => { _start => \&primary_handle_package_location },
},
@@ -398,8 +399,9 @@
} elsif ($url =~ /^http:\/\/([^\/]*)\/?/) {
my $repoid = md5_hex($url);
$dir = "$cachedir/$repoid/";
- getmetadata($url, $dir);
$baseurl = $url;
+ $baseurl .= '/' unless $baseurl =~ /\/$/;
+ getmetadata($baseurl, $dir);
} else {
$dir = $url;
$dir .= '/' unless $dir =~ /\/$/;
@@ -418,12 +420,16 @@
my $u = $dir . $f->{'location'};
if ($url =~ /^http:\/\/([^\/]*)\/?/) {
- system($INC[0].'/download', $dir . "repodata/", $baseurl . "repodata/" . basename($u));
+ if (system($INC[0].'/download', $dir . "repodata/", $baseurl . "repodata/" . basename($u))) {
+ die("download failed\n");
+ }
}
- $u = 'gzip -cd ' . $u . '|' if ($u =~ /\.gz$/); # XXX
-
my $fh;
- open($fh, $u) or next;
+ if ($u =~ /\.gz$/) {
+ open($fh, '-|', 'gzip', '-cd', $u) or next; # XXX
+ } else {
+ open($fh, '<', $u) or next;
+ }
$p->parse($fh);
close($fh);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/download new/build-2010.07.28/download
--- old/build-2010.07.08/download 2010-05-04 10:25:18.000000000 +0200
+++ new/build-2010.07.28/download 2010-07-28 15:14:43.000000000 +0200
@@ -21,7 +21,6 @@
timeout => 42);
for my $url (@ARGV) {
- my $dest = $dir;
if ($url =~ /^zypp:\/\/([^\/]*)\/?/) {
use Build::Zypp;
my $repo = Build::Zypp::parsecfg($1);
@@ -34,7 +33,9 @@
} else {
$url = URI->new($url);
}
- my $res = $ua->mirror($url, $dest.'/'.basename($url->path));
+ my $dest = "$dir/".basename($url->path);
+ unlink($dest); # just in case
+ my $res = $ua->mirror($url, $dest);
die "reqesting $url failed: ".$res->status_line."\n" unless $res->is_success;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/expanddeps new/build-2010.07.28/expanddeps
--- old/build-2010.07.08/expanddeps 2010-05-04 10:25:18.000000000 +0200
+++ new/build-2010.07.28/expanddeps 2010-07-28 15:14:43.000000000 +0200
@@ -101,42 +101,17 @@
$packs{$_} ||= "$_.$arch" for @{$packs_arch{$arch} || []};
}
-for my $pack (keys %packs) {
- my $r = {};
- my (@s, $s, @pr, @re);
- @s = split(' ', $prov{$packs{$pack}});
- while (@s) {
- $s = shift @s;
- next if $s =~ /^\//;
- if ($s =~ /^rpmlib\(/) {
- splice(@s, 0, 2);
- next;
- }
- push @pr, $s;
- splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
- }
- @s = split(' ', $req{$packs{$pack}});
- while (@s) {
- $s = shift @s;
- next if $s =~ /^\//;
- if ($s =~ /^rpmlib\(/) {
- splice(@s, 0, 2);
- next;
- }
- push @re, $s;
- splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
- }
- $r->{'provides'} = \@pr;
- $r->{'requires'} = \@re;
- $repo{$pack} = $r;
-}
-
if (!defined($dist) || $dist eq '') {
my $rpmarch = (grep {$fn{"rpm.$_"}} @archs)[0];
if (!$rpmarch) {
$dist = 'default';
} else {
my $rpmfn = $fn{"rpm.$rpmarch"};
+ if ($rpmfn =~ /^[a-z]+:\/\//) {
+ require File::Temp;
+ my $tmpdir = File::Temp::tempdir('CLEANUP' => 1);
+ $rpmfn =~ s/.*\//$tmpdir\// unless system("$INC[0]/download", $tmpdir, $rpmfn);
+ }
my $rpmdist = '';
if ($rpmfn =~ /^\// && -e $rpmfn) {
my %res = Build::Rpm::rpmq($rpmfn, 1010);
@@ -145,9 +120,14 @@
$rpmdist = lc($rpmdist);
$rpmdist =~ s/-/_/g;
$rpmdist =~ s/opensuse/suse linux/;
- my $rpmdista = $rpmdist;
- $rpmdista =~ s/.*\(//;
- $rpmdista =~ s/\).*//;
+ my $rpmdista;
+ if ($rpmdist =~ /\(/) {
+ $rpmdista = $rpmdist;
+ $rpmdista =~ s/.*\(//;
+ $rpmdista =~ s/\).*//;
+ } else {
+ $rpmdista = $archs[0];
+ }
$rpmdista =~ s/i[456]86/i386/;
$rpmdist = '' unless $rpmdista =~ /^(i386|x86_64|ia64|ppc|ppc64|s390|s390x)$/;
if ($rpmdist =~ /unitedlinux 1\.0.*/) {
@@ -171,6 +151,39 @@
my $cf = Build::read_config_dist($dist, $archs[0], $configdir);
$cf->{'warnings'} = 1;
+my $dofileprovides = %{$cf->{'fileprovides'}};
+
+for my $pack (keys %packs) {
+ my $r = {};
+ my (@s, $s, @pr, @re);
+ @s = split(' ', $prov{$packs{$pack}});
+ while (@s) {
+ $s = shift @s;
+ next if !$dofileprovides && $s =~ /^\//;
+ if ($s =~ /^rpmlib\(/) {
+ splice(@s, 0, 2);
+ next;
+ }
+ push @pr, $s;
+ splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
+ }
+ @s = split(' ', $req{$packs{$pack}});
+ while (@s) {
+ $s = shift @s;
+ next if !$dofileprovides && $s =~ /^\//;
+ if ($s =~ /^rpmlib\(/) {
+ splice(@s, 0, 2);
+ next;
+ }
+ push @re, $s;
+ splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
+ }
+ $r->{'provides'} = \@pr;
+ $r->{'requires'} = \@re;
+ $repo{$pack} = $r;
+}
+
+
#######################################################################
sub print_rpmlist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/build-2010.07.08/spec_add_patch new/build-2010.07.28/spec_add_patch
--- old/build-2010.07.08/spec_add_patch 2010-05-04 10:25:18.000000000 +0200
+++ new/build-2010.07.28/spec_add_patch 2010-07-28 15:14:43.000000000 +0200
@@ -29,7 +29,7 @@
}
-open(S, "<$specname") or die;
+open(S, '<', $specname) or die;
my $ifdef_level = 0;
my $in_prep = 0;
@@ -112,7 +112,7 @@
# determine strip level
my $striplevel = "";
-open(P, "<$diffname") or die;
+open(P, '<', $diffname) or die;
while(<P>) {
$striplevel = " -p1" if (m/^--- a/ or m/^--- [^\/]+-\d+\./);
last if (/^--- /);
@@ -125,7 +125,7 @@
splice @c, $last_patch_in_global_index+1, 0,
(sprintf "Patch%s:%s%s\n", $patchnum, ' ' x (10-length($patchnum)), $diffname);
-open(O, ">$specname.new") or die;
+open(O, '>', "$specname.new") or die;
print O @c;
close(O);
++++++ build.dsc ++++++
--- /var/tmp/diff_new_pack.TKUkcQ/_old 2010-08-02 11:52:47.000000000 +0200
+++ /var/tmp/diff_new_pack.TKUkcQ/_new 2010-08-02 11:52:47.000000000 +0200
@@ -1,6 +1,6 @@
Format: 1.0
Source: build
-Version: 2010.07.08
+Version: 2010.07.28
Binary: build
Maintainer: Adrian Schroeter
Architecture: all
++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.TKUkcQ/_old 2010-08-02 11:52:47.000000000 +0200
+++ /var/tmp/diff_new_pack.TKUkcQ/_new 2010-08-02 11:52:47.000000000 +0200
@@ -1,3 +1,13 @@
+build (2010.07.28-1) unstable; urgency=low
+
+ * Update to current git trunk
+ - document --repo and --dist
+ - update wiki links
+ - fix bugs in repo handling
+ - fix distribution autodetection code
+
+ -- Michael Schroeder Wed, 28 Jul 2010 12:46:52 +0200
+
build (2010.07.08-1) unstable; urgency=low
* Update to current git trunk
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org