On Saturday, March 31, 2018 12:05:02 PM CEST Chris Lamb wrote:While investigating ultracopier's lack of build reproducibility, I found
out that rcc encodes the timestamp of the files the QRC file being
compiled references
I don't actually see why this should be a problem. If input changes, output
changes.
I do think that using touch(1) on the input should allow different output.
It is quite easy to reproduce:
qtbase/tests/auto/gui/image/qimage/foo (dev $%=)$ rcc --format-version 2 ../
qimage.qrc -o 1
qtbase/tests/auto/gui/image/qimage/foo (dev $%=)$ rcc --format-version 2 ../
qimage.qrc -o 2
qtbase/tests/auto/gui/image/qimage/foo (dev $%=)$ rcc --format-version 2 ../
qimage.qrc -o 3
Gives same output.
Even adding in touch ../qimage.qrc keeps the same output.
qtbase/tests/auto/gui/image/qimage/foo (dev $%=)$ rcc --format-version 2 ../
qimage.qrc -o 4
touch ../images/image.bmp
qtbase/tests/auto/gui/image/qimage/foo (dev $%=)$ rcc --format-version 2 ../
qimage.qrc -o 5
is needed to get different output
14ef6dae8e4992ce907948c1c4af272b 1
14ef6dae8e4992ce907948c1c4af272b 2
14ef6dae8e4992ce907948c1c4af272b 3
14ef6dae8e4992ce907948c1c4af272b 4
54c6f8c09a347955ae2f36e68bbd2539 5
So. What touches the files?
/Sune
On Tuesday, April 3, 2018 9:14:23 PM CEST Chris Lamb wrote:Hi Sune!
I don't think honouring SOURCE_DATE_EPOCH is the right idea under normal
circumstances
Can you elaborate on what you mean by "normal circumstances"? :)
"normal circumstances" is rcc on a source file, as opposed to an autogenerated
file.How about e use S_D_E if it is setup/exported, otherwise use the mtime
of the file as before?
I think that using S_D_E only makes sense if rcc is run on an autogenerated
file, but I do think that most rcc runs is run on existing source files.
I don't have a good idea to differentiate those.
/Sune
On Tuesday, April 3, 2018 9:24:58 PM CEST Chris Lamb wrote:
> I'm not /entirely/ sure what the difference is as I'm not in the
> Qt/RCC world too often these days (alas !), but why just not use
> SOURCE_DATE_EPOCH *iff* it is exported?
>
> Normal systems simply do not have this envvar set, so there is really
> no danger of it leaking elsewhere or causing unintended side-effects.
We don't know how application users are using this.
The following is some theoretical example, that I'm quite sure could be used
in some real world applications:
QFileInfo embeddedFile(":/foo/data.xml"); // fallback downloaded in the
ancient past
QFileInfo systemfile("/usr/share/foo/data.xml");
if (systemfile.lastModified() > embeddedFile.lastModified())
{
data = readFromFile(systemFile);
}
else
{
data = readFromFile(embeddedFile);
}
If S_D_E gets used, rather than the data.xml modified date in the source, this
will end up using the wrong file if S_D_E is newer than the system copy of the
file.
This is not a unused databit, but a fully available piece of metadata for the
files.
On 2018-07-11, Lisandro Damián Nicanor Pérez Meyer wrote:
> Version: 5.11.1+dfsg-1
>
> The bug upstream has been closed as invalid (see https://bugreports.qt.io/
> browse/QTBUG-62511) Non the less a workaround has been included in Qt 5.11,
> already in experimental. Setting QT_RCC_SOURCE_DATE_OVERRIDE should be enough
> to solve this issue.
The mentioned upstream bug report is simply marked as invalid without
explanation.
This is (currently) an empty search:
https://codesearch.debian.net/search?q=QT_RCC_SOURCE_DATE_OVERRIDE
Do you have a link for QT_RCC_SOURCE_DATE_OVERRIDE present in Debian and
upstream? This bug doesn't really seem resolved if that variable isn't
actually getting set by anything or consumed by anything...
Ideally QT_RCC_SOURCE_DATE_OVERRIDE would get set based on
SOURCE_DATE_EPOCH, otherwise build tools have an arbitrary growing
number of variables to keep track of for each library, toolchain,
language, etc. that implements their own way of doing this sort of
thing, which kind of defeats the purpose of SOURCE_DATE_EPOCH. *sigh*