Hello community,
here is the log from the commit of package build for openSUSE:Factory checked in at 2013-05-18 09:20:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-04-02 20:26:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.build.new/build.changes 2013-05-18 09:20:41.000000000 +0200
@@ -1,0 +2,47 @@
+Fri May 17 09:24:49 UTC 2013 - adrian@suse.de
+
+- fix a number of issues regarding statistics collection
+ => works with more udev versions now
+
+-------------------------------------------------------------------
+Wed May 15 16:17:04 UTC 2013 - adrian@suse.de
+
+- fix qemu-binfmt registration in chroot builds
+
+-------------------------------------------------------------------
+Tue May 14 10:52:18 UTC 2013 - adrian@suse.de
+
+- debian builds call linitian now if installed
+- Arch Linux: support new pacman tool syntax
+- support kiwi installation medias with new kiwi versions
+- fixed regression using build host rpm instead of the version from chroot
+- fixed repository priority ordering, when only some repos have a priority
+ and kiwi appliances get build
+
+-------------------------------------------------------------------
+Wed May 8 11:12:37 UTC 2013 - adrian@suse.de
+
+- support multi architecture initvm binaries
+ => vminit gets build as subpackage now again
+- De-hardcode hugetlbfs from ppc
+- Do not emulate VGA
+- support new nameing scheme of install images of kiwi builds
+
+-------------------------------------------------------------------
+Mon Apr 29 07:40:19 UTC 2013 - adrian@suse.de
+
+- disabling fsync again for newer rpm versions to speed up
+ installation phase again.
+
+-------------------------------------------------------------------
+Fri Apr 26 11:35:37 UTC 2013 - adrian@suse.de
+
+- cloud support for Amanzon EC2 and openstack
+- fixed SPEC_REL support
+- fixed zvm build
+- fixed uml support
+- fixing ext4 usage on old distros
+- final openSUSE 12.3 config
+- arm build support fixes
+
+-------------------------------------------------------------------
@@ -7,0 +55,10 @@
+
+-------------------------------------------------------------------
+Fri Mar 8 09:43:58 UTC 2013 - adrian@suse.de
+
+- fix kvm support for x86_64 again
+
+-------------------------------------------------------------------
+Mon Mar 4 11:03:17 UTC 2013 - adrian@suse.de
+
+- avoid writing out incomplete IO statistics
Old:
----
build-initvm.changes
build-initvm.spec
obs-build-20130402.tar.gz
New:
----
obs-build-20130517.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.D2djI8/_old 2013-05-18 09:20:42.000000000 +0200
+++ /var/tmp/diff_new_pack.D2djI8/_new 2013-05-18 09:20:42.000000000 +0200
@@ -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: 20130402
+Version: 20130517
Release: 0
#!BuildIgnore: build-mkbaselibs
Source: obs-build-%{version}.tar.gz
@@ -85,12 +85,40 @@
%endif
+%define initvm_arch %{_host_cpu}
+%if %{_host_cpu} == "i686"
+%define initvm_arch i586
+%endif
+%package initvm-%{initvm_arch}
+Summary: Virtualization initializer for emulated cross architecture builds
+Group: Development/Tools/Building
+Requires: build
+BuildRequires: gcc
+BuildRequires: glibc-devel
+Provides: build-initvm
+Obsoletes: build-initvm
+%if 0%{?suse_version} > 1200
+BuildRequires: glibc-devel-static
+%endif
+
+%description initvm-%{initvm_arch}
+This package provides a script for building RPMs for SUSE Linux in a
+chroot or a secure virtualized
+
%prep
%setup -q -n obs-build-%version
%build
+make CFLAGS="$RPM_BUILD_FLAGS" initvm-all
%install
+# initvm
+make DESTDIR=$RPM_BUILD_ROOT initvm-install
+strip $RPM_BUILD_ROOT/usr/lib/build/initvm.*
+export NO_BRP_STRIP_DEBUG="true"
+chmod 0644 $RPM_BUILD_ROOT/usr/lib/build/initvm.*
+
+# main
make DESTDIR=$RPM_BUILD_ROOT install
cd $RPM_BUILD_ROOT/usr/lib/build/configs/
%if 0%{?suse_version}
@@ -110,7 +138,9 @@
/usr/bin/buildvc
/usr/bin/unrpm
/usr/lib/build
+%config(noreplace) /usr/lib/build/emulator/emulator.sh
%{_mandir}/man1/build.1*
+%exclude /usr/lib/build/initvm.*
%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
%exclude /usr/lib/build/mkbaselibs
@@ -129,4 +159,8 @@
/usr/lib/build/mkdrpms
%endif
+%files initvm-%{initvm_arch}
+%defattr(-,root,root)
+/usr/lib/build/initvm.*
+
%changelog
++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.D2djI8/_old 2013-05-18 09:20:42.000000000 +0200
+++ /var/tmp/diff_new_pack.D2djI8/_new 2013-05-18 09:20:42.000000000 +0200
@@ -1,6 +1,6 @@
pkgname=build
-pkgver=20130227
-pkgrel=1
+pkgver=20130517
+pkgrel=0
pkgdesc="Build packages in sandbox"
arch=('i686' 'x86_64')
url="https://www.github.com/openSUSE/obs-build"
@@ -8,7 +8,7 @@
groups=('base-devel')
depends=('perl')
source=(obs-build-${pkgver}.tar.gz)
-md5sums=('3db9a882f3c7c57c0a89833230324c66')
+md5sums=('3c25d0531aec60b2b984138a566799f8')
package() {
msg "Installing build ..."
++++++ build.dsc ++++++
--- /var/tmp/diff_new_pack.D2djI8/_old 2013-05-18 09:20:42.000000000 +0200
+++ /var/tmp/diff_new_pack.D2djI8/_new 2013-05-18 09:20:42.000000000 +0200
@@ -1,12 +1,9 @@
Format: 1.0
Source: build
-Version: 20130402
+Version: 20130517
Binary: build
Maintainer: Adrian Schroeter
Architecture: all
Standards-Version: 3.7.2
-Build-Depends: debhelper (>= 7)
-VCS-Git: git://github.com/openSUSE/obs-build.git
-VCS-Browser: https://github.com/openSUSE/obs-build
-Homepage: https://build.opensuse.org/package/show?package=build&project=openSUSE%3ATools
+Build-Depends: debhelper (>= 4)
++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.D2djI8/_old 2013-05-18 09:20:42.000000000 +0200
+++ /var/tmp/diff_new_pack.D2djI8/_new 2013-05-18 09:20:42.000000000 +0200
@@ -1,32 +1,3 @@
-build (2012.08.24-1) unstable; urgency=low
-
- * update to current git
- - fixed arch PKGBUILD parsing
- - add .qcow2 file handling for kiwi
- - support root tar ball output format of kiwi
-
- -- Michael Schroeder Fri, 24 Aug 2012 14:06:31 +0200
-
-build (2012.07.19-2) unstable; urgency=low
-
- * fix version in debian.changelog
- * misc updates for debian/*
- - Use debhelper compat level 7 (lenny)
- - Add some informational headers to control
- - Simplify rules file by using dh
- - Convert copyright file to UTF-8
-
- -- Frank Lichtenheld Tue, 24 Jul 2012 00:13:28 +0200
-
-build (2012.07.19-1) unstable; urgency=low
-
- * update 12.2 config to RC1 state
- * add 12.3 config to fix build for factory
- * do not package compressed _and_ uncompressed kiwi images
- * add build timestamps in each logfile line
-
- -- Adrian Schroeter Thu, 19 Jul 2010 10:03:54 +0200
-
build (2011.10.10-1) unstable; urgency=low
* Update to current git trunk
++++++ debian.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/compat new/debian/compat
--- old/debian/compat 2012-07-23 23:07:59.000000000 +0200
+++ new/debian/compat 2007-03-02 21:05:45.000000000 +0100
@@ -1 +1 @@
-7
+4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/control new/debian/control
--- old/debian/control 2012-07-23 23:11:19.000000000 +0200
+++ new/debian/control 2009-12-09 09:47:57.000000000 +0100
@@ -2,15 +2,12 @@
Section: devel
Priority: optional
Maintainer: Adrian Schroeter
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 4)
Standards-Version: 3.7.2
-VCS-Git: git://github.com/openSUSE/obs-build.git
-VCS-Browser: https://github.com/openSUSE/obs-build
-Homepage: https://build.opensuse.org/package/show?package=build&project=openSUSE%3ATools
Package: build
Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, rpm
+Depends: ${perl:Depends}, rpm
Recommends: rpm2cpio
Description: A script to build SUSE Linux RPMs
This package provides a script for building RPMs for SUSE Linux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/copyright new/debian/copyright
--- old/debian/copyright 2012-07-23 23:07:45.000000000 +0200
+++ new/debian/copyright 2007-06-13 17:17:20.000000000 +0200
@@ -4,11 +4,11 @@
It was downloaded from http://software.opensuse.org/download/openSUSE:/Tools/SUSE_Linux_Factory/src
Upstream authors: Thorsten Kukuk
- Michael Schröter
+ Michael Schr�ter
Bernhard Kaindl
Mad Martin Jorgensen
Andreas Schwab
- Rüdiger Oertel
+ R�diger Oertel
Andreas Gruenbacher
Copyright: (c) 1997-2007 SuSE GmbH Nuernberg, Germany
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/rules new/debian/rules
--- old/debian/rules 2012-07-23 23:52:33.000000000 +0200
+++ new/debian/rules 2009-11-12 15:22:36.000000000 +0100
@@ -1,7 +1,65 @@
#!/usr/bin/make -f
# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany
+# This file and all modifications and additions to the pristine package
+# are under the same license as the package itself.
+#
+# Please submit bugfixes or commens via http://bugs.opensuse.org
+
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-%:
- dh $@
+SHELL=/bin/bash
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ make DESTDIR=$(CURDIR)/debian/build install
+
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-indep: build install
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
++++++ obs-build-20130402.tar.gz -> obs-build-20130517.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/Build/Kiwi.pm new/obs-build-20130517/Build/Kiwi.pm
--- old/obs-build-20130402/Build/Kiwi.pm 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/Build/Kiwi.pm 2013-05-17 11:24:45.000000000 +0200
@@ -175,6 +175,15 @@
}
}
+ # set default values for priority
+ for (@{$kiwi->{'repository'} || []}) {
+ next if defined $_->{'priority'};
+ if ($preferences->[0]->{'packagemanager'}->[0]->{'_content'} eq 'smart') {
+ $_->{'priority'} = 0;
+ } else {
+ $_->{'priority'} = 99;
+ }
+ }
my @repositories = sort {$a->{'priority'} <=> $b->{'priority'}} @{$kiwi->{'repository'} || []};
if ($preferences->[0]->{'packagemanager'}->[0]->{'_content'} eq 'smart') {
@repositories = reverse @repositories;
@@ -189,7 +198,10 @@
# Find packages and possible additional required architectures
my @additionalarchs;
my @pkgs;
- push @pkgs, @{$kiwi->{'packages'}->[0]->{'package'}} if $kiwi->{'packages'};
+ for my $packages (@{$kiwi->{'packages'}}) {
+ next if $packages->{'type'} and $packages->{'type'} ne 'image' and $packages->{'type'} ne 'bootstrap';
+ push @pkgs, @{$packages->{'package'}} if $packages->{'package'};
+ }
if ($instsource) {
push @pkgs, @{$instsource->{'metadata'}->[0]->{'repopackage'} || []} if $instsource->{'metadata'};
push @pkgs, @{$instsource->{'repopackages'}->[0]->{'repopackage'} || []} if $instsource->{'repopackages'};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/Makefile new/obs-build-20130517/Makefile
--- old/obs-build-20130402/Makefile 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/Makefile 2013-05-17 11:24:45.000000000 +0200
@@ -3,6 +3,8 @@
DATE=$(shell date +%Y%m%d%H%M)
BUILD=build
+INITVM_ARCH=$(shell bash detect_architecture.sh)
+
ifeq ($(SCM),svn)
SVNVER=_SVN$(shell LANG=C svnversion .)
endif
@@ -77,7 +79,7 @@
# build-initvm-static) whereas the build scripts package is noarch.
initvm: initvm.c
- $(CC) -o $@ -static $(CFLAGS) initvm.c
+ $(CC) -o $@.$(INITVM_ARCH) -static $(CFLAGS) initvm.c
initvm-all: initvm
@@ -85,7 +87,7 @@
initvm-install: initvm
install -m755 -d $(DESTDIR)$(pkglibdir)
- install -m755 initvm $(DESTDIR)$(pkglibdir)/initvm
+ install -m755 initvm.$(INITVM_ARCH) $(DESTDIR)$(pkglibdir)/initvm.$(INITVM_ARCH)
dist:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/build new/obs-build-20130517/build
--- old/obs-build-20130402/build 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/build 2013-05-17 11:24:45.000000000 +0200
@@ -28,8 +28,10 @@
old_packages=()
# defaults for vm_img_mkfs
-vm_img_mkfs_ext4='mkfs.ext4 -m 0 -q -F'
-vm_img_tunefs_ext4='tune2fs -c 0 -O ^has_journal'
+vm_img_mkfs_ext4_options='-O ^has_journal,^huge_file,^resize_inode,sparse_super'
+vm_img_mkfs_ext4_extra='-E lazy_itable_init,discard'
+vm_img_mkfs_ext4="mkfs.ext4 -m 0 -q -F $vm_img_mkfs_ext4_options"
+vm_img_tunefs_ext4='tune2fs -c 0'
vm_img_mkfs_ext3='mkfs.ext3 -m 0 -q -F'
vm_img_tunefs_ext3='tune2fs -c 0 -o journal_data_writeback'
vm_img_mkfs_ext2='mkfs.ext2 -m 0 -q -F'
@@ -112,6 +114,8 @@
HOST_ARCH=
EMULATOR_SCRIPT=
KVM_OPTIONS=
+BUILD_EC2_TYPE="t1.micro"
+
# This is for insserv
export YAST_IS_RUNNING=instsys
@@ -285,6 +289,12 @@
--lxc
Use Linux Containers to isolate the process. This may not be 100% safe.
+ --openstack
+ Cloud build
+
+ --ec2
+ Cloud build
+
--emulator
Use any generic emulator to isolate the build process. You need to write
an emulator/emulator.sh script and put it next to the build script sources.
@@ -295,7 +305,7 @@
--vm-type TYPE
Use virtual machine instead of chroot
- TYPE is one of xen|kvm|uml|qemu|lxc|zvm
+ TYPE is one of xen|kvm|uml|qemu|lxc|zvm|openstack|ec2
--vm-worker GUEST
GUEST is a z/VM build worker controlled by the controlling
@@ -305,6 +315,12 @@
Each worker in z/VM needs a uniq number. This is needed to
calculate uniq device addresses for root and swap device.
+ --vm-region NAME
+ EC2 only: defines amazon control server
+
+ --vm-server NAME
+ openstack only: defines control server name
+
--vm-disk FILE
Use FILE as disk for virtual machine.
Defaults to \$BUILD_ROOT.img if unset
@@ -387,12 +403,24 @@
echo "Warning: clean shut down of the VM didn't work"
fi
else
+ # nop if unused
+ cloud_volume_detach "$VM_SERVER" "$VM_VOLUME_NAME"
+ cloud_volume_detach "$VM_SERVER" "$VM_VOLUME_SWAP"
+ cloud_volume_detach "$VM_SERVER" "$EC2_EXTRACT_VOLUME_root"
+ cloud_volume_detach "$VM_SERVER" "$EC2_EXTRACT_VOLUME_swap"
+
+ [ -n "$EC2_SNAP_root" ] && ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_root"
+ [ -n "$EC2_SNAP_swap" ] && ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_swap"
+ [ -n "$EC2_EXTRACT_VOLUME_root" ] && ec2-delete-volume --region "$BUILD_EC2_REGION" "$EC2_EXTRACT_VOLUME_root"
+ [ -n "$EC2_EXTRACT_VOLUME_swap" ] && ec2-delete-volume --region "$BUILD_EC2_REGION" "$EC2_EXTRACT_VOLUME_swap"
+
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
test "$VM_IMAGE" = 1 && VM_IMAGE=
[ -n "$VM_IMAGE" ] && umount $BUILD_ROOT 2>/dev/null || true
fi
+
# echo "pid $$ exit $1"
exit $1
}
@@ -433,7 +461,7 @@
test -e $BUILD_ROOT/usr/bin/$i || continue
echo '#! /bin/sh' > $BUILD_ROOT/var/lib/build/ccache/bin/$i
echo "test -e /usr/bin/$i || exit 1" >> $BUILD_ROOT/var/lib/build/ccache/bin/$i
- echo 'export PATH=/usr/lib/icecream/bin:/opt/icecream/bin:/usr/bin:$PATH' >> $BUILD_ROOT/var/lib/build/ccache/bin/$i
+ echo 'export PATH=/usr/lib/icecc/bin:/opt/icecream/bin:/usr/bin:$PATH' >> $BUILD_ROOT/var/lib/build/ccache/bin/$i
echo "ccache $i \"\$@\"" >> $BUILD_ROOT/var/lib/build/ccache/bin/$i
chmod 755 $BUILD_ROOT/var/lib/build/ccache/bin/$i
echo "Installed ccache wrapper as $BUILD_ROOT/var/lib/build/ccache/bin/$i"
@@ -465,9 +493,9 @@
echo "using icecream with $icecream jobs"
if [ "$ccache" -ne 1 ]; then
- echo 'export PATH=/usr/lib/icecream/bin:/opt/icecream/bin:$PATH' > "$BUILD_ROOT"/etc/profile.d/build_icecream.sh
+ echo 'export PATH=/usr/lib/icecc/bin:/opt/icecream/bin:$PATH' > "$BUILD_ROOT"/etc/profile.d/build_icecream.sh
else
- echo 'export CCACHE_PATH=/usr/lib/icecream/bin:/opt/icecream/bin' > "$BUILD_ROOT"/etc/profile.d/build_icecream.sh
+ echo 'export CCACHE_PATH=/usr/lib/icecc/bin:/opt/icecream/bin' > "$BUILD_ROOT"/etc/profile.d/build_icecream.sh
fi
local icecc_vers=(`shopt -s nullglob; echo $BUILD_ROOT/var/run/icecream/*.tar.{bz2,gz}`)
@@ -621,12 +649,33 @@
done
}
+vm_img_create()
+{
+ local img="$1"
+ local size="$2"
+
+ echo "Creating $img (${size}M)"
+ mkdir -p "${img%/*}" || cleanup_and_exit 3
+
+ # prefer fallocate, which avoids fragmentation
+ r=1
+ if type -p fallocate > /dev/null; then
+ fallocate -l "${size}M" "$img"
+ r=$?
+ fi
+ # fall back to dd method if fallocate is not supported
+ if [ "$r" -gt "0" ]; then
+ dd if=/dev/zero of="$img" bs=1M count=0 seek="$size" || cleanup_and_exit 3
+ fi
+}
+
vm_img_mkfs()
{
local fs="$1"
local img="$2"
local mkfs tunefs
eval "mkfs=\"\$vm_img_mkfs_${fs}\""
+ eval "mkfs_exta_options=\"\$vm_img_mkfs_${fs}_extra\""
eval "tunefs=\"\$vm_img_tunefs_${fs}\""
if test -z "$mkfs"; then
@@ -636,11 +685,17 @@
echo "Creating $fs filesystem on $img"
- $mkfs "$img"
+ if ! $mkfs $mkfs_exta_options "$img"; then
+ if test -z "$mkfs_exta_options"; then
+ cleanup_and_exit 3
+ else
+ echo "Format call failed, trying again without extra options..."
+ $mkfs "$img" || cleanup_and_exit 3
+ fi
+ fi
if test -n "$tunefs" ; then
$tunefs "$img" || cleanup_and_exit 3
fi
-
}
background_monitor_process()
@@ -665,17 +720,17 @@
if [ ${memtotal} -gt $max_mem ]; then
max_mem="${memtotal}"
- echo -n $(( $max_mem / 1024 )) > /.build/_statistics.memory
+ echo -n $(( $max_mem / 1024 )) > /.build/_statistics.memory.new && mv /.build/_statistics.memory.new /.build/_statistics.memory
fi
fi
# disk storage usage
if type -p df >& /dev/null; then
- c=(`df -m / | tail -n 1`)
+ c=(`df -m / 2>/dev/null | tail -n 1`)
if [ ${c[2]} -gt $max_disk ]; then
max_disk="${c[2]}"
- echo -n $max_disk > /.build/_statistics.df
+ echo -n $max_disk > /.build/_statistics.df.new && mv /.build/_statistics.df.new /.build/_statistics.df
fi
fi
@@ -685,10 +740,13 @@
detect_vm_2nd_stage()
{
- if ! test "$0" = "/.build/build" ; then
+ if test -e /.build/build.data; then
+ . /.build/build.data
+ fi
+ if test -z "$VM_TYPE" ; then
return 1
fi
- if test $$ -eq 1 ; then
+ if test $$ -eq 1 || test $$ -eq 2; then
# ignore special init signals if we're init
# we're using ' ' instead of '' so that the signal handlers
# are reset in the child processes
@@ -699,7 +757,6 @@
echo "2nd stage started in virtual machine"
BUILD_ROOT=/
BUILD_DIR=/.build
- . $BUILD_DIR/build.data
echo "machine type: `uname -m`"
if test "$PERSONALITY" != 0 -a -z "$PERSONALITY_SET" ; then
export PERSONALITY_SET=true
@@ -721,6 +778,12 @@
if test "$VM_TYPE" = 'zvm' ; then
VM_SWAP='/dev/dasdb1'
fi
+ if test "$VM_TYPE" = 'ec2' ; then
+ VM_SWAP='/dev/sdb1'
+ # Usually the external system is writing the swap signature, but EC2 volume
+ # attach is very slow, so let's do it in the VM for now.
+ mkswap "$VM_SWAP"
+ fi
if test -n "$VM_SWAP" ; then
for i in 1 2 3 4 5 6 7 8 9 10 ; do
test -e "$VM_SWAP" && break
@@ -828,6 +891,99 @@
fi
}
+ec2_volume_state()
+{
+ local VM_VOL_NAME="$1"
+ temp_file=`mktemp`
+ ec2-describe-volumes "$VM_VOL_NAME" --region "$BUILD_EC2_REGION" > $temp_file
+
+ if grep -q ^ATTACHMENT "$temp_file"; then
+ grep ^ATTACHMENT "$temp_file" | awk '{ print $5 }'
+ else
+ grep ^VOLUME "$temp_file" | awk '{ print $5 }'
+ fi
+ rm "$temp_file"
+}
+
+cloud_volume_attach()
+{
+ local VM_SERVER="$1"
+ local VM_VOL_NAME="$2"
+ local VM_VOL_DEV="$3"
+
+ if [ "$VM_TYPE" = 'openstack' ]; then
+ if ! nova volume-attach "$VM_SERVER" "$VM_VOL_NAME" "$VM_VOL_DEV"; then
+ echo "ERROR: nova attach failed. $?" >&2
+ return 3
+ fi
+ while true; do
+ state=`nova volume-show "$VM_VOL_NAME" | sed -n 's,^|[ ]*status[ ]*|[ ]*\([^ ]*\).*,\1,p'`
+ [ "$state" == "in-use" ] && break
+ if [ -z "$state" ]; then
+ echo "ERROR: unable to find state of volume $VM_VOL_NAME" >&2
+ return 3
+ fi
+ if [ "$state" == "available" ]; then
+ echo "WARNING: volume $VM_VOL_NAME got not attached, retrying" >&2
+ if ! nova volume-attach "$VM_SERVER" "$VM_VOL_NAME" "$VM_VOL_DEV"; then
+ echo "ERROR: nova attach failed. $?" >&2
+ return 3
+ fi
+ fi
+ sleep 3
+ done
+
+ if [ ! -e "$VM_VOL_DEV" ]; then
+ #GROSS HACK: kernel does not care about the given device name
+# VM_VOL_DEV="/dev/"`dmesg| sed -n 's,.*\(vd.\): unknown partition tab.*,\1,p' | tail -n 1`
+ VM_VOL_DEV=`ls -1 /dev/vd? | tail -n 1`
+ fi
+ echo "$VM_VOL_DEV"
+ elif [ "$VM_TYPE" = 'ec2' ]; then
+ temp_file=`mktemp`
+ if ! ec2-attach-volume "$VM_VOL_NAME" -d /dev/sdz -i `ec2-instance-id` --region $BUILD_EC2_REGION > "$temp_file"; then
+ rm "$temp_file"
+ cleanup_and_exit 1
+ fi
+ # wait that it becomes available
+ while true; do
+ state=`ec2_volume_state "$VM_VOL_NAME"`
+ [ "$state" = "attached" ] && break
+ sleep 1
+ done
+ # print device node
+ grep ^ATTACHMENT "$temp_file" | awk '{ print $4 }'
+ rm "$temp_file"
+ fi
+}
+
+cloud_volume_detach()
+{
+ local VM_SERVER="$1"
+ local VM_VOL_NAME="$2"
+ if [ "$VM_TYPE" = 'openstack' ]; then
+ # needed at all?
+ nova volume-show "$VM_VOL_NAME" | grep -q in-use || return 0
+
+ # umount seems not to be enough
+ sync
+
+ if ! nova volume-detach "$VM_SERVER" "$VM_VOL_NAME"; then
+ echo "ERROR: nova detach of $VM_VOL_NAME failed." >&2
+ return 3
+ fi
+ while nova volume-show "$VM_VOL_NAME" | grep -q availabe; do
+ sleep 3
+ done
+ elif [ "$VM_TYPE" = 'ec2' ]; then
+ state=`ec2_volume_state "$VM_VOL_NAME"`
+ if [ "$state" != "available" ]; then
+ ec2-detach-volume "$VM_VOL_NAME" --region $BUILD_EC2_REGION || return 3
+ fi
+ fi
+ return 0
+}
+
linux64()
{
perl -e 'syscall('$PERSONALITY_SYSCALL', 0); exec(@ARGV) || die("$ARGV[0]: $!\n")' "$@"
@@ -847,9 +1003,15 @@
export kvm_bin="/usr/bin/qemu-system-arm"
export console=ttyAMA0
- export KVM_OPTIONS="-enable-kvm -M vexpress-a15 -dtb /boot/a15-guest.dtb -cpu cortex-a15 -m 1500"
+ export KVM_OPTIONS="-enable-kvm -M vexpress-a15 -dtb /boot/a15-guest.dtb -cpu cortex-a15"
export VM_KERNEL=/boot/zImage.vexpress
- export VM_INITRD=/boot/initrd
+ # prefer the vexpress initrd
+ if [ -e /boot/initrd.vexpress ]; then
+ VM_INITRD=/boot/initrd.vexpress
+ else
+ VM_INITRD=/boot/initrd
+ fi
+ export VM_INITRD
}
check_for_ppc()
@@ -866,11 +1028,11 @@
export kvm_bin="/usr/bin/qemu-system-ppc64"
export console=hvc0
- export KVM_OPTIONS="-enable-kvm -M pseries -mem-path /hugetlbfs"
+ export KVM_OPTIONS="-enable-kvm -M pseries"
export VM_KERNEL=/boot/vmlinux
export VM_INITRD=/boot/initrd
- if [ -z "$RUNNING_IN_VM" -a "$VM_TYPE" = "kvm" ];then
- if ! grep -q "/hugetlbfs" /proc/mounts; then
+ if [ -z "$RUNNING_IN_VM" -a -n "$HUGETLBFSPATH" ];then
+ if ! grep -q "$HUGETLBFSPATH" /proc/mounts; then
echo "hugetlbfs is not mounted"
exit 1
fi
@@ -930,6 +1092,8 @@
PARAM="$1"
ARG="$2"
[ "$ARG" = "${ARG#-}" ] || ARG=""
+ ARG2="$3"
+ [ "$ARG2" = "${ARG2#-}" ] || ARG2=""
shift
case $PARAM in
*-*=*)
@@ -1040,7 +1204,14 @@
VM_TYPE="$ARG"
case "$VM_TYPE" in
zvm) ;;
- xen|kvm|uml|qemu|lxc|emulator)
+ ec2)
+ test -z "$VM_IMAGE" && VM_IMAGE=1
+ . /etc/profile.d/ec2.sh
+ EC2_INSTANCE_ID=`ec2-instance-id`
+ BUILD_EC2_ZONE=`ec2-meta-data placement/availability-zone`
+ BUILD_EC2_REGION=${BUILD_EC2_ZONE%?}
+ ;;
+ xen|kvm|uml|qemu|lxc|emulator|openstack)
test -z "$VM_IMAGE" && VM_IMAGE=1
;;
none|chroot) VM_TYPE='' ;;
@@ -1061,6 +1232,19 @@
zvm_worker_nr="$ARG"
shift
;;
+ --vm-server|--vm-region)
+ needarg
+ VM_SERVER="$ARG"
+ shift
+ ;;
+ --vm-volumes)
+ needarg
+ VM_VOLUME_NAME="$ARG"
+ shift
+ needarg
+ VM_VOLUME_SWAP="$ARG2"
+ shift
+ ;;
--vm-disk)
needarg
VM_IMAGE="$ARG"
@@ -1260,12 +1444,42 @@
VM_SWAP='/dev/dasdb1'
fi
+if test "$VM_TYPE" = "ec2"; then
+ # We can not use bash hashes because old bash does not support it
+ # This is always the x86_64 loader, we use also by default the
+ # local x86_64 kernel, which should be able to run a 32bit system
+ if [ "$BUILD_EC2_ZONE" = "us-east-1" ]; then
+ BUILD_EC2_AKI="aki-88aa75e1"
+ elif [ "$BUILD_EC2_ZONE" = "us-west-1" ]; then
+ BUILD_EC2_AKI="aki-f77e26b2"
+ elif [ "$BUILD_EC2_ZONE" = "us-west-2" ]; then
+ BUILD_EC2_AKI="aki-fc37bacc"
+ elif [ "$BUILD_EC2_ZONE" = "eu-west-1" ]; then
+ BUILD_EC2_AKI="aki-71665e05"
+ elif [ "$BUILD_EC2_ZONE" = "ap-southeast-1" ]; then
+ BUILD_EC2_AKI="aki-fe1354ac"
+ elif [ "$BUILD_EC2_ZONE" = "ap-southeast-2" ]; then
+ BUILD_EC2_AKI="aki-3f990e05"
+ elif [ "$BUILD_EC2_ZONE" = "ap-northeast-1" ]; then
+ BUILD_EC2_AKI="aki-44992845"
+ elif [ "$BUILD_EC2_ZONE" = "sa-east-1" ]; then
+ BUILD_EC2_AKI="aki-c48f51d9"
+ elif [ "$BUILD_EC2_ZONE" = "us-gov-west-1" ]; then
+ BUILD_EC2_AKI="aki-79a4c05a"
+ else
+ echo "Unknown Amazon EC2 Zone: $BUILD_EC2_ZONE"
+ exit 1
+ fi
+fi
+
if test "$VMDISK_MOUNT_OPTIONS" = __default; then
if test "$VMDISK_FILESYSTEM" = reiserfs ; then
VMDISK_MOUNT_OPTIONS='-o data=writeback,commit=150,noatime'
elif test "$VMDISK_FILESYSTEM" = btrfs ; then
VMDISK_MOUNT_OPTIONS='-o nobarrier,noatime'
- elif test "$VMDISK_FILESYSTEM" = "ext4" -o "$VMDISK_FILESYSTEM" = "ext3" ; then
+ elif test "$VMDISK_FILESYSTEM" = "ext4" ; then
+ VMDISK_MOUNT_OPTIONS='-o noatime'
+ elif test "$VMDISK_FILESYSTEM" = "ext3" ; then
VMDISK_MOUNT_OPTIONS='-o data=writeback,nobarrier,commit=150,noatime'
elif test "$VMDISK_FILESYSTEM" = "ext2" ; then
VMDISK_MOUNT_OPTIONS='-o noacl,noatime'
@@ -1306,12 +1520,26 @@
fi
fi
elif test "$VM_TYPE" = 'zvm'; then
- if vmcp q "$VM_WORKER" > /dev/nulll 2>&1 ; then
+ if vmcp q "$VM_WORKER" > /dev/null 2>&1 ; then
if ! zvm_cp destroy $VM_WORKER ; then
echo "could not kill zvm worker $VM_WORKER"
cleanup_and_exit 1
fi
fi
+ elif test "$VM_TYPE" = 'ec2'; then
+ if ec2-describe-instance-status "$VM_BUILD_INSTANCE" --region $BUILD_EC2_REGION >/dev/null 2>&1 ; then
+ if ec2-terminate-instances "$VM_BUILD_INSTANCE" >/dev/null 2>&1 ; then
+ echo "could not kill EC2 instance $VM_BUILD_INSTANCE"
+ cleanup_and_exit 1
+ fi
+ fi
+ elif test "$VM_TYPE" = 'openstack'; then
+ if nova show "$VM_VOLUME_NAME" >/dev/null 2>&1 ; then
+ if ! nova delete "$VM_VOLUME_NAME" ; then
+ echo "could not kill openstack vm build $VM_VOLUME_NAME"
+ cleanup_and_exit 1
+ fi
+ fi
elif test -n "$VM_TYPE"; then
if ! fuser -k -TERM "$VM_IMAGE"; then
echo "could not kill build in $VM_IMAGE"
@@ -1388,6 +1616,58 @@
fi
fi
+if [ "$VM_TYPE" = 'ec2' -a -z "$RUNNING_IN_VM" ]; then
+ # verify settings
+ if [ -z "$AWS_ACCESS_KEY" -o -z "$AWS_ACCESS_KEY" ]; then
+ echo "ERROR:No amazon EC2 environment set. Set AWS_ACCESS_KEY and AWS_SECRET_KEY."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$BUILD_EC2_AKI" ]; then
+ echo "ERROR: No image refering to kernel and ramdisk is defined in BUILD_EC2_AKI env."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$VM_VOLUME_NAME" ]; then
+ echo "ERROR: No worker root VM volume name specified."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$VM_VOLUME_SWAP" ]; then
+ echo "ERROR: No worker swap VM volume name specified."
+ cleanup_and_exit 3
+ fi
+
+ # go
+ VM_IMAGE=`cloud_volume_attach "$VM_SERVER" "$VM_VOLUME_NAME" "$VM_IMAGE"`
+ [ "${VM_IMAGE:0:5}" == "/dev/" ] || cleanup_and_exit 3
+fi
+
+if [ "$VM_TYPE" = 'openstack' -a -z "$RUNNING_IN_VM" ]; then
+ # verify settings
+ if [ -z "$OS_AUTH_URL" ]; then
+ echo "ERROR:No openstack environment set. This vm-type works only inside of an openstack VM."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$OBS_OPENSTACK_KERNEL_IMAGE_ID" ]; then
+ echo "ERROR: No image refering to kernel and ramdisk is defined in OBS_OPENSTACK_KERNEL_IMAGE_ID env."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$VM_VOLUME_NAME" ]; then
+ echo "ERROR: No worker root VM volume name specified."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$VM_VOLUME_SWAP" ]; then
+ echo "ERROR: No worker swap VM volume name specified."
+ cleanup_and_exit 3
+ fi
+ if [ -z "$VM_SERVER" ]; then
+ echo "ERROR: No VM server nod name specified (usually this instance)."
+ cleanup_and_exit 3
+ fi
+
+ # go
+ VM_IMAGE=`cloud_volume_attach "$VM_SERVER" "$VM_VOLUME_NAME" "$VM_IMAGE"`
+ [ "${VM_IMAGE:0:5}" == "/dev/" ] || cleanup_and_exit 3
+fi
+
if [ "$VM_TYPE" = 'kvm' -a -z "$RUNNING_IN_VM" ]; then
if [ ! -r /dev/kvm -o ! -x "$kvm_bin" ]; then
echo "host doesn't support kvm"
@@ -1460,11 +1740,20 @@
fi
fi
+if [ "$VM_TYPE" = 'openstack' ]; then
+ VM_SWAPDEV=/dev/vdb
+ qemu_rootdev=/dev/vda
+fi
+
if [ "$VM_TYPE" = 'qemu' ]; then
VM_SWAPDEV=/dev/sdb
qemu_rootdev=/dev/sda
fi
+if [ "$VM_TYPE" = 'uml' ]; then
+ VM_SWAPDEV=/dev/ubdb
+fi
+
if [ -z "$RPMLIST" -a -z "$RUNNING_IN_VM" ]; then
if [ -z "$repos" -a -z "$BUILD_RPMS" ]; then
repos=(--repository 'zypp://')
@@ -1507,8 +1796,6 @@
# 3. link the device to the controlling guest
# -> Need a uniq worker id to calculate a uniq device address for linking
# -> VM_IMAGE is the resulting block device
-echo "***********************************"
-echo "VM_TYPE: $VM_TYPE script: $0"
if [ "$VM_TYPE" = 'zvm' ]; then
if [ ! "$0" = "/.build/build" ] ; then
echo "in controlling guest"
@@ -1521,7 +1808,6 @@
echo "did not get a real device for VM_IMAGES: $VM_IMAGE $VM_SWAP"
cleanup_and_exit 3
else
-echo "FIRST: VM_IMAGE: $VM_IMAGE, VM_SWAP: $VM_SWAP"
VM_IMAGE="/dev/"${VM_IMAGE}
VM_SWAP="/dev/"${VM_SWAP}
fi
@@ -1561,18 +1847,13 @@
fi
fi
if test ! -e "$VM_IMAGE"; then
- echo "Creating $VM_IMAGE (${VMDISK_ROOTSIZE}M)"
- mkdir -p "${VM_IMAGE%/*}"
- dd if=/dev/zero of="$VM_IMAGE" bs=1M count=0 seek="$VMDISK_ROOTSIZE" || cleanup_and_exit 3
+ vm_img_create "$VM_IMAGE" "$VMDISK_ROOTSIZE"
if test -z "$CLEAN_BUILD" ; then
- vm_img_mkfs "$VMDISK_FILESYSTEM" "$VM_IMAGE" || cleanup_and_exit 3
+ vm_img_mkfs "$VMDISK_FILESYSTEM" "$VM_IMAGE"
fi
fi
if test -n "$VM_SWAP" -a ! -e "$VM_SWAP" -a ! -b "$VM_SWAP"; then
- # setup VM_SWAP
- echo "Creating $VM_SWAP (${VMDISK_SWAPSIZE}M)"
- mkdir -p "${VM_SWAP%/*}"
- dd if=/dev/zero of="$VM_SWAP" bs=1M count=0 seek="$VMDISK_SWAPSIZE" || cleanup_and_exit 3
+ vm_img_create "$VM_SWAP" "$VMDISK_SWAPSIZE"
fi
if test ! -e "$VM_IMAGE" ; then
echo "you need to create $VM_IMAGE first"
@@ -1604,6 +1885,7 @@
dd if=/dev/zero of="$VM_SWAP" bs=1024 count=1 conv=notrunc 2>/dev/null
echo "mkswap $VM_SWAP"
mkswap "$VM_SWAP"
+ [ "$VM_TYPE" = 'openstack' ] && openstack_volume_detach "$VM_SERVER" "$VM_VOLUME_SWAP"
fi
fi
@@ -1861,22 +2143,10 @@
umount -n $BUILD_ROOT/dev/pts 2> /dev/null || true
umount -n $BUILD_ROOT/mnt 2> /dev/null || true
- if [ -n "$VM_IMAGE" ]; then
- check_exit
- # needs to work otherwise we have a corrupted file system
- umount $BUILD_ROOT || cleanup_and_exit 1
- if [ "$VM_TYPE" = "zvm" ]; then
- # detach the worker root and swap locally and link it in the worker
- zvm_cp volume_detach_local $VM_VOLUME_ROOT ${zvm_worker_nr}
- zvm_cp volume_detach_local $VM_VOLUME_SWAP ${zvm_worker_nr}
- zvm_cp volume_attach $VM_WORKER $VM_VOLUME_ROOT
- zvm_cp volume_attach $VM_WORKER $VM_VOLUME_SWAP
- fi
- fi
-
if check_use_emulator; then
- if [ -x "$BUILD_DIR/initvm" -a -e "$BUILD_DIR/qemu-reg" ]; then
- vm_init_script="/.build/initvm"
+ if [ -e $BUILD_DIR/initvm.$BUILD_HOST_ARCH -a -e "$BUILD_DIR/qemu-reg" ]; then
+ chmod 0755 "$BUILD_DIR/initvm.$BUILD_HOST_ARCH"
+ vm_init_script="/.build/initvm.$BUILD_HOST_ARCH"
elif [ -e $BUILD_DIR/initscript_qemu_vm ]; then
vm_init_script="/.build/initscript_qemu_vm"
else
@@ -1905,7 +2175,54 @@
fi
popd
- elif [ "$VM_TYPE" = 'xen' ]; then
+ fi
+
+ if [ "$VM_TYPE" = 'openstack' -o "$VM_TYPE" = 'ec2' ]; then
+ # No way to handle this via init= parameter here....
+ echo "#!/bin/sh" > "$BUILD_ROOT/sbin/init"
+ echo 'exec /.build/build "$@"' >> "$BUILD_ROOT/sbin/init"
+ chmod 0755 "$BUILD_ROOT/sbin/init"
+ fi
+ if [ "$VM_TYPE" = 'ec2' ]; then
+ # use the instance kernel, if no kernel got installed via preinstall
+ if ! test -e "$BUILD_ROOT/boot/vmlinuz"; then
+ cp /boot/vmlinuz-ec2 "$BUILD_ROOT/boot/vmlinuz"
+ cp /boot/initrd-ec2 "$BUILD_ROOT/boot/initrd"
+ fi
+ # install menu.lst for pv grub
+ if ! test -e "$BUILD_ROOT/boot/grub/menu.lst"; then
+ mkdir -p "$BUILD_ROOT/boot/grub"
+ echo "serial --unit=0 --speed=9600" > "$BUILD_ROOT/boot/grub/menu.lst"
+ echo "terminal --dumb serial" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo "default 0" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo "timeout 0" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo "hiddenmenu" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo "" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo "title default" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo " root (hd0)" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo " kernel /boot/vmlinuz root=/dev/sda1 xencons=xvc0 console=xvc0 splash=silent" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ echo " initrd /boot/initrd" >> "$BUILD_ROOT/boot/grub/menu.lst"
+ fi
+ fi
+ if [ -n "$VM_IMAGE" ]; then
+ check_exit
+ # needs to work otherwise we have a corrupted file system
+ umount $BUILD_ROOT || cleanup_and_exit 3
+ fi
+
+ if [ "$VM_TYPE" = 'openstack' -o "$VM_TYPE" = 'ec2' ]; then
+ cloud_volume_detach "$VM_SERVER" "$VM_VOLUME_NAME" || cleanup_and_exit 3
+ fi
+
+ if [ -n "$VM_IMAGE" -a "$VM_TYPE" = "zvm" ]; then
+ # detach the worker root and swap locally and link it in the worker
+ zvm_cp volume_detach_local $VM_VOLUME_ROOT ${zvm_worker_nr}
+ zvm_cp volume_detach_local $VM_VOLUME_SWAP ${zvm_worker_nr}
+ zvm_cp volume_attach $VM_WORKER $VM_VOLUME_ROOT
+ zvm_cp volume_attach $VM_WORKER $VM_VOLUME_SWAP
+ fi
+
+ if [ "$VM_TYPE" = 'xen' ]; then
XMROOT="file:$(readlink -f $VM_IMAGE)"
XMROOT=${XMROOT/#file:\/dev/phy:/dev}
XMROOT="disk=$XMROOT,hda1,w"
@@ -1946,7 +2263,7 @@
rm "$XEN_CONF_FILE"
elif [ "$VM_TYPE" = 'uml' ]; then
echo "booting UML kernel ..."
- set -- $uml_kernel initrd=$uml_initrd root=/ubda init="$vm_init_script" panic=1 elevator=noop quiet ubd0=$VM_IMAGE ${MEMSIZE:+mem=$MEMSIZE}
+ set -- $uml_kernel initrd=$uml_initrd root=ubda init="$vm_init_script" panic=1 elevator=noop quiet ubda=$VM_IMAGE ubdb=$VM_SWAP ${MEMSIZE:+mem=$MEMSIZE}
echo "$@"
"$@"
elif [ "$VM_TYPE" = 'qemu' -o "$VM_TYPE" = 'kvm' ]; then
@@ -1957,7 +2274,10 @@
else
# speed optimization when using kvm with raw files
CACHE=",cache=unsafe"
- fi
+ fi
+
+ # we do not want to have sound inside the VMs
+ export QEMU_AUDIO_DRV=none
if [ "$kvm_virtio" = 1 ]; then
qemu_args=(-drive file="$VM_IMAGE",if=virtio$CACHE -drive file="$VM_IMAGE",if=ide,index=0$CACHE)
@@ -1999,7 +2319,7 @@
fi
fi
- set -- $qemu_bin -no-reboot -nographic -net none $KVM_OPTIONS \
+ set -- $qemu_bin -no-reboot -nographic -vga none -net none $KVM_OPTIONS \
-kernel $vm_kernel \
-initrd $vm_initrd \
-append "root=$qemu_rootdev panic=1 quiet no-kvmclock nmi_watchdog=0 rw elevator=noop console=$console init=$vm_init_script" \
@@ -2012,6 +2332,80 @@
fi
echo "$@"
"$@"
+ elif [ "$VM_TYPE" = 'ec2' ]; then
+ echo "booting $VM_TYPE ..."
+ EC2_SNAP_root=`ec2-create-snapshot --region "$BUILD_EC2_REGION" "$VM_VOLUME_NAME" | awk '{ print $2 }'`
+ if [ "$EC2_SNAP_root" == "${EC2_SNAP_root#snap-}" ]; then
+ echo "ERROR: Failed to create snapshot for root disk $VM_VOLUME_NAME"
+ cleanup_and_exit 3
+ fi
+ EC2_SNAP_swap=`ec2-create-snapshot --region "$BUILD_EC2_REGION" "$VM_VOLUME_SWAP" | awk '{ print $2 }'`
+ if [ "$EC2_SNAP_swap" == "${EC2_SNAP_swap#snap-}" ]; then
+ echo "ERROR: Failed to create snapshot for swap disk $VM_VOLUME_SWAP"
+ ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_root"
+ cleanup_and_exit 3
+ fi
+ # wait for snapshots being processed
+ while true; do
+ c=`ec2-describe-snapshots --region "$BUILD_EC2_REGION" "$EC2_SNAP_root" "$EC2_SNAP_swap" | grep completed | wc -l`
+ [ "$c" == "2" ] && break
+ done
+ EC2_AMI=`ec2-register --region "$BUILD_EC2_REGION" -n build-$VM_VOLUME_NAME -a x86_64 -b "/dev/sda1=$EC2_SNAP_root::false" -b "/dev/sdb1=$EC2_SNAP_swap::false" --kernel "$BUILD_EC2_AKI" | awk '{ print $2 }'`
+ if [ "$EC2_AMI" == "${EC2_AMI#ami-}" ]; then
+ echo "ERROR: Failed to register the AMI"
+ ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_root"
+ ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_swap"
+ cleanup_and_exit 3
+ fi
+ INSTANCE=`ec2-run-instances --region "$BUILD_EC2_REGION" -z "$BUILD_EC2_ZONE" -t $BUILD_EC2_TYPE --kernel "$BUILD_EC2_AKI" --instance-initiated-shutdown-behavior terminate "$EC2_AMI" | grep ^INSTANCE | awk '{ print $2 }'`
+ if [ "$INSTANCE" == "${INSTANCE#i-}" ]; then
+ echo "ERROR: Failed to run the instance for AMI $EC2_AMI"
+ ec2-deregister --region "$BUILD_EC2_REGION" "$EC2_AMI"
+ ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_root"
+ ec2-delete-snapshot --region "$BUILD_EC2_REGION" "$EC2_SNAP_swap"
+ cleanup_and_exit 3
+ fi
+ echo "Waiting for finishing the build. No log file until then on EC2 ...."
+ I=0
+ L=0
+ EC2_EXTRACT_VOLUME_root=""
+ EC2_EXTRACT_VOLUME_swap=""
+ temp_file=`mktemp`
+ while true; do
+ ec2-describe-instances --region "$BUILD_EC2_REGION" "$INSTANCE" > $temp_file
+ state=`grep ^INSTANCE "$temp_file"`
+ if [ -z "$EC2_EXTRACT_VOLUME_root" ]; then
+ EC2_EXTRACT_VOLUME_root=`grep ^BLOCKDEVICE $temp_file | grep /dev/sda1 | awk '{ print $3 }'`
+ EC2_EXTRACT_VOLUME_swap=`grep ^BLOCKDEVICE $temp_file | grep /dev/sdb1 | awk '{ print $3 }'`
+ fi
+ # the column of the state is at a differen position depending on the state :/
+# [ "$state" == "${state/stopped/}" ] || break
+ [ "$state" == "${state/terminated/}" ] || break
+ I=$(( $I + 1 ))
+ if [ $I -gt 10 ]; then
+ echo -n .
+ I="0"
+ L=$(( $L + 1 ))
+ fi
+ if [ $L -gt 10 ]; then
+ # dump entire console log as raw here
+ ec2-get-console-output --region "$BUILD_EC2_REGION" -r "$INSTANCE"
+ L="0"
+ fi
+ sleep 1
+ done
+ rm "$temp_file"
+ echo
+ ec2-deregister --region "$BUILD_EC2_REGION" "$EC2_AMI"
+ # snapshots get deleted after extract
+ elif [ "$VM_TYPE" = 'openstack' ]; then
+ echo "booting $VM_TYPE ..."
+ nova boot --image $OBS_OPENSTACK_KERNEL_IMAGE_ID --flavor m1.small --block_device_mapping vda=${VM_VOLUME_NAME}::$(( $VMDISK_ROOTSIZE / 1024 )):0 --block_device_mapping vdb=${VM_VOLUME_SWAP}::1:0 --poll "build-$VM_VOLUME_NAME" || cleanup_and_exit 3
+
+# while [ `nova show "build-$VM_VOLUME_NAME" | sed -n -e 's,|[ ]*status[ ]*|[ ]*\([^ ]*\).*,\1,p'` == "ACTIVE" ]; do
+# sleep 5
+# done
+ nova console-log "build-$VM_VOLUME_NAME"
elif [ "$VM_TYPE" = 'lxc' ]; then
echo "booting $VM_TYPE ..."
LXCCONF="$BUILD_ROOT/.build.lxc.conf"
@@ -2046,6 +2440,19 @@
VM_SWAP="/dev/$(zvm_cp volume_link_local $VM_WORKER $VM_VOLUME_SWAP $zvm_mult_pass $zvm_worker_nr)"
fi
+ if [ "$VM_TYPE" = 'openstack' ]; then
+ VM_IMAGE=`cloud_volume_attach "$VM_SERVER" "$VM_VOLUME_NAME" "$VM_IMAGE"`
+ [ "${VM_IMAGE:0:5}" == "/dev/" ] || cleanup_and_exit 3
+ VM_SWAP=`cloud_volume_attach "$VM_SERVER" "$VM_VOLUME_SWAP" "$VM_SWAP"`
+ [ "${VM_SWAP:0:5}" == "/dev/" ] || cleanup_and_exit 3
+ fi
+ if [ "$VM_TYPE" = 'ec2' ]; then
+ VM_IMAGE=`cloud_volume_attach "$VM_SERVER" "$EC2_EXTRACT_VOLUME_root" "$VM_IMAGE"`
+ [ "${VM_IMAGE:0:5}" == "/dev/" ] || cleanup_and_exit 3
+ VM_SWAP=`cloud_volume_attach "$VM_SERVER" "$EC2_EXTRACT_VOLUME_swap" "$VM_SWAP"`
+ [ "${VM_SWAP:0:5}" == "/dev/" ] || cleanup_and_exit 3
+ fi
+
# Exctract build resutls from VM
if [ "$VM_TYPE" = 'emulator' ]; then
# Emulators may not offer to use a second swap space.
@@ -2107,7 +2514,7 @@
done
if test "$statistics" = 1; then
mkdir -p OTHER
- mv _statistics OTHER/
+ [ -e _statistics ] && mv _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
@@ -2117,6 +2524,10 @@
zvm_cp volume_detach_local $VM_VOLUME_ROOT ${zvm_worker_nr}
zvm_cp volume_detach_local $VM_VOLUME_SWAP ${zvm_worker_nr}
fi
+ if [ "$VM_TYPE" = 'openstack' ]; then
+ cloud_volume_detach "$VM_SERVER" "$VM_VOLUME_NAME"
+ cloud_volume_detach "$VM_SERVER" "$VM_VOLUME_SWAP"
+ fi
cleanup_and_exit ${BUILDSTATUS#BUILDSTATUS}
;;
BUILDSTATUS*)
@@ -2577,6 +2988,10 @@
chroot $BUILD_ROOT su -
else
chroot $BUILD_ROOT su -c "cd $TOPDIR/BUILD && $DSC_BUILD_CMD" - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true
+ if test "$BUILD_SUCCEEDED" = true -a "$DO_CHECKS" != "false"; then
+ DEB_CHANGESFILE=${SPECFILE%.dsc}_$(dpkg-architecture -qDEB_BUILD_ARCH).changes
+ chroot $BUILD_ROOT su -c "which lintian > /dev/null && cd $TOPDIR && echo Running lintian && lintian -i $DEB_CHANGESFILE" - $BUILD_USER < /dev/null
+ fi
fi
mkdir -p $BUILD_ROOT/$TOPDIR/DEBS
@@ -2725,15 +3140,22 @@
echo "" >> $TOPDIR/OTHER/_statistics
rm /.build/_statistics.memory
fi
+ mkdir -p /sys
mount -n sys /sys -t sysfs
- device="sda"
+ device="hda1"
+ [ -e /dev/sda ] && device="sda"
[ -e /dev/vda ] && device="vda"
[ -e /dev/dasda ] && device="dasda" # in z/VM
- disk=(`cat /sys/block/${device}/stat`)
- [ "0${disk[0]}" -gt 0 ] && echo "IO_requests_read: ${disk[0]}" >> $TOPDIR/OTHER/_statistics
- [ "0${disk[2]}" -gt 0 ] && echo "IO_sectors_read: ${disk[2]}" >> $TOPDIR/OTHER/_statistics
- [ "0${disk[4]}" -gt 0 ] && echo "IO_requests_write: ${disk[4]}" >> $TOPDIR/OTHER/_statistics
- [ "0${disk[6]}" -gt 0 ] && echo "IO_sectors_write: ${disk[6]}" >> $TOPDIR/OTHER/_statistics
+ if [ -e /sys/block/${device}/stat ]; then
+ disk=(`cat /sys/block/${device}/stat`)
+ [ "0${disk[0]}" -gt 0 ] && echo "IO_requests_read: ${disk[0]}" >> $TOPDIR/OTHER/_statistics
+ [ "0${disk[2]}" -gt 0 ] && echo "IO_sectors_read: ${disk[2]}" >> $TOPDIR/OTHER/_statistics
+ [ "0${disk[4]}" -gt 0 ] && echo "IO_requests_write: ${disk[4]}" >> $TOPDIR/OTHER/_statistics
+ [ "0${disk[6]}" -gt 0 ] && echo "IO_sectors_write: ${disk[6]}" >> $TOPDIR/OTHER/_statistics
+ else
+ echo "ERROR: no root disk device found, yet another new device name?"
+ ls -l /sys/block/
+ fi
umount /sys
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/build_kiwi.sh new/obs-build-20130517/build_kiwi.sh
--- old/obs-build-20130402/build_kiwi.sh 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/build_kiwi.sh 2013-05-17 11:24:45.000000000 +0200
@@ -147,6 +147,15 @@
fi
popd
fi
+if [ -e "$imageout.install.iso" ]; then
+ echo "take install.iso file and create sha256..."
+ mv "$imageout.install.iso" "/$TOPDIR/KIWI/$imageout$buildnum.install.iso"
+ pushd /$TOPDIR/KIWI
+ if [ -x /usr/bin/sha256sum ]; then
+ /usr/bin/sha256sum "$imageout$buildnum.install.iso" > "$imageout$buildnum.install.iso.sha256"
+ fi
+ popd
+fi
if [ -e "$imageout.qcow2" ]; then
mv "$imageout.qcow2" "/$TOPDIR/KIWI/$imageout$buildnum.qcow2"
pushd /$TOPDIR/KIWI
@@ -156,6 +165,24 @@
fi
popd
fi
+if [ -e "$imageout.raw.install.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
+ mv "$imageout.raw.install.raw" "/$TOPDIR/KIWI/$imageout$buildnum.raw.install.raw"
+ pushd /$TOPDIR/KIWI
+ echo "\$compress_tool raw.install.raw file..."
+ \$compress_tool "$imageout$buildnum.raw.install.raw"
+ if [ -x /usr/bin/sha256sum ]; then
+ echo "Create sha256 file..."
+ /usr/bin/sha256sum "$imageout$buildnum.raw.install.raw.\${compress_suffix}" > "$imageout$buildnum.raw.install.raw.\${compress_suffix}.sha256"
+ fi
+ popd
+fi
if [ -e "$imageout.raw" ]; then
compress_tool="bzip2"
compress_suffix="bz2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/common_functions new/obs-build-20130517/common_functions
--- old/obs-build-20130402/common_functions 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/common_functions 2013-05-17 11:24:45.000000000 +0200
@@ -2,13 +2,19 @@
: ${CACHE_DIR:=/var/cache/build}
-set_build_arch()
+build_host_arch()
{
: ${BUILD_HOST_ARCH:=`uname -m`}
+ # avoid multiple initvm.* helpers for i586 and i686
+ test i686 != "$BUILD_HOST_ARCH" || BUILD_HOST_ARCH=i586
+}
+
+set_build_arch()
+{
+ build_host_arch
if [ -z "$BUILD_ARCH" ]; then
BUILD_ARCH="$BUILD_HOST_ARCH"
- test i686 != "$BUILD_ARCH" || BUILD_ARCH=i586 # XXX: why?
fi
case $BUILD_ARCH in
@@ -56,7 +62,11 @@
# to run the qemu initialization in the XEN chroot, we need to
# register it with a static program or shell script
- if test -e $BUILD_DIR/initvm && \
+ if [ -z "$VM_IMAGE" ]; then
+ if [ -x /usr/sbin/qemu-binfmt-conf.sh ]; then
+ return 0
+ fi
+ elif test -e $BUILD_DIR/initvm.$BUILD_HOST_ARCH && \
test -e $BUILD_DIR/qemu-reg; then
return 0 # prefer initvm to handle registration
elif test -e /bin/bash-static \
@@ -66,7 +76,8 @@
return 0 # as backup use /usr/sbin/qemu-binfmt.conf.sh
else
# XXX: error?
- echo "Warning: cross compile not possible due to missing static binaries"
+ echo "Warning: cross compile not possible due to missing static binaries. please install build-initvm package for that purpose."
+ echo " check that the right architecture is available for your build host, you need initvm.$BUILD_HOST_ARCH for this one."
fi
return 1
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/configs/sl12.3.conf new/obs-build-20130517/configs/sl12.3.conf
--- old/obs-build-20130402/configs/sl12.3.conf 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/configs/sl12.3.conf 2013-05-17 11:24:45.000000000 +0200
@@ -1,14 +1,9 @@
+
%define gcc_version 47
%define opensuse_bs 1
%define _with_aaa_base_malloc_debug 1
Patterntype: rpm-md ymp
-%if "%_repository" == "images"
-Type: kiwi
-Repotype: none
-Patterntype: none
-Prefer: openSUSE-release
-%endif
Substitute: kiwi-packagemanager:zypper zypper
Substitute: kiwi-packagemanager:smart smart
@@ -16,6 +11,7 @@
Substitute: kiwi-filesystem:ext3 e2fsprogs
Substitute: kiwi-filesystem:ext4 e2fsprogs
Substitute: kiwi-filesystem:squashfs squashfs
+Substitute: kiwi-filesystem:btrfs btrfsprogs
Substitute: kiwi-boot:usbboot kiwi
Substitute: kiwi-boot:isoboot kiwi-desc-isoboot kiwi-desc-isoboot-requires
Substitute: kiwi-boot:oemboot kiwi-desc-oemboot kiwi-desc-oemboot-requires
@@ -24,13 +20,15 @@
Substitute: kiwi-boot:vmxboot kiwi-desc-vmxboot kiwi-desc-vmxboot-requires
Substitute: kiwi-boot:xenboot kiwi-desc-xenboot kiwi-desc-xenboot-requires
Substitute: kiwi-setup:image kiwi createrepo tar -kiwi-desc-isoboot-requires -kiwi-desc-oemboot-requires -kiwi-desc-netboot-requires -kiwi-desc-vmxboot-requires -kiwi-desc-xenboot-requires
+Conflict: kiwi:libudev-mini1
+Conflict: kiwi:systemd-mini
-
+FileProvides: /usr/sbin/groupadd pwdutils
Preinstall: aaa_base attr bash coreutils diffutils
-Preinstall: filesystem fillup glibc grep insserv
-Preinstall: libbz2-1 libgcc%{gcc_version} m4 libncurses5 pam
-Preinstall: permissions libreadline6 rpm sed tar zlib libselinux1
+Preinstall: filesystem fillup glibc grep
+Preinstall: libbz2-1 libgcc_s1 m4 libncurses5 pam
+Preinstall: permissions libreadline6 rpm sed tar libz1 libselinux1
Preinstall: liblzma5 libcap2 libacl1 libattr1
Preinstall: libpopt0 libelf1 liblua5_1
Preinstall: libpcre1
@@ -39,7 +37,7 @@
Order: libopenssl0_9_8:openssl-certs
-VMinstall: util-linux libmount1 perl-base libdb-4_8 libsepol1 libblkid1 libuuid1
+VMinstall: util-linux libmount1 perl-base libdb-4_8 libsepol1 libblkid1 libuuid1 net-tools
ExportFilter: \.x86_64\.rpm$ x86_64
ExportFilter: \.ia64\.rpm$ ia64
@@ -49,6 +47,8 @@
ExportFilter: -ia32-.*\.rpm$
ExportFilter: -32bit-.*\.sparc64\.rpm$
ExportFilter: -64bit-.*\.sparcv9\.rpm$
+ExportFilter: \.armv7l\.rpm$ armv7l
+ExportFilter: \.armv7hl\.rpm$ armv7l
ExportFilter: ^glibc(?:-devel)?-32bit-.*\.sparc64\.rpm$ sparc64
ExportFilter: ^glibc(?:-devel)?-64bit-.*\.sparcv9\.rpm$ sparcv9
# it would be a great idea to have, but sometimes installation-images wants to build debuginfos in
@@ -63,21 +63,14 @@
ExportFilter: ^novell-messenger-client.*\.i586.rpm$ . x86_64
ExportFilter: ^openCryptoki-32bit.*\.s390.rpm$ . s390x
-Required: gcc gcc%{gcc_version} glibc rpm tar patch
+Required: rpm-build
+
+# needed for su's default config - perhaps we should use a simplified form?
+Support: pam-modules
-Support: perl rpm-build
-Support: cpio
-Support: file findutils gawk
-Support: glibc-locale groff info less
-Support: libbz2-devel
-# for boot.udev
-Support: udev
-Support: netcfg
-Support: net-tools pam-modules sysvinit-tools
-Support: timezone util-linux login
-Support: terminfo-base pwdutils build-mkbaselibs
+# the basic stuff
+Support: perl build-mkbaselibs
Support: brp-check-suse post-build-checks rpmlint-Factory
-Keep: brp-check-suse
# remove build-compare support to disable "same result" package dropping
Support: build-compare
# Extracting appdata.xml from desktop files
@@ -91,21 +84,6 @@
Preinstall: libunwind
%endif
-Keep: libaudit1 binutils bzip2 cpio cpp cracklib file findutils gawk gcc gcc-ada gcc-c++
-Keep: gdbm glibc-devel glibc-locale gzip libada libpcre1
-Keep: libunwind libunwind-devel libzio make pam-devel pam-modules
-Keep: patch perl-base perl rcs timezone libmpfr4 libcap2
-Keep: gmp libgmp10 libgmpxx4 libmpc2
-Keep: cpp47 gcc47 gcc47-ada libstdc++47
-Keep: cpp45 gcc45 gcc45-ada libstdc++45
-Keep: cpp44 gcc44 gcc44-ada libstdc++44
-Keep: cpp43 gcc43 gcc43-ada libstdc++43
-Keep: cpp42 gcc42 gcc42-ada libstdc++42
-Keep: cpp41 gcc41 gcc41-ada libstdc++41
-Keep: java-1_7_0-openjdk java-1_7_0-openjdk-devel libcloog0 libppl9 libppl_c4
-Keep: libpopt0 pkg-config libmount1
-Keep: libacl1 libattr1 rpm-build
-
Prefer: -suse-build-key
Prefer: krb5 krb5-devel
Prefer: krb5-mini-devel:krb5-mini
@@ -121,14 +99,14 @@
Prefer: libzypp-zmd-backend novell-NLDAPsdk zaptel-kmp-default
Prefer: hbedv-dazuko-kmp-default dazuko-kmp-default vmware-wkstnmods-kmp-default
Prefer: virtualbox-kmp-default virtualbox-host-kmp-default
-Prefer: libstdc++%{gcc_version} libgcc%{gcc_version}
-Prefer: libstdc++%{gcc_version}-32bit libstdc++%{gcc_version}-64bit
+Prefer: libstdc++6 libgcc_s1
+Prefer: libstdc++6-32bit libstdc++6-64bit
%ifarch s390x
Prefer: -libstdc++41
%endif
Prefer: libstroke
# for symbol syslog (syslogd is best as it has the least dependencies)
-Prefer: syslogd
+Prefer: syslog-service syslogd
Prefer: gnome-sharp2:art-sharp2 gnome-sharp:art-sharp
Prefer: ifolder3:gnome-sharp2 ifolder3:gconf-sharp2
Prefer: nautilus-ifolder3:gnome-sharp2 inkscape:gtkmm24
@@ -175,7 +153,6 @@
Prefer: libreoffice:libreoffice-branding-upstream
Prefer: yast2-branding-openSUSE
Prefer: gimp:gimp-branding-upstream
-Prefer: plymouth:plymouth-branding-upstream
Prefer: libesd-devel:esound
Prefer: libesd0:esound-daemon
Prefer: package-lists-openSUSE-KDE-cd: esound-daemon
@@ -244,26 +221,37 @@
Prefer: -crimson
# in doubt, take higher versions
Prefer: -rubygem-rack-1_1 -rubygem-rack-1_2 -rubygem-rack-1_3 -rubygem-tilt-1_1
+Prefer: -rubygem-method_source-0_7 -rubygem-rails-2_3 -rubygem-activerecord-2_3
Prefer: geronimo-servlet-2_4-api
-
-# just temporary
-Prefer: -rubygems
-
-# temporarly - already fix submitted
-Prefer: -kde3-kaffeine
+Prefer: -libhdf5-0-openmpi -libhdf5_hl0-openmpi
+# for now gstream 0.10 is it
+Prefer: typelib-1_0-Gst-0_10 gstreamer-0_10-utils-unversioned gstreamer-0_10-utils typelib-1_0-GstInterfaces-0_10
+# prefer the small systemd for building
+Prefer: libudev-mini-devel libudev-mini1
+Prefer: systemd-mini systemd-mini-devel
+Prefer: systemd-mini-devel:systemd-mini
+Prefer: udev-mini
+Prefer: libudev1:udev
+Prefer: xmlgraphics-commons:apache-commons-io
+# the -32bit stuff provides things it shouldn't (hopefully temporary)
+Prefer: -typelib-1_0-GdkPixbuf-2_0-32bit -typelib-1_0-Pango-1_0-32bit
+Prefer: postgresql postgresql-server
# kernel bug (coolo)
Prefer: kernel-default-devel
+Prefer: -libffi43
+
+Prefer: wxWidgets-2_9-devel
Prefer: -NX -xaw3dd -db43
Prefer: -xerces-j2-xml-resolver -xerces-j2-xml-apis
Prefer: -vmware-player
-Prefer: libgcc%{gcc_version} libgcc%{gcc_version}-32bit libgcc%{gcc_version}-64bit
-Prefer: libgcc%{gcc_version}-x86 libffi%{gcc_version} libffi%{gcc_version}-devel libgcj_bc%{gcc_version}
-Prefer: libffi%{gcc_version}-32bit libffi%{gcc_version}-64bit
-Prefer: libgomp%{gcc_version} libgomp%{gcc_version}-32bit libgomp%{gcc_version}-64bit
+Prefer: libgcc_s1 libgcc_s1-32bit libgcc_s1-64bit
+Prefer: libgcc_s1-x86 libffi4 libffi4-devel libgcj_bc%{gcc_version}
+Prefer: libffi4-32bit libffi4-64bit
+Prefer: libgomp1 libgomp1-32bit libgomp1-64bit
Prefer: libmudflap%{gcc_version} libmudflap%{gcc_version}-32bit libmudflap%{gcc_version}-64bit
-Prefer: libobjc%{gcc_version} libgfortran%{gcc_version} libquadmath%{gcc_version}
+Prefer: libobjc%{gcc_version} libgfortran3 libquadmath%{gcc_version}
Prefer: -libnetpbm -libcdio7-mini -libiso9660-5-mini -libiso9660-7-mini -libcdio10-mini -libcdio12-mini
Prefer: -libcdio-mini -faac-mini -libcdio-mini-devel
Prefer: -seamonkey
@@ -276,7 +264,10 @@
Prefer: libreoffice:xerces-j2
Prefer: k3b:libdvdread4
Prefer: glibc-devel
-Prefer: -libpcap -java-1_7_0-icedtea-devel -libiniparser -loudmouth -libkonq4 -libnetcdf-4 -java-1_7_0-openjdk-javadoc
+Prefer: -libpcap -libiniparser -loudmouth -libkonq4 -libnetcdf-4 -java-1_7_0-openjdk-javadoc -java-1_7_0-icedtea-javadoc
+%ifnarch %arm
+Prefer: -java-1_7_0-icedtea-devel
+%endif
Prefer: NetworkManager:dhcp-client
Prefer: kdebase3-SuSE:kdebase3
Prefer: kde4-kdm:kde4-kdm-branding-upstream
@@ -287,7 +278,7 @@
Prefer: libgnome-keyring-devel
Prefer: linux-glibc-devel
Prefer: squid sysvinit
-Prefer: libpng14-compat-devel
+Prefer: libpng15-compat-devel
Prefer: -python3 -python3-gobject-devel -python3-gobject2-devel -x11-video-fglrxG02 -libpng12-0
Prefer: perl-Mail-SPF:perl-Error libldb0 -audit-libs mysql-community-server mysql-community-server-client
#needed because new xml-commons package
@@ -299,6 +290,8 @@
Prefer: gnome-shell:mozilla-js20
Prefer: cogl-devel
Prefer: -perl-XML-SAX
+# prefer module-init-tools
+Prefer: -kmod-compat
Ignore: openSUSE-release:openSUSE-release-ftp,openSUSE-release-dvd5,openSUSE-release-biarch,openSUSE-release-livecdkde,openSUSE-release-livecdgnome
Ignore: cracklib:cracklib-dict
@@ -341,6 +334,7 @@
Ignore: gtk2:libpng,libtiff
Ignore: libgnomecanvas-devel:glib-devel
Ignore: libgnomeui:gnome-icon-theme,shared-mime-info
+Ignore: libxfce4ui-1-0:exo-tools
Ignore: scrollkeeper:docbook_4
Ignore: gnome-desktop:libgnomesu,startup-notification
Ignore: python-devel:python-tk
@@ -360,7 +354,7 @@
Ignore: yast2-devtools:libxslt
Ignore: yast2-installation:yast2-update,yast2-mouse,yast2-country,yast2-bootloader,yast2-packager,yast2-network,yast2-online-update,yast2-users,release-notes,autoyast2-installation
Ignore: yast2-bootloader:bootloader-theme
-Ignore: yast2-packager:yast2-x11
+Ignore: yast2-packager:yast2-x11,libyui_pkg
Ignore: yast2-x11:sax2-libsax-perl
Ignore: yast2-network:yast2-inetd
Ignore: openslp-devel:openssl-devel
@@ -377,8 +371,41 @@
Ignore: pciutils:pciutils-ids
Ignore: postfix:iproute2
Ignore: aaa_base:systemd
+Ignore: ConsoleKit:systemd
+Ignore: openssh:systemd
+Ignore: cronie:systemd
+Ignore: systemd:kbd
Ignore: systemd:systemd-presets-branding
+Ignore: systemd:dbus-1
+Ignore: systemd:pam-config
+Ignore: systemd:udev
+Ignore: systemd-mini:this-is-only-for-build-envs
Ignore: polkit:ConsoleKit
+Ignore: logrotate:cron
+Ignore: texlive-filesystem:cron
+Ignore: xinit:xterm
+Ignore: xdm:xterm
+Ignore: gnome-control-center:gnome-themes-accessibility
+Ignore: coreutils:info
+Ignore: cpio:info
+Ignore: diffutils:info
+Ignore: findutils:info
+Ignore: gawk:info
+Ignore: grep:info
+Ignore: groff:info
+Ignore: m4:info
+Ignore: sed:info
+Ignore: tar:info
+Ignore: util-linux:info
+Ignore: gettext-tools:info
+Ignore: gettext-runtime:info
+Ignore: libgcrypt-devel:info
+Ignore: binutils:info
+Ignore: gzip:info
+Ignore: make:info
+Ignore: bison:info
+Ignore: flex:info
+Ignore: help2man:info
Ignore: libgcc:glibc-32bit
Ignore: libgcc41:glibc-32bit
@@ -404,6 +431,8 @@
Ignore: hotplug:syslog
Ignore: pcmcia:syslog
Ignore: openct:syslog
+Ignore: postfix:sysvinit(syslog)
+Ignore: cups:sysvinit(syslog)
Ignore: avalon-logkit:servlet
Ignore: jython:servlet
Ignore: ispell:ispell_dictionary,ispell_english_dictionary
@@ -465,6 +494,7 @@
Ignore: openwbem-devel
Ignore: MozillaFirefox:MozillaFirefox-branding
Ignore: yast2:yast2-branding
+Ignore: plymouth:plymouth-branding
Ignore: yast2-qt:yast2-branding
Ignore: yast2-theme-SLE:yast2-branding
Ignore: yast2-registration:yast2-registration-branding
@@ -491,14 +521,17 @@
# no build dependencies
Ignore: libksuseinstall1:yast2-packager
Ignore: libksuseinstall1:zypper
+Ignore: syslog-service:logrotate
+Ignore: libglue-devel:cluster-glue
Ignore: libqca2:gpg2
Ignore: NetworkManager:wpa_supplicant
Ignore: NetworkManager:dhcp-client
Ignore: autoyast2:yast2-schema
+Ignore: libgio-2_0-0:dbus-1-x11
-# to be removed after 12.2 release
-Substitute: xorg-x11 xorg-x11 appres bdftopcf beforelight bitmap editres fonttosfnt fslsfonts fstobdf iceauth ico lbxproxy listres luit mkcomposecache oclock proxymngr rendercheck rstart showfont smproxy viewres x11perf xbacklight xbiff xcalc xclipboard xclock xcmsdb xcompmgr xcursor-themes xcursorgen xdbedizzy xditview xdpyinfo xedit xev xeyes xf86dga xfd xfindproxy xfontsel xfs xfsinfo xfwp xgamma xgc xhost xinput xkbcomp xkbevd xkbprint xkbutils xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xman xmessage xmore xorg-scripts xplsprinters xpr xprehashprinterlist xprop xrandr xrefresh xrestop xrx xscope xset xsetmode xsetpointer xsm xstdcmap xtrap xvidtune xvinfo xwd xwininfo xwud
-
+%ifarch %arm
+Prefer: java-1_7_0-icedtea java-1_7_0-icedtea-devel
+%else
%ifnarch ia64 s390 s390x
Prefer: java-1_7_0-openjdk java-1_7_0-openjdk-devel
%endif
@@ -508,22 +541,18 @@
%ifarch ia64
Prefer: java-1_6_0-bea java-1_6_0-bea-devel
%endif
+%endif
Prefer: -java-1_5_0-gcj-compat-devel
%ifarch %ix86 x86_64
Prefer: -java-1_5_0-ibm-devel
%endif
-# We use always openjdk on openSUSE !
-#%ifnarch ia64 s390 s390x
+
+%ifarch %arm
+Substitute: java2-devel-packages java-1_7_0-icedtea-devel
+%else
Substitute: java2-devel-packages java-1_7_0-openjdk-devel
-#%else
-# %ifarch s390 s390x
-#Substitute: java2-devel-packages java-1_6_0-ibm-devel unzip update-alternatives
-# %endif
-# %ifarch ia64
-#Substitute: java2-devel-packages java-1_6_0-bea-devel unzip update-alternatives
-# %endif
-#%endif
+%endif
%ifarch x86_64 ppc64 s390x sparc64
Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
@@ -569,6 +598,10 @@
Optflags: ia64 -fmessage-length=0
Optflags: s390 -fmessage-length=0
Optflags: s390x -fmessage-length=0
+Optflags: armv5el -fmessage-length=0
+Optflags: armv5tel -fmessage-length=0
+Optflags: armv7l -fmessage-length=0
+Optflags: armv7hl -fmessage-length=0
# need mcpu=ultrasparc to complete sparcv8plus to sparcv9 (adds, for example, atomic ops)
Optflags: sparcv9 -fmessage-length=0 -mcpu=ultrasparc
Optflags: sparc64 -fmessage-length=0 -mcpu=ultrasparc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/detect_architecture.sh new/obs-build-20130517/detect_architecture.sh
--- old/obs-build-20130402/detect_architecture.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/obs-build-20130517/detect_architecture.sh 2013-05-17 11:24:45.000000000 +0200
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+source common_functions
+
+build_host_arch
+
+echo $BUILD_HOST_ARCH
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/init_buildsystem new/obs-build-20130517/init_buildsystem
--- old/obs-build-20130402/init_buildsystem 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/init_buildsystem 2013-05-17 11:24:45.000000000 +0200
@@ -284,8 +284,9 @@
fi
# hack: add nofsync to db config to speed up install
mkdir -p $BUILD_ROOT/root
- echo '%__dbi_perms perms=0644 nofsync' > $BUILD_ROOT/.rpmmacros
- echo '%__dbi_perms perms=0644 nofsync' > $BUILD_ROOT/root/.rpmmacros
+ DBI_OTHER=`chroot $BUILD_ROOT rpm --eval '%{?__dbi_other}'`
+ echo "%__dbi_other $DBI_OTHER nofsync" > $BUILD_ROOT/.rpmmacros
+ echo "%__dbi_other $DBI_OTHER nofsync" > $BUILD_ROOT/root/.rpmmacros
elif test $PSUF = deb ; then
# force dpkg into database to make epoch test work
if ! test "$BUILD_ROOT/.init_b_cache/rpms/dpkg.deb" -ef "$BUILD_ROOT/.init_b_cache/dpkg.deb" ; then
@@ -602,10 +603,19 @@
#
if check_use_emulator; then
if [ -z "$PREPARE_VM" ]; then
- echo "registering binfmt handlers"
+ echo "WARNING: registering binfmt handlers system wide."
- if [ -x "$BUILD_DIR/initvm" -a -e "$BUILD_DIR/qemu-reg" ]; then
- $BUILD_DIR/initvm
+ if [ -x /usr/sbin/qemu-binfmt-conf.sh ]; then
+ [ -e /proc/sys/fs/binfmt_misc ] || mount -n binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
+ /usr/sbin/qemu-binfmt-conf.sh
+ else
+ echo "Warning: could not register binfmt handlers. /usr/sbin/qemu-binfmt-conf.sh does not exist. You may want to use KVM/XEN for using vminit instead"
+ fi
+ else
+ echo "registering binfmt handlers for VM"
+
+ if [ -x "$BUILD_DIR/initvm.`uname -m`" -a -e "$BUILD_DIR/qemu-reg" ]; then
+ $BUILD_DIR/initvm.`uname -m`
elif [ -x /usr/sbin/qemu-binfmt-conf.sh ]; then
[ -e /proc/sys/fs/binfmt_misc ] || mount -n binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
/usr/sbin/qemu-binfmt-conf.sh
@@ -613,9 +623,7 @@
echo "Warning: could not register binfmt handlers. Neither build-initvm nor /usr/sbin/qemu-binfmt-conf.sh exist"
fi
- if [ -n "$PREPARE_VM" ]; then
- echo 0 > /proc/sys/vm/mmap_min_addr
- fi
+ echo 0 > /proc/sys/vm/mmap_min_addr
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"
@@ -627,8 +635,6 @@
PACKAGES_TO_PREINSTALL=
PACKAGES_TO_RUNSCRIPTS=
PACKAGES_TO_VMINSTALL=
- PACKAGES_TO_CBPREINSTALL=
- PACKAGES_TO_CBINSTALL=
PREINSTALL_IMAGE=
PREINSTALL_IMAGE_SOURCE=
RUNSCRIPTS_SEEN=
@@ -791,13 +797,11 @@
done
PACKAGES_TO_PREINSTALL_FILTERED="$PACKAGES_TO_PREINSTALL"
PACKAGES_TO_VMINSTALL_FILTERED="$PACKAGES_TO_VMINSTALL"
- PACKAGES_TO_CBPREINSTALL_FILTERED="$PACKAGES_TO_CBPREINSTALL"
rm -f "$BUILD_ROOT/.preinstall_image"/*
if test -n "$PREINSTALL_IMAGE" ; then
preinstall_image "$PREINSTALL_IMAGE" "$PREINSTALL_IMAGE_SOURCE"
PACKAGES_TO_PREINSTALL_FILTERED=`preinstall_image_filter $PACKAGES_TO_PREINSTALL_FILTERED`
PACKAGES_TO_VMINSTALL_FILTERED=`preinstall_image_filter $PACKAGES_TO_VMINSTALL_FILTERED`
- PACKAGES_TO_CBPREINSTALL_FILTERED=`preinstall_image_filter $PACKAGES_TO_VMINSTALL_FILTERED`
fi
PACKAGES_TO_PREINSTALL_FILTERED=`reorder $PACKAGES_TO_PREINSTALL_FILTERED`
progress_setup PACKAGES_TO_PREINSTALL_FILTERED
@@ -814,13 +818,6 @@
preinstall ${PKG##*/}
done
fi
- # add cbpreinstall if cross HOST != TARGET
- PACKAGES_TO_CBINSTALL_FILTERED=`reorder $PACKAGES_TO_CBINSTALL_FILTERED`
- progress_setup PACKAGES_TO_CBPREINSTALL_FILTERED
- for PKG in $PACKAGES_TO_CBPREINSTALL_FILTERED ; do
- progress_step PACKAGES_TO_CBPREINSTALL_FILTERED
- preinstall ${PKG##*/}
- done
# for reorder
check_exit
if [ -w /root ]; then
@@ -853,7 +850,6 @@
echo "PACKAGES_TO_RUNSCRIPTS='${PACKAGES_TO_RUNSCRIPTS//"'"/$Q}'" >> $BUILD_ROOT/.build/init_buildsystem.data
# needed for continuation in xen/kvm with rpm-x86
echo "PACKAGES_TO_PREINSTALL='${PACKAGES_TO_PREINSTALL//"'"/$Q}'" >> $BUILD_ROOT/.build/init_buildsystem.data
- echo "PACKAGES_TO_CBPREINSTALL='${PACKAGES_TO_CBPREINSTALL//"'"/$Q}'" >> $BUILD_ROOT/.build/init_buildsystem.data
echo "PSUF='$PSUF'" >> $BUILD_ROOT/.build/init_buildsystem.data
rm -f $BUILD_IS_RUNNING
cleanup_and_exit 0
@@ -930,7 +926,7 @@
test "$PKG" = "*" && continue
ln $BUILD_ROOT/.init_b_cache/alreadyinstalled/$PKG $BUILD_ROOT/.init_b_cache/todelete/$PKG
done
-for PKG in $PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL ; do
+for PKG in $PACKAGES_TO_INSTALL; do
rm -f $BUILD_ROOT/.init_b_cache/todelete/$PKG
done
for PKG in $BUILD_ROOT/.init_b_cache/todelete/* ; do
@@ -944,7 +940,7 @@
rm -rf "$BUILD_ROOT/.init_b_cache/preinstalls"
mkdir -p "$BUILD_ROOT/.init_b_cache/preinstalls"
-for PKG in $PACKAGES_TO_PREINSTALL $PACKAGES_TO_CBPREINSTALL; do
+for PKG in $PACKAGES_TO_PREINSTALL; do
touch "$BUILD_ROOT/.init_b_cache/preinstalls/$PKG"
done
@@ -971,7 +967,7 @@
DO_CUMULATE=true
fi
-MAIN_LIST="$PACKAGES_TO_INSTALL $PACKAGES_TO_CBINSTALL"
+MAIN_LIST="$PACKAGES_TO_INSTALL"
test -n "$DO_CUMULATE" && MAIN_LIST="$MAIN_LIST CUMULATED"
progress_setup MAIN_LIST
for PKG in $MAIN_LIST; do
@@ -1076,7 +1072,7 @@
PKGID="${PKGID%.arch} arch"
echo "installing ${PKGID%% *}"
# -d -d disables deps checking
- ( chroot $BUILD_ROOT pacman -Uf -d -d --noconfirm .init_b_cache/$PKG.$PSUF 2>&1 || touch $BUILD_ROOT/exit ) | \
+ ( chroot $BUILD_ROOT pacman -U --force -d -d --noconfirm .init_b_cache/$PKG.$PSUF 2>&1 || touch $BUILD_ROOT/exit ) | \
perl -ne '$|=1;/^(warning: could not get filesystem information for |loading packages|looking for inter-conflicts|Targets |Total Installed Size: |Net Upgrade Size: |Proceed with installation|checking package integrity|loading package files|checking available disk space|installing |upgrading |warning:.*is up to date -- reinstalling|Optional dependencies for| )/||/^$/||print'
check_exit
echo "$PKGID" > $BUILD_ROOT/installed-pkg/$PKG
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/mkdrpms new/obs-build-20130517/mkdrpms
--- old/obs-build-20130402/mkdrpms 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/mkdrpms 2013-05-17 11:24:45.000000000 +0200
@@ -1,7 +1,8 @@
#!/usr/bin/perl -w
BEGIN {
- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
+ unshift @INC, '/usr/lib/build';
+ unshift @INC, $::ENV{'BUILD_DIR'} if $::ENV{'BUILD_DIR'};
}
use Build;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20130402/substitutedeps new/obs-build-20130517/substitutedeps
--- old/obs-build-20130402/substitutedeps 2013-04-02 13:06:37.000000000 +0200
+++ new/obs-build-20130517/substitutedeps 2013-05-17 11:24:45.000000000 +0200
@@ -113,11 +113,10 @@
}
}
- if ($line =~ /^Release:(.*)\s*$/i) {
+ if ($line =~ /^Release\s*:\s*(.*?)\s*$/i) {
my $spec_rel = $1; # User-provided value
my $oldl = $line;
if (defined $release) {
- $line =~ s//$spec_rel/;
if (!($line =~ s//$release/g)) {
if ($line =~ /<(?:CI_CNT|B_CNT)>/) {
# XXX: should pass ci_cnt/b_cnt instead
@@ -131,15 +130,17 @@
$line =~ s//$b/;
}
} else {
- $line =~ s/^(Release:\s*).*/$1$release/i;
+ # no special replacement rules in the line, simply replace
+ $line =~ s/^(Release\s*:\s*).*/$1$release/i;
+ $line =~ s//$spec_rel/g;
}
}
+ $line =~ s///g; # no recursion please
} else {
# remove macros, as rpm doesn't like them
$line =~ s//0/;
$line =~ s//0/;
$line =~ s//0/;
- $line =~ s//0/;
}
# this is to be compatible to legacy autobuild.
# you can specify a releaseprg in the project configuration,
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org