From nobody@FreeBSD.org  Mon Aug 12 12:08:57 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EF58D37B401
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Aug 2002 12:08:57 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4C06D43E4A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Aug 2002 12:08:57 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g7CJ8vOT022673
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Aug 2002 12:08:57 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g7CJ8vGd022672;
	Mon, 12 Aug 2002 12:08:57 -0700 (PDT)
Message-Id: <200208121908.g7CJ8vGd022672@www.freebsd.org>
Date: Mon, 12 Aug 2002 12:08:57 -0700 (PDT)
From: Mike Hibler <mike@cs.utah.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: assorted mtree bugs (+fixes)
X-Send-Pr-Version: www-1.0

>Number:         41583
>Category:       bin
>Synopsis:       [patch] mtree(8) assorted mtree bugs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 12 12:10:02 PDT 2002
>Closed-Date:    
>Last-Modified:  Sun Jul 01 16:10:36 UTC 2012
>Originator:     Mike Hibler
>Release:        4.6-STABLE
>Organization:
Flux group, University of Utah
>Environment:
FreeBSD bas.flux.utah.edu 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Aug  1 14:27:24 MDT 2002     mike@bas:/usr/obj/usr/src/sys/FLUX  i386

>Description:
Three bugs in mtree:

1. Cannot handle filenames which start with '#'.
    This one has been reported before (bin/35226, bin/41246).  My "fix" is different
    than the one in 35226, I just added the '-N' option which says: when creating a
    spec, don't ever produce comments and when reading a spec, don't expect
    comments.  The aforementioned fix is probably better than mine.

2. Cannot handle symlink values with non-standard chars.
     This one has also been reported/fixed previously (bin/35454).
     My fix is essentially the same.

3. Mishandles fixing owner/mode of symlinks when using -P
    When using -P in conjunction with -U, mtree chown/chmods the
    target of the symlink rather than the symlink itself.  This does
    not match the semantics for creation of a spec file where -P gives
    you the attributes of the link.

>How-To-Repeat:
Use mtree on non-trivial hierarchies.

>Fix:
Grab:
ftp://www.flux.utah.edu/flux/freebsd/mtree.patch

>Release-Note:
>Audit-Trail:

From: Tony Finch <dot@dotat.at>
To: mike@cs.utah.edu
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/41583: assorted mtree bugs (+fixes)
Date: Tue, 13 Aug 2002 00:09:04 +0100

 Mike Hibler <mike@cs.utah.edu> wrote:
 >
 >1. Cannot handle filenames which start with '#'.
 >    This one has been reported before (bin/35226, bin/41246).  My "fix" is different
 >    than the one in 35226, I just added the '-N' option which says: when creating a
 >    spec, don't ever produce comments and when reading a spec, don't expect
 >    comments.  The aforementioned fix is probably better than mine.
 >
 >2. Cannot handle symlink values with non-standard chars.
 >     This one has also been reported/fixed previously (bin/35454).
 >     My fix is essentially the same.
 
 NetBSD has an improved version of strvis() which their mtree() uses, which
 we should perhaps have a closer look at. I looked at it recently, and I think
 it fixes your problem #1 (at the expense of backslash-escaping hashes everywhere)
 but it doesn't fix #2 -- but that should be easy to do.
 
 Tony.
 -- 
 f.a.n.finch <dot@dotat.at> http://dotat.at/
 FAIR ISLE SOUTH FAEROES: SOUTHERLY OR SOUTHWESTERLY 4 OR 5, OCCASIONALLY 6,
 BECOMING VARIABLE 3 IN SOUTHEAST FAIR ISLE. RAIN OR SHOWERS. MODERATE OR GOOD.
State-Changed-From-To: open->analyzed 
State-Changed-By: schweikh 
State-Changed-When: Tue Aug 13 10:09:27 PDT 2002 
State-Changed-Why:  
mtree has problems with whitespace and # and possibly other 
characters. If you are going to address this, please also look 
at the patches in the PRs 35226 and 35454 and make sure 41426 
is handled okay as well. I will close the three mentioned PRs 
and make this one the meta PR for mtree. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41583 
State-Changed-From-To: analyzed->open 
State-Changed-By: eadler 
State-Changed-When: Sun Jul 1 16:10:35 UTC 2012 
State-Changed-Why:  
unowned PRs must not be in analyzed state 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41583 
>Unformatted:
