Add tmpfiles.d mechanism entries. Resolves: rhbz#2047969

This commit is contained in:
Sokratis Zappis 2023-01-12 00:30:12 +02:00
parent 6c9054c2fc
commit 01c541f9f6
2 changed files with 23 additions and 3 deletions

2
mod_jk-part.conf Normal file
View File

@ -0,0 +1,2 @@
d /run/mod_jk 0755 root root -
f /run/mod_jk.pid 0755 root root -

View File

@ -30,7 +30,7 @@
# Update commitid and serial when new sources and release version are available
%global commitid 1c14fc065bc133887fdde55cab954691b3dc3aac
%global serial 22
%global serial 23
Name: mod_jk
Epoch: 0
@ -45,6 +45,7 @@ Source0: tomcat-connectors-%{commitid}.tar.gz
Source1: %{pkg_name}.conf.sample
Source2: uriworkermap.properties.sample
Source3: workers.properties.sample
Source4: %{pkg_name}-part.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -60,6 +61,7 @@ BuildRequires: java-devel >= 1.6.0
BuildRequires: jpackage-utils >= 0:1.5.38
BuildRequires: libtool
BuildRequires: xalan-j2 >= 2.7.0
BuildRequires: systemd
Obsoletes: mod_jk-ap24 < 0:1.2.48-21
%description
@ -120,6 +122,13 @@ popd
%define aprincludes %(%{aprconf} --includes 2>/dev/null)
%{__rm} -rf $RPM_BUILD_ROOT
# bz#2047969 start
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -d -m 0755 %{buildroot}%{_rundir}/%{name}/
touch %{buildroot}%{_rundir}/%{name}.pid
chmod 0755 %{buildroot}%{_rundir}/%{name}.pid
# bz#2047969 end
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
%{__sed} -i -e 's|/usr/local/bin\b|%{_bindir}|' tools/reports/*.pl
@ -129,7 +138,7 @@ command="s|/usr/local/bin\b|%{_bindir}|"
%{__install} -p -m 0755 native/apache-2.0/%{pkg_name}.so \
${RPM_BUILD_ROOT}/%{aplibdir}/%{pkg_name}.so
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{_bindir}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{_var}/run/%{name}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_rundir}/%{name}
%{__install} -d -m 0700 ${RPM_BUILD_ROOT}/%{_var}/cache/httpd/%{name}
# for tools
@ -147,8 +156,12 @@ command="s|/usr/local/bin\b|%{_bindir}|"
%doc native/LICENSE native/NOTICE native/README.txt
%{aplibdir}/*
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*
%dir %{_var}/run/%{name}
%attr(0700,apache,apache) %dir %{_var}/cache/httpd/%{name}
# bz#2047969 start
%dir %{_rundir}/%{name}/
%verify(not size mtime md5) %{_rundir}/%{name}.pid
%{_tmpfilesdir}/%{name}.conf
# bz#2047969 end
%if %with tools
%files tools
@ -158,6 +171,11 @@ command="s|/usr/local/bin\b|%{_bindir}|"
%endif
%changelog
* Thu Jan 12 2023 Sokratis Zappis <szappis@rehdat.com> - 1.2.48-23
- Add entries for tmpfiles.d mechanism
- Remove /var/run legacy location
- Resolves: rhbz#2047969
* Tue Aug 24 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-22
- Specifying exact NVR in Obsoletes to avoid conflict with -ap24 subpackage
- Resolves: #1963135