Mailinglist Archive: opensuse-commit (1248 mails)

< Previous Next >
commit build for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 15 Apr 2010 23:59:45 +0200
  • Message-id: <20100415215945.8BD062029A@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package build for openSUSE:Factory
checked in at Thu Apr 15 23:59:45 CEST 2010.



--------
--- build/build.changes 2010-03-10 14:35:10.000000000 +0100
+++ /mounts/work_src_done/STABLE/build/build.changes 2010-04-15
16:05:32.000000000 +0200
@@ -1,0 +2,23 @@
+Thu Apr 15 14:04:56 UTC 2010 - adrian@xxxxxxx
+
+- split out -mkbaselibs package to avoid build dependency problems
+ on perl version updates in future.
+- update to current git
+ * added armv6el to emulator archs by Jan-Simon.
+ * fixing a logic error in arch= attribute handling for kiwi
+
+-------------------------------------------------------------------
+Fri Apr 9 07:58:24 UTC 2010 - adrian@xxxxxxx
+
+- update to current git
+ * Support for remote yum repos by yi.y.yang@xxxxxxxxx
+ * fixed kiwi file parsing for arch= attributes
+
+-------------------------------------------------------------------
+Wed Mar 31 15:00:48 UTC 2010 - adrian@xxxxxxx
+
+- update to current git
+ * kvm autosetup enhancements
+ * multiple bugfixes and refactoring
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
build-2010.03.10.tar.gz

New:
----
build-2010.04.15.tar.gz

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

Other differences:
------------------
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.IzTDpR/_old 2010-04-15 23:52:32.000000000 +0200
+++ /var/tmp/diff_new_pack.IzTDpR/_new 2010-04-15 23:52:32.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package build (Version 2010.03.10)
+# spec file for package build (Version 2010.04.15)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,7 +23,7 @@
Group: Development/Tools/Building
AutoReqProv: on
Summary: A Script to Build SUSE Linux RPMs
-Version: 2010.03.10
+Version: 2010.04.15
Release: 1
# osc rm build-*tar.bz2
# REVISION=$(svn info
https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/build | sed
-ne "/Revision: /s///p")
@@ -55,6 +55,19 @@
chroot environment.


+%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
+Requires: build-mkbaselibs
+
+%package mkbaselibs
+License: GPLv2+
+Group: Development/Tools/Building
+Summary: Tools to generate base lib packages
+# NOTE: this package must not have dependencies which may break boot strapping
(eg. perl modules)
+
+%description mkbaselibs
+This package contains the parts which may be installed in the inner build
system
+for generating base lib packages.
+%endif

%prep
%setup -q
@@ -82,4 +95,13 @@
/usr/lib/build
%{_mandir}/man1/build.1*

+%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
+%exclude /usr/lib/build/mkbaselibs
+
+%files mkbaselibs
+%defattr(-,root,root)
+%dir /usr/lib/build
+/usr/lib/build/mkbaselibs
+%endif
+
%changelog

