mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Version reporting
Date: Wed, 20 Nov 2013 21:25:24 -0500	[thread overview]
Message-ID: <20131121022523.GA2868@brightrain.aerifal.cx> (raw)

One of the requested features I want to get in before 1.0 is having
ld.so report the musl version; an open issue is whether the version
should also get linked into static binaries. I've gone back and forth
about how much detail I want in the version string, but here's a
proposal we could discuss:

Base version stored in VERSION file.

Generate version.c with deps (to force rebuild) on VERSION and an
appropriate file in .git if it exists (using $wildcard()).

Derivation of version.c:
- If .git does not exist, simply use VERSION
- Else if .git exists but git command does not work, use VERSION+git
- Else if git describe with --match matches VERSION, use VERSION
- Else if git does not have tag matching VERSION, use VERSION
- Else, use VERSION+git

Optionally, the else case could be replaced with a more detailed
version string produced by git describe. It's not clear to me whether
this is desirable; more likely, it's misleading if you have local
changes in your tree, since it gives a false feeling that the binary
actually matches a particular revision in the git history.

An alternate, possibly simpler approach would be simply always using
VERSION and appending +git unconditionally if .git exists.

Comments?

Rich


                 reply	other threads:[~2013-11-21  2:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131121022523.GA2868@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).