NetBSD Problem Report #30168

From jtc@acorntoolworks.com  Sat May  7 21:05:47 2005
Return-Path: <jtc@acorntoolworks.com>
Received: from orac.acorntoolworks.com (adsl-66-123-74-10.dsl.pltn13.pacbell.net [66.123.74.10])
	by narn.netbsd.org (Postfix) with ESMTP id CC20663B117
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  7 May 2005 21:05:47 +0000 (UTC)
Message-Id: <200505072106.j47L6vgg008734@orac.acorntoolworks.com>
Date: Sat, 7 May 2005 14:06:57 -0700 (PDT)
From: "J.T. Conklin" <jtc@acorntoolworks.com>
Reply-To: jtc@acorntoolworks.com
To: gnats-bugs@netbsd.org
Subject: NetBSD tar does not match filenames containing glob characters
X-Send-Pr-Version: 3.95

>Number:         30168
>Category:       bin
>Synopsis:       NetBSD tar does not match filenames containing glob characters
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 07 21:06:00 +0000 2005
>Closed-Date:    Sat Oct 07 00:05:30 +0000 2006
>Last-Modified:  Sat Oct 07 00:05:30 +0000 2006
>Originator:     J.T. Conklin
>Release:        NetBSD 3.0_BETA
>Organization:
J.T. Conklin
>Environment:


System: NetBSD k8 3.0_BETA NetBSD 3.0_BETA (GENERIC) #0: Mon May  2 02:38:27 PDT 2005  jtc@k8:/home/jtc/netbsd/NetBSD-3/obj-amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
NetBSD tar's pattern matching doesn't seem to match filenames containing 
shell glob characters like '['.

>How-To-Repeat:
Suppose you wanted to extract only /bin/[ from base.tgz.  You might try:

    $ tar -zxvf base.tgz ./bin/\\[

(one \ is for the shell, the other to quote the [ for tar) which works
fine with GNU tar.  But NetBSD tar returns:

    tar: ustar vol 1, 3706 files, 68044800 bytes read, 0 bytes written in 1 secs (68044800 bytes/sec)
    tar: WARNING! These patterns were not matched:
    ./bin/\[

(Actually, it doesn't work 100% with GNU tar, nor will it with NetBSD
tar once this problem is resolved.  This is because ./bin/[ is a hard
link to ./bin/test which occurs first in the archive; when it gets to
./bin/[ there it's already skipped the contents.  Nothing can be done
about that...)

>Fix:


>Release-Note:

>Audit-Trail:
From: Berndt Josef Wulf <wulf@ping.net.au>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/30168: NetBSD tar does not match filenames containing glob characters
Date: Sun, 8 May 2005 06:55:31 +0930

 On Sunday 08 May 2005 06:36, J.T. Conklin wrote:
 > >Number:         30168
 > >Category:       bin
 > >Synopsis:       NetBSD tar does not match filenames containing glob
 > > characters Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    bin-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Sat May 07 21:06:00 +0000 2005
 > >Originator:     J.T. Conklin
 > >Release:        NetBSD 3.0_BETA
 > >Organization:
 >
 > J.T. Conklin
 >
 > >Environment:
 >
 > System: NetBSD k8 3.0_BETA NetBSD 3.0_BETA (GENERIC) #0: Mon May  2
 > 02:38:27 PDT 2005 
 > jtc@k8:/home/jtc/netbsd/NetBSD-3/obj-amd64/sys/arch/amd64/compile/GENERIC
 > amd64 Architecture: x86_64
 > Machine: amd64
 >
 > >Description:
 >
 > NetBSD tar's pattern matching doesn't seem to match filenames containing
 > shell glob characters like '['.
 >
 > >How-To-Repeat:
 >
 > Suppose you wanted to extract only /bin/[ from base.tgz.  You might try:
 >
 >     $ tar -zxvf base.tgz ./bin/\\[
 >
 > (one \ is for the shell, the other to quote the [ for tar) which works
 > fine with GNU tar.  But NetBSD tar returns:
 >
 >     tar: ustar vol 1, 3706 files, 68044800 bytes read, 0 bytes written in 1
 > secs (68044800 bytes/sec) tar: WARNING! These patterns were not matched:
 >     ./bin/\[
 >
 > (Actually, it doesn't work 100% with GNU tar, nor will it with NetBSD
 > tar once this problem is resolved.  This is because ./bin/[ is a hard
 > link to ./bin/test which occurs first in the archive; when it gets to
 > ./bin/[ there it's already skipped the contents.  Nothing can be done
 > about that...)
 >
 > >Fix:
 > >
 > >
 > >Unformatted:

 work find for me with a single backslash

 husky: {10} which tar
 /bin/tar

 husky: {8} tar zcvfp test.tar.gz \[
 [
 tar: ustar vol 1, 1 files, 0 bytes read, 10240 bytes written in 1 secs (10240 
 bytes/sec)
 husky: {9} tar ztvfp test.tar.gz
 -rw-r--r--  1 wulf     wheel        180 May  8 06:53 [
 tar: ustar vol 1, 1 files, 10240 bytes read, 0 bytes written in 1 secs (10240 
 bytes/sec)

 cheerio Berndt
 -- 
 Every man who says frankly and fully what he thinks is doing a public service.
 [Leslie Stephen]

State-Changed-From-To: open->closed
State-Changed-By: elad@netbsd.org
State-Changed-When: Sat, 07 Oct 2006 00:05:30 +0000
State-Changed-Why:
user error


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.