Re: [Reproducible-builds] Create tar archive with deterministic file order

2015-02-15 Thread Jérémy Bobbio
Steven Chamberlain: > This isn't really limited to data.tar but potentially any tarball. > Linux packaging ships an equivalent linux-source-3.16.tar.xz built > from debian/rules.real in a probably non-reproducible way: > > cd '$(BUILD_DIR)'; tar -caf 'linux-source-$(UPSTREAMVERSION).tar.xz' >

Re: [Reproducible-builds] Create tar archive with deterministic file order

2015-02-14 Thread Steven Chamberlain
Jérémy Bobbio wrote: > Suggested solution: > > find foo -print0 | LC_ALL=C sort -z | > tar --null -T - --no-recursion -Jcvf foo.tar.xz Seems ideal to me. > > (I thought this problem would be quite common, so I could add it to the > > Wiki FAQ). > > It's there already: > https://wiki

Re: [Reproducible-builds] Create tar archive with deterministic file order

2015-02-14 Thread Jérémy Bobbio
Steven Chamberlain: > Finally I ended up with this: > > $ find foo/ -type f -print0 > filelist > $ tar -Jcvf foo.tar.xz -T filelist --null > > Does that seem like the neatest way, or do you have better suggestions? You are missing the actual sorting on this one. ;) Suggested solution: find

Re: [Reproducible-builds] Create tar archive with deterministic file order

2015-02-14 Thread Reiner Herrmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Steven, On 02/14/2015 09:44 PM, Steven Chamberlain wrote: > What would be a preferred way to build a tar archive with deterministic > file order? > > Firstly let me point out that: > > $ find foo/ -type f -print0 | sort -z | xargs -0 tar -cvf f