Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package build for openSUSE:Factory checked in at 2025-07-09 17:26:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new.7373 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build" Wed Jul 9 17:26:04 2025 rev:177 rq:1291258 version:20250708 Changes: -------- --- /work/SRC/openSUSE:Factory/build/build.changes 2025-06-04 20:27:37.842689322 +0200 +++ /work/SRC/openSUSE:Factory/.build.new.7373/build.changes 2025-07-09 17:26:09.157916216 +0200 @@ -1,0 +2,12 @@ +Tue Jul 8 12:26:21 UTC 2025 - Adrian Schröter <adr...@suse.de> + +- Make CreateArchive reproducible +- Adapt to new product composer package set handling +- Add support for '--format json' option to queryrecipe +- LiveBuild: drop unused @args from the parse function +- Support options in the recipe parsers +- Support the new FromScratch: directive +- vm-type=qemu: use cpu=max on x86_64 +- generate_sbom: make sure that no package is listed twice in product mode + +------------------------------------------------------------------- Old: ---- obs-build-20250602.tar.gz New: ---- obs-build-20250708.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.WLCC2V/_old 2025-07-09 17:26:10.589975803 +0200 +++ /var/tmp/diff_new_pack.WLCC2V/_new 2025-07-09 17:26:10.589975803 +0200 @@ -28,7 +28,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0-only OR GPL-3.0-only Group: Development/Tools/Building -Version: 20250602 +Version: 20250708 Release: 0 Source: obs-build-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.WLCC2V/_old 2025-07-09 17:26:10.701980463 +0200 +++ /var/tmp/diff_new_pack.WLCC2V/_new 2025-07-09 17:26:10.705980630 +0200 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20250602 +pkgver=20250708 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') ++++++ _service ++++++ --- /var/tmp/diff_new_pack.WLCC2V/_old 2025-07-09 17:26:10.737981962 +0200 +++ /var/tmp/diff_new_pack.WLCC2V/_new 2025-07-09 17:26:10.745982294 +0200 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="manual"> - <param name="revision">20250602</param> - <param name="version">20250602</param> + <param name="revision">20250708</param> + <param name="version">20250708</param> <param name="url">https://github.com/openSUSE/obs-build.git</param> <param name="scm">git</param> <param name="extract">dist/build.changes</param> ++++++ build.dsc ++++++ --- /var/tmp/diff_new_pack.WLCC2V/_old 2025-07-09 17:26:10.781983792 +0200 +++ /var/tmp/diff_new_pack.WLCC2V/_new 2025-07-09 17:26:10.793984291 +0200 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20250602 +Version: 20250708 Binary: build Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: all ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.WLCC2V/_old 2025-07-09 17:26:10.829985790 +0200 +++ /var/tmp/diff_new_pack.WLCC2V/_new 2025-07-09 17:26:10.829985790 +0200 @@ -1,4 +1,4 @@ -build (20250602) unstable; urgency=low +build (20250708) unstable; urgency=low * Update to current git trunk - add sles11sp2 build config and adapt autodetection ++++++ obs-build-20250602.tar.gz -> obs-build-20250708.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/Build/LiveBuild.pm new/obs-build-20250708/Build/LiveBuild.pm --- old/obs-build-20250602/Build/LiveBuild.pm 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/Build/LiveBuild.pm 2025-07-08 14:30:19.000000000 +0200 @@ -67,7 +67,7 @@ } sub parse { - my ($config, $filename, @args) = @_; + my ($config, $filename) = @_; my $ret = {}; # check that filename is a tar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/Build/ProductCompose.pm new/obs-build-20250708/Build/ProductCompose.pm --- old/obs-build-20250602/Build/ProductCompose.pm 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/Build/ProductCompose.pm 2025-07-08 14:30:19.000000000 +0200 @@ -72,34 +72,50 @@ } sub get_pkgset { - my ($packagesets, $setname, $arch, $flavor) = @_; + my ($packagesets, $setname, $arch, $flavor, $entrycache, $setcache) = @_; + + $entrycache ||= {}; + $setcache ||= {}; $flavor = '' unless defined $flavor; - my @seenps; - my $lasts; + $setname ||= 'main'; + + if ($setname =~ /^(\S+)(?:\s+architecture=(\S+))?(?:\s+flavor=(\S*))?(?:\s+architecture=(\S+))?\s*$/) { + $arch = $2 if defined $2; + $arch = $4 if defined $4; + $flavor = $3 if defined $3; + $setname = $1; + } - # asterisk is our internal marker for all packages return ['*'] if $setname eq '__all__'; - for my $s (@$packagesets) { - push @seenps, $lasts if defined $lasts; - $lasts = $s; - next unless $setname eq ($s->{'name'} || 'main'); - next if $s->{'flavors'} && !grep {$_ eq $flavor} @{$s->{'flavors'}}; - next if $s->{'architectures'} && !grep {$_ eq $arch} @{$s->{'architectures'}}; - push @seenps, $s; - my $pkgset = $s->{'packages'} || []; - for my $n (@{$s->{'add'} || []}) { - $pkgset = add_pkgset($pkgset, get_pkgset(\@seenps, $n, $arch, $flavor)); - } - for my $n (@{$s->{'sub'} || []}) { - $pkgset = sub_pkgset($pkgset, get_pkgset(\@seenps, $n, $arch, $flavor)); - } - for my $n (@{$s->{'intersect'} || []}) { - $pkgset = intersect_pkgset($pkgset, get_pkgset(\@seenps, $n, $arch, $flavor)); + my $setkey = "$setname/$arch/$flavor"; + return $setcache->{$setkey} if $setcache->{$setkey}; + + my $entries = $entrycache->{"$arch/$flavor"}; + if (!$entries) { + $entrycache->{"$arch/$flavor"} = $entries = {}; + for my $s (@$packagesets) { + next if $s->{'flavors'} && !grep {$_ eq $flavor} @{$s->{'flavors'}}; + next if $s->{'architectures'} && !grep {$_ eq $arch} @{$s->{'architectures'}}; + $entries->{$s->{'name'} || 'main'} ||= $s; } - return $pkgset; } - return []; + + my $s = $entries->{$setname}; + $setcache->{$setkey} = []; + return [] unless $s; + my $pkgset = $s->{'packages'} || []; + for my $n (@{$s->{'add'} || []}) { + $pkgset = add_pkgset($pkgset, get_pkgset($packagesets, $n, $arch, $flavor, $entrycache, $setcache)); + } + for my $n (@{$s->{'sub'} || []}) { + $pkgset = sub_pkgset($pkgset, get_pkgset($packagesets, $n, $arch, $flavor, $entrycache, $setcache)); + } + for my $n (@{$s->{'intersect'} || []}) { + $pkgset = intersect_pkgset($pkgset, get_pkgset($packagesets, $n, $arch, $flavor, $entrycache, $setcache)); + } + $setcache->{$setkey} = $pkgset; + return $pkgset; } sub get_pkgset_compat { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/Build/Rpm.pm new/obs-build-20250708/Build/Rpm.pm --- old/obs-build-20250602/Build/Rpm.pm 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/Build/Rpm.pm 2025-07-08 14:30:19.000000000 +0200 @@ -707,8 +707,10 @@ # line and build deps got modified or 'save_expanded' is set in # config sub parse { - my ($config, $specfile, $xspec) = @_; + splice(@_, 2, 0, 'xspec') if @_ == 3; # compat, to be removed + my ($config, $specfile, %options) = @_; + my $xspec = $options{'xspec'}; my $packname; my $exclarch; my $badarch; @@ -745,6 +747,8 @@ my $hasif = 0; my $linenoprefix = ''; my $lineno = 0; + my $parsing_description = 0; + my $withdescription = $options{'withdescription'}; my @includelines; my $includenum = 0; my $obspackage = defined($config->{'obspackage'}) ? $config->{'obspackage'} : '@OBS_PACKAGE@'; @@ -894,6 +898,27 @@ # do this always? $xspec->[-1] = [ $xspec->[-1], $line ] if $doxspec && $config->{'save_expanded'}; + if ($withdescription) { + # line matches "%description" + if ($line =~ /^\s*%description/) { + $parsing_description = 1; + $ret->{'description'} = ""; + next; + } + # we're inside %description + if ($parsing_description) { + if ($line =~ /^\s*%/) { + # found a next section -> remove trailing whitespaces and finish + $ret->{'description'} =~ s/\s+$//; + $parsing_description = 0; + } else { + # still inside %description -> append + $ret->{'description'} .= "$line\n"; + } + next; + } + } + # fast check if this is an interesting line next if $line !~ /[%:\!]/; @@ -937,6 +962,8 @@ } elsif ($keyword eq 'excludearch') { $badarch ||= []; push @$badarch, split(' ', $arg); + } elsif ($keyword eq 'summary') { + $ret->{$keyword} = $arg; } } if ($keyword eq 'version') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/Build.pm new/obs-build-20250708/Build.pm --- old/obs-build-20250602/Build.pm 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/Build.pm 2025-07-08 14:30:19.000000000 +0200 @@ -285,6 +285,10 @@ my $macros = ''; for my $c (@c) { $c =~ s/\n?$/\n/s if $c ne ''; + if ("\n$c" =~ /^(.*?)\nFromScratch:/si && $1 !~ /\n[ \t]*[^\s#]/) { + $config = ''; + $macros = ''; + } if ($c =~ /^\s*:macros\s*$/im) { # probably multiple macro sections with %if statements # flush out macros @@ -403,7 +407,7 @@ my @spec; $config->{'save_expanded'} = 1; $config->{'parsing_config'} = 1; - Build::Rpm::parse($config, \@newconfig, \@spec); + Build::Rpm::parse($config, \@newconfig, 'xspec' => \@spec); delete $config->{'save_expanded'}; delete $config->{'parsing_config'}; $config->{'preinstall'} = []; @@ -436,6 +440,7 @@ $config->{'repourl'} = []; $config->{'registryurl'} = []; $config->{'assetsurl'} = []; + my $no_from_scratch; for my $l (@spec) { $l = $l->[1] if ref $l; next unless defined $l; @@ -450,14 +455,10 @@ } else { $config->{'rawmacros'} .= $l; } - next; - } - if ($l0 eq 'distmacro:') { + } elsif ($l0 eq 'distmacro:') { @l = split(' ', $l, 2); push @macros, "%define $l[1]" if @l == 2; - next; - } - if ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 'runscripts:' || $l0 eq 'expandflags:' || $l0 eq 'buildflags:' || $l0 eq 'publishflags:' || $l0 eq 'repourl:' || $l0 eq 'registryurl:' || $l0 eq 'assetsurl:' || $l0 eq 'onlynative:' || $l0 eq 'alsonative:') { + } elsif ($l0 eq 'preinstall:' || $l0 eq 'vminstall:' || $l0 eq 'required:' || $l0 eq 'support:' || $l0 eq 'keep:' || $l0 eq 'prefer:' || $l0 eq 'ignore:' || $l0 eq 'conflict:' || $l0 eq 'runscripts:' || $l0 eq 'expandflags:' || $l0 eq 'buildflags:' || $l0 eq 'publishflags:' || $l0 eq 'repourl:' || $l0 eq 'registryurl:' || $l0 eq 'assetsurl:' || $l0 eq 'onlynative:' || $l0 eq 'alsonative:') { my $t = substr($l0, 0, -1); for my $l (@l) { if ($l eq '!*') { @@ -541,9 +542,14 @@ } } elsif ($l0 eq 'singleexport:') { $config->{'singleexport'} = $l[0]; # avoid to export multiple package container in maintenance_release projects - } elsif ($l0 !~ /^[#%]/) { + } elsif ($l0 eq 'fromscratch:') { + $config->{'parse_error'} = 'FromScratch directive must come first' if $no_from_scratch; + } elsif ($l0 =~ /^[#%]/) { + next; + } else { warn("unknown keyword in config: $l0\n"); } + $no_from_scratch = 1; } for my $l (qw{preinstall vminstall required support keep runscripts repotype patterntype}) { $config->{$l} = [ unify(@{$config->{$l}}) ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/PBuild/OBS.pm new/obs-build-20250708/PBuild/OBS.pm --- old/obs-build-20250602/PBuild/OBS.pm 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/PBuild/OBS.pm 2025-07-08 14:30:19.000000000 +0200 @@ -148,7 +148,11 @@ my $ua = create_ua(); my ($config) = Build::Download::fetch("${baseurl}source/$projid2/_config", 'ua' => $ua, 'missingok' => 1); $config = '' unless defined $config; - $config = "\n### from $projid\n%define _repository $repoid\n%define _is_this_project 0\n%define _is_in_project 0\n$config" if $config; + if ($config ne '') { + my $fromscratch = "\n$config" =~ /^(.*?)\nFromScratch:/si && $1 !~ /\n[ \t]*[^\s#]/ ? 1 : 0; + $config = "\n### from $projid\n%define _repository $repoid\n%define _is_this_project 0\n%define _is_in_project 0\n#!!line $projid:0\n$config"; + $config = "FromScratch:\n$config" if $fromscratch; + } return $config; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/build-recipe new/obs-build-20250708/build-recipe --- old/obs-build-20250602/build-recipe 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/build-recipe 2025-07-08 14:30:19.000000000 +0200 @@ -342,7 +342,7 @@ echo "#!/bin/sh -e" > $BUILD_ROOT/.unpack.command shellquote cd "$TOPDIR/SOURCES" >> $BUILD_ROOT/.unpack.command echo >> $BUILD_ROOT/.unpack.command - shellquote tar -cf - --owner=root:0 --group=root:0 --exclude=.git -- "${t%*.tar.*}" >> $BUILD_ROOT/.unpack.command + shellquote tar -cf - --owner=root:0 --group=root:0 --exclude=.git --sort=name --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime -- "${t%*.tar.*}" >> $BUILD_ROOT/.unpack.command echo -n ' | ' >> $BUILD_ROOT/.unpack.command shellquote "${compressor[@]}" >> $BUILD_ROOT/.unpack.command echo -n ' > ' >> $BUILD_ROOT/.unpack.command diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/build-vm-qemu new/obs-build-20250708/build-vm-qemu --- old/obs-build-20250602/build-vm-qemu 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/build-vm-qemu 2025-07-08 14:30:19.000000000 +0200 @@ -87,7 +87,7 @@ ;; x86_64) qemu_bin="/usr/bin/qemu-system-x86_64" - qemu_cpu="-cpu qemu64" + qemu_cpu="-cpu max" qemu_device=virtio-blk # Use defaults and fallbacks for other values ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/dist/build.changes new/obs-build-20250708/dist/build.changes --- old/obs-build-20250602/dist/build.changes 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/dist/build.changes 2025-07-08 14:30:19.000000000 +0200 @@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Tue Jul 8 12:26:21 UTC 2025 - Adrian Schröter <adr...@suse.de> + +- Make CreateArchive reproducible +- Adapt to new product composer package set handling +- Add support for '--format json' option to queryrecipe +- LiveBuild: drop unused @args from the parse function +- Support options in the recipe parsers +- Support the new FromScratch: directive +- vm-type=qemu: use cpu=max on x86_64 +- generate_sbom: make sure that no package is listed twice in product mode + +------------------------------------------------------------------- Mon Jun 2 11:02:46 UTC 2025 - Adrian Schröter <adrian@localhost> - fix slfo 1.2 build config diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/generate_sbom new/obs-build-20250708/generate_sbom --- old/obs-build-20250602/generate_sbom 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/generate_sbom 2025-07-08 14:30:19.000000000 +0200 @@ -555,7 +555,13 @@ my $fn = $File::Find::name; push @rpms, read_rpm($fn) if $fn =~ /\.rpm$/; }; - find({'wanted' => $addrpmfile, 'no_chdir' => 1}, $dir); + find({'wanted' => $addrpmfile, 'no_chdir' => 1, 'preprocess' => sub {sort(@_)} }, $dir); + # make sure that the packages are unique + my %seen; + for my $r (splice @rpms) { + my $sigmd5 = $r->{'SIGMD5'}; + push @rpms, $r unless $sigmd5 && $seen{$sigmd5}++;; + } return \@rpms; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/pbuild new/obs-build-20250708/pbuild --- old/obs-build-20250602/pbuild 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/pbuild 2025-07-08 14:30:19.000000000 +0200 @@ -188,6 +188,8 @@ push @{$opts->{'repo'}}, @baseobsrepos if @baseobsrepos && !$opts->{'repo'}; my $localconfig = -s "$dir/_config" ? PBuild::Util::readstr("$dir/_config") : ''; +@baseconfigs = () if "\n$localconfig" =~ /^(.*?)\nFromScratch:/si && $1 !~ /\n[ \t]*[^\s#]/; +$localconfig = "#!!line _config:0\n$localconfig" if $localconfig ne ''; $localconfig = "\n%define _repository $reponame\n\n$localconfig" if $reponame && $localconfig ne ''; my $buildconfig = Build::combine_configs(reverse(@baseconfigs), $localconfig); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/queryrecipe new/obs-build-20250708/queryrecipe --- old/obs-build-20250602/queryrecipe 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/queryrecipe 2025-07-08 14:30:19.000000000 +0200 @@ -28,7 +28,7 @@ use Build; -my ($dist, $archs, $configdir, $type, $recipe, $buildflavor, $obspackage); +my ($dist, $archs, $configdir, $type, $recipe, $buildflavor, $obspackage, $format); $buildflavor = ''; $configdir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build') . '/configs'; @@ -54,6 +54,10 @@ shift @ARGV; $obspackage = shift @ARGV; next; + } elsif ($ARGV[0] eq '--format') { + shift @ARGV; + $format = shift @ARGV; + next; } else { if (!defined($recipe)) { $recipe = shift @ARGV; @@ -70,12 +74,20 @@ $cf->{'buildflavor'} = $buildflavor if defined $buildflavor; $cf->{'obspackage'} = $obspackage if defined $obspackage; -my $q = Build::parse($cf, $recipe); +my %options; +$options{'withdescription'} = 1 if !defined($type) || $type eq 'description'; + +my $q = Build::parse($cf, $recipe, %options); if (!defined $type) { - require Data::Dumper; - $Data::Dumper::Sortkeys = $Data::Dumper::Sortkeys = 1; - print Data::Dumper::Dumper($q); + if ($format eq 'json') { + require Build::SimpleJSON; + print Build::SimpleJSON::unparse($q); + } else { + require Data::Dumper; + $Data::Dumper::Sortkeys = $Data::Dumper::Sortkeys = 1; + print Data::Dumper::Dumper($q); + } exit(0); } if (($type eq 'sources' || $type eq 'patches') && !exists($q->{$type})) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20250602/substitutedeps new/obs-build-20250708/substitutedeps --- old/obs-build-20250602/substitutedeps 2025-06-02 13:08:44.000000000 +0200 +++ new/obs-build-20250708/substitutedeps 2025-07-08 14:30:19.000000000 +0200 @@ -97,7 +97,7 @@ ####################################################################### my $xspec = []; -my $d = Build::parse($cf, $spec, $xspec) || {}; +my $d = Build::parse($cf, $spec, 'xspec' => $xspec) || {}; my @sdeps = @{$d->{'deps'} || []}; my @neg = map {substr($_, 1)} grep {/^-/} @{$d->{'deps'} || []}; my %neg = map {$_ => 1} @neg;