Fix service error message due to selinux policy mismatch

(cherry picked from commit 7012eecf35d0a8bcb4b0f385ca8afab223f86df8)
This commit is contained in:
wang--ge 2024-01-05 17:20:09 +08:00 committed by openeuler-sync-bot
parent c91b647900
commit 14575c1826

View File

@ -22,7 +22,7 @@
Name: proftpd Name: proftpd
Version: 1.3.8b Version: 1.3.8b
Release: 2 Release: 3
Summary: Flexible, stable and highly-configurable FTP server Summary: Flexible, stable and highly-configurable FTP server
License: GPLv2+ License: GPLv2+
URL: http://www.proftpd.org/ URL: http://www.proftpd.org/
@ -110,6 +110,8 @@ Requires(preun): chkconfig, initscripts
Requires(postun): initscripts Requires(postun): initscripts
%endif %endif
Requires: coreutils
Provides: ftpserver Provides: ftpserver
%description %description
@ -360,6 +362,10 @@ fi
%endif %endif
%post %post
if [ ! -f /var/run/proftpd/proftpd.delay ]; then
touch /var/run/proftpd/proftpd.delay
fi
chcon -t user_home_t /var/run/proftpd/proftpd.delay
%if %{use_systemd} %if %{use_systemd}
systemctl daemon-reload &>/dev/null || : systemctl daemon-reload &>/dev/null || :
%endif %endif
@ -383,6 +389,7 @@ fi
%preun %preun
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
# Package removal, not upgrade # Package removal, not upgrade
rm -rf /var/run/proftpd/proftpd.delay
%if %{use_systemd} %if %{use_systemd}
systemctl --no-reload disable proftpd.service &>/dev/null || : systemctl --no-reload disable proftpd.service &>/dev/null || :
systemctl stop proftpd.service &>/dev/null || : systemctl stop proftpd.service &>/dev/null || :
@ -535,6 +542,9 @@ fi
%{_mandir}/man1/ftpwho.1* %{_mandir}/man1/ftpwho.1*
%changelog %changelog
* Fri Jan 05 2024 Ge Wang <wang__ge@126.com> - 1.3.8b-3
- Fix service error message due to selinux policy mismatch
* Fri Dec 29 2023 wangkai <13474090681@163.com> - 1.3.8b-2 * Fri Dec 29 2023 wangkai <13474090681@163.com> - 1.3.8b-2
- Adjust patch number - Adjust patch number