conf/161843: SVN-detection in sys/conf/newvers.sh fails with
subversion-1.7
David Wolfskill
david at catwhisker.org
Thu Oct 20 18:50:10 UTC 2011
>Number: 161843
>Category: conf
>Synopsis: SVN-detection in sys/conf/newvers.sh fails with subversion-1.7
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 20 18:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: David Wolfskill
>Release: FreeBSD 10.0-CURRENT i386
>Organization:
Wolfkill & owling Residence
>Environment:
System: FreeBSD freebeast.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #626 r226563M: Thu Oct 20 05:04:03 PDT 2011 root at freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Stock version of sys/conf/newvers.sh looks for ${SYSDIR}/.svn
to determine if ${SYSDIR} is likely to be a subversion working
copy.
This is fine for subsversion-1.6 (and earlier), but as of 1.7,
the only .svn subdirectory in the working copy is at the root of
the working copy.
As a result, if subversion-1.7 is in use, newvers.sh fails to
detect that ${SYSDIR} could be a subversion working copy, and
therefore fails to try to invoke svnversion, so the SVN GRN
doesn't get placed in the uname output -- rather than the above,
it looks more like:
FreeBSD freebeast.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #625: Wed Oct 19 05:22:52 PDT 2011 root at freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC i386
>How-To-Repeat:
Upgrade to or install the 1.7 version of the devel/subversion
port, ensure that /usr/src is a subversion working copy suitable
for use with subversion-1.7 (and that kernel sources have been
modified), then rebuild the kernel.
After rebooting, examine the output of "uname -a".
>Fix:
Index: sys/conf/newvers.sh
===================================================================
--- sys/conf/newvers.sh (revision 226563)
+++ sys/conf/newvers.sh (working copy)
@@ -88,7 +88,7 @@
i=`${MAKE:-make} -V KERN_IDENT`
for dir in /bin /usr/bin /usr/local/bin; do
- if [ -d "${SYSDIR}/.svn" -a -x "${dir}/svnversion" ] ; then
+ if [ -d "${SYSDIR}/../.svn" -a -x "${dir}/svnversion" ] ; then
svnversion=${dir}/svnversion
break
fi
[Note: I have tested the above; that's how the original "uname" output
(at the top of the PR) was created; note that it shows the GRN.]
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list