svn commit: r204824 - head/sys/conf

M. Warner Losh imp at bsdimp.com
Wed Mar 10 02:40:25 UTC 2010


In message: <4B97030A.1040704 at FreeBSD.org>
            Doug Barton <dougb at FreeBSD.org> writes:
: On 03/09/10 17:55, David O'Brien wrote:
: > On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
: >> On 03/07/10 17:01, David O'Brien wrote:
: >>> +*/sys/*|*/compile/*)
: >>
: >> Please revert your previous change, and feel free to add this one instead.
: >>
: >> I'm a little aggravated because this question of "what if the directory
: >> isn't named */sys/*?" was already addressed when I made the change, and
: >> the general agreement was that !sys was an edge case that wasn't worth
: >> worrying about.
: > 
: > I probably would have if I had been able to update my main system to a
: > kernel newer than Nov 9th.  Every time I've tried HEAD is toxic[*].
: > Tried again this morning - "no route to 127.0.0.1".
: 
: I'm not sure what the connection is there. But FWIW Qing posted the fix
: for that: http://people.freebsd.org/~qingli/route.h.diff. Not sure why
: he hasn't committed it yet. The fix works for me.
: 
: >> I'm even more aggravated that your change doesn't work for the common case.
: > 
: > Sorry, I build all my kernels the traditional way.  I was agrivated that
: > your change didn't work with the kernel build method with 15 years
: > history...
: 
: The "traditional" way hasn't been the recommended method of kernel
: building for years now.
: 
: In any case, at least one user has complained on the list that not
: having the svn revision in uname has caused them an actual problem, so I
: backed out your change today. If you'd like to submit a patch for review
: (-current or -hackers are good choices) that ADDS support for
: */compile/* I have no objection, and as long as it doesn't cause any
: problems for people whose sources are in */sys/* I think that'd be
: great, and will do whatever I can to help.

I'd recommend something similar to the following change:

Index: newvers.sh
===================================================================
--- newvers.sh	(revision 204938)
+++ newvers.sh	(working copy)
@@ -38,13 +38,14 @@
 fi
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
+S=sys
 
 if [ "X${PARAMFILE}" != "X" ]; then
 	RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
 		${PARAMFILE})
 else
 	RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-		$(dirname $0)/../sys/param.h)
+		$(dirname $0)/../$S/param.h)
 fi
 
 
@@ -88,15 +89,15 @@
 i=`${MAKE:-make} -V KERN_IDENT`
 
 case "$d" in
-*/sys/*)
+*/$S/*)
 	SRCDIR=${d##*obj}
 	if [ -n "$MACHINE" ]; then
 		SRCDIR=${SRCDIR##/$MACHINE}
 	fi
-	SRCDIR=${SRCDIR%%/sys/*}
+	SRCDIR=${SRCDIR%%/$S/*}
 
 	for dir in /bin /usr/bin /usr/local/bin; do
-		if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then
+		if [ -d "${SRCDIR}/$S/.svn" -a -x "${dir}/svnversion" ] ; then
 			svnversion=${dir}/svnversion
 			break
 		fi
@@ -107,7 +108,7 @@
 	done
 
 	if [ -n "$svnversion" ] ; then
-		svn=" r`cd ${SRCDIR}/sys && $svnversion`"
+		svn=" r`cd ${SRCDIR}/$S && $svnversion`"
 	fi
 	if [ -n "$git_cmd" ] ; then
 		git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null`

which would allow people that move sys to somewhere else to change one
line and still have everything work.  They are going to have to make
changes anyway to support that, since it isn't supported by FreeBSD
out of the box.

Warner


More information about the svn-src-head mailing list