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-03-02 23:02:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build" Thu Mar 2 23:02:47 2023 rev:150 rq:1068160 version:20230228 Changes: -------- --- /work/SRC/openSUSE:Factory/build/build.changes 2023-02-16 21:09:54.088241696 +0100 +++ /work/SRC/openSUSE:Factory/.build.new.31432/build.changes 2023-03-02 23:03:11.623262661 +0100 @@ -2 +2,16 @@ -Wed Feb 15 12:35:03 UTC 2023 - Adrian Schröter <adr...@suse.de> +Tue Feb 28 11:00:54 UTC 2023 - Adrian Schröter <adr...@suse.de> + +- Dockerfile support: + * export multibuild flavor as argument + * allow parameters in FROM .. scratch lines + * include OS name in build result if != linux +- Workaround directory->symlink usrmerge problems for cross arch sysroot +- multiple fixes for SBOM support + +------------------------------------------------------------------- +Wed Feb 15 14:23:09 UTC 2023 - Adrian Schröter <adr...@suse.de> + +- KIWI VM image SBOM support added + +------------------------------------------------------------------- +Wed Feb 15 07:41:28 UTC 2023 - Adrian Schröter <adr...@suse.de> @@ -4 +18,0 @@ -- Support SBOM generation for KIWI VM images Old: ---- obs-build-20230215.tar.gz New: ---- obs-build-20230228.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.EMbVcz/_old 2023-03-02 23:03:12.347273011 +0100 +++ /var/tmp/diff_new_pack.EMbVcz/_new 2023-03-02 23:03:12.355273125 +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: 20230215 +Version: 20230228 Release: 0 Source: obs-build-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.EMbVcz/_old 2023-03-02 23:03:12.403273811 +0100 +++ /var/tmp/diff_new_pack.EMbVcz/_new 2023-03-02 23:03:12.407273868 +0100 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20230215 +pkgver=20230228 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') ++++++ _service ++++++ --- /var/tmp/diff_new_pack.EMbVcz/_old 2023-03-02 23:03:12.431274211 +0100 +++ /var/tmp/diff_new_pack.EMbVcz/_new 2023-03-02 23:03:12.435274269 +0100 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="manual"> - <param name="revision">20230215</param> - <param name="version">20230215</param> + <param name="revision">20230228</param> + <param name="version">20230228</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.EMbVcz/_old 2023-03-02 23:03:12.459274611 +0100 +++ /var/tmp/diff_new_pack.EMbVcz/_new 2023-03-02 23:03:12.463274669 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20230215 +Version: 20230228 Binary: build Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: all ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.EMbVcz/_old 2023-03-02 23:03:12.495275126 +0100 +++ /var/tmp/diff_new_pack.EMbVcz/_new 2023-03-02 23:03:12.499275183 +0100 @@ -1,4 +1,4 @@ -build (20230215) unstable; urgency=low +build (20230228) unstable; urgency=low * Update to current git trunk - add sles11sp2 build config and adapt autodetection ++++++ obs-build-20230215.tar.gz -> obs-build-20230228.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/build-pkg-rpm new/obs-build-20230228/build-pkg-rpm --- old/obs-build-20230215/build-pkg-rpm 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/build-pkg-rpm 2023-02-28 12:03:21.000000000 +0100 @@ -132,7 +132,14 @@ } pkg_sysrootinstall_rpm() { + local TEMP_BUILD_SYSROOT="${BUILD_SYSROOT}.hostsystem.temp" if test "x$1" = "x--prepare" ; then + if test -d "$BUILD_ROOT$BUILD_SYSROOT" -a ! -d "$BUILD_ROOT$TEMP_BUILD_SYSROOT"; then + # The host system may already provide files for the sysroot target + # rpm is not able to handle directory to symlink conversation, so + # we need to move it away first and copy it back later. + mv "$BUILD_ROOT$BUILD_SYSROOT" "$BUILD_ROOT$TEMP_BUILD_SYSROOT" + fi assert_dir_path "$BUILD_SYSROOT" chroot $BUILD_ROOT mkdir -p "$BUILD_SYSROOT" chroot $BUILD_ROOT rpm --root "$BUILD_SYSROOT" --initdb @@ -141,6 +148,18 @@ return fi if test "x$1" = "x--finalize" ; then + if test -d "$BUILD_ROOT$TEMP_BUILD_SYSROOT"; then + # copy back the files provided by the host system + # a simple "cp -a" is not working as some directories + # may be symlinks now + pushd "$BUILD_ROOT$TEMP_BUILD_SYSROOT" + find . -type f | while read fn; do + mkdir -p "$BUILD_ROOT$BUILD_SYSROOT/${fn%/*}" + cp -an "$fn" "$BUILD_ROOT$BUILD_SYSROOT/$fn" + done + popd + rm -rf "$BUILD_ROOT$TEMP_BUILD_SYSROOT" + fi return fi export ADDITIONAL_PARAMS= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/build-recipe-docker new/obs-build-20230228/build-recipe-docker --- old/obs-build-20230215/build-recipe-docker 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/build-recipe-docker 2023-02-28 12:03:21.000000000 +0100 @@ -229,6 +229,11 @@ esac done < <( queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ dockerarg ) + if test -n "$BUILD_FLAVOR" ; then + buildargs[${#buildargs[@]}]='--build-arg' + buildargs[${#buildargs[@]}]="BUILD_FLAVOR=$BUILD_FLAVOR" + fi + # patch in obs-docker-support helper patchdockerfile < "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE" > "$BUILD_ROOT/$TOPDIR/SOURCES/.$RECIPEFILE" && \ mv "$BUILD_ROOT/$TOPDIR/SOURCES/.$RECIPEFILE" "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE" @@ -261,10 +266,14 @@ return fi + # Check for OS setting + GOOS=`$DOCKER_CMD image inspect "$FIRSTTAG" --format '{{ .Os }}'` + # Save the resulting image to a tarball. Use first tag for generating the file name. mkdir -p $BUILD_ROOT$TOPDIR/DOCKER FILENAME="$FIRSTTAG" FILENAME="${FILENAME//[\/:]/-}" + test -n "$GOOS" -a "$GOOS" != "linux" && FILENAME="${FILENAME}_$GOOS" FILENAME="$FILENAME.${BUILD_ARCH%%:*}" test -n "$RELEASE" && FILENAME="$FILENAME-$RELEASE" echo "Saving image $FIRSTTAG to $FILENAME.tar" @@ -288,10 +297,10 @@ rm -rf "$BUILD_ROOT/$TOPDIR/SOURCES/repos/UPLOAD" # create sbom if requested - for format in $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ sbom) ; do + for format in $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ sbom | sort -u) ; do echo "Generating $format sbom file" - generate_sbom --format "$format" "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.tar" > "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.$format.json" - test -s "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.$format.json" || rm -f "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.$format.json" + generate_sbom --format "$format" "$TOPDIR/DOCKER/$FILENAME.tar" > "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.${format/cyclonedx/cdx}.json" + test -s "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.${format/cyclonedx/cdx}.json" || rm -f "$BUILD_ROOT$TOPDIR/DOCKER/$FILENAME.${format/cyclonedx/cdx}.json" done # We're done. Clean up. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/build-recipe-kiwi new/obs-build-20230228/build-recipe-kiwi --- old/obs-build-20230215/build-recipe-kiwi 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/build-recipe-kiwi 2023-02-28 12:03:21.000000000 +0100 @@ -356,8 +356,7 @@ fi mv "$i" $BUILD_ROOT/$TOPDIR/KIWI/. test -n "$milestone" && echo "$milestone" > $BUILD_ROOT/$TOPDIR/OTHER/${i%.iso}.milestone ;; - *.packages) mv $i $BUILD_ROOT/$TOPDIR/OTHER/. ;; - *.sbom.json) mv $i $BUILD_ROOT/$TOPDIR/OTHER/. ;; + *.packages|*.spdx.json|*.cdx.json) mv $i $BUILD_ROOT/$TOPDIR/OTHER/. ;; *.report) mv $i $BUILD_ROOT/$TOPDIR/OTHER/. test -n "$milestone" && echo "$milestone" > $BUILD_ROOT/$TOPDIR/OTHER/${i%.report}.milestone @@ -511,8 +510,23 @@ bundle_call="$bundle_call --bundle-dir /$TOPDIR/KIWI.bundle/" bundle_call="$bundle_call $KIWI_BUNDLE_PARAMETERS" fi + echo "$bundle_call" if chroot $BUILD_ROOT su -c "$bundle_call" - root < /dev/null; then + # Hook for creating SBOM data + if test "$imgtype" != docker; then # done in postprocess_kiwi_containers + for format in $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ sbom | sort -u) ; do + echo "Generating $format sbom file for KIWIROOT-$imgtype" + if ! generate_sbom --format "$format" --dir "$BUILD_ROOT/$TOPDIR/KIWIROOT-$imgtype" > "$BUILD_ROOT/$TOPDIR/OTHER/kiwi-sbom.json" ; then + cleanup_and_exit 1 "generate_sbom script failed!" + fi + for packages in "$BUILD_ROOT/$TOPDIR/KIWI.bundle/"*.packages; do + cp "$BUILD_ROOT/$TOPDIR/OTHER/kiwi-sbom.json" "${packages%.packages}.${format/cyclonedx/cdx}.json" + done + rm "$BUILD_ROOT/$TOPDIR/OTHER/kiwi-sbom.json" + done + fi + mv "$BUILD_ROOT/$TOPDIR/KIWI.bundle/"* "$BUILD_ROOT/$TOPDIR/KIWI/" || cleanup_and_exit 1 rmdir "$BUILD_ROOT/$TOPDIR/KIWI.bundle" return 0 # success @@ -696,10 +710,10 @@ test -e "$r" && perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::showcontainerinfo -- "${args[@]}" $BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE "$r" > "${r%.tar}.containerinfo" if test -s "${r%.tar}.containerinfo" ; then # create sbom if requested - for format in $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ sbom) ; do + for format in $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ sbom | sort -u) ; do echo "Generating $format sbom file for ${r##*/}" - generate_sbom --format "$format" "$r" > "${r%.tar}.$format.json" - test -s "${r%.tar}.$format.json" || rm -f "${r%.tar}.$format.json" + generate_sbom --format "$format" "$r" > "${r%.tar}.${format/cyclonedx/cdx}.json" + test -s "${r%.tar}.${format/cyclonedx/cdx}.json" || rm -f "${r%.tar}.${format/cyclonedx/cdx}.json" done else rm -f "${r%.tar}.containerinfo" @@ -894,13 +908,6 @@ build_kiwi_appliance fi - # Hook for creating SBOM data - for format in $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ sbom) ; do - if ! chroot $BUILD_ROOT su -c "/.build/generate_sbom --format $format --dir $BUILD_ROOT/$TOPDIR/KIWIROOT-$imgtype > $BUILD_ROOT/$TOPDIR/OTHER/kiwi-$imgtype.${format}.json" ; then - cleanup_and_exit 1 "/usr/lib/build/generate_sbom script failed!" - fi - done - # Hook for running post kiwi build scripts like QA scripts if installed if test -x $BUILD_ROOT/usr/lib/build/kiwi_post_run ; then if ! chroot $BUILD_ROOT su -c /usr/lib/build/kiwi_post_run ; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/build-vm-qemu new/obs-build-20230228/build-vm-qemu --- old/obs-build-20230215/build-vm-qemu 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/build-vm-qemu 2023-02-28 12:03:21.000000000 +0100 @@ -189,6 +189,11 @@ if test -n "$VM_CUSTOMOPT"; then qemu_options="$qemu_options $VM_CUSTOMOPT" fi + if ! test -e "$vm_kernel"; then + echo "ERROR: No kernel image for the target architecture available!" + echo " You may want to use vmtype=kvm instead if you do not want to emulate a foreign architecture." + cleanup_and_exit 1 + fi set -- $qemu_bin -nodefaults -no-reboot -nographic -vga none $qemu_cpu $qemu_options \ -kernel $vm_kernel \ -initrd $vm_initrd \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/call-podman new/obs-build-20230228/call-podman --- old/obs-build-20230215/call-podman 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/call-podman 2023-02-28 12:03:21.000000000 +0100 @@ -34,7 +34,7 @@ done if test -z "$IS_UNSHARED" ; then - echo "Unsharing environment" + echo "Unsharing environment" >&2 # unshare mounts and network exec unshare -m -n $BUILD_DIR/call-podman --isunshared --root "$BUILD_ROOT" "$@" cleanup_and_exit 1 "exec unshare returned" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/dist/PKGBUILD new/obs-build-20230228/dist/PKGBUILD --- old/obs-build-20230215/dist/PKGBUILD 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/dist/PKGBUILD 2023-02-28 12:03:21.000000000 +0100 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20200110 +pkgver=20230215 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/dist/build.changes new/obs-build-20230228/dist/build.changes --- old/obs-build-20230215/dist/build.changes 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/dist/build.changes 2023-02-28 12:03:21.000000000 +0100 @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Tue Feb 28 11:00:54 UTC 2023 - Adrian Schröter <adr...@suse.de> + +- Dockerfile support: + * export multibuild flavor as argument + * allow parameters in FROM .. scratch lines + * include OS name in build result if != linux +- Workaround directory->symlink usrmerge problems for cross arch sysroot +- multiple fixes for SBOM support + +------------------------------------------------------------------- +Wed Feb 15 14:23:09 UTC 2023 - Adrian Schröter <adr...@suse.de> + +- KIWI VM image SBOM support added + +------------------------------------------------------------------- Wed Feb 15 07:41:28 UTC 2023 - Adrian Schröter <adr...@suse.de> - CycloneDX SBOM support added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/dist/build.dsc new/obs-build-20230228/dist/build.dsc --- old/obs-build-20230215/dist/build.dsc 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/dist/build.dsc 2023-02-28 12:03:21.000000000 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20220927 +Version: 20230215 Binary: build Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20230215/patchdockerfile new/obs-build-20230228/patchdockerfile --- old/obs-build-20230215/patchdockerfile 2023-02-15 13:29:25.000000000 +0100 +++ new/obs-build-20230228/patchdockerfile 2023-02-28 12:03:21.000000000 +0100 @@ -39,7 +39,7 @@ for my $s (@sections) { # cannot use docker support for scratch images - if (@$s && $s->[0] =~ /^\s*[fF][rR][oO][mM]\s+scratch[\s\n]/) { + if (@$s && $s->[0] =~ /^\s*[fF][rR][oO][mM]\s+(--.*\s+)?scratch[\s\n]/) { print join('', @$s); next; }