summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-util/suse-build
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-util/suse-build')
-rw-r--r--dev-util/suse-build/Manifest2
-rw-r--r--dev-util/suse-build/files/suse-build-2014.09.18-libexec-paths.patch449
-rw-r--r--dev-util/suse-build/files/suse-build-20140220-libexec-paths.patch212
-rw-r--r--dev-util/suse-build/metadata.xml11
-rw-r--r--dev-util/suse-build/suse-build-2014.02.20.ebuild63
-rw-r--r--dev-util/suse-build/suse-build-2014.09.18.ebuild63
-rw-r--r--dev-util/suse-build/suse-build-9999.ebuild60
7 files changed, 860 insertions, 0 deletions
diff --git a/dev-util/suse-build/Manifest b/dev-util/suse-build/Manifest
new file mode 100644
index 000000000000..f88d30dfc443
--- /dev/null
+++ b/dev-util/suse-build/Manifest
@@ -0,0 +1,2 @@
+DIST obs-build-20140220.tar.gz 156717 SHA256 af959c30a9da0237cbb32a79dd55347156cd68d73f3c8f6e818a74b6c915b328 SHA512 3a66c7ded80f928d8930cb60011a115ec3d6ffa616a290907176fbe65e0dd0abc23b083271fb0d8598d699d1e6a100cc98be908f0079c0db157b8c4c6b960191 WHIRLPOOL 6609726de2f7d8f8d3e082b6323f4046d1121cc81fc58086d8666ddb677ac721e0e4be8597ba1316240d447c7942d2fd8f213bb39e4539c22e2ea0571a0812ce
+DIST obs-build-20140918.tar.gz 192320 SHA256 3b8263fa9f5320d34bcf7c731b5eda9bcedda5f65c2583a57f8640a925dcdbcf SHA512 3eddb6d131cbc405200add39c681365abc704965adb39f52a03936653dd9439d479f6ad8ee7492248399bb015f101c0e41396b70a205bde2cceea2c6646f7c51 WHIRLPOOL 79be4deca3806c2ffbbf2cb55d8e71e9f630b580fa87cfe2bd13bc81634cce83276701ca5bfb464c8bf3f0bbc01229716dbfb5d1da99c2c17d56d2666ef2dbfb
diff --git a/dev-util/suse-build/files/suse-build-2014.09.18-libexec-paths.patch b/dev-util/suse-build/files/suse-build-2014.09.18-libexec-paths.patch
new file mode 100644
index 000000000000..92bce8090858
--- /dev/null
+++ b/dev-util/suse-build/files/suse-build-2014.09.18-libexec-paths.patch
@@ -0,0 +1,449 @@
+ build | 18 +++++++++---------
+ build-recipe-kiwi | 4 ++--
+ build-recipe-livebuild | 4 ++--
+ build-recipe-spec | 8 ++++----
+ changelog2spec | 2 +-
+ createarchdeps | 2 +-
+ createrepomddeps | 2 +-
+ createrpmdeps | 2 +-
+ createyastdeps | 2 +-
+ createzyppdeps | 2 +-
+ download | 2 +-
+ expanddeps | 4 ++--
+ getbinaryid | 2 +-
+ init_buildsystem | 2 +-
+ initvm.c | 13 +++++++++----
+ mkdrpms | 2 +-
+ order | 4 ++--
+ queryconfig | 4 ++--
+ spectool | 2 +-
+ substitutedeps | 4 ++--
+ test/common | 2 +-
+ 21 files changed, 46 insertions(+), 41 deletions(-)
+
+diff --git a/build b/build
+old mode 100755
+new mode 100644
+index 9f9fb72..fcfec70
+--- a/build
++++ b/build
+@@ -13,7 +13,7 @@ if test "$0" = /sbin/init ; then
+ fi
+
+ test -z "$BUILD_DIR" -a -e /.build/build.data -a -z "$BUILD_IGNORE_2ND_STAGE" && BUILD_DIR=/.build
+-test -z "$BUILD_DIR" && BUILD_DIR=/usr/lib/build
++test -z "$BUILD_DIR" && BUILD_DIR=/usr/libexec/suse-build
+ test -z "$BUILD_ROOT" && BUILD_ROOT=/var/tmp/build-root
+ test -z "$CONFIG_DIR" && CONFIG_DIR="$BUILD_DIR/configs"
+
+@@ -493,8 +493,8 @@ create_baselibs() {
+ if test -e $BUILD_ROOT$TOPDIR/SOURCES/baselibs.conf ; then
+ BASELIBS_CFG="-c $TOPDIR/SOURCES/baselibs.conf"
+ fi
+- if test -e $BUILD_ROOT/usr/lib/build/baselibs_global.conf; then
+- BASELIBS_GLOBAL="-c /usr/lib/build/baselibs_global.conf"
++ if test -e $BUILD_ROOT/usr/libexec/suse-build/baselibs_global.conf; then
++ BASELIBS_GLOBAL="-c /usr/libexec/suse-build/baselibs_global.conf"
+ fi
+ pkgs=($RPMS)
+ fi
+@@ -503,14 +503,14 @@ create_baselibs() {
+ # don't use -R as extracted sources, build root etc might be below $TOPDIR
+ chown "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"/* "$BUILD_ROOT$TOPDIR"/RPMS/* || true
+
+- local mkbaselibs="/usr/lib/build/mkbaselibs"
++ local mkbaselibs="/usr/libexec/suse-build/mkbaselibs"
+ local whichone=''
+ # $BUILD_DIR is set to /.build when using a vm. So we need to
+- # hardcode /usr/lib/build instead of $BUILD_DIR to prefer
++ # hardcode /usr/libexec/suse-build instead of $BUILD_DIR to prefer
+ # mkbaselibs from the distro.
+ if test -f $BUILD_ROOT$mkbaselibs; then
+- if test -z "$BASELIBS_CFG" -a -e $BUILD_ROOT/usr/lib/build/baselibs.conf ; then
+- BASELIBS_CFG="-c /usr/lib/build/baselibs.conf"
++ if test -z "$BASELIBS_CFG" -a -e $BUILD_ROOT/usr/libexec/suse-build/baselibs.conf ; then
++ BASELIBS_CFG="-c /usr/libexec/suse-build/baselibs.conf"
+ fi
+ else
+ if test "$CREATE_BASELIBS" = 'internal'; then
+@@ -1274,7 +1274,7 @@ if test -n "$RPMS" -a -n "$BUILD_USER_ABUILD_USED" ; then
+ recipe_check_file_owners
+ fi
+
+-if test -n "$RPMS" -a -d "$BUILD_ROOT/usr/lib/build/checks" ; then
++if test -n "$RPMS" -a -d "$BUILD_ROOT/usr/libexec/suse-build/checks" ; then
+ export DO_RPM_REMOVE=true
+ # find package name
+ export PNAME=
+@@ -1282,7 +1282,7 @@ if test -n "$RPMS" -a -d "$BUILD_ROOT/usr/lib/build/checks" ; then
+ test -f "$SRPM" && PNAME=`rpm --nodigest --nosignature -qp --qf "%{NAME}" $SRPM`
+ done
+ mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
+- for CHECKSCRIPT in $BUILD_ROOT/usr/lib/build/checks/* ; do
++ for CHECKSCRIPT in $BUILD_ROOT/usr/libexec/suse-build/checks/* ; do
+ echo "... running ${CHECKSCRIPT##*/}"
+ $CHECKSCRIPT || cleanup_and_exit 1
+ done
+diff --git a/build-recipe-kiwi b/build-recipe-kiwi
+index 95afd3f..23cafb7 100644
+--- a/build-recipe-kiwi
++++ b/build-recipe-kiwi
+@@ -459,8 +459,8 @@ recipe_build_kiwi() {
+ fi
+
+ # Hook for running post kiwi build scripts like QA scripts if installed
+- if test -x $BUILD_ROOT/usr/lib/build/kiwi_post_run ; then
+- chroot $BUILD_ROOT su -c /usr/lib/build/kiwi_post_run || cleanup_and_exit 1
++ if test -x $BUILD_ROOT/usr/libexec/suse-build/kiwi_post_run ; then
++ chroot $BUILD_ROOT su -c /usr/libexec/suse-build/kiwi_post_run || cleanup_and_exit 1
+ fi
+ }
+
+diff --git a/build-recipe-livebuild b/build-recipe-livebuild
+index 6ae7046..c426ea0 100644
+--- a/build-recipe-livebuild
++++ b/build-recipe-livebuild
+@@ -172,9 +172,9 @@ recipe_build_livebuild() {
+ # TODO: Add the repository public key
+ # cp ... $BUILD_ROOT/$TOPDIR/$LIVEBUILD_ROOT/config/archives/debian.key
+
+- if [ -x $BUILD_ROOT/usr/lib/build/livebuild_pre_run ] ; then
++ if [ -x $BUILD_ROOT/usr/libexec/suse-build/livebuild_pre_run ] ; then
+ echo "Running OBS build livebuild_pre_run hook"
+- chroot $BUILD_ROOT su -c "/usr/lib/build/livebuild_pre_run" - root \
++ chroot $BUILD_ROOT su -c "/usr/libexec/suse-build/livebuild_pre_run" - root \
+ < /dev/null || cleanup_and_exit 1
+ fi
+
+diff --git a/build-recipe-spec b/build-recipe-spec
+index b120f02..7a0b424 100644
+--- a/build-recipe-spec
++++ b/build-recipe-spec
+@@ -194,10 +194,10 @@ recipe_run_rpmlint() {
+ }
+
+ recipe_compare_oldpackages() {
+- if test -x "$BUILD_ROOT/usr/lib/build/same-build-result.sh" ; then
++ if test -x "$BUILD_ROOT/usr/libexec/suse-build/same-build-result.sh" ; then
+ echo "... comparing built packages with the former built"
+ mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
+- if chroot $BUILD_ROOT /usr/lib/build/same-build-result.sh /.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS"; then
++ if chroot $BUILD_ROOT /usr/libexec/suse-build/same-build-result.sh /.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS"; then
+ chroot $BUILD_ROOT touch /.build/.same_result_marker
+ # XXX: dirty build service hack. fix bs_worker. Search for
+ # 'same_result_marker' for traces of a first try to get rid of this
+@@ -210,9 +210,9 @@ recipe_compare_oldpackages() {
+ }
+
+ recipe_create_deltarpms() {
+- if test -x "$BUILD_ROOT/usr/bin/makedeltarpm" -a -x $BUILD_ROOT/usr/lib/build/mkdrpms ; then
++ if test -x "$BUILD_ROOT/usr/bin/makedeltarpm" -a -x $BUILD_ROOT/usr/libexec/suse-build/mkdrpms ; then
+ echo "... creating delta rpms"
+ ds=("$BUILD_ROOT/$TOPDIR"/RPMS/* "$BUILD_ROOT$TOPDIR/SRPMS")
+- chroot $BUILD_ROOT /usr/lib/build/mkdrpms /.build.oldpackages "${ds[@]#$BUILD_ROOT}"
++ chroot $BUILD_ROOT /usr/libexec/suse-build/mkdrpms /.build.oldpackages "${ds[@]#$BUILD_ROOT}"
+ fi
+ }
+diff --git a/changelog2spec b/changelog2spec
+old mode 100755
+new mode 100644
+index 4b94798..b87f4e1
+--- a/changelog2spec
++++ b/changelog2spec
+@@ -5,7 +5,7 @@
+ #
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Date::Parse;
+diff --git a/createarchdeps b/createarchdeps
+old mode 100755
+new mode 100644
+index 94efdb1..5e6795c
+--- a/createarchdeps
++++ b/createarchdeps
+@@ -3,7 +3,7 @@
+ # Archlinux support, based on the GSoC work of Nikolay Rysev <mad.f3ka@gmail.com>
+
+ BEGIN {
+- unshift @INC, ($::ENV{"BUILD_DIR"} || "/usr/lib/build");
++ unshift @INC, ($::ENV{"BUILD_DIR"} || "/usr/libexec/suse-build");
+ }
+
+ use strict;
+diff --git a/createrepomddeps b/createrepomddeps
+old mode 100755
+new mode 100644
+index fad84e5..f2292a6
+--- a/createrepomddeps
++++ b/createrepomddeps
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+diff --git a/createrpmdeps b/createrpmdeps
+old mode 100755
+new mode 100644
+index c8c796d..c890df1
+--- a/createrpmdeps
++++ b/createrpmdeps
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff --git a/createyastdeps b/createyastdeps
+old mode 100755
+new mode 100644
+index 43c83e7..094c532
+--- a/createyastdeps
++++ b/createyastdeps
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff --git a/createzyppdeps b/createzyppdeps
+index 9abf693..e78937c 100755
+--- a/createzyppdeps
++++ b/createzyppdeps
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+diff --git a/download b/download
+old mode 100755
+new mode 100644
+index b0a7c1f..d08770f
+--- a/download
++++ b/download
+@@ -3,7 +3,7 @@
+ use Net::SSL ();
+ BEGIN {
+ $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0,
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use LWP::UserAgent;
+diff --git a/expanddeps b/expanddeps
+old mode 100755
+new mode 100644
+index 48116d8..04b9c20
+--- a/expanddeps
++++ b/expanddeps
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+@@ -10,7 +10,7 @@ use Build;
+
+ my ($dist, $rpmdeps, $archs, $configdir, $useusedforbuild, $installonly, $noinstall);
+
+-$configdir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build') . '/configs';
++$configdir = ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build') . '/configs';
+
+ while (@ARGV) {
+ if ($ARGV[0] eq '--dist') {
+diff --git a/getbinaryid b/getbinaryid
+old mode 100755
+new mode 100644
+index 55c57f6..8f06579
+--- a/getbinaryid
++++ b/getbinaryid
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff --git a/init_buildsystem b/init_buildsystem
+old mode 100755
+new mode 100644
+index 9fec7aa..21c5d4f
+--- a/init_buildsystem
++++ b/init_buildsystem
+@@ -13,7 +13,7 @@
+ # needed globals variables
+ #
+ export SRC
+-export BUILD_DIR=${BUILD_DIR:-/usr/lib/build}
++export BUILD_DIR=${BUILD_DIR:-/usr/libexec/suse-build}
+
+ export YAST_IS_RUNNING=instsys
+
+diff --git a/initvm.c b/initvm.c
+index 55686ea..f922eb4 100644
+--- a/initvm.c
++++ b/initvm.c
+@@ -54,9 +54,10 @@ const int n_fields = 8;
+ #define SYSFS_BINFMT_MISC_REG "/proc/sys/fs/binfmt_misc/register"
+ #define SYSFS_BINFMT_MISC_STAT "/proc/sys/fs/binfmt_misc/status"
+
+-/* /usr/lib/build/x paths are copied to /.build inside a virtual machine */
++/* /usr/libexec/suse-build/x paths are copied to /.build inside a virtual machine */
+ #define BINFMT_REGF_0 "/.build/qemu-reg"
+-#define BINFMT_REGF_1 "/usr/lib/build/qemu-reg"
++#define BINFMT_REGF_1 "/usr/libexec/suse-build/qemu-reg"
++#define BINFMT_REGF_2 "/usr/libexec/suse-build/qemu-reg"
+ #define BUILD "/.build/build"
+
+ /* useful constant arrays */
+@@ -324,9 +325,13 @@ int main(int argc, char* argv[], char* env[])
+ fprintf(stderr, "%s: failed. Trying alternate binfmt file\n",
+ BINFMT_REGF_0);
+ if (!binfmt_register(BINFMT_REGF_1, SYSFS_BINFMT_MISC_REG)) {
+- fprintf(stderr, "%s: binfmt registration failed\n",
++ fprintf(stderr, "%s: failed. Trying alternate binfmt file\n",
+ BINFMT_REGF_1);
+- exit(1);
++ if (!binfmt_register(BINFMT_REGF_2, SYSFS_BINFMT_MISC_REG)) {
++ fprintf(stderr, "%s: binfmt registration failed\n",
++ BINFMT_REGF_2);
++ exit(1);
++ }
+ }
+ }
+ }
+diff --git a/mkdrpms b/mkdrpms
+old mode 100755
+new mode 100644
+index b3c13b3..11b929c
+--- a/mkdrpms
++++ b/mkdrpms
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, '/usr/lib/build';
++ unshift @INC, '/usr/libexec/suse-build';
+ unshift @INC, $::ENV{'BUILD_DIR'} if $::ENV{'BUILD_DIR'};
+ }
+
+diff --git a/order b/order
+old mode 100755
+new mode 100644
+index 2236b46..246b9fd
+--- a/order
++++ b/order
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+@@ -9,7 +9,7 @@ use strict;
+
+ my ($dist, $archs, $configdir, $manifest);
+
+-$configdir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build') . '/configs';
++$configdir = ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build') . '/configs';
+
+ while (@ARGV) {
+ if ($ARGV[0] eq '--dist') {
+diff --git a/queryconfig b/queryconfig
+index f4d383c..bb1e018 100755
+--- a/queryconfig
++++ b/queryconfig
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+@@ -10,7 +10,7 @@ use Build;
+
+ my ($dist, $archs, $configdir, $debug, $type, $argument);
+
+-$configdir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build') . '/configs';
++$configdir = ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build') . '/configs';
+
+ while (@ARGV) {
+ if ($ARGV[0] eq '--dist') {
+diff --git a/spectool b/spectool
+old mode 100755
+new mode 100644
+index ef05859..24bd500
+--- a/spectool
++++ b/spectool
+@@ -116,7 +116,7 @@ the algorithm is prepended with colon to the check sum.
+ my $builddir;
+
+ BEGIN {
+- $builddir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ $builddir = ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ unshift @INC, $builddir;
+ }
+
+diff --git a/substitutedeps b/substitutedeps
+old mode 100755
+new mode 100644
+index 54e540c..d327c42
+--- a/substitutedeps
++++ b/substitutedeps
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+@@ -19,7 +19,7 @@ sub expand {
+
+ my ($dist, $buildroot, $rpmdeps, $archs, $configdir, $release, $changelog);
+
+-$configdir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build') . '/configs';
++$configdir = ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build') . '/configs';
+
+ while (@ARGV) {
+ if ($ARGV[0] eq '--root') {
+diff --git a/test/common b/test/common
+index 45c0da2..86a062b 100644
+--- a/test/common
++++ b/test/common
+@@ -22,7 +22,7 @@ if [ -e ${0%/*}/config.local ]; then
+ . ${0%/*}/config.local
+ fi
+
+-: ${BUILD_DIR:=/usr/lib/build}
++: ${BUILD_DIR:=/usr/libexec/suse-build}
+
+ #if [ ! -e "$build_vm_img" ]; then
+ # sudo dd if=/dev/zero of="$build_vm_img" bs=512 count=0 seek=$((build_vm_image_size*2*1024))
diff --git a/dev-util/suse-build/files/suse-build-20140220-libexec-paths.patch b/dev-util/suse-build/files/suse-build-20140220-libexec-paths.patch
new file mode 100644
index 000000000000..49b1813a66e0
--- /dev/null
+++ b/dev-util/suse-build/files/suse-build-20140220-libexec-paths.patch
@@ -0,0 +1,212 @@
+diff -Naru obs-build-20140220-bak/build obs-build-20140220/build
+--- obs-build-20140220-bak/build 2014-03-02 17:04:18.655731128 +0000
++++ obs-build-20140220/build 2014-03-02 17:04:56.710281988 +0000
+@@ -12,7 +12,7 @@
+ exec /.build/build "$@"
+ fi
+
+-test -z "$BUILD_DIR" && BUILD_DIR=/usr/lib/build
++test -z "$BUILD_DIR" && BUILD_DIR=/usr/libexec/suse-build
+ test -z "$BUILD_ROOT" && BUILD_ROOT=/var/tmp/build-root
+ test -z "$CONFIG_DIR" && CONFIG_DIR="$BUILD_DIR/configs"
+
+diff -Naru obs-build-20140220-bak/createarchdeps obs-build-20140220/createarchdeps
+--- obs-build-20140220-bak/createarchdeps 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/createarchdeps 2014-03-02 17:04:56.710281988 +0000
+@@ -3,7 +3,7 @@
+ # Archlinux support, based on the GSoC work of Nikolay Rysev <mad.f3ka@gmail.com>
+
+ BEGIN {
+- unshift @INC, ($::ENV{"BUILD_DIR"} || "/usr/lib/build");
++ unshift @INC, ($::ENV{"BUILD_DIR"} || "/usr/libexec/suse-build");
+ }
+
+ use strict;
+diff -Naru obs-build-20140220-bak/createrepomddeps obs-build-20140220/createrepomddeps
+--- obs-build-20140220-bak/createrepomddeps 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/createrepomddeps 2014-03-02 17:04:56.710281988 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+diff -Naru obs-build-20140220-bak/createrpmdeps obs-build-20140220/createrpmdeps
+--- obs-build-20140220-bak/createrpmdeps 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/createrpmdeps 2014-03-02 17:04:56.710281988 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff -Naru obs-build-20140220-bak/createyastdeps obs-build-20140220/createyastdeps
+--- obs-build-20140220-bak/createyastdeps 2014-03-02 17:04:18.656731116 +0000
++++ obs-build-20140220/createyastdeps 2014-03-02 17:04:56.711281976 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff -Naru obs-build-20140220-bak/download obs-build-20140220/download
+--- obs-build-20140220-bak/download 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/download 2014-03-02 17:04:56.711281976 +0000
+@@ -3,7 +3,7 @@
+ use Net::SSL ();
+ BEGIN {
+ $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0,
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use LWP::UserAgent;
+diff -Naru obs-build-20140220-bak/expanddeps obs-build-20140220/expanddeps
+--- obs-build-20140220-bak/expanddeps 2014-03-02 17:04:18.658731091 +0000
++++ obs-build-20140220/expanddeps 2014-03-02 17:04:56.711281976 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+diff -Naru obs-build-20140220-bak/getbinaryid obs-build-20140220/getbinaryid
+--- obs-build-20140220-bak/getbinaryid 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/getbinaryid 2014-03-02 17:04:56.711281976 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff -Naru obs-build-20140220-bak/getoptflags obs-build-20140220/getoptflags
+--- obs-build-20140220-bak/getoptflags 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/getoptflags 2014-03-02 17:05:22.777976219 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
+diff -Naru obs-build-20140220-bak/changelog2spec obs-build-20140220/changelog2spec
+--- obs-build-20140220-bak/changelog2spec 2014-03-02 17:04:18.658731091 +0000
++++ obs-build-20140220/changelog2spec 2014-03-02 17:05:24.268958777 +0000
+@@ -5,7 +5,7 @@
+ #
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Date::Parse;
+diff -Naru obs-build-20140220-bak/init_buildsystem obs-build-20140220/init_buildsystem
+--- obs-build-20140220-bak/init_buildsystem 2014-03-02 17:04:18.655731128 +0000
++++ obs-build-20140220/init_buildsystem 2014-03-02 17:05:24.268958777 +0000
+@@ -16,7 +16,7 @@
+ export YAST_IS_RUNNING="instsys"
+ export DEBIAN_FRONTEND=noninteractive
+ export DEBIAN_PRIORITY=critical
+-export BUILD_DIR=${BUILD_DIR:-/usr/lib/build}
++export BUILD_DIR=${BUILD_DIR:-/usr/libexec/suse-build}
+ # need to restore build root owner for non-root builds
+ browner=0
+ definesnstuff=()
+diff -Naru obs-build-20140220-bak/initvm.c obs-build-20140220/initvm.c
+--- obs-build-20140220-bak/initvm.c 2014-03-02 17:04:18.658731091 +0000
++++ obs-build-20140220/initvm.c 2014-03-02 17:05:24.269958765 +0000
+@@ -54,9 +54,10 @@
+ #define SYSFS_BINFMT_MISC_REG "/proc/sys/fs/binfmt_misc/register"
+ #define SYSFS_BINFMT_MISC_STAT "/proc/sys/fs/binfmt_misc/status"
+
+-/* /usr/lib/build/x paths are copied to /.build inside a virtual machine */
++/* /usr/libexec/suse-build/x paths are copied to /.build inside a virtual machine */
+ #define BINFMT_REGF_0 "/.build/qemu-reg"
+-#define BINFMT_REGF_1 "/usr/lib/build/qemu-reg"
++#define BINFMT_REGF_1 "/usr/libexec/suse-build/qemu-reg"
++#define BINFMT_REGF_2 "/usr/lib/build/qemu-reg"
+ #define BUILD "/.build/build"
+
+ /* useful constant arrays */
+@@ -324,9 +325,13 @@
+ fprintf(stderr, "%s: failed. Trying alternate binfmt file\n",
+ BINFMT_REGF_0);
+ if (!binfmt_register(BINFMT_REGF_1, SYSFS_BINFMT_MISC_REG)) {
+- fprintf(stderr, "%s: binfmt registration failed\n",
++ fprintf(stderr, "%s: failed. Trying alternate binfmt file\n",
+ BINFMT_REGF_1);
+- exit(1);
++ if (!binfmt_register(BINFMT_REGF_2, SYSFS_BINFMT_MISC_REG)) {
++ fprintf(stderr, "%s: binfmt registration failed\n",
++ BINFMT_REGF_2);
++ exit(1);
++ }
+ }
+ }
+ }
+diff -Naru obs-build-20140220-bak/mkdrpms obs-build-20140220/mkdrpms
+--- obs-build-20140220-bak/mkdrpms 2014-03-02 17:04:18.656731116 +0000
++++ obs-build-20140220/mkdrpms 2014-03-02 17:05:24.269958765 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, '/usr/lib/build';
++ unshift @INC, '/usr/libexec/suse-build';
+ unshift @INC, $::ENV{'BUILD_DIR'} if $::ENV{'BUILD_DIR'};
+ }
+
+diff -Naru obs-build-20140220-bak/order obs-build-20140220/order
+--- obs-build-20140220-bak/order 2014-03-02 17:04:18.658731091 +0000
++++ obs-build-20140220/order 2014-03-02 17:05:24.269958765 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use Build;
+diff -Naru obs-build-20140220-bak/spectool obs-build-20140220/spectool
+--- obs-build-20140220-bak/spectool 2014-03-02 17:04:18.658731091 +0000
++++ obs-build-20140220/spectool 2014-03-02 17:05:24.269958765 +0000
+@@ -116,7 +116,7 @@
+ my $builddir;
+
+ BEGIN {
+- $builddir = ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ $builddir = ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ unshift @INC, $builddir;
+ }
+
+diff -Naru obs-build-20140220-bak/substitutedeps obs-build-20140220/substitutedeps
+--- obs-build-20140220-bak/substitutedeps 2014-03-02 17:04:18.659731079 +0000
++++ obs-build-20140220/substitutedeps 2014-03-02 17:05:24.269958765 +0000
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+
+ BEGIN {
+- unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
++ unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/libexec/suse-build');
+ }
+
+ use strict;
diff --git a/dev-util/suse-build/metadata.xml b/dev-util/suse-build/metadata.xml
new file mode 100644
index 000000000000..b12171d137ee
--- /dev/null
+++ b/dev-util/suse-build/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>suse</herd>
+ <use>
+ <flag name="symlink">Provide compatibility symlinks with original openSUSE package (might clash with other packages)</flag>
+ </use>
+ <longdescription lang="en">
+Script for building RPMs for SUSE Linux in a chroot environment.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-util/suse-build/suse-build-2014.02.20.ebuild b/dev-util/suse-build/suse-build-2014.02.20.ebuild
new file mode 100644
index 000000000000..ca7de4d187a4
--- /dev/null
+++ b/dev-util/suse-build/suse-build-2014.02.20.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://github.com/openSUSE/obs-build.git"
+
+if [[ "${PV}" == "9999" ]]; then
+ EXTRA_ECLASS="git-2"
+else
+ OBS_PACKAGE="build"
+ OBS_PROJECT="openSUSE:Tools"
+ EXTRA_ECLASS="obs-download"
+fi
+
+inherit eutils ${EXTRA_ECLASS}
+unset EXTRA_ECLASS
+
+DESCRIPTION="Script to build SUSE Linux RPMs"
+HOMEPAGE="https://build.opensuse.org/package/show/openSUSE:Tools/build"
+
+[[ "${PV}" == "9999" ]] || SRC_URI="${OBS_URI}/${PN/suse/obs}-${PV//.}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="symlink"
+[[ "${PV}" == "9999" ]] || \
+KEYWORDS="amd64 x86"
+
+RDEPEND="
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ dev-perl/XML-Parser
+ dev-perl/TimeDate
+ app-shells/bash
+ app-arch/cpio
+ app-arch/rpm
+"
+
+S="${WORKDIR}/${PN/suse/obs}-${PV//.}"
+
+src_prepare() {
+ epatch "${FILESDIR}/suse-build-20140220-libexec-paths.patch"
+}
+
+src_compile() { :; }
+
+src_install() {
+ emake DESTDIR="${ED}" pkglibdir=/usr/libexec/suse-build install
+ cd "${ED}"/usr
+ find bin -type l | while read i; do
+ mv "${i}" "${i/bin\//bin/suse-}"
+ use !symlink || dosym "${i/bin\//suse-}" "/usr/${i}"
+ done
+ find share/man/man1 -type f | while read i; do
+ mv "${i}" "${i/man1\//man1/suse-}"
+ use !symlink || dosym "${i/man1\//suse-}" "/usr/${i}"
+ done
+
+ # create symlink for default build config
+ dosym /usr/libexec/suse-build/configs/sl13.2.conf /usr/libexec/suse-build/configs/default.conf
+}
diff --git a/dev-util/suse-build/suse-build-2014.09.18.ebuild b/dev-util/suse-build/suse-build-2014.09.18.ebuild
new file mode 100644
index 000000000000..e7b4c90ed9f5
--- /dev/null
+++ b/dev-util/suse-build/suse-build-2014.09.18.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://github.com/openSUSE/obs-build.git"
+
+if [[ "${PV}" == "9999" ]]; then
+ EXTRA_ECLASS="git-2"
+else
+ OBS_PACKAGE="build"
+ OBS_PROJECT="openSUSE:Tools"
+ EXTRA_ECLASS="obs-download"
+fi
+
+inherit eutils ${EXTRA_ECLASS}
+unset EXTRA_ECLASS
+
+DESCRIPTION="Script to build SUSE Linux RPMs"
+HOMEPAGE="https://build.opensuse.org/package/show/openSUSE:Tools/build"
+
+[[ "${PV}" == "9999" ]] || SRC_URI="${OBS_URI}/${PN/suse/obs}-${PV//.}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="symlink"
+[[ "${PV}" == "9999" ]] || \
+KEYWORDS="amd64 x86"
+
+RDEPEND="
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ dev-perl/XML-Parser
+ dev-perl/TimeDate
+ app-shells/bash
+ app-arch/cpio
+ app-arch/rpm
+"
+
+S="${WORKDIR}/${PN/suse/obs}-${PV//.}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libexec-paths.patch
+}
+
+src_compile() { :; }
+
+src_install() {
+ emake DESTDIR="${ED}" pkglibdir=/usr/libexec/suse-build install
+ cd "${ED}"/usr
+ find bin -type l | while read i; do
+ mv "${i}" "${i/bin\//bin/suse-}"
+ use !symlink || dosym "${i/bin\//suse-}" "/usr/${i}"
+ done
+ find share/man/man1 -type f | while read i; do
+ mv "${i}" "${i/man1\//man1/suse-}"
+ use !symlink || dosym "${i/man1\//suse-}" "/usr/${i}"
+ done
+
+ # create symlink for default build config
+ dosym /usr/libexec/suse-build/configs/sl13.2.conf /usr/libexec/suse-build/configs/default.conf
+}
diff --git a/dev-util/suse-build/suse-build-9999.ebuild b/dev-util/suse-build/suse-build-9999.ebuild
new file mode 100644
index 000000000000..3056206b4e11
--- /dev/null
+++ b/dev-util/suse-build/suse-build-9999.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://github.com/openSUSE/obs-build.git"
+
+if [[ "${PV}" == "9999" ]]; then
+ EXTRA_ECLASS="git-2"
+else
+ OBS_PACKAGE="build"
+ OBS_PROJECT="openSUSE:Tools"
+ EXTRA_ECLASS="obs-download"
+fi
+
+inherit eutils ${EXTRA_ECLASS}
+unset EXTRA_ECLASS
+
+DESCRIPTION="Script to build SUSE Linux RPMs"
+HOMEPAGE="https://build.opensuse.org/package/show/openSUSE:Tools/build"
+
+[[ "${PV}" == "9999" ]] || SRC_URI="${OBS_URI}/${PN/suse/obs}-${PV//.}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="symlink"
+[[ "${PV}" == "9999" ]] || \
+KEYWORDS="amd64 x86"
+
+RDEPEND="
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ dev-perl/XML-Parser
+ dev-perl/TimeDate
+ app-shells/bash
+ app-arch/cpio
+ app-arch/rpm
+"
+
+S="${WORKDIR}/${PN/suse/obs}-${PV//.}"
+
+src_compile() { :; }
+
+src_install() {
+ emake DESTDIR="${ED}" pkglibdir=/usr/libexec/suse-build install
+ cd "${ED}"/usr
+ find bin -type l | while read i; do
+ mv "${i}" "${i/bin\//bin/suse-}"
+ use !symlink || dosym "${i/bin\//suse-}" "/usr/${i}"
+ done
+ find share/man/man1 -type f | while read i; do
+ mv "${i}" "${i/man1\//man1/suse-}"
+ use !symlink || dosym "${i/man1\//suse-}" "/usr/${i}"
+ done
+ find . -type f -exec sed -i 's|/usr/lib/build|/usr/libexec/suse-build|' {} +
+
+ # create symlink for default build config
+ dosym /usr/libexec/suse-build/configs/sl13.2.conf /usr/libexec/suse-build/configs/default.conf
+}