[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Feb 27, 2023 at 10:49:48AM -0700, Sam Hartman wrote:

>     Helmut> The problem here specifically arises, because we do not have
>     Helmut> consensus on -Werror being a bad idea in release builds.

> I agree with your reading of consensus and for that reason support
> registering an option to say do not use -Werror.

Sorry if I've missed it in this thread, but who is this option supposed to
be *for*?

Generally speaking, DEB_BUILD_OPTIONS or DEB_BUILD_MAINT_OPTIONS flags are
useful for permuting the output of dpkg-buildflags, when the default output
of that command is unsuitable for a particular package or for a particular
rebuild environment.  But here, the output of dpkg-buildflags is not
incorrect because it emits neither -Werror nor -Wno-error; we are talking
about an interface to override upstream defaults, not Debian defaults.

If this is for the maintainer, it seems an unnecessary indirection to define
a flag for the maintainer to set, to configure dpkg-buildflags, to output
the correct flag that you know you want to pass to your package's build
system.  (Maybe the reasoning here is that it's a simpler interface for
maintainers that abstracts a lot of the reasoning about build systems and
makes for a more compact expression in debian/rules?  I'm not sure.)

If this is for people doing out-of-archive builds who don't want to deal
with failures from -Werror, I can see how having a single environment toggle
is useful to them; but it doesn't seem useful to *Debian* when such
out-of-archive rebuilds don't correspond to the official builds.  E.g. if
they're test builds for new toolchains, knowing that the package *could*
build, with options Debian doesn't actually use, is of limited use.  (If you
build twice, once with once without and file bugs on packages where the
results differ, I guess that's one use, but involves a lot of manual labor.)

My understanding is that the argument here is that -Werror is not a sensible
option to use for production builds, that it should only be used for
upstream test builds.  I'm not convinced this is true; I know we've more
than once caught programming errors of various severities downstream by
building on ports that upstreams would generally not be in a position to
cover in their developer test builds.  But if that's the argument, then I
think the logical desired policy outcome would be for dpkg-buildflags to be
changed to emit -Wno-error *by default*, with an option flag along the lines
of DEB_BUILD_OPTIONS=Werror that lets you turn it on instead.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: PGP signature

Reply to: