From 2fa59b25089bcaaa48781e636e58c4d6b184f49a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 14 Feb 2025 16:11:18 +0100 Subject: F42: workaround /usr/sbin merged in /usr/bin add unit-debug service F42: workaround /usr/sbin merged in /usr/bin add unit-debug service --- unit.spec | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'unit.spec') 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 - 1.34.1-2 +- F42: workaround /usr/sbin merged in /usr/bin +- add unit-debug service + * Mon Jan 13 2025 Remi Collet - 1.34.1-1 - update to 1.34.1 -- cgit