Hello community, here is the log from the commit of package build for openSUSE:Factory checked in at 2012-09-25 09:29:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build", Maintainer is "[email protected]" Changes: -------- build-mkbaselibs-sle.changes: same change --- /work/SRC/openSUSE:Factory/build/build.changes 2012-09-14 12:14:58.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.build.new/build.changes 2012-09-25 09:30:15.000000000 +0200 @@ -1,0 +2,29 @@ +Mon Sep 24 15:47:27 UTC 2012 - [email protected] + +- update to current git (03587016a7eca7788f404820642a2b5a1556aa0b) + +Adrian Schröter (1): + - use default MEMSIZE in check_for_ppc + +Anas Nashif (2): + pass --use-system-qemu option to init_buildsystem + Support https repositories + +Frank Lichtenheld (1): + init_buildsystem: fail early on reorder failure + +Martin Koegler (4): + Diff can't handle empty files + Refactor diff generation + Handle overriden files already present in the orig.tar.gz correctly in debtransform + Correct version number of binaries, if necessary + +Michael Schroeder (3): + - don't add self-provides for src packages + - support binary rpms with fo SOURCERPM header element + - drop '-o' bsdtar flag when unpacking preinstall images + +Werner Fink (1): + Make init_buildsystem able to use the features of newer rpm + +------------------------------------------------------------------- Old: ---- obs-build-2012.08.24.tar.gz New: ---- obs-build-2012.09.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build-initvm.spec ++++++ --- /var/tmp/diff_new_pack.mn2FLb/_old 2012-09-25 09:30:17.000000000 +0200 +++ /var/tmp/diff_new_pack.mn2FLb/_new 2012-09-25 09:30:17.000000000 +0200 @@ -20,7 +20,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0+ Group: Development/Tools/Building -Version: 2012.08.24 +Version: 2012.09.24 Release: 0 Source: obs-build-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ build-mkbaselibs-sle.spec ++++++ --- /var/tmp/diff_new_pack.mn2FLb/_old 2012-09-25 09:30:17.000000000 +0200 +++ /var/tmp/diff_new_pack.mn2FLb/_new 2012-09-25 09:30:17.000000000 +0200 @@ -20,7 +20,7 @@ Summary: Tools to generate base lib packages License: GPL-2.0+ Group: Development/Tools/Building -Version: 2012.08.24 +Version: 2012.09.24 Release: 0 #!BuildIgnore: build-mkbaselibs Provides: build-mkbaselibs ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.mn2FLb/_old 2012-09-25 09:30:17.000000000 +0200 +++ /var/tmp/diff_new_pack.mn2FLb/_new 2012-09-25 09:30:17.000000000 +0200 @@ -20,7 +20,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0+ and GPL-2.0 Group: Development/Tools/Building -Version: 2012.08.24 +Version: 2012.09.24 Release: 0 #!BuildIgnore: build-mkbaselibs Source: obs-build-%{version}.tar.gz @@ -65,6 +65,7 @@ %package mkbaselibs Summary: Tools to generate base lib packages +Group: Development/Tools/Building # NOTE: this package must not have dependencies which may break boot strapping (eg. perl modules) %description mkbaselibs @@ -73,6 +74,7 @@ %package mkdrpms Summary: Tools to generate delta rpms +Group: Development/Tools/Building Requires: deltarpm # XXX: we wanted to avoid that but mkdrpms needs Build::Rpm::rpmq Requires: build ++++++ _service ++++++ --- /var/tmp/diff_new_pack.mn2FLb/_old 2012-09-25 09:30:17.000000000 +0200 +++ /var/tmp/diff_new_pack.mn2FLb/_new 2012-09-25 09:30:17.000000000 +0200 @@ -1,6 +1,6 @@ <services> <service name="tar_scm" mode="disabled"> - <param name="version">2012.08.24</param> + <param name="version">2012.09.24</param> <param name="url">git://github.com/openSUSE/obs-build.git</param> <param name="scm">git</param> </service> ++++++ build.dsc ++++++ --- /var/tmp/diff_new_pack.mn2FLb/_old 2012-09-25 09:30:17.000000000 +0200 +++ /var/tmp/diff_new_pack.mn2FLb/_new 2012-09-25 09:30:17.000000000 +0200 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 2012.08.20 +Version: 2012.09.24 Binary: build Maintainer: Adrian Schroeter <[email protected]> Architecture: all ++++++ obs-build-2012.08.24.tar.gz -> obs-build-2012.09.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-2012.08.24/Build/Rpm.pm new/obs-build-2012.09.24/Build/Rpm.pm --- old/obs-build-2012.08.24/Build/Rpm.pm 2012-08-24 14:08:07.000000000 +0200 +++ new/obs-build-2012.09.24/Build/Rpm.pm 2012-09-24 17:42:00.000000000 +0200 @@ -593,6 +593,7 @@ my ($magic, $sigtype, $headmagic, $cnt, $cntdata, $lead, $head, $index, $data, $tag, $type, $offset, $count); local *RPM; + my $forcebinary; if (ref($rpm) eq 'ARRAY') { ($headmagic, $cnt, $cntdata) = unpack('N@8NN', $rpm->[0]); if ($headmagic != 0x8eade801) { @@ -623,6 +624,7 @@ close RPM unless ref($rpm); return (); } + $forcebinary = 1 if unpack('@6n', $lead) != 1; if (read(RPM, $head, 16) != 16) { warn("Bad rpm $rpm\n"); close RPM unless ref($rpm); @@ -719,6 +721,9 @@ } } } + if ($forcebinary && $stags{1044} && !$res{$stags{1044}}) { + $res{$stags{1044}} = [ '(none)' ]; # like rpm does... + } if ($need_filenames) { if ($res{'OLDFILENAMES'}) { @@ -851,21 +856,23 @@ } # rpm3 compatibility: retrofit missing self provides - my $haveselfprovides; - if (@{$data->{'provides'}}) { - if ($data->{'provides'}->[-1] =~ /^\Q$res{'NAME'}->[0]\E =/) { - $haveselfprovides = 1; - } elsif (@{$data->{'provides'}} > 1 && $data->{'provides'}->[-2] =~ /^\Q$res{'NAME'}->[0]\E =/) { - $haveselfprovides = 1; + if ($src ne '') { + my $haveselfprovides; + if (@{$data->{'provides'}}) { + if ($data->{'provides'}->[-1] =~ /^\Q$res{'NAME'}->[0]\E =/) { + $haveselfprovides = 1; + } elsif (@{$data->{'provides'}} > 1 && $data->{'provides'}->[-2] =~ /^\Q$res{'NAME'}->[0]\E =/) { + $haveselfprovides = 1; + } + } + if (!$haveselfprovides) { + my $evr = "$res{'VERSION'}->[0]-$res{'RELEASE'}->[0]"; + $evr = "$res{'EPOCH'}->[0]:$evr" if $res{'EPOCH'} && $res{'EPOCH'}->[0]; + push @{$data->{'provides'}}, "$res{'NAME'}->[0] = $evr"; } - } - if (!$haveselfprovides) { - my $evr = "$res{'VERSION'}->[0]-$res{'RELEASE'}->[0]"; - $evr = "$res{'EPOCH'}->[0]:$evr" if $res{'EPOCH'} && $res{'EPOCH'}->[0]; - push @{$data->{'provides'}}, "$res{'NAME'}->[0] = $evr"; } - $data->{'source'} = $src if $src ne ''; + $data->{'source'} = $src eq '(none)' ? $data->{'name'} : $src if $src ne ''; if ($opts{'evra'}) { my $arch = $res{'ARCH'}->[0]; $arch = $res{'NOSOURCE'} || $res{'NOPATCH'} ? 'nosrc' : 'src' unless $src ne ''; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-2012.08.24/build new/obs-build-2012.09.24/build --- old/obs-build-2012.08.24/build 2012-08-24 14:08:07.000000000 +0200 +++ new/obs-build-2012.09.24/build 2012-09-24 17:42:00.000000000 +0200 @@ -765,7 +765,7 @@ exit 1 fi PAGES_FREE=$(cat /sys/kernel/mm/hugepages/hugepages-16384kB/free_hugepages) - PAGES_REQ=$(( $MEMSIZE / 16 )) + PAGES_REQ=$(( ${MEMSIZE:-64} / 16 )) if [ "$PAGES_FREE" -lt "$PAGES_REQ" ];then echo "please adjust nr_hugepages" exit 1 @@ -885,7 +885,7 @@ CREATE_BASELIBS=internal ;; *-use-system-qemu) - USE_SYSTEM_QEMU=true + USE_SYSTEM_QEMU="--use-system-qemu" ;; *-root) needarg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-2012.08.24/createrepomddeps new/obs-build-2012.09.24/createrepomddeps --- old/obs-build-2012.08.24/createrepomddeps 2012-08-24 14:08:07.000000000 +0200 +++ new/obs-build-2012.09.24/createrepomddeps 2012-09-24 17:42:00.000000000 +0200 @@ -396,7 +396,7 @@ } else { die "unsupported repo type: $type\n"; } - } elsif ($url =~ /^http:\/\/([^\/]*)\/?/) { + } elsif ($url =~ /^http[s]?:\/\/([^\/]*)\/?/) { my $repoid = md5_hex($url); $dir = "$cachedir/$repoid/"; $baseurl = $url; @@ -421,7 +421,7 @@ @cursor = ([undef, $primaryparser]); my $u = $dir . $f->{'location'}; - if ($url =~ /^http:\/\/([^\/]*)\/?/) { + if ($url =~ /^http[s]?:\/\/([^\/]*)\/?/) { if (system($INC[0].'/download', $dir . "repodata/", $baseurl . "repodata/" . basename($u))) { die("download failed\n"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-2012.08.24/debtransform new/obs-build-2012.09.24/debtransform --- old/obs-build-2012.08.24/debtransform 2012-08-24 14:08:07.000000000 +0200 +++ new/obs-build-2012.09.24/debtransform 2012-09-24 17:42:00.000000000 +0200 @@ -52,9 +52,12 @@ } sub listtar { - my ($tar) = @_; + my ($tar, $skipdebiandir) = @_; local *F; my @c; + unless(defined($skipdebiandir)) { + $skipdebiandir = 1; + } open(F, '-|', 'tar', '--numeric-owner', '-tvf', $tar) || die("tar: $!\n"); while(<F>) { next unless /^([-dlbcp])(.........)\s+\d+\/\d+\s+(\S+) \d\d\d\d-\d\d-\d\d \d\d:\d\d(?::\d\d)? (.*)$/; @@ -63,15 +66,63 @@ die("debian tar contains link: $name\n") if $type eq 'l'; die("debian tar contains unexpected file type: $name\n") if $type ne '-'; $name =~ s/^\.\///; - $name =~ s/^debian\///; + $name =~ s/^debian\/// if $skipdebiandir eq 1; push @c, {'name' => $name, 'size' => $size}; } close(F) || die("tar: $!\n"); return @c; } +sub extracttar { + my ($tar, $filename, $s) = @_; + local *F; + open(F, '-|', 'tar', '-xOf', $tar, $filename) || die("tar: $!\n"); + my $file = ''; + while ($s > 0) { + my $l = sysread(F, $file, $s, length($file)); + die("tar read error\n") unless $l; + $s -= $l; + } + my @file = split("\n", $file); + close(F); + return @file; +} + +sub dodiff { + my ($oldname, $newname, $origtarfile, @content) = @_; + my @oldcontent; + for my $c (@{$origtarfile->{'content'}}) { + if ($c->{'name'} eq $newname) { + @oldcontent = extracttar($origtarfile->{'name'}, $c->{'name'}, $c->{'size'}); + } + } + if ($newname eq $origtarfile->{'tardir'}."/debian/changelog") { + my $firstline = $content[0]; + my $version = $firstline; + $version =~ s/.*\((.*)\).*/$1/g; + if ($version ne $origtarfile->{'version'}) { + $firstline =~ s/\(.*\)/($origtarfile->{'version'})/g; + my $date = `date -R`; + chomp($date); + my @newcontent = ($firstline, "", " * version number update by debtransform", "", " -- debtransform <build\@opensuse.org> ".$date, ""); + push(@newcontent, @content); + @content = @newcontent; + } + } + return unless @content; + print DIFF "--- $oldname\n"; + print DIFF "+++ $newname\n"; + if (@oldcontent) { + print DIFF "\@\@ -1,".scalar(@oldcontent)." +1,".scalar(@content)." \@\@\n"; + print DIFF "-$_\n" for @oldcontent; + } else { + print DIFF "\@\@ -0,0 +1,".scalar(@content)." \@\@\n"; + } + print DIFF "+$_\n" for @content; +} + sub dotar { - my ($tar, $tardir, $origin, @c) = @_; + my ($tar, $tardir, $origin, $origtarfile, @c) = @_; local *F; open(F, '-|', 'tar', '-xOf', $tar) || die("tar: $!\n"); for my $c (@c) { @@ -84,27 +135,19 @@ } next if $origin && $origin->{$c->{'name'}} ne $tar; my @file = split("\n", $file); - print DIFF "--- $tardir.orig/debian/$c->{'name'}\n"; - print DIFF "+++ $tardir/debian/$c->{'name'}\n"; - next unless @file; - print DIFF "\@\@ -0,0 +1,".scalar(@file)." \@\@\n"; - print DIFF "+$_\n" for @file; + dodiff("$tardir.orig/debian/$c->{'name'}", "$tardir/debian/$c->{'name'}", $origtarfile, @file); } close(F); } sub dofile { - my ($file, $tardir, $dfile) = @_; + my ($file, $tardir, $dfile, $origtarfile) = @_; local *F; open(F, '<', $file) || die("$file: $!\n"); my @file = <F>; close F; chomp(@file); - print DIFF "--- $tardir.orig/$dfile\n"; - print DIFF "+++ $tardir/$dfile\n"; - return unless @file; - print DIFF "\@\@ -0,0 +1,".scalar(@file)." \@\@\n"; - print DIFF "+$_\n" for @file; + dodiff("$tardir.orig/$dfile", "$tardir/$dfile", $origtarfile, @file); } sub doseries { @@ -234,6 +277,8 @@ my $tardir = $tarfile; $tardir =~ s/\.orig\.tar/\.tar/; $tardir =~ s/\.tar.*?$//; +my @tarfilecontent = listtar($tarfile, 0); +my $origtarfile = { 'name', $tarfile, 'content', \@tarfilecontent, 'version', $tags->{'VERSION'}, 'tardir', $tardir}; my @files; my $v = $version; @@ -264,17 +309,17 @@ } } -dofile($changelog, $tardir, 'debian/changelog') if defined $changelog; +dofile($changelog, $tardir, 'debian/changelog', $origtarfile) if defined $changelog; for my $debtarfile (@debtarfiles) { - dotar("$dir/$debtarfile", $tardir, \%debtarorigin, @{$debtarcontent{$debtarfile} }); + dotar("$dir/$debtarfile", $tardir, \%debtarorigin, $origtarfile, @{$debtarcontent{$debtarfile} }); } for my $file (grep {/^debian\./} @dir) { next if $file eq 'debian.series'; next if $file =~ /\.tar$/; next if $file =~ /\.tar\./; - dofile("$dir/$file", $tardir, 'debian/'.substr($file, 7)); + dofile("$dir/$file", $tardir, 'debian/'.substr($file, 7), $origtarfile); } if ($tags->{'DEBTRANSFORM-SERIES'}) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-2012.08.24/init_buildsystem new/obs-build-2012.09.24/init_buildsystem --- old/obs-build-2012.08.24/init_buildsystem 2012-08-24 14:08:07.000000000 +0200 +++ new/obs-build-2012.09.24/init_buildsystem 2012-09-24 17:42:00.000000000 +0200 @@ -165,7 +165,7 @@ fi cd $BUILD_ROOT || cleanup_and_exit 1 if test -x /usr/bin/bsdtar ; then - TAR="/usr/bin/bsdtar -P --chroot -o --numeric-owner -x" + TAR="/usr/bin/bsdtar -P --chroot --numeric-owner -x" else unsafe_preinstall_check TAR="tar -x" @@ -301,7 +301,7 @@ for PKG in "$@" ; do echo "$PKG" >> $BUILD_ROOT/.init_b_cache/order.manifest done - $BUILD_DIR/order --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir $CONFIG_DIR --manifest $BUILD_ROOT/.init_b_cache/order.manifest $BUILD_ROOT/.init_b_cache/rpms + $BUILD_DIR/order --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir $CONFIG_DIR --manifest $BUILD_ROOT/.init_b_cache/order.manifest $BUILD_ROOT/.init_b_cache/rpms || touch $BUILD_ROOT/exit rm -f $BUILD_ROOT/.init_b_cache/order.manifest } @@ -865,6 +865,8 @@ progress_step PACKAGES_TO_CBPREINSTALL_FILTERED preinstall ${PKG##*/} done + # for reorder + check_exit if [ -w /root ]; then test -c $BUILD_ROOT/dev/null || create_devs fi @@ -888,6 +890,7 @@ # alreadyinstalled check will not work, but we have to live with that... echo -n 'reordering...' PACKAGES_TO_INSTALL=`reorder $PACKAGES_TO_INSTALL` + check_exit echo 'done' Q="'\''" echo "PACKAGES_TO_INSTALL='${PACKAGES_TO_INSTALL//"'"/$Q}'" > $BUILD_ROOT/.build/init_buildsystem.data @@ -940,6 +943,7 @@ if ! test -e $BUILD_ROOT/.build/init_buildsystem.data ; then echo -n 'reordering...' PACKAGES_TO_INSTALL=`reorder $PACKAGES_TO_INSTALL` + check_exit echo 'done' fi @@ -1000,12 +1004,60 @@ test -x $BUILD_ROOT/sbin/ldconfig && chroot $BUILD_ROOT /sbin/ldconfig 2>&1 -MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL" +typeset -ri suse_version=$(chroot $BUILD_ROOT /bin/rpm --eval '%{?suse_version}' 2>/dev/null) +typeset -i num cumulate=-1 +typeset -a CUMULATED_LIST=() +typeset -a CUMULATED_PIDS=() +typeset -a CUMULATED_HMD5=() + +if ((suse_version >= 1220)) ; then + MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL CUMULATED" +else + MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL" +fi progress_setup MAIN_LIST -for PKG in $PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL; do +for PKG in $MAIN_LIST; do test -f $BUILD_ROOT/installed-pkg/$PKG && continue progress_step MAIN_LIST + case $PKG in + CUMULATED) + # + # Use the features of rpm which are reordering the list of packages to + # satisfy dependencies and the final execution of the %posttrans scriplets + # + echo "now installing cumulated packages" + ((cumulate < 0)) && continue + exec 4>$BUILD_ROOT/.init_b_cache/manifest + for ((num=0; num<=cumulate; num++)) ; do + PKG=${CUMULATED_LIST[$num]##*/} + test "$BUILD_ROOT/.init_b_cache/rpms/$PKG" -ef "$BUILD_ROOT/${CUMULATED_LIST[$num]}" && continue + rm -f $BUILD_ROOT/${CUMULATED_LIST[$num]} + cp $BUILD_ROOT/.init_b_cache/rpms/$PKG $BUILD_ROOT/${CUMULATED_LIST[$num]} || cleanup_and_exit 1 + echo ${CUMULATED_LIST[$num]} 1>&4 + done + exec 4>&- + ( chroot $BUILD_ROOT rpm --ignorearch --nodeps -U --oldpackage --ignoresize --verbose $RPMCHECKOPTS \ + $ADDITIONAL_PARAMS .init_b_cache/manifest 2>&1 || touch $BUILD_ROOT/exit ) | \ + grep -v "^warning:.*saved as.*rpmorig$" + for ((num=0; num<=cumulate; num++)) ; do + rm -f $BUILD_ROOT/${CUMULATED_LIST[$num]} + done + rm -f .init_b_cache/manifest + check_exit + for ((num=0; num<=cumulate; num++)) ; do + PKG=${CUMULATED_LIST[$num]##*/} + echo "${CUMULATED_PIDS[$num]}" > $BUILD_ROOT/installed-pkg/${PKG%.rpm} + test -n "${CUMULATED_HMD5[$num]}" || continue + echo "${CUMULATED_HMD5[$num]} ${CUMULATED_PIDS[$num]}" > $BUILD_ROOT/.preinstall_image/${PKG%.rpm} + done + CUMULATED_LIST=() + CUMULATED_PIDS=() + CUMULATED_HMD5=() + let cumulate=-1 + continue + ;; + esac if test -e "$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" -a ! -s "$BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF" ; then # preinstallimage package, make sure it's if ! test -e $BUILD_ROOT/.preinstall_image/$PKG ; then @@ -1128,6 +1180,14 @@ test -e "$i" && ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --justdb" done fi + if ((suse_version >= 1220)) ; then + echo "cumulate ${PKGID%% *}" + let cumulate++ + CUMULATED_LIST[$cumulate]=".init_b_cache/$PKG.rpm" + CUMULATED_PIDS[$cumulate]="$PKGID" + CUMULATED_HMD5[$cumulate]="$PKG_HDRMD5" + continue + fi echo "installing ${PKGID%% *}" if ! test "$BUILD_ROOT/.init_b_cache/rpms/$PKG.rpm" -ef "$BUILD_ROOT/.init_b_cache/$PKG.rpm" ; then rm -f $BUILD_ROOT/.init_b_cache/$PKG.rpm -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
