From nobody@FreeBSD.org  Sun Aug 11 01:20:02 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 1B1B4CE6
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Aug 2013 01:20:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id E275C2984
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Aug 2013 01:20:01 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7B1K1cD064594
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Aug 2013 01:20:01 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7B1K1Os064591;
	Sun, 11 Aug 2013 01:20:01 GMT
	(envelope-from nobody)
Message-Id: <201308110120.r7B1K1Os064591@oldred.freebsd.org>
Date: Sun, 11 Aug 2013 01:20:01 GMT
From: Christopher Abbey <rissicay@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make xdev for arm installation fails
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181220
>Category:       arm
>Synopsis:       make xdev for arm installation fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-arm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 11 01:30:00 UTC 2013
>Closed-Date:    Tue Sep 10 23:20:39 UTC 2013
>Last-Modified:  Tue Sep 10 23:20:39 UTC 2013
>Originator:     Christopher Abbey
>Release:        9.1
>Organization:
>Environment:
FreeBSD robolace.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
When building xdev:
    make XDEV=arm XDEV_ARCH=armv6 xdev

It fails with the output:

set -e; cd /usr/src/include; make buildincludes; make installincludes
creating osreldate.h from newvers.sh
*** [osreldate.h] Error code 1

Stop in /usr/src/include.
*** [includes] Error code 1

Stop in /usr/src/include.
*** [include.includes__D] Error code 1

Stop in /usr/src.
*** [_xi-includes] Error code 1

Stop in /usr/src.
*** [xdev] Error code 1

Stop in /usr/src.


The problem file appears to be:
/usr/src/sys/conf/newvers.sh

It looks like ${0} is printing sh instead of the script name
>How-To-Repeat:
make XDEV=arm XDEV_ARCH=armv6 xdev

>Fix:
Hard coding the script name into the script. 

Patch attached with submission follows:

--- newvers.sh.old	2013-08-11 11:10:22.000000000 +1000
+++ newvers.sh	2013-08-11 11:10:09.000000000 +1000
@@ -30,6 +30,7 @@
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
 # $FreeBSD: head/sys/conf/newvers.sh 254094 2013-08-08 15:59:00Z gjb $
 
+SCRIPT_NAME="/usr/src/sys/conf/newvers.sh"
 TYPE="FreeBSD"
 REVISION="10.0"
 BRANCH="CURRENT"
@@ -96,7 +97,7 @@
 		# Run svnversion from ${dir} on this script; if return code
 		# is not zero, the checkout might not be compatible with the
 		# svnversion being used.
-		${dir}/svnversion $(basename ${0}) >/dev/null 2>&1
+		${dir}/svnversion ${SCRIPT_NAME} >/dev/null 2>&1
 		if [ $? -eq 0 ]; then
 			svnversion=${dir}/svnversion
 			break
@@ -105,7 +106,7 @@
 done
 
 if [ -z "${svnversion}" ] && [ -x /usr/bin/svnliteversion ] ; then
-	/usr/bin/svnversion $(basename ${0}) >/dev/null 2>&1
+	/usr/bin/svnversion ${SCRIPT_NAME} >/dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		svnversion=/usr/bin/svnliteversion
 	else


>Release-Note:
>Audit-Trail:

