Version in glibc
zarniwhoop at ntlworld.com
Sun Nov 16 09:29:49 PST 2008
On Thu, Nov 13, 2008 at 07:43:28PM +0000, Ken Moffat wrote:
> On Wed, Nov 12, 2008 at 08:02:32PM +0000, Ken Moffat wrote:
> > I've applied the following patch to my glibc:
> > --- glibc-2.8-20080929/version.h.orig 2008-11-05 03:42:01.000000000 +0000
> > +++ glibc-2.8-20080929/version.h 2008-11-05 03:42:22.000000000 +0000
> > @@ -1,4 +1,4 @@
> > /* This file just defines the current version number of libc. */
> > #define RELEASE "stable"
> > -#define VERSION "2.8"
> > +#define VERSION "2.8-20080929-LFS"
> Update: I didn't realise this would change the sonames - I have
> I don't know if distros also change these sonames, or if there is
> something else to be done to revert them to -2.8.so ?
In fact, it applied to ALL the sonames from glibc, which is
horribly messy. I tried extracting a binary rpm for fedora-10
preview, to see what the files were called, but failed miserably.
Looking at both their srpm and debian's patches, I'm unconvinced
that the installed files there get called anything other than
Maybe my memory was wrong, and the distro identification only
appears in the gcc version.
I took a look at OpenSuse - they add CVSDATE, set it from the date
of the changelog, and also add the build host (which presumably
picks up some Suse identification) and conditionally add something
about the configure options.
This is revised to just show _which_ weekly snapshot we used
(I assume they'll all be '2.8' for the foreseeable future). The
following patch achieves this (CVSDATE is transformed without any
Not yet Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Initial Package Version: 2.8-20080929 (weekly snapshot)
Upstream Status: Not offered.
Origin: Self, based on OpenSuse
Description: Display the date of the snapshot in '/lib/libc.so.6'.
diff -Naur glibc-2.8-20080929.orig/csu/version.c glibc-2.8-20080929/csu/version.c
--- glibc-2.8-20080929.orig/csu/version.c 2008-01-02 19:25:22.000000000 +0000
+++ glibc-2.8-20080929/csu/version.c 2008-11-16 14:50:04.000000000 +0000
@@ -24,7 +24,7 @@
static const char __libc_version = VERSION;
static const char banner =
-"GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\
+"GNU C Library "RELEASE" release version "VERSION" ("CVSDATE"), by Roland McGrath et al.\n\
Copyright (C) 2008 Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
diff -Naur glibc-2.8-20080929.orig/version.h glibc-2.8-20080929/version.h
--- glibc-2.8-20080929.orig/version.h 2008-04-11 08:01:16.000000000 +0100
+++ glibc-2.8-20080929/version.h 2008-11-16 14:49:01.000000000 +0000
@@ -2,3 +2,4 @@
#define RELEASE "stable"
#define VERSION "2.8"
+#define CVSDATE "20080929"
With this, the sonames are just -2.8 and /lib/ld.so.6 reports
GNU C Library stable release version 2.8 (20080929), by Roland
McGrath et al.
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Compiled by GNU CC version 4.3.2.
Compiled on a Linux >>184.108.40.206<< system on 2008-11-16.
das eine Mal als Tragödie, das andere Mal als Farce
More information about the lfs-dev