[Reproducible-builds] Communicating about the change in behaviour for ar

Jérémy Bobbio lunar at debian.org
Sun Jan 17 11:27:09 UTC 2016


Manoj Srivastava:
>         I was trying to import the new version of make into unstable, and
>  I discovered that t/10 tests about the archive related part of makes
>  test suite failed. The reason was a change in the behaviour of ar,
>  which is now configured with --enable-deterministic-archives. When
>  adding files and the archive index use zero for UIDs, GIDs, timestamps,
>  and use consistent file modes for all files.  When this option is used,
>  if ar is used with identical options and identical input files,
>  multiple runs will create identical output files regardless of the
>  input files' owners, groups, file modes, or modification times. This
>  seems like good news for reproducible builds.
> 
>         Unfortunately, when using makes libxx(*.a) syntax for creating
>  archives, make needs the timestamp of the file in order to decide to
>  update it or not. With the current deterministic behavior of ar, the
>  timestamp is always 0. This is behaviour that is not backwards
>  compatible (as can be seen in the bug report #798804 and
>  #798913). Some operations, instead of being no-ops, now rebuild theg/Lunar
>  archive.
> 
>         T think the change, because of the benefits of the
>  reproducible builds, are a good thing, but I also think that they are
>  not visible to the general user base (not all the users of ar and make
>  are debian developers, and the release is not the only thing built
>  using ar and make).  My recommendations is a NEWS file entry for
>  binutils and make; and a mention in the release announcement for
>  reproducible builds.
> 
>         I have uploaded a version of make the defaults to adding U to the
>  ARFLAGS, but, on research and reflection, I would be open to reverting
>  that and adding a NEWS entry.

In any case, I think we should communicate to users that something
unexpected (from the point view of make) is happening so they can adapt
their Makefile. What would you think of the attached patch series?

The warning is actually implemented in the second patch, but the first
one is required to be able to differentiate a non-existent archive or
member from a member with a timestamp set to 0.

-- 
Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-ar_member_date-compatible-with-archives-with-ti.patch
Type: text/x-diff
Size: 5171 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160117/6932bdaa/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Issue-a-warning-when-we-detect-a-deterministic-archi.patch
Type: text/x-diff
Size: 1196 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160117/6932bdaa/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160117/6932bdaa/attachment.sig>


More information about the Reproducible-builds mailing list