Hello community,

here is the log from the commit of package build for openSUSE:Factory
checked in at Mon Feb 28 15:15:18 CET 2011.



--------
--- build/build.changes 2010-12-09 15:52:49.000000000 +0100
+++ /mounts/work_src_done/STABLE/build/build.changes    2011-02-28 
10:04:38.000000000 +0100
@@ -1,0 +2,11 @@
+Mon Feb 28 09:02:32 UTC 2011 - [email protected]
+
+- do not use current git branch for stable build package in distributions
+- require bsdtar for vm builds to ensure a safe build
+
+-------------------------------------------------------------------
+Wed Dec 15 14:05:09 CET 2010 - [email protected]
+
+- also use -o when using bsdtar --chroot
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  _service:recompress:tar_scm:build-2010.12.09.tar.gz
  _service:set_version:build.dsc
  _service:set_version:build.spec
  debian.tar.gz

New:
----
  build-2011.01.20.tar.gz

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

Other differences:
------------------
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.8X8vdl/_old  2011-02-28 15:14:43.000000000 +0100
+++ /var/tmp/diff_new_pack.8X8vdl/_new  2011-02-28 15:14:43.000000000 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package build (Version 2010.12.09)
+# spec file for package build
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 Group:          Development/Tools/Building
 AutoReqProv:    on
 Summary:        A Script to Build SUSE Linux RPMs
-Version:        2010.12.09
+Version:        2011.01.20
 Release:        1
 #!BuildIgnore:  build-mkbaselibs
 Source:         build-%{version}.tar.gz

++++++ _service ++++++
--- /var/tmp/diff_new_pack.8X8vdl/_old  2011-02-28 15:14:43.000000000 +0100
+++ /var/tmp/diff_new_pack.8X8vdl/_new  2011-02-28 15:14:43.000000000 +0100
@@ -1,5 +1,12 @@
 <services>
-  <service name="tar_scm"><param name="version">2010.12.09</param><param 
name="url">git://gitorious.org/opensuse/build.git</param><param 
name="scm">git</param></service>
-<service name="recompress"><param name="compression">gz</param><param 
name="file">*.tar</param></service>
-<service name="set_version"/>
+  <service name="tar_scm" mode="disabled">
+    <param name="version">2011.01.20</param>
+    <param name="url">git://gitorious.org/opensuse/build.git</param>
+    <param name="scm">git</param>
+  </service>
+  <service name="recompress" mode="disabled">
+    <param name="compression">gz</param>
+    <param name="file">*.tar</param>
+  </service>
+  <service name="set_version" mode="disabled"/>
 </services>

++++++ _service:recompress:tar_scm:build-2010.12.09.tar.gz -> 
build-2011.01.20.tar.gz ++++++
Files old/build-2010.12.09/.git/index and new/build-2011.01.20/.git/index differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/.git/logs/HEAD 
new/build-2011.01.20/.git/logs/HEAD
--- old/build-2010.12.09/.git/logs/HEAD 2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/.git/logs/HEAD 2011-02-28 10:02:24.000000000 +0100
@@ -1 +1 @@
-0000000000000000000000000000000000000000 
1fee29b563a4c8039a0aa6aa98fb597643c33325 nobody <[email protected]> 
1291906383 +0100   clone: from git://gitorious.org/opensuse/build.git
+0000000000000000000000000000000000000000 
677e5324797c0f1729ec6bb2f6106fc8854f1d9f Adrian Schröter <[email protected]> 
1298883744 +0100    clone: from git://gitorious.org/opensuse/build.git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/.git/logs/refs/heads/master 
new/build-2011.01.20/.git/logs/refs/heads/master
--- old/build-2010.12.09/.git/logs/refs/heads/master    2010-12-09 
15:53:03.000000000 +0100
+++ new/build-2011.01.20/.git/logs/refs/heads/master    2011-02-28 
10:02:24.000000000 +0100
@@ -1 +1 @@
-0000000000000000000000000000000000000000 
1fee29b563a4c8039a0aa6aa98fb597643c33325 nobody <[email protected]> 
1291906383 +0100   clone: from git://gitorious.org/opensuse/build.git
+0000000000000000000000000000000000000000 
677e5324797c0f1729ec6bb2f6106fc8854f1d9f Adrian Schröter <[email protected]> 
1298883744 +0100    clone: from git://gitorious.org/opensuse/build.git
Files 
old/build-2010.12.09/.git/objects/pack/pack-8e930a325f3c5d978c8b560853ad2adc1671fd92.idx
 and 
new/build-2011.01.20/.git/objects/pack/pack-8e930a325f3c5d978c8b560853ad2adc1671fd92.idx
 differ
Files 
old/build-2010.12.09/.git/objects/pack/pack-8e930a325f3c5d978c8b560853ad2adc1671fd92.pack
 and 
new/build-2011.01.20/.git/objects/pack/pack-8e930a325f3c5d978c8b560853ad2adc1671fd92.pack
 differ
Files 
old/build-2010.12.09/.git/objects/pack/pack-db6ae10fad5e7bddbce4ddf6c5b9df8e002d7c39.idx
 and 
new/build-2011.01.20/.git/objects/pack/pack-db6ae10fad5e7bddbce4ddf6c5b9df8e002d7c39.idx
 differ
