Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package build for openSUSE:Factory checked 
in at 2023-11-21 21:31:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/build (Old)
 and      /work/SRC/openSUSE:Factory/.build.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "build"

Tue Nov 21 21:31:15 2023 rev:157 rq:1127636 version:20231120

Changes:
--------
--- /work/SRC/openSUSE:Factory/build/build.changes      2023-11-05 
12:18:46.809106798 +0100
+++ /work/SRC/openSUSE:Factory/.build.new.2521/build.changes    2023-11-21 
21:31:20.621850482 +0100
@@ -1,0 +2,13 @@
+Mon Nov 20 08:00:48 UTC 2023 - Adrian Schröter <adr...@suse.de>
+
+- Support zstd compressed rpm-md meta data (bsc#1217269)
+- Added Debian 12 configuration
+- First ObsProduct build format support
+
+-------------------------------------------------------------------
+Fri Nov  3 10:03:35 UTC 2023 - Adrian Schröter <adr...@suse.de>
+
+- fix SLE 15 SP5 build configuration
+- Improve user agent handling for obs repositories
+
+-------------------------------------------------------------------

Old:
----
  obs-build-20231027.tar.gz

New:
----
  obs-build-20231120.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.D9HcVt/_old  2023-11-21 21:31:21.313876023 +0100
+++ /var/tmp/diff_new_pack.D9HcVt/_new  2023-11-21 21:31:21.313876023 +0100
@@ -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:        20231027
+Version:        20231120
 Release:        0
 Source:         obs-build-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.D9HcVt/_old  2023-11-21 21:31:21.353877499 +0100
+++ /var/tmp/diff_new_pack.D9HcVt/_new  2023-11-21 21:31:21.357877647 +0100
@@ -1,5 +1,5 @@
 pkgname=build
-pkgver=20231027
+pkgver=20231120
 pkgrel=0
 pkgdesc="Build packages in sandbox"
 arch=('i686' 'x86_64')

++++++ _service ++++++
--- /var/tmp/diff_new_pack.D9HcVt/_old  2023-11-21 21:31:21.377878385 +0100
+++ /var/tmp/diff_new_pack.D9HcVt/_new  2023-11-21 21:31:21.381878532 +0100
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="manual">
-    <param name="revision">20231027</param>
-    <param name="version">20231027</param>
+    <param name="revision">20231120</param>
+    <param name="version">20231120</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.D9HcVt/_old  2023-11-21 21:31:21.417879862 +0100
+++ /var/tmp/diff_new_pack.D9HcVt/_new  2023-11-21 21:31:21.421880009 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: build
-Version: 20231027
+Version: 20231120
 Binary: build
 Maintainer: Adrian Schroeter <adr...@suse.de>
 Architecture: all

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.D9HcVt/_old  2023-11-21 21:31:21.441880747 +0100
+++ /var/tmp/diff_new_pack.D9HcVt/_new  2023-11-21 21:31:21.445880895 +0100
@@ -1,4 +1,4 @@
-build (20231027) unstable; urgency=low
+build (20231120) unstable; urgency=low
 
   * Update to current git trunk
     - add sles11sp2 build config and adapt autodetection

++++++ obs-build-20231027.tar.gz -> obs-build-20231120.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/Build/ObsProduct.pm 
new/obs-build-20231120/Build/ObsProduct.pm
--- old/obs-build-20231027/Build/ObsProduct.pm  1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-build-20231120/Build/ObsProduct.pm  2023-11-20 08:58:08.000000000 
+0100
@@ -0,0 +1,114 @@
+################################################################
+#
+# Copyright (c) 2023 SUSE Linux Products GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or 3 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file COPYING); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
+package Build::ObsProduct;
+
+use strict;
+use warnings;
+use Build::Rpm;
+
+my $yamlxs = eval { require YAML::XS; $YAML::XS::LoadBlessed = 0; return 1 };
+my $yamlpp = eval { require YAML::PP; return YAML::PP->new };
+
+sub _have_yaml_parser {
+  return $yamlpp || $yamlxs ? 1 : undef;
+}
+
+sub _load_yaml {
+  my ($yaml) = @_;
+  my $data;
+  if ($yamlpp) {
+    $data = eval { $yamlpp->load_string($yaml) };
+    return $data;
+  }
+  if ($yamlxs) {
+    eval { $data = YAML::XS::Load($yaml) };
+    return $data;
+  }
+  die "Neither YAML::PP nor YAML::XS available\n";
+}
+
+sub _load_yaml_file {
+  my ($fn) = @_;
+  my $data;
+  if ($yamlpp) {
+    $data = eval { $yamlpp->load_file($fn) };
+    return $data;
+  }
+  if ($yamlxs) {
+    eval { $data = YAML::XS::LoadFile($fn) };
+    return $data;
+  }
+  die "Neither YAML::PP nor YAML::XS available\n";
+}
+
+sub filter_packages {
+  my (@list) = @_;
+  my @ret;
+  for my $item (@list) {
+  # FIXME filter by rules
+    push @ret, $item;
+  }
+  return @ret;
+}
+
+sub parse {
+  my ($cf, $fn) = @_;
+
+  my $data = _load_yaml_file($fn);
+  return { error => "Failed to parse file '$fn'" } unless defined $data;
+  my $ret = {};
+  $ret->{version} = $data->{'version'};
+  $ret->{name} = $data->{'name'} or die "OBS Product name is missing";
+  my $runtime_version = $data->{'runtime-version'};
+  my $sdk = $data->{sdk};
+
+  my @unpack_packdeps = filter_packages(@{$data->{'unpack_packages'}});
+  my @packdeps = filter_packages(@{$data->{'packages'}});
+  my @merged = (@unpack_packdeps, @packdeps);
+  $ret->{deps} = \@merged;
+
+  # can we live without additional repository config?
+
+  # Do we need source or debug packages?
+  my $bo = $data->{'build_options'};
+  if ($bo) {
+    $ret->{'sourcemedium'} = 1 if $bo->{'source'};
+    $ret->{'debugmedium'} = 1 if $bo->{'debug'};
+  }
+
+  return $ret;
+}
+
+sub show {
+    my ($fn, $field) = @ARGV;
+    my $cf = {};
+    my $d = parse($cf, $fn);
+    die "$d->{error}\n" if $d->{error};
+    my $value = $d->{ $field };
+    if (ref $value eq 'ARRAY') {
+        print "$_\n" for @$value;
+    }
+    else {
+        print "$value\n";
+    }
+}
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/Build/Rpm.pm 
new/obs-build-20231120/Build/Rpm.pm
--- old/obs-build-20231027/Build/Rpm.pm 2023-10-27 10:34:38.000000000 +0200
+++ new/obs-build-20231120/Build/Rpm.pm 2023-11-20 08:58:08.000000000 +0100
@@ -782,9 +782,11 @@
       }
     }
     if ($main_preamble) {
-      if ($line =~ /^(Name|Epoch|Version|Release|Disttag)\s*:\s*(\S+)/i) {
+      if ($line =~ /^(Name|Epoch|Version|Release|Disttag|Url)\s*:\s*(\S+)/i) {
        $ret->{lc $1} = $2;
        $macros{lc $1} = $2;
+       # add a separate uppercase macro for tags from the main preamble
+       $macros{uc $1} = $2;
       } elsif ($line =~ /^ExclusiveArch\s*:\s*(.*)/i) {
        $exclarch ||= [];
        push @$exclarch, split(' ', $1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/Build.pm 
new/obs-build-20231120/Build.pm
--- old/obs-build-20231027/Build.pm     2023-10-27 10:34:38.000000000 +0200
+++ new/obs-build-20231120/Build.pm     2023-11-20 08:58:08.000000000 +0100
@@ -44,6 +44,7 @@
 our $do_helm;
 our $do_flatpak;
 our $do_mkosi;
+our $do_obsproduct;
 
 sub import {
   for (@_) {
@@ -60,8 +61,9 @@
     $do_helm = 1 if $_ eq ':helm';
     $do_flatpak = 1 if $_ eq ':flatpak';
     $do_mkosi = 1 if $_ eq ':mkosi';
+    $do_obsproduct = 1 if $_ eq ':obsproduct';
   }
-  $do_rpm = $do_deb = $do_kiwi = $do_arch = $do_collax = $do_livebuild = 
$do_snapcraft = $do_appimage = $do_docker = $do_fissile = $do_helm = 
$do_flatpak = $do_mkosi = 1 if !$do_rpm && !$do_deb && !$do_kiwi && !$do_arch 
&& !$do_collax && !$do_livebuild && !$do_snapcraft && !$do_appimage && 
!$do_docker && !$do_fissile && !$do_helm && !$do_flatpak && !$do_mkosi;
+  $do_rpm = $do_deb = $do_kiwi = $do_obsproduct = $do_arch = $do_collax = 
$do_livebuild = $do_snapcraft = $do_appimage = $do_docker = $do_fissile = 
$do_helm = $do_flatpak = $do_mkosi = 1 if !$do_rpm && !$do_deb && !$do_kiwi && 
!$do_arch && !$do_collax && !$do_livebuild && !$do_snapcraft && !$do_appimage 
&& !$do_docker && !$do_fissile && !$do_helm && !$do_flatpak && !$do_mkosi && 
!$do_obsproduct;
 
   if ($do_deb) {
     require Build::Deb;
@@ -99,6 +101,9 @@
   if ($do_mkosi) {
     require Build::Mkosi;
   }
+  if ($do_obsproduct) {
+    require Build::ObsProduct;
+  }
 }
 
 package Build::Features;
@@ -1258,14 +1263,14 @@
 sub recipe2buildtype {
   my ($recipe) = @_;
   return undef unless defined $recipe;
-  return $1 if $recipe =~ /\.(spec|dsc|kiwi|livebuild)$/;
+  return $1 if $recipe =~ /\.(spec|dsc|kiwi|obsproduct|livebuild)$/;
   $recipe =~ s/.*\///;
   $recipe =~ s/^_service:.*://;
   return 'arch' if $recipe eq 'PKGBUILD';
   return 'collax' if $recipe eq 'build.collax';
   return 'snapcraft' if $recipe eq 'snapcraft.yaml';
   return 'appimage' if $recipe eq 'appimage.yml';
-  return 'docker' if $recipe eq 'Dockerfile' || $recipe =~ /^Dockerfile\..*/;
+  return 'docker' if $recipe eq 'Dockerfile' || $recipe =~ /^Dockerfile\./;
   return 'fissile' if $recipe eq 'fissile.yml';
   return 'preinstallimage' if $recipe eq '_preinstallimage';
   return 'simpleimage' if $recipe eq 'simpleimage';
@@ -1316,6 +1321,7 @@
   return Build::Kiwi::parse($cf, $fn, @args) if $do_kiwi && $fn =~ /\.kiwi$/;
   return Build::LiveBuild::parse($cf, $fn, @args) if $do_livebuild && $fn =~ 
/\.livebuild$/;
   return Build::Mkosi::parse($cf, $fn, @args) if $do_mkosi && $fn =~ 
/^mkosi\./;
+  return Build::ObsProduct::parse($cf, $fn, @args) if $do_obsproduct && $fn =~ 
/\.obsproduct$/;
   return parse_typed($cf, $fn, recipe2buildtype($fn), @args);
 }
 
@@ -1325,6 +1331,7 @@
   return Build::Rpm::parse($cf, $fn, @args) if $do_rpm && $buildtype eq 'spec';
   return Build::Deb::parse($cf, $fn, @args) if $do_deb && $buildtype eq 'dsc';
   return Build::Kiwi::parse($cf, $fn, @args) if $do_kiwi && $buildtype eq 
'kiwi';
+  return Build::ObsProduct::parse($cf, $fn, @args) if $do_obsproduct && 
$buildtype eq 'obsproduct';
   return Build::LiveBuild::parse($cf, $fn, @args) if $do_livebuild && 
$buildtype eq 'livebuild';
   return Build::Snapcraft::parse($cf, $fn, @args) if $do_snapcraft && 
$buildtype eq 'snapcraft';
   return Build::Appimage::parse($cf, $fn, @args) if $do_appimage && $buildtype 
eq 'appimage';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/PBuild/OBS.pm 
new/obs-build-20231120/PBuild/OBS.pm
--- old/obs-build-20231027/PBuild/OBS.pm        2023-10-27 10:34:38.000000000 
+0200
+++ new/obs-build-20231120/PBuild/OBS.pm        2023-11-20 08:58:08.000000000 
+0100
@@ -294,18 +294,20 @@
 # Download binaries in batches from a remote obs instance
 #
 sub fetch_binaries {
-  my ($url, $repodir, $names, $callback, $ua) = @_;
+  my ($url, $repodir, $names, $callback) = @_;
   my @names = sort keys %$names;
+  return undef unless @names;
+  my $ua = create_ua();
   while (@names) {
     my @nchunk = splice(@names, 0, 100);
     my $chunkurl = "$url/_repository?view=cpio";
     $chunkurl .= "&binary=".PBuild::Util::urlencode($_) for @nchunk;
     my $tmpcpio = "$repodir/.$$.binaries.cpio";
-    $ua = create_ua($ua);
     Build::Download::download($chunkurl, $tmpcpio, undef, 'ua' => $ua, 'retry' 
=> 3);
     PBuild::Cpio::cpio_extract($tmpcpio, sub 
{fetch_binaries_cpioextract($_[0], $_[1], $repodir, $names, $callback)});
     unlink($tmpcpio);
   }
+  return $ua;
 }
 
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/PBuild/Recipe.pm 
new/obs-build-20231120/PBuild/Recipe.pm
--- old/obs-build-20231027/PBuild/Recipe.pm     2023-10-27 10:34:38.000000000 
+0200
+++ new/obs-build-20231120/PBuild/Recipe.pm     2023-11-20 08:58:08.000000000 
+0100
@@ -72,6 +72,15 @@
       return $files{$files[0]};
     }
   }
+  if ($type ne 'obsproduct') {
+    @files = grep {/\.obsproduct$/} keys %files;
+    @files = grep {/^\Q$pkg\E/i} @files if @files > 1;
+    return $files{$files[0]} if @files == 1;
+    if (@files > 1) {
+      @files = sort @files;
+      return $files{$files[0]};
+    }
+  }
   if (1) {
     @files = grep {/mkosi\.$/} keys %files;
     return $files{$files[0]} if @files == 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/PBuild/RemoteRepo.pm 
new/obs-build-20231120/PBuild/RemoteRepo.pm
--- old/obs-build-20231027/PBuild/RemoteRepo.pm 2023-10-27 10:34:38.000000000 
+0200
+++ new/obs-build-20231120/PBuild/RemoteRepo.pm 2023-11-20 08:58:08.000000000 
+0100
@@ -448,10 +448,10 @@
     next if $1 ne $url;
     $names{$bin->{'name'}} = [ ".$$.$binname", $binname, $bin ];
   }
-  return unless %names;
+  return undef unless %names;
   my $repodir = $repo->{'dir'};
   PBuild::Util::mkdir_p($repodir);
-  PBuild::OBS::fetch_binaries($url, $repodir, \%names, 
\&fetchbinaries_replace, $ua);
+  return PBuild::OBS::fetch_binaries($url, $repodir, \%names, 
\&fetchbinaries_replace);
 }
 
 #
@@ -464,8 +464,8 @@
   die("bad repo\n") unless $url;
   print "fetching ".PBuild::Util::plural(scalar(@$bins), 'binary')." from 
$url\n";
   PBuild::Util::mkdir_p($repodir);
-  my $ua = Build::Download::create_ua();
-  fetchbinaries_obs($repo, $bins, $ua) if $url =~ /^obs:/;
+  my $ua;
+  $ua = fetchbinaries_obs($repo, $bins) if $url =~ /^obs:/;
   for my $bin (@$bins) {
     next if $bin->{'filename'};
     my $location = $bin->{'location'};
@@ -474,6 +474,7 @@
     my $binname = calc_binname($bin);
     PBuild::Verify::verify_filename($binname);
     my $tmpname = ".$$.$binname";
+    $ua ||= Build::Download::create_ua();
     if ($bin->{'name'} =~ /^container:/) {
       # we cannot query containers, just download and set the filename
       die("container has no hdrmd5\n") unless $bin->{'hdrmd5'};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/README.md 
new/obs-build-20231120/README.md
--- old/obs-build-20231027/README.md    2023-10-27 10:34:38.000000000 +0200
+++ new/obs-build-20231120/README.md    2023-11-20 08:58:08.000000000 +0100
@@ -70,6 +70,7 @@
 - *SimpleImage*&mdash;`chroot` `tar` ball based on `rpm` spec file syntax
 - [Debian](http://debian.org) *Livebuild*
 - *Preinstallimages*&mdash;for speeding up builds esp. inside of 
[OBS](http://openbuildservice.org/)
+- OBS Product Builds, to generate rpm-md trees and installable images.
 
 Desktop Image formats
 ---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/build-recipe 
new/obs-build-20231120/build-recipe
--- old/obs-build-20231027/build-recipe 2023-10-27 10:34:38.000000000 +0200
+++ new/obs-build-20231120/build-recipe 2023-11-20 08:58:08.000000000 +0100
@@ -32,7 +32,7 @@
 BUILD_CHANGELOG_TIMESTAMP=
 VCSURL=
 
-for i in spec dsc kiwi arch collax preinstallimage simpleimage mock livebuild 
snapcraft debootstrap debbuild appimage docker podman fissile helm flatpak 
mkosi; do
+for i in spec dsc kiwi obsproduct arch collax preinstallimage simpleimage mock 
livebuild snapcraft debootstrap debbuild appimage docker podman fissile helm 
flatpak mkosi; do
     . "$BUILD_DIR/build-recipe-$i"
 done
 
@@ -122,6 +122,7 @@
         *.spec|*.src.rpm) BUILDTYPE=spec ;;
         *.dsc) BUILDTYPE=dsc ;;
         *.kiwi) BUILDTYPE=kiwi ;;
+        *.obsproduct) BUILDTYPE=obsproduct ;;
         PKGBUILD) BUILDTYPE=arch ;;
         snapcraft.yaml) BUILDTYPE=snapcraft ;;
         appimage.yml) BUILDTYPE=appimage ;;
