Date: Thu, 20 Oct 2011 05:42:44 -0700 (PDT) From: David Wolfskill <david@catwhisker.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/161835: SVN-detection in sys/conf/newvers.sh fails with subversion-1.7 Message-ID: <201110201242.p9KCgi9D002452@freebeast.catwhisker.org> Resent-Message-ID: <201110201540.p9KFeBnU005274@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161835 >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 15:40:11 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@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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110201242.p9KCgi9D002452>