summaryrefslogtreecommitdiffstats
path: root/unit.spec
diff options
context:
space:
mode:
Diffstat (limited to 'unit.spec')
-rw-r--r--unit.spec17
1 files changed, 13 insertions, 4 deletions
diff --git a/unit.spec b/unit.spec
index 0aab43a..5ec0d57 100644
--- a/unit.spec
+++ b/unit.spec
@@ -23,7 +23,7 @@
Name: unit
Summary: NGINX Unit application server
Version: 1.34.1
-Release: 1%{?dist}
+Release: 2%{?dist}
# unit is Apache-2.0
# rust libraries are Apache-2.0 or MIT
License: Apache-2.0 AND MIT
@@ -31,7 +31,7 @@ URL: https://unit.nginx.org/
Source0: https://github.com/%{gh_owner}/%{project}/archive/%{gh_commit}/%{project}-%{version}-%{gh_short}.tar.gz
Source1: unit.service
-Source2: unit.init
+Source2: unit-debug.service
Source3: unit.sysconf
Source4: unit.logrotate
# awfull hack, use a bundled rust registry
@@ -126,6 +126,7 @@ grep -h rust-version mycargo/*/Cargo.toml src/otel/Cargo.toml | sort -u | tail -
unitconf() {
./configure \
--libdir=%{_libdir} \
+ --sbindir=%{_sbindir} \
--prefix=%{_prefix} \
--statedir=%{_sharedstatedir}/unit \
--control="unix:/run/unit/control.sock" \
@@ -182,7 +183,10 @@ install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# init scripts
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
+install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-debug.service
mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d
+# relocate when sbindir is /usr/bin
+sed -e 's:/usr/sbin:%{_sbindir}:' -i %{buildroot}%{_unitdir}/*.service
%if %{with wasm}
mkdir -p %{buildroot}%{_includedir}/unit/
@@ -245,8 +249,9 @@ BANNER
%{_mandir}/man8/unitd.8*
%dir %{_sysconfdir}/systemd/system/%{name}.service.d
-%{_unitdir}/unit.service
-%dir %attr(0755,root,root) %ghost /run/unit
+%{_unitdir}/%{name}.service
+%{_unitdir}/%{name}-debug.service
+%dir %attr(0755,root,root) %ghost /run/%{name}
%files devel
@@ -263,6 +268,10 @@ BANNER
%changelog
+* Fri Feb 14 2025 Remi Collet <remi@remirepo.net> - 1.34.1-2
+- F42: workaround /usr/sbin merged in /usr/bin
+- add unit-debug service
+
* Mon Jan 13 2025 Remi Collet <remi@remirepo.net> - 1.34.1-1
- update to 1.34.1