File uwsgi-reproducible-jar-mtime.patch of Package uwsgi

---
 plugins/jvm/uwsgiplugin.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: uwsgi-2.0.31/plugins/jvm/uwsgiplugin.py
===================================================================
--- uwsgi-2.0.31.orig/plugins/jvm/uwsgiplugin.py	2025-10-20 11:57:40.854044493 +0200
+++ uwsgi-2.0.31/plugins/jvm/uwsgiplugin.py	2025-10-20 12:14:00.175247620 +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())
 
openSUSE Build Service is sponsored by