From: Ian Lepore <ian@FreeBSD.org>
To: Christopher Abbey <rissicay@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: arm/181220: make xdev for arm installation fails
Date: Sun, 11 Aug 2013 08:13:26 -0600

 On Sun, 2013-08-11 at 01:20 +0000, Christopher Abbey wrote:
 > >Number:         181220
 > >Category:       arm
 > >Synopsis:       make xdev for arm installation fails
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-arm
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sun Aug 11 01:30:00 UTC 2013
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Christopher Abbey
 > >Release:        9.1
 > >Organization:
 > >Environment:
 > FreeBSD robolace.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
 > 
 > >Description:
 > When building xdev:
 >     make XDEV=arm XDEV_ARCH=armv6 xdev
 > 
 > It fails with the output:
 > 
 > set -e; cd /usr/src/include; make buildincludes; make installincludes
 > creating osreldate.h from newvers.sh
 > *** [osreldate.h] Error code 1
 > 
 > Stop in /usr/src/include.
 > *** [includes] Error code 1
 > 
 > Stop in /usr/src/include.
 > *** [include.includes__D] Error code 1
 > 
 > Stop in /usr/src.
 > *** [_xi-includes] Error code 1
 > 
 > Stop in /usr/src.
 > *** [xdev] Error code 1
 > 
 > Stop in /usr/src.
 > 
 > 
 > The problem file appears to be:
 > /usr/src/sys/conf/newvers.sh
 > 
 > It looks like ${0} is printing sh instead of the script name
 > [snip]
 
 There were two checkins yesterday that appear to be potential fixes for
 this problem, r254184 and r254217.  Could you please apply those and see
 if it fixes the problem without hard-coding a pathname?
 
 -- Ian
 
 

