summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/contrib/src/njs/Makefile5
-rw-r--r--pkg/contrib/src/njs/SHA512SUMS2
-rw-r--r--pkg/contrib/src/njs/version2
-rw-r--r--pkg/deb/Makefile30
-rw-r--r--pkg/deb/Makefile.jsc2071
-rw-r--r--pkg/deb/Makefile.python31146
-rw-r--r--pkg/deb/debian.module/rules-noarch.in4
-rwxr-xr-xpkg/deb/debian.module/rules.in4
-rw-r--r--pkg/deb/debian.module/unit.example-jsc20-config15
-rw-r--r--pkg/deb/debian.module/unit.example-python3.11-config16
-rw-r--r--pkg/deb/debian/dirs1
-rw-r--r--pkg/deb/debian/rules.in17
-rw-r--r--pkg/docker/Dockerfile.go1.2031
-rw-r--r--pkg/docker/Dockerfile.jsc1131
-rw-r--r--pkg/docker/Dockerfile.minimal31
-rw-r--r--pkg/docker/Dockerfile.node1831
-rw-r--r--pkg/docker/Dockerfile.perl5.3631
-rw-r--r--pkg/docker/Dockerfile.php8.231
-rw-r--r--pkg/docker/Dockerfile.python3.1131
-rw-r--r--pkg/docker/Dockerfile.ruby3.231
-rw-r--r--pkg/docker/Makefile64
-rwxr-xr-xpkg/docker/docker-entrypoint.sh75
-rw-r--r--pkg/docker/template.Dockerfile27
-rw-r--r--pkg/docker/welcome.html45
-rw-r--r--pkg/docker/welcome.json25
-rw-r--r--pkg/docker/welcome.md29
-rw-r--r--pkg/rpm/Makefile21
-rw-r--r--pkg/rpm/Makefile.jsc-common8
-rw-r--r--pkg/rpm/Makefile.jsc1770
-rw-r--r--pkg/rpm/Makefile.python3112
-rw-r--r--pkg/rpm/Makefile.python392
-rw-r--r--pkg/rpm/rpmbuild/SOURCES/unit.example-jsc17-config15
-rw-r--r--pkg/rpm/unit.module.spec.in4
-rw-r--r--pkg/rpm/unit.spec.in17
34 files changed, 656 insertions, 209 deletions
diff --git a/pkg/contrib/src/njs/Makefile b/pkg/contrib/src/njs/Makefile
index 07740895..6a4fdf9d 100644
--- a/pkg/contrib/src/njs/Makefile
+++ b/pkg/contrib/src/njs/Makefile
@@ -15,5 +15,8 @@ njs: njs-$(NJS_VERSION).tar.gz .sum-njs
$(MOVE)
.njs: njs
- cd $< && ./configure --no-libxml2 && $(MAKE) libnjs
+ cd $< && ./configure \
+ --no-libxml2 \
+ --no-zlib \
+ && $(MAKE) libnjs
touch $@
diff --git a/pkg/contrib/src/njs/SHA512SUMS b/pkg/contrib/src/njs/SHA512SUMS
index 0bba673b..c94e5638 100644
--- a/pkg/contrib/src/njs/SHA512SUMS
+++ b/pkg/contrib/src/njs/SHA512SUMS
@@ -1 +1 @@
-5063fcfac18298d86157d05dc618f47815763a2192538befa5f046d081a7d5c6b624b65258674a6d9719147c102a703d5c3a80d937f4e9d43985da8e85dbc539 njs-0.7.10.tar.gz
+9cac2ced65bbfd712f7797f2bfa3fb20509a7e7bd68e8621d5fad32270f6d20a015d707665222559a72f525618bc91e09986a7bedce28af5f0fec9c20be41452 njs-0.7.12.tar.gz
diff --git a/pkg/contrib/src/njs/version b/pkg/contrib/src/njs/version
index 6088389d..64999f82 100644
--- a/pkg/contrib/src/njs/version
+++ b/pkg/contrib/src/njs/version
@@ -1 +1 @@
-NJS_VERSION := 0.7.10
+NJS_VERSION := 0.7.12
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index 580cb655..09544892 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -19,6 +19,21 @@ BUILD_DEPENDS = $(BUILD_DEPENDS_unit)
MODULES=
+# Ubuntu 23.04
+ifeq ($(CODENAME),lunar)
+include Makefile.php
+include Makefile.python311
+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
+endif
+
# Ubuntu 22.10
ifeq ($(CODENAME),kinetic)
include Makefile.php
@@ -117,11 +132,11 @@ endif
CONFIGURE_ARGS_COMMON=\
--prefix=/usr \
- --state=/var/lib/unit \
+ --statedir=/var/lib/unit \
--control="unix:/var/run/control.unit.sock" \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--tests \
@@ -199,7 +214,8 @@ endif
debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian
cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \
--transform "s#^#$(SRCDIR)/#" \
- LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go pkg/contrib docs/man/unitd.8.in
+ LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src \
+ test tools version go pkg/contrib docs/man/man8/unitd.8.in
mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz
cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
@@ -288,8 +304,8 @@ test: unit modules
for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \
soname=`basename $${so}` ; \
test "$${soname}" = "java.unit.so" && continue ; \
- test -h debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} || \
- ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} ; \
+ test -h debuild/unit-$(VERSION)/debian/build-unit/build/lib/$${soname} || \
+ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/lib/$${soname} ; \
done ; \
( cd debuild/unit-$(VERSION)/debian/build-unit && env python3 -m pytest --user=nobody $(PYTEST_ARGS) ) ; \
}
@@ -299,8 +315,8 @@ test-debug: unit modules
for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \
soname=`basename $${so}` ; \
test "$${soname}" = "java.unit.so" && continue ; \
- test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} || \
- ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} ; \
+ test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/lib/$${soname} || \
+ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/lib/$${soname} ; \
done ; \
( cd debuild/unit-$(VERSION)/debian/build-unit-debug && env python3 -m pytest --user=nobody $(PYTEST_ARGS) ) ; \
}
diff --git a/pkg/deb/Makefile.jsc20 b/pkg/deb/Makefile.jsc20
new file mode 100644
index 00000000..5b7c6d9f
--- /dev/null
+++ b/pkg/deb/Makefile.jsc20
@@ -0,0 +1,71 @@
+MODULES+= jsc20
+MODULE_SUFFIX_jsc20= jsc20
+
+MODULE_SUMMARY_jsc20= Java 20 module for NGINX Unit
+
+MODULE_VERSION_jsc20= $(VERSION)
+MODULE_RELEASE_jsc20= 1
+
+MODULE_CONFARGS_jsc20= java --module=java20 --home=/usr/lib/jvm/java-20-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/
+MODULE_MAKEARGS_jsc20= java20
+MODULE_INSTARGS_jsc20= java20-install
+
+MODULE_SOURCES_jsc20= unit.example-jsc-app \
+ unit.example-jsc20-config
+
+BUILD_DEPENDS_jsc20= openjdk-20-jdk-headless openjdk-20-jre-headless
+BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc20)
+
+MODULE_BUILD_DEPENDS_jsc20=,openjdk-20-jdk-headless
+MODULE_DEPENDS_jsc20=,openjdk-20-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME))
+
+define MODULE_PREINSTALL_jsc20
+ mkdir -p debian/unit-jsc20/usr/share/doc/unit-jsc20/examples/jsc-app
+ install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc20/usr/share/doc/unit-jsc20/examples/jsc-app/index.jsp
+ install -m 644 -p debian/unit.example-jsc20-config debian/unit-jsc20/usr/share/doc/unit-jsc20/examples/unit.config
+ install -m 644 -p src/java/README.JSR-340 debian/unit-jsc20/usr/share/doc/unit-jsc20/
+endef
+export MODULE_PREINSTALL_jsc20
+
+define MODULE_POSTINSTALL_jsc20
+ cd $$\(BUILDDIR_unit\) \&\& \
+ DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall
+endef
+export MODULE_POSTINSTALL_jsc20
+
+define MODULE_POST_jsc20
+cat <<BANNER
+----------------------------------------------------------------------
+
+The $(MODULE_SUMMARY_jsc20) has been installed.
+
+To check out the sample app, run these commands:
+
+ sudo service unit restart
+ cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc20)/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_jsc20
diff --git a/pkg/deb/Makefile.python311 b/pkg/deb/Makefile.python311
new file mode 100644
index 00000000..67fd3289
--- /dev/null
+++ b/pkg/deb/Makefile.python311
@@ -0,0 +1,46 @@
+MODULES+= python311
+MODULE_SUFFIX_python311= python3.11
+
+MODULE_SUMMARY_python311= Python 3.11 module for NGINX Unit
+
+MODULE_VERSION_python311= $(VERSION)
+MODULE_RELEASE_python311= 1
+
+MODULE_CONFARGS_python311= python --config=python3.11-config
+MODULE_MAKEARGS_python311= python3.11
+MODULE_INSTARGS_python311= python3.11-install
+
+MODULE_SOURCES_python311= unit.example-python-app \
+ unit.example-python3.11-config
+
+BUILD_DEPENDS_python311= python3.11-dev
+BUILD_DEPENDS+= $(BUILD_DEPENDS_python311)
+
+MODULE_BUILD_DEPENDS_python311=,python3.11-dev
+
+define MODULE_PREINSTALL_python311
+ mkdir -p debian/unit-python3.11/usr/share/doc/unit-python3.11/examples/python-app
+ install -m 644 -p debian/unit.example-python-app debian/unit-python3.11/usr/share/doc/unit-python3.11/examples/python-app/wsgi.py
+ install -m 644 -p debian/unit.example-python3.11-config debian/unit-python3.11/usr/share/doc/unit-python3.11/examples/unit.config
+endef
+export MODULE_PREINSTALL_python311
+
+define MODULE_POST_python311
+cat <<BANNER
+----------------------------------------------------------------------
+
+The $(MODULE_SUMMARY_python311) has been installed.
+
+To check out the sample app, run these commands:
+
+ sudo service unit restart
+ cd /usr/share/doc/unit-$(MODULE_SUFFIX_python311)/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_python311
diff --git a/pkg/deb/debian.module/rules-noarch.in b/pkg/deb/debian.module/rules-noarch.in
index 0f05aaba..e56e06bc 100644
--- a/pkg/deb/debian.module/rules-noarch.in
+++ b/pkg/deb/debian.module/rules-noarch.in
@@ -35,7 +35,7 @@ configure.unit: config.env.unit
cd $(BUILDDIR_unit) && \
CFLAGS= ./configure \
%%CONFIGURE_ARGS%% \
- --modules=/usr/lib/unit/modules \
+ --modulesdir=/usr/lib/unit/modules \
--cc-opt="$(CFLAGS)" && \
./configure %%MODULE_CONFARGS%%
touch $@
@@ -44,7 +44,7 @@ configure.unit_debug: config.env.unit_debug
cd $(BUILDDIR_unit_debug) && \
CFLAGS= ./configure \
%%CONFIGURE_ARGS%% \
- --modules=/usr/lib/unit/debug-modules \
+ --modulesdir=/usr/lib/unit/debug-modules \
--cc-opt="$(CFLAGS)" \
--debug && \
./configure %%MODULE_CONFARGS%%
diff --git a/pkg/deb/debian.module/rules.in b/pkg/deb/debian.module/rules.in
index f1217553..861a9c00 100755
--- a/pkg/deb/debian.module/rules.in
+++ b/pkg/deb/debian.module/rules.in
@@ -35,7 +35,7 @@ configure.unit: config.env.unit
cd $(BUILDDIR_unit) && \
CFLAGS= ./configure \
%%CONFIGURE_ARGS%% \
- --modules=/usr/lib/unit/modules \
+ --modulesdir=/usr/lib/unit/modules \
--cc-opt="$(CFLAGS)" && \
./configure %%MODULE_CONFARGS%%
touch $@
@@ -44,7 +44,7 @@ configure.unit_debug: config.env.unit_debug
cd $(BUILDDIR_unit_debug) && \
CFLAGS= ./configure \
%%CONFIGURE_ARGS%% \
- --modules=/usr/lib/unit/debug-modules \
+ --modulesdir=/usr/lib/unit/debug-modules \
--cc-opt="$(CFLAGS)" \
--debug && \
./configure %%MODULE_CONFARGS%%
diff --git a/pkg/deb/debian.module/unit.example-jsc20-config b/pkg/deb/debian.module/unit.example-jsc20-config
new file mode 100644
index 00000000..57865a45
--- /dev/null
+++ b/pkg/deb/debian.module/unit.example-jsc20-config
@@ -0,0 +1,15 @@
+{
+ "applications": {
+ "example_java20": {
+ "processes": 1,
+ "type": "java 20",
+ "webapp": "/usr/share/doc/unit-jsc20/examples/jsc-app"
+ }
+ },
+
+ "listeners": {
+ "*:8800": {
+ "pass": "applications/example_java20"
+ }
+ }
+}
diff --git a/pkg/deb/debian.module/unit.example-python3.11-config b/pkg/deb/debian.module/unit.example-python3.11-config
new file mode 100644
index 00000000..39b31b57
--- /dev/null
+++ b/pkg/deb/debian.module/unit.example-python3.11-config
@@ -0,0 +1,16 @@
+{
+ "applications": {
+ "example_python": {
+ "type": "python 3.11",
+ "processes": 2,
+ "path": "/usr/share/doc/unit-python3.11/examples/python-app",
+ "module": "wsgi"
+ }
+ },
+
+ "listeners": {
+ "*:8400": {
+ "pass": "applications/example_python"
+ }
+ }
+}
diff --git a/pkg/deb/debian/dirs b/pkg/deb/debian/dirs
index 4a6618c8..2568bac1 100644
--- a/pkg/deb/debian/dirs
+++ b/pkg/deb/debian/dirs
@@ -1,3 +1,4 @@
+usr/bin
usr/sbin
usr/lib/unit
var/lib/unit
diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in
index 23812926..0d7cf830 100644
--- a/pkg/deb/debian/rules.in
+++ b/pkg/deb/debian/rules.in
@@ -32,6 +32,7 @@ config.env.%: njs
cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/src $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/test $(BUILDDIR_$*)/
+ cp -Pa $(CURDIR)/tools $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/version $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/CHANGES $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/LICENSE $(BUILDDIR_$*)/
@@ -39,8 +40,8 @@ config.env.%: njs
cp -Pa $(CURDIR)/README.md $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/CONTRIBUTING.md $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/go $(BUILDDIR_$*)/
- mkdir -p $(BUILDDIR_$*)/docs/man
- cp -Pa $(CURDIR)/docs/man/unitd.8.in $(BUILDDIR_$*)/docs/man/
+ mkdir -p $(BUILDDIR_$*)/docs/man/man8
+ cp -Pa $(CURDIR)/docs/man/man8/unitd.8.in $(BUILDDIR_$*)/docs/man/man8/
touch $@
configure.unit: config.env.unit
@@ -48,7 +49,7 @@ configure.unit: config.env.unit
PKG_CONFIG_PATH=$(CURDIR)/pkg/contrib/njs/build \
CFLAGS= ./configure \
%%CONFIGURE_ARGS%% \
- --modules=/usr/lib/unit/modules \
+ --modulesdir=/usr/lib/unit/modules \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--cc-opt="$(CFLAGS)" \
--ld-opt="$(LDFLAGS)"
@@ -59,7 +60,7 @@ configure.unit_debug: config.env.unit_debug
PKG_CONFIG_PATH=$(CURDIR)/pkg/contrib/njs/build \
CFLAGS= ./configure \
%%CONFIGURE_ARGS%% \
- --modules=/usr/lib/unit/debug-modules \
+ --modulesdir=/usr/lib/unit/debug-modules \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--cc-opt="$(CFLAGS)" \
--ld-opt="$(LDFLAGS)" \
@@ -69,7 +70,7 @@ configure.unit_debug: config.env.unit_debug
build-arch.%: configure.%
dh_testdir
$(MAKE) -C $(BUILDDIR_$*)
- $(MAKE) -C $(BUILDDIR_$*) build/libunit.a
+ $(MAKE) -C $(BUILDDIR_$*) build/lib/libunit.a
ifeq ($(DOTESTS), 1)
$(MAKE) -C $(BUILDDIR_$*) tests
endif
@@ -112,8 +113,10 @@ install: build do.tests
dh_installlogrotate
cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install
cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR_dev) make libunit-install
- install -m 755 $(BUILDDIR_unit_debug)/build/unitd $(INSTALLDIR)/usr/sbin/unitd-debug
- install -m 644 $(BUILDDIR_unit_debug)/build/libunit.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-debug.a
+ install -m 755 $(BUILDDIR_unit)/tools/unitc $(INSTALLDIR)/usr/bin/unitc
+ install -m 755 $(BUILDDIR_unit)/tools/setup-unit $(INSTALLDIR)/usr/bin/setup-unit
+ install -m 755 $(BUILDDIR_unit_debug)/build/sbin/unitd $(INSTALLDIR)/usr/sbin/unitd-debug
+ install -m 644 $(BUILDDIR_unit_debug)/build/lib/libunit.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-debug.a
mkdir -p $(INSTALLDIR)/usr/share/doc/unit/examples
install -m 644 debian/unit.example.config $(INSTALLDIR)/usr/share/doc/unit/examples/example.config
install -m 644 CHANGES $(INSTALLDIR)/usr/share/doc/unit/changelog
diff --git a/pkg/docker/Dockerfile.go1.20 b/pkg/docker/Dockerfile.go1.20
index 408e0d2b..50b4d5b3 100644
--- a/pkg/docker/Dockerfile.go1.20
+++ b/pkg/docker/Dockerfile.go1.20
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure go --go-path=$GOPATH \
&& make -j $NCPU go-install-src libunit-install \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure go --go-path=$GOPATH \
&& make -j $NCPU go-install-src libunit-install \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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.jsc11 b/pkg/docker/Dockerfile.jsc11
index dcadeef4..bd987ae5 100644
--- a/pkg/docker/Dockerfile.jsc11
+++ b/pkg/docker/Dockerfile.jsc11
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure java --jars=/usr/share/unit-jsc-common/ \
&& make -j $NCPU java-shared-install java-install \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure java --jars=/usr/share/unit-jsc-common/ \
&& make -j $NCPU java-shared-install java-install \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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.minimal b/pkg/docker/Dockerfile.minimal
index 2a2d2755..06a85b22 100644
--- a/pkg/docker/Dockerfile.minimal
+++ b/pkg/docker/Dockerfile.minimal
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure \
&& make -j $NCPU version \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure \
&& make -j $NCPU version \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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.node18 b/pkg/docker/Dockerfile.node18
index b782b60e..b3fb46d3 100644
--- a/pkg/docker/Dockerfile.node18
+++ b/pkg/docker/Dockerfile.node18
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \
&& make -j $NCPU node node-install libunit-install \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \
&& make -j $NCPU node node-install libunit-install \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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.perl5.36 b/pkg/docker/Dockerfile.perl5.36
index c265bd36..2dc31e53 100644
--- a/pkg/docker/Dockerfile.perl5.36
+++ b/pkg/docker/Dockerfile.perl5.36
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure perl \
&& make -j $NCPU perl-install \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure perl \
&& make -j $NCPU perl-install \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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.php8.2 b/pkg/docker/Dockerfile.php8.2
index 660cb2ba..fcf3f59e 100644
--- a/pkg/docker/Dockerfile.php8.2
+++ b/pkg/docker/Dockerfile.php8.2
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure php \
&& make -j $NCPU php-install \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure php \
&& make -j $NCPU php-install \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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.11 b/pkg/docker/Dockerfile.python3.11
index 10ec6518..89cd315a 100644
--- a/pkg/docker/Dockerfile.python3.11
+++ b/pkg/docker/Dockerfile.python3.11
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./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 --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./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 \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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 19a763f7..4a6b60e4 100644
--- a/pkg/docker/Dockerfile.ruby3.2
+++ b/pkg/docker/Dockerfile.ruby3.2
@@ -6,42 +6,46 @@ 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.29.1"
+LABEL org.opencontainers.image.version="1.30.0"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
- && hg clone -u 1.29.1-1 https://hg.nginx.org/unit \
+ && hg clone -u 1.30.0-1 https://hg.nginx.org/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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure ruby \
&& make -j $NCPU ruby-install \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure ruby \
&& make -j $NCPU ruby-install \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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/Makefile b/pkg/docker/Makefile
index 5b1f4f20..cb801253 100644
--- a/pkg/docker/Makefile
+++ b/pkg/docker/Makefile
@@ -8,90 +8,88 @@ DEFAULT_VERSION := $(NXT_VERSION)
VERSION ?= $(DEFAULT_VERSION)
PATCHLEVEL ?= 1
-EXPORT_DIR := $(VERSION)
-
-MODULES ?= go jsc node perl php python ruby minimal
+MODULES ?= go jsc node perl php python ruby
VARIANT ?= bullseye
-VERSION_minimal ?=
+VERSIONS_minimal ?=
CONTAINER_minimal ?= debian:$(VARIANT)-slim
CONFIGURE_minimal ?=
INSTALL_minimal ?= version
RUN_minimal ?= /bin/true
-VERSION_go ?= 1.20
+VERSIONS_go ?= 1.20
VARIANT_go ?= $(VARIANT)
-CONTAINER_go ?= golang:$(VERSION_go)-$(VARIANT_go)
+$(foreach goversion, $(VERSIONS_go), $(eval CONTAINER_go$(goversion) = golang:$(goversion)-$(VARIANT_go)))
CONFIGURE_go ?= go --go-path=$$GOPATH
INSTALL_go ?= go-install-src libunit-install
RUN_go ?= /bin/true
-VERSION_jsc ?= 11
+VERSIONS_jsc ?= 11
VARIANT_jsc ?= jammy
-CONTAINER_jsc ?= eclipse-temurin:$(VERSION_jsc)-jdk-$(VARIANT_jsc)
+$(foreach jscversion, $(VERSIONS_jsc), $(eval CONTAINER_jsc$(jscversion) = eclipse-temurin:$(jscversion)-jdk-$(VARIANT_jsc)))
CONFIGURE_jsc ?= java --jars=/usr/share/unit-jsc-common/
INSTALL_jsc ?= java-shared-install java-install
RUN_jsc ?= /bin/true
-VERSION_node ?= 18
+VERSIONS_node ?= 18
VARIANT_node ?= $(VARIANT)
-CONTAINER_node ?= node:$(VERSION_node)-$(VARIANT_node)
+$(foreach nodeversion, $(VERSIONS_node), $(eval CONTAINER_node$(nodeversion) = node:$(nodeversion)-$(VARIANT_node)))
CONFIGURE_node ?= nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp
INSTALL_node ?= node node-install libunit-install
RUN_node ?= /bin/true
-VERSION_perl ?= 5.36
+VERSIONS_perl ?= 5.36
VARIANT_perl ?= $(VARIANT)
-CONTAINER_perl ?= perl:$(VERSION_perl)-$(VARIANT_perl)
+$(foreach perlversion, $(VERSIONS_perl), $(eval CONTAINER_perl$(perlversion) = perl:$(perlversion)-$(VARIANT_perl)))
CONFIGURE_perl ?= perl
INSTALL_perl ?= perl-install
RUN_perl ?= /bin/true
-VERSION_php ?= 8.2
+VERSIONS_php ?= 8.2
VARIANT_php ?= cli-$(VARIANT)
-CONTAINER_php ?= php:$(VERSION_php)-$(VARIANT_php)
+$(foreach phpversion, $(VERSIONS_php), $(eval CONTAINER_php$(phpversion) = php:$(phpversion)-$(VARIANT_php)))
CONFIGURE_php ?= php
INSTALL_php ?= php-install
RUN_php ?= ldconfig
-VERSION_python ?= 3.11
+VERSIONS_python ?= 3.11
VARIANT_python ?= $(VARIANT)
-CONTAINER_python ?= python:$(VERSION_python)-$(VARIANT_python)
+$(foreach pythonversion, $(VERSIONS_python), $(eval CONTAINER_python$(pythonversion) = python:$(pythonversion)-$(VARIANT_python)))
CONFIGURE_python ?= python --config=/usr/local/bin/python3-config
INSTALL_python ?= python3-install
RUN_python ?= /bin/true
-VERSION_ruby ?= 3.2
+VERSIONS_ruby ?= 3.2
VARIANT_ruby ?= $(VARIANT)
-CONTAINER_ruby ?= ruby:$(VERSION_ruby)-$(VARIANT_ruby)
+$(foreach rubyversion, $(VERSIONS_ruby), $(eval CONTAINER_ruby$(rubyversion) = ruby:$(rubyversion)-$(VARIANT_ruby)))
CONFIGURE_ruby ?= ruby
INSTALL_ruby ?= ruby-install
RUN_ruby ?= gem install rack
default:
- @echo "valid targets: all build dockerfiles clean"
+ @echo "valid targets: all build dockerfiles library clean"
-MODVERSIONS = $(foreach module,$(MODULES),$(module)$(VERSION_$(module)))
+MODVERSIONS = $(foreach module, $(MODULES), $(foreach modversion, $(shell for v in $(VERSIONS_$(module)); do echo $$v; done | sort -r), $(module)$(modversion))) minimal
modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-')
dockerfiles: $(addprefix Dockerfile., $(MODVERSIONS))
-build: $(addprefix build-,$(MODVERSIONS))
+build: $(addprefix build-, $(MODVERSIONS))
Dockerfile.%: ../../version template.Dockerfile
@echo "===> Building $@"
cat template.Dockerfile | sed \
-e 's,@@VERSION@@,$(VERSION),g' \
-e 's,@@PATCHLEVEL@@,$(PATCHLEVEL),g' \
- -e 's,@@CONTAINER@@,$(CONTAINER_$(call modname, $*)),g' \
+ -e 's,@@CONTAINER@@,$(CONTAINER_$*),g' \
-e 's,@@CONFIGURE@@,$(CONFIGURE_$(call modname, $*)),g' \
-e 's,@@INSTALL@@,$(INSTALL_$(call modname, $*)),g' \
-e 's,@@RUN@@,$(RUN_$(call modname, $*)),g' \
> $@
build-%: Dockerfile.%
- docker pull $(CONTAINER_$(call modname, $*))
+ docker pull $(CONTAINER_$*)
docker build --no-cache -t unit:$(VERSION)-$* -f Dockerfile.$* .
library:
@@ -99,22 +97,32 @@ library:
@echo ""
@echo "Maintainers: Unit Docker Maintainers <docker-maint@nginx.com> (@nginx)"
@echo "GitRepo: https://github.com/nginx/unit.git"
- @for mod in $(MODVERSIONS); do \
+ @previous=""; \
+ for mod in $(MODVERSIONS); do \
echo ""; \
- TAGS="$$mod $${mod%%.*} $$( echo $$mod | tr -d '.0123456789-' )"; \
+ modname="$$( echo $$mod | tr -d '.0123456789-' )"; \
+ TAGS="$$mod $${mod%%.*} $$modname" ; \
TAGS="$$(echo $$TAGS | tr " " "\n" | sort -u -r | tr "\n" "," | sed "s/,/, /g")"; \
- echo "Tags: $(VERSION)-$$mod, $${TAGS%, }"; \
+ if [ "$$previous" == "$$modname" ]; then \
+ echo "Tags: $(VERSION)-$$mod, $$mod"; \
+ else \
+ if [ "$$mod" == "minimal" ]; then \
+ echo "Tags: $(VERSION)-$$mod, $${TAGS%, }, latest"; \
+ else \
+ echo "Tags: $(VERSION)-$$mod, $${TAGS%, }"; \
+ fi; \
+ fi; \
echo "Architectures: amd64, arm64v8"; \
echo "GitFetch: refs/heads/branches/packaging"; \
echo "GitCommit: $(shell git describe --always --abbrev=0 HEAD)"; \
echo "Directory: pkg/docker"; \
echo "File: Dockerfile.$$mod"; \
+ previous=$$(echo $$mod | tr -d '.0123456789-'); \
done
all: $(addprefix Dockerfile., $(MODVERSIONS))
clean:
- rm -f $(addprefix Dockerfile., $(MODVERSIONS))
- rm -rf $(EXPORT_DIR)
+ rm -f Dockerfile.*
.PHONY: default build dockerfiles clean library
diff --git a/pkg/docker/docker-entrypoint.sh b/pkg/docker/docker-entrypoint.sh
index e0afd7ea..4646409f 100755
--- a/pkg/docker/docker-entrypoint.sh
+++ b/pkg/docker/docker-entrypoint.sh
@@ -25,21 +25,23 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
if /usr/bin/find "/var/lib/unit/" -mindepth 1 -print -quit 2>/dev/null | /bin/grep -q .; then
echo "$0: /var/lib/unit/ is not empty, skipping initial configuration..."
else
- if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -print -quit 2>/dev/null | /bin/grep -q .; then
- echo "$0: /docker-entrypoint.d/ is not empty, launching Unit daemon to perform initial configuration..."
- /usr/sbin/$1 --control unix:/var/run/control.unit.sock
+ echo "$0: Launching Unit daemon to perform initial configuration..."
+ /usr/sbin/$1 --control unix:/var/run/control.unit.sock
- for i in $(/usr/bin/seq $WAITLOOPS); do
- if [ ! -S /var/run/control.unit.sock ]; then
- echo "$0: Waiting for control socket to be created..."
- /bin/sleep $SLEEPSEC
- else
- break
- fi
- done
- # even when the control socket exists, it does not mean unit has finished initialisation
- # this curl call will get a reply once unit is fully launched
- /usr/bin/curl -s -X GET --unix-socket /var/run/control.unit.sock http://localhost/
+ for i in $(/usr/bin/seq $WAITLOOPS); do
+ if [ ! -S /var/run/control.unit.sock ]; then
+ echo "$0: Waiting for control socket to be created..."
+ /bin/sleep $SLEEPSEC
+ else
+ break
+ fi
+ done
+ # even when the control socket exists, it does not mean unit has finished initialisation
+ # this curl call will get a reply once unit is fully launched
+ /usr/bin/curl -s -X GET --unix-socket /var/run/control.unit.sock http://localhost/
+
+ if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -print -quit 2>/dev/null | /bin/grep -q .; then
+ echo "$0: /docker-entrypoint.d/ is not empty, applying initial configuration..."
echo "$0: Looking for certificate bundles in /docker-entrypoint.d/..."
for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.pem"); do
@@ -47,6 +49,12 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
curl_put $f "certificates/$(basename $f .pem)"
done
+ echo "$0: Looking for JavaScript modules in /docker-entrypoint.d/..."
+ for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.js"); do
+ echo "$0: Uploading JavaScript module: $f"
+ curl_put $f "js_modules/$(basename $f .js)"
+ done
+
echo "$0: Looking for configuration snippets in /docker-entrypoint.d/..."
for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.json"); do
echo "$0: Applying configuration $f";
@@ -60,32 +68,33 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
done
# warn on filetypes we don't know what to do with
- for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -not -name "*.sh" -not -name "*.json" -not -name "*.pem"); do
+ for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -not -name "*.sh" -not -name "*.json" -not -name "*.pem" -not -name "*.js"); do
echo "$0: Ignoring $f";
done
+ else
+ echo "$0: /docker-entrypoint.d/ is empty, creating 'welcome' configuration..."
+ curl_put /usr/share/unit/welcome/welcome.json "config"
+ fi
- echo "$0: Stopping Unit daemon after initial configuration..."
- kill -TERM $(/bin/cat /var/run/unit.pid)
+ echo "$0: Stopping Unit daemon after initial configuration..."
+ kill -TERM $(/bin/cat /var/run/unit.pid)
- for i in $(/usr/bin/seq $WAITLOOPS); do
- if [ -S /var/run/control.unit.sock ]; then
- echo "$0: Waiting for control socket to be removed..."
- /bin/sleep $SLEEPSEC
- else
- break
- fi
- done
+ for i in $(/usr/bin/seq $WAITLOOPS); do
if [ -S /var/run/control.unit.sock ]; then
- kill -KILL $(/bin/cat /var/run/unit.pid)
- rm -f /var/run/control.unit.sock
+ echo "$0: Waiting for control socket to be removed..."
+ /bin/sleep $SLEEPSEC
+ else
+ break
fi
-
- echo
- echo "$0: Unit initial configuration complete; ready for start up..."
- echo
- else
- echo "$0: /docker-entrypoint.d/ is empty, skipping initial configuration..."
+ done
+ if [ -S /var/run/control.unit.sock ]; then
+ kill -KILL $(/bin/cat /var/run/unit.pid)
+ rm -f /var/run/control.unit.sock
fi
+
+ echo
+ echo "$0: Unit initial configuration complete; ready for start up..."
+ echo
fi
fi
diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile
index 7b749a1a..c6a72aa8 100644
--- a/pkg/docker/template.Dockerfile
+++ b/pkg/docker/template.Dockerfile
@@ -11,7 +11,7 @@ LABEL org.opencontainers.image.version="@@VERSION@@"
RUN set -ex \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev curl pkg-config \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& hg clone -u @@VERSION@@-@@PATCHLEVEL@@ https://hg.nginx.org/unit \
&& cd unit \
@@ -19,29 +19,33 @@ RUN set -ex \
&& 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="--prefix=/usr \
- --state=/var/lib/unit \
+ && CONFIGURE_ARGS_MODULES="--prefix=/usr \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--openssl \
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && 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/unitd /usr/sbin/unitd-debug \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd-debug \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modulesdir=/usr/lib/unit/modules \
&& make -j $NCPU unitd \
- && install -pm755 build/unitd /usr/sbin/unitd \
+ && install -pm755 build/sbin/unitd /usr/sbin/unitd \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/debug-modules --debug \
&& ./configure @@CONFIGURE@@ \
&& make -j $NCPU @@INSTALL@@ \
&& make clean \
- && ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \
+ && ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& ./configure @@CONFIGURE@@ \
&& make -j $NCPU @@INSTALL@@ \
&& cd \
@@ -71,9 +75,10 @@ RUN set -ex \
&& ln -sf /dev/stdout /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/welcome.html b/pkg/docker/welcome.html
new file mode 100644
index 00000000..9c4f8281
--- /dev/null
+++ b/pkg/docker/welcome.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Welcome to NGINX Unit</title>
+ <style type="text/css">
+ body { background: white; color: black; font-family: sans-serif; margin: 2em; line-height: 1.5; }
+ h1,h2 { color: #00974d; }
+ li { margin-bottom: 0.5em; }
+ pre { background-color: beige; padding: 0.4em; }
+ hr { margin-top: 2em; border: 1px solid #00974d; }
+ .indent { margin-left: 1.5em; }
+ </style>
+ </head>
+ <body>
+ <h1>Welcome to NGINX Unit</h1>
+ <p>Congratulations! NGINX Unit is installed and running.</p>
+ <h3>Useful Links</h3>
+ <ul>
+ <li><b><a href="https://unit.nginx.org/configuration/?referer=welcome&platform=docker">https://unit.nginx.org/configuration/</a></b><br>
+ To get started with Unit, see the <em>Configuration</em> docs, starting with
+ the <em>Quick Start</em> guide.</li>
+ <li><b><a href="https://unit.nginx.org/howto/docker/?referer=welcome&platform=docker">https://unit.nginx.org/howto/docker/</a></b><br>
+ For guidance about running <em>Unit in Docker</em> and tips for containerized
+ applications.
+ <li><b><a href="https://github.com/nginx/unit">https://github.com/nginx/unit</a></b><br>
+ See our GitHub repo to browse the code, contribute, or seek help from the
+ <a href="https://github.com/nginx/unit#community">community</a>.</li>
+ </ul>
+
+ <h2>Next steps</h2>
+
+ <h3>Check Current Configuration</h3>
+ <div class="indent">
+ <p>Unit's control API is currently listening for configuration changes
+ on the <a href="https://en.wikipedia.org/wiki/Unix_domain_socket">Unix socket</a> at
+ <b>/var/run/control.unit.sock</b> inside the container.<br>
+ To see the current configuration run:</p>
+ <pre>docker exec -ti <containerID> curl --unix-socket /var/run/control.unit.sock http://localhost/config</pre>
+ </div>
+
+ <hr>
+ <p><a href="https://unit.nginx.org/?referer=welcome&platform=docker">NGINX Unit &mdash; the universal web app server</a><br>
+ NGINX, Inc. &copy; 2023</p>
+ </body>
+</html>
diff --git a/pkg/docker/welcome.json b/pkg/docker/welcome.json
new file mode 100644
index 00000000..2a148da8
--- /dev/null
+++ b/pkg/docker/welcome.json
@@ -0,0 +1,25 @@
+{
+ "listeners": {
+ "*:80": {
+ "pass": "routes"
+ }
+ },
+
+ "routes": [
+ {
+ "match": {
+ "headers": {
+ "accept": "*text/html*"
+ }
+ },
+ "action": {
+ "share": "/usr/share/unit/welcome/welcome.html"
+ }
+ },
+ {
+ "action": {
+ "share": "/usr/share/unit/welcome/welcome.md"
+ }
+ }
+ ]
+}
diff --git a/pkg/docker/welcome.md b/pkg/docker/welcome.md
new file mode 100644
index 00000000..fef3d152
--- /dev/null
+++ b/pkg/docker/welcome.md
@@ -0,0 +1,29 @@
+Welcome to NGINX Unit
+=====================
+
+Congratulations! NGINX Unit is installed and running.
+
+Useful Links
+------------
+
+ * https://unit.nginx.org/
+ - Get started with the 'Configuration' docs, starting with the 'Quick Start' guide.
+
+ * https://unit.nginx.org/howto/docker/
+ - Guidance for running Unit in a container and tips for containerized applications.
+
+ * https://github.com/nginx/unit
+ - See our GitHub repo to browse the code, contribute, or seek help from the community.
+
+Current Configuration
+---------------------
+Unit's control API is currently listening for configuration changes on the Unix socket at
+`/var/run/control.unit.sock` inside the container.
+
+Read the current configuration with
+```
+docker exec -ti <containerID> curl --unix-socket /var/run/control.unit.sock http://localhost/config
+```
+
+---
+NGINX Unit - the universal web app server
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 5c104ca3..d3cc34bd 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -18,6 +18,8 @@ else ifeq ($(shell rpm --eval "%{?rhel}"), 9)
OSVER = centos9
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'`; echo $$?),0)
@@ -84,6 +86,16 @@ include Makefile.jsc-common
include Makefile.jsc8
endif
+ifeq ($(OSVER), amazonlinux2023)
+include Makefile.php
+include Makefile.python39
+include Makefile.python311
+include Makefile.go
+include Makefile.perl
+include Makefile.jsc-common
+include Makefile.jsc17
+endif
+
ifeq ($(OSVER), fedora)
include Makefile.php
include Makefile.python310
@@ -108,11 +120,11 @@ endif
CONFIGURE_ARGS_COMMON=\
--prefix=/usr \
- --state=%{_sharedstatedir}/unit \
+ --statedir=%{_sharedstatedir}/unit \
--control="unix:/var/run/unit/control.sock" \
--pid=/var/run/unit/unit.pid \
--log=/var/log/unit/unit.log \
- --tmp=/var/tmp \
+ --tmpdir=/var/tmp \
--user=unit \
--group=unit \
--tests \
@@ -142,7 +154,7 @@ check-build-depends-%:
esac ; \
not_installed= ; \
for pkg in $${pkgs}; do \
- rpm -qi $${pkg} >/dev/null 2>&1 ; \
+ rpm -qi --whatprovides $${pkg} >/dev/null 2>&1 ; \
if [ $$? -ne 0 ]; then \
not_installed="$${not_installed} $${pkg}" ; \
fi ; \
@@ -180,7 +192,8 @@ endif
rpmbuild/SOURCES/unit-$(VERSION).tar.gz:
cd ../.. && tar -czf pkg/rpm/rpmbuild/SOURCES/unit-$(VERSION).tar.gz \
--transform "s#^#unit-$(VERSION)/#" \
- LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go pkg/contrib docs/man/unitd.8.in
+ LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src \
+ test tools version go pkg/contrib docs/man/man8/unitd.8.in
unit: check-build-depends-unit rpmbuild/SPECS/unit.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz
@echo "===> Building $@ package" ; \
diff --git a/pkg/rpm/Makefile.jsc-common b/pkg/rpm/Makefile.jsc-common
index 9688e265..a3c3a3da 100644
--- a/pkg/rpm/Makefile.jsc-common
+++ b/pkg/rpm/Makefile.jsc-common
@@ -8,13 +8,21 @@ MODULE_RELEASE_jsc_common= 1
JAVA_ARCH_jsc_common= $(shell /usr/lib/jvm/java-1.8.0/bin/java -XshowSettings 2>&1 | grep -F -e os.arch | sed -e 's/^.*= //')
+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
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
BUILD_DEPENDS_jsc_common= java-1.8.0-openjdk-devel curl
+endif
BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc_common)
define MODULE_DEFINITIONS_jsc_common
diff --git a/pkg/rpm/Makefile.jsc17 b/pkg/rpm/Makefile.jsc17
new file mode 100644
index 00000000..7efdafaa
--- /dev/null
+++ b/pkg/rpm/Makefile.jsc17
@@ -0,0 +1,70 @@
+MODULES+= jsc17
+MODULE_SUFFIX_jsc17= jsc17
+
+MODULE_SUMMARY_jsc17= Java 17 module for NGINX Unit
+
+MODULE_VERSION_jsc17= $(VERSION)
+MODULE_RELEASE_jsc17= 1
+
+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/
+MODULE_MAKEARGS_jsc17= java17
+MODULE_INSTARGS_jsc17= java17-install
+
+MODULE_SOURCES_jsc17= unit.example-jsc-app \
+ unit.example-jsc17-config
+
+BUILD_DEPENDS_jsc17= java-17-amazon-corretto-devel
+BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc17)
+
+define MODULE_DEFINITIONS_jsc17
+Requires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
+Requires: java-17-amazon-corretto-headless
+endef
+export MODULE_DEFINITIONS_jsc17
+
+define MODULE_PREINSTALL_jsc17
+%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-jsc17/examples/jsc-app
+%{__install} -m 644 -p %{SOURCE100} \
+ %{buildroot}%{_datadir}/doc/unit-jsc17/examples/jsc-app/index.jsp
+%{__install} -m 644 -p %{SOURCE101} \
+ %{buildroot}%{_datadir}/doc/unit-jsc17/examples/unit.config
+%{__install} -m 644 -p %{bdir}/src/java/README.JSR-340 \
+ %{buildroot}%{_datadir}/doc/unit-jsc17/
+endef
+export MODULE_PREINSTALL_jsc17
+
+define MODULE_POSTINSTALL_jsc17
+DESTDIR=%{buildroot} make java-shared-uninstall
+endef
+export MODULE_POSTINSTALL_jsc17
+
+define MODULE_FILES_jsc17
+%{_libdir}/unit/modules/*
+%{_libdir}/unit/debug-modules/*
+%dir %{_datadir}/doc/unit-jsc17
+%{_datadir}/doc/unit-jsc17/*
+%{_datadir}/unit-jsc-common/*
+endef
+export MODULE_FILES_jsc17
+
+define MODULE_POST_jsc17
+cat <<BANNER
+----------------------------------------------------------------------
+
+The $(MODULE_SUMMARY_jsc17) has been installed.
+
+To check out the sample app, run these commands:
+
+ sudo service unit restart
+ 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:8800/
+
+Online documentation is available at https://unit.nginx.org
+
+`cat /usr/share/doc/unit-jsc17/README.JSR-340`
+
+----------------------------------------------------------------------
+BANNER
+endef
+export MODULE_POST_jsc17
diff --git a/pkg/rpm/Makefile.python311 b/pkg/rpm/Makefile.python311
index a8bee943..ae58d722 100644
--- a/pkg/rpm/Makefile.python311
+++ b/pkg/rpm/Makefile.python311
@@ -15,6 +15,8 @@ MODULE_SOURCES_python311= unit.example-python-app \
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.python39 b/pkg/rpm/Makefile.python39
index 5d7c2327..7a3ae0b0 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 centos9))
+ifneq (,$(findstring $(OSVER),fedora amazonlinux2 amazonlinux2023 centos9))
BUILD_DEPENDS_python39= python3-devel
else
BUILD_DEPENDS_python39= python39-devel
diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.example-jsc17-config b/pkg/rpm/rpmbuild/SOURCES/unit.example-jsc17-config
new file mode 100644
index 00000000..28b13e4d
--- /dev/null
+++ b/pkg/rpm/rpmbuild/SOURCES/unit.example-jsc17-config
@@ -0,0 +1,15 @@
+{
+ "applications": {
+ "example_java17": {
+ "processes": 1,
+ "type": "java 17",
+ "webapp": "/usr/share/doc/unit-jsc17/examples/jsc-app"
+ }
+ },
+
+ "listeners": {
+ "*:8800": {
+ "pass": "applications/example_java17"
+ }
+ }
+}
diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in
index bc68a254..04323afc 100644
--- a/pkg/rpm/unit.module.spec.in
+++ b/pkg/rpm/unit.module.spec.in
@@ -61,7 +61,7 @@ tar --strip-components=1 -zxf %{SOURCE0}
%build
./configure \
%{CONFIGURE_ARGS} \
- --modules=%{_libdir}/unit/debug-modules \
+ --modulesdir=%{_libdir}/unit/debug-modules \
--cc-opt="%{CC_OPT}" \
--debug
./configure %%MODULE_CONFARGS%%
@@ -69,7 +69,7 @@ make %%MODULE_MAKEARGS%%
%{__mv} build build-debug
./configure \
%{CONFIGURE_ARGS} \
- --modules=%{_libdir}/unit/modules \
+ --modulesdir=%{_libdir}/unit/modules \
--cc-opt="%{CC_OPT}"
./configure %%MODULE_CONFARGS%%
make %%MODULE_MAKEARGS%%
diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in
index 06880fcf..14a2ea00 100644
--- a/pkg/rpm/unit.spec.in
+++ b/pkg/rpm/unit.spec.in
@@ -80,19 +80,19 @@ Library and include files required for NGINX Unit modules development.
PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
./configure \
%{CONFIGURE_ARGS} \
- --modules=%{_libdir}/unit/debug-modules \
+ --modulesdir=%{_libdir}/unit/debug-modules \
--libdir=%{_libdir} \
--cc-opt="%{CC_OPT}" \
--ld-opt="%{LD_OPT}" \
--debug
%{__make} %{?_smp_mflags}
-%{__make} %{?_smp_mflags} build/libunit.a
+%{__make} %{?_smp_mflags} build/lib/libunit.a
%{__mv} build build-debug
PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
./configure \
%{CONFIGURE_ARGS} \
- --modules=%{_libdir}/unit/modules \
+ --modulesdir=%{_libdir}/unit/modules \
--libdir=%{_libdir} \
--cc-opt="%{CC_OPT}" \
--ld-opt="%{LD_OPT}"
@@ -103,9 +103,14 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
%{__rm} -rf %{buildroot}
%{__ln_s} build-nodebug build
DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install
-%{__install} -m755 %{bdir}/build-debug/unitd \
+%{__mkdir} -p %{buildroot}%{_bindir}
+%{__install} -m755 %{bdir}/tools/unitc \
+ %{buildroot}%{_bindir}/unitc
+%{__install} -m755 %{bdir}/tools/setup-unit \
+ %{buildroot}%{_bindir}/setup-unit
+%{__install} -m755 %{bdir}/build-debug/sbin/unitd \
%{buildroot}%{_sbindir}/unitd-debug
-%{__install} -m644 %{bdir}/build-debug/libunit.a \
+%{__install} -m644 %{bdir}/build-debug/lib/libunit.a \
%{buildroot}%{_libdir}/libunit-debug.a
%{__mkdir} -p %{buildroot}%{_libdir}/unit/modules
%{__mkdir} -p %{buildroot}%{_libdir}/unit/debug-modules
@@ -197,6 +202,8 @@ BANNER
%files
%defattr(-,root,root,-)
+%attr(0755,root,root) %{_bindir}/unitc
+%attr(0755,root,root) %{_bindir}/setup-unit
%attr(0755,root,root) %{_sbindir}/unitd
%attr(0755,root,root) %{_sbindir}/unitd-debug
%{_unitdir}/unit.service