From 866bf44a65f9146eb583b7fbdd98ab68c88b9b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 15:35:20 +0100 Subject: [PATCH 01/14] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. --- icecream.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/icecream.spec b/icecream.spec index 0b3bc49..aef219f 100644 --- a/icecream.spec +++ b/icecream.spec @@ -39,7 +39,6 @@ BuildRequires: autoconf automake libtool Requires: firewalld-filesystem Requires: environment(modules) -Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -90,6 +89,11 @@ cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux mkdir fedora cp -p %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} fedora +# Create a sysusers.d config file +cat >icecream.sysusers.conf </dev/null || groupadd -r icecc -getent passwd icecc >/dev/null || \ - useradd -r -g icecc -d %{_localstatedir}/cache/icecream \ - -s /sbin/nologin -c "Icecream distributed compiler" icecc -exit 0 - %post /sbin/ldconfig %if %{with selinux} @@ -265,6 +264,7 @@ exit 0 %{?with_selinux:%{_datadir}/selinux/*/icecream.pp} %{_prefix}/lib/firewalld/services/icecream.xml %{_prefix}/lib/firewalld/services/icecream-scheduler.xml +%{_sysusersdir}/icecream.conf %files devel %dir %{_includedir}/icecc/ From b33aa370bf7af08a00eb1389f8a58c7a0cdfa804 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:33:04 +0000 Subject: [PATCH 02/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From d3c40776ef5d5b49eca7714ed4bda483debbdb76 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 16:39:24 +0000 Subject: [PATCH 03/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 195aae4c053aa517d6044ef46c552efb4441ea7a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jul 2026 03:47:03 +0000 Subject: [PATCH 04/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From 242a265725d5d09996ec06f9ba767fb8dc3cf58b Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 13 Feb 2025 13:03:34 +0100 Subject: [PATCH 05/14] update to v1.4 --- .gitignore | 1 + icecream.spec | 18 ++++++++---------- sources | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 798a575..c6a276a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ icecream-manpages.tar.bz2 /icecream-1.2.tar.gz /icecream-1.3.tar.gz /icecream-1.4rc1.tar.gz +/icecream-1.4.tar.gz diff --git a/icecream.spec b/icecream.spec index aef219f..d09ecef 100644 --- a/icecream.spec +++ b/icecream.spec @@ -1,16 +1,13 @@ %global _hardened_build 1 %bcond_without selinux -%global preversion rc1 - Name: icecream Version: 1.4 -Release: %autorelease -p -e %{preversion} +Release: %autorelease Summary: Distributed compiler -# Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later URL: https://github.com/icecc/icecream -Source0: https://github.com/icecc/%{name}/archive/%{version}%{preversion}.tar.gz#/%{name}-%{version}%{preversion}.tar.gz +Source0: https://github.com/icecc/icecream/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: fedora-sysconfig.icecream Source2: icecream.module.in Source3: icecream.fc @@ -23,10 +20,6 @@ Source10: icecc-scheduler-wrapper Source11: icecream-tmpfiles.conf Source12: icecream.xml Source13: icecream-scheduler.xml -Patch1: 0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch -Patch2: 0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch -Patch3: 0003-Ignore-the-suse-directory.patch -Patch4: 0004-do-not-use-usr-bin-env.patch BuildRequires: gcc-c++ BuildRequires: systemd @@ -59,6 +52,11 @@ Requires: selinux-policy >= %{selinux_policyver} %define selinux_variants mls strict targeted %endif +%patchlist +0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch +0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch +0003-Ignore-the-suse-directory.patch +0004-do-not-use-usr-bin-env.patch # description copied from Debian icecc package %description @@ -82,7 +80,7 @@ Requires: libarchive-devel%{?_isa} This package contains development files for %{name}. %prep -%autosetup -p1 -n %{name}-%{version}%{preversion} +%autosetup -p1 -n %{name}-%{version} mkdir SELinux cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux diff --git a/sources b/sources index 586d5ec..fad0fad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (icecream-1.4rc1.tar.gz) = 0804e410387b60c9a4fd061cf12a47c8c9d1eb1eff3737ccc39874460a5e3223c0cb514992a7ace91dacd4b786ed50931948ac280889762815a593579fd0b8b0 +SHA512 (icecream-1.4.tar.gz) = b77dd630c51b7b6b4d7fa06cd14a580891b974fe2d50074f7a3b129adc558fc7ce19b3a3716a6798c2fd0f7d0d3a1bc295bbedee3ed6dafa015f309c7c2590f5 From 76b10da2d9f021c1be36817647b0aa42ffd091c5 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 07:58:26 +0200 Subject: [PATCH 06/14] leave _hardened_build at default It has been enabled for all packages since Fedora 23. https://fedoraproject.org/wiki/Changes/Harden_All_Packages [skip changelog] --- icecream.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/icecream.spec b/icecream.spec index d09ecef..607fd67 100644 --- a/icecream.spec +++ b/icecream.spec @@ -1,4 +1,3 @@ -%global _hardened_build 1 %bcond_without selinux Name: icecream From 71114de2703243f7789e4d75d24ef5de3b5b8617 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 09:40:35 +0200 Subject: [PATCH 07/14] create /var/cache/icecream using tmpfiles.d in case someone deletes contents of /var/cache --- icecream-tmpfiles.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/icecream-tmpfiles.conf b/icecream-tmpfiles.conf index 7f7ef39..dc78a65 100644 --- a/icecream-tmpfiles.conf +++ b/icecream-tmpfiles.conf @@ -1 +1,2 @@ d /run/icecc 0775 root icecc - +d /var/cache/icecream 0775 root icecc - From 979c2c27a6ee62138d516b205ea952db3408b996 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 09:00:04 +0200 Subject: [PATCH 08/14] remove ldconfig calls from scriptlets These haven't been needed since Fedora 28. https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets [skip changelog] --- icecream.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/icecream.spec b/icecream.spec index 607fd67..7e66038 100644 --- a/icecream.spec +++ b/icecream.spec @@ -182,7 +182,6 @@ for selinuxvariant in %{selinux_variants}; do done %endif %post -/sbin/ldconfig %if %{with selinux} for selinuxvariant in %{selinux_variants}; do semodule -s ${selinuxvariant} -i \ @@ -228,7 +227,6 @@ fi exit 0 %postun -/sbin/ldconfig %systemd_postun_with_restart iceccd.service icecc-scheduler.service %if %{with selinux} if [ $1 -eq 0 ]; then # Final removal From ec23c76e0583b34b51c950b66cbb4f078b72564b Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 09:45:51 +0200 Subject: [PATCH 09/14] have the sysusers config as a source file [skip changelog] --- icecream.spec | 10 +++------- icecream.sysusers.conf | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 icecream.sysusers.conf diff --git a/icecream.spec b/icecream.spec index 7e66038..50abc86 100644 --- a/icecream.spec +++ b/icecream.spec @@ -19,6 +19,7 @@ Source10: icecc-scheduler-wrapper Source11: icecream-tmpfiles.conf Source12: icecream.xml Source13: icecream-scheduler.xml +Source14: icecream.sysusers.conf BuildRequires: gcc-c++ BuildRequires: systemd @@ -84,12 +85,7 @@ This package contains development files for %{name}. mkdir SELinux cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux mkdir fedora -cp -p %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} fedora - -# Create a sysusers.d config file -cat >icecream.sysusers.conf < Date: Wed, 29 Jul 2026 09:35:07 +0200 Subject: [PATCH 10/14] add sysusers compatibility handling This will be useful for EPEL 9. [skip changelog] --- icecream.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/icecream.spec b/icecream.spec index 50abc86..cf90e54 100644 --- a/icecream.spec +++ b/icecream.spec @@ -22,7 +22,7 @@ Source13: icecream-scheduler.xml Source14: icecream.sysusers.conf BuildRequires: gcc-c++ -BuildRequires: systemd +BuildRequires: systemd systemd-rpm-macros BuildRequires: libcap-ng-devel BuildRequires: lzo-devel libzstd-devel libarchive-devel BuildRequires: docbook2X @@ -36,6 +36,7 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires(post): findutils +%{?sysusers_requires_compat} %if %{with selinux} # For SELinux protection: @@ -172,6 +173,7 @@ fi; install -m0644 -D fedora/icecream.sysusers.conf %{buildroot}%{_sysusersdir}/icecream.conf %pre +%sysusers_create_compat %{SOURCE14} %if %{with selinux} for selinuxvariant in %{selinux_variants}; do %saveFileContext ${selinuxvariant} From eaf8335c135046d684dfad2d9e7842ca542c7077 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 10:18:50 +0200 Subject: [PATCH 11/14] fix scriptlet errors when /etc/selinux/config is missing --- icecream.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 From 6089a270b92fe9129c46431e0285beef6bd8a1b4 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 10:23:36 +0200 Subject: [PATCH 12/14] stop requiring findutils for %post Drop the deleting of files owned by "icecream", which was the user name used more than 10 years ago. --- icecream.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/icecream.spec b/icecream.spec index 434836f..91c0996 100644 --- a/icecream.spec +++ b/icecream.spec @@ -35,7 +35,6 @@ Requires: environment(modules) Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -Requires(post): findutils %{?sysusers_requires_compat} %if %{with selinux} @@ -206,8 +205,6 @@ restorecon -R %{_localstatedir}/cache/icecream /run/icecc 2>/dev/null %firewalld_reload %systemd_post iceccd.service icecc-scheduler.service -# Remove files owned by the user 'icecream' (used by older versions). -find %{_localstatedir}/cache/icecream/ -user icecream -delete 2>/dev/null exit 0 %preun From 0127d0881ec25c59616ecf175b19a89affc29b51 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 10:47:29 +0200 Subject: [PATCH 13/14] rename icecream-tmpfiles.conf to icecream.tmpfiles.conf Similar pattern to icecream.sysusers.conf. [skip changelog] --- icecream.spec | 4 ++-- icecream-tmpfiles.conf => icecream.tmpfiles.conf | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename icecream-tmpfiles.conf => icecream.tmpfiles.conf (100%) diff --git a/icecream.spec b/icecream.spec index 91c0996..dd3dc4c 100644 --- a/icecream.spec +++ b/icecream.spec @@ -16,7 +16,7 @@ Source6: iceccd.service Source7: icecc-scheduler.service Source9: iceccd-wrapper Source10: icecc-scheduler-wrapper -Source11: icecream-tmpfiles.conf +Source11: icecream.tmpfiles.conf Source12: icecream.xml Source13: icecream-scheduler.xml Source14: icecream.sysusers.conf @@ -123,7 +123,7 @@ install -d -m 755 %{buildroot}/%{_unitdir} install -p -m 644 fedora/*.service %{buildroot}/%{_unitdir} install -p -m 755 fedora/*-wrapper %{buildroot}/%{_libexecdir}/icecc mkdir -p %{buildroot}%{_tmpfilesdir} -install -p -m 644 fedora/icecream-tmpfiles.conf %{buildroot}/%{_tmpfilesdir}/icecream.conf +install -p -m 644 fedora/icecream.tmpfiles.conf %{buildroot}/%{_tmpfilesdir}/icecream.conf install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d install -m644 -p -D %{SOURCE12} %{buildroot}%{_prefix}/lib/firewalld/services/icecream.xml diff --git a/icecream-tmpfiles.conf b/icecream.tmpfiles.conf similarity index 100% rename from icecream-tmpfiles.conf rename to icecream.tmpfiles.conf From f4cd9841932634b201f6d7b9cf11c04dedd37220 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 29 Jul 2026 10:54:05 +0200 Subject: [PATCH 14/14] use %sourcelist and refer to the source files by names I always found having to reference them by numbers confusing. [skip changelog] --- icecream.spec | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/icecream.spec b/icecream.spec index dd3dc4c..9cae838 100644 --- a/icecream.spec +++ b/icecream.spec @@ -6,21 +6,6 @@ Release: %autorelease Summary: Distributed compiler License: GPL-2.0-or-later URL: https://github.com/icecc/icecream -Source0: https://github.com/icecc/icecream/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: fedora-sysconfig.icecream -Source2: icecream.module.in -Source3: icecream.fc -Source4: icecream.te -Source5: icecream.if -Source6: iceccd.service -Source7: icecc-scheduler.service -Source9: iceccd-wrapper -Source10: icecc-scheduler-wrapper -Source11: icecream.tmpfiles.conf -Source12: icecream.xml -Source13: icecream-scheduler.xml -Source14: icecream.sysusers.conf - BuildRequires: gcc-c++ BuildRequires: systemd systemd-rpm-macros BuildRequires: libcap-ng-devel @@ -52,6 +37,22 @@ Requires: selinux-policy >= %{selinux_policyver} %define selinux_variants mls strict targeted %endif +%sourcelist +https://github.com/icecc/icecream/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +fedora-sysconfig.icecream +icecream.module.in +icecream.fc +icecream.te +icecream.if +iceccd.service +icecc-scheduler.service +iceccd-wrapper +icecc-scheduler-wrapper +icecream.tmpfiles.conf +icecream.xml +icecream-scheduler.xml +icecream.sysusers.conf + %patchlist 0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch 0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch @@ -83,9 +84,11 @@ This package contains development files for %{name}. %autosetup -p1 -n %{name}-%{version} mkdir SELinux -cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux +cp -p %{_sourcedir}/icecream.{fc,te,if} SELinux mkdir fedora -cp -p %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} %{SOURCE14} fedora +cp -p %{_sourcedir}/{iceccd,icecc-scheduler}.service fedora +cp -p %{_sourcedir}/{iceccd,icecc-scheduler}-wrapper fedora +cp -p %{_sourcedir}/icecream.{tmpfiles,sysusers}.conf fedora %build ./autogen.sh @@ -126,10 +129,10 @@ mkdir -p %{buildroot}%{_tmpfilesdir} install -p -m 644 fedora/icecream.tmpfiles.conf %{buildroot}/%{_tmpfilesdir}/icecream.conf install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d -install -m644 -p -D %{SOURCE12} %{buildroot}%{_prefix}/lib/firewalld/services/icecream.xml -install -m644 -p -D %{SOURCE13} %{buildroot}%{_prefix}/lib/firewalld/services/icecream-scheduler.xml +install -m644 -p -D %{_sourcedir}/icecream.xml %{buildroot}%{_prefix}/lib/firewalld/services/icecream.xml +install -m644 -p -D %{_sourcedir}/icecream-scheduler.xml %{buildroot}%{_prefix}/lib/firewalld/services/icecream-scheduler.xml -install -D -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/icecream +install -D -m 644 %{_sourcedir}/fedora-sysconfig.icecream %{buildroot}/%{_sysconfdir}/sysconfig/icecream # create default working dir mkdir -p %{buildroot}/%{_localstatedir}/cache/icecream @@ -138,7 +141,7 @@ mkdir -p %{buildroot}/run/icecc/ # Make the environment-modules file mkdir -p %{buildroot}%{_modulesdir}/icecream -sed 's#@LIBEXECDIR@#%{_libexecdir}#' < %{SOURCE2} > %{buildroot}%{_modulesdir}/icecream/icecc +sed 's#@LIBEXECDIR@#%{_libexecdir}#' < %{_sourcedir}/icecream.module.in > %{buildroot}%{_modulesdir}/icecream/icecc %if %{with selinux} for selinuxvariant in %{selinux_variants}; do @@ -174,7 +177,7 @@ fi; install -m0644 -D fedora/icecream.sysusers.conf %{buildroot}%{_sysusersdir}/icecream.conf %pre -%sysusers_create_compat %{SOURCE14} +%sysusers_create_compat %{_sourcedir}/icecream.sysusers.conf %if %{with selinux} for selinuxvariant in %{selinux_variants}; do %saveFileContext ${selinuxvariant}