Files 
old/build-2010.12.09/.git/objects/pack/pack-db6ae10fad5e7bddbce4ddf6c5b9df8e002d7c39.pack
 and 
new/build-2011.01.20/.git/objects/pack/pack-db6ae10fad5e7bddbce4ddf6c5b9df8e002d7c39.pack
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/.git/packed-refs 
new/build-2011.01.20/.git/packed-refs
--- old/build-2010.12.09/.git/packed-refs       2010-12-09 15:53:03.000000000 
+0100
+++ new/build-2011.01.20/.git/packed-refs       2011-02-28 10:02:24.000000000 
+0100
@@ -1,4 +1,4 @@
 # pack-refs with: peeled 
 4e616df18f2805b6cdb4d674cf6e0cb27798a73a refs/tags/obs_2.0
 4acd145bf4dbff921f1d16977d5a707e3234cead refs/remotes/origin/obs_2.0
-1fee29b563a4c8039a0aa6aa98fb597643c33325 refs/remotes/origin/master
+677e5324797c0f1729ec6bb2f6106fc8854f1d9f refs/remotes/origin/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/.git/refs/heads/master 
new/build-2011.01.20/.git/refs/heads/master
--- old/build-2010.12.09/.git/refs/heads/master 2010-12-09 15:53:03.000000000 
+0100
+++ new/build-2011.01.20/.git/refs/heads/master 2011-02-28 10:02:24.000000000 
+0100
@@ -1 +1 @@
-1fee29b563a4c8039a0aa6aa98fb597643c33325
+677e5324797c0f1729ec6bb2f6106fc8854f1d9f
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/.git/shallow 
new/build-2011.01.20/.git/shallow
--- old/build-2010.12.09/.git/shallow   1970-01-01 01:00:00.000000000 +0100
+++ new/build-2011.01.20/.git/shallow   2011-02-28 10:02:24.000000000 +0100
@@ -0,0 +1,3 @@
+23bfa1b1ab1db2f2b4f999a04ff2cdc7e9f29005
+59d713d8bd77fa846a540bdcc8b67a89b0de3263
+b8b49def2820e46a5f6c2724a1dbce1a83f0dcb5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/Build/Rpm.pm 
new/build-2011.01.20/Build/Rpm.pm
--- old/build-2010.12.09/Build/Rpm.pm   2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/Build/Rpm.pm   2011-02-28 10:02:24.000000000 +0100
@@ -112,6 +112,15 @@
   }
 }
 
+# xspec may be passed as array ref to return the parsed spec files
+# an entry in the returned array can be
+# - a string: verbatim line from the original file
+# - a two element array ref:
+#   - [0] original line
+#   - [1] undef: line unused due to %if
+#   - [1] scalar: line after macro expansion. Only set if it's a build deps
+#                 line and build deps got modified or 'save_expanded' is set in
+#                 config
 sub parse {
   my ($config, $specfile, $xspec) = @_;
 
@@ -351,6 +360,10 @@
       my $what = $1;
       my $deps = $2;
       $ifdeps = 1 if $hasif;
+      # XXX: weird syntax addition. can append arch or project to dependency
+      # BuildRequire: foo > 17 [i586,x86_64]
+      # BuildRequire: foo [home:bar]
+      # BuildRequire: foo [!home:bar]
       my @deps = $deps =~ 
/([^\s\[,]+)(\s+[<=>]+\s+[^\s\[,]+)?(\s+\[[^\]]+\])?[\s,]*/g;
       my $replace = 0;
       my @ndeps = ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/Build.pm 
new/build-2011.01.20/Build.pm
--- old/build-2010.12.09/Build.pm       2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/Build.pm       2011-02-28 10:02:24.000000000 +0100
@@ -29,8 +29,8 @@
 my $std_macros = q{
 %define nil
 %define ix86 i386 i486 i586 i686 athlon
-%define arm armv4l armv4b armv5l armv5b armv5el armv5eb armv5tel armv5teb 
armv6el armv6eb armv7el armv7eb
-%define arml armv4l armv5l armv5tel armv5el armv6el armv7el
+%define arm armv4l armv4b armv5l armv5b armv5el armv5eb armv5tel armv5teb 
armv6el armv6eb armv7el armv7eb armv7hl armv7nhl armv8el
+%define arml armv4l armv5l armv5tel armv5el armv6el armv7el armv7hl armv7nhl 
armv8el
 %define armb armv4b armv5b armv5teb armv5eb armv6eb armv7eb
 %define sparc sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/Makefile 
new/build-2011.01.20/Makefile
--- old/build-2010.12.09/Makefile       2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/Makefile       2011-02-28 10:02:24.000000000 +0100
@@ -36,7 +36,6 @@
            extractbuild \
            getbinaryid \
            killchroot \
-           xen.conf \
            getmacros \
            getoptflags \
            getchangetarget \
@@ -45,6 +44,8 @@
            initscript_qemu_vm \
            substitutedeps \
            debtransform \
+           debtransformbz2 \
+           debtransformzip \
            mkbaselibs \
            mkdrpms \
            createrepomddeps \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/build new/build-2011.01.20/build
--- old/build-2010.12.09/build  2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/build  2011-02-28 10:02:24.000000000 +0100
@@ -22,15 +22,15 @@
 
 # defaults for vm_img_mkfs
 vm_img_mkfs_ext4='mkfs.ext4 -m 0 -q -F'
-vm_img_tunefs_ext4='tune2fs -c 0 -o journal_data_writeback'
+vm_img_tunefs_ext4='tune2fs -c 0 -O ^has_journal'
 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'
 vm_img_tunefs_ext2='tune2fs -c 0'
 vm_img_mkfs_reiserfs='mkreiserfs -q -f'
 
-qemu_kernel=/boot/vmlinuz
-qemu_initrd=/boot/initrd
+vm_kernel=/boot/vmlinuz
+vm_initrd=/boot/initrd
 qemu_bin=/usr/bin/qemu
 uml_kernel=/boot/vmlinux-um
 uml_initrd=/boot/initrd-um
@@ -85,15 +85,13 @@
 SIGNDUMMY=
 
 # list of archs which need emulator initialization
-: ${EMULATOR_ARCHS:="armv4l armv5el armv6el armv7el armv8el mips mipsel mips64 
mips64el ppc ppc64 sh4"}
+: ${EMULATOR_ARCHS:="armv4l armv5el armv6el armv7el armv7hl armv8el mips 
mipsel mips64 mips64el ppc ppc64 sh4"}
 export EMULATOR_ARCHS
 
 # list of devices registered by binfmt handlers in /proc/sys/fs/binfmt_misc
 : ${EMULATOR_DEVS:="arm mips mipsel mips64 mips64el ppc sh4 sparc"}
 export EMULATOR_DEVS
 
-: ${CACHE_DIR:=/var/cache/build}
-
 # This is for insserv
 export YAST_IS_RUNNING=instsys
 
@@ -267,6 +265,7 @@
 cleanup_and_exit () {
     trap EXIT
     test -z "$1" && set 0
+    rm -f $BUILD_ROOT/exit
     if test -n "$RUNNING_IN_VM" ; then
        chown $browner $BUILD_ROOT
        cd /
@@ -334,7 +333,7 @@
 {
     if [ "$ccache" = 1 ]; then
        if mkdir -p $BUILD_ROOT/var/lib/build/ccache/bin; then
-           for i in gcc g++ cc c++; do
+           for i in $(ls $BUILD_ROOT/usr/bin | grep -E 
'^(cc|gcc|[cg][+][+])([-]?[234][.]?[0-9])*$'); do
 #                ln -sf /usr/bin/ccache $BUILD_ROOT/var/lib/build/ccache/bin/$i
                rm -f $BUILD_ROOT/var/lib/build/ccache/bin/$i
                test -e $BUILD_ROOT/usr/bin/$i || continue
@@ -500,6 +499,7 @@
     local i=0
     local d
     local dest
+    [ -z "$RUNNING_IN_VM" ] || return 0
     if [ -z "$old_packages" ]; then
        rm -rf "$BUILD_ROOT"/.build.oldpackages*
        return 0
@@ -1002,6 +1002,7 @@
        XENID="${VM_IMAGE%/root}"
        XENID="${XENID%/tmpfs}"
        XENID="${XENID##*/}"
+       XENID="${XENID#root_}"
        if xm list "build:$XENID" >/dev/null 2>&1 ; then
            if ! xm destroy "build:$XENID" ; then
                echo "could not kill xen build $XENID"
@@ -1020,14 +1021,29 @@
     cleanup_and_exit 0
 fi
 
+if [ "$VM_TYPE" = 'xen' -a -z "$RUNNING_IN_VM" ]; then
+    # XXX: merge with kvm path?
+    if [ -n "$VM_KERNEL" ]; then
+       vm_kernel="$VM_KERNEL"
+    elif [ -e "/boot/vmlinuz-xen" ]; then
+       vm_kernel="/boot/vmlinuz-xen"
+    fi
+    if [ -n "$VM_INITRD" ]; then
+       vm_initrd="$VM_INITRD"
+    elif [ -e "/boot/initrd-xen" ]; then
+       vm_initrd="/boot/initrd-xen"
+    fi
+fi
+
 if [ "$VM_TYPE" = 'kvm' -a -z "$RUNNING_IN_VM" ]; then
     if [ ! -r /dev/kvm -o ! -x "$qemu_bin"-kvm ]; then
        echo "host doesn't support kvm"
+       echo "either the kvm kernel-module is not loaded or kvm is not 
installed or hardware virtualization is deactivated in the BIOS."
        cleanup_and_exit 3
     fi
     qemu_bin="$kvm_bin"
     if [ -n "$VM_KERNEL" ]; then
-       qemu_kernel="$VM_KERNEL"
+       vm_kernel="$VM_KERNEL"
     fi
 
     # check if a SUSE system with virtio initrd is running
@@ -1043,37 +1059,37 @@
     fi
 
     if [ -n "$VM_INITRD" ]; then
-       qemu_initrd="$VM_INITRD"
+       vm_initrd="$VM_INITRD"
        kvm_virtio=1
-    elif [ -e "${qemu_initrd}-build" ]; then
-       qemu_initrd="${qemu_initrd}-build"
+    elif [ -e "${vm_initrd}-build" ]; then
+       vm_initrd="${vm_initrd}-build"
        kvm_virtio=1
     else
-       if [ -L "$qemu_initrd" ]; then
-           qemu_initrd=`readlink -f "$qemu_initrd"` || cleanup_and_exit 3
+       if [ -L "$vm_initrd" ]; then
+           vm_initrd=`readlink -f "$vm_initrd"` || cleanup_and_exit 3
        fi
-       qemu_initrd_virtio="${qemu_initrd}-virtio"
+       vm_initrd_virtio="${vm_initrd}-virtio"
 
-       if [ ! -e ${qemu_initrd_virtio} -o $qemu_kernel -nt 
${qemu_initrd_virtio} ]; then
+       if [ ! -e ${vm_initrd_virtio} -o $vm_kernel -nt ${vm_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})
+                   -k $vm_kernel \
+                   -i ${vm_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"
+               echo "creating $vm_initrd_virtio"
                "${mkinitrd_virtio_cmd[@]}" || cleanup_and_exit 1
                kvm_virtio=1
-               qemu_initrd="${qemu_initrd_virtio}"
+               vm_initrd="${vm_initrd_virtio}"
            fi
        else
            kvm_virtio=1
-           qemu_initrd="${qemu_initrd_virtio}"
+           vm_initrd="${vm_initrd_virtio}"
        fi
     fi
 
@@ -1142,21 +1158,22 @@
            XENID="${VM_IMAGE%/root}"
            XENID="${XENID%/tmpfs}"
            XENID="${XENID##*/}"
+           XENID="${XENID#root_}"
            xm destroy "build:$XENID" >/dev/null 2>&1
        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=1 count=1 seek=$(( 
${VMDISK_ROOTSIZE} * 1024 * 1024 - 1 )) || cleanup_and_exit 3
+           dd if=/dev/zero of="$VM_IMAGE" bs=1M count=0 
seek="$VMDISK_ROOTSIZE" || 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
+       if test -n "$VM_SWAP" -a ! -e "$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=1 count=1 seek=$(( 
${VMDISK_SWAPSIZE} * 1024 * 1024 - 1 )) || cleanup_and_exit 3
+           dd if=/dev/zero of="$VM_SWAP" bs=1M count=0 seek="$VMDISK_SWAPSIZE" 
|| cleanup_and_exit 3
        fi
        if test ! -e "$VM_IMAGE" ; then
            echo "you need to create $VM_IMAGE first"
@@ -1424,6 +1441,7 @@
                XENID="${VM_IMAGE%/root}"
                XENID="${XENID%/tmpfs}"
                XENID="${XENID##*/}"
+               XENID="${XENID#root_}"
 
                echo "booting XEN kernel ..."
                if xm list "build:$XENID" >/dev/null 2>&1 ; then
@@ -1431,11 +1449,22 @@
                   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="$vm_init_script" 
elevator=noop panic=1 console=ttyS0"
+               XEN_CONF_FILE=`mktemp build.xen.conf` || cleanup_and_exit 3
+               echo "kernel = \"$vm_kernel\""                                  
         >  $XEN_CONF_FILE
+               echo "ramdisk = \"$vm_initrd\""                                 
         >> $XEN_CONF_FILE
+               echo "memory = ${MEMSIZE:-64}"                                  
         >> $XEN_CONF_FILE
+               echo "vcpus = $BUILD_JOBS"                                      
         >> $XEN_CONF_FILE
+               echo "root = \"/dev/hda1 ro\""                                  
         >> $XEN_CONF_FILE
+               echo "extra = \"init=/bin/bash console=ttyS0 panic=1 
udev_timeout=360\"" >> $XEN_CONF_FILE
+               echo "on_poweroff = 'destroy'"                                  
         >> $XEN_CONF_FILE
+               echo "on_reboot = 'destroy'"                                    
         >> $XEN_CONF_FILE
+               echo "on_crash = 'destroy'"                                     
         >> $XEN_CONF_FILE
+               set -- xm create -c $XEN_CONF_FILE name="build:$XENID" $XMROOT 
$XMSWAP extra="quiet init="$vm_init_script" elevator=noop panic=1 console=ttyS0"
                if test "$PERSONALITY" != 0 ; then
                    # have to switch back to PER_LINUX to make xm work
                    set -- linux64 "$@"
                fi
+               rm "$XEN_CONF_FILE"
                echo "$@"
                "$@" || cleanup_and_exit 3
        elif [ "$VM_TYPE" = 'uml' ]; then
@@ -1463,8 +1492,8 @@
                fi
 
                set -- $qemu_bin -no-reboot -nographic -net none \
-                   -kernel $qemu_kernel \
-                   -initrd $qemu_initrd \
+                   -kernel $vm_kernel \
+                   -initrd $vm_initrd \
                    -append "root=$qemu_rootdev panic=1 quiet no-kvmclock rw 
elevator=noop console=ttyS0 init=$vm_init_script" \
                    ${MEMSIZE:+-m $MEMSIZE} \
                    "${qemu_args[@]}"
@@ -1898,7 +1927,10 @@
        # Checks to see if a build script should be used
        # this allows the build environment to be manipulated
        # and alternate build commands can be used
-       DSC_BUILD_CMD="dpkg-buildpackage -us -uc -rfakeroot-tcp"
+       if [ -n "$BUILD_JOBS" ]; then
+           DSC_BUILD_JOBS="-j$BUILD_JOBS"
+       fi
+       DSC_BUILD_CMD="dpkg-buildpackage -us -uc -rfakeroot-tcp $DSC_BUILD_JOBS"
        if test -e $BUILD_ROOT/$TOPDIR/SOURCES/build.script ; then
            echo "Sourcing build.script to build - it should normally run 
'dpkg-buildpackage -us -uc -rfakeroot-tcp'"
            DSC_BUILD_CMD="source $TOPDIR/SOURCES/build.script"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/build_kiwi.sh 
new/build-2011.01.20/build_kiwi.sh
--- old/build-2010.12.09/build_kiwi.sh  2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/build_kiwi.sh  2011-02-28 10:02:24.000000000 +0100
@@ -21,8 +21,12 @@
        repo="$TOPDIR/SOURCES/repos/${rc%/*}/${rc##*/}/"
         fi
         if test "$imagetype" != product ; then
-       echo "creating repodata for $repo"
-       chroot $BUILD_ROOT createrepo "$repo"
+           echo "creating repodata for $repo"
+           if chroot $BUILD_ROOT createrepo --simple-md-filenames --help 
>/dev/null 2>&1 ; then
+               chroot $BUILD_ROOT createrepo --simple-md-filenames "$repo"
+           else
+               chroot $BUILD_ROOT createrepo "$repo"
+           fi
         fi
     done
     # unpack root tar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/common_functions 
new/build-2011.01.20/common_functions
--- old/build-2010.12.09/common_functions       2010-12-09 15:53:03.000000000 
+0100
+++ new/build-2011.01.20/common_functions       2011-02-28 10:02:24.000000000 
+0100
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+: ${CACHE_DIR:=/var/cache/build}
+
 set_build_arch()
 {
     : ${BUILD_HOST_ARCH:=`uname -m`}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/debtransform 
new/build-2011.01.20/debtransform
--- old/build-2010.12.09/debtransform   2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/debtransform   2011-02-28 10:02:24.000000000 +0100
@@ -214,6 +214,23 @@
 die("dsc file contains no version\n") unless defined($version);
 $version =~ s/^\d+://; # no epoch in version, please
 
+# transform 
+my $tmptar;
+if ($tarfile =~ /\.tar\.bz2/) {
+    my $old = $tarfile;
+    $tarfile =~ s/\.tar\.bz2/\.tar\.gz/;
+    $tmptar = "$out/$tarfile";
+    print "converting $old to $tarfile\n";
+    system( ( "debtransformbz2", "$old", "$tmptar" )) == 0 || die("cannot 
transform .tar.bz2 to .tar.gz");
+}
+if ($tarfile =~ /\.zip/) {
+    my $old = $tarfile;
+    $tarfile =~ s/\.zip/\.tar\.gz/;
+    $tmptar = "$out/$tarfile";
+    print "converting $old to $tarfile\n";
+    system( ( "debtransformzip", "$old", "$tmptar" )) == 0 || die("cannot 
transform .zip to .tar.gz");
+}
+
 my $tardir = $tarfile;
 $tardir =~ s/\.orig\.tar/\.tar/;
 $tardir =~ s/\.tar.*?$//;
@@ -223,7 +240,12 @@
 $v =~ s/-[^-]*$//;
 $tarfile =~ /.*(\.tar.*?)$/;
 my $ntarfile = "${name}_$v.orig$1";
-link("$dir/$tarfile", "$out/$ntarfile") || die("link $dir/$tarfile 
$out/$ntarfile: $!\n");
+if( $tmptar ) {
+  link("$tmptar", "$out/$ntarfile") || die("link $dir/$tarfile $out/$ntarfile: 
$!\n");
+  unlink("$tmptar");
+} else {
+  link("$dir/$tarfile", "$out/$ntarfile") || die("link $dir/$tarfile 
$out/$ntarfile: $!\n");
+}
 push @files, addfile("$out/$ntarfile");
 
 open(DIFF, '>', "$out/${name}_$version.diff") || 
die("$out/${name}_$version.diff: $!\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/debtransformbz2 
new/build-2011.01.20/debtransformbz2
--- old/build-2010.12.09/debtransformbz2        1970-01-01 01:00:00.000000000 
+0100
+++ new/build-2011.01.20/debtransformbz2        2011-02-28 10:02:24.000000000 
+0100
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+if test $# -ne 2; then
+    exit 1
+fi
+
+bz="$1"
+tar="$2"
+
+bzcat "$bz" | gzip -f - >"$tar" || exit 1
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/debtransformzip 
new/build-2011.01.20/debtransformzip
--- old/build-2010.12.09/debtransformzip        1970-01-01 01:00:00.000000000 
+0100
+++ new/build-2011.01.20/debtransformzip        2011-02-28 10:02:24.000000000 
+0100
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+if test $# -ne 2; then
+    exit 1
+fi
+
+zip="$1"
+tar="$2"
+
+tmp=$(mktemp -d)
+unzip -q -d "$tmp" -- "$zip" || exit 1
+( cd "$tmp" && tar czO * ) >"$tar" || exit 1
+rm -r "$tmp"
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/init_buildsystem 
new/build-2011.01.20/init_buildsystem
--- old/build-2010.12.09/init_buildsystem       2010-12-09 15:53:03.000000000 
+0100
+++ new/build-2011.01.20/init_buildsystem       2011-02-28 10:02:24.000000000 
+0100
@@ -130,9 +130,16 @@
     echo "preinstalling $1..."
     cd $BUILD_ROOT || cleanup_and_exit 1
     if test -x /usr/bin/bsdtar ; then
-       CPIO="/usr/bin/bsdtar --chroot -x -f-"
-       TAR="/usr/bin/bsdtar --chroot -x"
+       CPIO="/usr/bin/bsdtar --chroot -o --numeric-owner -x -f-"
+       TAR="/usr/bin/bsdtar --chroot -o --numeric-owner -x"
     else
+       # cpio isn't safe so we require bsdtar for VMs. chroot is
+       # unsafe anyways so it's ok for that.
+       if [ -n "$PREPARE_VM" ]; then
+           echo "Error: setting up a VM requires bsdtar for security reasons."
+           echo "Please install bsdtar"
+           cleanup_and_exit 1
+       fi
        CPIO="cpio --extract --unconditional --preserve-modification-time 
--make-directories --no-absolute-filenames --quiet"
        TAR="tar -x"
     fi
@@ -363,7 +370,7 @@
 check_binfmt_registered()
 {
     local arch
-    for arch in arm $EMULATOR_ARCHS; do
+    for arch in $EMULATOR_DEVS; do
        if test -e /proc/sys/fs/binfmt_misc/$arch; then
            return 0
        fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/spec_add_patch 
new/build-2011.01.20/spec_add_patch
--- old/build-2010.12.09/spec_add_patch 2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/spec_add_patch 2011-02-28 10:02:24.000000000 +0100
@@ -4,13 +4,21 @@
 
 use strict;
 
-my $diffname = $ARGV[0];
-my $specname = $ARGV[1];
+sub helpexit {
+    print "$0: <patches...> [file.spec]\n";
+    exit 1;
+}
 
-if (!defined($diffname) || ! -f $diffname) {
+my $specname;
+my %diffs;
 
-    print "$0: <diffname>\n";
-    exit 1;
+for my $arg (@ARGV) {
+       if ($arg =~ /\.spec$/) {
+               helpexit() if $specname;
+               $specname = $arg;
+               next;
+       }
+       $diffs{$arg} = 1;
 }
 
 sub find_specfile()
@@ -36,7 +44,6 @@
 my $in_global = 1;
 my $last_patch_in_prep_index = 0;
 my $last_patch_in_global_index = 0;
-my $already_found_patch = 0;
 my @c = ();
 my $index = 0;
 
@@ -73,18 +80,18 @@
 
     die if (($in_prep + $in_global) > 1);
 
-    if ($in_global && /^Patch(?:\d+)?:/) {
+    if ($in_global && /^Patch(?:\d+)?:\s+(.+)/) {
         $last_patch_in_global_index = $index;
+       if ($diffs{$1}) {
+           print "$1 already in, skipped.";
+           delete $diffs{$1};
+       }
     }
 
     if ($in_global && $ifdef_level == 0 && /^Source(?:\d+)?:/) {
         $last_patch_in_global_index = $index;
     }
 
-    if ($in_global && /^Patch.*?:\s+$diffname/) {
-        $already_found_patch = 1;
-    }
-
     if ($in_prep && $ifdef_level == 0 && /^\%patch/) {
         $last_patch_in_prep_index = $index;
     }
@@ -93,10 +100,6 @@
 }
 close(S);
 
-exit 0 if ($already_found_patch);
-
-print "Adding patch $diffname to $specname\n";
-
 die if ($ifdef_level > 0);
 die if ($in_global || $in_prep);
 die if ($last_patch_in_prep_index == 0);
@@ -110,20 +113,27 @@
 $patchnum = $1+1 if ($c[$last_patch_in_global_index] =~ /Patch(\d+):/);
 $patchnum = 1 if ($c[$last_patch_in_global_index] =~ /Patch:/);
 
-# determine strip level
-my $striplevel = "";
-open(P, '<', $diffname) or die;
-while(<P>) {
-    $striplevel = " -p1" if (m/^--- a/ or m/^--- [^\/]+-\d+\./);
-    last if (/^--- /);
+for my $diffname (keys %diffs) {
+    # determine strip level
+    my $striplevel = "";
+    open(P, '<', $diffname) or die "$diffname: $!\n";
+    while(<P>) {
+       $striplevel = " -p1" if (m/^--- a/ or m/^--- [^\/]+-\d+\./);
+       last if (/^--- /);
 
-}
-close(P);
+    }
+    close(P);
 
+    print "Adding patch$striplevel $diffname to $specname\n";
 
-splice @c, $last_patch_in_prep_index+1, 0, ("\%patch$patchnum$striplevel\n");
-splice @c, $last_patch_in_global_index+1, 0,
+
+    splice @c, $last_patch_in_prep_index+1, 0, 
("\%patch$patchnum$striplevel\n");
+    splice @c, $last_patch_in_global_index+1, 0,
     (sprintf "Patch%s:%s%s\n", $patchnum, ' ' x (10-length($patchnum)), 
$diffname);
+    ++$last_patch_in_global_index;
+    $last_patch_in_prep_index+=2; # actually line number
+    ++$patchnum;
+}
 
 open(O, '>', "$specname.new") or die;
 print O @c;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/spectool 
new/build-2011.01.20/spectool
--- old/build-2010.12.09/spectool       2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/spectool       2011-02-28 10:02:24.000000000 +0100
@@ -171,8 +171,9 @@
 push @archs, 'noarch' unless grep {$_ eq 'noarch'} @archs;
 
 unless ($dist) {
-    $dist = `rpm -q --qf '%{DISTRIBUTION}' rpm 2>/dev/null`;
-    $dist = Build::dist_canon($dist||'', $archs[0]);
+    $dist = 'spectool';
+#    $dist = `rpm -q --qf '%{DISTRIBUTION}' rpm 2>/dev/null`;
+#    $dist = Build::dist_canon($dist||'', $archs[0]);
 }
 
 if($dist !~ /\// && !defined $configdir) {
@@ -242,6 +243,7 @@
 
 #######################################################################
 
+my $ret = 0;
 for my $spec (@specs) {
   my $cf = Build::read_config_dist($dist, $archs[0], $configdir);
   my $parsed = Build::parse($cf, $spec);
@@ -340,6 +342,7 @@
           my $sum = check_sum($file, $files->{$file});
           if($sum) {
             print '! ';
+           $ret = 1;
           } else {
             print '. ';
           }
@@ -353,3 +356,5 @@
     }
   }
 }
+
+exit $ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/substitutedeps 
new/build-2011.01.20/substitutedeps
--- old/build-2010.12.09/substitutedeps 2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/substitutedeps 2011-02-28 10:02:24.000000000 +0100
@@ -82,30 +82,30 @@
 my $mainpkg = '';
 my $pkg;
 
-for my $l (@$xspec) {
+for my $line (@$xspec) {
   $used = 1;
-  if (ref($l)) {
-    if (!defined($l->[1])) {
+  if (ref($line)) {
+    if (!defined($line->[1])) {
       $used = 0;
-      $l = $l->[0];
+      $line = $line->[0];
     } else {
-      $l = $l->[1];
+      $line = $line->[1];
     }
   }
 
   if ($inchangelog) {
-    $inchangelog = 0 if $l =~ /^\s*%[^%]/;
+    $inchangelog = 0 if $line =~ /^\s*%[^%]/;
     next if $inchangelog;
   }
-  if ($changelog && ($l =~ /\s*\%changelog\b/)) {
+  if ($changelog && ($line =~ /\s*\%changelog\b/)) {
     $inchangelog = 1;
     next;
   }
 
-  if ($l =~ /^Name\s*:\s*(\S+)/i) {
+  if ($line =~ /^Name\s*:\s*(\S+)/i) {
     $pkg = $mainpkg = $1 unless $mainpkg;
   }
-  if ($l =~ /^\s*%package\s+(-n\s+)?(\S+)/) {
+  if ($line =~ /^\s*%package\s+(-n\s+)?(\S+)/) {
     if ($1) {
       $pkg = $2;
     } else {
@@ -113,30 +113,33 @@
     }
   }
 
-  if ($l =~ /^Release:/i) {
-    my $oldl = $l;
+  if ($line =~ /^Release:(.*)\s*$/i) {
+    my $spec_rel = $1; # User-provided value
+    my $oldl = $line;
     if (defined $release) {
-      if (!($l =~ s/<RELEASE\d*>/$release/g)) {
-       if ($l =~ /<(?:CI_CNT|B_CNT)>/) {
+      if (!($line =~ s/<RELEASE\d*>/$release/g)) {
+       if ($line =~ /<(?:CI_CNT|B_CNT)>/) {
          # XXX: should pass ci_cnt/b_cnt instead
          if ($release =~ /(\d+)\.(\d+)$/) {
            my ($ci, $b) = ($1, $2);
-           $l =~ s/<CI_CNT>/$ci/;
-           $l =~ s/<B_CNT>/$b/;
+           $line =~ s/<CI_CNT>/$ci/;
+           $line =~ s/<B_CNT>/$b/;
          } elsif ($release =~ /(\d+)$/) {
            my $b = $1;
-           $b = '0' if $l =~ s/<CI_CNT>/$b/;
-           $l =~ s/<B_CNT>/$b/;
+           $b = '0' if $line =~ s/<CI_CNT>/$b/;
+           $line =~ s/<B_CNT>/$b/;
          }
        } else {
-         $l =~ s/^(Release:\s*).*/$1$release/i;
+         $line =~ s/^(Release:\s*).*/$1$release/i;
        }
       }
+      $line =~ s/<SPEC_REL>/$spec_rel/;
     } else {
       # remove macros, as rpm doesn't like them
-      $l =~ s/<RELEASE\d*>/0/;
-      $l =~ s/<CI_CNT>/0/;
-      $l =~ s/<B_CNT>/0/;
+      $line =~ s/<RELEASE\d*>/0/;
+      $line =~ s/<CI_CNT>/0/;
+      $line =~ s/<B_CNT>/0/;
+      $line =~ s/<SPEC_REL>/0/;
     }
     # this is to be compatible to legacy autobuild.
     # you can specify a releaseprg in the project configuration,
@@ -144,7 +147,7 @@
     # output is used as a release.
     # use only if you really must.
     if ($cf->{'releaseprg'} && -f "$specdir$cf->{'releaseprg'}") {
-      my $newl = $l;
+      my $newl = $line;
       $newl =~ s/^Release:\s*//;
       $oldl =~ s/^Release:\s*//;
       my $project = expand($cf, "%?_project") || 'BUILD_BASENAME';
@@ -187,18 +190,18 @@
       }
       if ($nl[0]) {
        chomp $nl[0];
-       $l =~ s/^(Release:\s*).*/$1$nl[0]/i;
+       $line =~ s/^(Release:\s*).*/$1$nl[0]/i;
        if (defined $release) {
-         if (!($l =~ s/<RELEASE\d*>/$release/g)) {
-           if ($l =~ /<(?:CI_CNT|B_CNT)>/) {
+         if (!($line =~ s/<RELEASE\d*>/$release/g)) {
+           if ($line =~ /<(?:CI_CNT|B_CNT)>/) {
              # XXX: should pass ci_cnt/b_cnt instead
              if ($release =~ /(\d+)\.(\d+)$/) {
                my ($ci, $b) = ($1, $2);
-               $l =~ s/<CI_CNT>/$ci/;
-               $l =~ s/<B_CNT>/$b/;
+               $line =~ s/<CI_CNT>/$ci/;
+               $line =~ s/<B_CNT>/$b/;
              } elsif ($release =~ /(\d+)$/) {
                my $b = $1;
-               $l =~ s/<B_CNT>/$b/ unless $l =~ s/<CI_CNT>/$b/;
+               $line =~ s/<B_CNT>/$b/ unless $line =~ s/<CI_CNT>/$b/;
              }
            }
          }
@@ -208,19 +211,19 @@
     # all compat stuff done. we return to your scheduled program
   }
 
-  if (!$used || ($l !~ /^(?:Build)?Requires:/i)) {
-    print F "$l\n";
+  if (!$used || ($line !~ /^(?:Build)?Requires:/i)) {
+    print F "$line\n";
     next;
   }
-  if ($l =~ /%\(/) {
+  if ($line =~ /%\(/) {
     # too hard for us
-    print F "$l\n";
+    print F "$line\n";
     next;
   }
 
   my $isbuildrequires = 0;
-  $isbuildrequires = 1 if $l =~ /^BuildRequires:/i;
-  my $r = $l;
+  $isbuildrequires = 1 if $line =~ /^BuildRequires:/i;
+  my $r = $line;
   $r =~ s/^[^:]*:\s*//;
   my @deps = $r =~ /([^\s\[,]+)(\s+[<=>]+\s+[^\s\[,]+)?[\s,]*/g;
   my @ndeps = ();
@@ -251,10 +254,10 @@
     $replace = 1
   }
   if ($replace) {
-    $l =~ /^(.*?:\s*)/;
+    $line =~ /^(.*?:\s*)/;
     print F $1.join(' ', @ndeps)."\n" if @ndeps;
   } else {
-    print F "$l\n";
+    print F "$line\n";
   }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/build-2010.12.09/xen.conf 
new/build-2011.01.20/xen.conf
--- old/build-2010.12.09/xen.conf       2010-12-09 15:53:03.000000000 +0100
+++ new/build-2011.01.20/xen.conf       1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-#  -*- mode: python; -*-
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm 
create'.
-# You use a separate script for each domain you want to create, or
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-kernel = "/boot/vmlinuz-xen"
-ramdisk = "/boot/initrd-xen"
-memory = 64
-# name = "bsbuild01"
-# List of which CPUS this domain is allowed to use, default Xen picks
-#cpus = ""         # leave to Xen to pick
-#cpus = "0"        # all vcpus run on CPU0
-#cpus = "0-3,5,^1" # run on cpus 0,2,3,5
-#----------------------------------------------------------------------------
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-
-# disk = [ 'file:/tmp/xentest.img,hda1,w' ]
-
-# Set root device.
-root = "/dev/hda1 ro"
-
-# Sets init=build, reboot on panic
-extra = "init=/bin/bash console=ttyS0 panic=1 udev_timeout=360"
-
-on_poweroff = 'destroy'
-on_reboot = 'destroy'
-on_crash = 'destroy'

++++++ build.dsc ++++++
--- /var/tmp/diff_new_pack.8X8vdl/_old  2011-02-28 15:14:43.000000000 +0100
+++ /var/tmp/diff_new_pack.8X8vdl/_new  2011-02-28 15:14:43.000000000 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: build
-Version: 2010.10.12
+Version: 2011.01.20
 Binary: build
 Maintainer: Adrian Schroeter <[email protected]>
 Architecture: all

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.8X8vdl/_old  2011-02-28 15:14:43.000000000 +0100
+++ /var/tmp/diff_new_pack.8X8vdl/_new  2011-02-28 15:14:43.000000000 +0100
@@ -1,3 +1,12 @@
+build (2010.12.15-1) unstable; urgency=low
+
+  * Update to current git trunk
+    - support bsdtar for setting up build enviroment
+    - make expanddeps use the highest version of a package if multiple 
+      versions aver available in a repository [bnc#656599]
+
+ -- Michael Schroeder <[email protected]>  Wed, 15 Dec 2010 14:08:29 +0200
+
 build (2010.07.28-1) unstable; urgency=low
 
   * Update to current git trunk


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



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to