NetBSD Problem Report #39459
From paul@whooppee.com Thu Sep 4 23:48:23 2008
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 96C4163B11D
for <gnats-bugs@gnats.NetBSD.org>; Thu, 4 Sep 2008 23:48:23 +0000 (UTC)
Message-Id: <20080904234822.D551558FD@quicky.whooppee.com>
Date: Thu, 4 Sep 2008 16:48:22 -0700 (PDT)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@gnats.NetBSD.org
Subject: etcupdate can't parse directory names with special chars
X-Send-Pr-Version: 3.95
>Number: 39459
>Category: misc
>Synopsis: etcupdate can't parse directory name with special chars
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 04 23:50:00 +0000 2008
>Closed-Date: Sun Sep 07 15:32:54 +0000 2008
>Last-Modified: Sun Sep 07 15:32:54 +0000 2008
>Originator: Paul Goyette
>Release: NetBSD 4.99.72
>Organization:
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------
>Environment:
System: NetBSD quicky.whooppee.com 4.99.72 NetBSD 4.99.72 (QUICKY (ASUS M2N32 WS) 2008-09-04 20:04:46) #0: Thu Sep 4 13:13:22 PDT 2008 paul@speedy.whooppee.com:/build/obj/amd64/sys/arch/amd64/compile/QUICKY amd64
Architecture: x86_64
Machine: amd64
>Description:
etcupdate cannot parse "-s <dir>" when <dir> has special chars
>How-To-Repeat:
Execute the following command:
{107} etcupdate -al -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
*** Cannot understand -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
Usage: etcupdate [options]
>Fix:
Not known
>Release-Note:
>Audit-Trail:
From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/39459: etcupdate can't parse directory names with special
chars
Date: Fri, 5 Sep 2008 09:47:41 +0200
On Thu, 4 Sep 2008 23:50:00 +0000 (UTC)
paul@whooppee.com wrote:
> >Description:
> etcupdate cannot parse "-s <dir>" when <dir> has special chars
> >How-To-Repeat:
> Execute the following command:
>
> {107} etcupdate -al -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
> *** Cannot understand -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
I don't think this counts as a bug, since it's documented in the man page:
-s tgzfile The location of one or more set files (or ``tgz
files'') from a binary distribution of NetBSD. Each set file
is a compressed archive containing reference files. More than
one set file may be specified, either by using a single -s option
with a colon-separated list of tgzfile names, or by using multiple
-s options; this is likely to be useful to specify the locations
of both the etc.tgz and xetc.tgz set files. Note that file
names may not contain embedded colon (`:') characters, because
that would conflict with the use of the colon character to
delimit multiple file names with a single argument.
Kind regards
dieter
From: Alan Barrett <apb@netbsd.org>
To: gnats-bugs@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: misc/39459: etcupdate can't parse directory names with special
chars
Date: Fri, 5 Sep 2008 09:59:12 +0200
On Thu, 04 Sep 2008, paul@whooppee.com wrote:
> {107} etcupdate -al -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
> *** Cannot understand -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
Colons in particular will be a problem.
The reason is that etcupdate's "-s" option takes several different
types of arguments, and one of the possible types is a colon-separated
list of files (e.g. {etcupdate -s etc.tgz:xetc.tgz}). The main reason
that etcupdate does this is because postinstall does the same. The
main reason that postinstall accepts a colon-separated list of files
is to make it easy for etcupdate to invoke postinstall. For example,
if you run {etcupdate -s etc.tgz -s xetc.tgz} then etcupdate will run
{postinstall -s etc.tgz:xetc.tgz [other options]}.
The obvious way of fixing this would be to remove the ability to use
colon-separated lists of file names, and to let multiple "-s" options to
etcupdate be passed through as multiple "s" options to etcupdate. The
quoting issues are a bit of a problem, but I can deal with them if there
is no objection to removing this syntax.
--apb (Alan Barrett)
From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/39459: etcupdate can't parse directory names with special
chars
Date: Fri, 5 Sep 2008 10:37:44 +0200
On Fri, 5 Sep 2008 08:05:06 +0000 (UTC)
Alan Barrett <apb@netbsd.org> wrote:
> The obvious way of fixing this would be to remove the ability to use
> colon-separated lists of file names, ...
or check for the existence of the whole argument before splitting on
colons?
Kind regards
dieter
>
> --apb (Alan Barrett)
>
>
From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: misc/39459: etcupdate can't parse directory names with special
chars
Date: Fri, 5 Sep 2008 04:10:43 -0700 (PDT)
On Fri, 5 Sep 2008, dieter roelants wrote:
> > {107} etcupdate -al -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
> > *** Cannot understand -s /build/release-2008-09-04_20:04:46/amd64/binary/sets/etc.tgz
>
> I don't think this counts as a bug, since it's documented in the man page:
>
> -s tgzfile The location of one or more set files (or ``tgz
> files'') from a binary distribution of NetBSD. Each set file
> is a compressed archive containing reference files. More than
> one set file may be specified, either by using a single -s option
> with a colon-separated list of tgzfile names, or by using multiple
> -s options; this is likely to be useful to specify the locations
> of both the etc.tgz and xetc.tgz set files. Note that file
> names may not contain embedded colon (`:') characters, because
> that would conflict with the use of the colon character to
> delimit multiple file names with a single argument.
Ah! That will teach me to RTFM! :)
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------
From: Alan Barrett <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39459 CVS commit: src/usr.sbin/etcupdate
Date: Sun, 7 Sep 2008 15:20:02 +0000 (UTC)
Module Name: src
Committed By: apb
Date: Sun Sep 7 15:20:02 UTC 2008
Modified Files:
src/usr.sbin/etcupdate: etcupdate
Log Message:
* Allow colons to appear in the names of tgz files, to address PR 39459.
* Allow spaces to appear in the name of the TEMPROOT and SRCDIR directories.
* Remove the ability to specify a colon-separated list of tgz files
using a single "-s" option, because ":" is now a valid character within the
name of a single file. Callers should use multiple "-s" options
instead.
To generate a diff of this commit:
cvs rdiff -r1.42 -r1.43 src/usr.sbin/etcupdate/etcupdate
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Alan Barrett <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39459 CVS commit: src/usr.sbin/postinstall
Date: Sun, 7 Sep 2008 15:22:47 +0000 (UTC)
Module Name: src
Committed By: apb
Date: Sun Sep 7 15:22:47 UTC 2008
Modified Files:
src/usr.sbin/postinstall: postinstall
Log Message:
* Allow colons to appear in the names of tgz files, to address PR 39459.
* Remove the ability to specify a colon-separated list of tgz files
using a single "-s" option, because ":" is now a valid character within the
name of a single file. Callers should use multiple "-s" options
instead.
To generate a diff of this commit:
cvs rdiff -r1.66 -r1.67 src/usr.sbin/postinstall/postinstall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: apb@NetBSD.org
State-Changed-When: Sun, 07 Sep 2008 15:29:57 +0000
State-Changed-Why:
Rvision 1.43 of etcupdate and revision 1.67 of postinstall shuold now be
able to handle any character except newline in file or dir names.
State-Changed-From-To: feedback->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sun, 07 Sep 2008 15:32:54 +0000
State-Changed-Why:
Thanks for changing this!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.