NetBSD Problem Report #41168

From perry@piermont.com  Tue Apr  7 20:05:37 2009
Return-Path: <perry@piermont.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id E0BA863B8C8
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  7 Apr 2009 20:05:37 +0000 (UTC)
Message-Id: <20090407200513.0A3DA8D1FCE@snark.piermont.com>
Date: Tue,  7 Apr 2009 16:05:13 -0400 (EDT)
From: perry@piermont.com
Reply-To: perry@piermont.com
To: gnats-bugs@gnats.NetBSD.org
Subject: tar treats lines in files supplied to -X as globs
X-Send-Pr-Version: 3.95

>Number:         41168
>Category:       bin
>Synopsis:       tar treats lines in files supplied to -X as globs
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 07 20:10:00 +0000 2009
>Closed-Date:    Sun Mar 28 18:40:58 +0000 2010
>Last-Modified:  Sun Mar 28 18:50:03 +0000 2010
>Originator:     Perry E. Metzger
>Release:        NetBSD 4.99.28
>Organization:
Perry E. Metzger		perry@piermont.com
>Environment:


System: NetBSD snark.cb.piermont.com 4.99.28 NetBSD 4.99.28 (ZWEI) #0: Sun Aug 12 13:52:43 EDT 2007 perry@snark.piermont.com:/usr/src/sys/arch/amd64/compile/ZWEI amd64
Architecture: x86_64
Machine: amd64
>Description:

tar (which is really a front end to pax) treats the lines supplied for
the -X option as globs rather than as plain filenames. This can lead
to painfully unexpected behavior. The documented behavior (and the
behavior for gnu tar) is to treat these lines as filenames.

>How-To-Repeat:

>Fix:


>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Sat, 20 Feb 2010 03:40:50 +0000
State-Changed-Why:
GNU tar 1.22 at least documents the same behavior as implemented
by pax-as-tar, namely that -X lists a file of exclude patterns.
Therefore I would change this from an implementation bug to
a documentation bug. Opinion?


From: "Perry E. Metzger" <perry@piermont.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, joerg@NetBSD.org
Subject: Re: bin/41168 (tar treats lines in files supplied to -X as globs)
Date: Sat, 20 Feb 2010 10:25:01 -0500

 joerg@NetBSD.org writes:
 > Synopsis: tar treats lines in files supplied to -X as globs
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: joerg@NetBSD.org
 > State-Changed-When: Sat, 20 Feb 2010 03:40:50 +0000
 > State-Changed-Why:
 > GNU tar 1.22 at least documents the same behavior as implemented
 > by pax-as-tar, namely that -X lists a file of exclude patterns.
 > Therefore I would change this from an implementation bug to
 > a documentation bug. Opinion?

 Why don't you try them both and see. I think you'll find that they do
 not behave compatibly and that this makes lots of things fail. In
 particular, my system backup scripts fail using the native tar.

 Perry
 -- 
 Perry E. Metzger		perry@piermont.com

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
	joerg@NetBSD.org
Subject: Re: bin/41168 (tar treats lines in files supplied to -X as globs)
Date: Sat, 20 Feb 2010 16:40:49 +0100

 On Sat, Feb 20, 2010 at 10:25:01AM -0500, Perry E. Metzger wrote:
 > 
 > joerg@NetBSD.org writes:
 > > Synopsis: tar treats lines in files supplied to -X as globs
 > >
 > > State-Changed-From-To: open->feedback
 > > State-Changed-By: joerg@NetBSD.org
 > > State-Changed-When: Sat, 20 Feb 2010 03:40:50 +0000
 > > State-Changed-Why:
 > > GNU tar 1.22 at least documents the same behavior as implemented
 > > by pax-as-tar, namely that -X lists a file of exclude patterns.
 > > Therefore I would change this from an implementation bug to
 > > a documentation bug. Opinion?
 > 
 > Why don't you try them both and see. I think you'll find that they do
 > not behave compatibly and that this makes lots of things fail. In
 > particular, my system backup scripts fail using the native tar.

 The only difference I see between gtar-base-1.22 and pax-as-tar with -X
 is that GNU tar mishandles the case of no match at all. Otherwise they
 behave identical.

 cd /
 echo 'b*' > /tmp/excludes
 $TAR -cf /tmp/test.tar -X tmp/excludes ./altroot ./bin
 $TAR -tf /tmp/test.tar

 Joerg

