[Reproducible-builds] Bug#774498: base-files: please make the build reproducible

Jérémy Bobbio lunar at debian.org
Fri May 15 20:07:34 UTC 2015


Hi!

Santiago Vila:
> I'm thinking about the minimal "find" command which does the trick.
> 
> The proposed line says this:
> 
> +       find debian/tmp -depth -newermt '$(BUILD_DATE)' -print0 | \
> +               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
> 
> Why -depth?
> 
> If I were to remove files or directories, the timestamps of the parent
> directories would be affected. A simple touch, however, does only
> touch what I tell it to touch, so I don't see why the -depth switch is
> required here. Do other systems behave differently? kFreeBSD? Hurd?

Indeed. I was convinced that touch would change the directory mtime, but
that's actually not true. Thanks for noticing. We shall update doc and
patches, now. :D

> Then we have the -print0 and xargs -0. This is of course needed in the
> general sense, but if this package had any files containing spaces in
> their filename I would consider it undesirable and would prefer to fix
> the package first (in this case I'm only talking about this package).

Your call. debhelper uses \0 to stay compatible in most situation and
I'm following the trend.

> Finally, what would happen if I remove -r from xargs? It would FTBFS
> if the list of files to be touched is empty, which means the package
> is being built in the past (before the date in the changelog). Would
> this be considered as a real FTBFS or as a false positive?

I think this depend on your package. This also comes from debhelper as
we don't want to introduce FTBFS because of changes to make builds
reproducible.

-- 
Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- 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/20150515/a0e1c116/attachment.sig>


More information about the Reproducible-builds mailing list