From owner-freebsd-hackers@freebsd.org Sun May 13 03:04:03 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E55BFE255D for ; Sun, 13 May 2018 03:04:03 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (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 DFFC785028 for ; Sun, 13 May 2018 03:04:02 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id w4D33vFF030790; Sun, 13 May 2018 03:03:57 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id w4D33vBj030789; Sat, 12 May 2018 20:03:57 -0700 (PDT) (envelope-from david) Date: Sat, 12 May 2018 20:03:57 -0700 From: David Wolfskill To: Eitan Adler Cc: FreeBSD Hackers Subject: Re: including a checksum of the diff in uname Message-ID: <20180513030357.GK34631@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Eitan Adler , FreeBSD Hackers References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aSbZTaX27kKPUTye" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2018 03:04:03 -0000 --aSbZTaX27kKPUTye Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 12, 2018 at 07:41:31PM -0700, Eitan Adler wrote: > Hi all, >=20 > I often have several variants of the same revision that I'm testing or > working on at any given time. >=20 > What do you y'all think of something like this: > .... Well.... The variant of newvers.sh that I use addresses this (among other things) by sourcing a file (through a symlink) that defines a shell function named "get_version_from_vcs()," and invokes that function in order to obtain a suitable "version string." The primary rationale for this is that I don't believe the various quirks of VCSen or installations ought to be in newvers.sh proper: it adds a fair amount of complexity that is difficult to test completely to code that has a fairly critical (and fundamentally simple) function. I created a few sample such functions, though I don't use all of the VCSen currently supported by base newvers.sh, so I haven't been able to test them all. (Sorry about the name. I'm lousy at naming things, and have no "investment" in the names used. I'd be pleased if someone would take the idea and get something based on it implemented, though.) Anyway, using such a mechanism, you could easily extend to version string to include just about anything you wanted -- with minimal risk of breaking newvers.sh (either for yourslef or others). Peace, david --=20 David H. Wolfskill david@catwhisker.org Mr. Trump: Just how does reneging on the Iran nuclear deal make the US "saf= er?" See http://www.catwhisker.org/~david/publickey.gpg for my public key. --aSbZTaX27kKPUTye Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEzLfO+ReoAfQwZNd7FTnMQKBJ7hcFAlr3qx1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEND QjdDRUY5MTdBODAxRjQzMDY0RDc3QjE1MzlDQzQwQTA0OUVFMTcACgkQFTnMQKBJ 7hcgHQf+OJBvv9Wl5N2YX3pesj4AwPUaWjNa1MFfF7OSJdWmcO9x6EbY6k7VzGEu ajSq5XZHa0nQ2KjdIhfIrTjUAW4d2X0s6QZGRFO5v22pn+7PNCWJy6D1azpLYk2b WTpzzNac/3rJLYEyi8WqhW7R1ua1G/u+I6mKlFmlaZa4/CmwvPvB1VSanEonY/mg /pHtQGeEPhoXLDnadAzUKx1mrp1HvqeJvFPVfWAv/hA6XYENuI6ltiN15FJT7Qqs zjA7dMo+UhmJkzBuuNrJWMqTT4qvT2REClTovuy9FYmRkH8UZ0ouiI699xPlrD9J ZaLpuB3Vrjzm0BjB7sd+yyrPWWP5Wg== =6ipr -----END PGP SIGNATURE----- --aSbZTaX27kKPUTye--