[Reproducible-commits] [dpkg] 47/90: dpkg-checkbuilddeps: Add support for ignoring built-in build dependencies
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat Aug 29 18:26:14 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 98b3341f5f46866208862ff40e4336ff1a7e1cd3
Author: Guillem Jover <guillem at debian.org>
Date: Sun Jul 5 23:59:24 2015 +0200
dpkg-checkbuilddeps: Add support for ignoring built-in build dependencies
There is currently no way to require that «Build-Essential: yes»
packages be installed, so on Debian-based systems we have to rely on
the build-essential metapackage, which is slightly wrong.
In addition users that know what they are doing, might want to disable
only the implicit build dependencies and conflicts, but not the entire
dependency checks, and there was no way to do that.
Add new «dpkg-buildpackage --ignore-builtin-builddeps» and
«dpkg-checkbuilddeps -I» options.
Closes: #480638, #571671
---
debian/changelog | 3 +++
man/dpkg-buildpackage.1 | 7 ++++++-
man/dpkg-checkbuilddeps.1 | 9 +++++++--
scripts/dpkg-buildpackage.pl | 4 ++++
scripts/dpkg-checkbuilddeps.pl | 9 +++++++--
5 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index dbe342b..fb193c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ dpkg (1.18.2) UNRELEASED; urgency=low
Reported by Niels Thykier <niels at thykier.net>.
* Move the implicit build-essential:native Build-Depends from
dpkg-checkbuilddeps to a new vendor hook, as it is Debian-specific.
+ * Add support for ignoring built-in build dependencies and conflicts
+ with the new «dpkg-buildpackage --ignore-builtin-builddeps» and
+ «dpkg-checkbuilddeps -I» options. Closes: #480638, #571671
* Perl modules:
- Remove non-functional timezone name support from
Dpkg::Changelog::Entry::Debian.
diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.1
index 4543967..9b6fb4f 100644
--- a/man/dpkg-buildpackage.1
+++ b/man/dpkg-buildpackage.1
@@ -19,7 +19,7 @@
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see <https://www.gnu.org/licenses/>.
.
-.TH dpkg\-buildpackage 1 "2013-12-12" "Debian Project" "dpkg utilities"
+.TH dpkg\-buildpackage 1 "2015-07-05" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-buildpackage \- build binary or source packages from sources
.
@@ -213,6 +213,11 @@ default behavior.
.B \-d
Do not check build dependencies and conflicts.
.TP
+.B \-\-ignore\-builtin\-builddeps
+Do not check built-in build dependencies and conflicts (since dpkg 1.18.2).
+These are the distribution specific implicit build dependencies usually
+required in a build environment, the so called Build-Essential package set.
+.TP
.B \-nc
Do not clean the source tree (implies \fB\-b\fP if nothing else has been
selected among \fB\-F\fP, \fB\-g\fP, \fB\-G\fP, \fB\-B\fP, \fB\-A\fP
diff --git a/man/dpkg-checkbuilddeps.1 b/man/dpkg-checkbuilddeps.1
index 90a1c5e..1449410 100644
--- a/man/dpkg-checkbuilddeps.1
+++ b/man/dpkg-checkbuilddeps.1
@@ -1,7 +1,7 @@
.\" dpkg manual page - dpkg-checkbuilddeps(1)
.\"
.\" Copyright © 2001 Joey Hess <joeyh at debian.org>
-.\" Copyright © 2007-2012 Guillem Jover <guillem at debian.org>
+.\" Copyright © 2007-2013, 2015 Guillem Jover <guillem at debian.org>
.\" Copyright © 2008-2011 Raphaël Hertzog <hertzog at debian.org>
.\"
.\" This is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see <https://www.gnu.org/licenses/>.
.
-.TH dpkg\-checkbuilddeps 1 "2013-09-17" "Debian Project" "dpkg utilities"
+.TH dpkg\-checkbuilddeps 1 "2015-07-05" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-checkbuilddeps \- check build dependencies and conflicts
.
@@ -51,6 +51,11 @@ Ignore \fBBuild\-Depends\-Indep\fP and \fBBuild\-Conflicts\-Indep\fP
lines. Use when only arch-dep packages will be built, or combine with
\fB\-A\fP when only a source package is to be built.
.TP
+.B \-I
+Ignore built-in build depends and conflicts (since dpkg 1.18.2).
+These are implicit dependencies that are usually required on a specific
+distribution, the so called Build-Essential package set.
+.TP
.BI "\-d " build-depends-string
.TP
.BI "\-c " build-conflicts-string
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index a3f6080..17ada97 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -138,6 +138,7 @@ my $cleansource;
my $parallel;
my $parallel_force;
my $checkbuilddep = 1;
+my $check_builtin_builddep = 1;
my @source_opts;
my $check_command = $ENV{DEB_CHECK_COMMAND};
my @check_opts;
@@ -259,6 +260,8 @@ while (@ARGV) {
$signkey = $1;
} elsif (/^-([dD])$/) {
$checkbuilddep = ($1 eq 'D');
+ } elsif (/^--ignore-builtin-builddeps$/) {
+ $check_builtin_builddep = 0;
} elsif (/^-s(gpg|pgp)$/) {
# Deprecated option
warning(g_('-s%s is deprecated; always using gpg style interface'), $1);
@@ -502,6 +505,7 @@ if ($checkbuilddep) {
push @checkbuilddep_opts, '-A' if ($include & BUILD_ARCH_DEP) == 0;
push @checkbuilddep_opts, '-B' if ($include & BUILD_ARCH_INDEP) == 0;
+ push @checkbuilddep_opts, '-I' if not $check_builtin_builddep;
push @checkbuilddep_opts, "--admindir=$admindir" if $admindir;
system('dpkg-checkbuilddeps', @checkbuilddep_opts);
diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl
index 522ac14..ba3fa90 100755
--- a/scripts/dpkg-checkbuilddeps.pl
+++ b/scripts/dpkg-checkbuilddeps.pl
@@ -47,6 +47,7 @@ sub usage {
'Options:
-A ignore Build-Depends-Arch and Build-Conflicts-Arch.
-B ignore Build-Depends-Indep and Build-Conflicts-Indep.
+ -I ignore built-in build dependencies and conflicts.
-d build-deps use given string as build dependencies instead of
retrieving them from control file
-c build-conf use given string for build conflicts instead of
@@ -64,6 +65,7 @@ sub usage {
my $ignore_bd_arch = 0;
my $ignore_bd_indep = 0;
+my $ignore_bd_builtin = 0;
my ($bd_value, $bc_value);
my $bp_value;
my $host_arch = get_host_arch();
@@ -73,6 +75,7 @@ my @options_spec = (
'version' => sub { version(); exit 0; },
'A' => \$ignore_bd_arch,
'B' => \$ignore_bd_indep,
+ 'I' => \$ignore_bd_builtin,
'd=s' => \$bd_value,
'c=s' => \$bc_value,
'a=s' => \$host_arch,
@@ -98,14 +101,16 @@ my $facts = parse_status("$admindir/status");
unless (defined($bd_value) or defined($bc_value)) {
my @bd_list;
- push @bd_list, run_vendor_hook('builtin-build-depends');
+ push @bd_list, run_vendor_hook('builtin-build-depends')
+ if not $ignore_bd_builtin;
push @bd_list, $fields->{'Build-Depends'};
push @bd_list, $fields->{'Build-Depends-Arch'} if not $ignore_bd_arch;
push @bd_list, $fields->{'Build-Depends-Indep'} if not $ignore_bd_indep;
$bd_value = deps_concat(@bd_list);
my @bc_list;
- push @bc_list, run_vendor_hook('builtin-build-conflicts');
+ push @bc_list, run_vendor_hook('builtin-build-conflicts')
+ if not $ignore_bd_builtin;
push @bc_list, $fields->{'Build-Conflicts'};
push @bc_list, $fields->{'Build-Conflicts-Arch'} if not $ignore_bd_arch;
push @bc_list, $fields->{'Build-Conflicts-Indep'} if not $ignore_bd_indep;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list