++++++ build-2010.03.10.tar.gz -> build-2010.04.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/Build/Kiwi.pm
new/build-2010.04.15/Build/Kiwi.pm
--- old/build-2010.03.10/Build/Kiwi.pm 2010-03-10 14:33:27.000000000 +0100
+++ new/build-2010.04.15/Build/Kiwi.pm 2010-04-13 18:18:12.000000000 +0200
@@ -182,17 +182,24 @@
for my $package (@pkgs) {
# filter packages, which are not targeted for the wanted plattform
if ($package->{'arch'}) {
+ my $valid=undef;
if (@requiredarch) {
# this is a product
- next unless grep {$_ eq $package->{'arch'}} @requiredarch;
+ foreach my $ma(@requiredarch) {
+ foreach my $pa(split(",", $package->{'arch'})) {
+ $valid = 1 if $ma eq $pa;
+ }
+ }
} else {
# live appliance
my $ma = $arch;
$ma =~ s/i[456]86/i386/;
- my $pa = $package->{'arch'};
- $pa =~ s/i[456]86/i386/;
- next if $ma ne $pa;
+ foreach my $pa(split(",", $package->{'arch'})) {
+ $pa =~ s/i[456]86/i386/;
+ $valid = 1 if $ma eq $pa;
+ }
}
+ next unless $valid;
}

# not nice, but optimizes our build dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/Build.pm
new/build-2010.04.15/Build.pm
--- old/build-2010.03.10/Build.pm 2010-03-10 14:33:27.000000000 +0100
+++ new/build-2010.04.15/Build.pm 2010-04-08 14:53:50.000000000 +0200
@@ -268,9 +268,11 @@
while (@deps) {
my $d = shift @deps;
next if $done{$d};
- if ($subst->{$d}) {
- unshift @deps, @{$subst->{$d}};
- push @res, $d if grep {$_ eq $d} @{$subst->{$d}};
+ my $ds = $d;
+ $ds =~ s/\s*[<=>].*$//s;
+ if ($subst->{$ds}) {
+ unshift @deps, @{$subst->{$ds}};
+ push @res, $d if grep {$_ eq $ds} @{$subst->{$ds}};
} else {
push @res, $d;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/build new/build-2010.04.15/build
--- old/build-2010.03.10/build 2010-03-10 14:33:28.000000000 +0100
+++ new/build-2010.04.15/build 2010-04-15 15:57:35.000000000 +0200
@@ -14,28 +14,32 @@

ccache=0
icecream=0
+shell=
definesnstuff=()
repos=()

-# mkreiserfs only works with qemu/uml if it is able to create a file
-# system that is owned by the calling user (bnc#369006)
-#vm_img_mkfs='mkreiserfs -q -f'
-#vm_img_mkfs='mkfs.ext2 -m 0 -q -F'
-vm_img_mkfs='mkfs.ext3 -m 0 -q -F'
-vm_img_tunefs='tune2fs -c 0'
+# defaults for vm_img_mkfs
+vm_img_mkfs_ext4='mkfs.ext4 -m 0 -q -F'
+vm_img_tunefs_ext4='tune2fs -c 0'
+vm_img_mkfs_ext3='mkfs.ext3 -m 0 -q -F'
+vm_img_tunefs_ext3='tune2fs -c 0'
+vm_img_mkfs_ext2='mkfs.ext2 -m 0 -q -F'
+vm_img_tunefs_ext2='tune2fs -c 0'
+vm_img_mkfs_reiserfs='mkreiserfs -q -f'
+
qemu_kernel=/boot/vmlinuz
qemu_initrd=/boot/initrd
qemu_bin=/usr/bin/qemu
uml_kernel=/boot/vmlinux-um
uml_initrd=/boot/initrd-um

-kvm_kernel=/boot/vmlinuz
-kvm_initrd=/boot/initrd
kvm_bin=/usr/bin/qemu-kvm
-mkinitrd_virtio_cmd=(env rootfstype=ext3 mkinitrd -d /dev/null -m "virtio_pci
virtio_blk" -k $kvm_kernel -i $kvm_initrd-virtio)
# whether we have virtio support
kvm_virtio=

+# need to restore build root owner for non-root builds
+browner=0
+
# Default uid:gid for the build user
ABUILD_UID=399
ABUILD_GID=399
@@ -53,6 +57,11 @@
LIST_STATE=
VM_IMAGE=
VM_SWAP=
+VM_KERNEL=
+VM_INITRD=
+VMDISK_ROOTSIZE=4096
+VMDISK_SWAPSIZE=1024
+VMDISK_FILESYSTEM=ext3
MEMSIZE=
RUNNING_IN_VM=
RPMLIST=
@@ -72,6 +81,9 @@
RSYNCSRC=
RSYNCDEST=
RSYNCDONE=
+: ${EMULATOR_ARCHS:="armv4l armv5el armv6el armv7el sh4 ppc ppc64 mips mipsel"}
+
+export EMULATOR_ARCHS

# This is for insserv
export YAST_IS_RUNNING=instsys
@@ -130,6 +142,7 @@
repository NAME. The repo must be refreshed with zypp
so package meta data is available locally. With emtpy
NAME all enabled repositories are used.
+ a url can specify a remote repo.

--rpms path1:path2:...
Specify path where to find the RPMs for the build system
@@ -145,6 +158,13 @@
--root rootdir
Use 'rootdir' to setup chroot environment

+ --cachedir cachedir
+ Use 'cachedir' to cache remote repo's packages, the
+ default cache dir is /var/cache/build, every repo
+ given by --repository corresponds to a subdir named
+ as md5sum of its repo url, forx eaxmple:
+ /var/cache/build/3e8ea9b47808629414a0cebc33ea285e
+
--oldpackages oldpackagesdir
Define a directory with a former build

@@ -193,6 +213,15 @@
This is useful if you are hacking in the buildroot.
This must be set to the same value if the buildroot is re-used.

+ --vmdisk-rootsize <size in MB>
+ --vmdisk-swapsize <size in MB>
+ --vmdisk-filesystem <ext3|ext4>
+ Defaults for automatic setup of VM root/swap files
+
+ --vm-kernel
+ --vm-initrd
+ Kernel and initrd to use for VM build.
+
--debug
enable creation of a debuginfo package

@@ -217,6 +246,7 @@
trap EXIT
test -z "$1" && set 0
if test -n "$RUNNING_IN_VM" ; then
+ chown $browner $BUILD_ROOT
cd /
if test -n "$VM_SWAP" -a -e "$VM_SWAP" ; then
swapoff "$VM_SWAP" 2>/dev/null
@@ -226,8 +256,20 @@
sleep 1 # wait till tee terminates
if test "$VM_TYPE" != lxc; then
kill -9 -1 # goodbye cruel world
- exec /bin/bash -c 'mount -n -o remount,ro / ; halt -f -p'
- halt -f -p
+ if ! test -x /sbin/halt ; then
+ test -e /proc/sysrq-trigger || mount -n -tproc none /proc
+ sync
+ sleep 2 # like halt does
+ if test -e /proc/sysrq-trigger; then
+ echo o > /proc/sysrq-trigger
+ sleep 5 # wait for sysrq to take effect
+ else
+ echo "Warning: VM doesn't support sysrq and /sbin/halt not
installed"
+ fi
+ else
+ halt -f -p
+ fi
+ echo "Warning: clean shut down of the VM didn't work"
fi
else
umount -n $BUILD_ROOT/proc/sys/fs/binfmt_misc 2> /dev/null || true
@@ -403,7 +445,8 @@
if test -z "$BASELIBS_CFG" -a -e
$BUILD_ROOT/usr/lib/build/baselibs.conf ; then
BASELIBS_CFG="-c /usr/lib/build/baselibs.conf"
fi
- chroot $BUILD_ROOT /usr/lib/build/mkbaselibs $BASELIBS_GLOBAL
$BASELIBS_CFG $BPKGS || cleanup_and_exit 1
+ echo "RUNNING internal mkbaselibs ... "
+ chroot $BUILD_ROOT su -c "/usr/lib/build/mkbaselibs -v $BASELIBS_GLOBAL
$BASELIBS_CFG $BPKGS" - $BUILD_USER || cleanup_and_exit 1
else
# use external version
rm -rf $BUILD_ROOT/.mkbaselibs
@@ -428,6 +471,28 @@
fi
}

+vm_img_mkfs()
+{
+ local fs="$1"
+ local img="$2"
+ local mkfs tunefs
+ eval "mkfs=\"\$vm_img_mkfs_${fs}\""
+ eval "tunefs=\"\$vm_img_tunefs_${fs}\""
+
+ if test -z "$mkfs"; then
+ echo "filesystem \"$fs\" isn't supported"
+ cleanup_and_exit 3
+ fi
+
+
+ echo "Creating $fs filesystem on $img"
+ $mkfs "$img"
+ if test -n "$tunefs" ; then
+ $tunefs "$img" || cleanup_and_exit 3
+ fi
+
+}
+
detect_vm_2nd_stage()
{
if ! test "$0" = "/.build/build" ; then
@@ -545,7 +610,16 @@
fi
fi

+ if [ ! -w "$BUILD_ROOT" ]; then
+ echo "Error: BUILD_ROOT=$BUILD_ROOT not writeable, try --clean."
+ cleanup_and_exit 3
+ fi
+
rm -rf "$BUILD_ROOT"/.build.packages
+ if [ -z "$RUNNING_IN_VM" ]; then
+ # don't touch this in VM
+ rm -rf "$BUILD_ROOT"/.build
+ fi
}

linux64()
@@ -642,6 +716,10 @@
BUILD_ROOT="$ARG"
shift
;;
+ *-cachedir)
+ CACHE_DIR="$ARG"
+ shift
+ ;;
*-oldpackages)
OLD_PACKAGES="$ARG"
shift
@@ -671,6 +749,26 @@
MEMSIZE="$ARG"
shift
;;
+ *-vm-kernel)
+ VM_KERNEL="$ARG"
+ shift
+ ;;
+ *-vm-initrd)
+ VM_INITRD="$ARG"
+ shift
+ ;;
+ *-vmdisk-rootsize)
+ VMDISK_ROOTSIZE="$ARG"
+ shift
+ ;;
+ *-vmdisk-swapsize)
+ VMDISK_SWAPSIZE="$ARG"
+ shift
+ ;;
+ *-vmdisk-filesystem)
+ VMDISK_FILESYSTEM="$ARG"
+ shift
+ ;;
*-rpmlist)
RPMLIST="--rpmlist $ARG"
BUILD_RPMS=
@@ -764,14 +862,18 @@
shift
;;
--uid)
- ABUILD_ID="$ARG"
- if test -n "${ABUILD_ID//[0-9:]/}"; then
- echo "--uid argument must be uid:gid"
- cleanup_and_exit
+ ABUILD_ID="$ARG"
+ if test -n "${ABUILD_ID//[0-9:]/}"; then
+ echo "--uid argument must be uid:gid"
+ cleanup_and_exit
fi
ABUILD_UID=${ABUILD_ID%:*}
ABUILD_GID=${ABUILD_ID#*:}
- shift
+ shift
+ ;;
+ --shell)
+ shell=1
+ shift
;;
-*)
echo Unknown Option "$PARAM". Exit.
@@ -783,6 +885,8 @@
esac
done

