diff options
| author | oxpa <iippolitov@gmail.com> | 2024-09-17 14:21:10 +0100 |
|---|---|---|
| committer | oxpa <iippolitov@gmail.com> | 2024-09-17 14:21:10 +0100 |
| commit | 2417826d8bebf921ee1be102ef8ce702f0683d66 (patch) | |
| tree | 76d29a1705415ed7368870826dbb2f04942ee794 /pkg | |
| parent | 0e79d961bb1ea68674961da1703ffedb1ddf6e43 (diff) | |
| parent | 24ed91f40634372d99f67f0e4e3c2ac0abde81bd (diff) | |
| download | unit-2417826d8bebf921ee1be102ef8ce702f0683d66.tar.gz unit-2417826d8bebf921ee1be102ef8ce702f0683d66.tar.bz2 | |
Merge tag '1.33.0' into packaging.
Unit 1.33.0 release.
Diffstat (limited to 'pkg')
57 files changed, 343 insertions, 740 deletions
diff --git a/pkg/contrib/Makefile b/pkg/contrib/Makefile index 7e3b8b97..0f412b20 100644 --- a/pkg/contrib/Makefile +++ b/pkg/contrib/Makefile @@ -51,7 +51,7 @@ XZ ?= $(error XZ (LZMA) compressor not found) endif ifeq ($(shell sha512sum --version >/dev/null 2>&1 || echo FAIL),) -SHA512SUM = sha512sum --check +SHA512SUM = sha512sum -c - else ifeq ($(shell shasum --version >/dev/null 2>&1 || echo FAIL),) SHA512SUM = shasum -a 512 --check else ifeq ($(shell openssl version >/dev/null 2>&1 || echo FAIL),) @@ -89,10 +89,10 @@ checksum = \ (cd $(TARBALLS) && $(1)) CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512,.sum-) UNPACK = $(RM) -R $@ \ - $(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzfo $(f)) \ - $(foreach f,$(filter %.tar.bz2,$^), && tar xvjfo $(f)) \ - $(foreach f,$(filter %.tar.xz,$^), && tar xvJfo $(f)) \ - $(foreach f,$(filter %.zip,$^), && unzip $(f)) + $(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xzfo $(f)) \ + $(foreach f,$(filter %.tar.bz2,$^), && tar xjfo $(f)) \ + $(foreach f,$(filter %.tar.xz,$^), && tar xJfo $(f)) \ + $(foreach f,$(filter %.zip,$^), && unzip -q $(f)) UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<))) APPLY = (cd $(UNPACK_DIR) && patch -fp1) < MOVE = mv $(UNPACK_DIR) $@ && touch $@ diff --git a/pkg/contrib/src/njs/Makefile b/pkg/contrib/src/njs/Makefile index 6a4fdf9d..643ae703 100644 --- a/pkg/contrib/src/njs/Makefile +++ b/pkg/contrib/src/njs/Makefile @@ -1,7 +1,7 @@ # njs include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version -NJS_URL := https://hg.nginx.org/njs/archive/$(NJS_VERSION).tar.gz +NJS_URL := https://github.com/nginx/njs/archive/$(NJS_VERSION).tar.gz PKGS += njs diff --git a/pkg/contrib/src/njs/SHA512SUMS b/pkg/contrib/src/njs/SHA512SUMS index 43766487..175c46ee 100644 --- a/pkg/contrib/src/njs/SHA512SUMS +++ b/pkg/contrib/src/njs/SHA512SUMS @@ -1 +1 @@ -cc3110a0c6866dfc03d19c58745e5b75aa9792999db45bc55a752f7b04db8ae51322bfe0156b873109c8477c6c1a030c851c770697cf6791c6e89fb2fed0a2c5 njs-0.8.2.tar.gz +09fb37d609f5cb97b0af5eb097a017233af2eacb2d38071346b49f5e03b5e37280eebb360fc824acba0c600c44d234e2d11fa55f4bc913319491d7789a94171c njs-0.8.5.tar.gz diff --git a/pkg/contrib/src/njs/version b/pkg/contrib/src/njs/version index 00453419..ebfb5987 100644 --- a/pkg/contrib/src/njs/version +++ b/pkg/contrib/src/njs/version @@ -1 +1 @@ -NJS_VERSION := 0.8.2 +NJS_VERSION := 0.8.5 diff --git a/pkg/contrib/src/wasi-sysroot/Makefile b/pkg/contrib/src/wasi-sysroot/Makefile index fcfb8df3..a02a6591 100644 --- a/pkg/contrib/src/wasi-sysroot/Makefile +++ b/pkg/contrib/src/wasi-sysroot/Makefile @@ -12,6 +12,7 @@ $(TARBALLS)/wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MI wasi-sysroot: wasi-sysroot-$(WASI_SYSROOT_VERSION_MAJOR).$(WASI_SYSROOT_VERSION_MINOR).tar.gz .sum-wasi-sysroot $(UNPACK) + $(MOVE) .wasi-sysroot: wasi-sysroot touch $@ diff --git a/pkg/contrib/src/wasi-sysroot/SHA512SUMS b/pkg/contrib/src/wasi-sysroot/SHA512SUMS index a1e71fff..ffb6e23f 100644 --- a/pkg/contrib/src/wasi-sysroot/SHA512SUMS +++ b/pkg/contrib/src/wasi-sysroot/SHA512SUMS @@ -1 +1 @@ -ad4ad629d02f01f3d2eb977dd0bc43091b0f11ed1b5dd9fdb3580e4cf49c132f6cb4982ae80eabf638f0d08d0c4c7df40cceb2be8f9d2c29abc35b8564ffda42 wasi-sysroot-20.0.tar.gz +6bf138fc90feccc0cfa2683d164a0c8cfb973b5105675ff53b87628d8775676a8eb383d225ca4b55d6f0f800d167a605ee569978a2048b3dab8d01672a408d7a wasi-sysroot-24.0.tar.gz diff --git a/pkg/contrib/src/wasi-sysroot/version b/pkg/contrib/src/wasi-sysroot/version index 919c7098..ed18dd4b 100644 --- a/pkg/contrib/src/wasi-sysroot/version +++ b/pkg/contrib/src/wasi-sysroot/version @@ -1,2 +1,2 @@ -WASI_SYSROOT_VERSION_MAJOR := 20 +WASI_SYSROOT_VERSION_MAJOR := 24 WASI_SYSROOT_VERSION_MINOR := 0 diff --git a/pkg/contrib/src/wasmtime/Makefile b/pkg/contrib/src/wasmtime/Makefile index 11797fee..2a6e8abf 100644 --- a/pkg/contrib/src/wasmtime/Makefile +++ b/pkg/contrib/src/wasmtime/Makefile @@ -11,10 +11,6 @@ else CARGO = $(error Cargo (Rust package manager) not found) endif -ifeq ($(shell uname -s),Linux) -WASMTIME_ARGS=-Clink-arg=-Wl,-soname,libwasmtime.so -endif - $(TARBALLS)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz: $(call download_pkg,$(WASMTIME_URL),wasmtime) @@ -25,6 +21,11 @@ wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz .sum-wasmtime $(MOVE) .wasmtime: wasmtime - cd $< && $(CARGO) rustc --release -p wasmtime-c-api -- $(WASMTIME_ARGS) - cp $</crates/c-api/wasm-c-api/include/wasm.h $</crates/c-api/include/ + cd $< && cmake \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -S crates/c-api \ + -B target/c-api \ + --install-prefix "$(TOPSRC)/wasmtime/artifacts" + cd $< && cmake --build target/c-api + cd $< && cmake --install target/c-api touch $@ diff --git a/pkg/contrib/src/wasmtime/SHA512SUMS b/pkg/contrib/src/wasmtime/SHA512SUMS index 35e0e47f..fc1ba863 100644 --- a/pkg/contrib/src/wasmtime/SHA512SUMS +++ b/pkg/contrib/src/wasmtime/SHA512SUMS @@ -1 +1 @@ -4b67ba0742da0558efffe1dbde5512dc5f0201fad25f1027d277758e76778b2add11528dbe3f5b7759f2386859b52aea3a0526abaa481c2ed91eb56c5a531b49 wasmtime-v11.0.1-src.tar.gz +2ce3979f772176350a2c4694cfd24c241c426d453d99f8620424b25ef1373ea5be06370c8199f3bd5a46f0ba1a4cd4b702a359efc969d5eaf1e9e78543c5900a wasmtime-v24.0.0-src.tar.gz diff --git a/pkg/contrib/src/wasmtime/version b/pkg/contrib/src/wasmtime/version index 1debf1ff..d418b456 100644 --- a/pkg/contrib/src/wasmtime/version +++ b/pkg/contrib/src/wasmtime/version @@ -1 +1 @@ -WASMTIME_VERSION := 11.0.1 +WASMTIME_VERSION := 24.0.0 diff --git a/pkg/contrib/tarballs/.hgignore b/pkg/contrib/tarballs/.gitignore index 8d876d7b..441875c5 100644 --- a/pkg/contrib/tarballs/.hgignore +++ b/pkg/contrib/tarballs/.gitignore @@ -1,3 +1,2 @@ -syntax:glob *.tar.* *.githash diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index e48de155..0e6ca191 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -14,15 +14,14 @@ SRCDIR= unit-$(VERSION) CODENAME = $(shell lsb_release -cs) -BUILD_DEPENDS_unit = build-essential debhelper devscripts fakeroot libxml2-utils lintian lsb-release xsltproc libssl-dev +BUILD_DEPENDS_unit = build-essential debhelper devscripts fakeroot libxml2-utils lintian lsb-release xsltproc libssl-dev clang llvm BUILD_DEPENDS = $(BUILD_DEPENDS_unit) MODULES= -# Ubuntu 23.10 -ifeq ($(CODENAME),mantic) +# Ubuntu 24.04 +ifeq ($(CODENAME),noble) include Makefile.php -include Makefile.python311 include Makefile.python312 include Makefile.go include Makefile.perl @@ -30,41 +29,24 @@ include Makefile.ruby include Makefile.jsc-common include Makefile.jsc11 include Makefile.jsc17 -include Makefile.jsc19 -include Makefile.jsc20 include Makefile.jsc21 include Makefile.wasm endif -# Ubuntu 23.04 -ifeq ($(CODENAME),lunar) +# Ubuntu 23.10 +ifeq ($(CODENAME),mantic) include Makefile.php include Makefile.python311 +include Makefile.python312 include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common include Makefile.jsc11 include Makefile.jsc17 -include Makefile.jsc18 include Makefile.jsc19 include Makefile.jsc20 -include Makefile.wasm -endif - -# Ubuntu 22.10 -ifeq ($(CODENAME),kinetic) -include Makefile.php -include Makefile.python27 -include Makefile.python310 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc11 -include Makefile.jsc17 -include Makefile.jsc18 -include Makefile.jsc19 +include Makefile.jsc21 include Makefile.wasm endif @@ -83,23 +65,6 @@ include Makefile.jsc18 include Makefile.wasm endif -# Ubuntu 21.10 -ifeq ($(CODENAME),impish) -include Makefile.php -include Makefile.python27 -include Makefile.python39 -include Makefile.python310 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc11 -include Makefile.jsc16 -include Makefile.jsc17 -include Makefile.jsc18 -include Makefile.wasm -endif - # Ubuntu 20.04 ifeq ($(CODENAME),focal) include Makefile.php @@ -113,22 +78,6 @@ include Makefile.jsc11 include Makefile.wasm endif -# Ubuntu 18.04 -ifeq ($(CODENAME),bionic) -include Makefile.php -include Makefile.python27 -include Makefile.python36 -include Makefile.python37 -include Makefile.python38 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc8 -include Makefile.jsc11 -include Makefile.wasm -endif - # Debian 12 ifeq ($(CODENAME),bookworm) include Makefile.php @@ -165,19 +114,6 @@ include Makefile.jsc11 include Makefile.wasm endif -# Debian 10 -ifeq ($(CODENAME),buster) -include Makefile.php -include Makefile.python27 -include Makefile.python37 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc11 -include Makefile.wasm -endif - CONFIGURE_ARGS_COMMON=\ --prefix=/usr \ --statedir=/var/lib/unit \ @@ -214,9 +150,12 @@ check-build-depends-%: esac ; \ not_installed= ; \ for pkg in $${pkgs}; do \ - dpkg-query -W $${pkg} >/dev/null 2>&1 ; \ - if [ $$? -ne 0 ]; then \ - not_installed="$${not_installed} $${pkg}" ; \ + i=$$(dpkg-query -f '$${db:Status-Status}' -W $${pkg}:$$(dpkg --print-architecture) 2>/dev/null) ; \ + if [ $$? -ne 0 -o "$${i}" != "installed" ]; then \ + i=$$(dpkg-query -f '$${db:Status-Status}' -W $${pkg}:all 2>/dev/null) ; \ + if [ $$? -ne 0 -o "$${i}" != "installed" ]; then \ + not_installed="$${not_installed} $${pkg}" ; \ + fi; \ fi ; \ done ; \ if test -n "$${not_installed}" ; then \ diff --git a/pkg/deb/Makefile.jsc10 b/pkg/deb/Makefile.jsc10 deleted file mode 100644 index 43ded86b..00000000 --- a/pkg/deb/Makefile.jsc10 +++ /dev/null @@ -1,71 +0,0 @@ -MODULES+= jsc10 -MODULE_SUFFIX_jsc10= jsc10 - -MODULE_SUMMARY_jsc10= Java 10 module for NGINX Unit - -MODULE_VERSION_jsc10= $(VERSION) -MODULE_RELEASE_jsc10= 1 - -MODULE_CONFARGS_jsc10= java --module=java10 --home=/usr/lib/jvm/java-11-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ -MODULE_MAKEARGS_jsc10= java10 -MODULE_INSTARGS_jsc10= java10-install - -MODULE_SOURCES_jsc10= unit.example-jsc-app \ - unit.example-jsc10-config - -BUILD_DEPENDS_jsc10= openjdk-11-jdk-headless openjdk-11-jre-headless -BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc10) - -MODULE_BUILD_DEPENDS_jsc10=,openjdk-11-jdk-headless -MODULE_DEPENDS_jsc10=,openjdk-11-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) - -define MODULE_PREINSTALL_jsc10 - mkdir -p debian/unit-jsc10/usr/share/doc/unit-jsc10/examples/jsc-app - install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc10/usr/share/doc/unit-jsc10/examples/jsc-app/index.jsp - install -m 644 -p debian/unit.example-jsc10-config debian/unit-jsc10/usr/share/doc/unit-jsc10/examples/unit.config - install -m 644 -p src/java/README.JSR-340 debian/unit-jsc10/usr/share/doc/unit-jsc10/ -endef -export MODULE_PREINSTALL_jsc10 - -define MODULE_POSTINSTALL_jsc10 - cd $$\(BUILDDIR_unit\) \&\& \ - DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall -endef -export MODULE_POSTINSTALL_jsc10 - -define MODULE_POST_jsc10 -cat <<BANNER ----------------------------------------------------------------------- - -The $(MODULE_SUMMARY_jsc10) has been installed. - -To check out the sample app, run these commands: - - sudo service unit restart - cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc10)/examples - sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config - curl http://localhost:8800/ - -Online documentation is available at https://unit.nginx.org - -NOTICE: - -This version of Unit code is made available in support of the open source -development process. This is an intermediate build made available for -testing purposes only. This Unit code is untested and presumed incompatible -with the JSR 340 Java Servlet 3.1 specification. You should not deploy or -write to this code. You should instead deploy and write production -applications on pre-built binaries that have been tested and certified -to meet the JSR-340 compatibility requirements such as certified binaries -published for the JSR-340 reference implementation available at -https://javaee.github.io/glassfish/. - -Redistribution of any Intermediate Build must retain this notice. - -Oracle and Java are registered trademarks of Oracle and/or its affiliates. -Other names may be trademarks of their respective owners. - ----------------------------------------------------------------------- -BANNER -endef -export MODULE_POST_jsc10 diff --git a/pkg/deb/Makefile.jsc16 b/pkg/deb/Makefile.jsc16 deleted file mode 100644 index f45e1299..00000000 --- a/pkg/deb/Makefile.jsc16 +++ /dev/null @@ -1,71 +0,0 @@ -MODULES+= jsc16 -MODULE_SUFFIX_jsc16= jsc16 - -MODULE_SUMMARY_jsc16= Java 16 module for NGINX Unit - -MODULE_VERSION_jsc16= $(VERSION) -MODULE_RELEASE_jsc16= 1 - -MODULE_CONFARGS_jsc16= java --module=java16 --home=/usr/lib/jvm/java-16-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ -MODULE_MAKEARGS_jsc16= java16 -MODULE_INSTARGS_jsc16= java16-install - -MODULE_SOURCES_jsc16= unit.example-jsc-app \ - unit.example-jsc16-config - -BUILD_DEPENDS_jsc16= openjdk-16-jdk-headless openjdk-16-jre-headless -BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc16) - -MODULE_BUILD_DEPENDS_jsc16=,openjdk-16-jdk-headless -MODULE_DEPENDS_jsc16=,openjdk-16-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) - -define MODULE_PREINSTALL_jsc16 - mkdir -p debian/unit-jsc16/usr/share/doc/unit-jsc16/examples/jsc-app - install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc16/usr/share/doc/unit-jsc16/examples/jsc-app/index.jsp - install -m 644 -p debian/unit.example-jsc16-config debian/unit-jsc16/usr/share/doc/unit-jsc16/examples/unit.config - install -m 644 -p src/java/README.JSR-340 debian/unit-jsc16/usr/share/doc/unit-jsc16/ -endef -export MODULE_PREINSTALL_jsc16 - -define MODULE_POSTINSTALL_jsc16 - cd $$\(BUILDDIR_unit\) \&\& \ - DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall -endef -export MODULE_POSTINSTALL_jsc16 - -define MODULE_POST_jsc16 -cat <<BANNER ----------------------------------------------------------------------- - -The $(MODULE_SUMMARY_jsc16) has been installed. - -To check out the sample app, run these commands: - - sudo service unit restart - cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc16)/examples - sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config - curl http://localhost:8800/ - -Online documentation is available at https://unit.nginx.org - -NOTICE: - -This version of Unit code is made available in support of the open source -development process. This is an intermediate build made available for -testing purposes only. This Unit code is untested and presumed incompatible -with the JSR 340 Java Servlet 3.1 specification. You should not deploy or -write to this code. You should instead deploy and write production -applications on pre-built binaries that have been tested and certified -to meet the JSR-340 compatibility requirements such as certified binaries -published for the JSR-340 reference implementation available at -https://javaee.github.io/glassfish/. - -Redistribution of any Intermediate Build must retain this notice. - -Oracle and Java are registered trademarks of Oracle and/or its affiliates. -Other names may be trademarks of their respective owners. - ----------------------------------------------------------------------- -BANNER -endef -export MODULE_POST_jsc16 diff --git a/pkg/deb/Makefile.jsc8 b/pkg/deb/Makefile.jsc8 deleted file mode 100644 index d7eed96b..00000000 --- a/pkg/deb/Makefile.jsc8 +++ /dev/null @@ -1,71 +0,0 @@ -MODULES+= jsc8 -MODULE_SUFFIX_jsc8= jsc8 - -MODULE_SUMMARY_jsc8= Java 8 module for NGINX Unit - -MODULE_VERSION_jsc8= $(VERSION) -MODULE_RELEASE_jsc8= 1 - -MODULE_CONFARGS_jsc8= java --module=java8 --home=/usr/lib/jvm/java-8-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/ -MODULE_MAKEARGS_jsc8= java8 -MODULE_INSTARGS_jsc8= java8-install - -MODULE_SOURCES_jsc8= unit.example-jsc-app \ - unit.example-jsc8-config - -BUILD_DEPENDS_jsc8= openjdk-8-jdk-headless openjdk-8-jre-headless -BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc8) - -MODULE_BUILD_DEPENDS_jsc8=,openjdk-8-jdk-headless -MODULE_DEPENDS_jsc8=,openjdk-8-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME)) - -define MODULE_PREINSTALL_jsc8 - mkdir -p debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/jsc-app - install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/jsc-app/index.jsp - install -m 644 -p debian/unit.example-jsc8-config debian/unit-jsc8/usr/share/doc/unit-jsc8/examples/unit.config - install -m 644 -p src/java/README.JSR-340 debian/unit-jsc8/usr/share/doc/unit-jsc8/ -endef -export MODULE_PREINSTALL_jsc8 - -define MODULE_POSTINSTALL_jsc8 - cd $$\(BUILDDIR_unit\) \&\& \ - DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall -endef -export MODULE_POSTINSTALL_jsc8 - -define MODULE_POST_jsc8 -cat <<BANNER ----------------------------------------------------------------------- - -The $(MODULE_SUMMARY_jsc8) has been installed. - -To check out the sample app, run these commands: - - sudo service unit restart - cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc8)/examples - sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config - curl http://localhost:8800/ - -Online documentation is available at https://unit.nginx.org - -NOTICE: - -This version of Unit code is made available in support of the open source -development process. This is an intermediate build made available for -testing purposes only. This Unit code is untested and presumed incompatible -with the JSR 340 Java Servlet 3.1 specification. You should not deploy or -write to this code. You should instead deploy and write production -applications on pre-built binaries that have been tested and certified -to meet the JSR-340 compatibility requirements such as certified binaries -published for the JSR-340 reference implementation available at -https://javaee.github.io/glassfish/. - -Redistribution of any Intermediate Build must retain this notice. - -Oracle and Java are registered trademarks of Oracle and/or its affiliates. -Other names may be trademarks of their respective owners. - ----------------------------------------------------------------------- -BANNER -endef -export MODULE_POST_jsc8 diff --git a/pkg/deb/Makefile.python36 b/pkg/deb/Makefile.python36 deleted file mode 100644 index 4fd898c6..00000000 --- a/pkg/deb/Makefile.python36 +++ /dev/null @@ -1,46 +0,0 @@ -MODULES+= python36 -MODULE_SUFFIX_python36= python3.6 - -MODULE_SUMMARY_python36= Python 3.6 module for NGINX Unit - -MODULE_VERSION_python36= $(VERSION) -MODULE_RELEASE_python36= 1 - -MODULE_CONFARGS_python36= python --config=python3.6-config -MODULE_MAKEARGS_python36= python3.6 -MODULE_INSTARGS_python36= python3.6-install - -MODULE_SOURCES_python36= unit.example-python-app \ - unit.example-python3.6-config - -BUILD_DEPENDS_python36= python3.6-dev -BUILD_DEPENDS+= $(BUILD_DEPENDS_python36) - -MODULE_BUILD_DEPENDS_python36=,python3.6-dev - -define MODULE_PREINSTALL_python36 - mkdir -p debian/unit-python3.6/usr/share/doc/unit-python3.6/examples/python-app - install -m 644 -p debian/unit.example-python-app debian/unit-python3.6/usr/share/doc/unit-python3.6/examples/python-app/wsgi.py - install -m 644 -p debian/unit.example-python3.6-config debian/unit-python3.6/usr/share/doc/unit-python3.6/examples/unit.config -endef -export MODULE_PREINSTALL_python36 - -define MODULE_POST_python36 -cat <<BANNER ----------------------------------------------------------------------- - -The $(MODULE_SUMMARY_python36) has been installed. - -To check out the sample app, run these commands: - - sudo service unit restart - cd /usr/share/doc/unit-$(MODULE_SUFFIX_python36)/examples - sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config - curl http://localhost:8400/ - -Online documentation is available at https://unit.nginx.org - ----------------------------------------------------------------------- -BANNER -endef -export MODULE_POST_python36 diff --git a/pkg/deb/Makefile.python37 b/pkg/deb/Makefile.python37 deleted file mode 100644 index 54dd8c4c..00000000 --- a/pkg/deb/Makefile.python37 +++ /dev/null @@ -1,46 +0,0 @@ -MODULES+= python37 -MODULE_SUFFIX_python37= python3.7 - -MODULE_SUMMARY_python37= Python 3.7 module for NGINX Unit - -MODULE_VERSION_python37= $(VERSION) -MODULE_RELEASE_python37= 1 - -MODULE_CONFARGS_python37= python --config=python3.7-config -MODULE_MAKEARGS_python37= python3.7 -MODULE_INSTARGS_python37= python3.7-install - -MODULE_SOURCES_python37= unit.example-python-app \ - unit.example-python3.7-config - -BUILD_DEPENDS_python37= python3.7-dev -BUILD_DEPENDS+= $(BUILD_DEPENDS_python37) - -MODULE_BUILD_DEPENDS_python37=,python3.7-dev - -define MODULE_PREINSTALL_python37 - mkdir -p debian/unit-python3.7/usr/share/doc/unit-python3.7/examples/python-app - install -m 644 -p debian/unit.example-python-app debian/unit-python3.7/usr/share/doc/unit-python3.7/examples/python-app/wsgi.py - install -m 644 -p debian/unit.example-python3.7-config debian/unit-python3.7/usr/share/doc/unit-python3.7/examples/unit.config -endef -export MODULE_PREINSTALL_python37 - -define MODULE_POST_python37 -cat <<BANNER ----------------------------------------------------------------------- - -The $(MODULE_SUMMARY_python37) has been installed. - -To check out the sample app, run these commands: - - sudo service unit restart - cd /usr/share/doc/unit-$(MODULE_SUFFIX_python37)/examples - sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config - curl http://localhost:8400/ - -Online documentation is available at https://unit.nginx.org - ----------------------------------------------------------------------- -BANNER -endef -export MODULE_POST_python37 diff --git a/pkg/deb/Makefile.wasm b/pkg/deb/Makefile.wasm index 8f3fdc67..de89841e 100644 --- a/pkg/deb/Makefile.wasm +++ b/pkg/deb/Makefile.wasm @@ -6,14 +6,19 @@ MODULE_SUMMARY_wasm= WASM module for NGINX Unit MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 -MODULE_CONFARGS_wasm= wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component -MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(shell grep ^CFLAGS \$$(BUILDDIR_\$$*)/build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" -MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install +MODULE_CONFARGS_wasm= wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm-wasi-component CFLAGS=\"\$$(shell grep ^CFLAGS \$$(BUILDDIR_\$$*)/build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" +MODULE_INSTARGS_wasm= wasm-wasi-component-install + +ifeq (,$(findstring $(CODENAME),bullseye focal)) +MODULE_CONFARGS_wasm+= \&\& ./configure wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/artifacts/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/artifacts/lib +MODULE_MAKEARGS_wasm+= wasm +MODULE_INSTARGS_wasm+= wasm-install MODULE_SOURCES_wasm= -BUILD_DEPENDS_wasm= -MODULE_BUILD_DEPENDS_wasm= +BUILD_DEPENDS_wasm= cmake +MODULE_BUILD_DEPENDS_wasm=,cmake MODULE_DEPENDS_wasm= BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) @@ -29,9 +34,10 @@ export MODULE_PREINSTALL_wasm define MODULE_POSTINSTALL_wasm mkdir -p debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ - install -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ + install -m 755 -p pkg/contrib/wasmtime/artifacts/lib/libwasmtime.so debian/unit-wasm/usr/lib/\$$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ endef export MODULE_POSTINSTALL_wasm +endif define MODULE_POST_wasm cat <<BANNER diff --git a/pkg/deb/debian.module/copyright.unit-jsc8 b/pkg/deb/debian.module/copyright.unit-jsc8 deleted file mode 100644 index 60da2dfa..00000000 --- a/pkg/deb/debian.module/copyright.unit-jsc8 +++ /dev/null @@ -1,42 +0,0 @@ - - NGINX Unit. - - 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 2017-2022 Valentin V. Bartenev - Copyright 2017-2022 Max Romanov - Copyright 2021-2022 OisÃn Canty - Copyright 2017-2021 Igor Sysoev - Copyright 2017-2021 Andrei Belov - Copyright 2019-2021 Tiago Natel de Moura - Copyright 2019-2020 Axel Duch - Copyright 2018-2019 Alexander Borisov - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - /usr/share/common-licenses/Apache-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The unit-jsc8 package provides Java servlet container module - for NGINX Unit. - - Java is a registered trademark of Oracle and/or its affiliates. diff --git a/pkg/deb/debian.module/rules-noarch.in b/pkg/deb/debian.module/rules-noarch.in index e56e06bc..f311438d 100644 --- a/pkg/deb/debian.module/rules-noarch.in +++ b/pkg/deb/debian.module/rules-noarch.in @@ -3,8 +3,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie +include /usr/share/dpkg/vendor.mk +ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes) +export DEB_CFLAGS_MAINT_APPEND=-fPIC +else export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC +endif +export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk diff --git a/pkg/deb/debian.module/rules.in b/pkg/deb/debian.module/rules.in index 7814fbfd..8877ff23 100755 --- a/pkg/deb/debian.module/rules.in +++ b/pkg/deb/debian.module/rules.in @@ -3,8 +3,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie +include /usr/share/dpkg/vendor.mk +ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes) +export DEB_CFLAGS_MAINT_APPEND=-fPIC +else export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC +endif +export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk diff --git a/pkg/deb/debian.module/unit.example-jsc16-config b/pkg/deb/debian.module/unit.example-jsc16-config deleted file mode 100644 index 0b10a44d..00000000 --- a/pkg/deb/debian.module/unit.example-jsc16-config +++ /dev/null @@ -1,15 +0,0 @@ -{ - "applications": { - "example_java16": { - "processes": 1, - "type": "java 16", - "webapp": "/usr/share/doc/unit-jsc16/examples/jsc-app" - } - }, - - "listeners": { - "*:8800": { - "pass": "applications/example_java16" - } - } -} diff --git a/pkg/deb/debian.module/unit.example-jsc8-config b/pkg/deb/debian.module/unit.example-jsc8-config deleted file mode 100644 index 4d79112f..00000000 --- a/pkg/deb/debian.module/unit.example-jsc8-config +++ /dev/null @@ -1,15 +0,0 @@ -{ - "applications": { - "example_java8": { - "processes": 1, - "type": "java 1.8.0", - "webapp": "/usr/share/doc/unit-jsc8/examples/jsc-app" - } - }, - - "listeners": { - "*:8800": { - "pass": "applications/example_java8" - } - } -} diff --git a/pkg/deb/debian.module/unit.example-python3.6-config b/pkg/deb/debian.module/unit.example-python3.6-config deleted file mode 100644 index 543024ff..00000000 --- a/pkg/deb/debian.module/unit.example-python3.6-config +++ /dev/null @@ -1,16 +0,0 @@ -{ - "applications": { - "example_python": { - "type": "python 3.6", - "processes": 2, - "path": "/usr/share/doc/unit-python3.6/examples/python-app", - "module": "wsgi" - } - }, - - "listeners": { - "*:8400": { - "pass": "applications/example_python" - } - } -} diff --git a/pkg/deb/debian.module/unit.example-python3.7-config b/pkg/deb/debian.module/unit.example-python3.7-config deleted file mode 100644 index e7b8dbc3..00000000 --- a/pkg/deb/debian.module/unit.example-python3.7-config +++ /dev/null @@ -1,16 +0,0 @@ -{ - "applications": { - "example_python": { - "type": "python 3.7", - "processes": 2, - "path": "/usr/share/doc/unit-python3.7/examples/python-app", - "module": "wsgi" - } - }, - - "listeners": { - "*:8400": { - "pass": "applications/example_python" - } - } -} diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 55a4ebec..dd75b562 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -3,8 +3,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie +include /usr/share/dpkg/vendor.mk +ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes) +export DEB_CFLAGS_MAINT_APPEND=-fPIC +else export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC +endif +export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -pie DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk diff --git a/pkg/docker/Dockerfile.go1.22 b/pkg/docker/Dockerfile.go1.22 index 7794353b..796a6715 100644 --- a/pkg/docker/Dockerfile.go1.22 +++ b/pkg/docker/Dockerfile.go1.22 @@ -1,4 +1,4 @@ -FROM golang:1.22-bullseye +FROM golang:1.22-bookworm LABEL org.opencontainers.image.title="Unit (go1.22)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.go1.21 b/pkg/docker/Dockerfile.go1.23 index 637e0c79..a62be794 100644 --- a/pkg/docker/Dockerfile.go1.21 +++ b/pkg/docker/Dockerfile.go1.23 @@ -1,12 +1,12 @@ -FROM golang:1.21-bullseye +FROM golang:1.23-bookworm -LABEL org.opencontainers.image.title="Unit (go1.21)" +LABEL org.opencontainers.image.title="Unit (go1.23)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.jsc11 b/pkg/docker/Dockerfile.jsc11 index fb3bdea0..d133d5b2 100644 --- a/pkg/docker/Dockerfile.jsc11 +++ b/pkg/docker/Dockerfile.jsc11 @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index a50df863..3880de7a 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM debian:bookworm-slim LABEL org.opencontainers.image.title="Unit (minimal)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.node20 b/pkg/docker/Dockerfile.node20 index 6c1518a3..5ae09797 100644 --- a/pkg/docker/Dockerfile.node20 +++ b/pkg/docker/Dockerfile.node20 @@ -1,4 +1,4 @@ -FROM node:20-bullseye +FROM node:20-bookworm LABEL org.opencontainers.image.title="Unit (node20)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.node21 b/pkg/docker/Dockerfile.node22 index 9ff49215..85f8aaab 100644 --- a/pkg/docker/Dockerfile.node21 +++ b/pkg/docker/Dockerfile.node22 @@ -1,12 +1,12 @@ -FROM node:21-bullseye +FROM node:22-bookworm -LABEL org.opencontainers.image.title="Unit (node21)" +LABEL org.opencontainers.image.title="Unit (node22)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.perl5.38 b/pkg/docker/Dockerfile.perl5.38 index 852bfbb7..88ac4961 100644 --- a/pkg/docker/Dockerfile.perl5.38 +++ b/pkg/docker/Dockerfile.perl5.38 @@ -1,4 +1,4 @@ -FROM perl:5.38-bullseye +FROM perl:5.38-bookworm LABEL org.opencontainers.image.title="Unit (perl5.38)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.perl5.36 b/pkg/docker/Dockerfile.perl5.40 index f25ec048..aa67d7cc 100644 --- a/pkg/docker/Dockerfile.perl5.36 +++ b/pkg/docker/Dockerfile.perl5.40 @@ -1,12 +1,12 @@ -FROM perl:5.36-bullseye +FROM perl:5.40-bookworm -LABEL org.opencontainers.image.title="Unit (perl5.36)" +LABEL org.opencontainers.image.title="Unit (perl5.40)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.php8.2 b/pkg/docker/Dockerfile.php8.2 index 96999b3b..354acf94 100644 --- a/pkg/docker/Dockerfile.php8.2 +++ b/pkg/docker/Dockerfile.php8.2 @@ -1,4 +1,4 @@ -FROM php:8.2-cli-bullseye +FROM php:8.2-cli-bookworm LABEL org.opencontainers.image.title="Unit (php8.2)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.php8.3 b/pkg/docker/Dockerfile.php8.3 index 2b87fe74..98bd3843 100644 --- a/pkg/docker/Dockerfile.php8.3 +++ b/pkg/docker/Dockerfile.php8.3 @@ -1,4 +1,4 @@ -FROM php:8.3-cli-bullseye +FROM php:8.3-cli-bookworm LABEL org.opencontainers.image.title="Unit (php8.3)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.python3.11 b/pkg/docker/Dockerfile.python3.11 index 381509b3..a0a06a48 100644 --- a/pkg/docker/Dockerfile.python3.11 +++ b/pkg/docker/Dockerfile.python3.11 @@ -1,4 +1,4 @@ -FROM python:3.11-bullseye +FROM python:3.11-bookworm LABEL org.opencontainers.image.title="Unit (python3.11)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.python3.11-slim b/pkg/docker/Dockerfile.python3.11-slim new file mode 100644 index 00000000..bb9b32a8 --- /dev/null +++ b/pkg/docker/Dockerfile.python3.11-slim @@ -0,0 +1,89 @@ +FROM python:3.11-slim-bookworm + +LABEL org.opencontainers.image.title="Unit (python3.11-slim)" +LABEL org.opencontainers.image.description="Official build of Unit for Docker." +LABEL org.opencontainers.image.url="https://unit.nginx.org" +LABEL org.opencontainers.image.source="https://github.com/nginx/unit" +LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" +LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" +LABEL org.opencontainers.image.version="1.33.0" + +RUN set -ex \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config \ + && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ + && cd unit \ + && NCPU="$(getconf _NPROCESSORS_ONLN)" \ + && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ + && CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ + && LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ + && CONFIGURE_ARGS_MODULES="--prefix=/usr \ + --statedir=/var/lib/unit \ + --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ + --pid=/var/run/unit.pid \ + --logdir=/var/log \ + --log=/var/log/unit.log \ + --tmpdir=/var/tmp \ + --user=unit \ + --group=unit \ + --openssl \ + --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ + && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ + --njs" \ + && make -j $NCPU -C pkg/contrib .njs \ + && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \ + && make clean \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd \ + && make clean \ + && /bin/true \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && ./configure python --config=/usr/local/bin/python3-config \ + && make -j $NCPU python3-install \ + && make clean \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ + && ./configure python --config=/usr/local/bin/python3-config \ + && make -j $NCPU python3-install \ + && cd \ + && rm -rf /usr/src/unit \ + && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ + ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ + done \ + && apt-mark showmanual | xargs apt-mark auto > /dev/null \ + && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ + && /bin/true \ + && mkdir -p /var/lib/unit/ \ + && mkdir -p /docker-entrypoint.d/ \ + && groupadd --gid 999 unit \ + && useradd \ + --uid 999 \ + --gid unit \ + --no-create-home \ + --home /nonexistent \ + --comment "unit user" \ + --shell /bin/false \ + unit \ + && apt-get update \ + && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* \ + && rm -f /requirements.apt \ + && ln -sf /dev/stderr /var/log/unit.log + +COPY docker-entrypoint.sh /usr/local/bin/ +COPY welcome.* /usr/share/unit/welcome/ + +STOPSIGNAL SIGTERM + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +EXPOSE 80 +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/pkg/docker/Dockerfile.python3.12 b/pkg/docker/Dockerfile.python3.12 index a96a314b..f32fd45b 100644 --- a/pkg/docker/Dockerfile.python3.12 +++ b/pkg/docker/Dockerfile.python3.12 @@ -1,4 +1,4 @@ -FROM python:3.12-bullseye +FROM python:3.12-bookworm LABEL org.opencontainers.image.title="Unit (python3.12)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.python3.12-slim b/pkg/docker/Dockerfile.python3.12-slim new file mode 100644 index 00000000..65ada57c --- /dev/null +++ b/pkg/docker/Dockerfile.python3.12-slim @@ -0,0 +1,89 @@ +FROM python:3.12-slim-bookworm + +LABEL org.opencontainers.image.title="Unit (python3.12-slim)" +LABEL org.opencontainers.image.description="Official build of Unit for Docker." +LABEL org.opencontainers.image.url="https://unit.nginx.org" +LABEL org.opencontainers.image.source="https://github.com/nginx/unit" +LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" +LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" +LABEL org.opencontainers.image.version="1.33.0" + +RUN set -ex \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates git build-essential libssl-dev libpcre2-dev curl pkg-config \ + && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ + && mkdir -p /usr/src/unit \ + && cd /usr/src/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ + && cd unit \ + && NCPU="$(getconf _NPROCESSORS_ONLN)" \ + && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ + && CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ + && LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ + && CONFIGURE_ARGS_MODULES="--prefix=/usr \ + --statedir=/var/lib/unit \ + --control=unix:/var/run/control.unit.sock \ + --runstatedir=/var/run \ + --pid=/var/run/unit.pid \ + --logdir=/var/log \ + --log=/var/log/unit.log \ + --tmpdir=/var/tmp \ + --user=unit \ + --group=unit \ + --openssl \ + --libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ + && CONFIGURE_ARGS="$CONFIGURE_ARGS_MODULES \ + --njs" \ + && make -j $NCPU -C pkg/contrib .njs \ + && export PKG_CONFIG_PATH=$(pwd)/pkg/contrib/njs/build \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \ + && make clean \ + && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \ + && make -j $NCPU unitd \ + && install -pm755 build/sbin/unitd /usr/sbin/unitd \ + && make clean \ + && /bin/true \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \ + && ./configure python --config=/usr/local/bin/python3-config \ + && make -j $NCPU python3-install \ + && make clean \ + && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \ + && ./configure python --config=/usr/local/bin/python3-config \ + && make -j $NCPU python3-install \ + && cd \ + && rm -rf /usr/src/unit \ + && for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \ + ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \ + done \ + && apt-mark showmanual | xargs apt-mark auto > /dev/null \ + && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \ + && /bin/true \ + && mkdir -p /var/lib/unit/ \ + && mkdir -p /docker-entrypoint.d/ \ + && groupadd --gid 999 unit \ + && useradd \ + --uid 999 \ + --gid unit \ + --no-create-home \ + --home /nonexistent \ + --comment "unit user" \ + --shell /bin/false \ + unit \ + && apt-get update \ + && apt-get --no-install-recommends --no-install-suggests -y install curl $(cat /requirements.apt) \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* \ + && rm -f /requirements.apt \ + && ln -sf /dev/stderr /var/log/unit.log + +COPY docker-entrypoint.sh /usr/local/bin/ +COPY welcome.* /usr/share/unit/welcome/ + +STOPSIGNAL SIGTERM + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +EXPOSE 80 +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/pkg/docker/Dockerfile.ruby3.2 b/pkg/docker/Dockerfile.ruby3.2 index 95bcdfa7..d3ab399c 100644 --- a/pkg/docker/Dockerfile.ruby3.2 +++ b/pkg/docker/Dockerfile.ruby3.2 @@ -1,4 +1,4 @@ -FROM ruby:3.2-bullseye +FROM ruby:3.2-bookworm LABEL org.opencontainers.image.title="Unit (ruby3.2)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.ruby3.3 b/pkg/docker/Dockerfile.ruby3.3 index 55f8a7d8..b83c754b 100644 --- a/pkg/docker/Dockerfile.ruby3.3 +++ b/pkg/docker/Dockerfile.ruby3.3 @@ -1,4 +1,4 @@ -FROM ruby:3.3-bullseye +FROM ruby:3.3-bookworm LABEL org.opencontainers.image.title="Unit (ruby3.3)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ diff --git a/pkg/docker/Dockerfile.wasm b/pkg/docker/Dockerfile.wasm index 0fe8ed14..dcdb3672 100644 --- a/pkg/docker/Dockerfile.wasm +++ b/pkg/docker/Dockerfile.wasm @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM debian:bookworm-slim LABEL org.opencontainers.image.title="Unit (wasm)" LABEL org.opencontainers.image.description="Official build of Unit for Docker." @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.url="https://unit.nginx.org" LABEL org.opencontainers.image.source="https://github.com/nginx/unit" LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images" LABEL org.opencontainers.image.vendor="NGINX Docker Maintainers <docker-maint@nginx.com>" -LABEL org.opencontainers.image.version="1.32.1" +LABEL org.opencontainers.image.version="1.33.0" RUN set -ex \ && savedAptMark="$(apt-mark showmanual)" \ @@ -15,7 +15,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && mkdir -p /usr/src/unit \ && cd /usr/src/unit \ - && git clone --depth 1 -b 1.32.1-1 https://github.com/nginx/unit \ + && git clone --depth 1 -b 1.33.0-1 https://github.com/nginx/unit \ && cd unit \ && NCPU="$(getconf _NPROCESSORS_ONLN)" \ && DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ @@ -46,17 +46,17 @@ RUN set -ex \ && install -pm755 build/sbin/unitd /usr/sbin/unitd \ && make clean \ && apt-get install --no-install-recommends --no-install-suggests -y libclang-dev \ - && export RUST_VERSION=1.76.0 \ + && export RUST_VERSION=1.80.1 \ && export RUSTUP_HOME=/usr/src/unit/rustup \ && export CARGO_HOME=/usr/src/unit/cargo \ && export PATH=/usr/src/unit/cargo/bin:$PATH \ && dpkgArch="$(dpkg --print-architecture)" \ && case "${dpkgArch##*-}" in \ - amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db" ;; \ - arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800" ;; \ + amd64) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \ + arm64) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \ *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ esac \ - && url="https://static.rust-lang.org/rustup/archive/1.26.0/${rustArch}/rustup-init" \ + && url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init" \ && curl -L -O "$url" \ && echo "${rustupSha256} *rustup-init" | sha256sum -c - \ && chmod +x rustup-init \ diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index d8c53021..9dbca2d2 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -9,8 +9,9 @@ VERSION ?= $(DEFAULT_VERSION) PATCHLEVEL ?= 1 MODULES ?= go jsc node perl php python ruby wasm +MODULES_SLIM ?= python -VARIANT ?= bullseye +VARIANT ?= bookworm VERSIONS_minimal ?= CONTAINER_minimal ?= debian:$(VARIANT)-slim @@ -19,7 +20,7 @@ INSTALL_minimal ?= version RUN_minimal ?= /bin/true MODULE_PREBUILD_minimal ?= /bin/true -VERSIONS_go ?= 1.21 1.22 +VERSIONS_go ?= 1.22 1.23 VARIANT_go ?= $(VARIANT) $(foreach goversion, $(VERSIONS_go), $(eval CONTAINER_go$(goversion) = golang:$(goversion)-$(VARIANT_go))) CONFIGURE_go ?= go --go-path=$$GOPATH @@ -35,7 +36,7 @@ INSTALL_jsc ?= java-shared-install java-install RUN_jsc ?= rm -rf /root/.m2 MODULE_PREBUILD_jsc ?= /bin/true -VERSIONS_node ?= 20 21 +VERSIONS_node ?= 20 22 VARIANT_node ?= $(VARIANT) $(foreach nodeversion, $(VERSIONS_node), $(eval CONTAINER_node$(nodeversion) = node:$(nodeversion)-$(VARIANT_node))) CONFIGURE_node ?= nodejs --node-gyp=/usr/local/bin/node-gyp @@ -43,7 +44,7 @@ INSTALL_node ?= node node-install libunit-install RUN_node ?= rm -rf /root/.cache/ \&\& rm -rf /root/.npm MODULE_PREBUILD_node ?= npm -g install node-gyp -VERSIONS_perl ?= 5.36 5.38 +VERSIONS_perl ?= 5.38 5.40 VARIANT_perl ?= $(VARIANT) $(foreach perlversion, $(VERSIONS_perl), $(eval CONTAINER_perl$(perlversion) = perl:$(perlversion)-$(VARIANT_perl))) CONFIGURE_perl ?= perl @@ -62,6 +63,7 @@ MODULE_PREBUILD_php ?= /bin/true VERSIONS_python ?= 3.11 3.12 VARIANT_python ?= $(VARIANT) $(foreach pythonversion, $(VERSIONS_python), $(eval CONTAINER_python$(pythonversion) = python:$(pythonversion)-$(VARIANT_python))) +$(foreach pythonversion, $(VERSIONS_python), $(eval CONTAINER_python$(pythonversion)-slim = python:$(pythonversion)-slim-$(VARIANT_python))) CONFIGURE_python ?= python --config=/usr/local/bin/python3-config INSTALL_python ?= python3-install RUN_python ?= /bin/true @@ -83,17 +85,17 @@ RUN_wasm ?= /bin/true define MODULE_PREBUILD_wasm apt-get install --no-install-recommends --no-install-suggests -y libclang-dev \\\n \ -\ \ \ \&\& export RUST_VERSION=1.76.0 \\\n \ +\ \ \ \&\& export RUST_VERSION=1.80.1 \\\n \ \ \ \ \&\& export RUSTUP_HOME=/usr/src/unit/rustup \\\n \ \ \ \ \&\& export CARGO_HOME=/usr/src/unit/cargo \\\n \ \ \ \ \&\& export PATH=/usr/src/unit/cargo/bin:\$$PATH \\\n \ \ \ \ \&\& dpkgArch="\$$\(dpkg --print-architecture\)" \\\n \ \ \ \ \&\& case "\$${dpkgArch##*-}" in \\\n \ -\ \ \ \ \ \ amd64\) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db" ;; \\\n \ -\ \ \ \ \ \ arm64\) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800" ;; \\\n \ +\ \ \ \ \ \ amd64\) rustArch="x86_64-unknown-linux-gnu"; rustupSha256="6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d" ;; \\\n \ +\ \ \ \ \ \ arm64\) rustArch="aarch64-unknown-linux-gnu"; rustupSha256="1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2" ;; \\\n \ \ \ \ \ \ \ *\) echo \>\&2 "unsupported architecture: \$${dpkgArch}"; exit 1 ;; \\\n \ \ \ \ \esac \\\n \ -\ \ \ \&\& url="https://static.rust-lang.org/rustup/archive/1.26.0/\$${rustArch}/rustup-init" \\\n \ +\ \ \ \&\& url="https://static.rust-lang.org/rustup/archive/1.27.1/\$${rustArch}/rustup-init" \\\n \ \ \ \ \&\& curl -L -O "\$$url" \\\n \ \ \ \ \&\& echo "\$${rustupSha256} *rustup-init" | sha256sum -c - \\\n \ \ \ \ \&\& chmod +x rustup-init \\\n \ @@ -109,9 +111,11 @@ endef default: @echo "valid targets: all build dockerfiles library clean" -MODVERSIONS = $(foreach module, $(MODULES), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion))) wasm minimal +MODVERSIONS = $(foreach module, $(MODULES), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion))) +MODVERSIONS += $(foreach module, $(MODULES_SLIM), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion)-slim)) +MODVERSIONS += wasm minimal -modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-') +modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-' | sed 's/slim//') dockerfiles: $(addprefix Dockerfile., $(MODVERSIONS)) build: $(addprefix build-, $(MODVERSIONS)) @@ -132,6 +136,7 @@ Dockerfile.%: ../../version template.Dockerfile build-%: Dockerfile.% docker pull $(CONTAINER_$*) docker build --no-cache -t unit:$(VERSION)-$* -f Dockerfile.$* . + touch $@ library: @echo "# this file is generated via https://github.com/nginx/unit/blob/$(shell git describe --always --abbrev=0 HEAD)/pkg/docker/Makefile" @@ -141,10 +146,14 @@ library: @previous=""; \ for mod in $(MODVERSIONS); do \ echo ""; \ - modname="$$( echo $$mod | tr -d '.0123456789-' )"; \ - TAGS="$$mod $${mod%%.*} $$modname" ; \ + modname="$$( echo $$mod | tr -d '.0123456789')"; \ + modmajor="$${mod%%.*}"; \ + if test "$${mod#*slim}" != "$$mod"; then \ + modmajor="$${modmajor}-slim"; \ + fi; \ + TAGS="$$mod $$modmajor $$modname"; \ TAGS="$$(echo $$TAGS | tr " " "\n" | sort -u -r | tr "\n" "," | sed "s/,/, /g")"; \ - if [ "$$previous" = "$$modname" ]; then \ + if test "$${previous#*"$$modname"}" != "$$previous"; then \ echo "Tags: $(VERSION)-$$mod, $$mod"; \ else \ if [ "$$mod" = "minimal" ]; then \ @@ -158,7 +167,7 @@ library: echo "GitCommit: $(shell git describe --always --abbrev=0 HEAD)"; \ echo "Directory: pkg/docker"; \ echo "File: Dockerfile.$$mod"; \ - previous=$$(echo $$mod | tr -d '.0123456789-'); \ + previous="$$previous $$modname"; \ done diff: $(addprefix diff-, $(MODVERSIONS)) @@ -170,5 +179,6 @@ all: $(addprefix Dockerfile., $(MODVERSIONS)) clean: rm -f Dockerfile.* + rm -f build-* .PHONY: default build dockerfiles clean library diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 1f3bbd58..f00b336a 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -10,9 +10,7 @@ RELEASE ?= $(DEFAULT_RELEASE) PACKAGE_VENDOR = NGINX Packaging <nginx-packaging@f5.com> -ifeq ($(shell test `rpm --eval '0%{?rhel} -eq 7 -a 0%{?amzn} -eq 0'`; echo $$?), 0) -OSVER = centos7 -else ifeq ($(shell rpm --eval "%{?rhel}"), 8) +ifeq ($(shell rpm --eval "%{?rhel}"), 8) OSVER = centos8 else ifeq ($(shell rpm --eval "%{?rhel}"), 9) OSVER = centos9 @@ -20,19 +18,11 @@ else ifeq ($(shell rpm --eval "%{?amzn}"), 2) OSVER = amazonlinux2 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 -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 - -ifeq ($(OSVER), centos7) -BUILD_DEPENDS_unit += which -endif +BUILD_DEPENDS_unit = gcc rpm-build rpmlint clang llvm ifneq (,$(findstring $(OSVER),amazonlinux2)) BUILD_DEPENDS_unit += libxml2 libxslt openssl11-devel @@ -44,17 +34,6 @@ BUILD_DEPENDS = $(BUILD_DEPENDS_unit) MODULES= -ifeq ($(OSVER), centos7) -include Makefile.php -include Makefile.python27 -include Makefile.python36 -include Makefile.go -include Makefile.perl -include Makefile.jsc-common -include Makefile.jsc8 -include Makefile.jsc11 -endif - ifeq ($(OSVER), centos8) include Makefile.php include Makefile.python27 @@ -102,30 +81,6 @@ include Makefile.jsc17 include Makefile.wasm endif -ifeq ($(OSVER), fedora) -include Makefile.php -include Makefile.python310 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc8 -include Makefile.jsc11 -include Makefile.wasm -endif - -ifeq ($(OSVER), fedora37) -include Makefile.php -include Makefile.python311 -include Makefile.go -include Makefile.perl -include Makefile.ruby -include Makefile.jsc-common -include Makefile.jsc8 -include Makefile.jsc11 -include Makefile.wasm -endif - ifeq ($(OSVER), fedora39) include Makefile.php include Makefile.python312 diff --git a/pkg/rpm/Makefile.go b/pkg/rpm/Makefile.go index aacbe2b9..335b207a 100644 --- a/pkg/rpm/Makefile.go +++ b/pkg/rpm/Makefile.go @@ -13,11 +13,7 @@ MODULE_INSTARGS_go= go-install-src MODULE_SOURCES_go= unit.example-go-app \ unit.example-go-config -ifeq ($(OSVER), centos6) -BUILD_DEPENDS_go= epel-release golang -else BUILD_DEPENDS_go= golang -endif BUILD_DEPENDS+= $(BUILD_DEPENDS_go) diff --git a/pkg/rpm/Makefile.python27 b/pkg/rpm/Makefile.python27 index 3de5f634..aeb1248f 100644 --- a/pkg/rpm/Makefile.python27 +++ b/pkg/rpm/Makefile.python27 @@ -13,9 +13,9 @@ MODULE_INSTARGS_python27= python2.7-install MODULE_SOURCES_python27= unit.example-python-app \ unit.example-python27-config -ifneq (,$(findstring $(OSVER),fedora centos8)) +ifneq (,$(findstring $(OSVER),centos8)) BUILD_DEPENDS_python27= python2-devel -else ifneq (,$(findstring $(OSVER),centos7 amazonlinux2)) +else ifneq (,$(findstring $(OSVER),amazonlinux2)) BUILD_DEPENDS_python27= python-devel else BUILD_DEPENDS_python27= python27-devel @@ -24,7 +24,7 @@ endif BUILD_DEPENDS+= $(BUILD_DEPENDS_python27) define MODULE_DEFINITIONS_python27 -%if (0%{?rhel} == 7) || (0%{?amzn} == 2) +%if 0%{?amzn} == 2 Obsoletes: unit-python %endif endef diff --git a/pkg/rpm/Makefile.python310 b/pkg/rpm/Makefile.python310 deleted file mode 100644 index 50731475..00000000 --- a/pkg/rpm/Makefile.python310 +++ /dev/null @@ -1,57 +0,0 @@ -MODULES+= python310 -MODULE_SUFFIX_python310= python3.10 - -MODULE_SUMMARY_python310= Python 3.10 module for NGINX Unit - -MODULE_VERSION_python310= $(VERSION) -MODULE_RELEASE_python310= 1 - -MODULE_CONFARGS_python310= python --config=python3.10-config -MODULE_MAKEARGS_python310= python3.10 -MODULE_INSTARGS_python310= python3.10-install - -MODULE_SOURCES_python310= unit.example-python-app \ - unit.example-python310-config - -ifneq (,$(findstring $(OSVER),fedora amazonlinux2)) -BUILD_DEPENDS_python310= python3-devel -else -BUILD_DEPENDS_python310= python310-devel -endif - -BUILD_DEPENDS+= $(BUILD_DEPENDS_python310) - -define MODULE_PREINSTALL_python310 -%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python310/examples/python-app -%{__install} -m 644 -p %{SOURCE100} \ - %{buildroot}%{_datadir}/doc/unit-python310/examples/python-app/wsgi.py -%{__install} -m 644 -p %{SOURCE101} \ - %{buildroot}%{_datadir}/doc/unit-python310/examples/unit.config -endef -export MODULE_PREINSTALL_python310 - -define MODULE_FILES_python310 -%{_libdir}/unit/modules/* -%{_libdir}/unit/debug-modules/* -endef -export MODULE_FILES_python310 - -define MODULE_POST_python310 -cat <<BANNER ----------------------------------------------------------------------- - -The $(MODULE_SUMMARY_python310) has been installed. - -To check the sample app, run these commands: - - sudo service unit start - cd /usr/share/doc/%{name}/examples - sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config - curl http://localhost:8400/ - -Online documentation is available at https://unit.nginx.org - ----------------------------------------------------------------------- -BANNER -endef -export MODULE_POST_python310 diff --git a/pkg/rpm/Makefile.python311 b/pkg/rpm/Makefile.python311 index ae58d722..10c9c69b 100644 --- a/pkg/rpm/Makefile.python311 +++ b/pkg/rpm/Makefile.python311 @@ -13,11 +13,7 @@ MODULE_INSTARGS_python311= python3.11-install MODULE_SOURCES_python311= unit.example-python-app \ unit.example-python311-config -ifneq (,$(findstring $(OSVER),fedora37)) -BUILD_DEPENDS_python311= python3-devel -else BUILD_DEPENDS_python311= python3.11-devel -endif BUILD_DEPENDS+= $(BUILD_DEPENDS_python311) diff --git a/pkg/rpm/Makefile.python36 b/pkg/rpm/Makefile.python36 index c1fc8b6c..7019b819 100644 --- a/pkg/rpm/Makefile.python36 +++ b/pkg/rpm/Makefile.python36 @@ -13,11 +13,7 @@ MODULE_INSTARGS_python36= python3.6-install MODULE_SOURCES_python36= unit.example-python-app \ unit.example-python36-config -ifneq (,$(findstring $(OSVER),fedora centos7)) -BUILD_DEPENDS_python36= python3-devel -else BUILD_DEPENDS_python36= python36-devel -endif BUILD_DEPENDS+= $(BUILD_DEPENDS_python36) diff --git a/pkg/rpm/Makefile.python37 b/pkg/rpm/Makefile.python37 index c0604fd9..1feae6a4 100644 --- a/pkg/rpm/Makefile.python37 +++ b/pkg/rpm/Makefile.python37 @@ -13,7 +13,7 @@ MODULE_INSTARGS_python37= python3.7-install MODULE_SOURCES_python37= unit.example-python-app \ unit.example-python37-config -ifneq (,$(findstring $(OSVER),fedora amazonlinux2)) +ifneq (,$(findstring $(OSVER),amazonlinux2)) BUILD_DEPENDS_python37= python3-devel else BUILD_DEPENDS_python37= python37-devel diff --git a/pkg/rpm/Makefile.python39 b/pkg/rpm/Makefile.python39 index 7a3ae0b0..25f2a2a8 100644 --- a/pkg/rpm/Makefile.python39 +++ b/pkg/rpm/Makefile.python39 @@ -13,7 +13,7 @@ MODULE_INSTARGS_python39= python3.9-install MODULE_SOURCES_python39= unit.example-python-app \ unit.example-python39-config -ifneq (,$(findstring $(OSVER),fedora amazonlinux2 amazonlinux2023 centos9)) +ifneq (,$(findstring $(OSVER),amazonlinux2 amazonlinux2023 centos9)) BUILD_DEPENDS_python39= python3-devel else BUILD_DEPENDS_python39= python39-devel diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm index cb2ad35a..fe5c6808 100644 --- a/pkg/rpm/Makefile.wasm +++ b/pkg/rpm/Makefile.wasm @@ -6,13 +6,18 @@ 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 \&\& ./configure 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_CONFARGS_wasm= wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" +MODULE_INSTARGS_wasm= wasm-wasi-component-install + +ifeq (,$(findstring $(OSVER),amazonlinux2)) +MODULE_CONFARGS_wasm+= \&\& ./configure wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/artifacts/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/artifacts/lib +MODULE_MAKEARGS_wasm+= wasm +MODULE_INSTARGS_wasm+= wasm-install MODULE_SOURCES_wasm= -BUILD_DEPENDS_wasm= +BUILD_DEPENDS_wasm= cmake BUILD_DEPENDS+= $(BUILD_DEPENDS_wasm) @@ -22,16 +27,23 @@ endef export MODULE_PREBUILD_wasm define MODULE_PREINSTALL_wasm +\# brp-mangle-shebangs parses all executable files for a shebang +\# this fails on a vendored code that somehow ships with exec bit enabled +find pkg/contrib/wasmtime/ -type f -executable -name "*.rs" | xargs chmod -x endef export MODULE_PREINSTALL_wasm define MODULE_POSTINSTALL_wasm -%{__install} -m 755 -p pkg/contrib/wasmtime/target/release/libwasmtime.so %{buildroot}%{_libdir}/ +%{__install} -m 755 -p pkg/contrib/wasmtime/artifacts/lib/libwasmtime.so %{buildroot}%{_libdir}/ endef export MODULE_POSTINSTALL_wasm +endif define MODULE_FILES_wasm +%if 0%{?amzn2} +%else %{_libdir}/libwasmtime.so +%endif %{_libdir}/unit/modules/* %{_libdir}/unit/debug-modules/* endef diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.example-python310-config b/pkg/rpm/rpmbuild/SOURCES/unit.example-python310-config deleted file mode 100644 index 8a73ca53..00000000 --- a/pkg/rpm/rpmbuild/SOURCES/unit.example-python310-config +++ /dev/null @@ -1,16 +0,0 @@ -{ - "applications": { - "example_python": { - "type": "python 3.10", - "processes": 2, - "path": "/usr/share/doc/unit-python310/examples/python-app", - "module": "wsgi" - } - }, - - "listeners": { - "*:8400": { - "pass": "applications/example_python" - } - } -} diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.service b/pkg/rpm/rpmbuild/SOURCES/unit.service index 6df00fbb..f52d96da 100644 --- a/pkg/rpm/rpmbuild/SOURCES/unit.service +++ b/pkg/rpm/rpmbuild/SOURCES/unit.service @@ -15,12 +15,13 @@ Wants=network-online.target After=network-online.target [Service] -Type=simple +Type=forking Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /var/run/unit/unit.pid" -ExecStart=/usr/sbin/unitd $UNITD_OPTIONS --no-daemon +ExecStart=/usr/sbin/unitd $UNITD_OPTIONS ExecReload= RuntimeDirectory=unit RuntimeDirectoryMode=0755 +PIDFile=/run/unit/unit.pid [Install] WantedBy=multi-user.target diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in index b3d5d94b..7d1d1b0e 100644 --- a/pkg/rpm/unit.module.spec.in +++ b/pkg/rpm/unit.module.spec.in @@ -1,10 +1,6 @@ # distribution specific definitions %define bdir %{_builddir}/%{name}-%{version} -%if (0%{?rhel} == 7 && 0%{?amzn} == 0) -%define dist .el7 -%endif - %%MODULE_DEFINITIONS%% %if 0%{?rhel}%{?fedora} @@ -30,13 +26,10 @@ Release: %%RELEASE%%%{?dist}.ngx License: ASL 2.0 Vendor: %%PACKAGE_VENDOR%% URL: https://unit.nginx.org/ -Group: System Environment/Daemons Source0: unit-%{version}.tar.gz %%MODULE_SOURCES%% -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildRequires: pcre2-devel Requires: unit-r%%UNIT_VERSION%% @@ -77,7 +70,6 @@ make %%MODULE_MAKEARGS%% %{__mv} build build-nodebug %install -%{__rm} -rf %{buildroot} %{__mkdir} -p %{buildroot}%{_datadir}/doc/%%NAME%% if [ `basename %{SOURCE100}` == COPYRIGHT.%{name} ]; then %{__install} -m 644 -p %{SOURCE100} \ @@ -100,16 +92,12 @@ cd %{bdir} grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list cat /dev/null > debugsources.list -%clean -%{__rm} -rf %{buildroot} - %post if [ $1 -eq 1 ]; then %%MODULE_POST%% fi %files -%defattr(-,root,root,-) %dir %{_datadir}/doc/%%NAME%% %{_datadir}/doc/%%NAME%%/* %%MODULE_FILES%% diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index 01323650..9360ff7e 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -31,7 +31,6 @@ Release: %%RELEASE%%%{?dist}.ngx License: ASL 2.0 Vendor: %%PACKAGE_VENDOR%% URL: https://unit.nginx.org/ -Group: System Environment/Daemons Source0: unit-%{version}.tar.gz Source1: unit.service @@ -39,7 +38,6 @@ Source2: unit-debug.service Source3: unit.example.config Source4: unit.logrotate -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: systemd Requires(post): systemd Requires(preun): systemd @@ -68,7 +66,6 @@ dynamically via an API. Summary: NGINX Unit (development files) Version: %%VERSION%% Release: %%RELEASE%%%{?dist}.ngx -Group: Development/Libraries Requires: unit == %%VERSION%%-%%RELEASE%%%{?dist}.ngx %description devel Library and include files required for NGINX Unit modules development. @@ -106,7 +103,6 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \ %endif %install -%{__rm} -rf %{buildroot} %{__ln_s} build-nodebug build DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install %{__mkdir} -p %{buildroot}%{_bindir} @@ -160,9 +156,6 @@ cd %{bdir} grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list cat /dev/null > debugsources.list -%clean -%{__rm} -rf %{buildroot} - %post getent group unit >/dev/null || groupadd -r unit getent passwd unit >/dev/null || \ @@ -213,7 +206,6 @@ More info: https://unit.nginx.org/installation/#official-packages BANNER %files -%defattr(-,root,root,-) %attr(0755,root,root) %{_bindir}/unitc %attr(0755,root,root) %{_bindir}/setup-unit %attr(0755,root,root) %{_sbindir}/unitd |
