Hello community, here is the log from the commit of package build for openSUSE:Factory checked in at 2014-02-28 16:21:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build" Changes: -------- --- /work/SRC/openSUSE:Factory/build/build.changes 2013-12-06 09:43:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.build.new/build.changes 2014-02-28 16:21:37.000000000 +0100 @@ -1,0 +2,7 @@ +Thu Feb 20 18:41:16 UTC 2014 - adr...@suse.de + +- bugfix release + - /sys mounting + - binfmtmisc setup + +------------------------------------------------------------------- Old: ---- obs-build-20131205.tar.gz New: ---- obs-build-20140220.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.PeKScX/_old 2014-02-28 16:21:37.000000000 +0100 +++ /var/tmp/diff_new_pack.PeKScX/_new 2014-02-28 16:21:37.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package build # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0+ and GPL-2.0 Group: Development/Tools/Building -Version: 20131205 +Version: 20140220 Release: 0 #!BuildIgnore: build-mkbaselibs Source: obs-build-%{version}.tar.gz ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.PeKScX/_old 2014-02-28 16:21:37.000000000 +0100 +++ /var/tmp/diff_new_pack.PeKScX/_new 2014-02-28 16:21:37.000000000 +0100 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20131205 +pkgver=20140220 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') @@ -8,7 +8,7 @@ groups=('base-devel') depends=('perl') source=(obs-build-${pkgver}.tar.gz) -md5sums=('40a9449185072889b390f5fc15789c5f') +md5sums=('2da128f38381b82851281ba6ad41aee4') package() { msg "Installing build ..." ++++++ build.dsc ++++++ --- /var/tmp/diff_new_pack.PeKScX/_old 2014-02-28 16:21:38.000000000 +0100 +++ /var/tmp/diff_new_pack.PeKScX/_new 2014-02-28 16:21:38.000000000 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20131205 +Version: 20140220 Binary: build Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: all ++++++ obs-build-20131205.tar.gz -> obs-build-20140220.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/Build/Kiwi.pm new/obs-build-20140220/Build/Kiwi.pm --- old/obs-build-20131205/Build/Kiwi.pm 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/Build/Kiwi.pm 2014-02-20 19:41:08.000000000 +0100 @@ -188,6 +188,7 @@ if ($instsource->{'productoptions'}) { my $productoptions = $instsource->{'productoptions'}->[0] || {}; for my $po (@{$productoptions->{'productvar'} || []}) { + $ret->{'drop_repository'} = $po->{'_content'} if $po->{'name'} eq 'DROP_REPOSITORY'; $ret->{'version'} = $po->{'_content'} if $po->{'name'} eq 'VERSION'; } for my $po (@{$productoptions->{'productoption'} || []}) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/Build.pm new/obs-build-20140220/Build.pm --- old/obs-build-20131205/Build.pm 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/Build.pm 2014-02-20 19:41:08.000000000 +0100 @@ -204,6 +204,7 @@ $config->{'fileprovides'} = {}; $config->{'constraint'} = []; $config->{'expandflags'} = []; + $config->{'buildflags'} = []; for my $l (@spec) { $l = $l->[1] if ref $l; next unless defined $l; @@ -220,7 +221,7 @@ } 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:') { + 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:') { my $t = substr($l0, 0, -1); for my $l (@l) { if ($l eq '!*') { @@ -351,6 +352,13 @@ $config->{"expandflags:$_"} = 1; } } + for (@{$config->{'buildflags'} || []}) { + if (/^([^:]+):(.*)$/s) { + $config->{"buildflags:$1"} = $2; + } else { + $config->{"buildflags:$_"} = 1; + } + } return $config; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/Makefile new/obs-build-20140220/Makefile --- old/obs-build-20131205/Makefile 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/Makefile 2014-02-20 19:41:08.000000000 +0100 @@ -39,10 +39,8 @@ extractbuild \ getbinaryid \ killchroot \ - getmacros \ + queryconfig \ getoptflags \ - gettype \ - getchangetarget \ common_functions \ init_buildsystem \ initscript_qemu_vm \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/build new/obs-build-20140220/build --- old/obs-build-20131205/build 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/build 2014-02-20 19:41:08.000000000 +0100 @@ -56,8 +56,8 @@ zvm_init_script="/.build/build" kvm_bin=/usr/bin/qemu-kvm -# whether we have virtio support -kvm_virtio= +# by default we have virtio support +kvm_virtio=1 # guest visible console device name console=ttyS0 @@ -90,7 +90,7 @@ VM_INITRD= VMDISK_ROOTSIZE=4096 VMDISK_SWAPSIZE=1024 -VMDISK_FILESYSTEM=ext4 +VMDISK_FILESYSTEM= # settings are for speed and not data safety, we format anyway on next run VMDISK_MOUNT_OPTIONS=__default VMDISK_CLEAN= @@ -403,6 +403,8 @@ echo "Warning: VM doesn't support sysrq and /sbin/halt not installed" fi else + # halt from systemd is not syncing anymore. + sync halt -f -p fi echo "Warning: clean shut down of the VM didn't work" @@ -423,6 +425,7 @@ umount -n $BUILD_ROOT/proc 2>/dev/null || true umount -n $BUILD_ROOT/dev/pts 2>/dev/null || true umount -n $BUILD_ROOT/dev/shm 2>/dev/null || true + umount -n $BUILD_ROOT/sys 2>/dev/null || true test "$VM_IMAGE" = 1 && VM_IMAGE= [ -n "$VM_IMAGE" ] && umount $BUILD_ROOT 2>/dev/null || true fi @@ -746,6 +749,9 @@ detect_vm_2nd_stage() { + if test -n "$BUILD_IGNORE_2ND_STAGE" ; then + return 1 + fi if test -e /.build/build.data; then . /.build/build.data fi @@ -772,6 +778,10 @@ fi RUNNING_IN_VM=true test -e /proc/version || mount -orw -n -tproc none /proc + if ! test -e /sys/block; then + mkdir -p /sys + mount -orw -n -tsysfs sysfs /sys + fi if test "$VM_TYPE" != 'lxc'; then mount -n ${VMDISK_MOUNT_OPTIONS},remount,rw / fi @@ -1463,6 +1473,11 @@ check_for_ppc check_for_arm +if test -z "$VMDISK_FILESYSTEM" -a -n "$VM_TYPE"; then + VMDISK_FILESYSTEM=`queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags vmfstype` + test -z "$VMDISK_FILESYSTEM" && VMDISK_FILESYSTEM="ext4" +fi + if test "$VM_TYPE" = "lxc"; then VM_IMAGE='' VM_SWAP='' @@ -1722,10 +1737,8 @@ if [ -n "$VM_INITRD" ]; then vm_initrd="$VM_INITRD" - kvm_virtio=1 elif [ -e "${vm_initrd}-build" ]; then vm_initrd="${vm_initrd}-build" - kvm_virtio=1 else if [ -L "$vm_initrd" ]; then vm_initrd=`readlink -f "$vm_initrd"` || cleanup_and_exit 3 @@ -1742,15 +1755,14 @@ echo "No initrd that provides virtio support found. virtio accelleration disabled." echo "Run the following command as root to enable virtio:" shellquote "${mkinitrd_virtio_cmd[@]}" + kvm_virtio= echo elif /sbin/modinfo virtio_pci >/dev/null 2>&1; then echo "creating $vm_initrd_virtio" "${mkinitrd_virtio_cmd[@]}" || cleanup_and_exit 1 - kvm_virtio=1 vm_initrd="${vm_initrd_virtio}" fi else - kvm_virtio=1 vm_initrd="${vm_initrd_virtio}" fi fi @@ -2317,11 +2329,14 @@ qemu_args=("${qemu_args[@]}" "file=$VM_SWAP,if=virtio$CACHE") fi if [ "$HOST_ARCH" = "armv7l" ]; then - qemu_args=(-drive file="$VM_IMAGE",if=none,id=disk$CACHE -device virtio-blk,transport=virtio-mmio.0,drive=disk) + qemu_args=( "-drive") + qemu_args=("${qemu_args[@]}" "file="$VM_IMAGE",if=none,id=disk$CACHE") qemu_args=("${qemu_args[@]}" "-drive") qemu_args=("${qemu_args[@]}" "file=$VM_SWAP,if=none,id=swap$CACHE") qemu_args=("${qemu_args[@]}" "-device") - qemu_args=("${qemu_args[@]}" "virtio-blk,transport=virtio-mmio.1,drive=swap") + qemu_args=("${qemu_args[@]}" "virtio-blk-device,drive=swap") + qemu_args=("${qemu_args[@]}" "-device") + qemu_args=("${qemu_args[@]}" "virtio-blk-device,drive=disk") fi else if [ "$HOST_ARCH" = "ppc970" -o "$HOST_ARCH" = "power7le" ];then @@ -2566,6 +2581,7 @@ if test "$statistics" = 1; then mkdir -p OTHER [ -e _statistics ] && mv _statistics OTHER/ + [ -e KIWI/_statistics ] && mv KIWI/_statistics OTHER/ [ -n "$TIME_PREINSTALL" ] && echo "TIME_preinstall: $TIME_PREINSTALL" >> OTHER/_statistics TIME_TOTAL=$(( `date +%s` - $TIME_START_TIME )) echo "TIME_total: $TIME_TOTAL" >> OTHER/_statistics @@ -2749,10 +2765,10 @@ fi fi if test -f $BUILD_ROOT/etc/shadow ; then - sed -e "s@^root::@root:*:@" < $BUILD_ROOT/etc/shadow > $BUILD_ROOT/etc/shadow.t && mv $BUILD_ROOT/etc/shadow.t $BUILD_ROOT/etc/shadow + sed -i -e "s@^root::@root:*:@" $BUILD_ROOT/etc/shadow fi if test -f $BUILD_ROOT/etc/gshadow ; then - sed -e "s@^root::@root:*:@" < $BUILD_ROOT/etc/gshadow > $BUILD_ROOT/etc/gshadow.t && mv $BUILD_ROOT/etc/gshadow.t $BUILD_ROOT/etc/gshadow + sed -i -e "s@^root::@root:*:@" $BUILD_ROOT/etc/gshadow fi BUILD_USER_ABUILD_USED=true else @@ -2761,17 +2777,13 @@ ABUILD_GID=0 if egrep '^abuild:' >/dev/null <$BUILD_ROOT/etc/passwd ; then rm -rf "$BUILD_ROOT/home/abuild" - egrep -v '^abuild:' <$BUILD_ROOT/etc/passwd >$BUILD_ROOT/etc/passwd.new - mv $BUILD_ROOT/etc/passwd.new $BUILD_ROOT/etc/passwd - egrep -v '^abuild:' <$BUILD_ROOT/etc/group >$BUILD_ROOT/etc/group.new - mv $BUILD_ROOT/etc/group.new $BUILD_ROOT/etc/group + sed -i -e '/^abuild:/d' $BUILD_ROOT/etc/passwd + sed -i -e '/^abuild:/d' $BUILD_ROOT/etc/group if test -f $BUILD_ROOT/etc/shadow ; then - egrep -v '^abuild:' <$BUILD_ROOT/etc/shadow >$BUILD_ROOT/etc/shadow.new - mv $BUILD_ROOT/etc/shadow.new $BUILD_ROOT/etc/shadow + sed -i -e '/^abuild:/d' $BUILD_ROOT/etc/shadow fi if test -f $BUILD_ROOT/etc/gshadow ; then - egrep -v '^abuild:' <$BUILD_ROOT/etc/gshadow >$BUILD_ROOT/etc/gshadow.new - mv $BUILD_ROOT/etc/gshadow.new $BUILD_ROOT/etc/gshadow + sed -i -e '/^abuild:/d' $BUILD_ROOT/etc/gshadow fi fi fi @@ -2853,7 +2865,7 @@ fi substitutedeps "${args[@]}" --root "$BUILD_ROOT" --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" $CHANGELOGARGS "$BUILD_ROOT$TOPDIR/SOURCES/$SPECFILE" "$BUILD_ROOT/.spec.new" || cleanup_and_exit 1 # extract macros from configuration - getmacros --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" > $BUILD_ROOT/root/.rpmmacros + queryconfig rawmacros --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" > $BUILD_ROOT/root/.rpmmacros if test -n "$BUILD_DEBUG" ; then echo ' %prep %{?!__debug_package:%{?_build_create_debug:%?_build_insert_debug_package}}%%prep @@ -2877,7 +2889,7 @@ getoptflags --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" ${BUILD_DEBUG:+--debug} > $BUILD_ROOT/root/.rpmrc test $BUILD_USER = abuild && cp -p $BUILD_ROOT/root/.rpmrc $BUILD_ROOT/home/abuild/.rpmrc if test -z "$ABUILD_TARGET"; then - ABUILD_TARGET=$(getchangetarget --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" ) + ABUILD_TARGET=$(queryconfig target --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" ) test -z "$ABUILD_TARGET" || echo "build target is $ABUILD_TARGET" fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/build_kiwi.sh new/obs-build-20140220/build_kiwi.sh --- old/obs-build-20131205/build_kiwi.sh 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/build_kiwi.sh 2014-02-20 19:41:08.000000000 +0100 @@ -4,6 +4,7 @@ imagetype=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE imagetype) imagename=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE filename) imageversion=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE version) + drop_repo=$(perl -I$BUILD_DIR -MBuild::Kiwi -e Build::Kiwi::show $BUILD_ROOT/$TOPDIR/SOURCES/$SPECFILE Ddrop_repository) # prepare rpms as source and createrepo on the repositories ln -sf $TOPDIR/SOURCES/repos $BUILD_ROOT/repos cd $BUILD_ROOT/$TOPDIR/SOURCES/repos @@ -102,7 +103,7 @@ *.packages) mv $i $BUILD_ROOT/$TOPDIR/OTHER/. ;; scripts) ;; *0) ;; - *) test -d $i && mv $i $BUILD_ROOT/$TOPDIR/KIWI/. ;; + *) test -d $i && [ "$drop_repo" != "true" ] && mv $i $BUILD_ROOT/$TOPDIR/KIWI/. ;; esac done else @@ -127,7 +128,7 @@ # create tar.gz of images, in case it makes sense imagearch=`uname -m` buildnum="" - if test -n "$RELEASE"; then + if test -n "$RELEASE"; then buildnum="-Build$RELEASE" fi imageout="$imagename.$imagearch-$imageversion" @@ -215,24 +216,34 @@ cat > $BUILD_ROOT/kiwi_post.sh << EOF echo "compressing vmx images... " cd /$TOPDIR/KIWI-vmx -for suffix in "ovf" "qcow2" "ova" "tar"; do +compress_tool="bzip2" +compress_suffix="bz2" +if [ -x /usr/bin/xz ]; then + # take xz to get support for sparse files + compress_tool="xz -2" + compress_suffix="xz" +fi +VMXFILES="" +SHAFILES="" +for suffix in "ovf" "qcow2" "ova" "tar" "vhdfixed" "vhd"; do if [ -e "$imageout.\$suffix" ]; then - if [ "\$suffix" == "ovf" ]; then + if [ "\$suffix" == "vhd" -o "\$suffix" == "vhdfixed" ]; then + mv "$imageout.\$suffix" "/$TOPDIR/KIWI/$imageout$buildnum.\$suffix" + pushd /$TOPDIR/KIWI + echo "\$compress_tool \$suffix file..." + \$compress_tool "$imageout$buildnum.\$suffix" + SHAFILES="\$SHAFILES $imageout$buildnum.\$suffix.\${compress_suffix}" + popd + elif [ "\$suffix" == "ovf" ]; then mv "$imageout.\${suffix}/$imageout.\$suffix" "/$TOPDIR/KIWI/$imageout$buildnum.\$suffix" + SHAFILES="\$SHAFILES $imageout$buildnum.\$suffix" else mv "$imageout.\$suffix" "/$TOPDIR/KIWI/$imageout$buildnum.\$suffix" + SHAFILES="\$SHAFILES $imageout$buildnum.\$suffix" fi - pushd /$TOPDIR/KIWI - if [ -x /usr/bin/sha256sum ]; then - echo "Create sha256 \$suffix file..." - /usr/bin/sha256sum "$imageout$buildnum.\$suffix" > "$imageout$buildnum.\$suffix.sha256" - fi - popd fi done # This option has a number of format parameters -VMXFILES="" -SHAFILES="" for i in "$imageout.vmx" "$imageout.vmdk" "$imageout-disk*.vmdk"; do test -e \$i && VMXFILES="\$VMXFILES \$i" done @@ -240,14 +251,7 @@ if [ -n "\$VMXFILES" ]; then tar cvjfS "/$TOPDIR/KIWI/$imageout$buildnum-vmx.tar.bz2" \$VMXFILES SHAFILES="\$SHAFILES $imageout$buildnum-vmx.tar.bz2" -elif [ -e "$imageout.raw" ]; then - compress_tool="bzip2" - compress_suffix="bz2" - if [ -x /usr/bin/xz ]; then - # take xz to get support for sparse files - compress_tool="xz -2" - compress_suffix="xz" - fi +elif [ -z "\$SHAFILES" -a -e "$imageout.raw" ]; then mv "$imageout.raw" "/$TOPDIR/KIWI/$imageout$buildnum-vmx.raw" pushd /$TOPDIR/KIWI echo "\$compress_tool raw file..." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/getchangetarget new/obs-build-20140220/getchangetarget --- old/obs-build-20131205/getchangetarget 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/getchangetarget 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -#!/usr/bin/perl -w - -BEGIN { - unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); -} - -use strict; - -use Build; - -my ($dist, $archs, $configdir); - -while (@ARGV) { - if ($ARGV[0] eq '--dist') { - shift @ARGV; - $dist = shift @ARGV; - next; - } - if ($ARGV[0] eq '--archpath') { - shift @ARGV; - $archs = shift @ARGV; - next; - } - if ($ARGV[0] eq '--configdir') { - shift @ARGV; - $configdir = shift @ARGV; - next; - } - last; -} - -die("Usage: getchangetarget --dist <dist> --archpath <archpath> [--configdir <configdir>]\n") if @ARGV; - -my $cf = Build::read_config_dist($dist, $archs, $configdir); -print "$cf->{'target'}\n" if $cf->{'target'}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/getmacros new/obs-build-20140220/getmacros --- old/obs-build-20131205/getmacros 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/getmacros 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -#!/usr/bin/perl -w - -BEGIN { - unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); -} - -use Build; -use strict; - -my ($dist, $configdir, $archs); - -while (@ARGV) { - if ($ARGV[0] eq '--dist') { - shift @ARGV; - $dist = shift @ARGV; - next; - } - if ($ARGV[0] eq '--archpath') { - shift @ARGV; - $archs = shift @ARGV; - next; - } - if ($ARGV[0] eq '--configdir') { - shift @ARGV; - $configdir = shift @ARGV; - next; - } - last; -} -die("Usage: getmacros --dist <dist> [--configdir <configdir>]\n") if @ARGV; -my $cf = Build::read_config_dist($dist, $archs, $configdir); -print $cf->{'rawmacros'} if exists $cf->{'rawmacros'}; -exit(0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/gettype new/obs-build-20140220/gettype --- old/obs-build-20131205/gettype 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/gettype 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -#!/usr/bin/perl -w - -BEGIN { - unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); -} - -use strict; - -use Build; - -my ($dist, $archs, $configdir, $debug); - -while (@ARGV) { - if ($ARGV[0] eq '--dist') { - shift @ARGV; - $dist = shift @ARGV; - next; - } - if ($ARGV[0] eq '--archpath') { - shift @ARGV; - $archs = shift @ARGV; - next; - } - if ($ARGV[0] eq '--configdir') { - shift @ARGV; - $configdir = shift @ARGV; - next; - } - last; -} - -die("Usage: gettype --dist <dist> --archpath <archpath> [--configdir <configdir>]\n") if @ARGV; - -my $cf = Build::read_config_dist($dist, $archs, $configdir); -exit 0 unless $cf->{'binarytype'}; -print "$cf->{'binarytype'}\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/init_buildsystem new/obs-build-20140220/init_buildsystem --- old/obs-build-20131205/init_buildsystem 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/init_buildsystem 2014-02-20 19:41:08.000000000 +0100 @@ -122,11 +122,12 @@ umount -n "$BUILD_ROOT/mnt" 2> /dev/null || true rm -rf -- "$BUILD_ROOT"/* rm -rf -- "$BUILD_ROOT/.build" - rm -rf -- "$BUILD_ROOT/.build.kernel.*" + rm -rf -- "$BUILD_ROOT"/.build.kernel.* + rm -rf -- "$BUILD_ROOT"/.build.initrd.* rm -rf -- "$BUILD_ROOT/.root" rm -rf -- "$BUILD_ROOT/.init_b_cache" - rm -rf -- "$BUILD_ROOT/.preinstall_image/*" - rm -rf -- "$BUILD_ROOT/.preinstallimage"* + rm -rf -- "$BUILD_ROOT"/.preinstall_image/* + rm -rf -- "$BUILD_ROOT"/.preinstallimage* mkdir -p "$BUILD_ROOT/proc" mkdir -p "$BUILD_ROOT/dev/pts" if [ "$UID" = '0' ]; then @@ -607,9 +608,10 @@ if [ -x "$BUILD_DIR/initvm.`uname -m`" -a -e "$BUILD_DIR/qemu-reg" ]; then $BUILD_DIR/initvm.`uname -m` - else - echo "Warning: could not register binfmt handlers. Neither build-initvm nor /usr/sbin/qemu-binfmt-conf.sh exist" - fi + else + echo "Warning: could not register binfmt handlers. " + echo "Either build-initvm or $BUILD_DIR/qemu-reg missing." + fi echo 0 > /proc/sys/vm/mmap_min_addr read mmap_min_addr < /proc/sys/vm/mmap_min_addr @@ -737,7 +739,7 @@ echo "$GUESSED_DIST" > $BUILD_ROOT/.guessed_dist test -n "$BUILD_DIST" || BUILD_DIST="$GUESSED_DIST" - PSUF=`gettype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"` + PSUF=`queryconfig binarytype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"` case "$PSUF" in UNKNOWN|'') # auto detect from packages diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/initvm.c new/obs-build-20140220/initvm.c --- old/obs-build-20131205/initvm.c 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/initvm.c 2014-02-20 19:41:08.000000000 +0100 @@ -20,6 +20,7 @@ * * AUTHOR * James Perkins <james.perk...@linuxfoundation.org> + * Adrian Schroeter <adr...@suse.de> */ #include <sys/mount.h> @@ -177,7 +178,7 @@ if (buf[0] != ':') /* non-data input line */ { - goto skip; + continue; } /* copy buf and tokenize :-seperated fields into f[] */ @@ -200,22 +201,41 @@ { fprintf(stderr, "%s: line %d: extra fields, ignoring." " Content: %s", datafile, line, buf); - goto skip; + continue; } if (n < n_fields) { fprintf(stderr, "%s: line %d: missing fields, ignoring." " Content: %s", datafile, line, buf); - goto skip; + continue; } + int ret; + /* Is an interpreter for this arch already registered? */ + snprintf(path, sizeof(path), SYSFS_BINFMT_MISC "/%s", f[name]); + ret=access(path, X_OK); + fprintf(stderr, + "interpreter for '%s' is %d\n", + f[name], ret); + if (ret == 0) { +#ifdef DEBUG + fprintf(stderr, + "interpreter for '%s' already registered, ignoring\n", + f[name]); +#endif /* DEBUG */ + continue; + } - if (access(f[interpreter], X_OK) != 0) { + /* Does the interpreter exists? */ + ret=access(f[interpreter], X_OK); + if (ret != 0) { +#ifdef DEBUG fprintf(stderr, "%s: line %d: interpreter '%s' not found," - " ignoring\n", datafile, line, f[interpreter]); - goto skip; + " ignoring, return %d\n", datafile, line, f[interpreter], ret); +#endif /* DEBUG */ + continue; } if (!write_file_string(regfile, buf)) { @@ -238,9 +258,6 @@ DBG(fprintf(stderr, "dumping: %s\n", path)); DBG(dump_file(path)); - -skip: - ; } @@ -327,7 +344,7 @@ exit(1); } execve(BUILD, args, env); - perror("execve"); + perror("execve of "BUILD); exit(1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/qemu-reg new/obs-build-20140220/qemu-reg --- old/obs-build-20131205/qemu-reg 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/qemu-reg 2014-02-20 19:41:08.000000000 +0100 @@ -4,10 +4,11 @@ # NOTE: this requires a qemu with the binfmt misc handler binary -:aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-arm64-binfmt:P +:aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-aarch64-binfmt:P +:aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-arm64-binfmt:P :arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-binfmt:P :armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P -:ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P +:ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P :mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-binfmt:P :mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-binfmt:P #:mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32-binfmt:P @@ -15,6 +16,6 @@ #:mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64-binfmt:P #:mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-binfmt:P -:sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P -:sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P +:sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P +:sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/queryconfig new/obs-build-20140220/queryconfig --- old/obs-build-20131205/queryconfig 1970-01-01 01:00:00.000000000 +0100 +++ new/obs-build-20140220/queryconfig 2014-02-20 19:41:08.000000000 +0100 @@ -0,0 +1,49 @@ +#!/usr/bin/perl -w + +BEGIN { + unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); +} + +use strict; + +use Build; + +my ($dist, $archs, $configdir, $debug, $type, $argument); + +while (@ARGV) { + if ($ARGV[0] eq '--dist') { + shift @ARGV; + $dist = shift @ARGV; + next; + } elsif ($ARGV[0] eq '--archpath') { + shift @ARGV; + $archs = shift @ARGV; + next; + } elsif ($ARGV[0] eq '--configdir') { + shift @ARGV; + $configdir = shift @ARGV; + next; + } elsif (defined($type)) { + $argument = shift @ARGV; + } else { + $type = shift @ARGV; + } +} + +my $cf = Build::read_config_dist($dist, $archs, $configdir); +die("Unable to read config\n") unless $cf; + +if ($type eq 'buildflags') { + die("Specify which buildflag to query\n") unless $argument; + + my $result = $cf->{"buildflags:$argument"}; + print "$result\n" if defined $result; +} elsif ($type eq 'target' || $type eq 'binarytype' || $type eq 'rawmacros') { + my $cf = Build::read_config_dist($dist, $archs, $configdir); + print "$cf->{$type}\n" if $cf->{$type}; +} else { + die("unsupported query type: $type\n"); +} + +exit(0); + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/test/common new/obs-build-20140220/test/common --- old/obs-build-20131205/test/common 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/test/common 2014-02-20 19:41:08.000000000 +0100 @@ -22,6 +22,8 @@ . ${0%/*}/config.local fi +: ${BUILD_DIR:=/usr/lib/build} + #if [ ! -e "$build_vm_img" ]; then # sudo dd if=/dev/zero of="$build_vm_img" bs=512 count=0 seek=$((build_vm_image_size*2*1024)) #fi @@ -89,8 +91,10 @@ build_args+=("$i") fi done - set -- $linux32 sudo env \ - /usr/bin/build \ + SU_WRAPPER="" + [ -x /usr/bin/sudo ] && SU_WRAPPER="sudo env" + set -- $linux32 $SU_WRAPPER \ + $BUILD_DIR/build \ --root "${build_root}" \ "${repos[@]}" \ "${build_args[@]}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/test/testbuild.sh new/obs-build-20140220/test/testbuild.sh --- old/obs-build-20131205/test/testbuild.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/obs-build-20140220/test/testbuild.sh 2014-02-20 19:41:08.000000000 +0100 @@ -0,0 +1,19 @@ +#!/bin/bash +# +# This is the generic test case for the current distribution, it +# is to be called from the spec file while building a build.rpm + +. ${0%/*}/common +REPO="$1" +shift + +if [ -z "$REPO" ]; then + echo "No local path to binary packages is given as argument" + exit 1 +fi + +[ "$ARCH" == "i386" ] && arch32bit + +repo "$REPO" + +run_build "$@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20131205/vc new/obs-build-20140220/vc --- old/obs-build-20131205/vc 2013-12-05 14:26:28.000000000 +0100 +++ new/obs-build-20140220/vc 2014-02-20 19:41:08.000000000 +0100 @@ -125,7 +125,7 @@ echo fi if [ -n "$message" ]; then - echo "- $message" + echo -e "- $message" echo elif [ -n "$content" ]; then cat "$content" @@ -133,24 +133,6 @@ elif [ ! $just_edit ]; then echo "- " echo - if [ -d .osc -a -n "$(which osc 2>/dev/null)" ]; then - OSC_STATUS="$(cd "$pkgpath" &> /dev/null; osc st)" - ADDED="$(sed -n 's/^A[[:blank:]]\+\([^[:blank:]].*\.\(patch\|diff\)\)$/ * \1/p' <<< "$OSC_STATUS")" - DELETED="$(sed -n 's/^D[[:blank:]]\+\([^[:blank:]].*\.\(patch\|diff\)\)$/ * \1/p' <<< "$OSC_STATUS")" - MODIFIED="$(sed -n 's/^M[[:blank:]]\+\([^[:blank:]].*\.\(patch\|diff\)\)$/ * \1/p' <<< "$OSC_STATUS")" - if [ -n "$ADDED" ]; then - echo "- added patches:" - echo "$ADDED" - fi - if [ -n "$DELETED" ]; then - echo "- removed patches:" - echo "$DELETED" - fi - if [ -n "$MODIFIED" ]; then - echo "- modified patches:" - echo "$MODIFIED" - fi - fi fi cat $changelog } >> "$tmpfile" -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org