Hello community, here is the log from the commit of package build for openSUSE:Factory checked in at 2019-01-29 14:39:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build" Tue Jan 29 14:39:02 2019 rev:120 rq:667754 version:20190122 Changes: -------- --- /work/SRC/openSUSE:Factory/build/build.changes 2018-12-19 13:23:08.357402183 +0100 +++ /work/SRC/openSUSE:Factory/.build.new.28833/build.changes 2019-01-29 14:39:04.883503199 +0100 @@ -1,0 +2,8 @@ +Mon Jan 21 12:00:48 UTC 2019 - Adrian Schröter <adr...@suse.de> + +- update factory config for libreadline8 switch +- cleanup 15.1 config with OBS specific stuff + * should not be used for plain build usage + * workarounds for kiwi should be fixed in packages + +------------------------------------------------------------------- Old: ---- obs-build-20181206.tar.gz New: ---- obs-build-20190122.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.nuvqbr/_old 2019-01-29 14:39:05.923501931 +0100 +++ /var/tmp/diff_new_pack.nuvqbr/_new 2019-01-29 14:39:05.927501925 +0100 @@ -1,7 +1,7 @@ # # spec file for package build # -# 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 @@ -22,7 +22,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0-or-later AND GPL-2.0-only Group: Development/Tools/Building -Version: 20181206 +Version: 20190122 Release: 0 Source: obs-build-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -61,6 +61,7 @@ Recommends: perl(YAML::LibYAML) Recommends: bsdtar Recommends: qemu-linux-user +Recommends: /usr/bin/qemu-kvm Recommends: /sbin/mkfs.ext3 %endif @@ -190,6 +191,7 @@ %endif %check +for i in build build-* ; do bash -n $i || exit 1 ; done if [ `whoami` != "root" ]; then echo "WARNING: Not building as root, tests did not run!" exit 0 @@ -230,7 +232,7 @@ %config(noreplace) /usr/lib/build/emulator/emulator.sh %{_mandir}/man1/build.1* %{_mandir}/man1/unrpm.1* -%{_mandir}/man1/vc.1* +%{_mandir}/man1/buildvc.1* %if 0%{?suse_version} %exclude /usr/lib/build/initvm.* %endif ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.nuvqbr/_old 2019-01-29 14:39:05.967501877 +0100 +++ /var/tmp/diff_new_pack.nuvqbr/_new 2019-01-29 14:39:05.967501877 +0100 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20181206 +pkgver=20190122 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') ++++++ build.dsc ++++++ --- /var/tmp/diff_new_pack.nuvqbr/_old 2019-01-29 14:39:06.007501828 +0100 +++ /var/tmp/diff_new_pack.nuvqbr/_new 2019-01-29 14:39:06.007501828 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20181206 +Version: 20190122 Binary: build Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: all ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.nuvqbr/_old 2019-01-29 14:39:06.031501798 +0100 +++ /var/tmp/diff_new_pack.nuvqbr/_new 2019-01-29 14:39:06.031501798 +0100 @@ -1,4 +1,4 @@ -build (20181206) unstable; urgency=low +build (20190122) unstable; urgency=low * Update to current git trunk - add sles11sp2 build config and adapt autodetection ++++++ obs-build-20181206.tar.gz -> obs-build-20190122.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/Build/Docker.pm new/obs-build-20190122/Build/Docker.pm --- old/obs-build-20181206/Build/Docker.pm 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/Build/Docker.pm 2019-01-22 11:27:58.000000000 +0100 @@ -140,6 +140,7 @@ my $basecontainer; my $unorderedrepos; my $useobsrepositories; + my $nosquash; my $dockerfile_data = slurp($fn); return { 'error' => 'could not open Dockerfile' } unless defined $dockerfile_data; @@ -168,6 +169,9 @@ if ($line =~ /^#!UseOBSRepositories\s*$/) { $useobsrepositories = 1; } + if ($line =~ /^#!NoSquash\s*$/) { + $nosquash = 1; + } next; } # add continuation lines @@ -195,7 +199,7 @@ @args = split(/[ \t]+/, $line); s/%([a-fA-F0-9]{2})/chr(hex($1))/ge for @args; if ($cmd eq 'FROM') { - if (@args && !$basecontainer) { + if (@args && !$basecontainer && $args[0] ne 'scratch') { $basecontainer = $args[0]; $basecontainer .= ':latest' unless $basecontainer =~ /:[^:\/]+$/; } @@ -229,6 +233,8 @@ s/<RELEASE>/$release/g if defined $release; } $ret->{'path'} = [ { 'project' => '_obsrepositories', 'repository' => '' } ] if $useobsrepositories; + $ret->{'basecontainer'} = $basecontainer if $basecontainer; + $ret->{'nosquash'} = 1 if $nosquash; return $ret; } @@ -286,7 +292,7 @@ print Build::SimpleJSON::unparse($containerinfo)."\n"; } -sub showtags { +sub show { my ($release); while (@ARGV) { if (@ARGV > 2 && $ARGV[0] eq '--release') { @@ -295,14 +301,16 @@ last; } } - my ($fn) = @ARGV; + my ($fn, $field) = @ARGV; local $Build::Kiwi::urlmapper = sub { return $_[0] }; my $cf = {}; $cf->{'buildrelease'} = $release if defined $release; my $d = {}; $d = parse($cf, $fn) if $fn; die("$d->{'error'}\n") if $d->{'error'}; - print "$_\n" for @{$d->{'containertags'} || []}; + my $x = $d->{$field}; + $x = [ $x ] unless ref $x; + print "@$x\n"; } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/Build.pm new/obs-build-20190122/Build.pm --- old/obs-build-20181206/Build.pm 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/Build.pm 2019-01-22 11:27:58.000000000 +0100 @@ -1282,6 +1282,7 @@ my $requires = $config->{'requiresh'}; my $xignore = { map {substr($_, 1) => 1} grep {/^-/} @p }; + $ignoreconflicts = 1 if $xignore->{'-ignoreconflicts--'}; $ignore = {} if $xignore->{'-ignoreignore--'}; if ($ignoreignore) { $xignore = {}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/Makefile new/obs-build-20190122/Makefile --- old/obs-build-20181206/Makefile 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/Makefile 2019-01-22 11:27:58.000000000 +0100 @@ -76,6 +76,7 @@ dummyhttpserver \ obs-docker-support \ create_container_package_list \ + call-podman \ $(DESTDIR)$(pkglibdir) install -m755 emulator/emulator.sh $(DESTDIR)$(pkglibdir)/emulator/ install -m644 Build/*.pm $(DESTDIR)$(pkglibdir)/Build @@ -87,7 +88,7 @@ install -m644 configs/* $(DESTDIR)$(pkglibdir)/configs install -m644 baselibs_configs/* $(DESTDIR)$(pkglibdir)/baselibs_configs install -m644 build.1 $(DESTDIR)$(man1dir) - install -m644 vc.1 $(DESTDIR)$(man1dir) + install -m644 buildvc.1 $(DESTDIR)$(man1dir) install -m644 unrpm.1 $(DESTDIR)$(man1dir) ln -sf $(pkglibdir)/build $(DESTDIR)$(bindir)/build ln -sf $(pkglibdir)/vc $(DESTDIR)$(bindir)/buildvc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/baselibs_configs/baselibs_global-sle15.conf new/obs-build-20190122/baselibs_configs/baselibs_global-sle15.conf --- old/obs-build-20181206/baselibs_configs/baselibs_global-sle15.conf 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/baselibs_configs/baselibs_global-sle15.conf 2019-01-22 11:27:58.000000000 +0100 @@ -42,5 +42,5 @@ package /(.*)-debuginfo$/ targetname <match1>-<targettype>-debuginfo -+/usr/lib(64|ilp32)?/debug/.*/lib(64|ilp32)?/.*\.(so\..*|so|o|a|la)\.debug$ -+/usr/lib(64|ilp32)?/debug/.build-id/.* ++/usr/lib/debug/(.*/)?lib(64|ilp32)?/.*\.(so\..*|so|o|a|la)(-.*-.*\..*)?\.debug$ ++/usr/lib/debug/\.build-id/.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/baselibs_configs/baselibs_global.conf new/obs-build-20190122/baselibs_configs/baselibs_global.conf --- old/obs-build-20181206/baselibs_configs/baselibs_global.conf 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/baselibs_configs/baselibs_global.conf 2019-01-22 11:27:58.000000000 +0100 @@ -42,5 +42,5 @@ package /(.*)-debuginfo$/ targetname <match1>-<targettype>-debuginfo -+/usr/lib(64|ilp32)?/debug/.*/lib(64|ilp32)?/.*\.(so\..*|so|o|a|la)\.debug$ -+/usr/lib(64|ilp32)?/debug/.build-id/.* ++/usr/lib/debug/(.*/)?lib(64|ilp32)?/.*\.(so\..*|so|o|a|la)(-.*-.*\..*)?\.debug$ ++/usr/lib/debug/\.build-id/.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/build new/obs-build-20190122/build --- old/obs-build-20181206/build 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/build 2019-01-22 11:27:58.000000000 +0100 @@ -1364,6 +1364,13 @@ setupicecream setupccache + if test -n "$RUN_SHELL" ; then + echo "You may want to initialize environment via:" + echo " su - $BUILD_USER" + chroot $BUILD_ROOT + cleanup_and_exit 0 + fi + # fill build directories with sources. Also sets TOPDIR recipe_setup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/build-recipe-docker new/obs-build-20190122/build-recipe-docker --- old/obs-build-20181206/build-recipe-docker 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/build-recipe-docker 2019-01-22 11:27:58.000000000 +0100 @@ -55,42 +55,49 @@ recipe_build_docker() { touch $BUILD_ROOT/etc/resolv.conf - base_image_path=$(find containers -regextype egrep -regex ".*\.(tgz|tar|tar\.xz|tar\.gz)$" -print -quit) - test -f "$base_image_path" || cleanup_and_exit 1 "base image not found" + base_image_path= + base_image_tag=$(grep "^\s*FROM" "$RECIPEFILE" | head -n 1 | cut -d" " -f2) - if test "$BUILDENGINE" = "podman"; then - DOCKER_TOOL="podman" - if ! $BUILD_DIR/startdockerd --root "$BUILD_ROOT" --webserver-only "$TOPDIR/SOURCES/repos" ; then - cleanup_and_exit 1 - fi + if test "$base_image_tag" != scratch ; then + base_image_path=$(find containers -regextype egrep -regex ".*\.(tgz|tar|tar\.xz|tar\.gz)$" -print -quit) + test -f "$base_image_path" || cleanup_and_exit 1 "base image not found" + fi + + if test "$BUILDENGINE" = podman; then + DOCKER_TOOL=podman else - DOCKER_TOOL="docker" + DOCKER_TOOL=docker if ! $BUILD_DIR/startdockerd --root "$BUILD_ROOT" --webserver "$TOPDIR/SOURCES/repos" ; then cleanup_and_exit 1 fi fi DOCKERD_STARTED=true - cp $BUILD_DIR/obs-docker-support "$BUILD_ROOT/$TOPDIR/SOURCES/.obs-docker-support" - chmod 755 "$BUILD_ROOT/$TOPDIR/SOURCES/.obs-docker-support" - - echo "Loading base image" - if test -L "$base_image_path" ; then - # copy into build root - cp -L "$base_image_path" "$base_image_path.lnk" - mv "$base_image_path.lnk" "$base_image_path" + if test "$DOCKER_TOOL" = podman; then + sed -e "s!^DATA_DIR=!DATA_DIR=$TOPDIR/SOURCES/repos!" <"$BUILD_DIR/obs-docker-support" >"$BUILD_ROOT/$TOPDIR/SOURCES/.obs-docker-support" + else + cp $BUILD_DIR/obs-docker-support "$BUILD_ROOT/$TOPDIR/SOURCES/.obs-docker-support" fi + chmod 755 "$BUILD_ROOT/$TOPDIR/SOURCES/.obs-docker-support" - # Inspect the content of the image to decide if this is a layered image - # or a filesystem one. We need to know if we will "docker load" it or - # "docker import" it. - if tar -tf $base_image_path | grep -q "^manifest.json" ; then - echo "Layered image found" - chroot $BUILD_ROOT $DOCKER_TOOL load --input $TOPDIR/SOURCES/$base_image_path - else - echo "Filesystem image found" - desired_tag=$(grep "^\s*FROM" "$RECIPEFILE" | head -n 1 | cut -d" " -f2) - chroot $BUILD_ROOT $DOCKER_TOOL import $TOPDIR/SOURCES/$base_image_path "$desired_tag" + if test -n "$base_image_path"; then + echo "Loading base image" + if test -L "$base_image_path" ; then + # copy into build root + cp -L "$base_image_path" "$base_image_path.lnk" + mv "$base_image_path.lnk" "$base_image_path" + fi + + # Inspect the content of the image to decide if this is a layered image + # or a filesystem one. We need to know if we will "docker load" it or + # "docker import" it. + if tar -tf $base_image_path | grep -q "^manifest.json" ; then + echo "Layered image found" + chroot $BUILD_ROOT $DOCKER_TOOL load --input $TOPDIR/SOURCES/$base_image_path + else + echo "Filesystem image found" + chroot $BUILD_ROOT $DOCKER_TOOL import $TOPDIR/SOURCES/$base_image_path "$base_image_tag" + fi fi # Prepare the package repository @@ -106,7 +113,7 @@ ALLTAGS= args=() test -n "$RELEASE" && args=("${args[@]}" --release "$RELEASE") - for t in $(perl -I$BUILD_DIR -MBuild::Docker -e Build::Docker::showtags "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE") ; do + for t in $(perl -I$BUILD_DIR -MBuild::Docker -e Build::Docker::show -- "${args[@]}" "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE" containertags) ; do test -n "$FIRSTTAG" || FIRSTTAG="$t" ALLTAGS="$ALLTAGS $t" done @@ -141,9 +148,23 @@ test -n "$DISTURL" && echo "LABEL org.openbuildservice.disturl=$DISTURL" >> "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE" # now do the build - echo "Building image $ALLTAGS" - if ! chroot $BUILD_ROOT $DOCKER_TOOL build --network=host "${tagargs[@]}" -f "$TOPDIR/SOURCES/$RECIPEFILE" $TOPDIR/SOURCES/ ; then - cleanup_and_exit 1 "Docker build command failed" + squashopt=--squash + if test "$DOCKER_TOOL" = podman -o -n "$(perl -I$BUILD_DIR -MBuild::Docker -e Build::Docker::show -- "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE" nosquash)" ; then + squashopt= + echo "Building image $ALLTAGS (nosquash)" + else + echo "Building image $ALLTAGS" + fi + + + if test "$DOCKER_TOOL" = podman ; then + if ! $BUILD_DIR/call-podman --root "$BUILD_ROOT" build $squashopt -v "$TOPDIR/SOURCES/repos:$TOPDIR/SOURCES/repos" --network=host "${tagargs[@]}" -f "$TOPDIR/SOURCES/$RECIPEFILE" $TOPDIR/SOURCES/ ; then + cleanup_and_exit 1 "$DOCKER_TOOL build command failed" + fi + else + if ! chroot $BUILD_ROOT $DOCKER_TOOL build $squashopt --network=host "${tagargs[@]}" -f "$TOPDIR/SOURCES/$RECIPEFILE" $TOPDIR/SOURCES/ ; then + cleanup_and_exit 1 "$DOCKER_TOOL build command failed" + fi fi # Save the resulting image to a tarball. Use first tag for generating the file name. @@ -154,7 +175,7 @@ test -n "$RELEASE" && FILENAME="$FILENAME-$RELEASE" echo "Saving image $FIRSTTAG to $FILENAME.tar" if ! chroot $BUILD_ROOT $DOCKER_TOOL save --output "$TOPDIR/DOCKER/$FILENAME.tar" "$FIRSTTAG" ; then - cleanup_and_exit 1 "Docker save command failed" + cleanup_and_exit 1 "$DOCKER_TOOL save command failed" fi # Create containerinfo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/build-vm-kvm new/obs-build-20190122/build-vm-kvm --- old/obs-build-20181206/build-vm-kvm 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/build-vm-kvm 2019-01-22 11:27:58.000000000 +0100 @@ -224,7 +224,7 @@ vm_startup_kvm() { qemu_bin="$kvm_bin" - qemu_args=(-drive file="$VM_ROOT",format=raw,if=none,id=disk,serial=0,cache=unsafe -device "$kvm_device",drive=disk) + qemu_args=(-drive file="$VM_ROOT",format=raw,if=none,id=disk,cache=unsafe -device "$kvm_device",drive=disk,serial=0) if [ -n "$VM_USER" ] ; then getent passwd "$VM_USER" > /dev/null || cleanup_and_exit 3 "cannot find KVM user '$VM_USER'" else @@ -233,7 +233,7 @@ fi [ -n "$VM_USER" ] && kvm_options="$kvm_options -runas $VM_USER" if test -n "$VM_SWAP" ; then - qemu_args=("${qemu_args[@]}" -drive file="$VM_SWAP",format=raw,if=none,id=swap,serial=1,cache=unsafe -device "$kvm_device",drive=swap) + qemu_args=("${qemu_args[@]}" -drive file="$VM_SWAP",format=raw,if=none,id=swap,cache=unsafe -device "$kvm_device",drive=swap,serial=1) fi # the serial console device needs to be compiled into the target kernel # which is why we can not use virtio-serial on other platforms diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/build.1 new/obs-build-20190122/build.1 --- old/obs-build-20181206/build.1 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/build.1 2019-01-22 11:27:58.000000000 +0100 @@ -4,9 +4,9 @@ .ns .TP \\$1 .. -.TH build 1 "(c) 1997-2008 SuSE Linux AG Nuernberg, Germany" +.TH BUILD 1 "(c) 1997-2018 SUSE Linux AG Nuernberg, Germany" .SH NAME -build \- build SuSE Linux RPMs in a chroot environment +build \- build SUSE Linux RPMs in a chroot environment .SH SYNOPSIS .B build .RB [ --clean | --no-init] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/buildvc.1 new/obs-build-20190122/buildvc.1 --- old/obs-build-20181206/buildvc.1 1970-01-01 01:00:00.000000000 +0100 +++ new/obs-build-20190122/buildvc.1 2019-01-22 11:27:58.000000000 +0100 @@ -0,0 +1,25 @@ +.TH BUILDVC 1 "(c) 1997-2018 SUSE Linux AG Nuernberg, Germany" +.SH NAME +buildvc \- create a SUSE type changes entry +.SH SYNOPSIS +.B buildvc +.RB [ -m +.IR message ] +.RB [ -e ] +.RI [ changesfile_or_dir +.RI [ commentfile ]] + +.SH DESCRIPTION +The \fBbuildvc\fP tool adds a new changes entry to a SUSE \fB.changes\fP file. +The \fB-m\fP option can be used to directly specify the entry, if it is +not given an editor is started to interactively enter the new changes +entry. If a \fIcommentfile\fP is given, its content is used as template +for the new entry instead of an empty entry, whereas the \fB-e\fP option +suppresses the creation of an empty entry. + +If no \fIchangesfile\fP is specified, \fBbuildvc\fP will search the current +directory for a file ending with \fB.changes\fP. If a directory is +specified instead of a changes will, it will be searched instead. + +.SH SEE ALSO +.BR build (1), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/call-podman new/obs-build-20190122/call-podman --- old/obs-build-20181206/call-podman 1970-01-01 01:00:00.000000000 +0100 +++ new/obs-build-20190122/call-podman 2019-01-22 11:27:58.000000000 +0100 @@ -0,0 +1,83 @@ +#!/bin/bash + +export BUILD_DIR=${BUILD_DIR:-/usr/lib/build} + +BUILD_ROOT= +IS_UNSHARED= + +cleanup_and_exit() { + test -z "$1" && set 0 + if test -n "$2" ; then + if test "$1" -ne 0 ; then + echo "$2" >&2 + else + echo "$2" + fi + fi + exit $1 +} + +while test -n "$1" ; do + case "$1" in + --root) + BUILD_ROOT="$2" + shift 2 + ;; + --isunshared) + IS_UNSHARED=true + shift + ;; + *) + break + ;; + esac +done + +if test -z "$IS_UNSHARED" ; then + echo "Unsharing environment" + # unshare mounts and network + exec unshare -m -n $BUILD_DIR/call-podman --isunshared --root "$BUILD_ROOT" "$@" + cleanup_and_exit 1 "exec unshare returned" +fi + +if test -n "$IS_UNSHARED" ; then + # make mounts private + mount --make-rprivate / + + # create loopback interface + if test -x /sbin/ip ; then + ip addr add 127.0.0.1/8 dev lo + ip addr add ::1/128 dev lo + ip link set lo up + else + ifconfig lo 127.0.0.1 up + ifconfig lo add ::1/128 + fi +fi + +# setup cgroups +if test "$BUILD_ROOT" != '/' ; then + test -d /sys/fs/cgroup || cleanup_and_exit 1 "/sys/fs/cgroup does not exist" + + # make build root a mount point + mount --rbind --make-private "$BUILD_ROOT" "$BUILD_ROOT" + mount --make-rprivate "$BUILD_ROOT" + + # mount /sys + if ! test -e $BUILD_ROOT/sys/block; then + mkdir -p $BUILD_ROOT/sys + mount -n -tsysfs sys $BUILD_ROOT/sys + fi + # bind mount cgroups + mount --rbind /sys/fs/cgroup "$BUILD_ROOT/sys/fs/cgroup" + mount --make-rslave "$BUILD_ROOT/sys/fs/cgroup" + export DOCKER_RAMDISK=true +fi + +# setup mounts +test -e "$BUILD_ROOT/proc/self" || mount -n -tproc none $BUILD_ROOT/proc + +# run the command +exec chroot "$BUILD_ROOT" podman "$@" + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/configs/sl15.1.conf new/obs-build-20190122/configs/sl15.1.conf --- old/obs-build-20181206/configs/sl15.1.conf 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/configs/sl15.1.conf 2019-01-22 11:27:58.000000000 +0100 @@ -6,10 +6,6 @@ Prefer: -libstdc++6-gcc7 -libtsan0-gcc7 -libgomp1-gcc7 -libgcc_s1-gcc7 -libatomic1-gcc7 -libcilkrts5-gcc7 -libitm1-gcc7 Prefer: -liblsan0-gcc7 -libmpx2-gcc7 -libubsan0-gcc7 -Substitute: kiwi-setup:image python3-kiwi createrepo_c -Substitute: kiwi-image:tbz python3-kiwi -Substitute: kiwi-image:docker python3-kiwi kiwi-image-docker-requires - Prefer: kiwi-filesystem-requires Prefer: kiwi-image-docker-requires Prefer: kiwi-image-iso-requires @@ -19,16 +15,6 @@ Substitute: kiwi-packagemanager:instsource product-builder-plugin-Tumbleweed Substitute: system-packages:kiwi-product product-builder -# allow builds using docker tool -Substitute: build-packages:kiwi !systemd-mini !libsystemd0-mini !libudev-mini1 !udev-mini openSUSE-release-ftp - -# To build ISO images -Substitute: build-packages:iso !systemd-mini !udev-mini !krb5-mini !libsystemd0-mini - -# create conflicts for packages installed into the target image -Substitute: build-packages:kiwi !systemd-mini !udev-mini !krb5-mini !libsystemd0-mini -Substitute: kiwi python3-kiwi - Prefer: installation-images-openSUSE installation-images-debuginfodeps-openSUSE # switch to kiwi v8 @@ -122,9 +108,6 @@ Support: hostname Support: build-compare -Support: brp-extract-appdata -Support: brp-extract-translations -Support: rpmlint-Factory-strict %ifarch ia64 Support: libunwind libunwind-devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/configs/sl15.5.conf new/obs-build-20190122/configs/sl15.5.conf --- old/obs-build-20181206/configs/sl15.5.conf 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/configs/sl15.5.conf 2019-01-22 11:27:58.000000000 +0100 @@ -17,7 +17,7 @@ Preinstall: aaa_base attr bash coreutils diffutils Preinstall: filesystem fillup glibc grep Preinstall: libbz2-1 libgcc_s1 libncurses6 pam -Preinstall: permissions libreadline7 rpm sed tar libz1 libselinux1 +Preinstall: permissions libreadline8 rpm sed tar libz1 libselinux1 Preinstall: liblzma5 libcap2 libacl1 libattr1 Preinstall: libpopt0 libelf1 liblua5_3-5 Preinstall: libpcre1 @@ -67,7 +67,7 @@ Conflict: krb5-devel:krb5-mini Conflict: krb5:krb5-mini-devel Prefer: krb5-mini-devel:krb5-mini -Prefer: libreadline7 +Prefer: libreadline8 Prefer: libdb_java-4_8 libicu Prefer: cracklib-dict-small postfix Prefer: jta fam mozilla mozilla-nss diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/createdebdeps new/obs-build-20190122/createdebdeps --- old/obs-build-20181206/createdebdeps 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/createdebdeps 2019-01-22 11:27:58.000000000 +0100 @@ -34,6 +34,13 @@ Getopt::Long::Configure("no_ignore_case"); +sub urldecode { + my ($str, $iscgi) = @_; + $str =~ tr/+/ / if $iscgi; + $str =~ s/%([a-fA-F0-9]{2})/chr(hex($1))/sge; + return $str; +} + # # supported urls # @@ -62,7 +69,26 @@ my @components; my $baseurl = $url; - if ($url =~ /^(.*\/)\.(\/.*)?$/) { + if ($url =~ /\?/) { + my ($base, $query) = split(/\?/, $url, 2); + if ("&$query" =~ /\&dist=/) { + my $dist; + for my $querypart (split('&', $query)) { + my ($k, $v) = split('=', $querypart, 2); + $k = urldecode($k, 1); + $v = urldecode($v, 1); + $dist = $v if $k eq 'dist'; + push @components, split(/[,+]/, $v) if $k eq 'component'; + } + $baseurl = $base; + $baseurl .= '/' unless $baseurl =~ /\/$/; + $url = "${baseurl}dists/${dist}/"; + push @components, 'main' unless @components; + } + } + if (@components) { + ; # all done above + } elsif ($url =~ /^(.*\/)\.(\/.*)?$/) { # flat repo $baseurl = $1; @components = ('.'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/dist/build.changes new/obs-build-20190122/dist/build.changes --- old/obs-build-20181206/dist/build.changes 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/dist/build.changes 2019-01-22 11:27:58.000000000 +0100 @@ -1,4 +1,25 @@ ------------------------------------------------------------------- +Mon Jan 21 12:00:48 UTC 2019 - Adrian Schröter <adr...@suse.de> + +- update factory config for libreadline8 switch +- cleanup 15.1 config with OBS specific stuff + * should not be used for plain build usage + * workarounds for kiwi should be fixed in packages + +------------------------------------------------------------------- +Thu Dec 6 15:23:11 UTC 2018 - Adrian Schröter <adr...@suse.de> + +- support jumping into KVM debug shells using "--vm-type=kvm --shell" +- adapt to new containerd CLI syntax +- Support a new 'UseOBSRepositories' flag +- lxc 3 support +- power9 fixes +- Generate a .milestone artifact for kiwi product builds +- Support rpm's new '^' separator in version comparison +- Allow to specify extra image repos with <!-- OBS-Imagerepo: --> +- Rework release handling of containers + +------------------------------------------------------------------- Mon Nov 26 09:24:17 UTC 2018 - Max Lin <m...@suse.com> - Add Leap 15.1 config diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/dist/build.spec new/obs-build-20190122/dist/build.spec --- old/obs-build-20181206/dist/build.spec 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/dist/build.spec 2019-01-22 11:27:58.000000000 +0100 @@ -57,6 +57,7 @@ Recommends: perl(YAML::LibYAML) Recommends: bsdtar Recommends: qemu-linux-user +Recommends: /usr/bin/qemu-kvm Recommends: /sbin/mkfs.ext3 %endif @@ -186,6 +187,7 @@ %endif %check +for i in build build-* ; do bash -n $i || exit 1 ; done if [ `whoami` != "root" ]; then echo "WARNING: Not building as root, tests did not run!" exit 0 @@ -226,7 +228,7 @@ %config(noreplace) /usr/lib/build/emulator/emulator.sh %{_mandir}/man1/build.1* %{_mandir}/man1/unrpm.1* -%{_mandir}/man1/vc.1* +%{_mandir}/man1/buildvc.1* %if 0%{?suse_version} %exclude /usr/lib/build/initvm.* %endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/obs-docker-support new/obs-build-20190122/obs-docker-support --- old/obs-build-20181206/obs-docker-support 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/obs-docker-support 2019-01-22 11:27:58.000000000 +0100 @@ -27,6 +27,7 @@ LOCAL_REPOS_D="/etc/repos_obs_dockersupport.d/" LOCAL_APTREPOS_D="/etc/aptrepos_obs_dockersupport.d/" +DATA_DIR= zypper() { cmd= @@ -164,6 +165,8 @@ obs_docker_support() { case "$1" in --install|-i) + data_url=http://localhost:80 + test -n "$DATA_DIR" && data_url="file:$DATA_DIR" test -e /usr/bin/zypper && ln -s obs-docker-support /usr/local/sbin/zypper test -e /usr/bin/yum && ln -s obs-docker-support /usr/local/sbin/yum test -e /usr/bin/dnf && ln -s obs-docker-support /usr/local/sbin/dnf @@ -171,12 +174,12 @@ ln -s obs-docker-support /usr/local/sbin/obs_pkg_mgr if test -e /usr/bin/zypper -o -e /usr/bin/yum -o -e /usr/bin/dnf ; then mkdir -p "$LOCAL_REPOS_D" - cat >$LOCAL_REPOS_D/obs_repository.repo <<'EOF' + cat >$LOCAL_REPOS_D/obs_repository.repo <<EOF [obs_repository] name=obs_repository enabled=1 autorefresh=0 -baseurl=http://localhost:80/ +baseurl=$data_url type=rpm-md gpgcheck=0 EOF @@ -184,7 +187,7 @@ fi if test -e /usr/bin/apt-get ; then mkdir -p "$LOCAL_APTREPOS_D" - echo "deb http://localhost:80 ./" > $LOCAL_APTREPOS_D/obssource + echo "deb $data_url ./" > $LOCAL_APTREPOS_D/obssource test -e /var/lib/apt && mv /var/lib/apt /var/lib/apt.obssave /usr/bin/apt-get -o Dir::Etc::SourceList=$LOCAL_APTREPOS_D/obssource -o Dir::Etc::SourceParts=$LOCAL_APTREPOS_D update fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/startdockerd new/obs-build-20190122/startdockerd --- old/obs-build-20181206/startdockerd 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/startdockerd 2019-01-22 11:27:58.000000000 +0100 @@ -29,6 +29,7 @@ KILL= WEBSERVER= WEBSERVER_ONLY= +DOCKERD_EXPERIMANTAL=--experimental while test -n "$1" ; do case "$1" in @@ -166,7 +167,7 @@ echo "$CONTAINERD_PID $DOCKERD_PID $WEBSERVER_PID" > $BUILD_ROOT/.startdockerd.pids echo "Starting docker daemon" -chroot $BUILD_ROOT /usr/bin/dockerd --containerd /run/containerd/containerd.sock --bridge=none --add-runtime oci=/usr/bin/docker-runc & +chroot $BUILD_ROOT /usr/bin/dockerd $DOCKERD_EXPERIMANTAL --containerd /run/containerd/containerd.sock --bridge=none --add-runtime oci=/usr/bin/docker-runc & DOCKERD_PID=$! echo "$CONTAINERD_PID $DOCKERD_PID $WEBSERVER_PID" > $BUILD_ROOT/.startdockerd.pids diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/unrpm.1 new/obs-build-20190122/unrpm.1 --- old/obs-build-20181206/unrpm.1 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/unrpm.1 2019-01-22 11:27:58.000000000 +0100 @@ -1,4 +1,4 @@ -.TH unrpm 1 "(c) 1997-2014 SuSE Linux AG Nuernberg, Germany" +.TH UNRPM 1 "(c) 1997-2018 SUSE Linux AG Nuernberg, Germany" .SH NAME unrpm \- unpack the contents of one or more rpm files .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20181206/vc.1 new/obs-build-20190122/vc.1 --- old/obs-build-20181206/vc.1 2018-12-06 16:22:05.000000000 +0100 +++ new/obs-build-20190122/vc.1 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -.TH vc 1 "(c) 1997-2014 SuSE Linux AG Nuernberg, Germany" -.SH NAME -vs \- create a SUSE stype changes entry -.SH SYNOPSIS -.B vc -.RB [ -m -.IR message ] -.RB [ -e ] -.RI [ changesfile_or_dir -.RI [ commentfile ]] - -.SH DESCRIPTION -The \fBvc\fP tool adds a new changes entry to a SUSE \fB.changes\fP file. -The \fB-m\fP option can be used to directly specify the entry, if it is -not given an editor is started to interactively enter the new changes -entry. If a \fIcommentfile\fP is given, its content is used as template -for the new entry instead of an empty entry, whereas the \fB-e\fP option -suppresses the creation of an empty entry. - -If no \fIchangesfile\fP is specified, \fBvc\fP will search the current -directory for a file ending with \fB.changes\fP. If a directory is -specified instead of a changes will, it will be searched instead. - -.SH SEE ALSO -.BR build (1),