🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #2764

Bug#1152651: Upstream patch should be used for 'printenv' and 'env' quoting in 9.12

#2764
From: Collin Funk
Date: Fri, 30 Oct 2026 23:00
44 lines
4276 bytes
Package: coreutils
Version: 9.12-0.2
Severity: normal
X-Debbugs-Cc: collin.funk1@gmail.com, P@draigBrady.com, daniel@debian.org

Hi,

For context, I co-maintain GNU coreutils upstream.

I see that Debian updated to coreutils-9.12. In it we made a quoting
change to 'env' and 'printenv' which were a bit too aggressive. A large
part of the rationale was improved robustness, avoiding applications
getting confused with environment variables that may have newlines or
other strange characters. Here is the pre-9.12 behavior:

    $ env -i ENV='hello'$'\n''FAKE_ENV=goodbye' env
    ENV=hello
    FAKE_ENV=goodbye

Here is the 9.12 behavior, making it clear that FAKE_ENV is not an
environment variable:

    $ env -i ENV='hello'$'\n''FAKE_ENV=goodbye' ~/.local/bin/env
    ENV='hello'$'\n''FAKE_ENV=goodbye'

However, this caused some issues that we did not foresee from our
scanning of Debian Code Search [1] [2].

I suggest applying a patch we made after the 9.12 release [3], which quotes
only when standard output is a terminal. This avoids the issues that
arose from the change in 9.12. Apologies for the additional work.

P.S., while you are there, I also suggest adding libcap-dev to the
Build-Depends. Currently, on Debian, the package is being built without
capability support since libsystemd, which coreutils depends on, no
longer brings in libcap as a dependency. I reported that, along with a
patch in 1150670 [4].

Collin

[1] https://lists.gnu.org/archive/html/coreutils/2026-09/msg00061.html
[2] https://lists.gnu.org/archive/html/coreutils/2026-09/msg00062.html
[3] https://github.com/coreutils/coreutils/commit/782a1e5bc2090212273bb731dceee2cc2a071e54.patch
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1150670
Technical Details
Message-ID: <NU3JL-8Ttn-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Collin Funk <collin.funk1@gmail.com>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1152651: Upstream patch should be used for 'printenv' and 'env' quoting in 9.12
Date: Sat, 31 Oct 2026 00:00:01 +0100
Message-ID: <NU3JL-8Ttn-5@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Oct 30 22:59:11 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: 2.077
Reply-To: Collin Funk <collin.funk1@gmail.com>, 1152651@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: collin.funk1@gmail.com, p@draigbrady.com, daniel@debian.org, mstone@debian.org
X-Debian-Pr-Message: report 1152651
X-Debian-Pr-Package: coreutils
X-Debian-Pr-Source: coreutils, coreutils-from
X-Gm-Message-State: AFq9FYIFxiQdfJvsTNFXihEXdFoQ23cqXpBMs+FqSOtiV5GkTV/phY7U
	lVBZWgMkicvZjYveExjiUEcLrSLRLf/dC21x7nibwdpaRIpL4tIWp6mQAR43K+Df
X-Gm-Gg: AYBFou1U60o2NqjGgIZkxR7evG0Em2vMrbBUts0wk/2e3PXW/zuOM/ua2PvD+IqCoc5
	3hhLSXKFqEJEBwLxGhzAtFg7w8xpCh41V8RZCDA95wFc4Q3htHlTKXiDpSyNjKwu0ahRpucOSza
	UPWix95QZmOE6v2d2IZKKbfvycy3DeVyKYpGjtF8SajWSqAgzsdAFUeiv1UnNJbpVmZDV2qsPHu
	ibLp3Uw9ynBzzytkb1sgJ3hrUJGhN14et3YyBoaaVug9biqLVw/WCf93C5xubXWC/E5giO8veO/
	uPKJpKpzafSAj9zrFjtp48DM2yhEINwnc9Q5E0hsOu1UJgOblqBP1Y9oazeUaZcm3f1+rCGsrV9
	YrxyODgTre6HVs9WTKIA0WTJRtbDPV6ROkEV78I1iJ4MEwEwU7dW/t8QXRAIeDaILII1GNEJ8u3
	CfGwtbex5LL0ycb9RGsvEPRWRBFBZEx4+uWEh7sp9+BfoL0bt4uWAFRAVeSwzmTac0w5keIk1B8
	YpWB/aQrCBgBocSozSIhneckuEWG0FdJBu4dtnSvB7pezXpkQ/0f5DT8fXoAff353SlJiGwf9FK
	qA6VPdMSYuQ=
X-Received: by 2002:a05:701b:2806:b0:190:b2de:1549 with SMTP id a92af1059eb24-1ac557770c0mr4385796c88.1.1793401019534;
        Fri, 30 Oct 2026 15:56:59 -0700 (PDT)
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1999844
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 44
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Fri, 30 Oct 2026 15:56:57 -0700
X-Original-Message-ID: <87pkwq7q6e.fsf@gmail.com>