LUCENE-9220: prevent zip file reproducibility issues based on users umask

This commit is contained in:
Robert Muir 2020-02-17 13:34:00 -05:00
parent 0203815ab2
commit ccb390d4a6
No known key found for this signature in database
GPG Key ID: 817AE1DD322D7ECA
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,8 @@ for file in ${TESTSRCDIR}/*; do
shuf -n ${row_limit} --random-source=<(${myrandom} < /dev/zero 2>/dev/null) ${file}/${data} > ${tmpdir}/${data} \
&& touch -t ${arbitrary_timestamp} ${tmpdir}/${data}
done
# explicitly set permissions in case someone has a crazy umask (otherwise zip will differ)
chmod 644 ${tmpdir}/voc.txt ${tmpdir}/output.txt
zip --quiet --junk-paths -X -9 ${TESTDSTDIR}/${language}.zip ${tmpdir}/voc.txt ${tmpdir}/output.txt
echo "${language}" >> ${TESTDSTDIR}/test_languages.txt
rm -r ${tmpdir}