[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#894476: RCC: provide option to encode EPOCH timestamp



On April 3, 2018 7:25:03 PM GMT+01:00, Sune Vuorela <sune@debian.org> wrote:
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

Hi Sune,

The problematic files are Qt message files (ie .qm files) generated at build time via lrelease from translation files (ie .ts files). Therefore two different builds will generate those .qm files at different times which will end up with different cpp files generated by rcc. Currently I'm working around it by setting the modified time of those .qm files to EPOCH after they are generated. I think it would be nice if there was a way for rcc to avoid doing that manually. I agree with Chris that honouring SOURCE_DATE_EPOCH in rcc would be a nice solution.

Best regards,

Thomas
Reply to: