GNU bug report logs - #14728
filenames starting with a dash confuse automake

Previous Next

Package: automake;

Reported by: Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>

Date: Thu, 27 Jun 2013 04:39:01 UTC

Severity: minor

Tags: moreinfo, wontfix

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14728 in the body.
You can then email your comments to 14728 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14728; Package automake. (Thu, 27 Jun 2013 04:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 27 Jun 2013 04:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>
To: bug-automake <at> gnu.org
Subject: filenames starting with a dash confuse automake
Date: Thu, 27 Jun 2013 06:37:40 +0200
[Message part 1 (text/plain, inline)]
Hi,
I encountered this in systemd, which recently added a file with 
a dash in the name [1].

Basically, various commands like install and rm are called
without guarding the file list with --, which causes them
to interpret the file name as an option. In case of
systemd, 'make uninstall' and thus 'make distcheck' are
affected, but depending on the type of the file (SCRIPT, DATA, etc),
other targets can be affected.

$ make install DESTDIR=/var/tmp/inst2
make[1]: Entering directory `home/zbyszek/src/automake-dash'
 /usr/bin/mkdir -p '/var/tmp/inst2/usr/local/bin'
 /usr/bin/install -c -.sh '/var/tmp/inst2/usr/local/bin'
/usr/bin/install: invalid option -- '.'

Attached toy "project" reproduces this error.

Thanks,
Zbyszek

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=4ad49000
[configure.ac (text/plain, attachment)]
[Makefile.am (text/plain, attachment)]
[-.sh (application/x-sh, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#14728; Package automake. (Thu, 27 Jun 2013 07:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 14728 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Zbigniew Jędrzejewski-Szmek
 <zbyszek <at> in.waw.pl>
Cc: 14728 <at> debbugs.gnu.org
Subject: Re: bug#14728: filenames starting with a dash confuse automake
Date: Thu, 27 Jun 2013 09:55:53 +0200
tags 14728 + moreinfo
severity 14728 minor
stop

On 06/27/2013 06:37 AM, Zbigniew Jędrzejewski-Szmek wrote:
> Hi,
> I encountered this in systemd, which recently added a file with 
> a dash in the name [1].
>
I fear this falls in the category "Doctor, it hurts when I do that
-- Don't do that, then" :-)

To elaborate, on Unix systems, having filenames starting with a
dash has always been very problematic, and generally a terrible
idea.  Do you have a very, *very* good reason to have such a file?

> Basically, various commands like install and rm are called
> without guarding the file list with --,
>
That's because such usage might be unportable; well, it surely was
in the olden days, but I'm not sure whether that is still relevant
on today's system.  Still, I'm not comfortable changing the old
assumption and risking regressions for the users of oldish or
proprietary systems.

Anyway, if you can send a patch that fixes the issue for you
without risking regressions or complicating the code base, I'm
ready to consider it (no promise though).

> which causes them
> to interpret the file name as an option. In case of
> systemd, 'make uninstall' and thus 'make distcheck' are
> affected, but depending on the type of the file (SCRIPT, DATA, etc),
> other targets can be affected.
> 
> $ make install DESTDIR=/var/tmp/inst2
> make[1]: Entering directory `home/zbyszek/src/automake-dash'
>  /usr/bin/mkdir -p '/var/tmp/inst2/usr/local/bin'
>  /usr/bin/install -c -.sh '/var/tmp/inst2/usr/local/bin'
> /usr/bin/install: invalid option -- '.'
> 
> Attached toy "project" reproduces this error.
> 
> Thanks,
> Zbyszek
> 
> [1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=4ad49000
> 
So, in conclusion, I'm 90-10 for closing this bug as a "wontfix";
although a simple patch or the explanation of a *very* good reason
for having a dash-starting filename might change my mind.  For the
moment, I'm thus not closing the bug.

Regards,
  Stefano






Added tag(s) moreinfo. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2013 07:57:04 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2013 07:57:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14728; Package automake. (Fri, 28 Jun 2013 18:26:01 GMT) Full text and rfc822 format available.

Message #15 received at 14728 <at> debbugs.gnu.org (full text, mbox):

From: Josh Triplett <josh <at> joshtriplett.org>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 14728 <at> debbugs.gnu.org,
 Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>
Subject: Re: bug#14728: filenames starting with a dash confuse automake
Date: Fri, 28 Jun 2013 11:22:19 -0700
On Thu, Jun 27, 2013 at 09:55:53AM +0200, Stefano Lattarini wrote:
> On 06/27/2013 06:37 AM, Zbigniew Jędrzejewski-Szmek wrote:
> > Hi,
> > I encountered this in systemd, which recently added a file with 
> > a dash in the name [1].
> >
> I fear this falls in the category "Doctor, it hurts when I do that
> -- Don't do that, then" :-)
> 
> To elaborate, on Unix systems, having filenames starting with a
> dash has always been very problematic, and generally a terrible
> idea.  Do you have a very, *very* good reason to have such a file?

One obvious reason: as part of a test suite for just such a problem.

> > Basically, various commands like install and rm are called
> > without guarding the file list with --,
> >
> That's because such usage might be unportable; well, it surely was
> in the olden days, but I'm not sure whether that is still relevant
> on today's system.  Still, I'm not comfortable changing the old
> assumption and risking regressions for the users of oldish or
> proprietary systems.

Putting -- before the file list might not be portable, but prefixing
filenames starting with a - with ./ seems completely portable.  Would
that work?

- Josh Triplett




Information forwarded to bug-automake <at> gnu.org:
bug#14728; Package automake. (Sat, 13 Jul 2013 22:39:02 GMT) Full text and rfc822 format available.

Message #18 received at 14728 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Josh Triplett <josh <at> joshtriplett.org>
Cc: 14728 <at> debbugs.gnu.org,
 Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl>
Subject: Re: bug#14728: filenames starting with a dash confuse automake
Date: Sat, 13 Jul 2013 23:38:07 +0100
severity 14728 minor
stop

Hello, sorry for the delay.

On 06/28/2013 07:22 PM, Josh Triplett wrote:
> On Thu, Jun 27, 2013 at 09:55:53AM +0200, Stefano Lattarini wrote:
>> On 06/27/2013 06:37 AM, Zbigniew Jędrzejewski-Szmek wrote:
>>> Hi,
>>> I encountered this in systemd, which recently added a file with 
>>> a dash in the name [1].
>>>
>> I fear this falls in the category "Doctor, it hurts when I do that
>> -- Don't do that, then" :-)
>>
>> To elaborate, on Unix systems, having filenames starting with a
>> dash has always been very problematic, and generally a terrible
>> idea.  Do you have a very, *very* good reason to have such a file?
> 
> One obvious reason: as part of a test suite for just such a problem.
>
I'm not sure this qualifies as a "very good reason", sorry.  Anyone
on Unix using system files whose name start with a dash deserves to
suffer a bit ;-)

>>> Basically, various commands like install and rm are called
>>> without guarding the file list with --,
>>>
>> That's because such usage might be unportable; well, it surely was
>> in the olden days, but I'm not sure whether that is still relevant
>> on today's system.  Still, I'm not comfortable changing the old
>> assumption and risking regressions for the users of oldish or
>> proprietary systems.
> 
> Putting -- before the file list might not be portable, but prefixing
> filenames starting with a - with ./ seems completely portable.  Would
> that work?
>
Yes, but it might complicate or slow down the code, and I think it's
not really worth spending time on it.  I won't refuse a patch in this
direction though, *if* it doesn't complicate or slow-down the code.
Otherwise, I will close this bug as "wontfix" sometime in the nearish
future.

Thanks,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#14728; Package automake. (Thu, 26 Dec 2013 17:23:01 GMT) Full text and rfc822 format available.

Message #21 received at 14728 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Zbigniew Jędrzejewski-Szmek
 <zbyszek <at> in.waw.pl>
Cc: 14728 <at> debbugs.gnu.org
Subject: Re: filenames starting with a dash confuse automake
Date: Thu, 26 Dec 2013 18:22:30 +0100
tags 14728 wontfix
close 14728
stop

Stefano Lattarini wrote:
>
> Yes, but it might complicate or slow down the code, and I think it's
> not really worth spending time on it.  I won't refuse a patch in this
> direction though, *if* it doesn't complicate or slow-down the code.
> Otherwise, I will close this bug as "wontfix" sometime in the nearish
> future.

Since no new activity has been seen on this report in the last six
months, I'm closing it as promised.

Regards,
  Stefano




Added tag(s) wontfix. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 26 Dec 2013 17:23:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14728 <at> debbugs.gnu.org and Zbigniew Jędrzejewski-Szmek <zbyszek <at> in.waw.pl> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 26 Dec 2013 17:23:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Jan 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 143 days ago.

Previous Next


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