[From nobody Thu Nov  5 20:37:09 2026
Received: (at submit) by bugs.debian.org; 5 Nov 2026 12:09:40 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-7.9 required=4.0 tests=BAYES_00,FOURLA,
 FVGT_m_MULTI_ODD,NO_RELAYS,XMAILER_REPORTBUG autolearn=ham
 autolearn_force=no version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 47; hammy, 150; neutral, 218; spammy,
 0. spammytokens: hammytokens:0.000-+--XDebbugsCc,
 0.000-+--X-Debbugs-Cc, 0.000-+--H*Ad:N*Bug, 0.000-+--HTo:N*Debian,
 0.000-+--forky
Return-path: &lt;seb128@ubuntu.com&gt;
Received: via submission by buxtehude.debian.org with esmtp (Exim 4.96)
 (envelope-from &lt;seb128@ubuntu.com&gt;) id 1xOwHh-00EDfh-3B
 for submit@bugs.debian.org; Thu, 05 Nov 2026 12:09:40 +0000
Content-Type: multipart/mixed; boundary=&quot;===============6951759930151267041==&quot;
MIME-Version: 1.0
From: Sebastien Bacher &lt;seb128@ubuntu.com&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: nginx-dev: conf_flags corrupted when built with dash 0.5.13,
 modules FTBFS
Message-ID: &lt;179388057114.228078.3858745707794646799.reportbug@seb128-ThinkPad-T16&gt;
X-Mailer: reportbug 13.2.0+ubuntu1
Date: Thu, 05 Nov 2026 13:09:31 +0100
Delivered-To: submit@bugs.debian.org

This is a multi-part MIME message sent by reportbug.


--===============6951759930151267041==
Content-Type: text/plain; charset=&quot;us-ascii&quot;
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 &quot;NGX_CONF_FLAGS=( $${flags} )&quot; &gt; $(BUILDDIR_src)/conf_flags

and the flags contain:

	--override-system=&quot;$(... | sed 's/-.*$//; s/^./\U&amp;/; s/Gnu/\U&amp;/g;')&quot;

Since 0.5.13, the dash echo builtin understands the \uXXXX and \UXXXXXXXX
escapes (they came with $'...' support, upstream commit 776424a8f915 &quot;parser:
Add dollar single quote&quot;). Here no hex digits follow \U, and dash writes a NUL
byte in its place:

	$ grep -ao 's/^./.&amp;/' /usr/share/nginx/src/conf_flags | od -c
	0000000   s   /   ^   .   /  \0   &amp;   /  \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
&quot;Linux:*&quot;, 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 &quot;not
found&quot;), 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=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=&quot;0001-d-rules-write-conf_flags-with-printf.patch&quot;

Description: write nginx-dev's conf_flags with printf instead of echo
 The --override-system flag contains the sed expression 's/^./\U&amp;/'.
 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 &lt;sebastien.bacher@canonical.com&gt;
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 &quot;NGX_CONF_FLAGS=( $${flags} )&quot; &gt; $(BUILDDIR_src)/conf_flags
+	printf '%s\n' &quot;NGX_CONF_FLAGS=( $${flags} )&quot; &gt; $(BUILDDIR_src)/conf_flags
 	pod2man debian/debhelper/dh_nginx &gt; $(BUILDDIR_src)/dh_nginx.1
 
 override_dh_install-arch:

--===============6951759930151267041==--
]