!47 add ExecStartPost option to restorecond.service

From: @panxh_purple 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2022-08-09 07:47:14 +00:00 committed by Gitee
commit 738a48aaaf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,29 @@
From 6f7b8340fa9e8e1ca8d6b0a27a5b1c9a27cf4a85 Mon Sep 17 00:00:00 2001
From: panxiaohe <panxh.life@foxmail.com>
Date: Thu, 4 Aug 2022 17:01:38 +0800
Subject: [PATCH] add ExecStartPost option to restorecond.service
Add ExecStartPost option to restorecond.service in order not
to display the following message when starting restorecond.
"Can't open PID file /run/restorecond.pid (yet?) after start:
No such file or directory"
---
restorecond-3.1/restorecond.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/restorecond-3.1/restorecond.service b/restorecond-3.1/restorecond.service
index 0e4ea72..b3a8693 100644
--- a/restorecond-3.1/restorecond.service
+++ b/restorecond-3.1/restorecond.service
@@ -7,6 +7,7 @@ ConditionSecurity=selinux
[Service]
Type=forking
ExecStart=/usr/sbin/restorecond
+ExecStartPost=/usr/bin/sleep 0.1
PIDFile=/run/restorecond.pid
[Install]
--
2.27.0

View File

@ -3,7 +3,7 @@
Name: policycoreutils
Version: 3.1
Release: 7
Release: 8
Summary: Policy core utilities of selinux
License: GPLv2
URL: https://github.com/SELinuxProject
@ -21,6 +21,7 @@ Source11: selinux-autorelabel-generator.sh
Patch0: fix-fixfiles-N-date-function.patch
Patch1: fix-fixfiles-N-date-function-two.patch
Patch2: add-ExecStartPost-option-to-restorecond-service.patch
BuildRequires: gcc
BuildRequires: pam-devel libsepol-static >= 3.1 libsemanage-static >= 3.1 libselinux-devel >= 3.1 libcap-devel audit-libs-devel gettext
@ -266,6 +267,9 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \
%{_mandir}/*
%changelog
* Tue Aug 9 2022 panxiaohe <panxh.life@foxmail.com> - 3.1-8
- add ExecStartPost option to restorecond.service
* Fri Jun 4 2021 panxiaohe <panxiaohe@huawei.com> - 3.1-7
- add gcc to BuildRequires
- fix fixfiles -N date function
@ -276,7 +280,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \
* Tue Dec 1 2020 Liquor <lirui130@huawei.com> - 3.1-5
- add the necessary version dependencies
* Tue Nov 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.1-4
* Mon Nov 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.1-4
- add version require of libsepol
* Tue Nov 17 2020 Hugel <gengqihu1@huawei.com> - 3.1-3