Article View: linux.debian.bugs.dist
Article #3330Bug#1153098: nginx-dev: conf_flags corrupted when built with dash 0.5.13, modules FTBFS
From: Sebastien Bacher
Date: Thu, 05 Nov 2026 12:20
Date: Thu, 05 Nov 2026 12:20
106 lines
6095 bytes
6095 bytes
This is a multi-part MIME message sent by reportbug.
--===============6951759930151267041==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Source: nginx
Version: 1.30.4-7ubuntu1
Severity: important
Tags: patch ftbfs
X-Debbugs-Cc: seb128@ubuntu.com
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu tenacious ubuntu-patch
Dear Maintainer,
nginx-dev built with dash 0.5.13 ships a broken /usr/share/nginx/src/conf_flags,
and every module built against it fails to build. Debian still has dash
0.5.12, so you don't see it yet, but Ubuntu has dash 0.5.13 and all 25 nginx
module rebuilds there fail on every architecture.
debian/rules writes the file with:
echo "NGX_CONF_FLAGS=( $${flags} )" > $(BUILDDIR_src)/conf_flags
and the flags contain:
--override-system="$(... | sed 's/-.*$//; s/^./\U&/; s/Gnu/\U&/g;')"
Since 0.5.13, the dash echo builtin understands the \uXXXX and \UXXXXXXXX
escapes (they came with $'...' support, upstream commit 776424a8f915 "parser:
Add dollar single quote"). Here no hex digits follow \U, and dash writes a NUL
byte in its place:
$ grep -ao 's/^./.&/' /usr/share/nginx/src/conf_flags | od -c
0000000 s / ^ . / \0 & / \n
The sed expression then no longer uppercases the first letter, so a module
build calls configure with --override-system=linux. auto/os/conf only matches
"Linux:*", so the build falls back to the generic Unix configuration and never
includes src/os/unix/ngx_linux_config.h. That means _GNU_SOURCE is not defined
(note accept4(), sched_setaffinity() and strerrordesc_np() reported "not
found"), and glibc then doesn't define struct in6_pktinfo:
checking for OS
+ linux 3.16.0 x86_64
...
src/event/ngx_event_udp.h:46:27: error: field 'pkt6' has incomplete type
46 | struct in6_pktinfo pkt6;
Full log (libnginx-mod-http-auth-jwt, built against nginx-dev 1.30.6-2ubuntu1):
https://launchpadlibrarian.net/883485254/buildlog_ubuntu-tenacious-amd64.libnginx-mod-http-auth-jwt_2.5.0-3build1_BUILDING.txt.gz
The attached patch writes the file with printf '%s\n', which doesn't
interpret backslashes in its argument, so it works with any /bin/sh. The only
Ubuntu delta in debian/rules is --build=Ubuntu, so this affects Debian as soon
as dash 0.5.13 reaches unstable. Ubuntu bug: https://bugs.launchpad.net/bugs/2173081
Thanks,
Sebastien
-- System Information:
Debian Release: forky/sid
APT prefers resolute-updates
APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute'), (100, 'resolute-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 7.0.0-42-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
--===============6951759930151267041==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="0001-d-rules-write-conf_flags-with-printf.patch"
Description: write nginx-dev's conf_flags with printf instead of echo
The --override-system flag contains the sed expression 's/^./\U&/'.
dash 0.5.13's echo builtin parses \U as a Unicode escape and, with no hex
digits after it, writes a NUL byte, so modules configure for a generic OS
instead of Linux and fail to build.
Author: Sebastien Bacher <sebastien.bacher@canonical.com>
Forwarded: not-needed
Last-Update: 2026-11-05
--- a/debian/rules
+++ b/debian/rules
@@ -104,7 +104,7 @@ override_dh_auto_build-indep:
sed -i '/^# create Makefile/,/^END$$/d' $(BUILDDIR_src)/auto/make $(BUILDDIR_src)/auto/init $(BUILDDIR_src)/auto/install
find $(CURDIR)/src -type f -name '*.h' -printf 'src/%P\0' | tar -C $(CURDIR) --null --files-from - -c | tar -C $(BUILDDIR_src)/ -x
if [ -e $(CURDIR)/configure ]; then cp $(CURDIR)/configure $(BUILDDIR_src)/; fi
- echo "NGX_CONF_FLAGS=( $${flags} )" > $(BUILDDIR_src)/conf_flags
+ printf '%s\n' "NGX_CONF_FLAGS=( $${flags} )" > $(BUILDDIR_src)/conf_flags
pod2man debian/debhelper/dh_nginx > $(BUILDDIR_src)/dh_nginx.1
override_dh_install-arch:
--===============6951759930151267041==--
Technical Details
Message-ID:
<NW4BH-9Zkf-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Sebastien Bacher <seb128@ubuntu.com> Newsgroups: linux.debian.bugs.dist Subject: Bug#1153098: nginx-dev: conf_flags corrupted when built with dash 0.5.13, modules FTBFS Date: Thu, 05 Nov 2026 13:20:01 +0100 Message-ID: <NW4BH-9Zkf-1@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Thu Nov 5 12:11:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.65 Reply-To: Sebastien Bacher <seb128@ubuntu.com>, 1153098@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: seb128@ubuntu.com, pkg-nginx-maintainers@alioth-lists.debian.net X-Debian-Pr-Message: report 1153098 X-Debian-Pr-Package: src:nginx X-Debian-Pr-Keywords: ftbfs patch X-Debian-Pr-Source: nginx Content-Type: multipart/mixed; boundary="===============6951759930151267041==" MIME-Version: 1.0 X-Mailer: reportbug 13.2.0+ubuntu1 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2000787 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 106 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 05 Nov 2026 13:09:31 +0100 X-Original-Message-ID: <179388057114.228078.3858745707794646799.reportbug@seb128-ThinkPad-T16>