--- obs-build-2012.10.10.orig/debian/patches/0003-Add-option-keep-packs-to-keep-packages-516.patch
+++ obs-build-2012.10.10/debian/patches/0003-Add-option-keep-packs-to-keep-packages-516.patch
@@ -0,0 +1,128 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+
+@DPATCH@
+
+From dc065e1fdaca94023373aa5cadadc22747fdd521 Mon Sep 17 00:00:00 2001
+From: Zhang Qiang <qiang.z.zhang@intel.com>
+Date: Fri, 9 Nov 2012 10:18:48 +0800
+Subject: [PATCH 3/4] Add option --keep-packs to keep packages, #516
+
+with --keep-packs, unused packages will not be removed while resusing
+buildroot. This can speed up build hundred of packages significantly
+
+Change-Id: Ic948f3b3dbe8762d54651cdd939b9c748aaab39f
+---
+ build            |    8 ++++++--
+ init_buildsystem |   41 ++++++++++++++++++++++++-----------------
+ 2 files changed, 30 insertions(+), 19 deletions(-)
+
+diff --git a/build b/build
+index c3cb189..9cbd569 100755
+--- a/build
++++ b/build
+@@ -59,6 +59,7 @@ SHORT_CIRCUIT=false
+ NO_TOPDIR_CLEANUP=false
+ CLEAN_BUILD=
+ USE_SYSTEM_QEMU=
++KEEP_PACKS=
+ SPECFILES=()
+ SRCDIR=
+ BUILD_JOBS=
+@@ -925,6 +926,9 @@ while test -n "$1"; do
+       *-use-system-qemu)
+ 	USE_SYSTEM_QEMU="--use-system-qemu"
+       ;;
++      --keep-packs)
++	KEEP_PACKS="--keep-packs"
++      ;;
+       *-root)
+ 	needarg
+ 	BUILD_ROOT="$ARG"
+@@ -1575,7 +1579,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 	if test "$DO_INIT" = true ; then
+ 	    # do fist stage of init_buildsystem
+ 	    rm -f $BUILD_ROOT/.build.success
+-	    set -- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" --prepare "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USE_SYSTEM_QEMU $USEUSEDFORBUILD $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
++	    set -- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" --prepare "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USE_SYSTEM_QEMU $KEEP_PACKS $USEUSEDFORBUILD $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
+ 	    echo "$* ..."
+ 	    "$@" || cleanup_and_exit 1
+ 	    check_exit
+@@ -1856,7 +1860,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 	CREATE_BUILD_BINARIES=
+ 	test "$BUILDTYPE" = preinstallimage && mkdir -p $BUILD_ROOT/.preinstall_image
+ 	egrep '^#[       ]*needsbinariesforbuild[       ]*$' >/dev/null <$MYSRCDIR/$SPECFILE && CREATE_BUILD_BINARIES=--create-build-binaries
+-	set -- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USE_SYSTEM_QEMU $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
++	set -- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $USE_SYSTEM_QEMU $KEEP_PACKS $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST "$MYSRCDIR/$SPECFILE" $ADDITIONAL_PACKS
+ 	echo "$* ..."
+ 	"$@" || cleanup_and_exit 1
+ 	check_exit
+diff --git a/init_buildsystem b/init_buildsystem
+index 351671e..0d6f084 100755
+--- a/init_buildsystem
++++ b/init_buildsystem
+@@ -35,6 +35,7 @@ RPMIDFMT="%{NAME}-%{VERSION}-%{RELEASE} %{BUILDTIME}\n"
+ 
+ PREPARE_VM=
+ USE_SYSTEM_QEMU=
++KEEP_PACKS=
+ USEUSEDFORBUILD=
+ LIST_STATE=
+ RPMLIST=
+@@ -51,6 +52,10 @@ while test -n "$1" ; do
+ 	    shift
+ 	    USE_SYSTEM_QEMU=true
+ 	    ;;
++	--keep-packs)
++	    shift
++	    KEEP_PACKS=true
++	    ;;
+ 	--create-build-binaries)
+ 	    shift
+ 	    CREATE_BUILD_BINARIES=true
+@@ -1025,23 +1030,25 @@ rpm_e()
+ #
+ # delete all packages we don't want
+ #
+-mkdir -p $BUILD_ROOT/.init_b_cache/todelete
+-for PKG in $BUILD_ROOT/.init_b_cache/alreadyinstalled/* ; do
+-    PKG=${PKG##*/}
+-    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
+-    rm -f $BUILD_ROOT/.init_b_cache/todelete/$PKG
+-done
+-for PKG in $BUILD_ROOT/.init_b_cache/todelete/* ; do
+-    PKG=${PKG##*/}
+-    test "$PKG" = "*" && continue
+-    echo "deleting $PKG"
+-    rpm_e "$PKG"
+-    check_exit
+-done
+-rm -rf "$BUILD_ROOT/.init_b_cache/todelete"
++if [ -z "$KEEP_PACKS" ]; then
++    mkdir -p $BUILD_ROOT/.init_b_cache/todelete
++    for PKG in $BUILD_ROOT/.init_b_cache/alreadyinstalled/* ; do
++        PKG=${PKG##*/}
++        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
++        rm -f $BUILD_ROOT/.init_b_cache/todelete/$PKG
++    done
++    for PKG in $BUILD_ROOT/.init_b_cache/todelete/* ; do
++        PKG=${PKG##*/}
++        test "$PKG" = "*" && continue
++        echo "deleting $PKG"
++        rpm_e "$PKG"
++        check_exit
++    done
++    rm -rf "$BUILD_ROOT/.init_b_cache/todelete"
++fi
+ 
+ rm -rf "$BUILD_ROOT/.init_b_cache/preinstalls"
+ mkdir -p "$BUILD_ROOT/.init_b_cache/preinstalls"
+-- 
+1.7.5.4
--- obs-build-2012.10.10.orig/debian/patches/0005-Update-uid-gid-of-build-root-if-uid-gid-is-not-match.patch
+++ obs-build-2012.10.10/debian/patches/0005-Update-uid-gid-of-build-root-if-uid-gid-is-not-match.patch
@@ -0,0 +1,44 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+
+@DPATCH@
+
+From c98512106df483c0768d5801bccbf00ccec9b739 Mon Sep 17 00:00:00 2001
+From: Zhang Qiang <qiang.z.zhang@intel.com>
+Date: Tue, 22 Jan 2013 15:49:36 -0500
+Subject: [PATCH 5/5] Update uid/gid of build root if uid/gid is not match
+
+This is very important for sharing build root to other developers,
+and create a full build root for using by all developer.
+
+Change-Id: I1edd3830a499cff7ab357d17484075e46bd8319b
+---
+ build |   12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/build b/build
+index 6169b26..2bb07de 100755
+--- a/build
++++ b/build
+@@ -1981,13 +1981,11 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 	    chown "$ABUILD_UID:$ABUILD_GID" $BUILD_ROOT/home/abuild
+ 	else
+ 	    if ! egrep "^abuild:x?:${ABUILD_UID}:${ABUILD_GID}" >/dev/null <$BUILD_ROOT/etc/passwd ; then
+-		echo "abuild user present in the buildroot ($BUILD_ROOT) but uid:gid does not match"
+-		echo "buildroot currently using:"
+-		egrep "^abuild:" <$BUILD_ROOT/etc/passwd
+-		echo "build script attempting to use:"
+-		echo "abuild::${ABUILD_UID}:${ABUILD_GID}:..."
+-		echo "build aborting"
+-		cleanup_and_exit 1
++                sed -i '/^abuild/d' $BUILD_ROOT/etc/passwd
++                sed -i '/^abuild/d' $BUILD_ROOT/etc/group
++                echo "abuild:x:${ABUILD_UID}:${ABUILD_GID}:Autobuild:/home/abuild:/bin/bash" >>$BUILD_ROOT/etc/passwd
++                echo "abuild:x:${ABUILD_GID}:" >>$BUILD_ROOT/etc/group
++                chown "$ABUILD_UID:$ABUILD_GID" $BUILD_ROOT/home/abuild -R
+ 	    fi
+ 	fi
+ 	if test -f $BUILD_ROOT/etc/shadow ; then
+-- 
+1.7.10.4
--- obs-build-2012.10.10.orig/debian/patches/0001-support-incremental-build.patch
+++ obs-build-2012.10.10/debian/patches/0001-support-incremental-build.patch
@@ -0,0 +1,161 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+
+@DPATCH@
+
+From 1ecefb00fd84682c90f3fcea184c9e595a969404 Mon Sep 17 00:00:00 2001
+From: Zhang Qiang <qiang.z.zhang@intel.com>
+Date: Thu, 20 Sep 2012 12:53:12 +0800
+Subject: [PATCH 1/2] support incremental build
+
+Incremental build is very important for developer, especially for developing
+big project, such as webkit, kernel, ect.
+
+This patch add three options to support incremental build:
+--no-build: create build root using spec file, and don't execute
+            build stage
+--short-circuit: incremental build option, this need work with --stage
+            option.
+--no-topdir-cleanup: don't remove rpmbuild build topdir, this need
+            to be specified for incremental build
+
+Basic usage:
+1) $ build test.spec --no-build
+2) $ mount source code to buildroot/abuild/rpmbuild/BUILD/$name-$verson
+3) build packages
+ a) just compile
+ $ build test.spec --no-init --short-circuit --no-topdir-cleanup --stage=bc
+ b) generate RPM packags
+ $ build test.spec --no-init --short-circuit --no-topdir-cleanup --stage=bs
+4) $ umount buildroot/abuild/rpmbuild/BUILD/$name-$verson
+---
+ build |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 51 insertions(+), 11 deletions(-)
+
+diff --git a/build b/build
+index 2c2ca93..8e37761 100755
+--- a/build
++++ b/build
+@@ -52,8 +52,11 @@ ABUILD_UID=399
+ ABUILD_GID=399
+ 
+ DO_INIT=true
++DO_BUILD=true
+ DO_LINT=
+ DO_CHECKS=true
++SHORT_CIRCUIT=false
++NO_TOPDIR_CLEANUP=false
+ CLEAN_BUILD=
+ USE_SYSTEM_QEMU=
+ SPECFILES=()
+@@ -851,6 +854,9 @@ while test -n "$1"; do
+       *-no*init)
+ 	DO_INIT=false
+       ;;
++      *-no-build)
++	DO_BUILD=false
++      ;;
+       *-no*checks)
+ 	DO_CHECKS=false
+       ;;
+@@ -1030,6 +1036,12 @@ while test -n "$1"; do
+ 	BUILD_RPM_BUILD_STAGE="$ARG"
+ 	shift
+       ;;
++      *-short-circuit)
++    SHORT_CIRCUIT=true
++      ;;
++      *-no-topdir-cleanup)
++    NO_TOPDIR_CLEANUP=true
++      ;;
+       *-useusedforbuild)
+ 	USEUSEDFORBUILD="--useusedforbuild"
+       ;;
+@@ -1130,6 +1142,11 @@ done
+ 
+ check_for_ppc
+ 
++if [ "$SHORT_CIRCUIT" = true -a -z "$BUILD_RPM_BUILD_STAGE" ]; then
++    echo "--short-circuit needs a stage (use --stage)"
++    cleanup_and_exit 1
++fi
++
+ if test "$VM_TYPE" = "lxc"; then
+     VM_IMAGE=''
+     VM_SWAP=''
+@@ -1891,6 +1908,9 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 	mv $BUILD_ROOT/usr/lib/rpm/rpmrc $BUILD_ROOT/usr/lib/rpm/rpmrc_i586
+ 	sed -e 's/^buildarchtranslate: athlon.*/buildarchtranslate: athlon: i686/' -e 's/^buildarchtranslate: i686.*/buildarchtranslate: i686: i686/' < $BUILD_ROOT/usr/lib/rpm/rpmrc_i586 > $BUILD_ROOT/usr/lib/rpm/rpmrc
+     fi
++    if test "$DO_BUILD" = false ; then
++        cleanup_and_exit 0
++    fi
+ 
+     #
+     # install dummy sign program if needed
+@@ -2001,11 +2021,12 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 
+     #
+     # now clean up RPM building directories
+-    #
+-    rm -rf "$BUILD_ROOT$TOPDIR"
+-    for i in BUILD RPMS/`uname -m` RPMS/i386 RPMS/noarch SOURCES SPECS SRPMS BUILDROOT OTHER ; do
+-	mkdir -p $BUILD_ROOT$TOPDIR/$i
+-    done
++    if [ "$NO_TOPDIR_CLEANUP" = false ]; then
++        rm -rf "$BUILD_ROOT$TOPDIR"
++        for i in BUILD RPMS/`uname -m` RPMS/i386 RPMS/noarch SOURCES SPECS SRPMS BUILDROOT OTHER ; do
++            mkdir -p $BUILD_ROOT$TOPDIR/$i
++        done
++    fi
+     chown -R "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"
+     check_exit
+ 
+@@ -2180,7 +2201,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 	test -x $BUILD_ROOT/usr/bin/rpmbuild || rpmbuild=rpm
+ 
+ 	# XXX: move _srcdefattr to macro file?
+-	rpmbopts=("$BUILD_RPM_BUILD_STAGE" "--define" "_srcdefattr (-,root,root)")
++	rpmbopts=("--define" "_srcdefattr (-,root,root)")
+ 	if test "$rpmbuild" == "rpmbuild" ; then
+                 # use only --nosignature for rpm v4
+ 	    rpmbopts[${#rpmbopts[@]}]="--nosignature"
+@@ -2203,11 +2224,30 @@ for SPECFILE in "${SPECFILES[@]}" ; do
+ 
+ 	# su involves a shell which would require even more
+ 	# complicated quoting to bypass than this
+-	toshellscript $rpmbuild \
+-		"${definesnstuff[@]}" \
+-		"${rpmbopts[@]}" \
+-		"$TOPDIR/SOURCES/$SPECFILE" \
+-		> $BUILD_ROOT/.build.command
++        if test "$SHORT_CIRCUIT" = false ; then
++            rpmbopts[${#rpmbopts[@]}]="$BUILD_RPM_BUILD_STAGE"
++            toshellscript $rpmbuild \
++                    "${definesnstuff[@]}" \
++                    "${rpmbopts[@]}" \
++                    "$TOPDIR/SOURCES/$SPECFILE" \
++                    > $BUILD_ROOT/.build.command
++        else
++            rpmbopts[${#rpmbopts[@]}]='--short-circuit'
++            buildopts="-bc -bi -bb -bs"
++            cmds=""
++            echo "#!/bin/sh -x" >$BUILD_ROOT/.build.command
++            for opt in $buildopts
++            do
++                shellquote $rpmbuild  \
++                        "${definesnstuff[@]}" \
++                        "${rpmbopts[@]}" $opt \
++                        "$TOPDIR/SOURCES/$SPECFILE" \
++                        >> $BUILD_ROOT/.build.command
++                echo >>$BUILD_ROOT/.build.command
++                [ "$opt" == "$BUILD_RPM_BUILD_STAGE" ] && break
++            done
++        fi
++
+ 	chmod 755 $BUILD_ROOT/.build.command
+ 	check_exit
+ 	if test -n "$shell"; then
+-- 
+1.7.1
--- obs-build-2012.10.10.orig/debian/patches/0004-fix-configdir-option-parse-issue.patch
+++ obs-build-2012.10.10/debian/patches/0004-fix-configdir-option-parse-issue.patch
@@ -0,0 +1,32 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+
+@DPATCH@
+
+From cd50327856c34cafbf5b74aee3be5221a738ad33 Mon Sep 17 00:00:00 2001
+From: Zhang Qiang <qiang.z.zhang@intel.com>
+Date: Sat, 17 Nov 2012 17:58:40 +0800
+Subject: [PATCH 4/4] fix --configdir option parse issue
+
+Change-Id: If111f4e1b9c99179a097168db627127c645b7132
+---
+ build |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/build b/build
+index 9cbd569..6169b26 100755
+--- a/build
++++ b/build
+@@ -1069,7 +1069,9 @@ while test -n "$1"; do
+ 	USEUSEDFORBUILD="--useusedforbuild"
+       ;;
+       *-configdir)
++        needarg
+ 	CONFIG_DIR="$ARG"
++        shift
+       ;;
+       *-list*state)
+ 	LIST_STATE=true
+-- 
+1.7.5.4
--- obs-build-2012.10.10.orig/debian/patches/00list
+++ obs-build-2012.10.10/debian/patches/00list
@@ -0,0 +1,5 @@
+0001-support-incremental-build.patch
+0002-hide-password-if-user-pass-needed-for-packages-repos.patch
+0003-Add-option-keep-packs-to-keep-packages-516.patch
+0004-fix-configdir-option-parse-issue.patch
+0005-Update-uid-gid-of-build-root-if-uid-gid-is-not-match.patch
--- obs-build-2012.10.10.orig/debian/patches/0002-hide-password-if-user-pass-needed-for-packages-repos.patch
+++ obs-build-2012.10.10/debian/patches/0002-hide-password-if-user-pass-needed-for-packages-repos.patch
@@ -0,0 +1,135 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+
+@DPATCH@
+
+From 298758ecc60a9fb51d4b0f74b9da9de0d43437c0 Mon Sep 17 00:00:00 2001
+From: Zhang Qiang <qiang.z.zhang@intel.com>
+Date: Wed, 10 Oct 2012 21:38:18 +0800
+Subject: [PATCH 2/2] hide password if user/pass needed for packages repos
+
+.repo.config is generated generated for passwd retrieving, and
+.repo.config is saved to $BUILD_ROOT/ and remove it in build
+cleanup stage.
+
+fix #459, #390.
+
+Change-Id: I2a5b3e23d504346414ee4b4dbb36ee0bbcb2e67a
+---
+ build    |   20 ++++++++++++++++++++
+ download |   33 ++++++++++++++++++++++++++++++---
+ 2 files changed, 50 insertions(+), 3 deletions(-)
+
+diff --git a/build b/build
+index 8e37761..c4489b1 100755
+--- a/build
++++ b/build
+@@ -317,6 +317,7 @@ cleanup_and_exit () {
+     trap EXIT
+     test -z "$1" && set 0
+     rm -f $BUILD_ROOT/exit
++    rm -f $BUILD_ROOT/.repo.config
+     if test "$1" -eq 1 -a -x /bin/df ; then
+         # okay, it failed, but maybe because disk space?
+ 	if df $BUILD_ROOT 2>/dev/null | grep -q "100%"; then
+@@ -759,6 +760,24 @@ linux64()
+ 	perl -e 'syscall('$PERSONALITY_SYSCALL', 0); exec(@ARGV) || die("$ARGV[0]: $!\n")' "$@"
+ }
+ 
++hide_passwords()
++{
++    local i j
++    r=()
++    rm -f $BUILD_ROOT/.repo.config
++    for i in "${repos[@]}"; do
++        if [ "$i" == "--repo" -o "$i" == "--repository" ]; then
++            r=("${r[@]}" "$i")
++        else
++            echo $i |grep -E "^http[s]?:\/\/[^\/]*\/?" >/dev/null && echo $i >> $BUILD_ROOT/.repo.config
++            j=$(echo $i | sed -e "s#://[^@]*@#://#")
++            r=("${r[@]}" "$j")
++        fi
++    done
++    repos=("${r[@]}")
++    echo ${repos[@]}
++}
++
+ check_for_ppc()
+ {
+     local uname
+@@ -1405,6 +1424,7 @@ if test -z "$RUNNING_IN_VM" ; then
+ fi
+ 
+ mkdir_build_root
++hide_passwords
+ 
+ if [ "$BUILD_ROOT" = / ]; then
+     read dummy dummy browner dummy < <(ls -ld /)
+diff --git a/download b/download
+index 93ed595..cc90d56 100755
+--- a/download
++++ b/download
+@@ -13,6 +13,12 @@ use File::Basename;
+ 
+ use strict;
+ 
++sub hide_passwd {
++    my $url = shift;
++    $url =~ s|://[^@]*@|://|;
++    return $url
++}
++
+ die "USAGE: $0 DIR URLS..." unless $#ARGV >= 1;
+ 
+ my $dir = shift @ARGV;
+@@ -22,6 +28,7 @@ my $ua = LWP::UserAgent->new(
+   timeout => 42);
+ 
+ for my $url (@ARGV) {
++  my $original = $url;
+   if ($url =~ /^zypp:\/\/([^\/]*)\/?/) {
+     use Build::Zypp;
+     my $repo = Build::Zypp::parsecfg($1);
+@@ -32,7 +39,27 @@ for my $url (@ARGV) {
+     $url =~ s/^zypp:\/\/[^\/]*\/*//;
+     $url = URI->new($u.$url)
+   } else {
+-    $url = URI->new($url);
++    my $found = 0;
++    if ( defined $ENV{BUILD_ROOT} && -e $ENV{BUILD_ROOT} . "/.repo.config" ) {
++        open FILE, "<", $ENV{BUILD_ROOT} . "/.repo.config" or die $!;
++        while (<FILE>) {
++            next if ($_ !~ /^http[s]?:\/\/([^\/]*)\/?/);
++            chomp($_);
++            my $hidden = URI->new($_);
++            my $ui = $hidden->userinfo;
++            $hidden->userinfo(undef);
++            if ( $url =~ m/^$hidden/ ) {
++                $url = URI->new($url);
++                $url->userinfo($ui);
++                $found = 1;
++                last;
++            }
++        }
++        close FILE;
++    }
++    if ($found == 0 ) {
++        $url = URI->new($url);
++    }
+   }
+   $ua->env_proxy  if $url->scheme ne 'https';
+   my $dest = "$dir/".basename($url->path);
+@@ -42,8 +69,8 @@ for my $url (@ARGV) {
+     my $res = $ua->mirror($url, $dest);
+     last if $res->is_success;
+     # if it's a redirect we probably got a bad mirror and should just retry
+-    die "reqesting $url failed: ".$res->status_line."\n" unless $retry && $res->previous;
+-    warn "retrying $url\n";
++    die "reqesting " . hide_passwd($original) . " failed: ".$res->status_line."\n" unless $retry && $res->previous;
++    warn "retrying " . hide_passwd($original) . "\n";
+   }
+ }
+ 
+-- 
+1.7.1
--- obs-build-2012.10.10.orig/debian/copyright
+++ obs-build-2012.10.10/debian/copyright
@@ -0,0 +1,21 @@
+This package was debianized by Rene Engelhard <rengelhard@suse.de> on
+Thu, 22 Jun 2006 12:01:08 +0200.
+
+It was downloaded from http://software.opensuse.org/download/openSUSE:/Tools/SUSE_Linux_Factory/src
+
+Upstream authors: Thorsten Kukuk <kukuk@suse.de>
+                  Michael Schröter <mls@suse.de>
+		  Bernhard Kaindl <bk@suse.de>
+		  Mad Martin Jorgensen <mmj@suse.de>
+		  Andreas Schwab <schwab@suse.de>
+		  Rüdiger Oertel <ro@suse.de>
+		  Andreas Gruenbacher <agruen@suse.de>
+
+Copyright: (c) 1997-2007 SuSE GmbH Nuernberg, Germany
+
+License:
+
+GPL
+
+The Debian packaging is (C) 2006, Rene Engelhard <rengelhard@suse.de> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
--- obs-build-2012.10.10.orig/debian/control
+++ obs-build-2012.10.10/debian/control
@@ -0,0 +1,19 @@
+Source: build
+Section: devel
+Priority: optional
+Maintainer: Adrian Schroeter <adrian@suse.de>
+Build-Depends: debhelper (>= 4), dpatch, cdbs,
+Standards-Version: 3.7.2
+
+Package: build
+Architecture: all
+Depends: ${perl:Depends},
+  rpm,
+  libxml-parser-perl,
+  libcrypt-ssleay-perl (= 0.60),
+  binfmt-support,
+  tizen-qemu-user-static-2012.10.25
+Recommends: rpm2cpio
+Description: A script to build SUSE Linux RPMs
+ This package provides a script for building RPMs for SUSE Linux
+ in a chroot environment.
--- obs-build-2012.10.10.orig/debian/compat
+++ obs-build-2012.10.10/debian/compat
@@ -0,0 +1,1 @@
+4
--- obs-build-2012.10.10.orig/debian/changelog
+++ obs-build-2012.10.10/debian/changelog
@@ -0,0 +1,233 @@
+build (2012.10.10-tizen20130122) unstable; urgency=high
+
+  * update to version 2012.10.10
+
+ -- Zhang Qiang <qiang.z.zhang@intel.com>  Wed, 12 Sep 2012 19:30:22 +0200
+
+build (2012.09.12-1) unstable; urgency=high
+
+  * update to version 2012.09.12
+
+ -- Zhang Qiang <qiang.z.zhang@intel.com>  Wed, 11 Sep 2012 19:30:22 +0200
+
+build (2012.08.10-1) unstable; urgency=high
+
+  * update to version 2012.08.10
+
+ -- Zhang Qiang <qiang.z.zhang@intel.com>  Sat, 11 Aug 2012 19:30:22 +0200
+
+build (2012.07.21-1) unstable; urgency=high
+
+  * bump to a new higher version to get this updated always
+  * clean up .src.cache file if --clean option specified
+
+ -- Zhang Qiang <qiang.z.zhang@intel.com>  Wed, 20 Jun 2012 19:30:22 +0200
+
+build (2012.04.17-1) unstable; urgency=high
+
+  * https repo support
+  * clean up print info
+  * Refine-download-preinstall-install-progress-info
+
+ -- Zhang Qiang <qiang.z.zhang@intel.com>  Sat, 2 Jun 2012 19:30:22 +0200
+
+build (2012.02.13-1) unstable; urgency=low
+
+  * Update to current git trunk
+    - add sles11sp2 build config and adapt autodetection
+
+ -- Michael Schroeder <mls@suse.de>  Mon, 10 Oct 2011 19:30:22 +0200
+
+build (2011.09.26-1) unstable; urgency=low
+
+  * Update to current git trunk
+
+ -- Adrian Schroeter <adrian@suse.de>  Fri, 01 Jul 2010 10:03:54 +0200
+
+build (2011.07.01-1) unstable; urgency=low
+
+  * Update to current git trunk
+
+ -- Adrian Schroeter <adrian@suse.de>  Fri, 01 Jul 2010 10:03:54 +0200
+
+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 <mls@suse.de>  Wed, 15 Dec 2010 14:08:29 +0200
+
+build (2010.07.28-1) unstable; urgency=low
+
+  * Update to current git trunk
+    - document --repo and --dist
+    - update wiki links
+    - fix bugs in repo handling
+    - fix distribution autodetection code
+
+ -- Michael Schroeder <mls@suse.de>  Wed, 28 Jul 2010 12:46:52 +0200
+
+build (2010.07.08-1) unstable; urgency=low
+
+  * Update to current git trunk
+
+ -- Adrian Schroeter <adrian@suse.de>  Wed, 08 Jul 2010 10:03:54 +0200
+
+build (2010.06.29-1) unstable; urgency=low
+
+  * Update to current git trunk
+    - add 11.3 config
+    - fix repo creation in --noinit case
+    - support ovf files directly
+    - allow multiple --oldpackages
+    - delta rpm support
+
+ -- Adrian Schroeter <adrian@suse.de>  Tue, 29 Jun 2010 10:03:54 +0200
+
+build (2010.02.02-1) unstable; urgency=low
+
+  * Update to current git trunk
+    - Support new kiwi 4.1 schema files
+
+ -- Adrian Schroeter <adrian@suse.de>  Tue, 02 Feb 2010 10:03:54 +0200
+
+build (2009.09.23-1) unstable; urgency=low
+
+  * Update to current svn trunk
+
+ -- Michael Schroeder <mls@suse.de>  Wed, 23 Sep 2009 12:03:54 +0200
+
+build (2009.04.20-1) unstable; urgency=low
+
+  * Update to current svn trunk
+
+ -- Adrian Schroeter <adrian@suse.de>  Mon, 20 Feb 2009 08:27:13 +0200
+
+build (2009.02.20-1) unstable; urgency=low
+
+  * Fix kvm support together with Alexander
+  * Support for new disturl containing a complete pointer to build
+    service instance resource
+  * add support for package compare to allow Build Service to drop
+    same packages after build
+  * image repack support from Christoph
+
+ -- Adrian Schroeter <adrian@suse.de>  Fri, 20 Feb 2009 08:27:13 +0200
+
+build (2007.09.14-1) unstable; urgency=low
+
+  * update to 2173:
+    - add sl10.3 config [#310089]
+    - also look for BuildRequires in subpackage definitions [#305568]
+    - allow removal of more config parameters
+
+ -- Michael Schroeder <mls@suse.de>  Fri, 14 Sep 2007 18:27:13 +0200
+
+build (2007.08.02-1) unstable; urgency=low
+
+  * update to 1902:
+    - support 'order' config option
+    - support 'patterntype' config option
+    - new setdeps() method
+    - support for flexible query options
+    - support 'description' query
+    - fix bug in changelog2spec time cutoff
+    - make debtransform understand Debtransform-Tar/Debtransform-Files-Tar/
+      Debtransform-Series
+    - fix bug in substitutedeps
+
+ -- Michael Schroeder <mls@suse.de>  Thu, 2 Aug 2007 15:58:48 +0200
+
+build (2007.06.13-1) unstable; urgency=low
+
+  * update to 1727:
+    - implement rpm installation order calculation in perl
+    - make substitute code modify requires, too
+    - add filelist query support
+    - add prereq parsing support
+    - speed up version comparison a bit
+
+ -- Michael Schroeder <mls@suse.de>  Wed, 13 Jun 2007 17:18:17 +0100
+
+build (2007.05.10-1) unstable; urgency=low
+
+  * update to 1653:
+    - add _vendor to configs
+    - fix deban dependency compare
+    - allow not operator in configs
+    - fix build from source rpms
+
+ -- Michael Schroeder <mls@suse.de>  Thu, 10 May 2007 20:02:29 +0100
+
+build (2007.04.12-1) unstable; urgency=low
+
+  * update to 1575:
+    - add --root to rpm call in rpm to work around a bug in rpm [#255720]
+
+ -- Michael Schroeder <mls@suse.de>  Thu, 12 Apr 2007 16:22:51 +0100
+
+build (2007.04.05-1) unstable; urgency=low
+
+  * update to 1561:
+    - support architecture dependand requires in dsc files
+    - support "global" definitions for rpm
+    - support vminstall config option
+
+ -- Michael Schroeder <mls@suse.de>  Thu, 5 Apr 2007 16:01:51 +0100
+
+build (2007.03.12-1) unstable; urgency=low
+
+  * update to r1419:
+    - fix buildroot in debtransform call
+    - obey version numbers when expanding
+
+ -- Michael Schroeder <mls@suse.de>  Mon, 12 Mar 2007 15:42:48 +0100
+
+build (2007.03.02-1) unstable; urgency=low
+
+  * update
+    - transform suse changes file to rpm specfile format
+    - improved debian support
+
+ -- Michael Schroeder <mls@suse.de>  Fri, 2 Mar 2007 21:22:41 +0100
+
+build (2007.01.26-1) unstable; urgency=low
+
+  * update to r1114
+    - re-add the lost unrpm script
+    - make exclarch an array
+    - remount root rw in xen case, needed if root is not reiserfs
+    - add repotype/runscripts options
+    - remove devs in sl10.1/10.2
+    - fix boolean test to make "00" false like rpm does
+    - add rpm_verscmp for version comparison
+    - runscripts
+    - macro blocks
+    - read_config_dist
+    - useful xen exit status
+    - add --kill
+    - update 10.2 config
+    - extend spec/dsc parser
+    - fixed two bugs in the specfile parser
+
+ -- Peter Poeml <poeml@suse.de>  Fri, 26 Jan 2007 14:15:22 +0100
+
+build (2006.10.5-1) unstable; urgency=low
+
+  * update for fixed XEN build
+
+ -- Michael Schroeder <mls@suse.de>  Thu, 5 Oct 2006 10:58:42 +0200
+
+build (2006.8.10-1) unstable; urgency=low
+
+  * update for fixed XEN build and proc mounting
+
+ -- Adrian Schroeter <adrian@suse.de>  Thu, 10 Aug 2006 12:01:08 +0200
+
+build (2006.6.14-1) unstable; urgency=low
+
+  * Initial release based on build-2006.6.14-5.1.src.rpm
+
+ -- Rene Engelhard <rengelhard@suse.de>  Thu, 22 Jun 2006 12:01:08 +0200
--- obs-build-2012.10.10.orig/debian/docs
+++ obs-build-2012.10.10/debian/docs
@@ -0,0 +1,1 @@
+README
--- obs-build-2012.10.10.orig/debian/rules
+++ obs-build-2012.10.10/debian/rules
@@ -0,0 +1,67 @@
+#!/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
+
+include /usr/share/dpatch/dpatch.make
+
+SHELL=/bin/bash
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp  patch-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
