Hello community, here is the log from the commit of package build for openSUSE:Factory checked in at 2014-11-26 10:35:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build" Changes: -------- --- /work/SRC/openSUSE:Factory/build/build.changes 2014-11-04 17:27:40.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.build.new/build.changes 2014-11-26 10:36:01.000000000 +0100 @@ -1,0 +2,9 @@ +Mon Nov 24 15:45:59 UTC 2014 - [email protected] + +- Add releasesuffix hack for new PTF handling +- support parallel build jobs for debs +- Fix repocfg usage in the "exact match" case +- Improve exclarch handling for deb builds +- rewritten workaround for broken chroot tool + +------------------------------------------------------------------- Old: ---- obs-build-20141024.tar.gz New: ---- obs-build-20141120.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.76V0TZ/_old 2014-11-26 10:36:02.000000000 +0100 +++ /var/tmp/diff_new_pack.76V0TZ/_new 2014-11-26 10:36:02.000000000 +0100 @@ -20,7 +20,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0+ and GPL-2.0 Group: Development/Tools/Building -Version: 20141024 +Version: 20141120 Release: 0 #!BuildIgnore: build-mkbaselibs Source: obs-build-%{version}.tar.gz ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.76V0TZ/_old 2014-11-26 10:36:02.000000000 +0100 +++ /var/tmp/diff_new_pack.76V0TZ/_new 2014-11-26 10:36:02.000000000 +0100 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20141024 +pkgver=20141120 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') @@ -8,7 +8,7 @@ groups=('base-devel') depends=('perl') source=(obs-build-${pkgver}.tar.gz) -md5sums=('07987082f491e8d4839d5ae60539a668') +md5sums=('07405ad5bd573e5534508105a09a9677') package() { msg "Installing build ..." ++++++ build.dsc ++++++ --- /var/tmp/diff_new_pack.76V0TZ/_old 2014-11-26 10:36:02.000000000 +0100 +++ /var/tmp/diff_new_pack.76V0TZ/_new 2014-11-26 10:36:02.000000000 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20141024 +Version: 20141120 Binary: build Maintainer: Adrian Schroeter <[email protected]> Architecture: all ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.76V0TZ/_old 2014-11-26 10:36:02.000000000 +0100 +++ /var/tmp/diff_new_pack.76V0TZ/_new 2014-11-26 10:36:02.000000000 +0100 @@ -1,4 +1,4 @@ -build (20141024) unstable; urgency=low +build (20141120) unstable; urgency=low * Update to current git trunk - add sles11sp2 build config and adapt autodetection ++++++ obs-build-20141024.tar.gz -> obs-build-20141120.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/Build/Deb.pm new/obs-build-20141120/Build/Deb.pm --- old/obs-build-20141024/Build/Deb.pm 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/Build/Deb.pm 2014-11-24 16:45:30.000000000 +0100 @@ -29,16 +29,29 @@ $have_zlib = 1; }; +my %obs2debian = ( + "i486" => "i386", + "i586" => "i386", + "i686" => "i386", + "ppc" => "powerpc", + "ppc64el" => "ppc64el", + "x86_64" => "amd64", + "armv4l" => "armel", + "armv5l" => "armel", + "armv6l" => "armel", + "armv7l" => "armel", + "armv7hl" => "armhf" +); + sub basearch { my ($arch) = @_; - $arch = 'all' if !defined($arch) || $arch eq 'noarch'; - $arch = 'i386' if $arch =~ /^i[456]86$/; - $arch = 'powerpc' if $arch eq 'ppc'; - $arch = 'ppc64el' if $arch eq 'ppc64le'; - $arch = 'amd64' if $arch eq 'x86_64'; - $arch = 'armel' if $arch =~ /^armv[4567]l$/; - $arch = 'armhf' if $arch eq 'armv7hl'; - return $arch; + return 'all' if !defined($arch) || $arch eq 'noarch'; + return $obs2debian{$arch} || $arch; +} + +sub obsarch { + my ($arch) = @_; + return grep {$obs2debian{$_} eq $arch} sort keys %obs2debian; } sub parse { @@ -72,6 +85,7 @@ my $name; my $version; my @deps; + my @exclarch; while (@control) { my $c = shift @control; last if $c eq ''; # new paragraph @@ -86,6 +100,14 @@ if ($tag eq 'VERSION') { $version = $data; $version =~ s/-[^-]+$//; + } elsif ($tag eq 'ARCHITECTURE') { + my @archs = split('\s+', $data); + map { s/$os-//; s/any-// } @archs; + next if grep { $_ eq "any" || $_ eq "all" } @archs; + @exclarch = map { obsarch($_) } @archs; + # unify + my %exclarch = map {$_ => 1} @exclarch; + @exclarch = sort keys %exclarch; } elsif ($tag eq 'SOURCE') { $name = $data; } elsif ($tag eq 'BUILD-DEPENDS' || $tag eq 'BUILD-CONFLICTS' || $tag eq 'BUILD-IGNORE' || $tag eq 'BUILD-DEPENDS-INDEP') { @@ -102,11 +124,11 @@ $isneg = 1 if $q =~ s/^\!//; $bad = 1 if !defined($bad) && !$isneg; if ($isneg) { - if ($q eq $arch || $q eq 'any' || $q eq "$os-$arch" || $q eq "$os-any") { + if ($q eq $arch || $q eq 'any' || $q eq "$os-$arch" || $q eq "$os-any" || $q eq "any-$arch") { $bad = 1; last; } - } elsif ($q eq $arch || $q eq 'any' || $q eq "$os-$arch" || $q eq "$os-any") { + } elsif ($q eq $arch || $q eq 'any' || $q eq "$os-$arch" || $q eq "$os-any" || $q eq "any-$arch") { $bad = 0; } } @@ -131,6 +153,7 @@ $ret->{'name'} = $name; $ret->{'version'} = $version; $ret->{'deps'} = \@deps; + $ret->{'exclarch'} = \@exclarch if @exclarch; return $ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/Build/Zypp.pm new/obs-build-20141120/Build/Zypp.pm --- old/obs-build-20141024/Build/Zypp.pm 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/Build/Zypp.pm 2014-11-24 16:45:30.000000000 +0100 @@ -28,7 +28,7 @@ my ($repocfg, $reponame) = @_; local *REPO; - open(REPO, '<', "$root/etc/zypp/repos.d/$repocfg.repo") or return undef; + open(REPO, '<', "$root/etc/zypp/repos.d/$repocfg") or return undef; my $name; my $repo = {}; while (<REPO>) { @@ -51,7 +51,7 @@ my ($reponame) = @_; # first try matching .repo file if (-e "$root/etc/zypp/repos.d/$reponame.repo") { - my $repo = parsecfg($reponame, $reponame); + my $repo = parsecfg("$reponame.repo", $reponame); return $repo if $repo; } # then try all repo files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/Build.pm new/obs-build-20141120/Build.pm --- old/obs-build-20141024/Build.pm 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/Build.pm 2014-11-24 16:45:30.000000000 +0100 @@ -313,6 +313,8 @@ $config->{'cicntstart'} = $l[0]; } elsif ($l0 eq 'releaseprg:') { $config->{'releaseprg'} = $l[0]; + } elsif ($l0 eq 'releasesuffix:') { + $config->{'releasesuffix'} = join(' ', @l); } elsif ($l0 eq 'changetarget:' || $l0 eq 'target:') { $config->{'target'} = join(' ', @l); push @macros, "%define _target_cpu ".(split('-', $config->{'target'}))[0] if $config->{'target'}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build new/obs-build-20141120/build --- old/obs-build-20141024/build 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build 2014-11-24 16:45:30.000000000 +0100 @@ -35,8 +35,6 @@ test -z "$BUILD_ROOT" && BUILD_ROOT=/var/tmp/build-root test -z "$CONFIG_DIR" && CONFIG_DIR="$BUILD_DIR/configs" -export CHROOT="chroot $BUILD_ROOT" - export BUILD_ARCH BUILD_HOST_ARCH BUILD_ROOT BUILD_RPMS BUILD_DIR BUILD_DEBUG export BUILD_DIST @@ -464,7 +462,7 @@ echo "create-env not found" return 1 fi - $CHROOT bash -c "cd /var/run/icecream; $createenv" || cleanup_and_exit 1 + chroot $BUILD_ROOT bash -c "cd /var/run/icecream; $createenv" || cleanup_and_exit 1 icecc_vers=(`shopt -s nullglob; echo $BUILD_ROOT/var/run/icecream/*.tar.{bz2,gz}`) icecc_vers=${icecc_vers//$BUILD_ROOT/} else @@ -561,7 +559,7 @@ echo "... creating baselibs$whichone" while read line do - $CHROOT su -c "$mkbaselibs $BASELIBS_GLOBAL $BASELIBS_CFG $line" - $BUILD_USER || cleanup_and_exit 1 + chroot $BUILD_ROOT su -c "$mkbaselibs $BASELIBS_GLOBAL $BASELIBS_CFG $line" - $BUILD_USER || cleanup_and_exit 1 done < <(IFS=$'\n'; echo "${pkgs[*]#$BUILD_ROOT}" | xargs -n 1024) rm -rf "$BUILD_ROOT/.mkbaselibs" } @@ -597,10 +595,7 @@ mkdir_build_root() { # strip trailing slash - if test "$BUILD_ROOT" != /; then - BUILD_ROOT="${BUILD_ROOT%/}" - export CHROOT="chroot $BUILD_ROOT" - fi + test "$BUILD_ROOT" != / && BUILD_ROOT="${BUILD_ROOT%/}" if test -d "$BUILD_ROOT" ; then # check if it is owned by root if test -z "$RUNNING_IN_VM" -a \! -O "$BUILD_ROOT" -a "`stat -c %u $BUILD_ROOT`" -ne 0 ; then @@ -757,7 +752,6 @@ -root) needarg BUILD_ROOT="$ARG" - export CHROOT="chroot $BUILD_ROOT" shift ;; -cachedir) @@ -956,7 +950,6 @@ if test -n "$LIST_STATE" ; then BUILD_ROOT=`mktemp -d /var/tmp/build-list-state-XXXXXX` - export CHROOT="chroot $BUILD_ROOT" test -d "$BUILD_ROOT" || cleanup_and_exit 3 RECIPEFILE=$RECIPEFILES # only one specified anyways if test "$RECIPEFILE" != "${RECIPEFILE%.src.rpm}" ; then @@ -1149,7 +1142,7 @@ # BUILD_USER=abuild if test -x $BUILD_ROOT/bin/rpm ; then - SUSE_VERSION=`$CHROOT /bin/rpm --eval '%{?suse_version}' 2>/dev/null` + SUSE_VERSION=`chroot $BUILD_ROOT /bin/rpm --eval '%{?suse_version}' 2>/dev/null` test -n "$SUSE_VERSION" -a "${SUSE_VERSION:-0}" -le 1020 && BUILD_USER=root fi if test "$BUILD_USER" = abuild ; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-pkg-arch new/obs-build-20141120/build-pkg-arch --- old/obs-build-20141024/build-pkg-arch 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-pkg-arch 2014-11-24 16:45:30.000000000 +0100 @@ -53,7 +53,7 @@ pkg_install_arch() { # -d -d disables deps checking - ( $CHROOT pacman -U --force -d -d --noconfirm /.init_b_cache/$PKG.$PSUF 2>&1 || touch $BUILD_ROOT/exit ) | \ + ( cd $BUILD_ROOT && chroot $BUILD_ROOT pacman -U --force -d -d --noconfirm .init_b_cache/$PKG.$PSUF 2>&1 || touch $BUILD_ROOT/exit ) | \ perl -ne '$|=1;/^(warning: could not get filesystem information for |loading packages|looking for inter-conflicts|Targets |Total Installed Size: |Net Upgrade Size: |Proceed with installation|checking package integrity|loading package files|checking for file conflicts|checking keyring|Packages \(\d+\):|:: Proceed with installation|checking available disk space|installing |upgrading |warning:.*is up to date -- reinstalling|Optional dependencies for| )/||/^$/||print' } @@ -73,7 +73,7 @@ pkg_runscripts_arch() { if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" ; then echo "running $PKG postinstall script" - ( $CHROOT "/.init_b_cache/scripts/$PKG.post" < /dev/null ) + ( cd $BUILD_ROOT && chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.post" < /dev/null ) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-pkg-deb new/obs-build-20141120/build-pkg-deb --- old/obs-build-20141024/build-pkg-deb 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-pkg-deb 2014-11-24 16:45:30.000000000 +0100 @@ -39,7 +39,7 @@ rm -f $BUILD_ROOT/.init_b_cache/dpkg.deb cp $BUILD_ROOT/.init_b_cache/rpms/dpkg.deb $BUILD_ROOT/.init_b_cache/dpkg.deb || cleanup_and_exit 1 fi - $CHROOT dpkg -i --force all .init_b_cache/dpkg.deb >/dev/null 2>&1 + chroot $BUILD_ROOT dpkg -i --force all .init_b_cache/dpkg.deb >/dev/null 2>&1 } pkg_get_installed_deb() { @@ -55,8 +55,8 @@ pkg_install_deb() { export DEBIAN_FRONTEND=noninteractive export DEBIAN_PRIORITY=critical - ( $CHROOT dpkg --install --force all /.init_b_cache/$PKG.deb 2>&1 || touch $BUILD_ROOT/exit ) | \ - perl -ne '$|=1;/^(Configuration file|Installing new config file|Selecting previously deselected|Selecting previously unselected|\(Reading database|Unpacking |Setting up|Creating config file|Preparing to replace dpkg)/||/^$/||print' + ( cd $BUILD_ROOT && chroot $BUILD_ROOT dpkg --install --force all .init_b_cache/$PKG.deb 2>&1 || touch $BUILD_ROOT/exit ) | \ + perl -ne '$|=1;/^(Configuration file|Installing new config file|Selecting previously deselected|Selecting previously unselected|\(Reading database|Unpacking |Setting up|Creating config file|Preparing to replace dpkg|Preparing to unpack )/||/^$/||print' check_exit # ugly workaround for upstart system. some packages (procps) try # to start a service in their configure phase. As we don't have @@ -89,9 +89,9 @@ # configure all packages after complete installation, not for each package like rpm does # We need to run this twice, because of cyclic dependencies as it does not succeed on most # debian based distros in the first attempt. - if ! $CHROOT dpkg --configure --pending 2>&1; then + if ! chroot $BUILD_ROOT dpkg --configure --pending 2>&1; then echo "first configure attempt failed, trying again..." - $CHROOT dpkg --configure --pending 2>&1 || cleanup_and_exit 1 + chroot $BUILD_ROOT dpkg --configure --pending 2>&1 || cleanup_and_exit 1 fi } @@ -117,12 +117,12 @@ fi if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" ; then echo "running $PKG preinstall script" - $CHROOT "/.init_b_cache/scripts/$PKG.pre" install < /dev/null + (cd $BUILD_ROOT && chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.pre" install < /dev/null ) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" fi if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" ; then echo "running $PKG postinstall script" - $CHROOT "/.init_b_cache/scripts/$PKG.post" configure '' < /dev/null + (cd $BUILD_ROOT && chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.post" configure '' < /dev/null ) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-pkg-rpm new/obs-build-20141120/build-pkg-rpm --- old/obs-build-20141024/build-pkg-rpm 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-pkg-rpm 2014-11-24 16:45:30.000000000 +0100 @@ -32,20 +32,20 @@ # rpm v5 does not have initdb if ! test -e $BUILD_ROOT/usr/lib/rpm/cpuinfo.yaml ; then if test -x $BUILD_ROOT/usr/bin/rpmdb ; then - $CHROOT /usr/bin/rpmdb --initdb || cleanup_and_exit 1 + chroot $BUILD_ROOT /usr/bin/rpmdb --initdb || cleanup_and_exit 1 else - $CHROOT rpm --initdb || cleanup_and_exit 1 + chroot $BUILD_ROOT rpm --initdb || cleanup_and_exit 1 fi fi # hack: add nofsync to db config to speed up install mkdir -p $BUILD_ROOT/root - DBI_OTHER=`$CHROOT rpm --eval '%{?__dbi_other}'` + DBI_OTHER=`chroot $BUILD_ROOT rpm --eval '%{?__dbi_other}'` echo "%__dbi_other $DBI_OTHER nofsync" > $BUILD_ROOT/.rpmmacros echo "%__dbi_other $DBI_OTHER nofsync" > $BUILD_ROOT/root/.rpmmacros } pkg_get_installed_rpm() { - $CHROOT rpm -qa --qf "%{NAME} $RPMIDFMT" | ( + chroot $BUILD_ROOT rpm -qa --qf "%{NAME} $RPMIDFMT" | ( while read pp ii; do echo "$ii" > "$BUILD_ROOT/.init_b_cache/alreadyinstalled/$pp" done @@ -56,7 +56,7 @@ } pkg_erase_rpm() { - $CHROOT rpm --nodeps -e $PKG 2>&1 | { + chroot $BUILD_ROOT rpm --nodeps -e $PKG 2>&1 | { local retry while read line; do case "$line" in @@ -71,7 +71,7 @@ done if test -n "$retry" ; then echo "re-try deleting $PKG using --noscripts" - $CHROOT rpm --nodeps --noscripts -e $PKG || true + chroot $BUILD_ROOT rpm --nodeps --noscripts -e $PKG || true fi } } @@ -91,7 +91,7 @@ CUMULATED_PIDS=() CUMULATED_HMD5=() DO_CUMULATE= - typeset -ri suse_version=$($CHROOT rpm --eval '%{?suse_version}' 2>/dev/null) + typeset -ri suse_version=$(chroot $BUILD_ROOT rpm --eval '%{?suse_version}' 2>/dev/null) if ((suse_version > 1220)) ; then DO_CUMULATE=true fi @@ -102,7 +102,7 @@ } pkg_verify_installed_rpm() { - $CHROOT rpm --verify $PKG 2>&1 | tee $TMPFILE + chroot $BUILD_ROOT rpm --verify $PKG 2>&1 | tee $TMPFILE if grep ^missing $TMPFILE > /dev/null ; then return 1 fi @@ -118,7 +118,7 @@ done fi let cumulate++ - CUMULATED_LIST[$cumulate]="/.init_b_cache/$PKG.rpm" + CUMULATED_LIST[$cumulate]=".init_b_cache/$PKG.rpm" CUMULATED_PIDS[$cumulate]="$PKGID" CUMULATED_HMD5[$cumulate]="$PKG_HDRMD5" return 0 @@ -135,8 +135,8 @@ test -e "$i" && ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --justdb" done fi - ( $CHROOT rpm --ignorearch --nodeps -U --oldpackage --ignoresize $RPMCHECKOPTS \ - $ADDITIONAL_PARAMS /.init_b_cache/$PKG.rpm 2>&1 || \ + ( chroot $BUILD_ROOT rpm --ignorearch --nodeps -U --oldpackage --ignoresize $RPMCHECKOPTS \ + $ADDITIONAL_PARAMS .init_b_cache/$PKG.rpm 2>&1 || \ touch $BUILD_ROOT/exit ) | \ grep -v "^warning:.*saved as.*rpmorig$" } @@ -151,8 +151,8 @@ rm -f $BUILD_ROOT/${CUMULATED_LIST[$num]} cp $BUILD_ROOT/.init_b_cache/rpms/$PKG $BUILD_ROOT/${CUMULATED_LIST[$num]} || cleanup_and_exit 1 done > $BUILD_ROOT/.init_b_cache/manifest - $CHROOT rpm --ignorearch --nodeps -Uh --oldpackage --ignoresize --verbose $RPMCHECKOPTS \ - $ADDITIONAL_PARAMS /.init_b_cache/manifest 2>&1 || touch $BUILD_ROOT/exit + chroot $BUILD_ROOT rpm --ignorearch --nodeps -Uh --oldpackage --ignoresize --verbose $RPMCHECKOPTS \ + $ADDITIONAL_PARAMS .init_b_cache/manifest 2>&1 || touch $BUILD_ROOT/exit for ((num=0; num<=cumulate; num++)) ; do rm -f $BUILD_ROOT/${CUMULATED_LIST[$num]} done @@ -199,21 +199,21 @@ # hack for rpm erasures if test -d "$BUILD_ROOT/installed-pkg" ; then # call for rpm-4.x and not rpm-devel - test -z "${PKG##rpm-[0-9]*}" && $CHROOT rpm --rebuilddb + test -z "${PKG##rpm-[0-9]*}" && chroot $BUILD_ROOT rpm --rebuilddb # also exec for exchanged rpm ! naming is rpm-x86-<target>-<ver> - test -z "${PKG##rpm-x86-*[0-9]*}" && $CHROOT rpm --rebuilddb + test -z "${PKG##rpm-x86-*[0-9]*}" && chroot $BUILD_ROOT rpm --rebuilddb fi } pkg_runscripts_rpm() { if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" ; then echo "running $PKG preinstall script" - $CHROOT sh "/.init_b_cache/scripts/$PKG.pre" 0 + chroot $BUILD_ROOT sh ".init_b_cache/scripts/$PKG.pre" 0 rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" fi if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" ; then echo "running $PKG postinstall script" - $CHROOT sh "/.init_b_cache/scripts/$PKG.post" 1 + chroot $BUILD_ROOT sh ".init_b_cache/scripts/$PKG.post" 1 rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-recipe-arch new/obs-build-20141120/build-recipe-arch --- old/obs-build-20141024/build-recipe-arch 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-recipe-arch 2014-11-24 16:45:30.000000000 +0100 @@ -53,5 +53,5 @@ } _arch_recipe_makepkg() { - $CHROOT su -lc "source /etc/profile; cd $TOPDIR/SOURCES && makepkg --config ../makepkg.conf $*" $BUILD_USER + chroot $BUILD_ROOT su -lc "source /etc/profile; cd $TOPDIR/SOURCES && makepkg --config ../makepkg.conf $*" $BUILD_USER } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-recipe-dsc new/obs-build-20141120/build-recipe-dsc --- old/obs-build-20141024/build-recipe-dsc 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-recipe-dsc 2014-11-24 16:45:30.000000000 +0100 @@ -51,7 +51,14 @@ CHANGELOGARGS= test -n "$CHANGELOG" -a -f "$BUILD_ROOT/.build-changelog" && CHANGELOGARGS="--changelog $BUILD_ROOT/.build-changelog" echo "running debian transformer..." - if ! debtransform $CHANGELOGARGS $BUILD_ROOT$TOPDIR/SOURCES $BUILD_ROOT$TOPDIR/SOURCES/$RECIPEFILE $BUILD_ROOT$TOPDIR/SOURCES.DEB ; then + if [ "$RELEASE" ]; then + # remove rpm macros (everything after "%") + # they are not evaluated by the Debian build process + DEB_RELEASE=`sed 's/%.*$//' <<< $RELEASE` + echo "release: ($RELEASE), release (DEB) ($DEB_RELEASE)" + RELEASEARGS="--release $DEB_RELEASE" + fi + if ! debtransform $CHANGELOGARGS $RELEASEARGS $BUILD_ROOT$TOPDIR/SOURCES $BUILD_ROOT$TOPDIR/SOURCES/$RECIPEFILE $BUILD_ROOT$TOPDIR/SOURCES.DEB ; then echo "debian transforming failed." cleanup_and_exit 1 fi @@ -59,19 +66,19 @@ for DEB_DSCFILE in $BUILD_ROOT/$DEB_SOURCEDIR/*.dsc ; do : ; done DEB_DSCFILE="${DEB_DSCFILE##*/}" fi - $CHROOT su -c "dpkg-source -x $DEB_SOURCEDIR/$DEB_DSCFILE $TOPDIR/BUILD" - $BUILD_USER + chroot $BUILD_ROOT su -c "dpkg-source -x $DEB_SOURCEDIR/$DEB_DSCFILE $TOPDIR/BUILD" - $BUILD_USER } recipe_build_dsc() { + DSC_BUILD_OPTIONS= + if test -n "$BUILD_JOBS" ; then + DSC_BUILD_OPTIONS="parallel=${BUILD_JOBS}" + fi # 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 - # Debian policy requires to build with single CPU by default - # if test -n "$BUILD_JOBS" ; then - # DSC_BUILD_JOBS="-j$BUILD_JOBS" - # fi DSC_BUILD_CMD="$(queryconfig --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" substitute dsc:build_cmd)" - test -z "$DSC_BUILD_CMD" && DSC_BUILD_CMD="dpkg-buildpackage -us -uc $DSC_BUILD_JOBS" + test -z "$DSC_BUILD_CMD" && DSC_BUILD_CMD="dpkg-buildpackage -us -uc" if test -e $BUILD_ROOT/$TOPDIR/SOURCES/build.script ; then echo "Sourcing build.script to build - it should normally run 'dpkg-buildpackage -us -uc'" DSC_BUILD_CMD="source $TOPDIR/SOURCES/build.script" @@ -79,12 +86,12 @@ fi if test -n "$RUN_SHELL"; then - $CHROOT su - + chroot $BUILD_ROOT su - else - $CHROOT su -c "cd $TOPDIR/BUILD && $DSC_BUILD_CMD" - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true + chroot $BUILD_ROOT su -c "export DEB_BUILD_OPTIONS=${DSC_BUILD_OPTIONS} ; cd $TOPDIR/BUILD && $DSC_BUILD_CMD" - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true if test "$BUILD_SUCCEEDED" = true -a "$DO_CHECKS" != "false"; then - DEB_CHANGESFILE=${RECIPEFILE%.dsc}_"$($CHROOT su -c 'dpkg-architecture -qDEB_BUILD_ARCH')".changes - $CHROOT su -c "which lintian > /dev/null && cd $TOPDIR && echo Running lintian && (set -x && lintian -i $DEB_SOURCEDIR/$DEB_DSCFILE)" - $BUILD_USER < /dev/null + DEB_CHANGESFILE=${RECIPEFILE%.dsc}_"$(chroot $BUILD_ROOT su -c 'dpkg-architecture -qDEB_BUILD_ARCH')".changes + chroot $BUILD_ROOT su -c "which lintian > /dev/null && cd $TOPDIR && echo Running lintian && (set -x && lintian -i $DEB_SOURCEDIR/$DEB_DSCFILE)" - $BUILD_USER < /dev/null fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-recipe-kiwi new/obs-build-20141120/build-recipe-kiwi --- old/obs-build-20141024/build-recipe-kiwi 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-recipe-kiwi 2014-11-24 16:45:30.000000000 +0100 @@ -294,7 +294,7 @@ i="${i##*/}" test "$i" = scripts && continue test "$i" != "${i%0}" && continue - $CHROOT su -c "suse-isolinux $TOPDIR/KIWIROOT/main/$i $TOPDIR/KIWI/$i.iso" - $BUILD_USER + chroot $BUILD_ROOT su -c "suse-isolinux $TOPDIR/KIWIROOT/main/$i $TOPDIR/KIWI/$i.iso" - $BUILD_USER done } @@ -347,12 +347,12 @@ for imgtype in $imagetype ; do echo "running kiwi --prepare for $imgtype..." # Do not use $BUILD_USER here, since we always need root permissions - $CHROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype $KIWI_PARAMETERS" - root < /dev/null || cleanup_and_exit 1 + chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && rm -rf $TOPDIR/KIWIROOT-$imgtype && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype $KIWI_PARAMETERS" - root < /dev/null || cleanup_and_exit 1 echo "running kiwi --create for $imgtype..." mkdir -p $BUILD_ROOT/$TOPDIR/KIWI-$imgtype - $CHROOT su -c "cd $TOPDIR/SOURCES && kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype $KIWI_PARAMETERS" - root < /dev/null || cleanup_and_exit 1 + chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype $KIWI_PARAMETERS" - root < /dev/null || cleanup_and_exit 1 rm -rf "/$TOPDIR/KIWI.bundle" - if $CHROOT su -c "kiwi --bundle-build $TOPDIR/KIWI-$imgtype -d /$TOPDIR/KIWI.bundle/ --bundle-id Build$RELEASE" - root < /dev/null; then + if chroot $BUILD_ROOT su -c "kiwi --bundle-build $TOPDIR/KIWI-$imgtype -d /$TOPDIR/KIWI.bundle/ --bundle-id Build$RELEASE" - root < /dev/null; then mv "$BUILD_ROOT/$TOPDIR/KIWI.bundle/"* "$BUILD_ROOT/$TOPDIR/KIWI/" || cleanup_and_exit 1 rmdir "$BUILD_ROOT/$TOPDIR/KIWI.bundle" unset RUN_BUNDLE @@ -401,7 +401,7 @@ cp "$imageout.verified" "/$TOPDIR/OTHER/$imageout$buildnum-$imgtype.verified" fi EOF - $CHROOT su -c "sh -e /kiwi_post.sh" || cleanup_and_exit 1 + chroot $BUILD_ROOT su -c "sh -e /kiwi_post.sh" || cleanup_and_exit 1 rm -f $BUILD_ROOT/kiwi_post.sh done } @@ -430,10 +430,10 @@ fi if test "$imagetype" != product -a "$DO_INIT" != "false" ; then echo "creating repodata for $repo" - if $CHROOT createrepo --no-database --simple-md-filenames --help >/dev/null 2>&1 ; then - $CHROOT createrepo --no-database --simple-md-filenames "$repo" + if chroot $BUILD_ROOT createrepo --no-database --simple-md-filenames --help >/dev/null 2>&1 ; then + chroot $BUILD_ROOT createrepo --no-database --simple-md-filenames "$repo" else - $CHROOT createrepo "$repo" + chroot $BUILD_ROOT createrepo "$repo" fi fi done @@ -442,7 +442,7 @@ for t in $BUILD_ROOT/$TOPDIR/SOURCES/root.tar* ; do test -f $t || continue mkdir -p $BUILD_ROOT/$TOPDIR/SOURCES/root - $CHROOT tar -C $TOPDIR/SOURCES/root -xf "$TOPDIR/SOURCES/${t##*/}" + chroot $BUILD_ROOT tar -C $TOPDIR/SOURCES/root -xf "$TOPDIR/SOURCES/${t##*/}" done # fix script permissions @@ -458,7 +458,7 @@ for t in $r/root.tar* ; do test -f $t || continue mkdir -p $r/root - $CHROOT tar -C $TOPDIR/SOURCES/images/$r/root -xf "$TOPDIR/SOURCES/images/$r/${t##*/}" + chroot $BUILD_ROOT tar -C $TOPDIR/SOURCES/images/$r/root -xf "$TOPDIR/SOURCES/images/$r/${t##*/}" done # fix script permissions chmod a+x $BUILD_ROOT/$TOPDIR/SOURCES/images/$r/*.sh 2>/dev/null @@ -485,7 +485,7 @@ # 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 su -c /usr/lib/build/kiwi_post_run || cleanup_and_exit 1 + chroot $BUILD_ROOT su -c /usr/lib/build/kiwi_post_run || cleanup_and_exit 1 fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-recipe-livebuild new/obs-build-20141120/build-recipe-livebuild --- old/obs-build-20141024/build-recipe-livebuild 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-recipe-livebuild 2014-11-24 16:45:30.000000000 +0100 @@ -72,7 +72,7 @@ gzip -c9 dists/${DIST}/main/source/Sources \ > dists/${DIST}/main/source/Sources.gz EOF - $CHROOT su -c "sh /.createrepo_debian.tmp.sh" - root + chroot $BUILD_ROOT su -c "sh /.createrepo_debian.tmp.sh" - root local RESULT=$? rm -f $BUILD_ROOT/.createrepo_debian.tmp.sh [ "${RESULT}" != 0 ] && return @@ -117,8 +117,8 @@ # $RECIPEFILE the name of the live-build config tarball recipe_build_livebuild() { - local ARCH=$($CHROOT su -c "dpkg-architecture -qDEB_BUILD_ARCH") - local DIST=$($CHROOT su -c "lsb_release --codename" | awk '{ print $2 }') + local ARCH=$(chroot $BUILD_ROOT su -c "dpkg-architecture -qDEB_BUILD_ARCH") + local DIST=$(chroot $BUILD_ROOT su -c "lsb_release --codename" | awk '{ print $2 }') local LIVEBUILD_ROOT="LIVEBUILD_ROOT" [ -z "${ARCH}" -o -z "${DIST}" ] && cleanup_and_exit 1 @@ -177,7 +177,7 @@ if [ -x $BUILD_ROOT/usr/lib/build/livebuild_pre_run ] ; then echo "Running OBS build livebuild_pre_run hook" - $CHROOT su -c "/usr/lib/build/livebuild_pre_run" - root \ + chroot $BUILD_ROOT su -c "/usr/lib/build/livebuild_pre_run" - root \ < /dev/null || cleanup_and_exit 1 fi @@ -187,11 +187,11 @@ $BUILD_ROOT/.build.livebuild_pre_run chmod +x $BUILD_ROOT/.build.livebuild_pre_run echo "Running package livebuild_pre_run hook" - $CHROOT su -c "/.build.livebuild_pre_run" - root \ + chroot $BUILD_ROOT su -c "/.build.livebuild_pre_run" - root \ < /dev/null || cleanup_and_exit 1 fi - $CHROOT su -c "cd $TOPDIR/$LIVEBUILD_ROOT && lb build" - root \ + chroot $BUILD_ROOT su -c "cd $TOPDIR/$LIVEBUILD_ROOT && lb build" - root \ < /dev/null || cleanup_and_exit 1 # Move created product to destination diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-recipe-mock new/obs-build-20141120/build-recipe-mock --- old/obs-build-20141024/build-recipe-mock 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-recipe-mock 2014-11-24 16:45:30.000000000 +0100 @@ -33,7 +33,7 @@ test -d $BUILD_ROOT/.build.binaries || cleanup_and_exit 1 if test "$DO_INIT" = true -o ! -d "$BUILD_ROOT/.build.binaries/repodata" ; then echo "creating repository for mock..." - $CHROOT createrepo --no-database --basedir /.build.binaries -o /.build.binaries /.build.binaries + chroot $BUILD_ROOT createrepo --no-database --basedir /.build.binaries -o /.build.binaries /.build.binaries fi MOCK_CHROOT_SETUP_CMD="$(queryconfig --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" substitute mock:chroot_setup_cmd)" test -z "$MOCK_CHROOT_SETUP_CMD" && MOCK_CHROOT_SETUP_CMD="groupinstall buildsys-build" @@ -64,7 +64,7 @@ echo "building src rpm..." MOCK_INIT_ARG= test "$DO_INIT" = true || MOCK_INIT_ARG=--no-clean - if $CHROOT /usr/bin/mock -r build $MOCK_INIT_ARG --buildsrpm --spec "$TOPDIR/SOURCES/$RECIPEFILE" --sources "$TOPDIR/SOURCES" ; then + if chroot $BUILD_ROOT /usr/bin/mock -r build $MOCK_INIT_ARG --buildsrpm --spec "$TOPDIR/SOURCES/$RECIPEFILE" --sources "$TOPDIR/SOURCES" ; then BUILT_SRPM= for i in "$BUILD_ROOT/var/lib/mock/build/result/"*src.rpm ; do test -s "$i" && BUILT_SRPM="${i##*/}" @@ -73,7 +73,7 @@ mkdir -p "$BUILD_ROOT/$TOPDIR/SRPMS" mv "$BUILD_ROOT/var/lib/mock/build/result/$BUILT_SRPM" "$BUILD_ROOT/$TOPDIR/SRPMS/$BUILT_SRPM" echo "building binary rpms..." - if $CHROOT /usr/bin/mock -v -r build --rebuild --no-clean "$TOPDIR/SRPMS/$BUILT_SRPM" ; then + if chroot $BUILD_ROOT /usr/bin/mock -v -r build --rebuild --no-clean "$TOPDIR/SRPMS/$BUILT_SRPM" ; then BUILD_SUCCEEDED=true # move result over to TOPDIR rm -f "$TOPDIR/SRPMS/$BUILT_SRPM" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-recipe-spec new/obs-build-20141120/build-recipe-spec --- old/obs-build-20141024/build-recipe-spec 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-recipe-spec 2014-11-24 16:45:30.000000000 +0100 @@ -22,7 +22,7 @@ ################################################################ recipe_setup_spec() { - TOPDIR=`$CHROOT su -c "rpm --eval '%_topdir'" - $BUILD_USER` + TOPDIR=`chroot $BUILD_ROOT su -c "rpm --eval '%_topdir'" - $BUILD_USER` if test -z "$TOPDIR"; then echo "Error: TOPDIR empty" cleanup_and_exit 1 @@ -142,9 +142,9 @@ chmod 755 $BUILD_ROOT/.build.command check_exit if test -n "$RUN_SHELL"; then - $CHROOT su - + chroot $BUILD_ROOT su - else - $CHROOT su -c /.build.command - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true + chroot $BUILD_ROOT su -c /.build.command - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true fi } @@ -199,7 +199,7 @@ rm -f "$BUILD_ROOT$rpmlint_logfile" ret=0 mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null - $CHROOT su -s /opt/testing/bin/rpmlint "$BUILD_USER" -- \ + chroot $BUILD_ROOT su -s /opt/testing/bin/rpmlint "$BUILD_USER" -- \ --info ${LINT_RPM_FILE_LIST[*]#$BUILD_ROOT} \ ${SRPM_FILE_LIST[*]#$BUILD_ROOT} > "$BUILD_ROOT$rpmlint_logfile" || ret=1 cat "$BUILD_ROOT$rpmlint_logfile" @@ -214,8 +214,8 @@ if test -x "$BUILD_ROOT/usr/lib/build/same-build-result.sh" ; then echo "... comparing built packages with the former built" mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null - if $CHROOT /usr/lib/build/same-build-result.sh /.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS"; then - $CHROOT touch /.build/.same_result_marker + if chroot $BUILD_ROOT /usr/lib/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 if test -n "$REASON" -a -n "$DISTURL" ; then @@ -230,6 +230,6 @@ if test -x "$BUILD_ROOT/usr/bin/makedeltarpm" -a -x $BUILD_ROOT/usr/lib/build/mkdrpms ; then echo "... creating delta rpms" ds=("$BUILD_ROOT/$TOPDIR"/RPMS/* "$BUILD_ROOT$TOPDIR/SRPMS") - $CHROOT /usr/lib/build/mkdrpms /.build.oldpackages "${ds[@]#$BUILD_ROOT}" + chroot $BUILD_ROOT /usr/lib/build/mkdrpms /.build.oldpackages "${ds[@]#$BUILD_ROOT}" fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/build-vm new/obs-build-20141120/build-vm --- old/obs-build-20141024/build-vm 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/build-vm 2014-11-24 16:45:30.000000000 +0100 @@ -427,7 +427,6 @@ test -n "$VM_WATCHDOG" -a -z "$PERSONALITY_SET" && echo "### WATCHDOG MARKER END ###" echo "2nd stage started in virtual machine" BUILD_ROOT=/ - unset CHROOT BUILD_DIR=/.build echo "machine type: `uname -m`" if test "$PERSONALITY" != 0 -a -z "$PERSONALITY_SET" ; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/debtransform new/obs-build-20141120/debtransform --- old/obs-build-20141024/debtransform 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/debtransform 2014-11-24 16:45:30.000000000 +0100 @@ -23,6 +23,11 @@ use strict; use Digest::MD5; +sub usage +{ + die("usage: debtransform [--debug] [--changelog <changelog>] [--release <release number>] <srcdir> <dscfile> <outdir>\n"); +} + sub parsedsc { my ($fn) = @_; my @control; @@ -231,13 +236,30 @@ return "$md5 $size $base"; } +print "debtransform: ", join( " ", @ARGV ), "\n"; + +my $debug = 0; my $changelog; +my $release; + +while (@ARGV > 3) { + if ($ARGV[0] eq '--debug') { + shift @ARGV; + $debug = 1; + } elsif ($ARGV[0] eq '--changelog') { + shift @ARGV; + $changelog = shift @ARGV; + } elsif ($ARGV[0] eq '--release') { + shift @ARGV; + $release = shift @ARGV; + } else { + usage(); + } +} -if (@ARGV > 1 && $ARGV[0] eq '--changelog') { - shift @ARGV; - $changelog = shift @ARGV; +if( @ARGV != 3 ) { + usage(); } -die("usage: debtransform [--changelog <changelog>] <srcdir> <dscfile> <outdir>\n") unless @ARGV == 3; my $dir = $ARGV[0]; my $dsc = $ARGV[1]; @@ -283,6 +305,7 @@ 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/) { @@ -320,6 +343,18 @@ } push @files, addfile("$out/$ntarfile"); +if ( $tags->{'DEBTRANSFORM-RELEASE'} && $release ) { + # if dsc file contains the tag DEBTRANSFORM-RELEASE + # and "release" is given as a commad line parameter, + # replace "version" from dsc file by "version-release". + # From "version" the current release is stripped before + # (last "-" and the part after the last "-"). + # On OBS, release is incremented automatically + # (same as for RPMs) + $version = $v . "-" . $release; + $tags->{'VERSION'} = $version; +} + my $tarpath = "$out/$ntarfile"; my $tardir = $tarfile; $tardir =~ s/\.orig\.tar/\.tar/; @@ -388,5 +423,13 @@ delete $tags->{'DEBTRANSFORM-TAR'}; delete $tags->{'DEBTRANSFORM-FILES-TAR'}; delete $tags->{'DEBTRANSFORM-FILES'}; +delete $tags->{'DEBTRANSFORM-RELEASE'}; writedsc("$out/${name}_$version.dsc", $tags); + +if( $debug ) { + print `ls -la $out`; + print `cat $out/${name}_$version.dsc`; + print `zcat $out/${name}_$version.diff.gz`; +} + exit(0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/init_buildsystem new/obs-build-20141120/init_buildsystem --- old/obs-build-20141024/init_buildsystem 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/init_buildsystem 2014-11-24 16:45:30.000000000 +0100 @@ -37,6 +37,7 @@ # slurp in package binary support . "$BUILD_DIR/build-pkg" + # need to restore build root owner for non-root builds browner=0 definesnstuff=() @@ -208,7 +209,7 @@ } run_pkg_scripts() { - $CHROOT /sbin/ldconfig 2>/dev/null + chroot $BUILD_ROOT /sbin/ldconfig 2>/dev/null for PKG in $PACKAGES_TO_RUNSCRIPTS ; do pkg_runscripts check_exit @@ -842,7 +843,7 @@ rm -rf "$BUILD_ROOT/installed-pkg" mkdir -p "$BUILD_ROOT/installed-pkg" -test -x $BUILD_ROOT/sbin/ldconfig && $CHROOT /sbin/ldconfig 2>&1 +test -x $BUILD_ROOT/sbin/ldconfig && chroot $BUILD_ROOT /sbin/ldconfig 2>&1 MAIN_LIST="$PACKAGES_TO_INSTALL" progress_setup MAIN_LIST @@ -962,12 +963,12 @@ echo now finalizing build dir... if test -x $BUILD_ROOT/sbin/ldconfig ; then - CHROOT_RETURN="`$CHROOT /sbin/ldconfig 2>&1`" + CHROOT_RETURN="`chroot $BUILD_ROOT /sbin/ldconfig 2>&1`" case "$CHROOT_RETURN" in *warning:*) - $CHROOT /sbin/ldconfig + chroot $BUILD_ROOT /sbin/ldconfig echo - echo $CHROOT /sbin/ldconfig + echo chroot $BUILD_ROOT /sbin/ldconfig echo echo "$CHROOT_RETURN" echo @@ -979,7 +980,7 @@ fi if test -x $BUILD_ROOT/usr/sbin/Check && ! grep -q "/usr/sbin/Check is obsolete" $BUILD_ROOT/usr/sbin/Check ; then - $CHROOT /usr/sbin/Check + chroot $BUILD_ROOT /usr/sbin/Check fi mkdir -p $BUILD_ROOT/var/adm/packages @@ -987,24 +988,24 @@ if test -x $BUILD_ROOT/sbin/SuSEconfig ; then if grep norestarts $BUILD_ROOT/sbin/SuSEconfig > /dev/null ; then - $CHROOT /sbin/SuSEconfig --norestarts --force + chroot $BUILD_ROOT /sbin/SuSEconfig --norestarts --force else - $CHROOT /sbin/SuSEconfig --force + chroot $BUILD_ROOT /sbin/SuSEconfig --force fi fi if test -x $BUILD_ROOT/usr/X11R6/bin/switch2mesasoft ; then - $CHROOT /usr/X11R6/bin/switch2mesasoft + chroot $BUILD_ROOT /usr/X11R6/bin/switch2mesasoft fi for PROG in /usr/bin/TeX/texhash /usr/bin/texhash ; do test -x $BUILD_ROOT/$PROG && \ - $CHROOT bash -c ". /etc/profile ; $PROG" + chroot $BUILD_ROOT bash -c ". /etc/profile ; $PROG" done if test -e $BUILD_ROOT/usr/share/zoneinfo/UTC ; then for PROG in /usr/sbin/zic /usr/bin/zic /bin/zic /sbin/zic ; do - test -x $BUILD_ROOT/$PROG && $CHROOT bash -c "$PROG -l $(readlink -f /usr/share/zoneinfo/UTC)" + test -x $BUILD_ROOT/$PROG && chroot $BUILD_ROOT bash -c "$PROG -l $(readlink -f /usr/share/zoneinfo/UTC)" done fi @@ -1021,7 +1022,7 @@ # XXX: still needed? if test -x $BUILD_ROOT/bin/rpm -a ! -f $BUILD_ROOT/var/lib/rpm/packages.rpm -a ! -f $BUILD_ROOT/var/lib/rpm/Packages ; then pkg_initdb_rpm - $CHROOT rpm -q --whatprovides rpm >/dev/null 2>&1 # create provides index + chroot $BUILD_ROOT rpm -q --whatprovides rpm >/dev/null 2>&1 # create provides index fi rm -f $BUILD_ROOT/.rpmmacros $BUILD_ROOT/root/.rpmmacros diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20141024/substitutedeps new/obs-build-20141120/substitutedeps --- old/obs-build-20141024/substitutedeps 2014-10-27 10:01:49.000000000 +0100 +++ new/obs-build-20141120/substitutedeps 2014-11-24 16:45:30.000000000 +0100 @@ -164,6 +164,37 @@ $line =~ s/<CI_CNT>/0/; $line =~ s/<B_CNT>/0/; } + + if ($cf->{'releasesuffix'}) { + my $suffix = $cf->{'releasesuffix'}; + if ($suffix =~ /^file:(.+)$/) { + my $file = $1; + if ($file =~ /\//s || $file =~ /^\./) { + $suffix = "error:illegal release suffix"; + } else { + if (open(RP, '<', "$specdir$file")) { + $suffix = "error:no suffix in $file"; + for (<RP>) { + chomp; + s/^\s+//; + s/\s+$//; + $suffix = $_ if $_ && !/^#/; + } + close RP; + } else { + $suffix = "error:$file file does not exist"; + } + } + } + if ($suffix =~ /^error:(.*)$/) { + $suffix = $1; + $suffix =~ s/^\s+//; + $suffix =~ s/\s+$//; + $suffix = "Error: $suffix"; + } + $line =~ s/^(Release\s*:\s*.*?)\s*$/$1$suffix/i if $suffix; + } + # this is to be compatible to legacy autobuild. # you can specify a releaseprg in the project configuration, # if your package contains this file it is executed and its -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