@@ -184,6 +185,7 @@
                    case $(queryconfig --dist "$BUILD_DIST" --configdir 
"$CONFIG_DIR" --archpath "$BUILD_ARCH" type) in
                        dsc) types=".dsc" ;;
                        kiwi) types=".kiwi" ;;
+                       obsproduct) types=".obsproduct" ;;
                        arch) types="PKGBUILD" ;;
                        collax) types="build.collax" ;;
                        livebuild) types=".livebuild" ;;
@@ -191,7 +193,7 @@
                        mkosi) types="mkosi." ;;
                    esac
                fi
-               types="$types .spec _specsubdir:package _specsubdir:dist .dsc 
PKGBUILD Dockerfile build.collax .kiwi .src.rpm .nosrc.rpm simpleimage 
snapcraft.yaml Chart.yaml flatpak.yaml flatpak.json mkosi."
+               types="$types .spec _specsubdir:package _specsubdir:dist .dsc 
PKGBUILD Dockerfile build.collax .kiwi .obsproduct .src.rpm .nosrc.rpm 
simpleimage snapcraft.yaml Chart.yaml flatpak.yaml flatpak.json mkosi."
            fi
            for t in $types ; do
                found=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/build-recipe-obsproduct 
new/obs-build-20231120/build-recipe-obsproduct
--- old/obs-build-20231027/build-recipe-obsproduct      1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20231120/build-recipe-obsproduct      2023-11-20 
08:58:08.000000000 +0100
@@ -0,0 +1,77 @@
+#
+# KIWI specific functions. Handle with care.
+#
+################################################################
+#
+# Copyright (c) 2023 SUSE Linux Products GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or 3 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file COPYING); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
+
+recipe_setup_obsproduct() {
+    TOPDIR=/usr/src/packages
+    test "$DO_INIT_TOPDIR" = false || rm -rf "$BUILD_ROOT$TOPDIR"
+    mkdir -p "$BUILD_ROOT$TOPDIR"
+    mkdir -p "$BUILD_ROOT$TOPDIR/OTHER"
+    mkdir -p "$BUILD_ROOT$TOPDIR/SOURCES"
+    mkdir -p "$BUILD_ROOT$TOPDIR/OBSPRODUCT"
+    # compat, older build versions did not clean TOPDIR ...
+    mkdir -p "$BUILD_ROOT$TOPDIR/BUILD"
+    mkdir -p "$BUILD_ROOT$TOPDIR/RPMS"
+    mkdir -p "$BUILD_ROOT$TOPDIR/SRPMS"
+
+    if test "$MYSRCDIR" = $BUILD_ROOT/.build-srcdir; then
+       mv "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
+    else
+       if test -z "$LINKSOURCES" ; then
+           cp -dLR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/ || 
cleanup_and_exit 1 "source copy failed"
+       else
+           cp -lR "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/ || 
cleanup_and_exit 1 "source copy failed"
+       fi
+    fi
+    chown -hR "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"
+
+    if test -z "$ABUILD_TARGET"; then
+        ABUILD_TARGET=$(queryconfig target --dist "$BUILD_DIST" --configdir 
"$CONFIG_DIR" --archpath "$BUILD_ARCH" )
+        test -z "$ABUILD_TARGET" || echo "build target is $ABUILD_TARGET"
+    fi
+}
+
+recipe_prepare_obsproduct() {
+    :
+}
+
+recipe_build_obsproduct() {
+    echo "running obs product builder..."
+
+    extra_args=""
+    if test -n "$RELEASE" ; then
+       extra_args=" $extra_args --release $RELEASE"
+    fi
+    if test -n "$BUILD_FLAVOR" ; then
+       extra_args=" $extra_args --flavor $BUILD_FLAVOR"
+    fi
+    chroot "$BUILD_ROOT" su -c "/usr/bin/obs-product-builder build $extra_args 
-v --clean $TOPDIR/SOURCES/$RECIPEFILE $TOPDIR/OBSPRODUCT" - abuild < /dev/null 
&& BUILD_SUCCEEDED=true
+}
+
+recipe_resultdirs_obsproduct() {
+    echo OBSPRODUCT
+}
+
+recipe_cleanup_obsproduct() {
+    :
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/configs/debian12.conf 
new/obs-build-20231120/configs/debian12.conf
--- old/obs-build-20231027/configs/debian12.conf        1970-01-01 
01:00:00.000000000 +0100
+++ new/obs-build-20231120/configs/debian12.conf        2023-11-20 
08:58:08.000000000 +0100
@@ -0,0 +1,242 @@
+
+Repotype: debian
+
+# create initial user
+Preinstall: base-passwd
+Preinstall: user-setup
+
+# required for preinstall images
+Preinstall: perl
+
+ExpandFlags: preinstallexpand
+Preinstall: init-system-helpers debianutils dpkg libc-bin dash coreutils 
diffutils
+Preinstall: sed gawk grep gzip debconf bash base-files base-passwd libsystemd0 
xz-utils
+Preinstall: findutils util-linux
+
+Runscripts: base-passwd user-setup base-files gawk
+
+#VMinstall: libdevmapper1.02.1
+VMinstall: binutils libblkid1 libuuid1 mount libmount1 libsmartcols1
+
+%ifarch armv7l armv7hl
+%if "0%{?_obs_feature_exclude_cpu_constraints}"
+#Constraint: hardware:cpu:flag exclude=true EL0
+VMInstall: kernel-obs-build
+%endif
+%endif
+
+
+Order: user-setup:base-files
+
+# Essential packages (this should also pull the dependencies)
+Support: base-files base-passwd bash bsdutils coreutils dash debianutils
+Support: diffutils dpkg e2fsprogs findutils grep gzip hostname libc-bin
+Support: login mount ncurses-base ncurses-bin perl-base sed init-system-helpers
+Support: sysvinit-utils tar util-linux
+
+# for unpacking sources in build script
+Support: cpio
+
+# Build-essentials
+Required: build-essential
+Prefer: build-essential:make
+
+# build script needs fakeroot
+Support: fakeroot
+# lintian support would be nice, but breaks too much atm
+#Support: lintian
+
+# helper tools in the chroot
+Support: less kmod net-tools procps psmisc strace vim
+
+# Workaround/Hack, it is declared as dummy package
+Prefer: -libfontconfig1-dev
+
+Prefer: -lsb-base
+# everything below same as for Debian:6.0 (apart from the version macros ofc)
+
+# circular dependendencies in openjdk stack
+Order: openjdk-6-jre-lib:openjdk-6-jre-headless
+Order: openjdk-6-jre-headless:ca-certificates-java
+
+Keep: binutils cpp cracklib file findutils gawk gcc gcc-ada gcc-c++
+Keep: gzip libada libstdc++ libunwind
+Keep: libunwind-devel libzio make mktemp pam-devel pam-modules
+Keep: patch perl rcs timezone
+
+Prefer: cvs libesd0 libfam0 libfam-dev expect
+Prefer: -bzr # in favor to brz
+Prefer: -libelogind0
+
+Prefer: gawk locales default-jdk
+Prefer: xorg-x11-libs libpng fam mozilla mozilla-nss xorg-x11-Mesa
+Prefer: unixODBC libsoup glitz java-1_4_2-sun gnome-panel
+Prefer: desktop-data-SuSE gnome2-SuSE mono-nunit gecko-sharp2
+Prefer: apache2-prefork openmotif-libs ghostscript-mini gtk-sharp
+Prefer: glib-sharp libzypp-zmd-backend mDNSResponder libcom-err2
+
+Prefer: -libgcc-mainline -libstdc++-mainline -gcc-mainline-c++
+Prefer: -libgcj-mainline -viewperf -compat -compat-openssl097g
+Prefer: -zmd -OpenOffice_org -pam-laus -libgcc-tree-ssa -busybox-links
+Prefer: -crossover-office -libgnutls11-dev
+
+# alternative pkg-config implementation
+Prefer: -pkgconf
+Prefer: -openrc
+Prefer: -file-rc
+
+Prefer: devscripts:fakeroot
+Prefer: bsdutils:libsystemd0
+
+Conflict: ghostscript-library:ghostscript-mini
+
+#Ignore: sysvinit:initscripts
+
+Ignore: 
aaa_base:aaa_skel,suse-release,logrotate,ash,mingetty,distribution-release
+Ignore: gettext-devel:libgcj,libstdc++-devel
+Ignore: pwdutils:openslp
+Ignore: pam-modules:resmgr
+Ignore: rpm:suse-build-key,build-key
+Ignore: bind-utils:bind-libs
+Ignore: alsa:dialog,pciutils
+Ignore: portmap:syslogd
+Ignore: fontconfig:freetype2
+Ignore: fontconfig-devel:freetype2-devel
+Ignore: xorg-x11-libs:freetype2
+Ignore: 
xorg-x11:x11-tools,resmgr,xkeyboard-config,xorg-x11-Mesa,libusb,freetype2,libjpeg,libpng
+Ignore: apache2:logrotate
+Ignore: arts:alsa,audiofile,resmgr,libogg,libvorbis
+Ignore: 
kdelibs3:alsa,arts,pcre,OpenEXR,aspell,cups-libs,mDNSResponder,krb5,libjasper
+Ignore: kdelibs3-devel:libvorbis-devel
+Ignore: 
kdebase3:kdebase3-ksysguardd,OpenEXR,dbus-1,dbus-1-qt,hal,powersave,openslp,libusb
+Ignore: kdebase3-SuSE:release-notes
+Ignore: jack:alsa,libsndfile
+Ignore: libxml2-devel:readline-devel
+Ignore: 
gnome-vfs2:gnome-mime-data,desktop-file-utils,cdparanoia,dbus-1,dbus-1-glib,krb5,hal,libsmbclient,fam,file_alteration
+Ignore: libgda:file_alteration
+Ignore: gnutls:lzo,libopencdk
+Ignore: gnutls-devel:lzo-devel,libopencdk-devel
+Ignore: pango:cairo,glitz,libpixman,libpng
+Ignore: pango-devel:cairo-devel
+Ignore: cairo-devel:libpixman-devel
+Ignore: libgnomeprint:libgnomecups
+Ignore: libgnomeprintui:libgnomecups
+Ignore: orbit2:libidl
+Ignore: orbit2-devel:libidl,libidl-devel,indent
+Ignore: qt3:libmng
+Ignore: qt-sql:qt_database_plugin
+Ignore: gtk2:libpng,libtiff
+Ignore: libgnomecanvas-devel:glib-devel
+Ignore: libgnomeui:gnome-icon-theme,shared-mime-info
+Ignore: scrollkeeper:docbook_4,sgml-skel
+Ignore: gnome-desktop:libgnomesu,startup-notification
+Ignore: python-devel:python-tk
+Ignore: gnome-pilot:gnome-panel
+Ignore: gnome-panel:control-center2
+Ignore: gnome-menus:kdebase3
+Ignore: gnome-main-menu:rug
+Ignore: libbonoboui:gnome-desktop
+Ignore: postfix:pcre
+Ignore: docbook_4:iso_ent,sgml-skel,xmlcharent
+Ignore: 
control-center2:nautilus,evolution-data-server,gnome-menus,gstreamer-plugins,gstreamer,metacity,mozilla-nspr,mozilla,libxklavier,gnome-desktop,startup-notification
+Ignore: docbook-xsl-stylesheets:xmlcharent
+Ignore: liby2util-devel:libstdc++-devel,openssl-devel
+Ignore: 
yast2:yast2-ncurses,yast2-theme-SuSELinux,perl-Config-Crontab,yast2-xml,SuSEfirewall2
+Ignore: yast2-core:netcat,hwinfo,wireless-tools,sysfsutils
+Ignore: 
yast2-core-devel:libxcrypt-devel,hwinfo-devel,blocxx-devel,sysfsutils,libstdc++-devel
+Ignore: yast2-packagemanager-devel:rpm-devel,curl-devel,openssl-devel
+Ignore: yast2-devtools:perl-XML-Writer,libxslt,pkgconfig
+Ignore: 
yast2-installation:yast2-update,yast2-mouse,yast2-country,yast2-bootloader,yast2-packager,yast2-network,yast2-online-update,yast2-users,release-notes,autoyast2-installation
+Ignore: yast2-bootloader:bootloader-theme
+Ignore: yast2-packager:yast2-x11
+Ignore: yast2-x11:sax2-libsax-perl
+Ignore: openslp-devel:openssl-devel
+Ignore: java-1_4_2-sun:xorg-x11-libs
+Ignore: java-1_4_2-sun-devel:xorg-x11-libs
+Ignore: kernel-um:xorg-x11-libs
+Ignore: 
tetex:xorg-x11-libs,expat,fontconfig,freetype2,libjpeg,libpng,ghostscript-x11,xaw3d,gd,dialog,ed
+Ignore: yast2-country:yast2-trans-stats
+Ignore: susehelp:susehelp_lang,suse_help_viewer
+Ignore: mailx:smtp_daemon
+Ignore: cron:smtp_daemon
+Ignore: hotplug:syslog
+Ignore: pcmcia:syslog
+Ignore: avalon-logkit:servlet
+Ignore: jython:servlet
+Ignore: ispell:ispell_dictionary,ispell_english_dictionary
+Ignore: aspell:aspel_dictionary,aspell_dictionary
+Ignore: smartlink-softmodem:kernel,kernel-nongpl
+Ignore: OpenOffice_org-de:myspell-german-dictionary
+Ignore: mediawiki:php-session,php-gettext,php-zlib,php-mysql,mod_php_any
+Ignore: 
squirrelmail:mod_php_any,php-session,php-gettext,php-iconv,php-mbstring,php-openssl
+
+Ignore: simias:mono(log4net)
+Ignore: zmd:mono(log4net)
+Ignore: 
horde:mod_php_any,php-gettext,php-mcrypt,php-imap,php-pear-log,php-pear,php-session,php
+Ignore: xerces-j2:xml-commons-apis,xml-commons-resolver
+Ignore: xdg-menu:desktop-data
+Ignore: nessus-libraries:nessus-core
+Ignore: evolution:yelp
+Ignore: 
mono-tools:mono(gconf-sharp),mono(glade-sharp),mono(gnome-sharp),mono(gtkhtml-sharp),mono(atk-sharp),mono(gdk-sharp),mono(glib-sharp),mono(gtk-sharp),mono(pango-sharp)
+Ignore: gecko-sharp2:mono(glib-sharp),mono(gtk-sharp)
+Ignore: 
vcdimager:libcdio.so.6,libcdio.so.6(CDIO_6),libiso9660.so.4,libiso9660.so.4(ISO9660_4)
+Ignore: libcdio:libcddb.so.2
+Ignore: gnome-libs:libgnomeui
+Ignore: nautilus:gnome-themes
+Ignore: gnome-panel:gnome-themes
+Ignore: gnome-panel:tomboy
+
+Substitute: utempter
+
+%ifnarch s390 s390x ppc ia64
+Substitute: java2-devel-packages java-1_4_2-sun-devel
+%else
+ %ifnarch s390x
+Substitute: java2-devel-packages java-1_4_2-ibm-devel
+ %else
+Substitute: java2-devel-packages java-1_4_2-ibm-devel xorg-x11-libs-32bit
+ %endif
+%endif
+
+Substitute: yast2-devel-packages docbook-xsl-stylesheets doxygen libxslt 
perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-devtools 
yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite
+
+#
+# SUSE compat mappings
+#
+Substitute: gcc-c++ gcc
+Substitute: libsigc++2-devel libsigc++-2.0-dev
+Substitute: glibc-devel-32bit
+Substitute: pkgconfig pkg-config
+
+
+
+%ifarch %ix86
+Substitute: kernel-binary-packages kernel-default kernel-smp kernel-bigsmp 
kernel-debug kernel-um kernel-xen kernel-kdump
+%endif
+%ifarch ia64
+Substitute: kernel-binary-packages kernel-default kernel-debug
+%endif
+%ifarch x86_64
+Substitute: kernel-binary-packages kernel-default kernel-smp kernel-xen 
kernel-kdump
+%endif
+%ifarch ppc
+Substitute: kernel-binary-packages kernel-default kernel-kdump kernel-ppc64 
kernel-iseries64
+%endif
+%ifarch ppc64
+Substitute: kernel-binary-packages kernel-ppc64 kernel-iseries64
+%endif
+%ifarch s390
+Substitute: kernel-binary-packages kernel-s390
+%endif
+%ifarch s390x
+Substitute: kernel-binary-packages kernel-default
+%endif
+
+%define debian 12
+%define debian_version 1200
+
+RepoURL: debian@http://ftp.de.debian.org/debian/bookworm/main
+
+Macros:
+%debian 12
+%debian_version 1200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/configs/sles15sp5.conf 
new/obs-build-20231120/configs/sles15sp5.conf
--- old/obs-build-20231027/configs/sles15sp5.conf       2023-10-27 
10:34:38.000000000 +0200
+++ new/obs-build-20231120/configs/sles15sp5.conf       2023-11-20 
08:58:08.000000000 +0100
@@ -109,14 +109,6 @@
 Support: brp-check-suse post-build-checks rpmlint-Factory
 # Add hostname so that OBS/build will have a chance to identify the hostname 
(instead of localhost)
 Support: hostname
-# remove build-compare support to disable "same result" package dropping
-# (coolo) removed to get fresh build times Support: build-compare
-# Extracting appdata.xml from desktop files
-Support: brp-extract-appdata
-# Translations
-Support: brp-extract-translations
-# enforce valid license
-Support: rpmlint-Factory-strict
 
 # testing deltas (only for O:F for now!)
 #Support: build-mkdrpms deltarpm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/createrepomddeps 
new/obs-build-20231120/createrepomddeps
--- old/obs-build-20231027/createrepomddeps     2023-10-27 10:34:38.000000000 
+0200
+++ new/obs-build-20231120/createrepomddeps     2023-11-20 08:58:08.000000000 
+0100
@@ -123,6 +123,9 @@
       use IO::Uncompress::Gunzip qw($GunzipError);
       $fh = new IO::Uncompress::Gunzip $fh or die "Error opening $u: 
$GunzipError\n";
     }
