bug-xorriso
[Top][All Lists]
Advanced

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

Re: [Bug-xorriso] how to create reproducible ISO files?


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] how to create reproducible ISO files?
Date: Wed, 09 Mar 2016 00:13:38 +0100

Hi,

i see that i forgot to CC the lists address@hidden and
address@hidden with my replies to Peter Butler.

--------------------------------------------------------------------
Wed Mar 2 08:44:17 CET 2016:
--------------------------------------------------------------------

the differences between two ISOs created by your example is in
the ctime stamp of the root directory and the file.
You set the ctime of the file but then issue the command

   -alter_date a 2016010101010101 file --

According to the manual

  "a" sets access time, updates ctime.
  ...
  "a-c", "m-c", and "b-c" set the times without updating ctime.

so your ctime stamp gets overwritten.


I get no differences if i do

   xorriso -as genisofs -o test.iso file -- \
       -volume_date c 2016010101010101 \
       -volume_date m 2016010101010101 \
       -volume_date x 2016010101010101 \
       -volume_date f 2016010101010101 \
       -alter_date_r b-c 2016010101010101 / -- \
       -alter_date_r c 2016010101010101 / --

This is very coarse, of course, because all mtime and atime stamps
of all files and directories get set.

I tried without "b-c", but then i get automatic timestamps in the
ISO 9660 directory record field "Recording Date and Time".
The timestamps shown by ls -l are from the Rock Ridge information,
which does not get automatic timestamps in above run.
I will have to investigate why "b-c" overrides "Recording Date and Time".


(I would replace
   xorriso -as genisofs -o test.iso file -- \
 by
   xorriso -outdev test.iso -map file /file \
 to avoid any peculiarities of the -as mkisofs emulation.
 This preference might get changed, if lots of further -as mkisofs options
 shall be used with the real run. One may translate them to the generic
 xorriso command set, but this conversion might be cumbersome and error
 prone.
)

---------------------------------------------------------------------
Wed Mar 2 09:02:36 CET 2016:
--------------------------------------------------------------------

the need for setting the mtime and atime is restricted to the
root directory itself. The files do not need this, as long as their
timestamps on hard disk do not change.

I.e. this is reproducible:

   xorriso -as genisofs -o test.iso file -- \
       -volume_date c 2016010101010101 \
       -volume_date m 2016010101010101 \
       -volume_date x 2016010101010101 \
       -volume_date f 2016010101010101 \
       -alter_date b-c 2016010101010101 / -- \
       -alter_date_r c 2016010101010101 / --

(Note the difference between -alter_date and -alter_date_r.)

---------------------------------------------------------------------
Wed Mar 2 09:02:36 CET 2016:
---------------------------------------------------------------------

another aspect to consider:

Before the newest release 1.4.2, libisofs (and thus xorriso) sorted
the data file content (aka "extents") by a sequence which was defined
by the shape of a Red-Black tree.
Although the Red-Black algorithm is deterministic, i am not sure whether
the same file set after some longer time will yield the same Red-Black
tree.

Beginning with version 1.4.2 the extents are sorted alphabetically
according to the low level ISO 9660 file names. (The same rule is
demanded by ISO 9660 for the sequence of directory records in a
directory.)

So if reproducibility is important to you, better use xorriso 1.4.2
or younger.

---------------------------------------------------------------------

Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]