Hi!

On Thu, 2023-06-22 at 17:35:15 +0200, Sebastian Kayser wrote:
> Package: dpkg-dev
> Version: 1.21.22
> Severity: normal
> Tags: patch
> X-Debbugs-Cc: skay...@tutanota.com

> the man page for dpkg-buildpackage only includes a subset of supported flags
> for DEB_BUILD_OPTIONS and the description for the "nocheck" flags seems to
> be incorrect.

It is only supposed to include those supported or known by dpkg tools,
as the others are defined by distribution specific policies.

> The currently supported, full list of flags is available at 
> 
> https://www.debian.org/doc/debian-policy/ch-source.html#debian-rules-and-deb-build-options
> 
> I've attached an example patch to include the supported flags list in
> dpkg-buildpackage(1).

Thanks for the patch! Although in general this is backwards, the
Debian policy documents the dpkg behavior and not the other way
around. So perhaps something along the lines like the attachment
instead, while probably not what you were looking for, is something
that feels acceptable for inclusion.

Thanks,
Guillem
From dbbb968d8e92f816de9538653ee70d19b08a3681 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@debian.org>
Date: Fri, 23 Jun 2023 01:53:02 +0200
Subject: [PATCH] man: Document known DEB_BUILD_OPTIONS options

Itemize the options for easier reading. Include all the options
supported by dpkg-buildpackage or the dpkg tooling, and mention
which of those debian/rules might act on too.

Closes: #1038888
---
 man/dpkg-buildpackage.pod | 44 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 5 deletions(-)

diff --git a/man/dpkg-buildpackage.pod b/man/dpkg-buildpackage.pod
index 3da341992..a28892fe9 100644
--- a/man/dpkg-buildpackage.pod
+++ b/man/dpkg-buildpackage.pod
@@ -740,14 +740,48 @@ Overridden by the B<--sign-keyfile> option.
 
 =item B<DEB_BUILD_OPTIONS>
 
-If set, it will contain a space-separated list of options that might
-affect the build process in I<debian/rules>, and the behavior of some
-dpkg commands.
+If set, it will contain a space-separated list of options that affect
+the behavior of some dpkg commands, and might affect the build process
+in I<debian/rules> if the code in there honors them.
 
-With B<nocheck> the B<DEB_CHECK_COMMAND> variable will be ignored.
-With B<parallel=>I<N> the parallel jobs will be set to I<N>,
+The following are the options known and supported by dpkg tools, other
+options honored by I<debian/rules> might be defined by distribution
+specific policies.
+
+=over
+
+=item B<parallel=>I<N>
+
+The parallel jobs will be set to I<N>,
 overridden by the B<--jobs-try> option.
 
+=item B<nocheck>
+
+The B<DEB_CHECK_COMMAND> variable will be ignored in B<dpkg-buildpackage>.
+The I<debian/rules> in the packaging is not expected to run test suites
+during the build.
+
+=item B<noopt>
+
+If I<debian/rules> calls B<dpkg-buildflags> to set up the build flags,
+those will be set to not enable any optimizations.
+
+=item B<nostrip>
+
+The I<debian/rules> in the packaging should ensure that objects are not
+stripped from their debugging information. If I<debian/rules> includes
+the B<mk/buildtools.mk> make fragment the B<STRIP> make variable will
+respect this option.
+
+=item B<terse>
+
+The B<--no-print-directory> flags will be appended to the B<MAKEFLAGS>
+environment variable.
+The I<debian/rules> in the packaging should reduce verbosity, while not
+being completely quiet.
+
+=back
+
 =item B<DEB_BUILD_PROFILES>
 
 If set, it will be used as the active build profile(s) for the package
-- 
2.40.1

Reply via email to