Hello community,

here is the log from the commit of package build for openSUSE:Factory checked 
in at 2015-10-06 13:22:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2015-09-03 
17:58:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.build.new/build.changes 2015-10-06 
13:22:53.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Sep 17 10:45:57 UTC 2015 - adr...@suse.de
+
+- collax support added
+- Fix auto-detection of -p1 option to patch
+- Handle .deb files that have sysv ar(1) filenames
+- Exported RECIPEFILE in build-recipe-livebuild
+
+-------------------------------------------------------------------

Old:
----
  obs-build-20150903.tar.gz

New:
----
  obs-build-20150917.tar.gz

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

Other differences:
------------------
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.98H5oD/_old  2015-10-06 13:22:54.000000000 +0200
+++ /var/tmp/diff_new_pack.98H5oD/_new  2015-10-06 13:22:54.000000000 +0200
@@ -22,7 +22,7 @@
 Summary:        A Script to Build SUSE Linux RPMs
 License:        GPL-2.0+ and GPL-2.0
 Group:          Development/Tools/Building
-Version:        20150903
+Version:        20150917
 Release:        0
 Source:         obs-build-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -38,6 +38,7 @@
 Requires:       binutils
 Requires:       perl
 Requires:       tar
+Requires:       perl(parent)
 %if 0%{?fedora}
 Requires:       perl-MD5
 Requires:       perl-TimeDate

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.98H5oD/_old  2015-10-06 13:22:54.000000000 +0200
+++ /var/tmp/diff_new_pack.98H5oD/_new  2015-10-06 13:22:54.000000000 +0200
@@ -1,5 +1,5 @@
 pkgname=build
-pkgver=20150903
+pkgver=20150917
 pkgrel=0
 pkgdesc="Build packages in sandbox"
 arch=('i686' 'x86_64')

++++++ build.dsc ++++++
--- /var/tmp/diff_new_pack.98H5oD/_old  2015-10-06 13:22:54.000000000 +0200
+++ /var/tmp/diff_new_pack.98H5oD/_new  2015-10-06 13:22:54.000000000 +0200
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: build
-Version: 20150903
+Version: 20150917
 Binary: build
 Maintainer: Adrian Schroeter <adr...@suse.de>
 Architecture: all

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.98H5oD/_old  2015-10-06 13:22:54.000000000 +0200
+++ /var/tmp/diff_new_pack.98H5oD/_new  2015-10-06 13:22:54.000000000 +0200
@@ -1,4 +1,4 @@
-build (20150903) unstable; urgency=low
+build (20150917) unstable; urgency=low
 
   * Update to current git trunk
     - add sles11sp2 build config and adapt autodetection

