GNU bug report logs - #70411
[bug] install(1) fails to read /dev/stdin on Darwin

Previous Next

Package: coreutils;

Reported by: Alejandro Colomar <alx <at> kernel.org>

Date: Tue, 16 Apr 2024 05:03:03 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Alejandro Colomar <alx <at> kernel.org>
Cc: Marc Chantreux <mc <at> unistra.fr>, Sergei Trofimovich <slyich <at> gmail.com>, 70411 <at> debbugs.gnu.org, Eli Schwartz <eschwartz93 <at> gmail.com>
Subject: bug#70411: [bug] install(1) fails to read /dev/stdin on Darwin
Date: Tue, 16 Apr 2024 20:44:06 +0100
On 16/04/2024 15:47, Alejandro Colomar wrote:
> Hi Pádraig,
> 
> On Tue, Apr 16, 2024 at 03:25:22PM +0100, Pádraig Brady wrote:
>>> What version of darwin is this? I can't repro on Darwin 21.6.0 (MacOSX 12.6).
>>> The issue seems to be that /dev/stdin returns a varying inode which install(1) doesn't like currently
> 
> I don't know.  The reporter didn't tell.  I see you also asked on the
> Github original report.
> 
>> Note that check originally came from:
>> https://github.com/coreutils/coreutils/commit/dea4262fa
>>
>> I suppose we could relax the check as follows, for files of apparent size 0
>> which would cater for this, and others that may also have unstable inodes.
> 
> Hmmmm.  Since you couldn't reprodude it in a recent Darwin, maybe it's
> just a bug in an old Darwin.  And since noone else seems to have met
> this Darwin's bug, maybe we can just ignore it.  (And if it were a
> regression in a more recent Darwin, hopefully they should fix their
> kernel.)
> 
> I'm not happy relaxing a security check, without making sure that there
> are no implications at all.
> 
> I vote for claiming only limited support to such a Darwin system.  I
> already workarounded it in the Linux man-pages, by not piping to
> install(1) in a common task; and nobody else seems to be affected.
> 
> Unless you feel confident that it's perfectly fine to do it.  But I have
> no sympathy for workarounding Darwin bugs here.

I agree if it's older Darwin only, we can ignore.
The version I tested on is 3 years old now though,
so I'm not sure whether the issue is on newer or older.

Note we had similar issue on Solaris,
where we used an fstat() wrapper to adjust things:
https://bugs.gnu.org/35713

A related suggestion was from Marc Chantreux (CC'd)
to support '-' to imply stdin, which would be more portable.
There is some merit to that suggestion too.

cheers,
Pádraig




This bug report was last modified 1 year and 117 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.