Accepting request 1204893 from Java:packages

Make the bootstrap package reproducible too

OBS-URL: https://build.opensuse.org/request/show/1204893
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/antlr?expand=0&rev=54
This commit is contained in:
Ana Guerrero 2024-10-01 15:11:44 +00:00 committed by Git OBS Bridge
commit c7025d12a7
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 1 08:04:27 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use SOURCE_DATE_EPOCH for reproducible builds
-------------------------------------------------------------------
Tue Oct 17 11:07:22 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@ -82,8 +82,13 @@ function compileFiles() {
# PARAM#1: name of jar archive (without .jar suffix)
# uses $TARGET_DIR to move created jar to
function mkJar() {
find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" -or -name "*manifest*" |\
xargs jar cfm ${1}.jar manifest.* ;
jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
%endif
--create --file=${1}.jar --manifest=$(ls manifest.*) \
$(find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" |\
xargs) ;
mv ${1}.jar $TARGET_DIR
}
COMPILER_COMMAND="javac -source 8 -target 8 -cp "