From owner-freebsd-questions@freebsd.org Sun Feb 7 12:54:43 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1BC7AA1A15 for ; Sun, 7 Feb 2016 12:54:43 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B4617F6 for ; Sun, 7 Feb 2016 12:54:43 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (liminal.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3636:3bff:fed4:b0d6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 5B0369113; Sun, 7 Feb 2016 12:54:37 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/5B0369113; dkim=none; dkim-atps=neutral Subject: Re: svn revision in uname To: freebsd-questions@freebsd.org References: <20160207223554.P51785@sola.nimnet.asn.au> Cc: Ian Smith From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <56B73E8C.5060501@FreeBSD.org> Date: Sun, 7 Feb 2016 12:54:36 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160207223554.P51785@sola.nimnet.asn.au> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1DhaDggq8t5KFSgFfPOBhr19Wk9VOVT0L" X-Virus-Scanned: clamav-milter 0.99 at smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=1.0 required=5.0 tests=SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2016 12:54:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1DhaDggq8t5KFSgFfPOBhr19Wk9VOVT0L Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07/02/2016 12:11, Ian Smith wrote: > I've been using svnup for source updates for ages, and for my occasiona= l=20 > use it works fine. However one thing you don't get is the svn revision= =20 > shown in uname, eg % uname -vm > FreeBSD 9.3-STABLE #0: Thu Oct 29 03:18:26 EST 2015=20 > root@x200.smithi.id.au:/usr/obj/usr/src/sys/GENERIC amd64 >=20 > I know where to find it: > smithi@x200:~ % ll -rt /var/tmp/svnup/ > total 30400 > -rw-r--r-- 1 root wheel 3736967 Apr 22 2014 stable.apr > -rw-r--r-- 1 root wheel 3738448 Jun 25 2014 stable.jun > -rw-r--r-- 1 root wheel 3738347 Jul 6 2014 release > -rw-r--r-- 1 root wheel 7926790 Jan 23 2015 ports.first > -rw-r--r-- 1 root wheel 7927003 Jan 23 2015 ports > -rw-r--r-- 1 root wheel 3750256 Oct 10 16:43 stable >=20 > smithi@x200:~ % head -1 /var/tmp/svnup/stable > 289106 >=20 > but I don't know where to poke it so build|install world|kernel find it= ? >=20 > One of the reasons I prefer svnup on this very (64GB) space-constrained= =20 > laptop is that it doesn't need svn's extra copy of the repository, but = > I'm happy to add a /usr/src/.svn dir with whatever is needed for this. >=20 > Hoping the answer is not "the build needs svn installed to get that" :)= >=20 The place where this is all set up is /usr/src/sys/conf/newvers.sh The logic there is fairly complicated as it supports svn, git, hg and p4 VCSes. However, the usual way it works is by running svnversion -- that's part of the svn port. % svnversion /usr/src 295073M If that fails, it will try running svnliteversion, and then cycle through various different ways of extracting a version string from other VCSes until it gets a result. So, if you don't need SVN installed locally, you could create a small shell script as /usr/local/bin/svnversion that runs 'head -1 /var/tmp/svnup/stable' Cheers, Matthew --1DhaDggq8t5KFSgFfPOBhr19Wk9VOVT0L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2 iQJ8BAEBCgBmBQJWtz6NXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT1b4P/1rs1g4bv55uBWO2C8qlhYuR sTNmqYfsPlr2lHM2lVP6+Sr73PFUjDPjWDO5sVCAAUXKTuDU/Tpf8DRFFIp6pJkC ieLftv153aOmGJ1L687BfFnTBUoaZWJ2oFWzbxsbqDTfnF+15h261X3gD1iRjGa7 IroPeG1n5cjdqkjgRVlBk7LPgH5F9GDxbFtvJ3w9jWlfqoQV9E6arUkbnO1z0k+3 ZqUjxhor3A9eMM+Cm1uF7W6f9EDKDKlPEw4teyNftsvdHqGZXihvPs1shgIT4ar6 wk7fUSfK6RneT9YUlhey+K6aKxdzO30V/+Eym68uhrQDi/4d6sS/VrlimaZfj8z3 vax7FWuFas0iolymt7nJLmdv9E1ZexZOodXmISD7BHsKqNvdPQBFvt1zfWt8T2ES 7MuCKkYiOWPtKYK2u2Nrhu1k4hof21nHxR9Q2H5CUnOxJJN4m8Bg4TEExV4ujneA W5hxBc6CNR3GlwAexnVAlj13S0wVd/VU6i7feGhPphX4J1IGjDBhJaDQ6Z+XfhTc XHEpXQrM2YyR3bHhkU3tIUwCzH7M6k2fFZASMOAopspbmTyafwWt+zwvI2EjcPbC TCVXA8dhNcVs0VttG0R0STgr/1vAf/rIVrNxeDgXcrTLyjEONj3HpUBAM9JQ9Py9 e0abIrpMf04skEB4enYT =TPw9 -----END PGP SIGNATURE----- --1DhaDggq8t5KFSgFfPOBhr19Wk9VOVT0L--