Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#133560 - 08/01/2003 10:16 Version control in Linux
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
I've been asked to look at version control in Linux. Over the years we've developed a lot of software under windows and have used the version tab in the properties window to great effect. This is very usefull as it means we can check the version of a piece of software without running it. My question is there an equivalent in linux? I've checked KDE but there doesn't appear to be anything, can it be added or enabled?
_________________________
Cheers,

Andy M

Top
#133561 - 08/01/2003 10:36 Re: Version control in Linux [Re: andym]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Under linux, everything is run from the command line interface - even GUI apps, so although KDE apps are launched graphically by the user, KDE is really running exec'ing the app as if it were being running from an xterm.

Most linux apps have a version switch so that when the switch is supplied on the command line, the app reports version and exits. This switch is often -v or --version, although applications are not always consistent. KDE ( and/or Gnome ) may well have this switch defined in a style guide, so that truely compatible apps have a defined switch.

Try kmix -v, and then kmix in an xterm...
You will notice that kmix reports the versions of it's 2 major dependancies ( KDE and Trolltech's Qt library ), which is better than the Windows equivalent (Right Click..properties) that won't report .DLL versions.

I'm not really sure how Windows gets the version of an app that is reported in that way... maybe it's in the registry (possibility for corruption leading to false versions reported), or more likely, a similar method is used, and windows calls the app through a well-defined interface.

_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#133562 - 08/01/2003 10:47 Re: Version control in Linux [Re: genixia]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
I'm not really sure how Windows gets the version of an app that is reported in that way... maybe it's in the registry (possibility for corruption leading to false versions reported), or more likely, a similar method is used, and windows calls the app through a well-defined interface.

Windows grobbles around in the headers of the binary -- the Win32 binary format contains the version fields, so, although the program isn't "run", it is directly consulted.

The ELF format used in Linux may well have similar fields, but they aren't used for executables; running with "--version" is the de facto standard. Library versioning, of course, is done in the filename, i.e. libfoo.so will be a symlink to libfoo.so.2 (major version) which is a symlink to libfoo.so.2.1.5 (full version). These symlinks are maintained by the ldconfig program, which examines the shared-library format headers to discover the "true" version.

Peter

Top
#133563 - 08/01/2003 10:56 Re: Version control in Linux [Re: peter]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Windows grobbles around in the headers of the binary

Footers, technically. The VERSIONINFO block is stashed with the other resources (menus, dialogs, etc.) towards the end of the file (though it doesn't have to be).

The Win32 executable format also has space in the COFF header for a file version, but very few applications bother to fill this in.
_________________________
-- roger

Top
#133564 - 08/01/2003 13:02 Re: Version control in Linux [Re: peter]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Library versioning is all very unfortunate, and leads to things like libc-2.1.2.so, a practice I abhor.

Top
#133565 - 08/01/2003 15:03 Re: Version control in Linux [Re: andym]
rjlov
member

Registered: 16/12/1999
Posts: 188
Loc: Melbourne, Australia
If you're using RCS, or presumably anything which uses RCS as a backend (CVS, Perforce...), then ident can come in handy to see what source code went into a particular binary.

Richard.

Top
#133566 - 08/01/2003 15:04 Re: Version control in Linux [Re: Daria]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
But what would the alternative be?

( I assume by extension that you also abhor libfoo.so.x.y.z and are not just griping about the arse-about-face labelling of libfoo.x.y.z.so )

At least in linux, for the whole part, backward compatibility is often kept, and it is possible to keep multiple versions of libraries around anyway. I've had a lot less dynamic library version issues under linux than under any 'doze box I've ever had.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#133567 - 08/01/2003 15:21 Re: Version control in Linux [Re: peter]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
running with "--version" is the de facto standard

...or "-V" or "-v" or something more obscure...

P.S. I know someone is going to ask for an example of "more obscure", if so try dig, it has no -v, -V or --version. You just have to run it and grok the normal output.
_________________________
Remind me to change my signature to something more interesting someday

Top
#133568 - 08/01/2003 15:48 Re: Version control in Linux [Re: genixia]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
( I assume by extension that you also abhor libfoo.so.x.y.z and are not just griping about the arse-about-face labelling of libfoo.x.y.z.so )

You assume wrong

libc.so.whatever is fine
libc-whatever.so is a crock.

I had backward compatibility on SunOS 4 without this crock in like 1993.

Top
#133569 - 08/01/2003 16:01 Re: Version control in Linux [Re: Daria]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Ahh, the Library versioning is all very unfortunate got me.

I too abhor the libfoo-x.y.z.so bastardisation.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#133570 - 08/01/2003 16:05 Re: Version control in Linux [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Of course I still have it, because my SunOS 4 box is substantially unmodified... since not long after 1993

Top