diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/deb/debian.module/control-noarch.in | 4 | ||||
-rw-r--r-- | pkg/deb/debian.module/control.in | 4 | ||||
-rw-r--r-- | pkg/deb/debian/control.in | 4 | ||||
-rw-r--r-- | pkg/deb/debian/rules.in | 3 | ||||
-rw-r--r-- | pkg/deb/debian/unit-debug.service | 14 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.go1.17 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.jsc11 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.minimal | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.node16 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.perl5.34 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.php8.0 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.python3.9 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.ruby3.0 | 2 | ||||
-rwxr-xr-x | pkg/docker/docker-entrypoint.sh | 2 | ||||
-rw-r--r-- | pkg/rpm/rpmbuild/SOURCES/unit-debug.service | 26 | ||||
-rw-r--r-- | pkg/rpm/unit.spec.in | 12 |
16 files changed, 65 insertions, 20 deletions
diff --git a/pkg/deb/debian.module/control-noarch.in b/pkg/deb/debian.module/control-noarch.in index d9d9e5e1..323377d9 100644 --- a/pkg/deb/debian.module/control-noarch.in +++ b/pkg/deb/debian.module/control-noarch.in @@ -2,9 +2,9 @@ Source: %%NAME%% Section: admin Priority: extra Maintainer: %%PACKAGE_VENDOR%% -Build-Depends: debhelper (>= 9), +Build-Depends: debhelper (>= 11), linux-libc-dev%%MODULE_BUILD_DEPENDS%% -Standards-Version: 3.9.5 +Standards-Version: 4.1.4 Homepage: https://unit.nginx.org Package: %%NAME%% diff --git a/pkg/deb/debian.module/control.in b/pkg/deb/debian.module/control.in index 9a6fa797..f5ce8ae4 100644 --- a/pkg/deb/debian.module/control.in +++ b/pkg/deb/debian.module/control.in @@ -2,11 +2,11 @@ Source: %%NAME%% Section: admin Priority: extra Maintainer: %%PACKAGE_VENDOR%% -Build-Depends: debhelper (>= 9), +Build-Depends: debhelper (>= 11), linux-libc-dev, libssl-dev, libpcre2-dev%%MODULE_BUILD_DEPENDS%% -Standards-Version: 3.9.5 +Standards-Version: 4.1.4 Homepage: https://unit.nginx.org Package: %%NAME%% diff --git a/pkg/deb/debian/control.in b/pkg/deb/debian/control.in index 4d59520e..691bafed 100644 --- a/pkg/deb/debian/control.in +++ b/pkg/deb/debian/control.in @@ -2,11 +2,11 @@ Source: unit Section: admin Priority: extra Maintainer: %%PACKAGE_VENDOR%% -Build-Depends: debhelper (>= 9), +Build-Depends: debhelper (>= 11), linux-libc-dev, libssl-dev, libpcre2-dev -Standards-Version: 3.9.5 +Standards-Version: 4.1.4 Homepage: https://unit.nginx.org Package: unit diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 3f1f9db8..fe7d5c7c 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -99,7 +99,8 @@ install: build do.tests dh_testroot dh_prep dh_installdirs - dh_installsystemd + dh_installsystemd -punit --name=unit unit.service + dh_installsystemd -punit --name=unit-debug --no-start --no-enable unit-debug.service dh_installlogrotate cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR_dev) make libunit-install diff --git a/pkg/deb/debian/unit-debug.service b/pkg/deb/debian/unit-debug.service new file mode 100644 index 00000000..252d8451 --- /dev/null +++ b/pkg/deb/debian/unit-debug.service @@ -0,0 +1,14 @@ +[Unit] +Description=NGINX Unit +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +PIDFile=/var/run/unit.pid +EnvironmentFile=-/etc/default/unit +ExecStart=/usr/sbin/unitd-debug $DAEMON_ARGS +ExecReload= + +[Install] +WantedBy=multi-user.target diff --git a/pkg/docker/Dockerfile.go1.17 b/pkg/docker/Dockerfile.go1.17 index 2555cb23..e7443e8c 100644 --- a/pkg/docker/Dockerfile.go1.17 +++ b/pkg/docker/Dockerfile.go1.17 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.jsc11 b/pkg/docker/Dockerfile.jsc11 index 091ddf01..8e89fc22 100644 --- a/pkg/docker/Dockerfile.jsc11 +++ b/pkg/docker/Dockerfile.jsc11 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index 18c02898..36c9af1c 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.node16 b/pkg/docker/Dockerfile.node16 index 386d0c24..3b4a98e2 100644 --- a/pkg/docker/Dockerfile.node16 +++ b/pkg/docker/Dockerfile.node16 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.perl5.34 b/pkg/docker/Dockerfile.perl5.34 index 624a059c..cee1a829 100644 --- a/pkg/docker/Dockerfile.perl5.34 +++ b/pkg/docker/Dockerfile.perl5.34 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.php8.0 b/pkg/docker/Dockerfile.php8.0 index f3a1e10b..07290b74 100644 --- a/pkg/docker/Dockerfile.php8.0 +++ b/pkg/docker/Dockerfile.php8.0 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.python3.9 b/pkg/docker/Dockerfile.python3.9 index 87e807cc..22491edb 100644 --- a/pkg/docker/Dockerfile.python3.9 +++ b/pkg/docker/Dockerfile.python3.9 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/Dockerfile.ruby3.0 b/pkg/docker/Dockerfile.ruby3.0 index da4dd559..8da13e20 100644 --- a/pkg/docker/Dockerfile.ruby3.0 +++ b/pkg/docker/Dockerfile.ruby3.0 @@ -8,7 +8,7 @@ RUN set -ex \ && mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ && hg clone https://hg.nginx.org/unit \ && cd unit \ - && hg up 1.26.0 \ + && hg up 1.26.1 \ && 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)" \ diff --git a/pkg/docker/docker-entrypoint.sh b/pkg/docker/docker-entrypoint.sh index f455a958..59529925 100755 --- a/pkg/docker/docker-entrypoint.sh +++ b/pkg/docker/docker-entrypoint.sh @@ -24,7 +24,7 @@ if [ "$1" = "unitd" -o "$1" = "unitd-debug" ]; then 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/unitd --control unix:/var/run/control.unit.sock + /usr/sbin/$1 --control unix:/var/run/control.unit.sock while [ ! -S /var/run/control.unit.sock ]; do echo "$0: Waiting for control socket to be created..."; /bin/sleep 0.1; done # even when the control socket exists, it does not mean unit has finished initialisation diff --git a/pkg/rpm/rpmbuild/SOURCES/unit-debug.service b/pkg/rpm/rpmbuild/SOURCES/unit-debug.service new file mode 100644 index 00000000..2cef24fb --- /dev/null +++ b/pkg/rpm/rpmbuild/SOURCES/unit-debug.service @@ -0,0 +1,26 @@ +# Modifying this file in-place is not recommended, because changes +# will be overwritten during package upgrades. To customize the +# behaviour, run "systemctl edit unit-debug" to create an override unit. + +# For example, to change options given to the unitd binary at startup, +# create an override unit (as is done by systemctl edit) and enter +# the following: + +# [Service] +# Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /var/run/unit/unit.pid" + +[Unit] +Description=NGINX Unit +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /var/run/unit/unit.pid" +ExecStart=/usr/sbin/unitd-debug $UNITD_OPTIONS --no-daemon +ExecReload= +RuntimeDirectory=unit +RuntimeDirectoryMode=0755 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index b35b8998..f643b77f 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -39,8 +39,9 @@ Group: System Environment/Daemons Source0: unit-%{version}.tar.gz Source1: unit.service -Source2: unit.example.config -Source3: unit.logrotate +Source2: unit-debug.service +Source3: unit.example.config +Source4: unit.logrotate BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: systemd @@ -112,11 +113,11 @@ DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install %{__mkdir} -p %{buildroot}%{_localstatedir}/log/unit %{__mkdir} -p %{buildroot}%{_localstatedir}/run/unit %{__mkdir} -p %{buildroot}%{_sysconfdir}/logrotate.d -%{__install} -m 644 -p %{SOURCE3} \ +%{__install} -m 644 -p %{SOURCE4} \ %{buildroot}%{_sysconfdir}/logrotate.d/unit %{__mkdir} -p %{buildroot}%{_sysconfdir}/unit %{__mkdir} -p %{buildroot}%{_datadir}/doc/unit/examples -%{__install} -m 644 -p %{SOURCE2} \ +%{__install} -m 644 -p %{SOURCE3} \ %{buildroot}%{_datadir}/doc/unit/examples/example.config %{__install} -m 644 -p CHANGES \ %{buildroot}%{_datadir}/doc/unit/ @@ -127,6 +128,7 @@ DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install %{__rm} -rf %{buildroot}%{_initrddir}/ %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/unit.service +%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/unit-debug.service QA_SKIP_BUILD_ROOT=1 export QA_SKIP_BUILD_ROOT @@ -153,6 +155,7 @@ getent passwd unit >/dev/null || \ -d /nonexistent -c "unit user" unit if [ $1 -eq 1 ]; then /usr/bin/systemctl preset unit.service >/dev/null 2>&1 ||: + /usr/bin/systemctl preset unit-debug.service >/dev/null 2>&1 ||: cat <<BANNER ---------------------------------------------------------------------- @@ -200,6 +203,7 @@ BANNER %attr(0755,root,root) %{_sbindir}/unitd-debug %dir %{_sysconfdir}/unit %{_unitdir}/unit.service +%{_unitdir}/unit-debug.service %dir %attr(0755,root,root) %ghost %{_localstatedir}/run/unit %dir %{_datadir}/doc/unit %{_datadir}/doc/unit/* |