From nobody@FreeBSD.org  Mon Apr  2 05:42:29 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 49E2816A402
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Apr 2007 05:42:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 3A64013C43E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Apr 2007 05:42:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l325gTBu049798
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 2 Apr 2007 05:42:29 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l325bS5J049290;
	Mon, 2 Apr 2007 05:37:28 GMT
	(envelope-from nobody)
Message-Id: <200704020537.l325bS5J049290@www.freebsd.org>
Date: Mon, 2 Apr 2007 05:37:28 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Possible bug with portsnap / grep
X-Send-Pr-Version: www-3.0

>Number:         111122
>Category:       bin
>Synopsis:       Possible bug with portsnap(8) / grep
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    cperciva
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 02 05:50:10 GMT 2007
>Closed-Date:    Tue Mar 25 12:16:06 UTC 2008
>Last-Modified:  Sun Feb 03 22:27:28 UTC 2013
>Originator:     Garrett Cooper
>Release:        7-CURRENT
>Organization:
n/a
>Environment:
FreeBSD hoover.localdomain 7.0-CURRENT FreeBSD 7.0-CURRENT #25: Mon Mar 26 23:21:11 PST 2007     root@hoover.localdomain:/usr/obj/usr/src/sys/HOOVER  i386
>Description:
This is related to the ports/111106 PR.

In my portsnap.conf file:

REFUSE arabic astro audio benchmarks biology cad chinese comms databases deskutils dns finance french games german hebrew hungarian irc japanese korean mail math mbone multimedia net-* news palm polish portuguese russian science ukrainian vietnamese

I would expect net-* to glob and kill all directories like net-mgmt, etc, but instead it nukes the net directory as well. This is definitely unexpected behavior.
>How-To-Repeat:
Add a valid regular expression to the refuse section.
>Fix:
Looking up solution (changing egrep to grep?). All valid solutions seem to break things instead of fixing them, but I'm a Perl regular expressions guy, not a grep regular expressions guy.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->cperciva 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Apr 2 06:59:34 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111122 

From: Jaakko Heinonen <jh@saunalahti.fi>
To: bug-followup@FreeBSD.org, youshi10@u.washington.edu
Cc:  
Subject: Re: bin/111122: Possible bug with portsnap(8) / grep
Date: Wed, 19 Mar 2008 07:50:52 +0200

 I think this is not a bug. The regular expression "net-*" matches to the
 string "net":
 
 $ echo net | egrep 'net-*'
 net
 
 If you want to match everything beginning with "net-" the regular
 expression should be "^net-.*".
 
 $ echo net | egrep '^net-.*'
 $
 $ echo net-foo | egrep '^net-.*'
 net-foo
 
 From portsnap.conf manual page:
 
      Finally, a line of the form
            REFUSE foo bar
      will instruct portsnap(8) to ignore parts of the ports tree with paths
      starting with foo or bar, which are interpreted as extended regular
      expressions by egrep(1).  
 
 -- 
 Jaakko

From: Colin Percival <cperciva@freebsd.org>
To: bug-followup@FreeBSD.org, youshi10@u.washington.edu
Cc:  
Subject: Re: bin/111122: Possible bug with portsnap(8) / grep
Date: Sun, 23 Mar 2008 07:58:44 -0700

 Jaakko is quite right -- portsnap is doing exactly what it should do
 given that input.  Instead of "REFUSE net-*", the submitter probably
 wants "REFUSE net-", since all of the net-<anything> categories start
 with "net-".
 
 Colin Percival
 

From: Garrett Cooper <yaneurabeya@gmail.com>
To: Colin Percival <cperciva@FreeBSD.org>
Cc: bug-followup@FreeBSD.org,
 youshi10@u.washington.edu
Subject: Re: bin/111122: Possible bug with portsnap(8) / grep
Date: Mon, 24 Mar 2008 22:33:10 -0700

 Ok. That's an RTFM error. Feel free to close guys.
 Thanks,
 -Garrett
 
 On Mar 23, 2008, at 7:58 AM, Colin Percival wrote:
 
 > Jaakko is quite right -- portsnap is doing exactly what it should do
 > given that input.  Instead of "REFUSE net-*", the submitter probably
 > wants "REFUSE net-", since all of the net-<anything> categories start
 > with "net-".
 >
 > Colin Percival
 >
 
State-Changed-From-To: open->closed 
State-Changed-By: cperciva 
State-Changed-When: Tue Mar 25 12:15:45 UTC 2008 
State-Changed-Why:  
user error 

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