++++++ obs-build-20150903.tar.gz -> obs-build-20150917.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/Build/Collax.pm 
new/obs-build-20150917/Build/Collax.pm
--- old/obs-build-20150903/Build/Collax.pm      1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-build-20150917/Build/Collax.pm      2015-09-17 12:45:53.000000000 
+0200
@@ -0,0 +1,64 @@
+#
+# Copyright 2015  Zarafa B.V. and its licensors
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+package Build::Collax;
+
+use strict;
+
+sub parse {
+       my($buildconf, $fn) = @_;
+       my @bscript;
+
+       if (ref($fn) eq "ARRAY") {
+               @bscript = @$fn;
+               $fn = undef;
+       } elsif (ref($fn) ne "") {
+               die "Unhandled ref type in collax";
+       } else {
+               local *FH;
+               if (!open(FH, "<", $fn)) {
+                       return {"error" => "$fn: $!"};
+               }
+               @bscript = <FH>;
+               chomp(@bscript);
+               close(FH);
+       }
+
+       my $ret = {"deps" => []};
+       for (my $i = 0; $i <= $#bscript; ++$i) {
+               next unless $bscript[$i] =~ m{^\w+=};
+               my $key = lc(substr($&, 0, -1));
+               my $value = $';
+               if ($value =~ m{^([\'\"])}) {
+                       $value = substr($value, 1);
+                       while ($value !~ m{[\'\"]}) {
+                               my @cut = splice(@bscript, $i + 1, 1);
+                               $value .= $cut[0];
+                       }
+                       $value =~ s{[\'\"]}{}s;
+                       $value =~ s{\n}{ }gs;
+               }
+               if ($key eq "package") {
+                       $ret->{"name"} = $value;
+               } elsif ($key eq "version") {
+                       $ret->{$key} = $value;
+               } elsif ($key eq "builddepends" || $key eq "extradepends") {
+                       $value =~ s{^\s+}{}gs;
+                       $value =~ s{\s+$}{}gs;
+                       $value =~ s{,}{ }gs;
+                       push(@{$ret->{"deps"}}, split(/\s+/, $value));
+               }
+       }
+       return $ret;
+}
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/Build/Deb.pm 
new/obs-build-20150917/Build/Deb.pm
--- old/obs-build-20150903/Build/Deb.pm 2015-09-03 11:25:16.000000000 +0200
+++ new/obs-build-20150917/Build/Deb.pm 2015-09-17 12:45:53.000000000 +0200
@@ -211,11 +211,12 @@
   my $data = '';
   sysread(DEBF, $data, 4096);
   if (length($data) < 8+60) {
-    warn("$fn: not a debian package\n");
+    warn("$fn: not a debian package - header too short\n");
     close DEBF unless ref $fn;
     return ();
   }
-  if (substr($data, 0, 8+16) ne "!<arch>\ndebian-binary   ") {
+  if (substr($data, 0, 8+16) ne "!<arch>\ndebian-binary   " &&
+      substr($data, 0, 8+16) ne "!<arch>\ndebian-binary/  ") {
     close DEBF unless ref $fn;
     return ();
   }
@@ -231,7 +232,8 @@
     }
   }
   $data = substr($data, 8 + 60 + $len);
-  if (substr($data, 0, 16) ne 'control.tar.gz  ') {
+  if (substr($data, 0, 16) ne 'control.tar.gz  ' &&
+      substr($data, 0, 16) ne 'control.tar.gz/ ') {
     warn("$fn: control.tar.gz is not second ar entry\n");
     close DEBF unless ref $fn;
     return ();
@@ -267,7 +269,7 @@
       warn("$fn: corrupt control.tar.gz file\n");
       return ();
     }
-    if ($n eq './control') {
+    if ($n eq './control' || $n eq "control") {
       $control = substr($data, 512, $len);
       last;
     }
@@ -343,12 +345,13 @@
   my $data = '';
   sysread(F, $data, 4096);
   if (length($data) < 8+60) {
-    warn("$bin: not a debian package\n");
+    warn("$bin: not a debian package - header too short\n");
     close F;
     return undef;
   }
-  if (substr($data, 0, 8+16) ne "!<arch>\ndebian-binary   ") {
-    warn("$bin: not a debian package\n");
+  if (substr($data, 0, 8+16) ne "!<arch>\ndebian-binary   " &&
+      substr($data, 0, 8+16) ne "!<arch>\ndebian-binary/  ") {
+    warn("$bin: not a debian package - no \"debian-binary\" entry\n");
     close F;
     return undef;
   }
@@ -364,7 +367,8 @@
     }
   }
   $data = substr($data, 8 + 60 + $len);
-  if (substr($data, 0, 16) ne 'control.tar.gz  ') {
+  if (substr($data, 0, 16) ne 'control.tar.gz  ' &&
+      substr($data, 0, 16) ne 'control.tar.gz/ ') {
     warn("$bin: control.tar.gz is not second ar entry\n");
     close F;
     return undef;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/Build.pm 
new/obs-build-20150917/Build.pm
--- old/obs-build-20150903/Build.pm     2015-09-03 11:25:16.000000000 +0200
+++ new/obs-build-20150917/Build.pm     2015-09-17 12:45:53.000000000 +0200
@@ -32,6 +32,7 @@
 our $do_deb;
 our $do_kiwi;
 our $do_arch;
+our $do_collax;
 our $do_livebuild;
 
 sub import {
@@ -40,9 +41,10 @@
     $do_deb = 1 if $_ eq ':deb';
     $do_kiwi = 1 if $_ eq ':kiwi';
     $do_arch = 1 if $_ eq ':arch';
+    $do_collax = 1 if $_ eq ':collax';
     $do_livebuild = 1 if $_ eq ':livebuild';
   }
-  $do_rpm = $do_deb = $do_kiwi = $do_arch = $do_livebuild = 1 if !$do_rpm && 
!$do_deb && !$do_kiwi && !$do_arch && !$do_livebuild;
+  $do_rpm = $do_deb = $do_kiwi = $do_arch = $do_collax = $do_livebuild = 1 if 
!$do_rpm && !$do_deb && !$do_kiwi && !$do_arch && !$do_collax && !$do_livebuild;
   if ($do_deb) {
     require Build::Deb;
   }
@@ -52,6 +54,9 @@
   if ($do_arch) {
     require Build::Arch;
   }
+  if ($do_collax) {
+    require Build::Collax;
+  }
   if ($do_livebuild) {
     require Build::LiveBuild;
   }
@@ -1222,6 +1227,7 @@
   $recipe =~ s/.*\///;
   $recipe =~ s/^_service:.*://;
   return 'arch' if $recipe eq 'PKGBUILD';
+  return 'collax' if $recipe eq 'build.collax';
   return 'preinstallimage' if $recipe eq '_preinstallimage';
   return 'simpleimage' if $recipe eq 'simpleimage';
   return undef;
@@ -1270,6 +1276,7 @@
   $fnx =~ s/^[0-9a-f]{32,}-//; # hack for OBS srcrep implementation
   $fnx =~ s/^_service:.*://;
   return Build::Arch::parse($cf, $fn, @args) if $do_arch && $fnx eq 'PKGBUILD';
+  return Build::Collax::parse($cf, $fn, @args) if $do_collax && $fnx eq 
'build.collax';
   return parse_preinstallimage($cf, $fn, @args) if $fnx eq '_preinstallimage';
   return undef;
 }
@@ -1283,6 +1290,7 @@
   return Build::LiveBuild::parse($cf, $fn, @args) if $do_livebuild && 
$buildtype eq 'livebuild';
   return parse_simpleimage($cf, $fn, @args) if $buildtype eq 'simpleimage';
   return Build::Arch::parse($cf, $fn, @args) if $do_arch && $buildtype eq 
'arch';
+  return Build::Collax::parse($cf, $fn, @args) if $do_collax && $buildtype eq 
'collax';
   return parse_preinstallimage($cf, $fn, @args) if $buildtype eq 
'preinstallimage';
   return undef;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/build new/obs-build-20150917/build
--- old/obs-build-20150903/build        2015-09-03 11:25:16.000000000 +0200
+++ new/obs-build-20150917/build        2015-09-17 12:45:53.000000000 +0200
@@ -514,7 +514,7 @@
 
     BASELIBS_CFG=
 
-    if test "$BUILDTYPE" == arch ; then
+    if test "$BUILDTYPE" == arch || test "$BUILDTYPE" = collax ; then
        return
     fi
     if test "$BUILDTYPE" == dsc ; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/build-recipe 
new/obs-build-20150917/build-recipe
--- old/obs-build-20150903/build-recipe 2015-09-03 11:25:16.000000000 +0200
+++ new/obs-build-20150917/build-recipe 2015-09-17 12:45:53.000000000 +0200
@@ -24,7 +24,7 @@
 
 KIWI_PARAMETERS=
 
-for i in spec dsc kiwi arch preinstallimage simpleimage mock livebuild 
debootstrap debbuild; do
+for i in spec dsc kiwi arch collax preinstallimage simpleimage mock livebuild 
debootstrap debbuild; do
     . "$BUILD_DIR/build-recipe-$i"
 done
 
@@ -72,6 +72,7 @@
         *.dsc) BUILDTYPE=dsc ;;
         *.kiwi) BUILDTYPE=kiwi ;;
         PKGBUILD) BUILDTYPE=arch ;;
+        build.collax) BUILDTYPE=collax ;;
         _preinstallimage) BUILDTYPE=preinstallimage ;;
         simpleimage) BUILDTYPE=simpleimage ;;
         *.livebuild) BUILDTYPE=livebuild ;;
@@ -119,10 +120,11 @@
                        dsc) types=".dsc" ;;
                        kiwi) types=".kiwi" ;;
                        arch) types="PKGBUILD" ;;
