mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Feature request
Date: Tue, 29 Oct 2013 17:30:30 -0400	[thread overview]
Message-ID: <20131029213030.GZ20515@brightrain.aerifal.cx> (raw)
In-Reply-To: <20131029192343.GO1685@port70.net>

On Tue, Oct 29, 2013 at 08:23:43PM +0100, Szabolcs Nagy wrote:
> * Kurt H Maier <khm@sciops.net> [2013-10-29 18:53:38 +0000]:
> > Quoting Andrew Bradford <andrew@bradfordembedded.com>:
> > >How often is this a concern?
> > >How are people obtaining non-release source trees not via an scm tool?
> > >
> > 
> > By pulling on one machine and copying it to various build hosts.  The
> > fewer build dependencies, the better.
> > 
> 
> or building in a chroot
> or in qemu from a v9fs mount
> ...
> 
> the build should not fail if git is unavailable

Exactly.

> otherwise the version string is not critical in that case
> (if it's a make variable then it can be overridden from
> config.mak or from the make cmdline anyway)

It's not _critical_, but if it's horribly wrong, that defeats the
purpose of being able to determine the version installed. Perhaps a
good fallback approach would be:

1. Have a version file which always contains the most recent released
   version (i.e. it's updated in the tagged commit for the release).

2. At build time, if git is available and .git exists, use git
   describe to construct the version string.

3. Otherwise, use the version file (from #1 above), and if .git
   exists, append -unknown-git or similar to it so that it's clear
   that there may be changes beyond what was in the release.

Clearly the version string should make it into the dynamic linker's
usage output, but is there anywhere else it should be visible (such as
a string in static binaries, or a confstr() string)? I don't want to
go adding bloat that makes users mad, but it also may be frustrating
not to know what version a binary was linked with, so I think this is
a question that merits some discussion.

Rich


  reply	other threads:[~2013-10-29 21:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28 20:13 Paul Schutte
2013-10-29  2:33 ` Rich Felker
2013-10-29  2:48   ` Luca Barbato
2013-10-29  4:54     ` Rich Felker
2013-10-29  5:06       ` Luca Barbato
2013-10-29  7:12         ` Ivan Kanakarakis
2013-10-29 10:29           ` Luca Barbato
2013-10-29  8:30         ` Georgi Chorbadzhiyski
2013-10-29 14:23       ` Andrew Bradford
2013-10-29 18:53         ` Kurt H Maier
2013-10-29 19:23           ` Szabolcs Nagy
2013-10-29 21:30             ` Rich Felker [this message]
2013-10-30  3:21               ` Luca Barbato

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=20131029213030.GZ20515@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).