File findfiles.sh of Package go-ipfs-beta
#!/bin/sh
if ! [ -e .rb.build.log.strace ] ; then
sed -i.bak -e 's/go-ipfs-min.tar/go-ipfs.tar/' *.spec
osc build --clean --noservice --alternative-project home:bmwiedemann:reproducible -x reproducible-faketools-strace openSUSE_Tumbleweed
cp -a /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/.build.log .rb.build.log.strace
cp -a *.spec.bak *.spec
fi
rm -rf out ; mkdir out
grep open.*RDONLY .rb.build.log.strace > out/files
grep -e '"mod' out/files | grep -v -e " = -1 " > out/files2
grep /home/abuild/rpmbuild/BUILD/ out/files | grep -v -e " = -1 " -e O_DIREC >> out/files2
grep -o 'mod/[^"]*' out/files2 |
perl -ne 'print unless -d $_' |
sort -u > out/files3
rm -rf in ; mkdir -p "in"
( cd in && tar xf ../go-ipfs.tar && cp --parent -a $(cat ../out/files3) ../out)
tar -C out -c --format=ustar --sort=name --mtime=@1 --owner=root --group=root -f go-ipfs-min.tar mod