public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schmidt <michich@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/icecream] epel8: - Create the logfile for the scheduler in the initscript.
Date: Fri, 31 Jul 2026 06:33:40 GMT	[thread overview]
Message-ID: <178547962002.1.14864592863143563370.rpms-icecream-c36f75cb4a2f@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/icecream
            Branch : epel8
            Commit : c36f75cb4a2fa662849f7e7503a31e66088cdcce
            Author : Michal Schmidt <michich@fedoraproject.org>
            Date   : 2009-08-14T12:51:28+00:00
            Stats  : +19/-7 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/icecream/c/c36f75cb4a2fa662849f7e7503a31e66088cdcce?branch=epel8

            Log:
            - Create the logfile for the scheduler in the initscript.
- Allow the scheduler to write to the log in the SELinux policy
    (BZ#517251).

---
diff --git a/icecream.fc b/icecream.fc
index aac0f3b..808cfcc 100644
--- a/icecream.fc
+++ b/icecream.fc
@@ -3,3 +3,4 @@
 /var/cache/icecream(/.*)?			gen_context(system_u:object_r:iceccd_cache_t,s0)
 /var/log/iceccd				--	gen_context(system_u:object_r:iceccd_log_t,s0)
 /usr/sbin/icecc-scheduler		--	gen_context(system_u:object_r:icecc_scheduler_exec_t,s0)
+/var/log/icecc[-_]scheduler		--	gen_context(system_u:object_r:icecc_scheduler_log_t,s0)

diff --git a/icecream.spec b/icecream.spec
index 3c820a6..950eca3 100644
--- a/icecream.spec
+++ b/icecream.spec
@@ -11,7 +11,7 @@
 
 Name:		icecream
 Version:	0.9.4
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Distributed compiler
 
 Group:		Development/Tools
@@ -233,6 +233,10 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/icecc.pc
 
 %changelog
+* Fri Aug 14 2009 Michal Schmidt <mschmidt@redhat.com> 0.9.4-3
+- Create the logfile for the scheduler in the initscript.
+- Allow the scheduler to write to the log in the SELinux policy (BZ#517251).
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 

diff --git a/icecream.te b/icecream.te
index b16b880..9548436 100644
--- a/icecream.te
+++ b/icecream.te
@@ -41,6 +41,9 @@ type icecc_scheduler_t;
 type icecc_scheduler_exec_t;
 init_daemon_domain(icecc_scheduler_t, icecc_scheduler_exec_t)
 
+type icecc_scheduler_log_t;
+logging_log_file(icecc_scheduler_log_t)
+
 ########################################
 #
 # iceccd_untrusted declarations
@@ -188,6 +191,9 @@ can_exec(iceccd_untrusted_t, iceccd_cache_t)
 allow icecc_scheduler_t self:tcp_socket create_stream_socket_perms;
 allow icecc_scheduler_t self:udp_socket create_socket_perms;
 
+manage_files_pattern(icecc_scheduler_t, icecc_scheduler_log_t, icecc_scheduler_log_t)
+logging_log_filetrans(icecc_scheduler_t, icecc_scheduler_log_t, file)
+
 corenet_all_recvfrom_unlabeled(icecc_scheduler_t)
 corenet_all_recvfrom_netlabel(icecc_scheduler_t)
 corenet_tcp_sendrecv_generic_if(icecc_scheduler_t)

diff --git a/initscript-scheduler b/initscript-scheduler
index b39770d..595a12e 100644
--- a/initscript-scheduler
+++ b/initscript-scheduler
@@ -30,15 +30,16 @@ start() {
 	[ -x $exec ] || exit 5
 	[ -f $config ] || exit 6
 	echo -n $"Starting distributed compiler scheduler: "
-	params=""
+	netname=
 	if [ -n "$ICECREAM_NETNAME" ] ; then
-		params="$params -n $ICECREAM_NETNAME"
+		netname="-n $ICECREAM_NETNAME"
 	fi
 	logfile=${ICECREAM_SCHEDULER_LOG_FILE:-/var/log/icecc-scheduler}
-	params="$params -l $logfile"
-#	touch "$logfile"
-#	chown icecream:icecream $logfile
-	daemon --user icecream --check $service $exec -d $params
+	touch "$logfile"
+	chown icecream:icecream "$logfile"
+	chmod 0640 "$logfile"
+	[ -x /sbin/restorecon ] && /sbin/restorecon "$logfile"
+	daemon --user icecream --check $service $exec -d -l "$logfile" $netname
 	RETVAL=$?
 	echo
 	[ $RETVAL -eq 0 ] && touch $lockfile

                 reply	other threads:[~2026-07-31  6:33 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=178547962002.1.14864592863143563370.rpms-icecream-c36f75cb4a2f@fedoraproject.org \
    --to=michich@fedoraproject.org \
    --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