[Development] Reproducible Qt ; the purpose of QLibraryInfo::buildDate

Sune Vuorela nospam at vuorela.dk
Tue Feb 3 08:40:12 CET 2015


After a couple of patches [1], most submitted to gerrit, my current qtbase dev
build on linux is bitwise reproducible. This is the first step to let
end users check that the binaries they recieve actually matches the
sources they recieve.

The first simple steps is 1) ensure __DATE__, __TIME__ and __TIMESTAMP__
aren't used. (-Werror=date-time can help with that)
2) do some builds and compare the results. 
3) fix fix fix. 

I have one local patch pending[2] that I'm unsure what to do with. As
mentioned in subject, QLibraryInfo::buildDate().  First of all, I'm a
bit puzzled by the purpose of it. THe documentation is quite unclear. It
might give build time, configure time or installation time:

"Returns the installation date for this build of Qt. The install date
will usually be the last time that Qt sources were configured."

The easiest would be to just fix it to some chosen date and mark it as
deprecated. It doesn't seem to be really used in 'real life code' on the
internet, and it has unclear documentation, and I can't really imagine
what it actually should be used for.

So, can someone enlighten me on the purpose of this function?

Thanks in advance



-static const char qt_configure_installation          [12+11]    =
"qt_instdate=`date +%Y-%m-%d`";
+static const char qt_configure_installation          [12+11]    =
"qt_instdate=1982-02-15"; [3]

any date seems to be usable

first patch for creator:

More information about the Development mailing list