Compare commits

...
Sign in to create a new pull request.

14 commits

Author SHA1 Message Date
Michal Schmidt
f4cd984193 use %sourcelist and refer to the source files by names
I always found having to reference them by numbers confusing.

[skip changelog]
2026-07-29 10:54:05 +02:00
Michal Schmidt
0127d0881e rename icecream-tmpfiles.conf to icecream.tmpfiles.conf
Similar pattern to icecream.sysusers.conf.

[skip changelog]
2026-07-29 10:47:29 +02:00
Michal Schmidt
6089a270b9 stop requiring findutils for %post
Drop the deleting of files owned by "icecream", which was the user name
used more than 10 years ago.
2026-07-29 10:23:36 +02:00
Michal Schmidt
eaf8335c13 fix scriptlet errors when /etc/selinux/config is missing 2026-07-29 10:18:50 +02:00
Michal Schmidt
77b9a5e98b add sysusers compatibility handling
This will be useful for EPEL 9.

[skip changelog]
2026-07-29 09:54:13 +02:00
Michal Schmidt
ec23c76e05 have the sysusers config as a source file
[skip changelog]
2026-07-29 09:53:25 +02:00
Michal Schmidt
979c2c27a6 remove ldconfig calls from scriptlets
These haven't been needed since Fedora 28.
https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets

[skip changelog]
2026-07-29 09:40:49 +02:00
Michal Schmidt
71114de270 create /var/cache/icecream using tmpfiles.d
in case someone deletes contents of /var/cache
2026-07-29 09:40:35 +02:00
Michal Schmidt
76b10da2d9 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]
2026-07-29 07:58:26 +02:00
Michal Schmidt
242a265725 update to v1.4 2026-07-28 16:45:37 +02:00
Fedora Release Engineering
195aae4c05 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 03:47:03 +00:00
Fedora Release Engineering
d3c40776ef Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 16:39:24 +00:00
Fedora Release Engineering
b33aa370bf Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 17:33:04 +00:00
866bf44a65 Add sysusers.d config file to allow rpm to create users/groups automatically
See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers.
2025-02-11 15:35:20 +01:00
6 changed files with 51 additions and 53 deletions

1
.gitignore vendored
View file

@ -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

View file

@ -1 +0,0 @@
d /run/icecc 0775 root icecc -

View file

@ -1,35 +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
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
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
BuildRequires: systemd systemd-rpm-macros
BuildRequires: libcap-ng-devel
BuildRequires: lzo-devel libzstd-devel libarchive-devel
BuildRequires: docbook2X
@ -39,11 +17,10 @@ BuildRequires: autoconf automake libtool
Requires: firewalld-filesystem
Requires: environment(modules)
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(post): findutils
%{?sysusers_requires_compat}
%if %{with selinux}
# For SELinux protection:
@ -60,6 +37,27 @@ 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
0003-Ignore-the-suse-directory.patch
0004-do-not-use-usr-bin-env.patch
# description copied from Debian icecc package
%description
@ -83,12 +81,14 @@ 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
cp -p %{_sourcedir}/icecream.{fc,te,if} SELinux
mkdir fedora
cp -p %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} 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,13 +126,13 @@ 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
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
@ -141,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
@ -164,29 +164,26 @@ 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
%pre
%sysusers_create_compat %{_sourcedir}/icecream.sysusers.conf
%if %{with selinux}
for selinuxvariant in %{selinux_variants}; do
%saveFileContext ${selinuxvariant}
done
%endif
getent group icecc >/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}
for selinuxvariant in %{selinux_variants}; do
semodule -s ${selinuxvariant} -i \
@ -211,8 +208,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
@ -232,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
@ -265,6 +259,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/

1
icecream.sysusers.conf Normal file
View file

@ -0,0 +1 @@
u icecc - 'Icecream distributed compiler' /var/cache/icecream -

2
icecream.tmpfiles.conf Normal file
View file

@ -0,0 +1,2 @@
d /run/icecc 0775 root icecc -
d /var/cache/icecream 0775 root icecc -

View file

@ -1 +1 @@
SHA512 (icecream-1.4rc1.tar.gz) = 0804e410387b60c9a4fd061cf12a47c8c9d1eb1eff3737ccc39874460a5e3223c0cb514992a7ace91dacd4b786ed50931948ac280889762815a593579fd0b8b0
SHA512 (icecream-1.4.tar.gz) = b77dd630c51b7b6b4d7fa06cd14a580891b974fe2d50074f7a3b129adc558fc7ce19b3a3716a6798c2fd0f7d0d3a1bc295bbedee3ed6dafa015f309c7c2590f5