diff -Nru sbuild-0.62.5/bin/create-chroot sbuild-0.62.6/bin/create-chroot --- sbuild-0.62.5/bin/create-chroot 2011-07-11 12:43:07.000000000 +0000 +++ sbuild-0.62.6/bin/create-chroot 2011-12-07 20:24:33.000000000 +0000 @@ -172,7 +172,7 @@ EOT if [ -z "$VGNAME" ]; then echo "type=directory" >> "${TEMPFILE}" - echo "location=${TARGET}" >> "${TEMPFILE}" + echo "directory=${TARGET}" >> "${TEMPFILE}" SCHROOT="schroot -c ${IDENTIFIER}-${ARCH}-sbuild -u root -d /root --" else cat >>"${TEMPFILE}" <>"${TEMPFILE}" fi sudo mv "${TEMPFILE}" "/etc/schroot/chroot.d/buildd-${IDENTIFIER}${EXTRA}-${ARCH}" @@ -355,6 +356,9 @@ sudo mkdir -p "$TARGET/var/lib/sbuild/srcdep-lock" sudo chown -R root:sbuild "$TARGET/var/lib/sbuild" sudo chmod -R 02775 "$TARGET/var/lib/sbuild" + sudo mkdir -p "$TARGET/var/lock/sbuild" + sudo chown -R root:sbuild "$TARGET/var/lock/sbuild" + sudo chmod -R 02775 "$TARGET/var/lock/sbuild" ensure_target_unmounted } diff -Nru sbuild-0.62.5/ChangeLog sbuild-0.62.6/ChangeLog --- sbuild-0.62.5/ChangeLog 2011-07-13 18:59:15.000000000 +0000 +++ sbuild-0.62.6/ChangeLog 2011-12-07 20:55:12.000000000 +0000 @@ -1,3 +1,154 @@ +commit 6f95db6318458c4f7dde44d388fbba48a3ea1ed2 +Author: Roger Leigh +Date: Wed Dec 7 20:42:14 2011 +0000 + + debian: Document forward-port of buildd-0.61.0 changes + +commit 252eaf85f3cca1c45fa9848cb988c1c387f16c02 +Author: Philipp Kern +Date: Sun Nov 6 16:09:05 2011 +0100 + + etc/99builddsourceslist: fix a typo + +commit 882d64afd5bb9b5363a8e97aab9e5a43cf778d51 +Author: Philipp Kern +Date: Sun Sep 11 23:45:06 2011 +0200 + + create-chroot: use directory in schroot snippet, not location + +commit 0ba357185e76fde311e8ee1f571fca4ee42008b6 +Author: Philipp Kern +Date: Sun Jun 26 22:14:08 2011 +0200 + + etc/99builddsourceslist: use backports.d.o for main bpo archive + +commit 4deabd9763c630992b00042824a838a45eeb7dc5 +Author: Philipp Kern +Date: Wed Jun 1 00:01:45 2011 +0200 + + create-chroot: create /var/lock/sbuild in the chroot + +commit 9634ef81025880f3c93201bbfd0b087a6965c9ef +Author: Roger Leigh +Date: Wed Dec 7 13:59:36 2011 +0000 + + NEWS: Document Build-Depends-Arch and Build-Conflicts-Arch + +commit 5f35abb2a5764c6592ac8bc6bbf14b98c383c689 +Author: Roger Leigh +Date: Wed Dec 7 13:56:56 2011 +0000 + + debian: Document addition of Build-Depends-Arch and Build-Conflicts-Arch + +commit 89ac7f291407d198c6f229e289867f90254e1bd8 +Author: Roger Leigh +Date: Wed Dec 7 13:55:15 2011 +0000 + + Sbuild: Support Build-Depends-Arch and Build-Depends-Indep + +commit 5d9d8894cd34f923736e9832ec0be8dd505b1ace +Author: Roger Leigh +Date: Sun Nov 27 21:53:17 2011 +0000 + + NEWS: Document schroot namespace fix + +commit 5d094074764799a936e0b95ef3c4ed587a33f4eb +Author: Roger Leigh +Date: Sun Nov 27 21:47:02 2011 +0000 + + debian: Close #612630 + +commit f082ad9fa12d61ec8c42ba0d979d37d60ee1c908 +Author: Roger Leigh +Date: Sun Nov 27 21:44:20 2011 +0000 + + Sbuild::ChrootInfoSchroot: Support session namespace + + Attempt to get session information using a session: prefix. + If this fails, fall back to the old-style unprefixed session + identifier, to support older schroot versions. + +commit fc085b97e1ee4acfd21206625093f24c3d1e5b64 +Author: Philipp Kern +Date: Sat Sep 3 13:35:13 2011 +0200 + + bin/create-chroot: add s390 to the linux32 architectures + +commit 8e56f027a0ac5f9958b258bc2a201f48f7555160 +Merge: 44bd1e7 4ce195a +Author: Philipp Kern +Date: Sat Sep 3 13:34:18 2011 +0200 + + Merge branch 'master' of git://anonscm.debian.org/git/buildd-tools/sbuild + +commit 4ce195a64edc7785ac85fa7d2474b82914b09899 +Author: Roger Leigh +Date: Sun Aug 28 10:30:18 2011 +0100 + + Sbuild::Chroot: Remove apostrophes from perl code run via sudo + +commit 44bd1e7b7967928a22f06fdbbd5290de14b218dc +Author: Philipp Kern +Date: Tue Aug 23 07:31:03 2011 +0200 + + [Sbuild::Build] specify UTF-8 encoding in the .changes's MIME part (Closes: #638928) + + Thanks to James Vega for the report. + +commit 2943ba47ef805a04029aa46036e03e1fa3bff4c3 +Author: Roger Leigh +Date: Tue Aug 2 21:09:04 2011 +0100 + + NEWS: Document alternative resolving + +commit 48b1e75b42c092410a09a40b2c19461d20ded747 +Author: Roger Leigh +Date: Tue Aug 2 21:08:46 2011 +0100 + + debian: Document alternative resolving + +commit b015217c8d760720c582f77b5b07dba39dd08197 +Author: Roger Leigh +Date: Tue Aug 2 21:08:26 2011 +0100 + + Sbuild: Allow configuration of alternative resolving + +commit 7522366f83a44065a300350ac5e219dcd3715cbc +Author: Roger Leigh +Date: Sun Jul 24 12:46:22 2011 +0100 + + debian: Close #635250 + +commit 05ba5bf17cda2f072f22cc44d75cb76f3efd7a80 +Author: Roger Leigh +Date: Sun Jul 24 12:45:27 2011 +0100 + + Sbuild::Options: Add --jobs as an alias for -j + +commit 50091683e7007ae559ba759e3ceca218457e17d4 +Author: Roger Leigh +Date: Sat Jul 23 21:18:03 2011 +0100 + + debian: Close #635203 + +commit c1694ba41d9e27c3fd55ad0048c8743bc034e334 +Author: Roger Leigh +Date: Sat Jul 23 21:17:10 2011 +0100 + + debian: Bump version to 0.62.6-1 + +commit 74a1253f63cf881fa1c88eaad0f69f03d1a9bef4 +Author: Roger Leigh +Date: Sat Jul 23 21:17:00 2011 +0100 + + NEWS: Bump version to 0.62.6 + +commit a551a6f37ae7ffee3efc9c67d16ceb2531ff5614 +Author: Roger Leigh +Date: Sat Jul 23 21:16:06 2011 +0100 + + man: Add --chroot to synopsis + commit b586962d4e3d148c51ce2b166e43259eb3486b85 Author: Roger Leigh Date: Wed Jul 13 19:57:32 2011 +0100 diff -Nru sbuild-0.62.5/configure sbuild-0.62.6/configure --- sbuild-0.62.5/configure 2011-07-13 18:58:45.000000000 +0000 +++ sbuild-0.62.6/configure 2011-12-07 20:54:42.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for sbuild 0.62.5. +# Generated by GNU Autoconf 2.68 for sbuild 0.62.6. # # Report bugs to . # @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='sbuild' PACKAGE_TARNAME='sbuild' -PACKAGE_VERSION='0.62.5' -PACKAGE_STRING='sbuild 0.62.5' +PACKAGE_VERSION='0.62.6' +PACKAGE_STRING='sbuild 0.62.6' PACKAGE_BUGREPORT='buildd-tools-devel@lists.alioth.debian.org' PACKAGE_URL='' @@ -1257,7 +1257,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sbuild 0.62.5 to adapt to many kinds of systems. +\`configure' configures sbuild 0.62.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1327,7 +1327,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sbuild 0.62.5:";; + short | recursive ) echo "Configuration of sbuild 0.62.6:";; esac cat <<\_ACEOF @@ -1420,7 +1420,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sbuild configure 0.62.5 +sbuild configure 0.62.6 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1493,7 +1493,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sbuild $as_me 0.62.5, which was +It was created by sbuild $as_me 0.62.6, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2314,7 +2314,7 @@ # Define the identity of the package. PACKAGE='sbuild' - VERSION='0.62.5' + VERSION='0.62.6' cat >>confdefs.h <<_ACEOF @@ -2447,8 +2447,8 @@ esac AM_BACKSLASH='\' -RELEASE_DATE='13 Jul 2011' -RELEASE_DATE_S='1310511600' +RELEASE_DATE='07 Dec 2011' +RELEASE_DATE_S='1323216000' cat >>confdefs.h <<_ACEOF #define RELEASE_DATE "$RELEASE_DATE_S" @@ -4172,7 +4172,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sbuild $as_me 0.62.5, which was +This file was extended by sbuild $as_me 0.62.6, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4238,7 +4238,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sbuild config.status 0.62.5 +sbuild config.status 0.62.6 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -Nru sbuild-0.62.5/debian/changelog sbuild-0.62.6/debian/changelog --- sbuild-0.62.5/debian/changelog 2011-08-18 16:23:59.000000000 +0000 +++ sbuild-0.62.6/debian/changelog 2012-02-16 06:30:41.000000000 +0000 @@ -1,3 +1,37 @@ +sbuild (0.62.6-1ubuntu1) precise; urgency=low + + * Merge from Debian testing. Remaining changes: + - debian/patches/do-not-install-debfoster-into-chroots.patch: + do not install debfoster into the chroots because it is in universe and + not needed for package building itself. + - debian/patches/run-pre-build-hooks-as-root.patch: + run pre-build hooks as root + * Mark Vcs-* as XS-Debian-Vcs-* + - update debian/control + + -- Micah Gersten Thu, 16 Feb 2012 00:20:58 -0600 + +sbuild (0.62.6-1) unstable; urgency=low + + * New release. + * All changes backported from buildd-0.61.0 branch. + * sbuild.1: Add --chroot to synopsis (Closes: #635203). + * sbuild: + - --jobs is an alias for -j, to match documented behaviour + (Closes: #635250). + - The use of alternatives in Build-Depends and Build-Depends-Indep + may be turned on or off by the configuration variable + $resolve_alternatives. It may also be enabled or disabled at + build time using the --resolve-alternatives and + --no-resolve-alternatives options, respectively. + - Correctly support chroot namespaces, to work with schroot 1.5.x + (Closes: #612630). + - Support Build-Depends-Arch and Build-Conflicts-Arch fields in + debian/control. These may be manually set with + --add-depends-arch and --add-conflicts-arch, respectively. + + -- Roger Leigh Wed, 07 Dec 2011 20:41:43 +0000 + sbuild (0.62.5-1ubuntu2) oneiric; urgency=low * debian/patches/run-pre-build-hooks-as-root.patch: ported to match the diff -Nru sbuild-0.62.5/debian/control sbuild-0.62.6/debian/control --- sbuild-0.62.5/debian/control 2011-07-14 00:09:20.000000000 +0000 +++ sbuild-0.62.6/debian/control 2012-02-16 06:28:31.000000000 +0000 @@ -6,8 +6,8 @@ Uploaders: Michael Banck , Roger Leigh , Francesco Paolo Lovergine Build-Depends: debhelper (>> 7.0.0), groff-base, perl-modules, libexception-class-perl, libfilesys-df-perl, libio-zlib-perl, libmime-lite-perl, libdpkg-perl (>= 1.15.5) Standards-Version: 3.9.1 -Vcs-Browser: http://git.debian.org/?p=buildd-tools/sbuild.git -Vcs-Git: git://git.debian.org/git/buildd-tools/sbuild +XS-Debian-Vcs-Browser: http://git.debian.org/?p=buildd-tools/sbuild.git +XS-Debian-Vcs-Git: git://git.debian.org/git/buildd-tools/sbuild Package: libsbuild-perl Architecture: all diff -Nru sbuild-0.62.5/etc/99builddsourceslist sbuild-0.62.6/etc/99builddsourceslist --- sbuild-0.62.5/etc/99builddsourceslist 2011-07-11 14:07:43.000000000 +0000 +++ sbuild-0.62.6/etc/99builddsourceslist 2011-12-07 20:24:02.000000000 +0000 @@ -40,8 +40,8 @@ function domirror() { for SUITE in ${SUITES:-SUITE}; do - echo deb $1 | sed -e "s,COMPONENT,${COMPONTENT}," -e "s,SUITE,${SUITE}," >> $2 - echo deb-src $1 | sed -e "s,COMPONENT,${COMPONTENT_SRC}," -e "s,SUITE,${SUITE}," >> $2 + echo deb $1 | sed -e "s,COMPONENT,${COMPONENT}," -e "s,SUITE,${SUITE}," >> $2 + echo deb-src $1 | sed -e "s,COMPONENT,${COMPONENT_SRC}," -e "s,SUITE,${SUITE}," >> $2 done } @@ -58,8 +58,8 @@ fi fi - COMPONTENT="main contrib" - COMPONTENT_SRC="main contrib non-free" + COMPONENT="main contrib" + COMPONENT_SRC="main contrib non-free" if [ "${SUITE_VARIANT}" = 'proposed-updates' ]; then SUITES="${SUITE_BASE} ${SUITE_BASE}-proposed-updates" @@ -88,11 +88,11 @@ domirror "http://ftp.debian.org/debian SUITE COMPONENT" ${APT_LIST} SUITES="${SUITE_BASE}" [ -n "${backports_mirror}" ] && domirror "${backports_mirror} SUITE-backports COMPONENT" ${APT_LIST} - domirror "http://backports-master.debian.org/debian-backports/ SUITE-backports COMPONENT" ${APT_LIST} + domirror "http://backports.debian.org/debian-backports/ SUITE-backports COMPONENT" ${APT_LIST} domirror "http://backports-master.debian.org/buildd/${SUITE_BASE}-backports /" ${APT_LIST} if [ "$(echo ${SUITE_VARIANT} | cut -d - -f 2)" = "sloppy" ]; then [ -n "${backports_mirror}" ] && domirror "${backports_mirror} SUITE-backports-sloppy COMPONENT" ${APT_LIST} - domirror "http://backports-master.debian.org/debian-backports/ SUITE-backports-sloppy COMPONENT" ${APT_LIST} + domirror "http://backports.debian.org/debian-backports/ SUITE-backports-sloppy COMPONENT" ${APT_LIST} domirror "http://backports-master.debian.org/buildd/${SUITE_BASE}-backports-sloppy /" ${APT_LIST} fi APT_KEYS="${APT_KEYS} backports.org" @@ -171,8 +171,8 @@ echo deb ${backports_mirror} ${SUITE_BASE}-backports main contrib non-free >> ${APT_LIST_AUTO} echo deb-src ${backports_mirror} ${SUITE_BASE}-backports main contrib non-free >> ${APT_LIST_AUTO} fi - echo deb http://backports-master.debian.org/debian-backports/ ${SUITE_BASE}-backports main contrib non-free >> ${APT_LIST_AUTO} - echo deb-src http://backports-master.debian.org/debian-backports/ ${SUITE_BASE}-backports main contrib non-free >> ${APT_LIST_AUTO} + echo deb http://backports.debian.org/debian-backports/ ${SUITE_BASE}-backports main contrib non-free >> ${APT_LIST_AUTO} + echo deb-src http://backports.debian.org/debian-backports/ ${SUITE_BASE}-backports main contrib non-free >> ${APT_LIST_AUTO} echo deb http://backports-master.debian.org/buildd/${SUITE_BASE}-backports / >> ${APT_LIST_AUTO} echo deb-src http://backports-master.debian.org/buildd/${SUITE_BASE}-backports / >> ${APT_LIST_AUTO} if [ "$(echo ${SUITE_VARIANT} | cut -d - -f 2)" = "sloppy" ]; then @@ -180,8 +180,8 @@ echo deb ${backports_mirror} ${SUITE_BASE}-backports-sloppy main contrib non-free >> ${APT_LIST_AUTO} echo deb-src ${backports_mirror} ${SUITE_BASE}-backports-sloppy main contrib non-free >> ${APT_LIST_AUTO} fi - echo deb http://backports-master.debian.org/debian-backports/ ${SUITE_BASE}-backports-sloppy main contrib non-free >> ${APT_LIST_AUTO} - echo deb-src http://backports-master.debian.org/debian-backports/ ${SUITE_BASE}-backports-sloppy main contrib non-free >> ${APT_LIST_AUTO} + echo deb http://backports.debian.org/debian-backports/ ${SUITE_BASE}-backports-sloppy main contrib non-free >> ${APT_LIST_AUTO} + echo deb-src http://backports.debian.org/debian-backports/ ${SUITE_BASE}-backports-sloppy main contrib non-free >> ${APT_LIST_AUTO} echo deb http://backports-master.debian.org/buildd/${SUITE_BASE}-backports-sloppy / >> ${APT_LIST_AUTO} echo deb-src http://backports-master.debian.org/buildd/${SUITE_BASE}-backports-sloppy / >> ${APT_LIST_AUTO} fi diff -Nru sbuild-0.62.5/lib/Sbuild/Build.pm sbuild-0.62.6/lib/Sbuild/Build.pm --- sbuild-0.62.5/lib/Sbuild/Build.pm 2011-07-11 14:07:43.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/Build.pm 2011-12-07 20:23:18.000000000 +0000 @@ -631,31 +631,35 @@ $self->check_abort(); $self->set('Install Start Time', time); $self->set('Install End Time', $self->get('Install Start Time')); - $resolver->add_dependencies('CORE', join(", ", @{$self->get_conf('CORE_DEPENDS')}) , "", "", ""); + $resolver->add_dependencies('CORE', join(", ", @{$self->get_conf('CORE_DEPENDS')}) , "", "", "", "", ""); if (!$resolver->install_deps('core', 'CORE')) { Sbuild::Exception::Build->throw(error => "Core build dependencies not satisfied; skipping", failstage => "install-deps"); } - $resolver->add_dependencies('ESSENTIAL', $self->read_build_essential(), "", "", ""); + $resolver->add_dependencies('ESSENTIAL', $self->read_build_essential(), "", "", "", "", ""); my $snapshot = ""; $snapshot = "gcc-snapshot" if ($self->get_conf('GCC_SNAPSHOT')); - $resolver->add_dependencies('GCC_SNAPSHOT', $snapshot , "", "", ""); + $resolver->add_dependencies('GCC_SNAPSHOT', $snapshot , "", "", "", "", ""); # Add additional build dependencies specified on the command-line. # TODO: Split dependencies into an array from the start to save # lots of joining. $resolver->add_dependencies('MANUAL', join(", ", @{$self->get_conf('MANUAL_DEPENDS')}), + join(", ", @{$self->get_conf('MANUAL_DEPENDS_ARCH')}), join(", ", @{$self->get_conf('MANUAL_DEPENDS_INDEP')}), join(", ", @{$self->get_conf('MANUAL_CONFLICTS')}), + join(", ", @{$self->get_conf('MANUAL_CONFLICTS_ARCH')}), join(", ", @{$self->get_conf('MANUAL_CONFLICTS_INDEP')})); $resolver->add_dependencies($self->get('Package'), $self->get('Build Depends'), + $self->get('Build Depends Arch'), $self->get('Build Depends Indep'), $self->get('Build Conflicts'), + $self->get('Build Conflicts Arch'), $self->get('Build Conflicts Indep')); $self->check_abort(); @@ -798,8 +802,10 @@ my ($dscarchs, $dscpkg, $dscver, @fetched); my $build_depends = ""; + my $build_depends_arch = ""; my $build_depends_indep = ""; my $build_conflicts = ""; + my $build_conflicts_arch = ""; my $build_conflicts_indep = ""; local( *F ); @@ -950,8 +956,10 @@ } $build_depends = $pdsc->{'Build-Depends'}; + $build_depends_arch = $pdsc->{'Build-Depends-Arch'}; $build_depends_indep = $pdsc->{'Build-Depends-Indep'}; $build_conflicts = $pdsc->{'Build-Conflicts'}; + $build_conflicts_arch = $pdsc->{'Build-Conflicts-Arch'}; $build_conflicts_indep = $pdsc->{'Build-Conflicts-Indep'}; $dscarchs = $pdsc->{'Architecture'}; $dscpkg = $pdsc->{'Source'}; @@ -960,8 +968,10 @@ $self->set_version("${dscpkg}_${dscver}"); $build_depends =~ s/\n\s+/ /g if defined $build_depends; + $build_depends_arch =~ s/\n\s+/ /g if defined $build_depends_arch; $build_depends_indep =~ s/\n\s+/ /g if defined $build_depends_indep; $build_conflicts =~ s/\n\s+/ /g if defined $build_conflicts; + $build_conflicts_arch =~ s/\n\s+/ /g if defined $build_conflicts_arch; $build_conflicts_indep =~ s/\n\s+/ /g if defined $build_conflicts_indep; $self->log_subsubsection("Check arch"); @@ -989,8 +999,10 @@ debug("Arch check ok ($arch included in $dscarchs)\n"); $self->set('Build Depends', $build_depends); + $self->set('Build Depends Arch', $build_depends_arch); $self->set('Build Depends Indep', $build_depends_indep); $self->set('Build Conflicts', $build_conflicts); + $self->set('Build Conflicts Arch', $build_conflicts_arch); $self->set('Build Conflicts Indep', $build_conflicts_indep); return 1; @@ -2317,11 +2329,13 @@ my $changes = $self->get('Package_SVersion') . '_' . $self->get('Arch') . '.changes'; if ($self->get_status() eq 'successful' && -r $changes) { - $msg->attach( + my $log_part = MIME::Lite->new( Type => 'text/plain', Path => $changes, Filename => basename($changes) ); + $log_part->attr('content-type.charset' => 'UTF-8'); + $msg->attach($log_part); } my $stats = ''; diff -Nru sbuild-0.62.5/lib/Sbuild/ChrootInfoSchroot.pm sbuild-0.62.6/lib/Sbuild/ChrootInfoSchroot.pm --- sbuild-0.62.5/lib/Sbuild/ChrootInfoSchroot.pm 2011-07-10 14:19:40.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/ChrootInfoSchroot.pm 2011-12-07 20:09:58.000000000 +0000 @@ -136,8 +136,10 @@ my $chroot_type = ""; - open CHROOT_DATA, '-|', $self->get_conf('SCHROOT'), '--info', '--chroot', $chroot - or die 'Can\'t run ' . $self->get_conf('SCHROOT') . ' to get chroot data'; + # If namespaces aren't supported, try to fall back to old style session. + open CHROOT_DATA, '-|', $self->get_conf('SCHROOT'), '--info', '--chroot', "session:$chroot" or + open CHROOT_DATA, '-|', $self->get_conf('SCHROOT'), '--info', '--chroot', $chroot or + die 'Can\'t run ' . $self->get_conf('SCHROOT') . ' to get chroot data'; my $tmp = $self->get_info_from_stream(\*CHROOT_DATA); diff -Nru sbuild-0.62.5/lib/Sbuild/Chroot.pm sbuild-0.62.6/lib/Sbuild/Chroot.pm --- sbuild-0.62.5/lib/Sbuild/Chroot.pm 2011-07-11 12:43:07.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/Chroot.pm 2011-12-07 20:09:58.000000000 +0000 @@ -353,7 +353,7 @@ } else { (\$job, \$pid, \$user) = (\$1, \$2, \$3); if (kill( 0, \$pid ) == 0 && \$! == ESRCH) { - # process doesn't exist anymore, remove stale lock + # process no longer exists, remove stale lock print STDERR "Removing stale lock file \$lockfile ". "(job \$job, pid \$pid, user \$user)\\n"; if (!unlink(\$lockfile)) { @@ -375,7 +375,7 @@ sleep $lock_interval; goto repeat; } else { - print STDERR "Can't create lock file \$lockfile: \$!\\n"; + print STDERR "Failed to create lock file \$lockfile: \$!\\n"; exit 1; } } diff -Nru sbuild-0.62.5/lib/Sbuild/Conf.pm sbuild-0.62.6/lib/Sbuild/Conf.pm --- sbuild-0.62.5/lib/Sbuild/Conf.pm 2011-07-11 12:43:07.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/Conf.pm 2011-12-07 20:09:58.000000000 +0000 @@ -139,6 +139,13 @@ DEFAULT => 0, HELP => 'Build architecture: all packages by default' }, + 'BUILD_ARCH_ANY' => { + TYPE => 'BOOL', + VARNAME => 'build_arch_any', + GROUP => 'Build options', + DEFAULT => 1, + HELP => 'Build architecture: any packages by default' + }, 'NOLOG' => { TYPE => 'BOOL', GROUP => '__INTERNAL', @@ -796,6 +803,18 @@ DEFAULT => [], HELP => 'Additional per-build dependencies. Do not set by hand.' }, + 'MANUAL_DEPENDS_ARCH' => { + TYPE => 'ARRAY:STRING', + GROUP => '__INTERNAL', + DEFAULT => [], + HELP => 'Additional per-build dependencies. Do not set by hand.' + }, + 'MANUAL_CONFLICTS_ARCH' => { + TYPE => 'ARRAY:STRING', + GROUP => '__INTERNAL', + DEFAULT => [], + HELP => 'Additional per-build dependencies. Do not set by hand.' + }, 'MANUAL_DEPENDS_INDEP' => { TYPE => 'ARRAY:STRING', GROUP => '__INTERNAL', @@ -1027,7 +1046,8 @@ return $retval; }, - HELP => 'Should the dependency resolver use alternatives in Build-Depends and Build-Depends-Indep? By default, only the first alternative will be used; all other alternatives will be removed. Note that this does not include architecture-specific alternatives, which are reduced to the build architecture prior to alternatives removal. This should be left disabled when building for unstable; it may be useful when building backports.' + EXAMPLE => '$resolve_alternatives = 0;', + HELP => 'Should the dependency resolver use alternatives in Build-Depends, Build-Depends-Arch and Build-Depends-Indep? By default, using the \'internal\' or \'apt\' resolvers, only the first alternative will be used; all other alternatives will be removed. When using the \'aptitude\' resolver, it will default to using all alternatives. Note that this does not include architecture-specific alternatives, which are reduced to the build architecture prior to alternatives removal. This should be left disabled when building for unstable; it may be useful when building for experimental or backports. Set to undef to use the default, 1 to enable, or 0 to disable.' }, 'SBUILD_BUILD_DEPENDS_SECRET_KEY' => { TYPE => 'STRING', diff -Nru sbuild-0.62.5/lib/Sbuild/InternalResolver.pm sbuild-0.62.6/lib/Sbuild/InternalResolver.pm --- sbuild-0.62.5/lib/Sbuild/InternalResolver.pm 2011-07-11 14:07:43.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/InternalResolver.pm 2011-12-07 20:09:58.000000000 +0000 @@ -72,6 +72,14 @@ push(@apt_negative, $deps->{'Build Conflicts'}) if (defined($deps->{'Build Conflicts'}) && $deps->{'Build Conflicts'} ne ""); + if ($self->get_conf('BUILD_ARCH_ANY')) { + push(@apt_positive, $deps->{'Build Depends Arch'}) + if (defined($deps->{'Build Depends Arch'}) && + $deps->{'Build Depends Arch'} ne ""); + push(@apt_negative, $deps->{'Build Conflicts Arch'}) + if (defined($deps->{'Build Conflicts Arch'}) && + $deps->{'Build Conflicts Arch'} ne ""); + } if ($self->get_conf('BUILD_ARCH_ALL')) { push(@apt_positive, $deps->{'Build Depends Indep'}) if (defined($deps->{'Build Depends Indep'}) && diff -Nru sbuild-0.62.5/lib/Sbuild/Options.pm sbuild-0.62.6/lib/Sbuild/Options.pm --- sbuild-0.62.5/lib/Sbuild/Options.pm 2011-07-11 12:43:07.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/Options.pm 2011-12-07 20:09:58.000000000 +0000 @@ -54,6 +54,12 @@ "add-conflicts=s" => sub { push(@{$self->get_conf('MANUAL_CONFLICTS')}, $_[1]); }, + "add-depends-arch=s" => sub { + push(@{$self->get_conf('MANUAL_DEPENDS_ARCH')}, $_[1]); + }, + "add-conflicts-arch=s" => sub { + push(@{$self->get_conf('MANUAL_CONFLICTS_ARCH')}, $_[1]); + }, "add-depends-indep=s" => sub { push(@{$self->get_conf('MANUAL_DEPENDS_INDEP')}, $_[1]); }, @@ -138,7 +144,7 @@ push(@{$self->get_conf('DPKG_BUILDPACKAGE_USER_OPTIONS')}, $_[1]); }, - "j=i" => sub { + "j|jobs=i" => sub { push(@{$self->get_conf('DPKG_BUILDPACKAGE_USER_OPTIONS')}, '-j'.$_[1]) }, @@ -200,6 +206,12 @@ "build-dep-resolver=s" => sub { $self->set_conf('BUILD_DEP_RESOLVER', $_[1]); }, + "resolve-alternatives" => sub { + $self->set_conf('RESOLVE_ALTERNATIVES', 1); + }, + "no-resolve-alternatives" => sub { + $self->set_conf('RESOLVE_ALTERNATIVES', 0); + }, "run-lintian" => sub { $self->set_conf('RUN_LINTIAN', 1); }, diff -Nru sbuild-0.62.5/lib/Sbuild/ResolverBase.pm sbuild-0.62.6/lib/Sbuild/ResolverBase.pm --- sbuild-0.62.5/lib/Sbuild/ResolverBase.pm 2011-07-11 14:07:43.000000000 +0000 +++ sbuild-0.62.6/lib/Sbuild/ResolverBase.pm 2011-12-07 20:09:58.000000000 +0000 @@ -261,19 +261,25 @@ my $self = shift; my $pkg = shift; my $build_depends = shift; + my $build_depends_arch = shift; my $build_depends_indep = shift; my $build_conflicts = shift; + my $build_conflicts_arch = shift; my $build_conflicts_indep = shift; debug("Build-Depends: $build_depends\n") if $build_depends; + debug("Build-Depends-Arch: $build_depends_arch\n") if $build_depends_arch; debug("Build-Depends-Indep: $build_depends_indep\n") if $build_depends_indep; debug("Build-Conflicts: $build_conflicts\n") if $build_conflicts; + debug("Build-Conflicts-Arch: $build_conflicts_arch\n") if $build_conflicts_arch; debug("Build-Conflicts-Indep: $build_conflicts_indep\n") if $build_conflicts_indep; my $deps = { 'Build Depends' => $build_depends, + 'Build Depends Arch' => $build_depends_arch, 'Build Depends Indep' => $build_depends_indep, 'Build Conflicts' => $build_conflicts, + 'Build Conflicts Arch' => $build_conflicts_arch, 'Build Conflicts Indep' => $build_conflicts_indep }; @@ -594,6 +600,8 @@ my @positive; my @negative; + my @positive_arch; + my @negative_arch; my @positive_indep; my @negative_indep; @@ -606,30 +614,32 @@ push(@negative, $deps->{'Build Conflicts'}) if (defined($deps->{'Build Conflicts'}) && $deps->{'Build Conflicts'} ne ""); - push(@positive_indep, $deps->{'Build Depends Indep'}) - if (defined($deps->{'Build Depends Indep'}) && - $deps->{'Build Depends Indep'} ne ""); - push(@negative_indep, $deps->{'Build Conflicts Indep'}) - if (defined($deps->{'Build Conflicts Indep'}) && - $deps->{'Build Conflicts Indep'} ne ""); - } - - my ($positive, $negative); - if ($self->get_conf('BUILD_ARCH_ALL')) { - $positive = deps_parse(join(", ", @positive, @positive_indep), - reduce_arch => 1, - host_arch => $self->get('Arch')); - $negative = deps_parse(join(", ", @negative, @negative_indep), - reduce_arch => 1, - host_arch => $self->get('Arch')); - } else { - $positive = deps_parse(join(", ", @positive), + if ($self->get_conf('BUILD_ARCH_ALL')) { + push(@positive_arch, $deps->{'Build Depends Arch'}) + if (defined($deps->{'Build Depends Arch'}) && + $deps->{'Build Depends Arch'} ne ""); + push(@negative_arch, $deps->{'Build Conflicts Arch'}) + if (defined($deps->{'Build Conflicts Arch'}) && + $deps->{'Build Conflicts Arch'} ne ""); + } + if ($self->get_conf('BUILD_ARCH_ALL')) { + push(@positive_indep, $deps->{'Build Depends Indep'}) + if (defined($deps->{'Build Depends Indep'}) && + $deps->{'Build Depends Indep'} ne ""); + push(@negative_indep, $deps->{'Build Conflicts Indep'}) + if (defined($deps->{'Build Conflicts Indep'}) && + $deps->{'Build Conflicts Indep'} ne ""); + } + } + + my $positive = deps_parse(join(", ", @positive, + @positive_arch, @positive_indep), reduce_arch => 1, host_arch => $self->get('Arch')); - $negative = deps_parse(join(", ", @negative), + my $negative = deps_parse(join(", ", @negative, + @negative_arch, @negative_indep), reduce_arch => 1, host_arch => $self->get('Arch')); - } $self->log("Merged Build-Depends: $positive\n") if $positive; $self->log("Merged Build-Conflicts: $negative\n") if $negative; @@ -726,6 +736,12 @@ if (scalar(@negative)) { print $dummy_dsc_fh 'Build-Conflicts: ' . join(", ", @negative) . "\n"; } + if (scalar(@positive_arch)) { + print $dummy_dsc_fh 'Build-Depends-Arch: ' . join(", ", @positive_arch) . "\n"; + } + if (scalar(@negative_arch)) { + print $dummy_dsc_fh 'Build-Conflicts-Arch: ' . join(", ", @negative_arch) . "\n"; + } if (scalar(@positive_indep)) { print $dummy_dsc_fh 'Build-Depends-Indep: ' . join(", ", @positive_indep) . "\n"; } diff -Nru sbuild-0.62.5/man/sbuild.1.in sbuild-0.62.6/man/sbuild.1.in --- sbuild-0.62.5/man/sbuild.1.in 2011-07-11 12:43:07.000000000 +0000 +++ sbuild-0.62.6/man/sbuild.1.in 2011-12-07 20:09:58.000000000 +0000 @@ -27,6 +27,7 @@ .RB [ \-A \[or] \-\-arch\-all ] .RB [ \-\-archive=\fIarchive\fP ] .RB [ \-d \[or] \-\-dist=\fIdistribution\fP ] +.RB [ \-c \[or] \-\-chroot=\fIchroot\fP ] .RB [ \-\-arch=\fIarchitecture\fP ] .RB [ \-s \[or] \-\-source ] .RB [ \-\-force\-orig\-source ] @@ -35,6 +36,8 @@ .RB [ \-\-append\-to\-version=\fIstring\fP ] .RB [ \-\-add-depends=\fIdependency\fP ] .RB [ \-\-add-conflicts=\fIdependency\fP ] +.RB [ \-\-add-depends\-arch=\fIdependency\fP ] +.RB [ \-\-add-conflicts\-arch=\fIdependency\fP ] .RB [ \-\-add-depends\-indep=\fIdependency\fP ] .RB [ \-\-add-conflicts\-indep=\fIdependency\fP ] .RB [ \-m \[or] \-\-maintainer=\fImaintainer\fP ] @@ -66,6 +69,7 @@ .RB [ \-\-log\-external\-command\-error ] .RB [ \-\-setup\-hook=\fIhook-script\fP ] .RB [ \-\-build\-dep\-resolver=\fIresolver\fP ] +.RB [ \-\-resolve\-alternatives \[or] \-\-no\-resolve\-alternatives ] .RB [ PACKAGE [ .dsc ]] .SH DESCRIPTION \fBsbuild\fR rebuilds Debian binary packages from the corresponding Debian @@ -121,15 +125,20 @@ .TP .BR "\-\-add\-conflicts=\fIdependency\fP" .TP +.BR "\-\-add\-depends\-arch=\fIdependency\fP" +.TP +.BR "\-\-add\-conflicts\-arch=\fIdependency\fP" +.TP .BR "\-\-add\-depends\-indep=\fIdependency\fP" .TP .BR "\-\-add\-conflicts\-indep=\fIdependency\fP" These options add a build dependencies to the source package being built, in addition to the build dependency information specified in debian/control. These dependencies will be concatenated directly to the Build-Depends, -Build-Conflicts, Build-Depends-Indep and Build-Conflicts-Indep dependencies, -respectively. The options may be used any number of times to add multiple -dependencies. The format is identical to the format used in debian/control. +Build-Conflicts, Build-Depends-Arch, Build-Conflicts-Arch, Build-Depends-Indep +and Build-Conflicts-Indep dependencies, respectively. The options may be used +any number of times to add multiple dependencies. The format is identical to +the format used in debian/control. .TP .BR "\-\-arch=\fIarchitecture\fP" Build using the architecture specified. A chroot named @@ -150,7 +159,7 @@ Operate in batchmode, i.e. write a build-progress file during execution and files on shutdown to facilitate a clean restart. .TP -.BR \-c ", " "\-\-chroot" +.BR \-c ", " "\-\-chroot=\fIchroot\fP" Use the specified chroot. If not specified, the default is the first of \fI$distribution\-$arch\-sbuild\fP, \fI$distribution\-sbuild\fP, \fI$distribution\-$arch\fP or \fI$distribution\fP that exists. @@ -364,6 +373,16 @@ and virtual dependencies, and is deprecated. Like apt, it only uses the first alternative build dependency when multiple alternatives exist. It is not recommended for future use, and will be removed in the future. +.TP +.BR \-\-resolve\-alternatives +Allow the use of alternatives in Build-Depends, Build-Depends-Arch and +Build-Depends-Indep. This is the default for the aptitude dependency resolver. +.TP +.BR \-\-no\-resolve\-alternatives +Do not allow the use of alternatives in Build-Depends, Build-Depends-Arch and +Build-Depends-Indep. Note that alternatives for the same package +(e.g. different versions) are still allowed. This is the default for the +internal and apt dependency resolvers. .SH EXTERNAL COMMANDS Support to run external commands during an sbuild run is provided. A set of external commands can be run at various stages of a build. Providing commands to @@ -443,8 +462,9 @@ The dependency resolvers do the following: .IP \[bu] Create a dummy dependency package. This contains the Build-Depends (and -optionally Build-Depends-Indep) as Depends, and Build-Conflicts (and optionally -Build-Conflicts-Indep) as Conflicts. +optionally Build-Depends-Arch and Build-Depends-Indep) as Depends, and +Build-Conflicts (and optionally Build-Conflicts-Arch and Build-Conflicts-Indep) +as Conflicts. .IP \[bu] Install the dummy dependency package into the local archive, .IP \[bu] diff -Nru sbuild-0.62.5/NEWS sbuild-0.62.6/NEWS --- sbuild-0.62.5/NEWS 2011-07-13 18:55:48.000000000 +0000 +++ sbuild-0.62.6/NEWS 2011-12-07 20:09:57.000000000 +0000 @@ -1,12 +1,28 @@ NEWS -*- outline -*- ---- -Welcome to sbuild 0.62.5. Please read these release notes carefully. +Welcome to sbuild 0.62.6. Please read these release notes carefully. Full installation instructions are provided in the INSTALL file. The README file also contains more specific notes regarding building and configuration. +* Major changes in 0.62.6: + + 1) The use of alternatives in Build-Depends and Build-Depends-Indep + may be turned on or off by the configuration variable + $resolve_alternatives. It may also be enabled or disabled at + build time using the --resolve-alternatives and + --no-resolve-alternatives options, respectively. + + 2) The new Build-Depends-Arch and Build-Conflicts-Arch fields in + debian/control are now supported. These may be manually set + with --add-depends-arch and --add-conflicts-arch, + respectively. + + 3) schroot namespaces are now fully supported, meaning that + current 1.5.x schroot versions now work with sbuild. + * Major changes in 0.62.5: None. diff -Nru sbuild-0.62.5/VERSION sbuild-0.62.6/VERSION --- sbuild-0.62.5/VERSION 2011-07-13 18:58:42.000000000 +0000 +++ sbuild-0.62.6/VERSION 2011-12-07 20:54:40.000000000 +0000 @@ -1,5 +1,5 @@ Package: sbuild -Version: 0.62.5 -Release-Date: 13 Jul 2011 +Version: 0.62.6 +Release-Date: 07 Dec 2011 Released-By: Roger Leigh -Git-Tag: release/sbuild-0.62.5 +Git-Tag: release/sbuild-0.62.6