From olivleh1@avocado.salatschuessel.net  Mon Jul  7 03:51:35 2003
Return-Path: <olivleh1@avocado.salatschuessel.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A840837B405
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jul 2003 03:51:35 -0700 (PDT)
Received: from avocado.salatschuessel.net (avocado.salatschuessel.net [80.86.187.41])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2ACAC43FBD
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jul 2003 03:51:34 -0700 (PDT)
	(envelope-from olivleh1@avocado.salatschuessel.net)
Received: (qmail 15081 invoked by uid 0); 7 Jul 2003 10:51:31 -0000
Message-Id: <20030707105131.15080.qmail@avocado.salatschuessel.net>
Date: 7 Jul 2003 10:51:31 -0000
From: Oliver Lehmann <oliver@freebsd.org>
Reply-To: Oliver Lehmann <oliver@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Lehmann <oliver@freebsd.org>,
	Kris Kennaway <kris@obsecurity.org>
Subject: clean spaces behind variables out of port Makefiles
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         54174
>Category:       ports
>Synopsis:       clean spaces behind variables out of port Makefiles
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 07 04:00:27 PDT 2003
>Closed-Date:    Tue May 18 21:29:48 PDT 2004
>Last-Modified:  Tue May 18 21:29:48 PDT 2004
>Originator:     Oliver Lehmann
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD kartoffel.salatschuessel.net 4.8-STABLE FreeBSD 4.8-STABLE #0: Tue Jun 24 07:22:19 CEST 2003 olivleh1@kartoffel.salatschuessel.net:/usr/obj/i386-4.8/usr/src/sys/KARTOFFEL i386


>Description:
	There are some ports where the Makefile contains at least
	one line similar to the following lines:
MAN1 =	something.1
MAN1=     something.1
MAN1= 	something
MAN1=  	something
	Regarding to portlint and porters-handbook, each of those 
	constructs are "wrong" (bacause there are spaces between
	or in front of = and the assignment). Find the script
	which tries to repair this attached.

>How-To-Repeat:
>Fix:


--- clean.sh begins here ---
#!/bin/sh

ERROR() {
	echo $1
	exit $2
}

for file in `find ./ports/ -name Makefile` ; do
	awk '  	{
			a=gensub(/(^[A-Z_+\?0-9]+)[ ]+(=[ \t]+)/,"\\1\\2","g")
		}
		a~/^[A-Z_+\?0-9]+=[ ]+/ {
			gsub(/        /,"\t",a)
		} 
		a~/^[A-Z_+\?0-9]+=[ ]+[\t]+/ || a~/^[A-Z_+\?0-9]+=[\t]+[ ]+/ {
			if(length($1) < 8 ) {
				sub(/[ ]+/,"\t",a)
			} else {
				sub(/[ ]+/,"",a)
			}
		}
		a~/^[A-Z_+\?0-9]+=[ ]+/ {
			sub(/[ ]+/,"\t",a)
		}
		{
			print a
		}' $file > $file.$$ || ERROR "error on processing $file with awk" 1
	mv $file.$$ $file || ERROR "error moving $file.$$ to $file" 2
done
--- clean.sh ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr  
Responsible-Changed-By: krion 
Responsible-Changed-When: Sun Nov 16 05:13:59 PST 2003 
Responsible-Changed-Why:  
portmgr should take a look at it 

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

From: Edwin Groothuis <edwin@mavetju.org>
To: freebsd-gnats-submit@FreeBSD.org, oliver@freebsd.org
Cc:  
Subject: Re: ports/54174
Date: Sat, 10 Jan 2004 13:17:45 +1100

 That's lang/gawk, not the awk from the base system (at least on ref5)
 
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin@mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/

From: Edwin Groothuis <edwin@mavetju.org>
To: freebsd-gnats-submit@FreeBSD.org, oliver@freebsd.org
Cc:  
Subject: Re: ports/54174
Date: Sat, 10 Jan 2004 13:36:41 +1100

 Please be a little conservative what you actually process, i.e. not
 all Makefiles are ports Makefiles: ports/audio/afsp/files/Makefile:
 
 	test -z "`grep ^PORTNAME= ${file}`" && continue 
 
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin@mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/
State-Changed-From-To: open->analyzed 
State-Changed-By: kris 
State-Changed-When: Tue May 18 21:02:49 PDT 2004 
State-Changed-Why:  
This will not be run on the ports collection because it will 
invalidate a lot of patches for no functional gain.  It should either 
be added to Tools/ or merged into portlint. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54174 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Tue May 18 21:29:27 PDT 2004 
State-Changed-Why:  
Close the port instead since there's nothing further for portmgr to do. 

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