+test -n "$CACHE_DIR" || CACHE_DIR=/var/cache/build
+
if test -n "$KILL" ; then
test -z "$SRCDIR" || usage
if test -n "$VM_IMAGE" -a -n "$VM_SWAP" -a -n "$VM_TYPE"; then
@@ -827,25 +931,46 @@
cleanup_and_exit 3
fi
qemu_bin="$kvm_bin"
- qemu_kernel="$kvm_kernel"
- qemu_initrd="$kvm_initrd"
- if [ ! -e $qemu_initrd-virtio -o $qemu_kernel -nt $qemu_initrd-virtio ];
then
- if [ ! -w /root ]; then
- 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[@]}"
- echo
- elif /sbin/modinfo virtio_pci >/dev/null 2>&1; then
- echo "creating $qemu_initrd-virtio"
- "${mkinitrd_virtio_cmd[@]}" || cleanup_and_exit 1
+ if [ -n "$VM_KERNEL" ]; then
+ qemu_kernel="$VM_KERNEL"
+ fi
+
+ if [ -n "$VM_INITRD" ]; then
+ qemu_initrd="$VM_INITRD"
+ kvm_virtio=1
+ elif [ -e "${qemu_initrd}-build" ]; then
+ qemu_initrd="${qemu_initrd}-build"
+ kvm_virtio=1
+ else
+ if [ -L "$qemu_initrd" ]; then
+ qemu_initrd=`readlink -f "$qemu_initrd"` || cleanup_and_exit 3
+ fi
+ qemu_initrd_virtio="${qemu_initrd}-virtio"
+
+ if [ ! -e ${qemu_initrd_virtio} -o $qemu_kernel -nt
${qemu_initrd_virtio} ]; then
+ mkinitrd_virtio_cmd=(env rootfstype="$VMDISK_FILESYSTEM" \
+ mkinitrd -d /dev/null \
+ -m "binfmt_misc virtio_pci virtio_blk" \
+ -k $qemu_kernel \
+ -i ${qemu_initrd_virtio})
+ if [ ! -w /root -o -n "$RPMLIST" ]; then
+ 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[@]}"
+ echo
+ elif /sbin/modinfo virtio_pci >/dev/null 2>&1; then
+ echo "creating $qemu_initrd_virtio"
+ "${mkinitrd_virtio_cmd[@]}" || cleanup_and_exit 1
+ kvm_virtio=1
+ qemu_initrd="${qemu_initrd_virtio}"
+ fi
+ else
kvm_virtio=1
+ qemu_initrd="${qemu_initrd_virtio}"
fi
- else
- kvm_virtio=1
fi

