diff --git a/uwsgi-reproducible-jar-mtime.patch b/uwsgi-reproducible-jar-mtime.patch new file mode 100644 index 0000000..8ea15c5 --- /dev/null +++ b/uwsgi-reproducible-jar-mtime.patch @@ -0,0 +1,11 @@ +--- uwsgi-2.0.25.1/plugins/jvm/uwsgiplugin.py 2024-09-26 21:40:38.319789843 +0200 ++++ uwsgi-2.0.25.1/plugins/jvm/uwsgiplugin.py 2024-09-26 21:43:21.557662471 +0200 +@@ -77,7 +77,7 @@ + def post_build(config): + if subprocess.call("javac %s/plugins/jvm/uwsgi.java" % os.getcwd(), shell=True) != 0: + os._exit(1) +- if subprocess.call("cd %s/plugins/jvm ; jar cvf uwsgi.jar *.class" % os.getcwd(), shell=True) != 0: ++ if subprocess.call("cd %s/plugins/jvm ; jar --date=\"$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)\" --create --verbose --file=uwsgi.jar *.class" % os.getcwd(), shell=True) != 0: + os._exit(1) + print("*** uwsgi.jar available in %s/plugins/jvm/uwsgi.jar ***" % os.getcwd()) + diff --git a/uwsgi.changes b/uwsgi.changes index 5b04f2e..d81fc03 100644 --- a/uwsgi.changes +++ b/uwsgi.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Dec 5 07:06:07 UTC 2024 - Fridrich Strba + +- Added patch: + * uwsgi-reproducible-jar-mtime.patch + + Use SOURCE_DATE_EPOCH for reproducible jar mtime + + Applied if building with Java >= 17 + ------------------------------------------------------------------- Tue Nov 5 14:58:48 UTC 2024 - Markéta Machová diff --git a/uwsgi.spec b/uwsgi.spec index a540018..7a98499 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -59,6 +59,8 @@ Patch4: uwsgi-2.0.18-postgresql-config.patch Patch5: uwsgi-ld-noexecstack.patch # PATCH-FIX-UPSTREAM python313.patch - plugins/python: handle cframe removal from CPython thread state https://github.com/unbit/uwsgi/commit/699dc20f8204ee18812951600b0221156d217530 Patch6: python313.patch +# PATCH-FIX-OPENSUSE +Patch100: uwsgi-reproducible-jar-mtime.patch BuildRequires: apache-rpm-macros %if 0%{suse_version} < 1500 BuildRequires: apache2-devel @@ -442,7 +444,18 @@ This package contains support for PHP version 7. %endif %prep -%autosetup -p1 -n uwsgi-%{version} +%setup -n uwsgi-%{version} +%patch -P 0 -p1 +%patch -P 1 -p1 +%patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 +%patch -P 5 -p1 +%patch -P 6 -p1 +# The "--date" option was added into jar in OpenJDK 17 +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0} +%patch -P 100 -p1 +%endif # Generate a config that builds all plugins except for examples and stuff we # can't satisfy the requirements for or are just broken