You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2020/02/17 18:33:57 UTC

[lucene-solr] branch master updated: LUCENE-9220: prevent zip file reproducibility issues based on users umask

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new ccb390d  LUCENE-9220: prevent zip file reproducibility issues based on users umask
ccb390d is described below

commit ccb390d4a6fb1a00454660a50ec85287571ab4bf
Author: Robert Muir <rm...@apache.org>
AuthorDate: Mon Feb 17 13:34:00 2020 -0500

    LUCENE-9220: prevent zip file reproducibility issues based on users umask
---
 gradle/generation/snowball.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gradle/generation/snowball.sh b/gradle/generation/snowball.sh
index 27aaf36..7879b2d 100755
--- a/gradle/generation/snowball.sh
+++ b/gradle/generation/snowball.sh
@@ -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}