From: "Perry E. Metzger" <perry@piermont.com>
To: Joerg Sonnenberger <joerg@britannica.bec.de>
Cc: gnats-bugs@NetBSD.org,  gnats-admin@netbsd.org,  netbsd-bugs@netbsd.org,  joerg@NetBSD.org
Subject: Re: bin/41168 (tar treats lines in files supplied to -X as globs)
Date: Sat, 20 Feb 2010 12:04:10 -0500

 Joerg Sonnenberger <joerg@britannica.bec.de> writes:
 > The only difference I see between gtar-base-1.22 and pax-as-tar with -X
 > is that GNU tar mishandles the case of no match at all. Otherwise they
 > behave identical.

 At the time that I filed this report, this did not work correctly at
 all, which Christos acked. I don't know how it works in current. If it
 works now, that is the result of something being fixed in the interim,
 and releases like 5.x should be checked to make sure they work correctly.

 Perry
 -- 
 Perry E. Metzger		perry@piermont.com

State-Changed-From-To: feedback->open
State-Changed-By: perry@NetBSD.org
State-Changed-When: Sat, 20 Mar 2010 15:40:52 +0000
State-Changed-Why:
I gave feedback already.
.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: perry@piermont.com
Subject: Re: bin/41168 (tar treats lines in files supplied to -X as globs)
Date: Tue, 23 Mar 2010 17:20:05 +0000

 On Sat, Feb 20, 2010 at 05:05:04PM +0000, Perry E. Metzger wrote:
  >  At the time that I filed this report, this did not work correctly at
  >  all, which Christos acked. I don't know how it works in current. If it
  >  works now, that is the result of something being fixed in the interim,
  >  and releases like 5.x should be checked to make sure they work correctly.

 Both -4 and -5 behave as described.

 The doc is not fixed though. Will see to that in a moment.

 The gtar docs have the same property, but that's not our problem. :-)

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41168 CVS commit: src/bin/pax
Date: Tue, 23 Mar 2010 17:21:40 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Tue Mar 23 17:21:40 UTC 2010

 Modified Files:
 	src/bin/pax: tar.1

 Log Message:
 The -X option of tar names a file containing exception globs, not
 exception filenames, same as in gtar. PR 41168 from Perry.


 To generate a diff of this commit:
 cvs rdiff -u -r1.27 -r1.28 src/bin/pax/tar.1

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 25 Mar 2010 17:00:16 +0000
State-Changed-Why:
pullup-5 #1354 and pullup-4 #1391


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41168 CVS commit: [netbsd-5] src/bin/pax
Date: Sun, 28 Mar 2010 16:52:46 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sun Mar 28 16:52:46 UTC 2010

 Modified Files:
 	src/bin/pax [netbsd-5]: tar.1

 Log Message:
 Pull up following revision(s) (requested by dholland in ticket #1354):
 	bin/pax/tar.1: revision 1.28, 1.29
 The -X option of tar names a file containing exception globs, not
 exception filenames, same as in gtar. PR 41168 from Perry.
 --
 bump date for previous


 To generate a diff of this commit:
 cvs rdiff -u -r1.26.12.1 -r1.26.12.2 src/bin/pax/tar.1

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sun, 28 Mar 2010 18:40:58 +0000
State-Changed-Why:
Pullups complete.


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41168 CVS commit: [netbsd-4] src/bin/pax
Date: Sun, 28 Mar 2010 18:37:36 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sun Mar 28 18:37:36 UTC 2010

 Modified Files:
 	src/bin/pax [netbsd-4]: tar.1

 Log Message:
 Pull up following revision(s) (requested by dholland in ticket #1391):
 	bin/pax/tar.1: revision 1.28, 1.29 via patch
 The -X option of tar names a file containing exception globs, not
 exception filenames, same as in gtar. PR 41168 from Perry.
 --
 bump date for previous


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.22.4.1 src/bin/pax/tar.1

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.