Date: Mon, 22 Apr 2013 17:38:10 -0700 From: Jeremy Chadwick <jdc@koitsu.org> To: Glen Barber <gjb@FreeBSD.org> Cc: Scott Reber <sr1244@gmail.com>, freebsd-stable@freebsd.org, John Mehr <jcm@visi.com> Subject: Re: svn revision stable/9 Message-ID: <20130423003810.GA18488@icarus.home.lan> In-Reply-To: <20130423000602.GB1606@glenbarber.us> References: <000901ce3fb3$31732a50$94597ef0$@gmail.com> <20130423000004.GA17734@icarus.home.lan> <20130423000602.GB1606@glenbarber.us>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 22, 2013 at 08:06:02PM -0400, Glen Barber wrote:
> On Mon, Apr 22, 2013 at 05:00:04PM -0700, Jeremy Chadwick wrote:
> > I'm not sure where this comes from during buildkernel, however. "svn
> > info" is the way I know of to get that value, but I don't know where in
> > the build framework it obtains this number.
> >
>
> svnversion is called in sys/conf/newvers.sh to get the revision.
>
> > The reason I mention that: possibly the build framework uses the "svn"
> > command to get the information, and since "svnup" is not "svn", it can't
> > get it, thus there's nothing to print.
> >
>
> svnversion is the specific binary that is required, but svnup does not
> pull in metadata.
As always, thanks for the insights Glen -- that was the piece I was
looking for. :-)
John Mehr might be able to comment on this, but here's an idea (stated
with zero knowledge of, well, pretty much anything!):
Depending on what all goes on within svnup (and what the SVN protocol
offers), is it possible for svnup to pull down a revision number and
store it somewhere (ex. /var/db/svnup-revision would contain rXXXXXX),
then as part of the svnup package/suite, have a shell script called
"svnversion" that simply provides the content of that file?
That looks like it'd be compatible with sys/conf/newvers.sh, which
does:
91 for dir in /bin /usr/bin /usr/local/bin; do
92 if [ -x "${dir}/svnversion" ] ; then
93 svnversion=${dir}/svnversion
94 break
95 fi
96 done
...
106 if [ -n "$svnversion" ] ; then
107 echo "$svnversion"
108 svn=`cd ${SYSDIR} && $svnversion`
109 case "$svn" in
110 [0-9]*) svn=" r${svn}" ;;
111 *) unset svn ;;
112 esac
113 fi
Naturally the svnup port would need to have a CONFLICTS line added,
since having both svnup and subversion installed on the same machine
would result in a /usr/local/bin/svnversion conflict.
--
| Jeremy Chadwick jdc@koitsu.org |
| UNIX Systems Administrator http://jdc.koitsu.org/ |
| Mountain View, CA, US |
| Making life hard for others since 1977. PGP 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130423003810.GA18488>
