diff --git a/add-loongarch64-support-not-upstream-new.patch b/add-loongarch64-support-not-upstream-new.patch new file mode 100644 index 0000000000000000000000000000000000000000..c9a0c8126dbcc41d766ca2d304a33ded67745303 --- /dev/null +++ b/add-loongarch64-support-not-upstream-new.patch @@ -0,0 +1,84 @@ +From 29c4c1672f3a83eecc4cc11340e31e9c9265c1a9 Mon Sep 17 00:00:00 2001 +From: herengui +Date: Mon, 28 Aug 2023 13:58:16 +0800 +Subject: [PATCH 1000/1001] add loongarch64 support for java-service-wrapper + +Signed-off-by: herengui +--- + src/c/Makefile-linux-loongarch64-64.make | 64 ++++++++++++++++++++++++ + 1 file changed, 64 insertions(+) + create mode 100644 src/c/Makefile-linux-loongarch64-64.make + +diff --git a/src/c/Makefile-linux-loongarch64-64.make b/src/c/Makefile-linux-loongarch64-64.make +new file mode 100644 +index 0000000..557423a +--- /dev/null ++++ b/src/c/Makefile-linux-loongarch64-64.make +@@ -0,0 +1,64 @@ ++# Copyright (c) 1999, 2007 Tanuki Software Inc. ++# ++# Permission is hereby granted, free of charge, to any person ++# obtaining a copy of the Java Service Wrapper and associated ++# documentation files (the "Software"), to deal in the Software ++# without restriction, including without limitation the rights ++# to use, copy, modify, merge, publish, distribute, sub-license, ++# and/or sell copies of the Software, and to permit persons to ++# whom the Software is furnished to do so, subject to the ++# following conditions: ++# ++# The above copyright notice and this permission notice shall be ++# included in all copies or substantial portions of the Software. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++# NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++# OTHER DEALINGS IN THE SOFTWARE. ++ ++# This makefile is inprogess. It builds, but the resulting libwrapper.so does not yet work. ++# If you know how to fix it then please help out. ++COMPILE = gcc ${RPM_OPT_FLAGS} -fPIC --pedantic ++ ++INCLUDE=$(JAVA_HOME)/include ++ ++DEFS = -I$(INCLUDE) -I$(INCLUDE)/linux ++ ++wrapper_SOURCE = wrapper.c wrapperinfo.c wrappereventloop.c wrapper_unix.c property.c logger.c ++ ++libwrapper_so_OBJECTS = wrapperjni_unix.o wrapperinfo.o wrapperjni.o ++ ++BIN = ../../bin ++LIB = ../../lib ++ ++all: init wrapper libwrapper.so ++ ++clean: ++ rm -f *.o ++ ++cleanall: clean ++ rm -rf *~ .deps ++ rm -f $(BIN)/wrapper $(LIB)/libwrapper.so ++ ++init: ++ if test ! -d .deps; then mkdir .deps; fi ++ ++wrapper: $(wrapper_SOURCE) ++ $(COMPILE) -pthread -lm $(wrapper_SOURCE) -o $(BIN)/wrapper ++ ++libwrapper.so: $(libwrapper_so_OBJECTS) ++ ${COMPILE} -shared $(libwrapper_so_OBJECTS) -o $(LIB)/libwrapper.so ++ ++%.o: %.c ++ @echo '$(COMPILE) -c $<'; \ ++ $(COMPILE) $(DEFS) -Wp,-MD,.deps/$(*F).pp -c $< ++ @-cp .deps/$(*F).pp .deps/$(*F).P; \ ++ tr ' ' '\012' < .deps/$(*F).pp \ ++ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ ++ >> .deps/$(*F).P; \ ++ rm .deps/$(*F).pp +-- +2.41.0 + diff --git a/add-sw_64-support-not-upstream-new.patch b/add-sw_64-support-not-upstream-new.patch new file mode 100644 index 0000000000000000000000000000000000000000..3a9b660497b8b5e83e7ed7dd15e3686b84a64d3b --- /dev/null +++ b/add-sw_64-support-not-upstream-new.patch @@ -0,0 +1,84 @@ +From b0cb6e14fea8fa31c184e430031ce5b13fe22862 Mon Sep 17 00:00:00 2001 +From: herengui +Date: Mon, 28 Aug 2023 13:58:49 +0800 +Subject: [PATCH 1001/1001] add sw_64 support for java-service-wrapper + +Signed-off-by: herengui +--- + src/c/Makefile-linux-sw64-64.make | 64 +++++++++++++++++++++++++++++++ + 1 file changed, 64 insertions(+) + create mode 100644 src/c/Makefile-linux-sw64-64.make + +diff --git a/src/c/Makefile-linux-sw64-64.make b/src/c/Makefile-linux-sw64-64.make +new file mode 100644 +index 0000000..557423a +--- /dev/null ++++ b/src/c/Makefile-linux-sw64-64.make +@@ -0,0 +1,64 @@ ++# Copyright (c) 1999, 2007 Tanuki Software Inc. ++# ++# Permission is hereby granted, free of charge, to any person ++# obtaining a copy of the Java Service Wrapper and associated ++# documentation files (the "Software"), to deal in the Software ++# without restriction, including without limitation the rights ++# to use, copy, modify, merge, publish, distribute, sub-license, ++# and/or sell copies of the Software, and to permit persons to ++# whom the Software is furnished to do so, subject to the ++# following conditions: ++# ++# The above copyright notice and this permission notice shall be ++# included in all copies or substantial portions of the Software. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++# NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++# OTHER DEALINGS IN THE SOFTWARE. ++ ++# This makefile is inprogess. It builds, but the resulting libwrapper.so does not yet work. ++# If you know how to fix it then please help out. ++COMPILE = gcc ${RPM_OPT_FLAGS} -fPIC --pedantic ++ ++INCLUDE=$(JAVA_HOME)/include ++ ++DEFS = -I$(INCLUDE) -I$(INCLUDE)/linux ++ ++wrapper_SOURCE = wrapper.c wrapperinfo.c wrappereventloop.c wrapper_unix.c property.c logger.c ++ ++libwrapper_so_OBJECTS = wrapperjni_unix.o wrapperinfo.o wrapperjni.o ++ ++BIN = ../../bin ++LIB = ../../lib ++ ++all: init wrapper libwrapper.so ++ ++clean: ++ rm -f *.o ++ ++cleanall: clean ++ rm -rf *~ .deps ++ rm -f $(BIN)/wrapper $(LIB)/libwrapper.so ++ ++init: ++ if test ! -d .deps; then mkdir .deps; fi ++ ++wrapper: $(wrapper_SOURCE) ++ $(COMPILE) -pthread -lm $(wrapper_SOURCE) -o $(BIN)/wrapper ++ ++libwrapper.so: $(libwrapper_so_OBJECTS) ++ ${COMPILE} -shared $(libwrapper_so_OBJECTS) -o $(LIB)/libwrapper.so ++ ++%.o: %.c ++ @echo '$(COMPILE) -c $<'; \ ++ $(COMPILE) $(DEFS) -Wp,-MD,.deps/$(*F).pp -c $< ++ @-cp .deps/$(*F).pp .deps/$(*F).P; \ ++ tr ' ' '\012' < .deps/$(*F).pp \ ++ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ ++ >> .deps/$(*F).P; \ ++ rm .deps/$(*F).pp +-- +2.41.0 + diff --git a/java-service-wrapper.spec b/java-service-wrapper.spec index cbef8a76b6ae619bda0920602ee17704d4eedc57..23566213a88e912f500c0f396ab5a9cde8a956fe 100644 --- a/java-service-wrapper.spec +++ b/java-service-wrapper.spec @@ -13,7 +13,7 @@ %global cocoon cocoon-2.0.4 Name: java-service-wrapper Version: 3.2.5 -Release: 1 +Release: 2 Summary: Java service wrapper License: MIT URL: https://bitbucket.org/ivertex/yaja-wrapper @@ -30,6 +30,10 @@ Patch2: %{name}-3.2.4-docbuild.patch Patch3: %{name}-3.2.5-rhbz1037144.patch Patch98: Use-RPM_OPT_FLAGS-on-s390x.patch Patch99: ppc64le-support.patch + +Patch1000: add-loongarch64-support-not-upstream-new.patch +Patch1001: add-sw_64-support-not-upstream-new.patch + BuildRequires: ant javapackages-local gcc make %description The Java Service Wrapper enables a Java application to be run as a @@ -51,6 +55,8 @@ sed -e 's|@LIBPATH@|%{_libdir}/%{name}|' %{PATCH1} | %{__patch} -p1 -F 0 %patch3 %patch98 -p1 %patch99 -p1 +%patch1000 -p1 +%patch1001 -p1 %if %{with docs} mkdir tools ; cd tools tar xf %{SOURCE3} @@ -88,5 +94,8 @@ install -pm 755 lib/libwrapper.so $RPM_BUILD_ROOT%{_libdir}/%{name} %license doc/license.txt %changelog +* Mon Aug 28 2023 herengui - 3.2.5-2 +- add support for loongarch64 and sw_64 + * Wed Oct 28 2020 shaoqiang kang - 3.2.5-1 - Package init