summaryrefslogtreecommitdiffstats
path: root/php82.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-06-05 12:00:34 +0200
committerRemi Collet <remi@php.net>2026-06-05 12:00:34 +0200
commit8f9cc355dfcefef7798ebcef2ddbe039599af57b (patch)
treea308cfac5dd82c6646151dce8fb60fe2c96090d3 /php82.spec
parent8313b9705cd0fa57535502f4230d1b720cd8d1e2 (diff)
workaround for selinux context on /var/optHEADmaster
https://github.com/remicollet/remirepo/issues/323
Diffstat (limited to 'php82.spec')
-rw-r--r--php82.spec12
1 files changed, 10 insertions, 2 deletions
diff --git a/php82.spec b/php82.spec
index 4835063..8d6fc27 100644
--- a/php82.spec
+++ b/php82.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php82 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
#
@@ -21,7 +21,7 @@
Summary: Package that installs PHP 8.2
Name: %scl_name
Version: 8.2
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPL-2.0-or-later
Source0: macros-build
@@ -54,6 +54,7 @@ that install PHP 8.2 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
@@ -211,6 +212,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 || :
@@ -252,6 +256,10 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%changelog
+* Fri Jun 5 2026 Remi Collet <remi@remirepo.net> 8.2-7
+- workaround for selinux context on /var/opt
+ https://github.com/remicollet/remirepo/issues/323
+
* Fri Feb 14 2025 Remi Collet <remi@remirepo.net> 8.2-6
- F42: fix dependencies
- re-license spec file to CECILL-2.1