something reasonable and thereafter recognize our test configs using
2.4.2 config version.
my personal preference when (rpm-)building *test* builds from HEAD is to 
'label' the build with closest/latest release tag, AND the build short commit.


e.g.,

        dovecot --version
                2.4.2 (65ca73d)
        grep "FULL PIGEONHOLE_VERSION" sieve/pigeonhole-version.h
                #define PIGEONHOLE_VERSION_FULL PIGEONHOLE_VERSION" (306b597)"

to reliably track what i've got installed
( well, not _just_ for _test_ builds;  upstream release tags can lag way behind 
... )

to do that requires (required?  i haven't checked latest yet ...) some more 
tap-dancing

the issue was that when building from tarball (no .git), update-version.sh exits early if 
build-dir dovecot-version.h already exists, and reports empty "()".

modifying headers sanely something like

        cat > dovecot-version.h <<'EOF'
        #ifndef DOVECOT_VERSION_H
        #define DOVECOT_VERSION_H
        #ifndef DOVECOT_REVISION
        #define DOVECOT_REVISION "${dovecot_shortcommit)"
        #endif
        #ifndef DOVECOT_VERSION_FULL
        #define DOVECOT_VERSION_FULL VERSION" ("DOVECOT_REVISION")"
        #endif
        /* lib.c requires this; upstream defaults it to DOVECOT_VERSION_FULL */
        #ifndef DOVECOT_BUILD_INFO
        #define DOVECOT_BUILD_INFO DOVECOT_VERSION_FULL
        #endif
        #endif /* DOVECOT_VERSION_H */
        EOF

and, similarly -- but not quite! -- for pigeonhole,

        autoreconf -I . -fiv
        ./configure ...

        cat > pigeonhole-version.h <<'EOF'
        #ifndef PIGEONHOLE_VERSION_H
        #define PIGEONHOLE_VERSION_H
        #define PIGEONHOLE_VERSION_FULL PIGEONHOLE_VERSION" 
(${pigeonhole_shortcommit))"
        #endif /* PIGEONHOLE_VERSION_H */
        EOF

works for now.
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to