From nobody@FreeBSD.org  Mon Jul 23 14:15:35 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 08FAF106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jul 2012 14:15:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id E88918FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jul 2012 14:15:34 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6NEFXIG070185
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jul 2012 14:15:33 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q6NEFXTG070176;
	Mon, 23 Jul 2012 14:15:33 GMT
	(envelope-from nobody)
Message-Id: <201207231415.q6NEFXTG070176@red.freebsd.org>
Date: Mon, 23 Jul 2012 14:15:33 GMT
From: Vincent Hoffman-Kazlauskas <vince@unsane.co.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [Patch] [poudriere] fix quoting for poudriere
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         170087
>Category:       ports
>Synopsis:       [Patch] ports-mgmt/poudriere: fix quoting for poudriere
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bapt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 23 14:20:11 UTC 2012
>Closed-Date:    Tue Jul 24 09:05:05 UTC 2012
>Last-Modified:  Tue Jul 24 09:10:10 UTC 2012
>Originator:     Vincent Hoffman-Kazlauskas
>Release:        9.0-RELEASE-p3
>Organization:
>Environment:
FreeBSD fbsd9vm 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
I was finding that net-p2p/rtorrent wouldnt build in a jail using poudriere, the error in the output being
====>> Cleaning the build queue
[: /usr/local/poudriere_data/packages/83amd64-default/All/libsigc++-2.2.10: unexpected operator
====>> Cleaning up wrkdir

the attached patch quotes this so + (and presumable other special characters) will not break the build.
>How-To-Repeat:
use a standard poudriere setup to build libtorrent (or rtorrent which requires libtorrent) C
devel/libsigc++20 will build fine but isnt listed correctly as existing in the package list
>Fix:
apply the attached patch (quote the list so + characters aren't treated as operators)

Patch attached with submission follows:

--- common.sh.orig      2012-07-23 14:28:12.000000000 +0100
+++ common.sh   2012-07-23 14:28:59.000000000 +0100
@@ -635,7 +635,7 @@
        export LOCALBASE=${MYBASE:-/usr/local}
        while read p; do
                pn=$(awk -v o=${p} ' { if ($1 == o) {print $2} }' ${cache})
-               [ ! -f ${PKGDIR}/All/${pn}.${EXT} ] && queue="${queue} $p"
+               [ ! -f "${PKGDIR}/All/${pn}.${EXT}" ] && queue="${queue} $p"
        done < ${tmplist2}
 
        rm -f ${tmplist2} ${deplist} ${tmplist}


>Release-Note:
>Audit-Trail:

From: Denis Generalov <gd@powernet.ru>
To: Vincent Hoffman-Kazlauskas <vince@unsane.co.uk>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/170087: [Patch] [poudriere] fix quoting for poudriere
Date: Mon, 23 Jul 2012 18:32:49 +0400

 This is a multi-part message in MIME format.
 
 --Multipart=_Mon__23_Jul_2012_18_32_49_+0400_yU8i.aB.+XlNy8K6
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 On Mon, 23 Jul 2012 14:15:33 GMT
 Vincent Hoffman-Kazlauskas <vince@unsane.co.uk> wrote:
 
 > 
 > >Number:         170087
 > >Category:       ports
 > >Synopsis:       [Patch] [poudriere] fix quoting for poudriere
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-ports-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Mon Jul 23 14:20:11 UTC 2012
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Vincent Hoffman-Kazlauskas
 > >Release:        9.0-RELEASE-p3
 > >Organization:
 > >Environment:
 > FreeBSD fbsd9vm 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
 > 
 > >Description:
 > I was finding that net-p2p/rtorrent wouldnt build in a jail using poudriere, the error in the output being
 > ====>> Cleaning the build queue
 > [: /usr/local/poudriere_data/packages/83amd64-default/All/libsigc++-2.2.10: unexpected operator
 > ====>> Cleaning up wrkdir
 > 
 > the attached patch quotes this so + (and presumable other special characters) will not break the build.
 > >How-To-Repeat:
 > use a standard poudriere setup to build libtorrent (or rtorrent which requires libtorrent) C
 > devel/libsigc++20 will build fine but isnt listed correctly as existing in the package list
 > >Fix:
 > apply the attached patch (quote the list so + characters aren't treated as operators)
 > 
 > Patch attached with submission follows:
 > 
 > --- common.sh.orig      2012-07-23 14:28:12.000000000 +0100
 > +++ common.sh   2012-07-23 14:28:59.000000000 +0100
 > @@ -635,7 +635,7 @@
 >         export LOCALBASE=${MYBASE:-/usr/local}
 >         while read p; do
 >                 pn=$(awk -v o=${p} ' { if ($1 == o) {print $2} }' ${cache})
 > -               [ ! -f ${PKGDIR}/All/${pn}.${EXT} ] && queue="${queue} $p"
 > +               [ ! -f "${PKGDIR}/All/${pn}.${EXT}" ] && queue="${queue} $p"
 >         done < ${tmplist2}
 >  
 >         rm -f ${tmplist2} ${deplist} ${tmplist}
 > 
 
 It's wrong patch I think.
 Because ${cache} already contain broken data in this moment.
 See attachment for correct patch.
 
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > _______________________________________________
 > freebsd-ports-bugs@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
 > To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"
 
 
 -- 
 Denis Generalov <gd@powernet.ru>
 
 --Multipart=_Mon__23_Jul_2012_18_32_49_+0400_yU8i.aB.+XlNy8K6
 Content-Type: text/x-diff;
  name="src::poudriere.d::common.sh.patch"
 Content-Disposition: attachment;
  filename="src::poudriere.d::common.sh.patch"
 Content-Transfer-Encoding: 7bit
 
 --- src/poudriere.d/common.sh.orig	2012-07-23 17:48:32.000000000 +0400
 +++ src/poudriere.d/common.sh	2012-07-23 17:49:00.000000000 +0400
 @@ -610,7 +610,7 @@
  	local pn
  	msg "Caching missing port versions"
  	while read port; do
 -		if ! egrep -q "^${port} " ${cache}; then
 +		if ! grep -q "^${port} " ${cache}; then
  			pn=$(injail make -C /usr/ports/${port} -VPKGNAME)
  			echo "${port} ${pn}" >> ${cache}
  		fi
 
 --Multipart=_Mon__23_Jul_2012_18_32_49_+0400_yU8i.aB.+XlNy8K6--

From: Vincent Hoffman <vince@unsane.co.uk>
To: Denis Generalov <gd@powernet.ru>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/170087: [Patch] [poudriere] fix quoting for poudriere
Date: Mon, 23 Jul 2012 16:29:54 +0100

 This is a multi-part message in MIME format.
 --------------070109040700060200090604
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 On 23/07/2012 15:32, Denis Generalov wrote:
 > --- src/poudriere.d/common.sh.orig	2012-07-23 17:48:32.000000000 +0400
 > +++ src/poudriere.d/common.sh	2012-07-23 17:49:00.000000000 +0400
 > @@ -610,7 +610,7 @@
 >  	local pn
 >  	msg "Caching missing port versions"
 >  	while read port; do
 > -		if ! egrep -q "^${port} " ${cache}; then
 > +		if ! grep -q "^${port} " ${cache}; then
 >  			pn=$(injail make -C /usr/ports/${port} -VPKGNAME)
 >  			echo "${port} ${pn}" >> ${cache}
 >  		fi
 This does not fix it for me.
 Using this patch I get the following
 
 Building new INDEX files... done.
 ====>> Mounting devfs
 ====>> Mounting /proc
 ====>> Mounting linuxfs
 /etc/resolv.conf -> /usr/local/poudriere/jails/90andtest/etc/resolv.conf
 ====>> Starting jail 90andtest
 ====>> Populating LOCALBASE
 ====>> Calculating ports order and dependencies
 ====>> Caching missing port versions
 ====>> Sanity checking the repository
 ====>> Deleting stale symlinks
 ====>> Cleaning the build queue
 [:
 /usr/local/poudriere_data/packages/90andtest-default/All/libsigc++-2.2.10:
 unexpected operator
 ====>> Cleaning up wrkdir
 ====>> Building lang/perl5.14
 ===>  Cleaning for perl-5.14.2_2
 
 Please note that
 /usr/local/poudriere_data/packages/90andtest-default/All/libsigc++-2.2.10
 doesnt currently exist.
 
 root@fbsd9vm ~/portlist]# ls
 /usr/local/poudriere_data/packages/90andtest-default/All/
 [root@fbsd9vm ~/portlist]#
 
 
 Vince
 
 
 
 --------------070109040700060200090604
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 <html>
   <head>
     <meta content="text/html; charset=ISO-8859-1"
       http-equiv="Content-Type">
   </head>
   <body bgcolor="#FFFFFF" text="#000000">
     <div class="moz-cite-prefix">On 23/07/2012 15:32, Denis Generalov
       wrote:<br>
     </div>
     <blockquote
       cite="mid:20120723183249.b4c5c61203d8a7a37a3ad834@powernet.ru"
       type="cite">
       <pre wrap="">--- src/poudriere.d/common.sh.orig	2012-07-23 17:48:32.000000000 +0400
 +++ src/poudriere.d/common.sh	2012-07-23 17:49:00.000000000 +0400
 @@ -610,7 +610,7 @@
  	local pn
  	msg "Caching missing port versions"
  	while read port; do
 -		if ! egrep -q "^${port} " ${cache}; then
 +		if ! grep -q "^${port} " ${cache}; then
  			pn=$(injail make -C <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>usr/ports<span class="moz-txt-tag">/</span></i>${port} -VPKGNAME)
  			echo "${port} ${pn}" &gt;&gt; ${cache}
  		fi
 </pre>
     </blockquote>
     This does not fix it for me.<br>
     Using this patch I get the following <br>
     <br>
     Building new INDEX files... done.<br>
     ====&gt;&gt; Mounting devfs<br>
     ====&gt;&gt; Mounting /proc<br>
     ====&gt;&gt; Mounting linuxfs<br>
     /etc/resolv.conf -&gt;
     /usr/local/poudriere/jails/90andtest/etc/resolv.conf<br>
     ====&gt;&gt; Starting jail 90andtest<br>
     ====&gt;&gt; Populating LOCALBASE<br>
     ====&gt;&gt; Calculating ports order and dependencies<br>
     ====&gt;&gt; Caching missing port versions<br>
     ====&gt;&gt; Sanity checking the repository<br>
     ====&gt;&gt; Deleting stale symlinks<br>
     ====&gt;&gt; Cleaning the build queue<br>
     [:
     /usr/local/poudriere_data/packages/90andtest-default/All/libsigc++-2.2.10:
     unexpected operator<br>
     ====&gt;&gt; Cleaning up wrkdir<br>
     ====&gt;&gt; Building lang/perl5.14<br>
     ===&gt;&nbsp; Cleaning for perl-5.14.2_2<br>
     <br>
     Please note that <br>
 /usr/local/poudriere_data/packages/90andtest-default/All/libsigc++-2.2.10<br>
     doesnt currently exist.<br>
     <br>
     root@fbsd9vm ~/portlist]# ls
     /usr/local/poudriere_data/packages/90andtest-default/All/<br>
     [root@fbsd9vm ~/portlist]# <br>
     <br>
     <br>
     Vince<br>
     <br>
     <br>
   </body>
 </html>
 
 --------------070109040700060200090604--
Responsible-Changed-From-To: freebsd-ports-bugs->bapt 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jul 23 16:45:40 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170087 
State-Changed-From-To: open->closed 
State-Changed-By: bapt 
State-Changed-When: Tue Jul 24 09:05:03 UTC 2012 
State-Changed-Why:  
committed thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/170087: commit references a PR
Date: Tue, 24 Jul 2012 09:04:27 +0000 (UTC)

 Author: bapt
 Date: Tue Jul 24 09:04:13 2012
 New Revision: 301447
 URL: http://svn.freebsd.org/changeset/ports/301447
 
 Log:
   Fix some missing quoting
   
   PR:		ports/170087
   Submitted by:	Vincent Hoffman-Kazlauskas <vince@unsane.co.uk>, Denis Generalov <gd@powernet.ru>
 
 Added:
   head/ports-mgmt/poudriere/files/
   head/ports-mgmt/poudriere/files/patch-src__poudriere.d__common.sh   (contents, props changed)
 Modified:
   head/ports-mgmt/poudriere/Makefile   (contents, props changed)
 
 Modified: head/ports-mgmt/poudriere/Makefile
 ==============================================================================
 --- head/ports-mgmt/poudriere/Makefile	Tue Jul 24 08:50:17 2012	(r301446)
 +++ head/ports-mgmt/poudriere/Makefile	Tue Jul 24 09:04:13 2012	(r301447)
 @@ -7,6 +7,7 @@
  
  PORTNAME=	poudriere
  PORTVERSION=	1.5.4
 +PORTREVISION=	1
  CATEGORIES=	ports-mgmt
  MASTER_SITES=	http://files.etoilebsd.net/poudriere/
  
 
 Added: head/ports-mgmt/poudriere/files/patch-src__poudriere.d__common.sh
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/ports-mgmt/poudriere/files/patch-src__poudriere.d__common.sh	Tue Jul 24 09:04:13 2012	(r301447)
 @@ -0,0 +1,20 @@
 +--- ./src/poudriere.d/common.sh.orig	2012-07-04 12:38:06.000000000 +0200
 ++++ ./src/poudriere.d/common.sh	2012-07-24 10:58:57.289711665 +0200
 +@@ -610,7 +610,7 @@
 + 	local pn
 + 	msg "Caching missing port versions"
 + 	while read port; do
 +-		if ! egrep -q "^${port} " ${cache}; then
 ++		if ! grep -q "^${port} " ${cache}; then
 + 			pn=$(injail make -C /usr/ports/${port} -VPKGNAME)
 + 			echo "${port} ${pn}" >> ${cache}
 + 		fi
 +@@ -635,7 +635,7 @@
 + 	export LOCALBASE=${MYBASE:-/usr/local}
 + 	while read p; do
 + 		pn=$(awk -v o=${p} ' { if ($1 == o) {print $2} }' ${cache})
 +-		[ ! -f ${PKGDIR}/All/${pn}.${EXT} ] && queue="${queue} $p"
 ++		[ ! -f "${PKGDIR}/All/${pn}.${EXT}" ] && queue="${queue} $p"
 + 	done < ${tmplist2}
 + 
 + 	rm -f ${tmplist2} ${deplist} ${tmplist}
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
