Mentions légales du service

Skip to content
  • Luis R. Rodriguez's avatar
    autotools: add localversion information · 3dd3db46
    Luis R. Rodriguez authored and HINDERER Sebastien's avatar HINDERER Sebastien committed
    
    
    When someone is building Coccinelle from source on a git tree
    with some modifications we currently cannot tell what type of
    modifications, if any, were done. Add a localversion info
    postix which will be pegged onto the version string *iff* the
    git tree used has either a change non-commited  yet or if the
    git tree has some commits beyond what was officially released
    and tagged. This also lets release managers skip the local
    version postfix tag when preparing an official coccinelle
    release, by using:
    
    ./autogen --ignore_localversion
    
    This can be used by release managers when preparing a release
    prior to pegging a release with a tag, so that the released
    default configure scripts can be commited prior to marking
    the git tree with a release tag. This is disabled by default,
    so that the only way that you won't get a postfix is if you
    used a blessed official release.
    
    If you have a dirty tree with some uncommited changes the
    version will be postfixed with -dirty. For example if 1.0.2 was
    blessed and released and you had a series of uncommited changes
    you'd end yup with:
    
    1.0.2-dirty
    
    Likewise if your tree has some commits not upstream these will be
    reflected. For instance, say you had one extra commit, you'd end
    up with:
    
    1.0.2-00001-g8870d8b0cf33
    
    The purpose of this is to enable developers and tools within
    Coccinelle to be able to tell when folks have modified upstream
    code.
    
    The setlocalversion file was take and modified from the Linux
    kernel, it was repurposed for Coccinelle by just simplifying it
    by hardcoding it to use the long version string if there is any
    delta. It also supports unsigned and un-annotated tags (how
    Coccinelle makes releases today), and enables folks to easily
    switch to forcing PGP signed tags if that is desirable at a later
    time. For now it does not require PGP signed tags at all. The way
    non-PGP tags are supported is by using 'git describe --tags', this
    is supported on the scripts/setlocalversion file by setting the
    variable TAGS by default to:
    
    TAGS="--tags"
    
    If coccinelle wishes to require PGP signed tags at any point in
    time later this line can simpy be removed or set to an empty string.
    
    Release managers:
    
    Say you have a linear set of history and you are about to make a 1.0.2
    release, you'd can do tthis:
    
    a) Edit the version file and bump it to 1.0.2
    b) Run: git clean -f -x -d
    d) Run: ./autogen --ignore_localversion
    e) git commit -a -s
    g) Run: git tag 1.0.2
    
    When working from source, the average user and developer will run just
    ./autogen, this will peg the local version into the version string.
    Likewise if no git tree exists they'll get the default version string.
    
    Cc: Peter Senna Tschudin <peter.senna@gmail.com>
    Cc: Nikolay Orlyuk <virkony@gmail.com>
    Cc: Sébastien Hinderer <Sebastien.Hinderer@inria.fr>
    Cc: Quentin Lambert <lambert.quentin@gmail.com>
    Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
    3dd3db46