[Pkg-libburnia-devel] Reproducible patches for libisoburn and libisofs

Thomas Schmitt scdbackup at gmx.net
Sun Aug 7 19:51:46 UTC 2016


i now implemented the new -as mkisofs option:

  --set_all_file_dates timestring
       Set mtime, atime, and ctime of all files and directories to  the
       given time.
       Valid  timestring  formats  are:  'Nov  8  14:51:13  CET  2007',
       110814512007.13, 2007110814511300. See also --modification-date=
       and man xorriso, Examples of input timestrings.
       This  action  stays  delayed until mkisofs emulation ends. Up to
       then it  can  be  revoked  by  --set_all_file_dates  with  empty
       timestring.   In  any  case  files  which get into the ISO after
       mkisofs emulation ended will not  be  affected,  unless  another
       mkisofs emulation applies --set_all_file_date again.

Committed as http://libburnia-project.org/changeset/5737

If one uses this option, then one should consider whether it is also
desirable to use option -r for overriding ownership and permissions.


Further it turned out that the HFS+ superblock gets target->now as timestamp.
(HFS+ is not enabled by default but may be demanded by grub-mkrescue.)
So i invented a nice excuse for making target->now reproducible:

It seems appropriate to define target->now as the maximum of the effective
Volume Creation Date and Volume Modification Date.

So if they are overridden by --modification-date= , then the HFS+ superblock
becomes reproducible.
Further, reproducibility of ISO 9660 directory records will then not depend
on the setting of iso_write_opts_set_dir_rec_mtime() which is controled via
xorriso command -compliance "rec_mtime" or "no_rec_mtime".

Committed as


There remain the timestamps of the synthetic Boot Catalog file. This file
object turned out to be very slippery. It appears in the file tree when a
second boot image gets announced by -el-torito-alt-boot. If this does not
happen (e.g. because only BIOS and no EFI), then the boot catalog appears
only when the ISO writing starts. It cannot be manipulated before it exists,
of course.

After some forth and back, i decided to set the boot catalog file timestamps
to target->now.

So the man xorrisofs entry of --set_all_file_dates got an addition:

       The  timestamps of the El Torito boot catalog file get refreshed
       when  the  ISO  is  produced.  They   can   be   influenced   by

Committed as
and http://libburnia-project.org/changeset/5738


I wonder whether there are still pitfalls about timezones.


So the advise for reproducibility via -as mkisofs emulation will be:

- Use xorriso-1.4.5 snapshot 2016.08.07.193333 or newer.

- Use option
  to control the timestamps of the filesystem superblocks and other global
  components of the ISO filesystem.

- Consider to use option
     --set_all_file_dates YYYYMMDDhhmmsscc
  to override the timestamps of the input files and directories.

- Consider to use option
  to override POSIX ownership and access permissions.


Uploaded is the first GNU xorriso 1.4.5 which hopefully fulfills the promise
of above advise:

  MD5 d5b0a706eb918b76153064ef4d5c2dcb
  Version timestamp :  2016.08.07.193333

If possible, give it a good load of testing. Two different producer machines
with different timezone settings would be great. Make sure that not only
isoinfo and Linix mount show no differences but that the test ISOs are
really identical byte by byte.

Have a nice day :)


More information about the Pkg-libburnia-devel mailing list