+                       collax) types="build.collax" ;;
                        livebuild) types=".livebuild" ;;
                    esac
                fi
-               types="$types .spec .dsc PKGBUILD .kiwi .src.rpm .nosrc.rpm 
simpleimage"
+               types="$types .spec .dsc PKGBUILD build.collax .kiwi .src.rpm 
.nosrc.rpm simpleimage"
            fi
            for t in $types ; do
                found=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/build-recipe-collax 
new/obs-build-20150917/build-recipe-collax
--- old/obs-build-20150903/build-recipe-collax  1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-build-20150917/build-recipe-collax  2015-09-17 12:45:53.000000000 
+0200
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+recipe_setup_collax()
+{
+       TOPDIR="/usr/src/packages"
+       test "$DO_INIT_TOPDIR" != false && rm -Rf "$BUILD_ROOT/$TOPDIR"
+       mkdir -p "$BUILD_ROOT/$TOPDIR"/{SOURCES,SOURCES.DEB,DEBS,OTHER}
+       cp -p "$MYSRCDIR"/* "$BUILD_ROOT/$TOPDIR/SOURCES/"
+       chown -R "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT/$TOPDIR"
+}
+
+recipe_prepare_collax()
+{
+       DEB_SOURCEDIR="$TOPDIR/SOURCES"
+       DEB_DSCFILE="$RECIPEFILE"
+       chmod -v +x "$BUILD_ROOT/$DEB_SOURCEDIR/build.collax"
+       ln -fsv build.collax "$BUILD_ROOT/$DEB_SOURCEDIR/build"
+}
+
+collax_build()
+{
+       local buildroot="$1"
+
+       if test -n "$RUN_SHELL"; then
+               chroot "$buildroot" su -
+               ret=$?
+       else
+               chroot "$buildroot" su - $BUILD_USER -c \
+                       "cd $TOPDIR/SOURCES && ./build"
+               ret=$?
+       fi
+       if test "$ret" = 0; then
+               BUILD_SUCCEEDED=true
+       fi
+}
+
+collax_move_build_result()
+{
+       for f in "$BUILD_ROOT/$DEB_SOURCEDIR"/*.{deb,changes}; do
+               test -f "$f" && mv -v "$f" "$BUILD_ROOT/$TOPDIR/DEBS/"
+       done
+}
+
+recipe_build_collax()
+{
+       collax_build "$BUILD_ROOT"
+       collax_move_build_result
+}
+
+recipe_resultdirs_collax()
+{
+       echo DEBS
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/build-recipe-livebuild 
new/obs-build-20150917/build-recipe-livebuild
--- old/obs-build-20150903/build-recipe-livebuild       2015-09-03 
11:25:16.000000000 +0200
+++ new/obs-build-20150917/build-recipe-livebuild       2015-09-17 
12:45:53.000000000 +0200
@@ -180,8 +180,9 @@
 
     if [ -x $BUILD_ROOT/usr/lib/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 \
-           < /dev/null || cleanup_and_exit 1
+       chroot $BUILD_ROOT su -c \
+        "export RECIPEFILE=${RECIPEFILE}; /usr/lib/build/livebuild_pre_run" \
+        - root < /dev/null || cleanup_and_exit 1
     fi
 
     # TODO: this might move to lb auto/config file
@@ -190,8 +191,9 @@
            $BUILD_ROOT/.build.livebuild_pre_run
        chmod +x $BUILD_ROOT/.build.livebuild_pre_run
        echo "Running package livebuild_pre_run hook"
-       chroot $BUILD_ROOT su -c "/.build.livebuild_pre_run" - root \
-           < /dev/null || cleanup_and_exit 1
+       chroot $BUILD_ROOT su -c \
+        "export RECIPEFILE=${RECIPEFILE}; /.build.livebuild_pre_run" \
+        - root < /dev/null || cleanup_and_exit 1
     fi
 
     chroot $BUILD_ROOT su -c "cd $TOPDIR/$LIVEBUILD_ROOT && lb build" - root \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/build.1 
new/obs-build-20150917/build.1
--- old/obs-build-20150903/build.1      2015-09-03 11:25:16.000000000 +0200
+++ new/obs-build-20150917/build.1      2015-09-17 12:45:53.000000000 +0200
@@ -52,6 +52,9 @@
 .TP
 .B PKGBUILD
 A file used to generate Arch Linux binary packages.
+.TP
+.B build.collax
+A shell script used to generate a Collax binary package.
 .P
 .SH OPTIONS
 .TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/configs/collax.conf 
new/obs-build-20150917/configs/collax.conf
--- old/obs-build-20150903/configs/collax.conf  1970-01-01 01:00:00.000000000 
+0100
+++ new/obs-build-20150917/configs/collax.conf  2015-09-17 12:45:53.000000000 
+0200
@@ -0,0 +1,7 @@
+Type: collax
+Repotype: debian
+
+Preinstall: acl akutils attr base-files bash bzip2 coreutils diffutils file
+Preinstall: findutils gawk grep gzip heirloom less lbzip2 libc6 libcap libdb
+Preinstall: libgcc1 libgdbmg1 libpam0 libstdc++-v3 m4 ncurses5 patch perl5.8
+Preinstall: pigz sed shadow tar texinfo unzip vim zlib1g
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-build-20150903/spec_add_patch 
new/obs-build-20150917/spec_add_patch
--- old/obs-build-20150903/spec_add_patch       2015-09-03 11:25:16.000000000 
+0200
+++ new/obs-build-20150917/spec_add_patch       2015-09-17 12:45:53.000000000 
+0200
@@ -138,8 +138,16 @@
     my $striplevel = "";
     open(P, '<', $diffname) or die "$diffname: $!\n";
     while(<P>) {
-       $striplevel = " -p1" if (m/^--- a/ or m/^--- [^\/]+-\d+\./);
-       last if (/^--- /);
+        # Check if either the --- filename starts with 'a/' or the +++
+        # filename starts with 'b/', or either starts with a package
+        # name/version prefix.  We have to check for either, because either
+        # of them could be /dev/null if a file is being added or
+        # deleted.
+        $striplevel = " -p1"
+           if m,^--- a/, or
+               m,^\+\+\+ b/, or
+               m,^(---|\+\+\+) [^/]+-\d+\.,;
+       last if (/^@@ -\d/);
 
     }
     close(P);


Reply via email to