if [ "$kvm_virtio" = 1 ]; then
- qemu_initrd="$qemu_initrd-virtio"
VM_SWAPDEV=/dev/vdb
qemu_rootdev=/dev/vda
else
@@ -889,7 +1014,7 @@
}
for SPECFILE in $BUILD_ROOT/usr/src/packages/SPECS/*.spec ; do : ; done
fi
- init_buildsystem --list-state "${definesnstuff[@]}" "${repos[@]}"
$USEUSEDFORBUILD $SPECFILE $BUILD_EXTRA_PACKS
+ init_buildsystem --cachedir "$CACHE_DIR" --list-state
"${definesnstuff[@]}" "${repos[@]}" $USEUSEDFORBUILD $SPECFILE
$BUILD_EXTRA_PACKS
ERR=$?
rm -rf $BUILD_ROOT
cleanup_and_exit $ERR
@@ -899,37 +1024,58 @@
if test -n "$VM_IMAGE" ; then
if test "$VM_IMAGE" = 1 ; then
VM_IMAGE="$BUILD_ROOT.img"
+ echo "using $VM_IMAGE as vm image"
+ if test -z "$VM_SWAP"; then
+ VM_SWAP="$BUILD_ROOT.swap"
+ echo "using $VM_SWAP as vm swap"
+ fi
+ fi
+ if test ! -e "$VM_IMAGE"; then
+ echo "Creating $VM_IMAGE (${VMDISK_ROOTSIZE}M)"
+ dd if=/dev/zero of="$VM_IMAGE" bs=1 count=1 seek=$((
${VMDISK_ROOTSIZE} * 1024 * 1024 )) || cleanup_and_exit 3
+ if test -z "$CLEAN_BUILD" ; then
+ vm_img_mkfs "$VMDISK_FILESYSTEM" "$VM_IMAGE" ||
cleanup_and_exit 3
+ fi
+ fi
+ if test ! -e "$VM_SWAP"; then
+ # setup VM_SWAP
+ echo "Creating $VM_SWAP (${VMDISK_SWAPSIZE}M)"
+ dd if=/dev/zero of="$VM_SWAP" bs=1 count=1 seek=$((
${VMDISK_SWAPSIZE} * 1024 * 1024 )) || cleanup_and_exit 3
fi
if test ! -e "$VM_IMAGE" ; then
- echo "you need to create a file system on $VM_IMAGE first"
+ echo "you need to create $VM_IMAGE first"
cleanup_and_exit 3
fi
- fi
- if test -n "$VM_IMAGE" ; then
if test -n "$CLEAN_BUILD" ; then
- echo "Creating filesystem on $VM_IMAGE"
- $vm_img_mkfs $VM_IMAGE || cleanup_and_exit 3
- if test -n "$vm_img_tunefs" ; then
- $vm_img_tunefs $VM_IMAGE || cleanup_and_exit 3
- fi
+ vm_img_mkfs "$VMDISK_FILESYSTEM" "$VM_IMAGE" || cleanup_and_exit 3
fi
mkdir_build_root
if [ -w /root ]; then
mount -o loop $VM_IMAGE $BUILD_ROOT || cleanup_and_exit 3
else
- mount $BUILD_ROOT || cleanup_and_exit 3
+ if ! mount $BUILD_ROOT; then
+ echo "mounting the build root failed. An fstab entry is
probably missing or incorrect."
+ echo "/etc/fstab should contain an entry like this:"
+ echo "$VM_IMAGE $BUILD_ROOT auto noauto,user,loop 0 0"
+ cleanup_and_exit 3
+ fi
fi
else
test -w /root || become_root_or_fail
fi
if test -n "$VM_SWAP" ; then
dd if=/dev/zero of="$VM_SWAP" bs=12 count=1 conv=notrunc 2>/dev/null
+ echo "mkswap $VM_SWAP"
mkswap "$VM_SWAP"
fi
fi

mkdir_build_root

+if [ "$BUILD_ROOT" = / ]; then
+ read dummy dummy browner dummy < <(ls -ld /)
+fi
+
rm -f $BUILD_ROOT/exit

if [ -w /root ]; then
@@ -943,7 +1089,7 @@
LOGFILE="$BUILD_ROOT/.build.log"
fi

-if test -n "$LOGFILE" ; then
+if test -n "$LOGFILE" -a -z "$shell" ; then
echo logging output to $LOGFILE...
rm -f $LOGFILE
touch $LOGFILE
@@ -1051,6 +1197,7 @@
test "$ccache" = '1' && ADDITIONAL_PACKS="$ADDITIONAL_PACKS ccache"
test "$icecream" -gt 1 && ADDITIONAL_PACKS="$ADDITIONAL_PACKS icecream
gcc-c++"
test -n "$DO_LINT" && ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory"
+ test -n "$OLD_PACKAGES" && ADDITIONAL_PACKS="$ADDITIONAL_PACKS
build-compare"

if test -n "$CHANGELOG" -a -z "$RUNNING_IN_VM" ; then
rm -f $BUILD_ROOT/.build-changelog
@@ -1070,7 +1217,7 @@
if test "$DO_INIT" = true ; then
# do fist stage of init_buildsystem
rm -f $BUILD_ROOT/.build.success
- set -- init_buildsystem --prepare "${definesnstuff[@]}"
"${repos[@]}" $CLEAN_BUILD $USEUSEDFORBUILD $RPMLIST "$MYSRCDIR/$SPECFILE"
$ADDITIONAL_PACKS
+ set -- init_buildsystem --cachedir "$CACHE_DIR" --prepare
"${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USEUSEDFORBUILD $RPMLIST
"$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
echo "$* ..."
"$@" || cleanup_and_exit 1
check_exit
@@ -1121,6 +1268,7 @@
echo "CHANGELOG='${CHANGELOG//"'"/$Q}'" >> $BUILD_ROOT/.build/build.data
echo "INCARNATION='${INCARNATION//"'"/$Q}'" >>
$BUILD_ROOT/.build/build.data
echo "DISTURL='${DISTURL//"'"/$Q}'" >> $BUILD_ROOT/.build/build.data
+ echo "DO_INIT='${DO_INIT//"'"/$Q}'" >> $BUILD_ROOT/.build/build.data
# FIXME: this depends on the kernel and vm.
# could be hda2, sda2 for xen or hdb/sdb for qemu
test -n "$VM_SWAP" && echo "VM_SWAP='${VM_SWAPDEV:-/dev/hda2}'" >>
$BUILD_ROOT/.build/build.data
@@ -1138,6 +1286,7 @@
shellquote "${repos[@]}" >> $BUILD_ROOT/.build/build.data
echo ")" >> $BUILD_ROOT/.build/build.data
echo "VM_TYPE='$VM_TYPE'" >> $BUILD_ROOT/.build/build.data
+ echo "shell='$shell'" >> $BUILD_ROOT/.build/build.data
umount -n $BUILD_ROOT/proc/sys/fs/binfmt_misc 2> /dev/null || true
umount -n $BUILD_ROOT/proc 2> /dev/null || true
umount -n $BUILD_ROOT/dev/pts 2> /dev/null || true
@@ -1149,6 +1298,12 @@
umount $BUILD_ROOT || cleanup_and_exit 1
fi

+ if check_use_emulator; then
+ vm_init_script="/.build/initscript_qemu_vm"
+ else
+ vm_init_script="/.build/build"
+ fi
+
if [ "$VM_TYPE" = 'xen' ]; then
XMROOT=file:$VM_IMAGE
XMROOT=${XMROOT/#file:\/dev/phy:/dev}
@@ -1162,15 +1317,6 @@
XENID="${VM_IMAGE%/root}"
XENID="${XENID%/tmpfs}"
XENID="${XENID##*/}"
- CROSS_INIT_SCRIPT="/.build/build"
- # to run the qemu initialization in the XEN chroot, we need to
register it with a statically build shell
- if [ x"$BUILD_ARCH" == xarmv4l -o x"$BUILD_ARCH" == xarmv5el -o
x"$BUILD_ARCH" == xarmv7el -o x"$BUILD_ARCH" == xsh4 -o x"$BUILD_ARCH" == xppc
]; then
- if [ -n "$(uname -m | grep '[x3-6]86')" ]; then
- if [ -e /bin/bash-static -a -e /bin/mount-static ]; then
- CROSS_INIT_SCRIPT="/.build/initscript_qemu_vm"
- fi
- fi
- fi

