Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 20 Nov 2013 21:25:24 -0500
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Version reporting

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.