+    if ($u =~ /\.zst$/) {
+      open ($fh, "-|", "zstd", "-dc", "$dir/repodata/$u");
+    }
     my $parsefn;
     if ($opts->{'dump'}) {
       $parsefn = sub {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/dist/build.changes 
new/obs-build-20231120/dist/build.changes
--- old/obs-build-20231027/dist/build.changes   2023-10-27 10:34:38.000000000 
+0200
+++ new/obs-build-20231120/dist/build.changes   2023-11-20 08:58:08.000000000 
+0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Nov  3 10:03:35 UTC 2023 - Adrian Schröter <adr...@suse.de>
+
+- fix SLE 15 SP5 build configuration
+- Improve user agent handling for obs repositories
+
+-------------------------------------------------------------------
 Fri Oct 27 08:29:31 UTC 2023 - Adrian Schröter <adr...@suse.de>
 
 - Docker:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/docs/build_config.adoc 
new/obs-build-20231120/docs/build_config.adoc
--- old/obs-build-20231027/docs/build_config.adoc       2023-10-27 
10:34:38.000000000 +0200
+++ new/obs-build-20231120/docs/build_config.adoc       2023-11-20 
08:58:08.000000000 +0100
@@ -395,7 +395,7 @@
 Build recipe type. This is the format of the file which provides the
 build description. This gets usually autodetected, but in some rare
 cases it can be set here to either one of these: spec, dsc, kiwi,
-livebuild, arch, preinstallimage.
+livebuild, arch, preinstallimage, obsproduct.
 
 Defines the build recipe format. Valid values are currently: none, spec,
 dsc, arch, kiwi, preinstallimage. If no type is specified, OBS deduces a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/expanddeps 
new/obs-build-20231120/expanddeps
--- old/obs-build-20231027/expanddeps   2023-10-27 10:34:38.000000000 +0200
+++ new/obs-build-20231120/expanddeps   2023-11-20 08:58:08.000000000 +0100
@@ -382,7 +382,7 @@
 
 my @sysdeps = Build::get_sysbuild($cf, $buildtype, $extrasysdeps);
 
-if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product') {
+if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product' || $buildtype 
eq 'obsproduct') {
   if (!shift @sysdeps) {
     print STDERR "expansion error\n";
     print STDERR "  $_\n" for @sysdeps;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20231027/generate_sbom 
new/obs-build-20231120/generate_sbom
--- old/obs-build-20231027/generate_sbom        2023-10-27 10:34:38.000000000 
+0200
+++ new/obs-build-20231120/generate_sbom        2023-11-20 08:58:08.000000000 
+0100
@@ -173,9 +173,9 @@
         } else {
           system_chroot($root, 'stdout', $outfile, '/usr/bin/rpmdb', 
'--exportdb');
         }
+        exit($?) if $?;
+        return;
       }
-      exit($?) if $?;
-      return;
     }
     # try to get the dbpath from the root if we can
     if (!$dbpath && can_run($root, '/usr/bin/rpm')) {

Reply via email to