ports/170113: ports-mgmt/poudriere: fix quoting and root environment variables
Denis Generalov
gd at rambler-co.ru
Tue Jul 24 17:20:11 UTC 2012
>Number: 170113
>Category: ports
>Synopsis: ports-mgmt/poudriere: fix quoting and root environment variables
>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: Tue Jul 24 17:20:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Denis Generalov
>Release: FreeBSD 9.0-STABLE amd64
>Organization:
Rambler
>Environment:
FreeBSD tyl.rambler.ramblermedia.com 9.0-STABLE FreeBSD 9.0-STABLE #1: Tue Feb 14 22:57:58 MSK 2012 root at tyl2.park.rambler.ru:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Changes in patch patch-src__poudriere.d__common.sh is continuing fix quoting ports/170087.
Another patch fix with root environment variables UNAME_r and UNAME_v. If we build jail with csup (svn) method we get UNAME_r and UNAME_v with RELENG_9 string (or something like that). When some ports using variables which produced by uname make stops with errors:
"Makefile", line 99: warning: String comparison operator should be either == or !=
"Makefile", line 99: Malformed conditional (${OSREL:R} > 8)
"Makefile", line 117: if-less endif
make: fatal errors encountered -- cannot continue
>How-To-Repeat:
Build jail from csup and try to make package for net/hexinject or lang/sbcl.
>Fix:
Patch attached with submission follows:
===> Generating patch
===> Viewing diff with more
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/poudriere/Makefile ./Makefile
--- /usr/ports/ports-mgmt/poudriere/Makefile 2012-07-24 20:54:28.000000000 +0400
+++ ./Makefile 2012-07-24 21:03:03.000000000 +0400
@@ -7,7 +7,7 @@
PORTNAME= poudriere
PORTVERSION= 1.5.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= ports-mgmt
MASTER_SITES= http://files.etoilebsd.net/poudriere/
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/poudriere/files/patch-src__poudriere.d__common.sh ./files/patch-src__poudriere.d__common.sh
--- /usr/ports/ports-mgmt/poudriere/files/patch-src__poudriere.d__common.sh 2012-07-24 13:04:13.000000000 +0400
+++ ./files/patch-src__poudriere.d__common.sh 2012-07-24 21:01:10.000000000 +0400
@@ -1,6 +1,22 @@
---- ./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 @@
+--- src/poudriere.d/common.sh.orig 2012-07-04 14:38:06.000000000 +0400
++++ src/poudriere.d/common.sh 2012-07-24 17:05:43.000000000 +0400
+@@ -568,7 +568,7 @@
+ deplist=$2
+ tmplist2=$3
+ local port=$4
+- egrep -q "^$port$" ${tmplist} && return
++ grep -q "^$port$" ${tmplist} && return
+ echo $port >> ${tmplist}
+ deps=0
+ local m
+@@ -604,13 +604,13 @@
+ done
+ fi
+ tsort ${deplist} | while read port; do
+- egrep -q "^${port}$" ${tmplist2} || echo $port >> ${tmplist2}
++ grep -q "^${port}$" ${tmplist2} || echo $port >> ${tmplist2}
+ done
+
local pn
msg "Caching missing port versions"
while read port; do
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/poudriere/files/patch-src__poudriere.d__jail.sh ./files/patch-src__poudriere.d__jail.sh
--- /usr/ports/ports-mgmt/poudriere/files/patch-src__poudriere.d__jail.sh 1970-01-01 03:00:00.000000000 +0300
+++ ./files/patch-src__poudriere.d__jail.sh 2012-07-24 03:04:49.000000000 +0400
@@ -0,0 +1,14 @@
+--- src/poudriere.d/jail.sh.orig 2012-07-04 14:38:06.000000000 +0400
++++ src/poudriere.d/jail.sh 2012-07-24 03:03:43.000000000 +0400
+@@ -276,7 +276,10 @@
+ ${FCT}
+
+ OSVERSION=`awk '/\#define __FreeBSD_version/ { print $3 }' ${JAILBASE}/usr/include/sys/param.h`
+- LOGIN_ENV=",UNAME_r=${VERSION},UNAME_v=FreeBSD ${VERSION},OSVERSION=${OSVERSION}"
++ MAJOR=${OSVERSION%?????}
++ MINOR=$((${OSVERSION#${MAJOR}}/1000))
++ URELEASE="${MAJOR}.${MINOR}-RELEASE"
++ LOGIN_ENV=",UNAME_r=${URELEASE},UNAME_v=FreeBSD ${URELEASE},OSVERSION=${OSVERSION}"
+
+ if [ "${ARCH}" = "i386" -a "${REALARCH}" = "amd64" ];then
+ LOGIN_ENV="${LOGIN_ENV},UNAME_p=i386,UNAME_m=i386"
===> Done
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list