Hello community,
here is the log from the commit of package product-builder for openSUSE:Factory
checked in at 2019-09-17 13:36:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/product-builder (Old)
and /work/SRC/openSUSE:Factory/.product-builder.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "product-builder"
Tue Sep 17 13:36:53 2019 rev:27 rq:731197 version:1.2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/product-builder/product-builder.changes
2019-07-21 11:29:32.152826040 +0200
+++
/work/SRC/openSUSE:Factory/.product-builder.new.7948/product-builder.changes
2019-09-17 13:36:54.709847616 +0200
@@ -1,0 +2,14 @@
+Mon Sep 16 08:32:26 UTC 2019 - Stephan Kulow <[email protected]>
+
+- 1.2.4
+ * add SLE wrapper to prepare modules for packages dvd (jsc#SLE-8271)
+ * smaller perl fixes
+
+-------------------------------------------------------------------
+Fri Sep 13 06:08:31 UTC 2019 - Adrian Schröter <[email protected]>
+
+- 1.2.3
+ handle multiple packages with same name but different version/release in one
repo.
+ bsc#1150238
+
+-------------------------------------------------------------------
Old:
----
product-builder-1.2.2.obscpio
New:
----
product-builder-1.2.4.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ product-builder.spec ++++++
--- /var/tmp/diff_new_pack.kDpPIR/_old 2019-09-17 13:36:55.113847552 +0200
+++ /var/tmp/diff_new_pack.kDpPIR/_new 2019-09-17 13:36:55.117847551 +0200
@@ -23,7 +23,7 @@
Name: product-builder
Conflicts: kiwi
Conflicts: kiwi-instsource
-Version: 1.2.2
+Version: 1.2.4
Release: 0
Provides: kiwi-schema = 6.2
Source: product-builder-%version.tar.xz
@@ -62,7 +62,7 @@
%build
test -e /.buildenv && . /.buildenv
-make buildroot="%{buildroot}" CFLAGS="%{optflags}"
+make CFLAGS="%{optflags}"
%install
make buildroot="%{buildroot}" \
@@ -71,6 +71,14 @@
install
./.version >"%{buildroot}/%{_datadir}/kiwi/.revision"
+%if 0%{?is_opensuse}
+mv %{buildroot}%{_bindir}/product-builder{.pl,}
+%else
+# install SLE wrapper as entry point. It doesn't really harm as the
+# build flavor detected is very specific, but to avoid waste...
+ln -s product-builder-sle.sh %{buildroot}%{_bindir}/product-builder
+%endif
+
%files
%dir %{_datadir}/kiwi
%license LICENSE
@@ -78,6 +86,6 @@
%{_datadir}/kiwi/metadata
%{_datadir}/kiwi/modules
%{_datadir}/kiwi/xsl
-%{_bindir}/product-builder
+%{_bindir}/product-builder*
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.kDpPIR/_old 2019-09-17 13:36:55.141847547 +0200
+++ /var/tmp/diff_new_pack.kDpPIR/_new 2019-09-17 13:36:55.141847547 +0200
@@ -1,8 +1,8 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/openSUSE/product-builder.git</param>
- <param name="revision">1.2.2</param>
- <param name="version">1.2.2</param>
+ <param name="revision">1.2.4</param>
+ <param name="version">1.2.4</param>
<param name="scm">git</param>
<param name="extract">rpm/product-builder.spec</param>
</service>
++++++ product-builder-1.2.2.obscpio -> product-builder-1.2.4.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.2.2/Makefile
new/product-builder-1.2.4/Makefile
--- old/product-builder-1.2.2/Makefile 2019-07-16 13:15:40.000000000 +0200
+++ new/product-builder-1.2.4/Makefile 2019-09-16 08:37:02.000000000 +0200
@@ -34,7 +34,8 @@
#============================================
# Install KIWI base and modules
#--------------------------------------------
- install -m 755 ./product-builder.pl ${KIWIBINVZ}/product-builder
+ install -m 755 ./product-builder.pl ${KIWIBINVZ}/product-builder.pl
+ install -m 755 ./SLE-wrapper.sh ${KIWIBINVZ}/product-builder-sle.sh
install -m 644 ./xsl/* ${KIWIXSLVZ}
for i in $(shell find modules -type f | grep -v -E '\.test');do \
install -m 644 $$i ${KIWIMODVZ} ;\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.2.2/SLE-wrapper.sh
new/product-builder-1.2.4/SLE-wrapper.sh
--- old/product-builder-1.2.2/SLE-wrapper.sh 1970-01-01 01:00:00.000000000
+0100
+++ new/product-builder-1.2.4/SLE-wrapper.sh 2019-09-16 08:37:02.000000000
+0200
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# wrapper around product builder to call itself recursive for SLE Packages DVD
+
+set -xe
+
+case "$BUILD_FLAVOR" in
+ SLES-cd-Packages-DVD-*)
+ TOPDIR=/usr/src/packages/
+ cd $TOPDIR/SOURCES/ || exit 1
+ mkdir $TOPDIR/KIWIRESULTS
+
+ # remove symlink, we cat into it
+ rm config.xml
+
+ ARCH=${BUILD_FLAVOR/SLES-cd-Packages-DVD-}
+ # the worker expands obsrepositories:// only in the target kiwi so we need
to apply this change to the modules
+ perl -e '$in=0; while (<STDIN>) { $in=1 if /<instrepo /; print $_ if $in;
$in=0 if m,</instrepo,; }' < $BUILD_FLAVOR.kiwi > expanded_instsources.include
+
+ # map the build number to the modules
+ BUILD_SUFFIX=`sed -ne
"s/.*name=\"MEDIUM_NAME\">.*-$ARCH-\([^<]*\)-Media<.*/\1/p" $BUILD_FLAVOR.kiwi`
+
+ rm -rf $TOPDIR/KIWIALL
+ mkdir $TOPDIR/KIWIALL
+
+ for kiwi in *-$ARCH.kiwi; do
+ MN=`sed -ne "s/.*name=\"MEDIUM_NAME\">\([^<]*\)<.*/\1/p" $kiwi`
+
+ MN_SHORT=${MN%-POOL-*}
+ grep -qx $MN_SHORT packages-dvd.txt || continue
+
+ # replace obsrepositories://
+ perl -e '$in=0; while (<STDIN>) { $in=1 if /<instrepo /; print $_ unless
$in; if (m,</instrepo,) { $in=0; system("cat expanded_instsources.include") };
}' < $kiwi > config.xml
+ sed -i
"s,MEDIUM_NAME\">.*,MEDIUM_NAME\">$MN-$BUILD_SUFFIX-Media</productvar><productvar
name=\"BUILD_ID\">$MN-$BUILD_SUFFIX</productvar>," config.xml
+
+ /usr/bin/product-builder.pl --root $TOPDIR/KIWIROOT/ -v 1 --logfile
terminal --create-instsource . || exit 1
+ mv $TOPDIR/KIWIROOT/main $TOPDIR/KIWIALL/$MN_SHORT
+ rm -rf $TOPDIR/KIWIROOT
+ done # kiwiconf
+
+ # now the final ISO
+ perl -e '$in=0; while (<STDIN>) { $in=0 if m,</repopackages,; print $_
unless $in; $in=1 if m,<repopackages,; }' < SLES-cd-Packages-DVD-x86_64.kiwi >
config.xml
+ ;;
+esac
+
+exec /usr/bin/product-builder.pl $@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.2.2/modules/KIWICollect.pm
new/product-builder-1.2.4/modules/KIWICollect.pm
--- old/product-builder-1.2.2/modules/KIWICollect.pm 2019-07-16
13:15:40.000000000 +0200
+++ new/product-builder-1.2.4/modules/KIWICollect.pm 2019-09-16
08:37:02.000000000 +0200
@@ -1691,6 +1691,60 @@
return $ret;
}
+
+#==========================================
+# rpm version compare from build script
+#------------------------------------------
+sub verscmp_part {
+ my ($s1, $s2) = @_;
+ if (!defined($s1)) {
+ return defined($s2) ? -1 : 0;
+ }
+ return 1 if !defined $s2;
+ return 0 if $s1 eq $s2;
+ while (1) {
+ $s1 =~ s/^[^a-zA-Z0-9~\^]+//;
+ $s2 =~ s/^[^a-zA-Z0-9~\^]+//;
+ if ($s1 =~ s/^~//) {
+ next if $s2 =~ s/^~//;
+ return -1;
+ }
+ return 1 if $s2 =~ /^~/;
+ if ($s1 =~ s/^\^//) {
+ next if $s2 =~ s/^\^//;
+ return $s2 eq '' ? 1 : -1;
+ }
+ return $s1 eq '' ? -1 : 1 if $s2 =~ /^\^/;
+ if ($s1 eq '') {
+ return $s2 eq '' ? 0 : -1;
+ }
+ return 1 if $s2 eq '';
+ my ($x1, $x2, $r);
+ if ($s1 =~ /^([0-9]+)(.*?)$/) {
+ $x1 = $1;
+ $s1 = $2;
+ $s2 =~ /^([0-9]*)(.*?)$/;
+ $x2 = $1;
+ $s2 = $2;
+ return 1 if $x2 eq '';
+ $x1 =~ s/^0+//;
+ $x2 =~ s/^0+//;
+ $r = length($x1) - length($x2) || $x1 cmp $x2;
+ } elsif ($s1 ne '' && $s2 ne '') {
+ $s1 =~ /^([a-zA-Z]*)(.*?)$/;
+ $x1 = $1;
+ $s1 = $2;
+ $s2 =~ /^([a-zA-Z]*)(.*?)$/;
+ $x2 = $1;
+ $s2 = $2;
+ return -1 if $x1 eq '' || $x2 eq '';
+ $r = $x1 cmp $x2;
+ }
+ return $r > 0 ? 1 : -1 if $r;
+ }
+}
+
+
#==========================================
# lookUpAllPackages
#------------------------------------------
@@ -1812,8 +1866,18 @@
. $package->{'release'};
}
if ( $packPool->{$name}->{$repokey} ) {
- # we have it already from a more important repo.
- next;
+ # we have it already in same repo
+ # is this one newer?
+ my $is_newer = verscmp_part($package->{'epoch'},
$packPool->{$name}->{$repokey}->{'epoch'});
+ next if $is_newer < 0;
+ if ($is_newer eq 0) {
+ $is_newer = verscmp_part($package->{'version'},
$packPool->{$name}->{$repokey}->{'version'});
+ next if $is_newer < 0;
+ if ($is_newer eq 0) {
+ $is_newer = verscmp_part($package->{'release'},
$packPool->{$name}->{$repokey}->{'release'});
+ next if $is_newer <= 0;
+ }
+ }
}
# collect data for connected source rpm
if( $flags{'SOURCERPM'} ) {
@@ -2158,7 +2222,7 @@
return;
}
my $cmd = "$listings ".$this->{m_basesubdir}->{'1'};
- my @data = qx($cmd);
+ @data = qx($cmd);
undef $cmd;
$this->logMsg('I', "[createMetadata] $listings output:");
for my $item (@data) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.2.2/modules/KIWIIsoLinux.pm
new/product-builder-1.2.4/modules/KIWIIsoLinux.pm
--- old/product-builder-1.2.2/modules/KIWIIsoLinux.pm 2019-07-16
13:15:40.000000000 +0200
+++ new/product-builder-1.2.4/modules/KIWIIsoLinux.pm 2019-09-16
08:37:02.000000000 +0200
@@ -248,14 +248,15 @@
sub block_size {
my $this = shift;
my $filename = shift;
- if (! sysopen(fh,$filename,O_RDONLY) ) {
+ my $fh;
+ if (! sysopen($fh,$filename,O_RDONLY) ) {
my $kiwi = $this->{kiwi};
$kiwi -> error ("Cannot open file $filename: $!");
$kiwi -> failed ();
return -1;
}
- my $size = (stat(fh))[7];
- close(fh);
+ my $size = (stat($fh))[7];
+ close($fh);
return ($size/512);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.2.2/product-builder.pl
new/product-builder-1.2.4/product-builder.pl
--- old/product-builder-1.2.2/product-builder.pl 2019-07-16
13:15:40.000000000 +0200
+++ new/product-builder-1.2.4/product-builder.pl 2019-09-16
08:37:02.000000000 +0200
@@ -286,10 +286,11 @@
#------------------------------------------
sub revision {
my $gdata = $global -> getKiwiConfig();
- my $rev = "unknown";
+ my $rev;
if (open my $FD,'<',$gdata->{Revision}) {
$rev = <$FD>; close $FD;
}
+ $rev ||= "unknown";
chomp $rev;
return $rev;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.2.2/rpm/product-builder.spec
new/product-builder-1.2.4/rpm/product-builder.spec
--- old/product-builder-1.2.2/rpm/product-builder.spec 2019-07-16
13:15:40.000000000 +0200
+++ new/product-builder-1.2.4/rpm/product-builder.spec 2019-09-16
08:37:02.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package product-builder
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -23,7 +23,7 @@
Name: product-builder
Conflicts: kiwi
Conflicts: kiwi-instsource
-Version: 1.1.1
+Version: 1.2.3a
Release: 0
Provides: kiwi-schema = 6.2
Source: product-builder-%version.tar.xz
@@ -62,7 +62,7 @@
%build
test -e /.buildenv && . /.buildenv
-make buildroot="%{buildroot}" CFLAGS="%{optflags}"
+make CFLAGS="%{optflags}"
%install
make buildroot="%{buildroot}" \
@@ -71,6 +71,14 @@
install
./.version >"%{buildroot}/%{_datadir}/kiwi/.revision"
+%if 0%{?is_opensuse}
+mv %{buildroot}%{_bindir}/product-builder{.pl,}
+%else
+# install SLE wrapper as entry point. It doesn't really harm as the
+# build flavor detected is very specific, but to avoid waste...
+ln -s product-builder-sle.sh %{buildroot}%{_bindir}/product-builder
+%endif
+
%files
%dir %{_datadir}/kiwi
%license LICENSE
@@ -78,6 +86,6 @@
%{_datadir}/kiwi/metadata
%{_datadir}/kiwi/modules
%{_datadir}/kiwi/xsl
-%{_bindir}/product-builder
+%{_bindir}/product-builder*
%changelog
++++++ product-builder.obsinfo ++++++
--- /var/tmp/diff_new_pack.kDpPIR/_old 2019-09-17 13:36:55.277847526 +0200
+++ /var/tmp/diff_new_pack.kDpPIR/_new 2019-09-17 13:36:55.281847525 +0200
@@ -1,5 +1,5 @@
name: product-builder
-version: 1.2.2
-mtime: 1563275740
-commit: fa39a2b5a3f8bd27117afa9bca71b8512c1a77ca
+version: 1.2.4
+mtime: 1568615822
+commit: ad6f455bc44b150eb916663ed8cff74fae455c94