Create /var/lib/dhcpcd directory through systemd-tmpfiles

Resolves: RHEL-111270
This commit is contained in:
Martin Osvald 2026-01-08 16:00:59 +01:00
parent 755741ca0f
commit f79e1c010b
2 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ Source2: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xa785ed2755955d9
Source3: %{name}.service
Source4: %{name}@.service
Source5: systemd-sysusers.conf
Source6: systemd-tmpfiles.conf
Patch1: dhcpcd-RHEL-72083.patch
BuildRequires: gcc
@ -57,6 +58,7 @@ find %{buildroot} -name '*.la' -delete -print
install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
install -D -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}@.service
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysusersdir}/%{name}.conf
install -D -m 644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -d %{buildroot}%{_sharedstatedir}/%{_name}
%pre
@ -88,6 +90,7 @@ install -d %{buildroot}%{_sharedstatedir}/%{_name}
%{_mandir}/man8/%{name}.8.gz
%{_sbindir}/%{name}
%{_sysusersdir}/%{name}.conf
%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.service
%defattr(0644,root,dhcpcd,0755)

1
systemd-tmpfiles.conf Normal file
View File

@ -0,0 +1 @@
d /var/lib/dhcpcd 0755 root dhcpcd -