Free Pascals unit files (PPU) are binary files created by the Free Pascal Compiler (FPC). In the header (which can be viewed with the ppudump command) information about the source file is stored, including the timestamp. This makes packages currently unreproducible when they contain PPU files that are generated from files that changed during the build (e.g. by patching). (For those unfamiliar with PPU files, consider them binary versions of c-header files.)

The fact that the timestamps are stored in the PPU files will not change. The explanation from upstream: "The date is still used to avoid recompilation since the CRC (not SHA) approach requires to re-parse the interface declaration which can be costly to parse as well. Because of this a re-parsing is only done if the source file's timestamp is different compared to the one stored in the PPU (this also includes include files). This mechanism is also used for the WPO response file (which is referenced in the PPU as well) if Whole Program Optimization is enabled."

Package that are bitten by this issue can fix it by making sure that updated files are given a sensible timestamp before building. The fp-utils package since 3.0.0+dfsg-5 has a helper script called fp-fix-timestamps that can be used by packages to fix this. How it works is that the package keeps track (with the help of fp-fix-timestamps) of what the timestamp should be in a debian/source/timestamps file. During building, the timestamps are used to touch the files. The current code in the lazarus package then does the following in debian/rules configure target after changing several files:

fp-fix-timestamps touch

An simple alternative is the following example code for debian/rules (e.g. in the configure target) based on the SOURCE_DATE_EPOCH generated from the debian/changelog date:

find src -newermt "@$${SOURCE_DATE_EPOCH}" -print0 | xargs -0r touch --no-dereference --date="@$${SOURCE_DATE_EPOCH}"

Known affected packages