From: W. Tait Cyrus (cyrus@jemez.eece.unm.edu)
Date: 04/18/93


From: cyrus@jemez.eece.unm.edu (W. Tait Cyrus)
Subject: Re: Version numbers
Date: 18 Apr 1993 09:37:57 GMT

In article <C5n97z.BE7@wimsey.bc.ca> jhenders@wimsey.bc.ca (John Henders) writes:
> After several frustraiong experiences with linux software, I'd
>like to propose that all linux authors and porters try to put a version
>number in their binaries that can be called with -v, -V, -h or -?. It
>would be to everyone's benifit if there was an easy way to find out what
>version of a package, instead of sometimes having to go by the file datw
>or what directory on what archive site it was on.
> What do people think?

How about one of the following?
    1) install 'what' under Linux (what looks at files searching for SCCS
        headers printing them out - hopefully they have version information)
    2) add an extra field to the a.out to contain a version number. This
        could go at the end of the a.out structure can might be called
        "version_id" and be 32 bits in length producing a version number of
        the form #.#.#.# where each number can be 0-255 (unsigned).

Option #1 advantages
    1) just port 'what' to Linux
    2) ANY ASCII file can have a legel SCCS field meaning that 'what' can
        be run on ASCII files in addition to binary files
Option #1 disadvantages
    1) multiple output lines meaning it would be impossible to parse the
        output of 'what' to obtain a single version number
        For example a 'what /usr/ucb/what' on a Sun produces:
                        what.c 1.7 88/08/02 SMI
                        any.c 1.5 88/02/08 SMI
    2) no easy way to assign a version number to a library

Option #2 advantages
    1) ALL programs can have a version number WITHOUT having to be modified
        like a -v option would require
    2) Libraries can also have version numbers (done by adding a dummy file
        called __Version which contains the version number)
Option #2 disadvantages
    1) General ASCII files can't have a version number assigned to them.
    2) If done the same way that Convex does it 'ld' would have to be modified
        to add a "default" version number equaling the version number of the
        kernel.
    2A) There are other programs which would need to be modified or added
        such as 'vers' and 'install' (see below).
    3) Would require the version number of a program to be of one of the
        following formats:
                #.# [major.minor]
                #.#.# or [major.minor.patch]
                #.#.#.# [major.minor.patch.rev]
        where all unspecified fields are assumed to be set to zero. This is
        also an advantage since it forces a set way to represent version
        numbers.

Personally I like #2, though I am biased since I used to work at Convex
and Convex does things like this and IHMO it worked VERY well. Basically
under ConvexOS you have commands 'vers' which set/viewed the version number,
'install' which had a '-v' option allowing you to set the version during an
install, and a '-v' option for 'ld' allowing you to set the version number
during a compile/load.

If #2 is something that is implemented I would be willing to write 'vers'.

Comments???