[Pkg-pascal-devel] bits from the release team
peter green
plugwash at p10link.net
Sat Jun 27 16:02:21 BST 2026
On 27/06/2026 15:47, Mazen Neifer wrote:
> I've tried to investigate this issues and came to the following conclusion based on multiple analysis about what is causing the non-reproducibility in the |lcl.chm| build.
>
> The Compiled HTML Help (CHM) generation process uses FPC's built-in |chmwriter.pas| (which is compiled into the |fpdoc| utility). It has two runtime calls to |*SysUtils.Now*| that embed timestamps into the binary:
>
> 1. *CHM Header:* |*TITSFWriter.InitITSFHeader*| sets |*TimeStamp := NToBE(MilliSecondOfTheDay(Now));*|
> 2. *System Stream:* |*TChmWriter.WriteSYSTEM*| sets a metadata entry with |*FSection0.WriteDWord(NToLE(MilliSecondOfTheDay(Now)));*|
>
> Because these calls use the system clock at runtime, the generated CHM files differ byte-for-byte depending on the exact millisecond they are built. Setting the |*SOURCE_DATE_EPOCH*| environment variable has no effect because |*SysUtils.Now*| is a standard FPC runtime function and does not read it.--
>
So presumablly the fix would be to patch said generator so it does understand
SOURCE_DATE_EPOCH.
More information about the Pkg-pascal-devel
mailing list