faketime breaks quilt patched file times in Debian
Roland Rosenfeld
roland at spinnaker.de
Sat Apr 30 13:53:13 UTC 2022
[tl;dr faketime results on broken file timestamps for quilt patched
files on salsa]
Hi,
Since some time I observe random broken reproducibilty in some of my
Debian packages (xfig, igerman98, libsnmp-session-perl) in the weekly
salsa CI runs.
Today I tracked this down to faketime being used in Salsa CI
reprotest in combination with quilt modifying the file.
The problem occurs if there is a file in the package, that is modified
by quilt using debian source format 3.0 (quilt).
I created a test repository at
https://salsa.debian.org/roland/faketime-test
There we have a file "patched", that is modified by
debian/patches/01-date.
When using
reprotest --variations=-all,time.faketimes=2023-12-31
this file gets a timestamp that seems to be based on the time diff
between now and the faketime in seconds used as a unixtime epoch.
So this is between now (2022-04-30) and 2023-12-31: 1 year and 9
months, which results in a timestamp 1971-09-02 with a time shrinking
with every run.
I now have added the following to debian/rules:
date
ls -l *patched
which gives me this output when faketime is active:
date
Sun Dec 31 00:00:01 GMT 2023
ls -l *patched
-rw-r--r-- 1 root root 20 Sep 2 1971 patched
-rw-r--r-- 1 root root 20 Dec 31 2020 unpatched
("unpatched" is a file, that gets its timestamp from orig.tar.gz).
Without faketime everything looks correct:
date
Sat Apr 30 01:26:24 GMT 2022
ls -l *patched
-rw-r--r-- 1 root root 20 Apr 30 01:26 patched
-rw-r--r-- 1 root root 20 Dec 31 2020 unpatched
(see https://salsa.debian.org/roland/faketime-test/-/jobs/2721939)
As a workaround I can touch all quilt patched files in debian/rules
like in
https://salsa.debian.org/roland/faketime-test/-/commit/88c78ce9763cf22986b72e75b6361e99532ec4be
that works around the issue, but this doesn't sound like the correct
way to me.
Greetings
Roland
More information about the rb-general
mailing list