Reproducible build and prelease information

Julien ÉLIE julien at trigofacile.com
Fri Nov 18 19:32:13 UTC 2022


Hi all,

During the packaging of INN for Debian, it was noticed that 
Makefile.global.in in the tarball and the one in the Git tag differ with:

[in the Git tag]
VERSION_EXTRA	= prerelease

[in the tarball]
VERSION_EXTRA	=

It was already the case in previous releases.

For the next releases, I then suggest to adapt the release process to 
manually remove "prerelease" in the same commit as the one that modifies 
the FAQ to reflect the new version.  (This is usually the latest commit 
before the release.)  And re-adding "prerelease" in the subsequent 
commit that also modifies Makefile.global.in to bump the version number.

Or do you see something better to do?




Also, when building a prerelease version of INN, support/mkversion adds 
the current date (YYYYMMDD) in the source code, so that it is displayed 
for instance in the NNTP greeting banner.
In order to make the build reproducible, I suggest an improvement for 
people building from Git (the date used will be the one of the latest 
commit instead of the current date).  Otherwise, it won't change from 
the current behaviour.

if [ x"$extra" = x"prerelease" ]; then
     # Ensure a reproducible build when the source code has not changed.
     LAST_COMMIT_DATE=$(git log -1 --pretty=%cd --date=format:%Y%m%d 
2>/dev/null | tr -d '-')
     if [ -n "$LAST_COMMIT_DATE" ]; then
         date="$LAST_COMMIT_DATE"
     else
         date=$(date +%Y%m%d)
     fi
     extra="$date $extra"
fi


Does someone see any drawback with that?
(The inn-CURRENT-20221118 snapshot would advertise 20221004 as the date 
of the latest commit, instead of the date of the build.)

-- 
Julien ÉLIE

« – Il l'aura voulu.
   – Tu crois vraiment ? » (Astérix)


More information about the inn-workers mailing list