mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Georgi Chorbadzhiyski <gf@unixsol.org>
To: musl@lists.openwall.com
Subject: Re: Feature request
Date: Tue, 29 Oct 2013 10:30:09 +0200	[thread overview]
Message-ID: <526F7211.4040207@unixsol.org> (raw)
In-Reply-To: <526F426D.2050303@gentoo.org>

Around 10/29/2013 07:06 AM, Luca Barbato scribbled:
> On 29/10/13 05:54, Rich Felker wrote:
>> On Tue, Oct 29, 2013 at 03:48:21AM +0100, Luca Barbato wrote:
>>> On 29/10/13 03:33, Rich Felker wrote:
>>>> On Mon, Oct 28, 2013 at 08:13:09PM +0000, Paul Schutte wrote:
>>>>> Hi Guys,
>>>>>
>>>>> Would it be possible for you to add the version of musl to the output of
>>>>> libc.so ?
>>>>>
>>>>> root@sabotage:~# /lib/libc.so
>>>>> musl libc/dynamic program loader
>>>>> usage: /lib/libc.so pathname [args]
>>>>>
>>>>> I have several machines with musl on it and it will be very helpful to see
>>>>> which version is installed.
>>>>
>>>> Indeed, this has been something I've wanted to add for a while, and
>>>> which should definitely be in for 1.0. It's just a matter of doing the
>>>> right thing in the build and release system to get the version in
>>>> there, and it's not clear what the version should read for git builds
>>>> between versions. I think this is a good chance to discuss that.
>>>
>>> git describe short signature might be the best option.
>>
>> Thanks for the git-fu help. I'm assuming you mean using something like
>> "git describe --tags"? Use of this could be contingent on either a
>> .git dir, or lack of a version file added to release tarballs. The
>> only thing that's not clear is how to handle non-release source trees
>> present on a build system that lacks a working git installation.
> 
>     if [ -d .git ]; then
> 	VER=$(git describe --always | sed -e "s:v::")
> 	if [ x"$(git diff-index --name-only HEAD)" != x ]; then
>             VER="${VER}-dirty"
>         fi
>     elif [ -f .version ]; then
>         VER=$(< .version)
>     else
>         VER="Unknown"
>     fi
> 
> Or something along the lines.

I'm using this in a Makefile.

VERSION = $(shell cat RELEASE)
GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
ifeq "$(GIT_VER)" ""
GIT_VER = "release"
endif

-- 
Georgi Chorbadzhiyski | http://georgi.unixsol.org/ | http://github.com/gfto/


  parent reply	other threads:[~2013-10-29  8: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 [this message]
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
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=526F7211.4040207@unixsol.org \
    --to=gf@unixsol.org \
    --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).