echo "booting XEN kernel ..."
if xm list "build:$XENID" >/dev/null 2>&1 ; then
@@ -1178,7 +1324,7 @@
echo "Please report to your server admin, there might be
multiple services running for same domain"
cleanup_and_exit 3
fi
- set -- xm create -c $BUILD_DIR/xen.conf name="build:$XENID"
${MEMSIZE:+memory=$MEMSIZE} $XMROOT $XMSWAP extra="quiet
init="$CROSS_INIT_SCRIPT" panic=1 console=ttyS0"
+ set -- xm create -c $BUILD_DIR/xen.conf name="build:$XENID"
${MEMSIZE:+memory=$MEMSIZE} $XMROOT $XMSWAP extra="quiet init="$vm_init_script"
panic=1 console=ttyS0"
if test "$PERSONALITY" != 0 ; then
# have to switch back to PER_LINUX to make xm work
set -- linux64 "$@"
@@ -1187,7 +1333,7 @@
"$@" || cleanup_and_exit 3
elif [ "$VM_TYPE" = 'uml' ]; then
echo "booting UML kernel ..."
- set -- $uml_kernel initrd=$uml_initrd root=/ubda
init=/.build/build panic=1 quiet ubd0=$VM_IMAGE ${MEMSIZE:+mem=$MEMSIZE}
+ set -- $uml_kernel initrd=$uml_initrd root=/ubda
init="$vm_init_script" panic=1 quiet ubd0=$VM_IMAGE ${MEMSIZE:+mem=$MEMSIZE}
echo "$@"
"$@"
elif [ "$VM_TYPE" = 'qemu' -o "$VM_TYPE" = 'kvm' ]; then
@@ -1208,7 +1354,7 @@
set -- $qemu_bin -no-reboot -nographic -net none -serial stdio \
-kernel $qemu_kernel \
-initrd $qemu_initrd \
- -append "root=$qemu_rootdev panic=1 quiet noapic rw
console=ttyS0 init=/.build/build" \
+ -append "root=$qemu_rootdev panic=1 quiet noapic rw
console=ttyS0 init=$vm_init_script" \
${MEMSIZE:+-m $MEMSIZE} \
"${qemu_disks[@]}"

