From a1e00b4e28d56365b4b5cc4aa44185c4b53f5c33 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 16 Jan 2024 15:37:07 +0000 Subject: White space formatting fixes Closes: --- pkg/rpm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/rpm') diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 355f8a59..7906fc24 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -254,7 +254,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil cat ../../build/unit-$(MODULE_SUFFIX_$*).rpm-changelog | sed -e \ "s/> - $(DEFAULT_VERSION)-$(DEFAULT_RELEASE)/> - $(MODULE_VERSION_$*)-$(MODULE_RELEASE_$*)/" \ >> $@.tmp - mv $@.tmp $@ + mv $@.tmp $@ unit-%: check-build-depends-% rpmbuild/SPECS/unit-%.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz @echo "===> Building $(subst _,-,$@) package" ; \ -- cgit From bad2c181e124cc93cd839fce019bc31dab1b7e1b Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Fri, 17 Nov 2023 16:29:18 -0800 Subject: Packages: Added Fedora 39 support. --- pkg/rpm/Makefile | 16 ++++++- pkg/rpm/Makefile.jsc-common | 5 +- pkg/rpm/Makefile.jsc17 | 13 ++++++ pkg/rpm/Makefile.python312 | 53 ++++++++++++++++++++++ .../rpmbuild/SOURCES/unit.example-python312-config | 16 +++++++ 5 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 pkg/rpm/Makefile.python312 create mode 100644 pkg/rpm/rpmbuild/SOURCES/unit.example-python312-config (limited to 'pkg/rpm') diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 7906fc24..1f3bbd58 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -22,8 +22,10 @@ else ifeq ($(shell rpm --eval "%{?amzn}"), 2023) OSVER = amazonlinux2023 else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 35 -a 0%{?fedora} -le 36'`; echo $$?),0) OSVER = fedora -else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 37'`; echo $$?),0) +else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 37 -a 0%{?fedora} -le 38'`; echo $$?),0) OSVER = fedora37 +else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 39'`; echo $$?),0) +OSVER = fedora39 endif BUILD_DEPENDS_unit = gcc rpm-build rpmlint @@ -124,6 +126,18 @@ include Makefile.jsc11 include Makefile.wasm endif +ifeq ($(OSVER), fedora39) +include Makefile.php +include Makefile.python312 +include Makefile.go +include Makefile.perl +include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc17 +include Makefile.wasm +endif + + CONFIGURE_ARGS_COMMON=\ --prefix=/usr \ --statedir=%{_sharedstatedir}/unit \ diff --git a/pkg/rpm/Makefile.jsc-common b/pkg/rpm/Makefile.jsc-common index a3c3a3da..f77ca1e9 100644 --- a/pkg/rpm/Makefile.jsc-common +++ b/pkg/rpm/Makefile.jsc-common @@ -10,16 +10,19 @@ JAVA_ARCH_jsc_common= $(shell /usr/lib/jvm/java-1.8.0/bin/java -XshowSettings 2> ifeq ($(OSVER),amazonlinux2023) MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-17-amazon-corretto --lib-path=/usr/lib/jvm/java-17-amazon-corretto/lib --jars=/usr/share/unit-jsc-common/ +else ifeq ($(OSVER),fedora39) +MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-17-openjdk --lib-path=/usr/lib/jvm/java-17-openjdk/lib --jars=/usr/share/unit-jsc-common/ else MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-1.8.0 --lib-path=/usr/lib/jvm/jre-1.8.0/lib/$(JAVA_ARCH_jsc_common) --jars=/usr/share/unit-jsc-common/ endif -MODULE_MAKEARGS_jsc_common= java MODULE_INSTARGS_jsc_common= java-shared-install MODULE_SOURCES_jsc_common= COPYRIGHT.unit-jsc-common ifeq ($(OSVER),amazonlinux2023) BUILD_DEPENDS_jsc_common= java-17-amazon-corretto-devel curl +else ifeq ($(OSVER),fedora39) +BUILD_DEPENDS_jsc_common= java-17-openjdk-devel curl else BUILD_DEPENDS_jsc_common= java-1.8.0-openjdk-devel curl endif diff --git a/pkg/rpm/Makefile.jsc17 b/pkg/rpm/Makefile.jsc17 index 7efdafaa..9a42c5a1 100644 --- a/pkg/rpm/Makefile.jsc17 +++ b/pkg/rpm/Makefile.jsc17 @@ -6,19 +6,32 @@ MODULE_SUMMARY_jsc17= Java 17 module for NGINX Unit MODULE_VERSION_jsc17= $(VERSION) MODULE_RELEASE_jsc17= 1 +ifeq ($(OSVER),amazonlinux2023) MODULE_CONFARGS_jsc17= java --module=java17 --home=/usr/lib/jvm/java-17-amazon-corretto --lib-path=/usr/lib/jvm/java-17-amazon-corretto/lib --jars=/usr/share/unit-jsc-common/ +else ifeq ($(OSVER),fedora39) +MODULE_CONFARGS_jsc17= java --module=java17 --home=/usr/lib/jvm/java-17-openjdk --lib-path=/usr/lib/jvm/java-17-openjdk/lib --jars=/usr/share/unit-jsc-common/ +endif MODULE_MAKEARGS_jsc17= java17 MODULE_INSTARGS_jsc17= java17-install MODULE_SOURCES_jsc17= unit.example-jsc-app \ unit.example-jsc17-config +ifeq ($(OSVER),amazonlinux2023) BUILD_DEPENDS_jsc17= java-17-amazon-corretto-devel +else ifeq ($(OSVER),fedora39) +BUILD_DEPENDS_jsc17= java-17-openjdk-devel BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc17) +endif define MODULE_DEFINITIONS_jsc17 Requires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx +%if (0%{?amzn} == 2023) Requires: java-17-amazon-corretto-headless +%endif +%if (0%{?fedora} >= 39) +Requires: java-17-openjdk-headless +%endif endef export MODULE_DEFINITIONS_jsc17 diff --git a/pkg/rpm/Makefile.python312 b/pkg/rpm/Makefile.python312 new file mode 100644 index 00000000..c37069eb --- /dev/null +++ b/pkg/rpm/Makefile.python312 @@ -0,0 +1,53 @@ +MODULES+= python312 +MODULE_SUFFIX_python312= python3.12 + +MODULE_SUMMARY_python312= Python 3.12 module for NGINX Unit + +MODULE_VERSION_python312= $(VERSION) +MODULE_RELEASE_python312= 1 + +MODULE_CONFARGS_python312= python --config=python3.12-config +MODULE_MAKEARGS_python312= python3.12 +MODULE_INSTARGS_python312= python3.12-install + +MODULE_SOURCES_python312= unit.example-python-app \ + unit.example-python312-config + +BUILD_DEPENDS_python312= python3-devel + +BUILD_DEPENDS+= $(BUILD_DEPENDS_python312) + +define MODULE_PREINSTALL_python312 +%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python312/examples/python-app +%{__install} -m 644 -p %{SOURCE100} \ + %{buildroot}%{_datadir}/doc/unit-python312/examples/python-app/wsgi.py +%{__install} -m 644 -p %{SOURCE101} \ + %{buildroot}%{_datadir}/doc/unit-python312/examples/unit.config +endef +export MODULE_PREINSTALL_python312 + +define MODULE_FILES_python312 +%{_libdir}/unit/modules/* +%{_libdir}/unit/debug-modules/* +endef +export MODULE_FILES_python312 + +define MODULE_POST_python312 +cat < Date: Tue, 13 Feb 2024 11:19:34 -0800 Subject: Packages: fixed a path to python 3.12 example app --- pkg/rpm/rpmbuild/SOURCES/unit.example-python312-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/rpm') diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.example-python312-config b/pkg/rpm/rpmbuild/SOURCES/unit.example-python312-config index 37b65f1f..1de2eba6 100644 --- a/pkg/rpm/rpmbuild/SOURCES/unit.example-python312-config +++ b/pkg/rpm/rpmbuild/SOURCES/unit.example-python312-config @@ -3,7 +3,7 @@ "example_python": { "type": "python 3.12", "processes": 2, - "path": "/usr/share/doc/unit-python3.12/examples/python-app", + "path": "/usr/share/doc/unit-python312/examples/python-app", "module": "wsgi" } }, -- cgit From f71ead5fa5b8bae378a0eca2bedb689cf08a8eff Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 30 Jan 2024 09:14:39 +0000 Subject: Updated copyright notice. --- pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 | 18 ++++++++++++------ pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) (limited to 'pkg/rpm') diff --git a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 index 4505b5b5..e6372b97 100644 --- a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 +++ b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc11 @@ -1,13 +1,19 @@ NGINX Unit. - Copyright 2017-2023 NGINX, Inc. - Copyright 2017-2023 Andrei Zeliankou - Copyright 2018-2023 Konstantin Pavlov - Copyright 2021-2023 Zhidao Hong + Copyright 2017-2024 NGINX, Inc. + Copyright 2017-2024 Andrei Zeliankou + Copyright 2018-2024 Konstantin Pavlov + Copyright 2021-2024 Zhidao Hong + Copyright 2022-2024 Andrew Clayton + Copyright 2022-2024 Liam Crilly + Copyright 2023-2024 Dan Callahan + Copyright 2023-2024 Danielle De Leo + Copyright 2023-2024 Dylan Arbour + Copyright 2023-2024 Gabor Javorszky + Copyright 2023-2024 Igor Ippolitov + Copyright 2023-2024 Taryn Musgrave Copyright 2021-2023 Alejandro Colomar - Copyright 2022-2023 Andrew Clayton - Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov Copyright 2021-2022 Oisín Canty diff --git a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 index 59891951..174f2309 100644 --- a/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 +++ b/pkg/rpm/rpmbuild/SOURCES/COPYRIGHT.unit-jsc8 @@ -1,13 +1,19 @@ NGINX Unit. - Copyright 2017-2023 NGINX, Inc. - Copyright 2017-2023 Andrei Zeliankou - Copyright 2018-2023 Konstantin Pavlov - Copyright 2021-2023 Zhidao Hong + Copyright 2017-2024 NGINX, Inc. + Copyright 2017-2024 Andrei Zeliankou + Copyright 2018-2024 Konstantin Pavlov + Copyright 2021-2024 Zhidao Hong + Copyright 2022-2024 Andrew Clayton + Copyright 2022-2024 Liam Crilly + Copyright 2023-2024 Dan Callahan + Copyright 2023-2024 Danielle De Leo + Copyright 2023-2024 Dylan Arbour + Copyright 2023-2024 Gabor Javorszky + Copyright 2023-2024 Igor Ippolitov + Copyright 2023-2024 Taryn Musgrave Copyright 2021-2023 Alejandro Colomar - Copyright 2022-2023 Andrew Clayton - Copyright 2022-2023 Liam Crilly Copyright 2017-2022 Valentin V. Bartenev Copyright 2017-2022 Max Romanov Copyright 2021-2022 Oisín Canty -- cgit From 7a6405566c0e15990fa6487a6dc4654389ce5601 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Wed, 21 Feb 2024 16:46:16 -0800 Subject: Packages: added wasm-wasi-component module packaging for rpm-based distros --- pkg/rpm/Makefile.wasm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/rpm') diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm index c638071b..fbf64d11 100644 --- a/pkg/rpm/Makefile.wasm +++ b/pkg/rpm/Makefile.wasm @@ -6,9 +6,9 @@ MODULE_SUMMARY_wasm= WASM module for NGINX Unit MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 -MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release -MODULE_MAKEARGS_wasm= wasm -MODULE_INSTARGS_wasm= wasm-install +MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm wasm-wasi-component +MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install MODULE_SOURCES_wasm= -- cgit From faa7e792428265a7c72ff0c692f31c04932d7dc0 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Thu, 22 Feb 2024 14:12:51 -0800 Subject: Packages: Pass CFLAGS to compile wasm modules on all packaging targets This extends the approach used for debian-based packages in 3f805bc64e28 to rpm as well. Notable change for both deb and rpm packaging is to use CFLAGS as defined in the build/Makefile, and not pass them from the environment which might not be there (as is the case for rpm). While at it, stop passing CFLAGS in the install phase, as it should no longer invoke builds (see d54af163c46b). The rpm part was overlooked in 7a6405566c0, since testing was not done on the platforms where problem manifested itself, notably Amazon Linux 2023 and Fedora 38+. --- pkg/rpm/Makefile.wasm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/rpm') diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm index fbf64d11..cb2ad35a 100644 --- a/pkg/rpm/Makefile.wasm +++ b/pkg/rpm/Makefile.wasm @@ -7,7 +7,7 @@ MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component -MODULE_MAKEARGS_wasm= wasm wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install MODULE_SOURCES_wasm= -- cgit