public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/icecream] rawhide: fix scriptlet errors when /etc/selinux/config is missing
Date: Wed, 29 Jul 2026 11:52:10 GMT	[thread overview]
Message-ID: <178532593073.1.3365180175148137918.rpms-icecream-eaf8335c1350@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/icecream
Branch : rawhide
Commit : eaf8335c135046d684dfad2d9e7842ca542c7077
Author : Michal Schmidt <mschmidt@redhat.com>
Date   : 2026-07-29T10:18:50+02:00
Stats  : +8/-6 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/icecream/c/eaf8335c135046d684dfad2d9e7842ca542c7077?branch=rawhide

Log:
fix scriptlet errors when /etc/selinux/config is missing

---
diff --git a/icecream.spec b/icecream.spec
index cf90e54..434836f 100644
--- a/icecream.spec
+++ b/icecream.spec
@@ -162,12 +162,14 @@ if [ -s /etc/selinux/config ]; then \
 fi;
 
 %define relabel() \
-. %{_sysconfdir}/selinux/config; \
-FILE_CONTEXT=%{_sysconfdir}/selinux/%1/contexts/files/file_contexts; \
-selinuxenabled; \
-if [ $? == 0  -a "${SELINUXTYPE}" == %1 -a -f ${FILE_CONTEXT}.%{name} ]; then \
-	fixfiles -C ${FILE_CONTEXT}.%{name} restore; \
-	rm -f ${FILE_CONTEXT}.%name; \
+if [ -s /etc/selinux/config ]; then \
+	. %{_sysconfdir}/selinux/config; \
+	FILE_CONTEXT=%{_sysconfdir}/selinux/%1/contexts/files/file_contexts; \
+	selinuxenabled; \
+	if [ $? == 0  -a "${SELINUXTYPE}" == %1 -a -f ${FILE_CONTEXT}.%{name} ]; then \
+		fixfiles -C ${FILE_CONTEXT}.%{name} restore; \
+		rm -f ${FILE_CONTEXT}.%name; \
+	fi \
 fi;
 
 install -m0644 -D fedora/icecream.sysusers.conf %{buildroot}%{_sysusersdir}/icecream.conf

                 reply	other threads:[~2026-07-29 11:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178532593073.1.3365180175148137918.rpms-icecream-eaf8335c1350@fedoraproject.org \
    --to=mschmidt@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox