summaryrefslogtreecommitdiffstats
path: root/php85.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-06-05 11:41:05 +0200
committerRemi Collet <remi@php.net>2026-06-05 11:41:05 +0200
commit2a1550bca7ba917ba7a2d72943baa4804c2856b1 (patch)
treef171f185aa7c7b4b04803ea36ea90e13e64a6124 /php85.spec
parentd5521aad1609621c9ade145713917a4e01858786 (diff)
workaround for selinux context on /var/optHEADmaster
https://github.com/remicollet/remirepo/issues/323
Diffstat (limited to 'php85.spec')
-rw-r--r--php85.spec12
1 files changed, 10 insertions, 2 deletions
diff --git a/php85.spec b/php85.spec
index ea55180..9805b04 100644
--- a/php85.spec
+++ b/php85.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php85 SCL metapackage
#
-# SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2018-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -22,7 +22,7 @@
Summary: Package that installs PHP %{scl_name_verdot}
Name: %{scl_name}
Version: %{scl_name_verdot}
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL-2.0-or-later
Source0: macros-build
@@ -55,6 +55,7 @@ that install PHP %{scl_name_verdot} language.
Summary: Package that handles %scl Software Collection.
Requires: scl-utils
Requires: environment-modules
+Requires(post): %{_root_bindir}/grep
Requires(post): %{_root_sbindir}/semanage
%if 0%{?fedora} >= 42 || 0%{?rhel} >= 11
Requires(post): %{_root_bindir}/selinuxenabled
@@ -212,6 +213,9 @@ ln -s %{_mandir}/man1/php-cgi.1.gz %{buildroot}%{_root_mandir}/man1/php-cgi.1.gz
semanage fcontext -a -e / %{?_scl_root} &>/dev/null || :
semanage fcontext -a -e %{_root_sysconfdir} %{_sysconfdir} &>/dev/null || :
semanage fcontext -a -e %{_root_localstatedir} %{_localstatedir} &>/dev/null || :
+grep -q '^%{_localstatedir}' /etc/selinux/targeted/contexts/files/file_contexts.subs \
+ || echo "%{_localstatedir} %{_root_localstatedir}" >>/etc/selinux/targeted/contexts/files/file_contexts.subs \
+ || :
selinuxenabled && load_policy || :
restorecon -R %{?_scl_root} &>/dev/null || :
restorecon -R %{_sysconfdir} &>/dev/null || :
@@ -253,6 +257,10 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%changelog
+* Fri Jun 5 2026 Remi Collet <remi@remirepo.net> 8.5-2
+- workaround for selinux context on /var/opt
+ https://github.com/remicollet/remirepo/issues/323
+
* Mon Jun 30 2025 Remi Collet <remi@remirepo.net> 8.5-1
- initial package for 8.5