Your message dated Fri, 17 Oct 2014 17:04:47 +0000
with message-id <[email protected]>
and subject line Bug#731798: fixed in sbuild 0.65.0-1
has caused the Debian Bug report #731798,
regarding sbuild: please add build profile support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
731798: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731798
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sbuild
Version: 0.64.2-2
Severity: normal
Tags: patch

Hi,

with dpkg (>= 1.17.2) build profiles [1] have finally been introduced
[2]. The attached patch allows sbuild to make use of this new
functionality of dpkg by adding a --profiles option, honoring the
DEB_BUILD_PROFILES environment variable and passing the correct options
to dpkg deps_parse in ResolverBase.pm. In addition to this patch, sbuild
should probably also depend on libdpkg-perl (>= 1.17.2).

cheers, josch

[1] https://wiki.debian.org/BuildProfileSpec
[2] https://lists.debian.org/debian-dpkg/2013/12/msg00001.html
--- a/bin/sbuild
+++ b/bin/sbuild
@@ -115,6 +115,8 @@ sub main () {
 	    if $conf->get('DEBUG' && defined($conf->get('HOST_ARCH')));
 	print "Selected build architecture " . $conf->get('BUILD_ARCH') . "\n"
 	    if $conf->get('DEBUG' && defined($conf->get('BUILD_ARCH')));
+	print "Selected build profiles " . $conf->get('BUILD_PROFILES') . "\n"
+	    if $conf->get('DEBUG' && defined($conf->get('BUILD_PROFILES')));
 
 	$job = Sbuild::Build->new($jobname, $conf);
 	$job->set('Pkg Status Trigger', \&status_trigger);
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -264,6 +264,7 @@ sub run {
 	# Acquire the architectures we're building for and on.
 	$self->set('Host Arch', $self->get_conf('HOST_ARCH'));
 	$self->set('Build Arch', $self->get_conf('BUILD_ARCH'));
+	$self->set('Build Profiles', $self->get_conf('BUILD_PROFILES'));
 
 	my $dist = $self->get_conf('DISTRIBUTION');
 	if (!defined($dist) || !$dist) {
@@ -461,6 +462,7 @@ sub run_chroot_session {
 	$resolver->set('Arch', $self->get_conf('ARCH'));
 	$resolver->set('Host Arch', $self->get_conf('HOST_ARCH'));
 	$resolver->set('Build Arch', $self->get_conf('BUILD_ARCH'));
+	$resolver->set('Build Profiles', $self->get_conf('BUILD_PROFILES'));
 	$resolver->set('Chroot Build Dir', $self->get('Chroot Build Dir'));
 	$self->set('Dependency Resolver', $resolver);
 
@@ -1889,6 +1891,7 @@ sub generate_stats {
     $self->add_stat('Machine Architecture', $self->get_conf('ARCH'));
     $self->add_stat('Host Architecture', $self->get('Host Arch'));
     $self->add_stat('Build Architecture', $self->get('Build Arch'));
+    $self->add_stat('Build Profiles', $self->get('Build Profiles'));
     $self->add_stat('Distribution', $self->get_conf('DISTRIBUTION'));
     $self->add_stat('Space', $self->get('This Space'));
     $self->add_stat('Build-Time',
@@ -2156,6 +2159,7 @@ sub open_build_log {
     $self->log("Machine Architecture: " . $self->get_conf('ARCH') . "\n");
     $self->log("Host Architecture: " . $self->get('Host Arch') . "\n");
     $self->log("Build Architecture: " . $self->get('Build Arch') . "\n");
+    $self->log("Build Profiles: " . ($self->get('Build Profiles')) . "\n");
     $self->log("\n");
 }
 
--- a/lib/Sbuild/ConfBase.pm
+++ b/lib/Sbuild/ConfBase.pm
@@ -169,6 +169,13 @@ sub init_allowed_keys {
 	    DEFAULT => $native_arch,
 	    HELP => 'Build architecture (Arch we are building on).'
 	},
+	'BUILD_PROFILES'        => {
+	    TYPE => 'STRING',
+	    VARNAME => 'build_profiles',
+	    GROUP => 'Build options',
+	    DEFAULT => $ENV{'DEB_BUILD_PROFILES'},
+	    HELP => 'Build profiles. Separated by spaces.'
+	},
 	'HOSTNAME'				=> {
 	    TYPE => 'STRING',
 	    GROUP => '__INTERNAL',
--- a/lib/Sbuild/Options.pm
+++ b/lib/Sbuild/Options.pm
@@ -55,6 +55,10 @@ sub set_options {
 		       "no-arch-all" => sub {
 			   $self->set_conf('BUILD_ARCH_ALL', 0);
 		       },
+		       "profiles=s" => sub {
+			   $_[1] =~ tr/,/ /;
+			   $self->set_conf('BUILD_PROFILES', $_[1]);
+		       },
 		       "add-depends=s" => sub {
 			   push(@{$self->get_conf('MANUAL_DEPENDS')}, $_[1]);
 		       },
--- a/lib/Sbuild/ResolverBase.pm
+++ b/lib/Sbuild/ResolverBase.pm
@@ -58,6 +58,7 @@ sub new {
     # Typically set by Sbuild::Build, but not outside a build context.
     $self->set('Host Arch', $self->get_conf('HOST_ARCH'));
     $self->set('Build Arch', $self->get_conf('BUILD_ARCH'));
+    $self->set('Build Profiles', $self->get_conf('BUILD_PROFILES'));
 
     my $dummy_archive_list_file = $session->get('Location') .
         '/etc/apt/sources.list.d/sbuild-build-depends-archive.list';
@@ -738,14 +739,18 @@ EOF
 			      reduce_arch => 1,
 			      host_arch => $self->get('Host Arch'),
 			      build_arch => $self->get('Build Arch'),
-			      build_dep => 1);
+			      build_dep => 1,
+			      reduce_profiles => 1,
+			      build_profiles => [ split / /, $self->get('Build Profiles') ]);
     my $negative = deps_parse(join(", ", @negative,
 				   @negative_arch, @negative_indep),
 			      reduce_arch => 1,
 			      host_arch => $self->get('Host Arch'),
 			      build_arch => $self->get('Build Arch'),
 			      build_dep => 1,
-			      union => 1);
+			      union => 1,
+			      reduce_profiles => 1,
+			      build_profiles => [ split / /, $self->get('Build Profiles') ]);
 
     $self->log("Merged Build-Depends: $positive\n") if $positive;
     $self->log("Merged Build-Conflicts: $negative\n") if $negative;
--- a/man/sbuild.1.in
+++ b/man/sbuild.1.in
@@ -31,6 +31,7 @@ sbuild \- build debian packages from sou
 .RB [ \-\-arch=\fIarchitecture\fP ]
 .RB [ \-\-build=\fIarchitecture\fP ]
 .RB [ \-\-host=\fIarchitecture\fP ]
+.RB [ \-\-profiles=\fIprofile[,...]\fP ]
 .RB [ \-s \[or] \-\-source ]
 .RB [ \-\-force\-orig\-source ]
 .RB [ \-\-make\-binNMU=\fIchangelog-entry\fP ]
@@ -260,6 +261,11 @@ log file, but print everything to stdout
 Convenience option to set \fIpurge-mode\fR for build directory, build
 dependencies and session.
 .TP
+.BR \-\-profiles=\fIprofile[,...]\fP"
+Specify the profile(s) we build, as a comma-separated list, without the
+"\fBprofile.\fP" namespace prefix. Defaults to the space separated list of
+profiles in the \fBDEB_BUILD_PROFILES\fP environment variable.
+.TP
 .BR "\-\-purge\-build=\fIpurge-mode\fP"
 \fIpurge-mode\fR determines if the build directory will be deleted after a
 build. Possible values are \fBalways\fR (default), \fBnever\fR, and

--- End Message ---
--- Begin Message ---
Source: sbuild
Source-Version: 0.65.0-1

We believe that the bug you reported is fixed in the latest version of
sbuild, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Wookey <[email protected]> (supplier of updated sbuild package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 17 Oct 2014 17:20:45 +0100
Source: sbuild
Binary: libsbuild-perl sbuild buildd
Architecture: source all
Version: 0.65.0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian buildd-tools Developers 
<[email protected]>
Changed-By: Wookey <[email protected]>
Description:
 buildd     - Daemon for automatically building Debian binary packages from Deb
 libsbuild-perl - Tool for building Debian binary packages from Debian sources
 sbuild     - Tool for building Debian binary packages from Debian sources
Closes: 679574 700522 705926 712627 714883 722103 729012 731798 745221 756265
Changes:
 sbuild (0.65.0-1) unstable; urgency=medium
 .
   [ Benjamin Drung ]
   * Team upload.
   * Fix various issues found by Lintian:
     - Fix spelling mistake: indended -> intended
     - Fix hyphen-used-as-minus-sign
     - Fix debian-news-entry-uses-asterisk
     - Fix copyright-refers-to-symlink-license
     - Use canonical VCS fields
   * Export additional variables to external commands: %SBUILD_CHROOT_DIR,
     %SBUILD_BUILD_DIR, %SBUILD_PKGBUILD_DIR, and %SBUILD_HOST_ARCH
     (Closes: #756265)
   * Bump Standard-Version to 3.9.6
   * Unset typical desktop variables XDG_RUNTIME_DIR, XDG_SEAT,
     XDG_SESSION_COOKIE, XDG_SESSION_ID, and XDG_VTNR (Closes: #729012)
   * Fail if dpkg subcommands fail instead of silently ignoring failures.
     Thanks to Christoph Biedl for the patch (Closes: #745221)
   * Fix build failure if the package version ends with Debian revision 0.
     Thanks to Adam Borowski <[email protected]> (Closes: #679574)
   * Fix broken man page symlinks in buildd package
 .
   [ Geoffrey Thomas ]
   * Refactor temporary build-dep repository code to use apt-get update,
     instead of hacking /var/lib/apt/lists.
   * Add --extra-package (Closes: #700522) and --extra-repository (Closes:
     #714883).
   * Accept 0 as a source version number (Closes: #712627)
   * Add DEP-8 autopkgtest to build procenv. (Closes: #705926)
 .
   [ Johannes Schauer ]
   * sbuild:
     - Add build-profiles support (Closes: 731798)
 .
   [ Geoffrey Thomas ]
   * Sbuild::ChrootSetup: Pass --no-options to gpg (Closes: #722103)
Checksums-Sha1:
 e1a78947d0da569f61564366875b5f8216e71731 2211 sbuild_0.65.0-1.dsc
 56981eb635917ea1f25bef52a5fdac30604317c2 584238 sbuild_0.65.0.orig.tar.gz
 bf5fc61e1e2dd4983b529cbfa7c6fa6ae3244dde 50120 sbuild_0.65.0-1.debian.tar.xz
 27fce893c17ab4555bb02e90bc59a7bc14944dbc 291050 libsbuild-perl_0.65.0-1_all.deb
 d647e2eb7de5d0c3cf24c82a3f0bda08ac8cf112 312614 sbuild_0.65.0-1_all.deb
 c41442bca66b17de8971effd360fea3c42e3df7f 293378 buildd_0.65.0-1_all.deb
Checksums-Sha256:
 eac5afbb989d0eff6718dbff340e2b1dbec30e8f8e8564f07cab212053a16b41 2211 
sbuild_0.65.0-1.dsc
 2d78cae0a09c1d7334b87c45fb4a2de32d64d492600ca06be7d8eb43a88d7eab 584238 
sbuild_0.65.0.orig.tar.gz
 d67bfd434d0b4a83b1f14e8c5aa7579951d1c59c9076056757efd60ba821a3ab 50120 
sbuild_0.65.0-1.debian.tar.xz
 7cf376654b86fe7b597be0d29da3b67a1587cf1577f1837a7e44d90d4d60a1e3 291050 
libsbuild-perl_0.65.0-1_all.deb
 68281ef0d90b366285c9d04b497f14161c2ff602957b1589492cfc681b32d008 312614 
sbuild_0.65.0-1_all.deb
 38b41958c8677be17ccd448b79af312d2f68f9eb5d8b2f9b8ff6b28918a24134 293378 
buildd_0.65.0-1_all.deb
Files:
 f765239cba6dc9ecebe5ad9f3866b3ec 2211 devel extra sbuild_0.65.0-1.dsc
 a0e4806ff60418bac3ea31d4b964a532 584238 devel extra sbuild_0.65.0.orig.tar.gz
 9d693cac94f66ce1b2f9841fbfd68910 50120 devel extra 
sbuild_0.65.0-1.debian.tar.xz
 6336273bd515916d090ff631da413758 291050 perl extra 
libsbuild-perl_0.65.0-1_all.deb
 38237fcc180441e42c9f48bf47647c08 312614 devel extra sbuild_0.65.0-1_all.deb
 627fbc34a04a74e6fe2c42fc70e7f1fb 293378 devel extra buildd_0.65.0-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUQUhSAAoJEPuGMlGob55HiJoQALIg5wIhx8JGa5qgPkx9vBTD
X8aYNQEW3NwrB1IIqJW/nLm0ES2eD1nU7FoIPPV2eBxwwnPCm06F1Ew/o3XRKldP
/e2DnAr8IoIcn9ToGA/jNQTDpVH0alqz56c3oPgIWbgu0yGeYi31w1VUxQ50IHH0
8dWyWWXMe5a6iCYeiCZ/WT7U5Xd2RpFwrO8iq1jMcg132mQp6HriK5Kr7C2G5g9w
mt5QZ3BfaZVlZNZfNYj7BR3aCVHXtZKSLBwmtI6TZkMxC9pE4Xmx3mxxhTQNGhkR
QyhtlecRJY0Igp9JN1E5RBBc2d1OcWPYxZa+yD/RcvsXVMDnL7L/W7XZOBxrS+Tf
wQz33t7Pdls407DjyzSuVYhdfj6I4e5ILcbxjwZvRxRohLZJeWK5nLwcDOLVsdpO
uwjxzcVOL+1KaCREaLlr3o2+E2Sw89pI12kPENGIDZ0knRiBC0AvmpGNvsfJtggI
9glp6o7V9HpvLf4PaUN+qyw3clsVn3CXcljOzCrchXc5h+IuIAoOHKDkehK+UqLU
VtT5WjefspUwJcXdFL63go1TMm7cLAEmuiJUhW/cZh4pHpSUi2jVz+33mnO5y9Zy
75/GV4bwivQwN2Azqj7tv9ots/T+u45x0Ib1K9GgLq33jO1gSTyrEKgR4PLvwVXy
tkR5//uqf6qTCJdEvUjx
=YQM/
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to