From: Christopher Abbey <rissicay@gmail.com>
To: Ian Lepore <ian@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: arm/181220: make xdev for arm installation fails
Date: Mon, 12 Aug 2013 00:24:10 +1000

 --089e0141a79ce0c6d404e3acc205
 Content-Type: text/plain; charset=ISO-8859-1
 
 I applied them and they did fix the problem without hard coding path =)
 
 
 On Mon, Aug 12, 2013 at 12:13 AM, Ian Lepore <ian@freebsd.org> wrote:
 
 > On Sun, 2013-08-11 at 01:20 +0000, Christopher Abbey wrote:
 > > >Number:         181220
 > > >Category:       arm
 > > >Synopsis:       make xdev for arm installation fails
 > > >Confidential:   no
 > > >Severity:       non-critical
 > > >Priority:       low
 > > >Responsible:    freebsd-arm
 > > >State:          open
 > > >Quarter:
 > > >Keywords:
 > > >Date-Required:
 > > >Class:          sw-bug
 > > >Submitter-Id:   current-users
 > > >Arrival-Date:   Sun Aug 11 01:30:00 UTC 2013
 > > >Closed-Date:
 > > >Last-Modified:
 > > >Originator:     Christopher Abbey
 > > >Release:        9.1
 > > >Organization:
 > > >Environment:
 > > FreeBSD robolace.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825:
 > Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
 >  amd64
 > >
 > > >Description:
 > > When building xdev:
 > >     make XDEV=arm XDEV_ARCH=armv6 xdev
 > >
 > > It fails with the output:
 > >
 > > set -e; cd /usr/src/include; make buildincludes; make installincludes
 > > creating osreldate.h from newvers.sh
 > > *** [osreldate.h] Error code 1
 > >
 > > Stop in /usr/src/include.
 > > *** [includes] Error code 1
 > >
 > > Stop in /usr/src/include.
 > > *** [include.includes__D] Error code 1
 > >
 > > Stop in /usr/src.
 > > *** [_xi-includes] Error code 1
 > >
 > > Stop in /usr/src.
 > > *** [xdev] Error code 1
 > >
 > > Stop in /usr/src.
 > >
 > >
 > > The problem file appears to be:
 > > /usr/src/sys/conf/newvers.sh
 > >
 > > It looks like ${0} is printing sh instead of the script name
 > > [snip]
 >
 > There were two checkins yesterday that appear to be potential fixes for
 > this problem, r254184 and r254217.  Could you please apply those and see
 > if it fixes the problem without hard-coding a pathname?
 >
 > -- Ian
 >
 >
 >
 
 --089e0141a79ce0c6d404e3acc205
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"ltr">I applied them and they did fix the problem without hard c=
 oding path =3D)</div><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
 _quote">On Mon, Aug 12, 2013 at 12:13 AM, Ian Lepore <span dir=3D"ltr">&lt;=
 <a href=3D"mailto:ian@freebsd.org" target=3D"_blank">ian@freebsd.org</a>&gt=
 ;</span> wrote:<br>
 <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
 x #ccc solid;padding-left:1ex">On Sun, 2013-08-11 at 01:20 +0000, Christoph=
 er Abbey wrote:<br>
 &gt; &gt;Number: =A0 =A0 =A0 =A0 181220<br>
 &gt; &gt;Category: =A0 =A0 =A0 arm<br>
 <div class=3D"im">&gt; &gt;Synopsis: =A0 =A0 =A0 make xdev for arm installa=
 tion fails<br>
 </div>&gt; &gt;Confidential: =A0 no<br>
 &gt; &gt;Severity: =A0 =A0 =A0 non-critical<br>
 &gt; &gt;Priority: =A0 =A0 =A0 low<br>
 &gt; &gt;Responsible: =A0 =A0freebsd-arm<br>
 &gt; &gt;State: =A0 =A0 =A0 =A0 =A0open<br>
 &gt; &gt;Quarter:<br>
 &gt; &gt;Keywords:<br>
 &gt; &gt;Date-Required:<br>
 &gt; &gt;Class: =A0 =A0 =A0 =A0 =A0sw-bug<br>
 &gt; &gt;Submitter-Id: =A0 current-users<br>
 <div class=3D"im">&gt; &gt;Arrival-Date: =A0 Sun Aug 11 01:30:00 UTC 2013<b=
 r>
 </div>&gt; &gt;Closed-Date:<br>
 &gt; &gt;Last-Modified:<br>
 &gt; &gt;Originator: =A0 =A0 Christopher Abbey<br>
 &gt; &gt;Release: =A0 =A0 =A0 =A09.1<br>
 &gt; &gt;Organization:<br>
 &gt; &gt;Environment:<br>
 &gt; FreeBSD robolace.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r24382=
 5: Tue Dec =A04 09:23:10 UTC 2012 =A0 =A0 root@farrell.cse.buffalo.edu:/usr=
 /obj/usr/src/sys/GENERIC =A0amd64<br>
 &gt;<br>
 &gt; &gt;Description:<br>
 &gt; When building xdev:<br>
 &gt; =A0 =A0 make XDEV=3Darm XDEV_ARCH=3Darmv6 xdev<br>
 &gt;<br>
 &gt; It fails with the output:<br>
 &gt;<br>
 &gt; set -e; cd /usr/src/include; make buildincludes; make installincludes<=
 br>
 &gt; creating osreldate.h from newvers.sh<br>
 &gt; *** [osreldate.h] Error code 1<br>
 &gt;<br>
 &gt; Stop in /usr/src/include.<br>
 &gt; *** [includes] Error code 1<br>
 &gt;<br>
 &gt; Stop in /usr/src/include.<br>
 &gt; *** [include.includes__D] Error code 1<br>
 &gt;<br>
 &gt; Stop in /usr/src.<br>
 &gt; *** [_xi-includes] Error code 1<br>
 &gt;<br>
 &gt; Stop in /usr/src.<br>
 &gt; *** [xdev] Error code 1<br>
 &gt;<br>
 &gt; Stop in /usr/src.<br>
 &gt;<br>
 &gt;<br>
 &gt; The problem file appears to be:<br>
 &gt; /usr/src/sys/conf/newvers.sh<br>
 &gt;<br>
 &gt; It looks like ${0} is printing sh instead of the script name<br>
 &gt; [snip]<br>
 <br>
 There were two checkins yesterday that appear to be potential fixes for<br>
 this problem, r254184 and r254217. =A0Could you please apply those and see<=
 br>
 if it fixes the problem without hard-coding a pathname?<br>
 <span class=3D"HOEnZb"><font color=3D"#888888"><br>
 -- Ian<br>
 <br>
 <br>
 </font></span></blockquote></div><br></div>
 
 --089e0141a79ce0c6d404e3acc205--
State-Changed-From-To: open->closed 
State-Changed-By: loos 
State-Changed-When: Tue Sep 10 23:20:38 UTC 2013 
State-Changed-Why:  
The problem was fixed by r254184 and r254217. Close by the submitter 
request. 

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