Discussion:
Bug#845034: initramfs-tools: please ensure initrd images are reproducible
(too old to reply)
Chris Lamb
2016-11-19 17:50:01 UTC
Permalink
Source: initramfs-tools
Version: 0.125
Severity: wishlist
Tags: patch
User: reproducible-***@lists.alioth.debian.org
Usertags: timestamps toolchain
X-Debbugs-Cc: reproducible-***@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] on behalf of
Tails [1], I noticed that mkinitramfs generates non-reproducible
ramdisk images.

Patch attached.

[0] https://reproducible-builds.org/
[1] https://tails.boum.org/


Regards,
--
,''`.
: :' : Chris Lamb
`. `'` ***@debian.org / chris-lamb.co.uk
`-
Debian Bug Tracking System
2016-12-15 05:10:01 UTC
Permalink
block -1 with 804063
Bug #845034 [src:initramfs-tools] initramfs-tools: please ensure initrd images are reproducible
845034 was not blocked by any bugs.
845034 was not blocking any bugs.
Added blocking bug(s) of 845034: 804063
--
845034: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845034
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Ben Hutchings
2018-07-18 21:10:01 UTC
Permalink
Hello
Attached is a updated patch, which disable the ldconfig aux-cache
(/var/cache/ldconfig/aux-cache), as it isn't reproducible (at least not
on my system).
Can I in anyway help getting this merged?
I've applied Chris's patch, but I think your changes on top of that are
a step too far.

I had a look at the source for ldconfig, and here's what I found:

* The entries in /etc/ld.so.cache are sorted by, so far as I can see,
attributes that are derived from the contents of libraries. So this
cache should be reproducible, and we should include it in the
initramfs image.

* The entries in /var/cache/ldconfig/aux-cache are organised as an
associative array, with the keys including file attributes like
device number, inode number and inode change time. This means it is
not only unreproducible, but completely useless at boot time since
the device and inode numbers of libraries will be different.

* Before writing the aux-cache file, ldconfig will try to create
/var/cache/ldconfig if it doesn't exist, but not any of the parent
directories. Since mkinitramfs does not create /var/cache itself,
the aux-cache file is only created if a hook script creates that
directory. I think that explains why Chris didn't find this
problem.

Since there is no option to explicitly disable creation of the aux-
cache file, I propose to delete it ldconfig creates it.

Ben.
--
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky
Chris Lamb
2018-07-19 01:00:01 UTC
Permalink
Hi Ben & Kristian,

Curiously enough I don't remember receiving Kristian's patch. :)
Post by Ben Hutchings
not only unreproducible, but completely useless at boot time since
the device and inode numbers of libraries will be different.
[…]
Post by Ben Hutchings
Since there is no option to explicitly disable creation of the aux-
cache file, I propose to delete it ldconfig creates it.
^

Missing "if"? :)


Regards,
--
,''`.
: :' : Chris Lamb
`. `'` ***@debian.org / chris-lamb.co.uk
`-
Ben Hutchings
2018-07-19 01:10:01 UTC
Permalink
Post by Chris Lamb
Hi Ben & Kristian,
Curiously enough I don't remember receiving Kristian's patch. :)
Post by Ben Hutchings
not only unreproducible, but completely useless at boot time since
the device and inode numbers of libraries will be different.
[
]
Post by Ben Hutchings
Since there is no option to explicitly disable creation of the aux-
cache file, I propose to delete it ldconfig creates it.
^
Missing "if"? :)
Yes, "... delete it if ldconfig creates it."

Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
Debian Bug Tracking System
2018-07-19 00:30:02 UTC
Permalink
Your message dated Thu, 19 Jul 2018 00:19:36 +0000
with message-id <E1ffwfQ-000BSw-***@fasolo.debian.org>
and subject line Bug#845034: fixed in initramfs-tools 0.131
has caused the Debian Bug report #845034,
regarding initramfs-tools: please ensure initrd images are reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
845034: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845034
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Trent W. Buck
2018-07-19 06:00:01 UTC
Permalink
+ LC_ALL=C sort
[and similar LC_ALL=C elsewhere]
I think you can dial that back from LC_ALL=C to just LC_COLLATE=C.

Informal proof:

bash4$ printf %s\\n README ReadMe readme | LC_COLLATE=en_AU.UTF-8 sort
readme
ReadMe
README

bash4$ printf %s\\n README ReadMe readme | LC_COLLATE=C sort
README
ReadMe
readme

bash4$ printf %s\\n README ReadMe readme | LC_ALL=C sort
README
ReadMe
readme
Ben Hutchings
2018-07-19 15:00:01 UTC
Permalink
Post by Trent W. Buck
+ LC_ALL=C sort
[and similar LC_ALL=C elsewhere]
I think you can dial that back from LC_ALL=C to just LC_COLLATE=C.
[...]

Now try with LC_ALL=en_AU.UTF-8 already set in the environment. That
overrides LC_COLLATE etc.

Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
Loading...