@@ -1231,7 +1377,7 @@
LXCID=${BUILD_ROOT##*/}
lxc-destroy -n "$LXCID" >/dev/null 2>&1 || true
lxc-create -n "$LXCID" -f "$LXCCONF" || cleanup_and_exit 1
- lxc-start -n "$LXCID" /.build/build
+ lxc-start -n "$LXCID" "$vm_init_script"
BUILDSTATUS="$?"
test "$BUILDSTATUS" != 255 || BUILDSTATUS=3
cleanup_and_exit "$BUILDSTATUS"
@@ -1246,20 +1392,24 @@
extractbuild --disk "$VM_IMAGE" --input "$VM_SWAP" --skip 512
-v || cleanup_and_exit 3
# create same layout as with plain chroot
if test "$BUILDTYPE" = spec ; then
- mkdir -p SRPMS
- for i in *src.rpm; do mv "$i" SRPMS/; done
- for i in *.rpm; do
- arch=${i%.rpm}
- arch=${arch##*\.}
- mkdir -p RPMS/$arch
- mv "$i" RPMS/$arch/;
- done
+ mkdir -p SRPMS
+ for i in *src.rpm *.desktopfiles ; do
+ test -e "$i" || continue
+ mv "$i" SRPMS/
+ done
+ for i in *.rpm ; do
+ test -e "$i" || continue
+ arch=${i%.rpm}
+ arch=${arch##*\.}
+ mkdir -p RPMS/$arch
+ mv "$i" RPMS/$arch/
+ done
elif test "$BUILDTYPE" = dsc ; then
- mkdir -p DEBS
- find . -type f | while read i; do mv "$i" DEBS/; done
+ mkdir -p DEBS
+ find . -type f | while read i; do mv "$i" DEBS/; done
else
- mkdir -p KIWI
- find . -type f | while read i; do mv "$i" KIWI/; done
+ mkdir -p KIWI
+ find . -type f | while read i; do mv "$i" KIWI/; done
fi
cleanup_and_exit ${BUILDSTATUS#BUILDSTATUS}
;;
@@ -1284,7 +1434,7 @@
echo "BUILD_INCARNATION=$INCARNATION" > $BUILD_ROOT/.buildenv
CREATE_BUILD_BINARIES=
egrep '^#[ ]*needsbinariesforbuild[ ]*$' >/dev/null
<$MYSRCDIR/$SPECFILE && CREATE_BUILD_BINARIES=--create-build-binaries
- set -- init_buildsystem "${definesnstuff[@]}" "${repos[@]}"
$CLEAN_BUILD $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST
"$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
+ set -- init_buildsystem --cachedir "$CACHE_DIR" "${definesnstuff[@]}"
"${repos[@]}" $CLEAN_BUILD $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST
"$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
echo "$* ..."
"$@" || cleanup_and_exit 1
check_exit
@@ -1296,7 +1446,8 @@
mount -n -tproc none $BUILD_ROOT/proc || true
mount -n -tdevpts none $BUILD_ROOT/dev/pts
if [ -d "$OLD_PACKAGES" ]; then
- [ -d "$BUILD_ROOT/.build.oldpackages" ] || cp -r $OLD_PACKAGES
$BUILD_ROOT/.build.oldpackages
+ rm -rf "$BUILD_ROOT/.build.oldpackages"
+ cp -r $OLD_PACKAGES $BUILD_ROOT/.build.oldpackages
fi
fi

@@ -1347,7 +1498,7 @@
echo "abuild::${ABUILD_UID}:${ABUILD_GID}:..."
echo "build aborting"
cleanup_and_exit 1
- fi
+ 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
@@ -1376,6 +1527,10 @@

if test "$BUILDTYPE" = spec ; then
TOPDIR=`chroot $BUILD_ROOT su -c "rpm --eval '%_topdir'" - $BUILD_USER`
+ if test -z "$TOPDIR"; then
+ echo "Error: TOPDIR empty"
+ cleanup_and_exit 1
+ fi
else
TOPDIR=/usr/src/packages
mkdir -p $BUILD_ROOT$TOPDIR
@@ -1465,6 +1620,7 @@
# this is restricted to arm to make sure it doesn't interfere with x86
if [ "$BUILD_ARCH" != "${BUILD_ARCH#arm}" ]; then
echo "changing targetarch"
+ chmod a+x $BUILD_DIR/getchangetarget || cleanup_and_exit 1
CHANGETARGET=$(getchangetarget --dist "$BUILD_DIST" --configdir
"$BUILD_DIR/configs" --archpath "$BUILD_ARCH" )
echo "NEW TARGET: $CHANGETARGET"
fi
@@ -1607,7 +1763,11 @@
> $BUILD_ROOT/.build.command
chmod 755 $BUILD_ROOT/.build.command
check_exit
- chroot $BUILD_ROOT su -c /.build.command - $BUILD_USER < /dev/null &&
BUILD_SUCCEEDED=true
+ if test -n "$shell"; then
+ chroot $BUILD_ROOT su -
+ else
+ chroot $BUILD_ROOT su -c /.build.command - $BUILD_USER < /dev/null
&& BUILD_SUCCEEDED=true
+ fi
fi

if test "$BUILDTYPE" = dsc ; then
@@ -1620,7 +1780,12 @@
DSC_BUILD_CMD="source $TOPDIR/SOURCES/build.script"
chmod +x $BUILD_ROOT/$TOPDIR/SOURCES/build.script
fi
- chroot $BUILD_ROOT su -c "cd $TOPDIR/BUILD && $DSC_BUILD_CMD" -
$BUILD_USER < /dev/null && BUILD_SUCCEEDED=true
+
+ if test -n "$shell"; then
+ chroot $BUILD_ROOT su -
+ else
+ chroot $BUILD_ROOT su -c "cd $TOPDIR/BUILD && $DSC_BUILD_CMD" -
$BUILD_USER < /dev/null && BUILD_SUCCEEDED=true
+ fi

mkdir -p $BUILD_ROOT/$TOPDIR/DEBS
for DEB in $BUILD_ROOT/$TOPDIR/*.deb ; do
@@ -1692,8 +1857,8 @@
# (and force distro version if CREATE_BASELIBS=internal)
if test -f $BUILD_ROOT/usr/lib/build/mkbaselibs -o "$CREATE_BASELIBS" !=
internal ; then
mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
+ test $BUILD_USER = abuild && chown ${ABUILD_UID}:${ABUILD_GID}
$BUILD_ROOT$TOPDIR/*
create_baselibs
- umount -n $BUILD_ROOT/proc 2> /dev/null
fi
fi

@@ -1718,6 +1883,7 @@

if test -n "$RPMS" -a -d "$BUILD_ROOT/$TOPDIR/RPMS" -a -d
"$BUILD_ROOT/.build.oldpackages" -a -x
"$BUILD_ROOT/usr/lib/build/same-build-result.sh" ; then
echo "... comparing built packages with the former built"
+ mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
# exit with 2, if packages built successfull, but have no changes to
former built packages.
if chroot $BUILD_ROOT /usr/lib/build/same-build-result.sh
/.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS"; then
cleanup_and_exit 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/build_kiwi.sh
new/build-2010.04.15/build_kiwi.sh
--- old/build-2010.03.10/build_kiwi.sh 2010-03-10 14:33:28.000000000 +0100
+++ new/build-2010.04.15/build_kiwi.sh 2010-04-09 15:57:18.000000000 +0200
@@ -199,7 +199,7 @@
cat > $BUILD_ROOT/kiwi_post.sh << EOF
echo "compressing pxe images... "
cd /$TOPDIR/KIWI-pxe
-tar cvjfS "/$TOPDIR/KIWI/$imageout$buildnum-pxe.tar.bz2" "$imageout"* initrd-*"
+tar cvjfS "/$TOPDIR/KIWI/$imageout$buildnum-pxe.tar.bz2" ${imageout}* initrd-*
echo "Create sha256 file..."
cd $TOPDIR/KIWI
sha256sum "$imageout$buildnum-pxe.tar.bz2" >
"$imageout$buildnum-pxe.tar.bz2.sha256"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/common_functions
new/build-2010.04.15/common_functions
--- old/build-2010.03.10/common_functions 2010-03-10 14:33:28.000000000
+0100
+++ new/build-2010.04.15/common_functions 2010-04-08 14:53:50.000000000
+0200
@@ -39,3 +39,34 @@
cleanup_and_exit 1
fi
}
+
+is_emulator_arch()
+{
+ local arch
+ for arch in $EMULATOR_ARCHS; do
+ if test "$BUILD_ARCH" = "$arch" -a "$BUILD_HOST_ARCH" != "$arch"; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+check_use_emulator()
+{
+ is_emulator_arch || return
+
+ # to run the qemu initialization in the XEN chroot, we need to register it
with a statically build shell
+ case "$BUILD_HOST_ARCH" in
+ i?86|x86_64)
+ if test -e /bin/bash-static \
+ -a -e /bin/mount-static \
+ -a -e /usr/sbin/qemu-binfmt-conf.sh; then
+ return 0
+ else
+ # XXX: error?
+ echo "Warning: cross compile not possible due to missing static
binaries"
+ fi
+ ;;
+ esac
+ return 1
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/createrepomddeps
new/build-2010.04.15/createrepomddeps
--- old/build-2010.03.10/createrepomddeps 2010-01-27 13:50:58.000000000
+0100
+++ new/build-2010.04.15/createrepomddeps 2010-04-09 13:42:07.000000000
+0200
@@ -9,6 +9,11 @@
use Data::Dumper;
use Getopt::Long;
use Build::Rpm;
+use Digest::MD5 qw(md5 md5_hex md5_base64);
+use File::Path qw(mkpath rmtree);
+use File::Basename;
+use LWP::UserAgent;
+use URI;
Getopt::Long::Configure("no_ignore_case");

my @parent = [];
@@ -21,6 +26,7 @@
my $opt_old;
my $opt_nosrc;
my $opt_bc;
+my $cachedir = "/var/cache/build";

my $old_seen = ();

@@ -342,12 +348,23 @@
}
}

+sub getmetadata
+{
+ my $url = $_[0];
+ my $dir = $_[1];
+
+ my $dest = $dir . "repodata";
+ mkpath($dest);
+ system($INC[0].'/download', $dest, $url . "repodata/repomd.xml");
+}
+
### main

GetOptions (
"nosrc" => \$opt_nosrc,
"dump" => \$opt_dump,
"old" => \$opt_old,
+ "cachedir=s" => \$cachedir,
) or exit(1);

$opt_bc = 1 unless ($opt_dump || $opt_old);
@@ -378,6 +395,11 @@
} else {
die "unsupported repo type: $type\n";
}
+ } elsif ($url =~ /^http:\/\/([^\/]*)\/?/) {
+ my $repoid = md5_hex($url);
+ $dir = "$cachedir/$repoid/";
+ getmetadata($url, $dir);
+ $baseurl = $url;
} else {
$dir = $url;
$dir .= '/' unless $dir =~ /\/$/;
@@ -395,6 +417,9 @@
@cursor = ([undef, $primaryparser]);

my $u = $dir . $f->{'location'};
+ if ($url =~ /^http:\/\/([^\/]*)\/?/) {
+ system($INC[0].'/download', $dir . "repodata/", $baseurl . "repodata/"
. basename($u));
+ }
$u = 'gzip -cd ' . $u . '|' if ($u =~ /\.gz$/); # XXX

my $fh;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/init_buildsystem
new/build-2010.04.15/init_buildsystem
--- old/build-2010.03.10/init_buildsystem 2010-03-10 14:33:28.000000000
+0100
+++ new/build-2010.04.15/init_buildsystem 2010-04-09 13:42:07.000000000
+0200
@@ -76,6 +76,10 @@
CLEAN_BUILD="$1"
shift
;;
+ --cachedir)
+ CACHE_DIR="$2"
+ shift 2
+ ;;
*)
break
;;
@@ -285,6 +289,9 @@
test -z "$SRC" && SRC=`pwd`
if [ "${SRC#zypp://}" != "$SRC" ]; then
set -- $BUILD_DIR/createrepomddeps "$SRC"
+ elif [ "${SRC#http://}"; != "$SRC" -o "${SRC#https://}"; != "$SRC" -o
"${SRC#ftp://}"; != "$SRC" -o "${SRC#ftps://}" != "$SRC" ]; then
+ mkdir -p "$(getcachedir "$SRC")"
+ set -- $BUILD_DIR/createrepomddeps --cachedir="$CACHE_DIR"
"$SRC"
elif [ ! -e "$SRC" ]; then
echo "*** $SRC does not exist" >&2
cleanup_and_exit 1
@@ -304,30 +311,33 @@
fi
}

-function register_qemu_user {
#
# Detect cross-build (fixed code) and copy qemus for cross-build emulation mode
# And copy also a static host binary shell to run the init scripts in the
target chroot
#
-if [ x"$BUILD_ARCH" == xarmv4l -o x"$BUILD_ARCH" == xarmv5el -o x"$BUILD_ARCH"
== xarmv7el -o x"$BUILD_ARCH" == xsh4 -o x"$BUILD_ARCH" == xppc ]; then
- if [ -n "$(uname -m | grep '[x3-6]86')" ]; then
- if [ -e /usr/sbin/qemu-binfmt-conf.sh ]; then
- (mkdir -p $BUILD_ROOT/usr/bin $BUILD_ROOT/usr/sbin && set -x && cp
/usr/bin/qemu-* $BUILD_ROOT/usr/bin && cp /usr/sbin/qemu-binfmt-conf.sh
$BUILD_ROOT/usr/sbin)
- fi
- # To initially run the init script, there needs to be also a static
bash to register qemu in this chroot and though to start up /.build/build
- if [ -e /bin/bash-static -a -e /bin/mount-static ]; then
- (mkdir -p $BUILD_ROOT/bin && set -x && cp /bin/bash-static
$BUILD_ROOT/bin && cp /bin/mount-static $BUILD_ROOT/bin)
- fi
- if [ -e /proc/sys/fs/binfmt_misc/arm -o -e
/proc/sys/fs/binfmt_misc/armeb -o -e /proc/sys/fs/binfmt_misc/sh4 ]; then
- echo "qemu-* already registered"
- else
- if [ -e /usr/sbin/qemu-binfmt-conf.sh ]; then
- echo "qemu-* will be registered"
- (set -x && /usr/sbin/qemu-binfmt-conf.sh)
- fi
+copy_qemu()
+{
+ echo "copying qemu"
+ mkdir -p $BUILD_ROOT/usr/bin $BUILD_ROOT/usr/sbin
+ install -m755 /usr/bin/qemu-* $BUILD_ROOT/usr/bin
+ install -m755 /usr/sbin/qemu-binfmt-conf.sh $BUILD_ROOT/usr/sbin
+ # To initially run the init script, there needs to be also a
+ # static bash to register qemu in this chroot and to start up
+ # /.build/build
+ mkdir -p $BUILD_ROOT/bin
+ install -m755 /bin/bash-static $BUILD_ROOT/bin
+ install -m755 /bin/mount-static $BUILD_ROOT/bin
+}
+
+check_binfmt_registered()
+{
+ local arch
+ for arch in arm $EMULATOR_ARCHS; do
+ if test -e /proc/sys/fs/binfmt_misc/$arch; then
+ return 0
fi
- fi
-fi
+ done
+ return 1
}

fail_exit()
@@ -336,13 +346,26 @@
}

# modify $SRC
-download_zypp()
+downloadpkg()
{
local url="$1"
- local zd="/var/cache/zypp/packages/"
- SRC=$zd${url#zypp://}
+ local cachedir
+
+ if [ "${url:0:7}" == "zypp://" ] ; then
+ cachedir="/var/cache/zypp/packages/"
+ SRC="$cachedir${url#zypp://}"
+ mkdir -p "$(dirname $SRC)"
+ elif [ "${url:0:7}" == "http://"; -o "${url:0:8}" == "https://"; -o
"${url:0:6}" == "ftp://"; -o "${url:0:7}" == "ftps://" ] ; then
+ cachedir="$(getcachedir "$url")"
+ local name="$(basename "$url")"
+ SRC="$cachedir/$name"
+ else
+ echo "Invalid url: $url"
+ cleanup_and_exit 1
+ fi
+
if [ ! -e "$SRC" ]; then
- local destdir="$zd/tmp"
+ local destdir="$cachedir/tmp"
mkdir -p "$destdir"
echo "downloading $url ... ";
$BUILD_DIR/download "$destdir" "$url" || cleanup_and_exit 1
@@ -361,6 +384,27 @@
fi
}

+getcachedir()
+{
+ url=$1
+ for repo in "${repos[@]}" ; do
+ if [ "${url:0:${#repo}}" == "$repo" ] ; then
+ read repoid dummy < <(echo -n "$repo" | md5sum)
+ echo "$CACHE_DIR/$repoid"
+ break
+ fi
+ done
+}
+
+get_pkg_filename()
+{
+ local url="$1"
+ local name=$(basename $url)
+ local cachedir=$(getcachedir $url)
+ local destfile="$cachedir/$name"
+ echo $destfile
+}
+
set_build_arch

trap fail_exit EXIT
@@ -400,12 +444,6 @@
fi

#
-# register the QEMU emulator
-# reset mmap_min_addr for QEMU
-#
-register_qemu_user
-
-#
# store that we start to build system
#
mkdir -p $BUILD_ROOT
@@ -462,6 +500,23 @@
cleanup_and_exit 0
fi

+ #
+ # copy the QEMU emulator
+ #
+ if check_use_emulator; then
+ copy_qemu
+ if [ -z "$PREPARE_VM" ]; then
+ if ! check_binfmt_registered; then
+ echo "registering binfmt handlers"
+ /usr/sbin/qemu-binfmt-conf.sh
+ fi
+ read mmap_min_addr < /proc/sys/vm/mmap_min_addr
+ if [ "$mmap_min_addr" != 0 ]; then
+ echo "Warning: mmap_min_addr is != 0. If programs fail at mmap
this could be the reason"
+ fi
+ fi
+ fi
+
PACKAGES_TO_INSTALL=
PACKAGES_TO_PREINSTALL=
PACKAGES_TO_RUNSCRIPTS=
@@ -494,8 +549,8 @@
if [ "${SRC#/}" = "$SRC" ]; then
url="$SRC"
case "$url" in
- zypp://*)
- download_zypp "$url"
+ zypp://* | http://* | https://* | ftp://* | ftps://*)
+ downloadpkg "$url"
;;
*)
echo "unsupported url: $url" >&2
@@ -503,6 +558,7 @@
;;
esac
fi
+ # downloadpkg modified $SRC, so it has a right name for use
ln -s "$SRC" "$BUILD_ROOT/.init_b_cache/rpms/$PKG.${SRC##*.}"
PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $PKG"
done < $RPMLIST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/initscript_qemu_vm
new/build-2010.04.15/initscript_qemu_vm
--- old/build-2010.03.10/initscript_qemu_vm 2010-01-03 13:59:11.000000000
+0100
+++ new/build-2010.04.15/initscript_qemu_vm 2010-04-09 16:54:56.000000000
+0200
@@ -7,8 +7,16 @@
if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
mount-static -n binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
fi
-# register arm
-echo
':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:'
/proc/sys/fs/binfmt_misc/register
-echo
':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:'
/proc/sys/fs/binfmt_misc/register
+# register arm, ppc, mips

-exec /.build/build
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':mipsn32el: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-mipsn32el:'
/proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+echo
':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:'
> /proc/sys/fs/binfmt_misc/register
+
+exec /.build/build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/test/common
new/build-2010.04.15/test/common
--- old/build-2010.03.10/test/common 2010-03-10 14:33:28.000000000 +0100
+++ new/build-2010.04.15/test/common 2010-04-08 14:53:50.000000000 +0200
@@ -22,12 +22,12 @@
. ${0%/*}/config.local
fi

-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
-if [ ! -e "$build_vm_swap" ]; then
- sudo dd if=/dev/zero of="$build_vm_swap" bs=512 count=0
seek=$((build_vm_swap_size*2*1024))
-fi
+#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
+#if [ ! -e "$build_vm_swap" ]; then
+# sudo dd if=/dev/zero of="$build_vm_swap" bs=512 count=0
seek=$((build_vm_swap_size*2*1024))
+#fi

die()
{
@@ -74,12 +74,10 @@
enable_kvm()
{
test -w /dev/kvm || skip "no kvm support"
- set -- "${build_args[@]}" \
- --kvm "${build_vm_img}" \
- --swap "${build_vm_swap}" \
- --memory "$build_vm_mem"
-
- build_args=("$@")
+ build_args+=(--kvm)
+ [ -z "$build_vm_img" ] || build_args+=("$build_vm_img")
+ [ -z "$build_vm_swap" ] || build_args+=(--swap "$build_vm_swap")
+ [ -z "$build_vm_mem" ] || build_args+=(--memory "$build_vm_mem")
}

run_build()
@@ -88,14 +86,15 @@
if [ "$i" = '--kvm' ]; then
enable_kvm
else
- build_args[${#build_args[@]}]="$i";
+ build_args+=("$i")
fi
done
set -- $linux32 sudo env \
/usr/bin/build \
--root "${build_root}" \
"${repos[@]}" \
- "${build_args[@]}"
+ "${build_args[@]}" \
+ "$@"
echo "$@"
"$@" || fail
find $build_root/.build.packages/ -type f -name '*.rpm' -print0 | xargs
--no-run-if-empty -0 rpm -K || fail
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/build-2010.03.10/test/config
new/build-2010.04.15/test/config
--- old/build-2010.03.10/test/config 2010-01-03 13:59:11.000000000 +0100
+++ new/build-2010.04.15/test/config 2010-04-08 14:53:50.000000000 +0200
@@ -1,8 +1,8 @@
#!/bin/bash

: ${build_root:=/abuild/build-root}
-: ${build_vm_img:=/abuild/build-root.img}
-: ${build_vm_swap:=/abuild/build-root.swap}
+#: ${build_vm_img:=/abuild/build-root.img}
+#: ${build_vm_swap:=/abuild/build-root.swap}
: ${build_vm_mem:=256}
: ${build_vm_image_size:=500}
: ${build_vm_swap_size:=100}

++++++ build.dsc ++++++
--- /var/tmp/diff_new_pack.IzTDpR/_old 2010-04-15 23:52:32.000000000 +0200
+++ /var/tmp/diff_new_pack.IzTDpR/_new 2010-04-15 23:52:32.000000000 +0200
@@ -1,6 +1,6 @@
Format: 1.0
Source: build
-Version: 2010.03.10
+Version: 2010.04.15
Binary: build
Maintainer: Adrian Schroeter <adrian@xxxxxxx>
Architecture: all


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



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread