|
|
2e6f2a4 |
%if 0%{?fedora}
|
|
|
2e6f2a4 |
%bcond_without fedora
|
|
|
d592b35 |
%bcond_without selinux
|
|
|
2e6f2a4 |
%else
|
|
|
2e6f2a4 |
%bcond_with fedora
|
|
|
2e6f2a4 |
# I'd need to modify the policy a bit to make it work on RHEL,
|
|
|
2e6f2a4 |
# so default to off when not building for Fedora.
|
|
|
2e6f2a4 |
%bcond_with selinux
|
|
|
2e6f2a4 |
%endif
|
|
|
2e6f2a4 |
|
|
|
2e6f2a4 |
|
|
|
92794d0 |
Name: icecream
|
|
|
5d367fa |
Version: 0.9.3
|
|
|
d592b35 |
Release: 2%{?dist}
|
|
|
92794d0 |
Summary: Distributed compiler
|
|
|
92794d0 |
|
|
|
92794d0 |
Group: Development/Tools
|
|
|
6908d74 |
License: GPLv2+
|
|
|
92794d0 |
URL: http://en.opensuse.org/Icecream
|
|
|
6908d74 |
Source0: ftp://ftp.suse.com/pub/projects/icecream/icecc-%{version}.tar.bz2
|
|
|
8d4b890 |
Source1: icecream.sh.in
|
|
|
8d4b890 |
Source2: icecream.csh.in
|
|
|
30e4dae |
Source3: icecream.fc
|
|
|
30e4dae |
Source4: icecream.te
|
|
|
30e4dae |
Source5: icecream.if
|
|
|
30e4dae |
Source6: initscript-iceccd
|
|
|
30e4dae |
Source7: initscript-scheduler
|
|
|
6908d74 |
# manpages from http://ftp5.gwdg.de/pub/opensuse/repositories/home:/coolo/openSUSE_11.0/src/icecream-0.9.2-2.1.src.rpm
|
|
|
6908d74 |
Source8: %{name}-manpages.tar.bz2
|
|
|
0acd02d |
Patch0: %{name}-rename-scheduler.patch
|
|
|
0acd02d |
Patch1: %{name}-cleanup-conffile.patch
|
|
|
5d367fa |
Patch2: %{name}-0.9.3-fix-gcc44-ftbfs.patch
|
|
|
89496dd |
|
|
|
92794d0 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
92794d0 |
|
|
|
6908d74 |
BuildRequires: symlinks
|
|
|
2e6f2a4 |
|
|
|
2e6f2a4 |
%if %{with selinux}
|
|
|
30e4dae |
# For SELinux protection:
|
|
|
30e4dae |
BuildRequires: checkpolicy selinux-policy-devel hardlink
|
|
|
30e4dae |
%define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp)
|
|
|
30e4dae |
%if "%{selinux_policyver}" != ""
|
|
|
30e4dae |
Requires: selinux-policy >= %{selinux_policyver}
|
|
|
30e4dae |
%endif
|
|
|
30e4dae |
%define selinux_variants mls strict targeted
|
|
|
2e6f2a4 |
%endif
|
|
|
92794d0 |
|
|
|
92794d0 |
BuildRequires: fedora-usermgmt-devel
|
|
|
92794d0 |
%{?FE_USERADD_REQ}
|
|
|
30e4dae |
Requires(post): chkconfig policycoreutils
|
|
|
30e4dae |
Requires(preun): chkconfig initscripts policycoreutils
|
|
|
30e4dae |
Requires(postun): initscripts policycoreutils
|
|
|
92794d0 |
|
|
|
92794d0 |
Provides: group(icecream) = 44
|
|
|
92794d0 |
Provides: user(icecream) = 44
|
|
|
92794d0 |
|
|
|
30e4dae |
|
|
|
92794d0 |
# description copied from Debian icecc package
|
|
|
92794d0 |
%description
|
|
|
92794d0 |
Icecream is a distributed compile system. It allows parallel compiling by
|
|
|
92794d0 |
distributing the compile jobs to several nodes of a compile network running the
|
|
|
92794d0 |
icecc daemon. The icecc scheduler routes the jobs and provides status and
|
|
|
92794d0 |
statistics information to the icecc monitor. Each compile node can accept one
|
|
|
92794d0 |
or more compile jobs depending on the number of processors and the settings of
|
|
|
92794d0 |
the daemon. Link jobs and other jobs which cannot be distributed are executed
|
|
|
92794d0 |
locally on the node where the compilation is started.
|
|
|
92794d0 |
|
|
|
92794d0 |
%package devel
|
|
|
92794d0 |
Summary: Development files for %{name}
|
|
|
92794d0 |
Group: Development/Libraries
|
|
|
92794d0 |
Requires: %{name} = %{version}-%{release}
|
|
|
92794d0 |
|
|
|
92794d0 |
%description devel
|
|
|
92794d0 |
This package contains development files for %{name}.
|
|
|
92794d0 |
|
|
|
92794d0 |
%prep
|
|
|
6908d74 |
%setup -q -a 8 -n icecc-%{version}
|
|
|
aa93b14 |
%patch0 -p1
|
|
|
92794d0 |
%patch1 -p0
|
|
|
6908d74 |
%patch2 -p1
|
|
|
8d4b890 |
sed -e 's|@LIBDIR@|%{_libdir}|g' %{SOURCE1} > icecream.sh
|
|
|
8d4b890 |
sed -e 's|@LIBDIR@|%{_libdir}|g' %{SOURCE2} > icecream.csh
|
|
|
30e4dae |
mkdir SELinux
|
|
|
30e4dae |
cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux
|
|
|
30e4dae |
mkdir fedora
|
|
|
30e4dae |
cp -p %{SOURCE6} %{SOURCE7} fedora
|
|
|
92794d0 |
|
|
|
92794d0 |
%build
|
|
|
6908d74 |
%configure --disable-static --enable-shared --disable-rpath
|
|
|
6908d74 |
# Remove rpath from local libtool copy
|
|
|
6908d74 |
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|
|
6908d74 |
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
|
2e6f2a4 |
|
|
|
6908d74 |
make %{?_smp_mflags}
|
|
|
2e6f2a4 |
|
|
|
2e6f2a4 |
%if %{with selinux}
|
|
|
30e4dae |
pushd SELinux
|
|
|
30e4dae |
for selinuxvariant in %{selinux_variants}; do
|
|
|
30e4dae |
make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile
|
|
|
30e4dae |
mv icecream.pp icecream.pp.${selinuxvariant}
|
|
|
30e4dae |
make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean
|
|
|
30e4dae |
done
|
|
|
30e4dae |
popd
|
|
|
2e6f2a4 |
%endif
|
|
|
92794d0 |
|
|
|
92794d0 |
%install
|
|
|
92794d0 |
rm -rf %{buildroot}
|
|
|
92794d0 |
make install DESTDIR=%{buildroot}
|
|
|
92794d0 |
rm -f %{buildroot}/%{_libdir}/libicecc.la
|
|
|
92794d0 |
|
|
|
92794d0 |
# move the symlinks elsewhere
|
|
|
92794d0 |
mkdir -p %{buildroot}/%{_libdir}/icecc/bin
|
|
|
92794d0 |
for i in cc gcc c++ g++; do
|
|
|
92794d0 |
ln -s %{buildroot}/%{_bindir}/icecc %{buildroot}/%{_libdir}/icecc/bin/$i
|
|
|
92794d0 |
rm -f %{buildroot}/%{_bindir}/$i
|
|
|
92794d0 |
done
|
|
|
92794d0 |
|
|
|
92794d0 |
# relativize the symlinks
|
|
|
92794d0 |
symlinks -cs %{buildroot}/%{_libdir}/icecc/bin
|
|
|
92794d0 |
|
|
|
92794d0 |
# install manpages
|
|
|
92794d0 |
mkdir -p %{buildroot}/%{_mandir}/man{1,7,8}
|
|
|
6908d74 |
mv mans/scheduler.1 mans/icecc-scheduler.1
|
|
|
6908d74 |
for i in mans/*.1 mans/*.7; do
|
|
|
92794d0 |
install -m 644 $i %{buildroot}/%{_mandir}/man${i##*.}
|
|
|
92794d0 |
done
|
|
|
92794d0 |
|
|
|
92794d0 |
# install config file and initscripts
|
|
|
92794d0 |
install -D -m 644 suse/sysconfig.icecream %{buildroot}/%{_sysconfdir}/sysconfig/icecream
|
|
|
92794d0 |
install -D -m 755 fedora/initscript-iceccd %{buildroot}/%{_sysconfdir}/rc.d/init.d/iceccd
|
|
|
92794d0 |
install -D -m 755 fedora/initscript-scheduler \
|
|
|
92794d0 |
%{buildroot}/%{_sysconfdir}/rc.d/init.d/icecc-scheduler
|
|
|
8d4b890 |
install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d
|
|
|
8d4b890 |
install -p -m 644 icecream.sh icecream.csh %{buildroot}/%{_sysconfdir}/profile.d
|
|
|
92794d0 |
|
|
|
92794d0 |
# create default working dir
|
|
|
92794d0 |
mkdir -p %{buildroot}/%{_localstatedir}/cache/icecream
|
|
|
92794d0 |
|
|
|
2e6f2a4 |
%if %{with selinux}
|
|
|
30e4dae |
for selinuxvariant in %{selinux_variants}; do
|
|
|
30e4dae |
install -d %{buildroot}/%{_datadir}/selinux/${selinuxvariant}
|
|
|
30e4dae |
install -p -m 644 -D SELinux/icecream.pp.${selinuxvariant} \
|
|
|
30e4dae |
%{buildroot}/%{_datadir}/selinux/${selinuxvariant}/icecream.pp
|
|
|
30e4dae |
done
|
|
|
30e4dae |
# Hardlink identical policy module packages together
|
|
|
30e4dae |
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
|
|
2e6f2a4 |
%endif
|
|
|
30e4dae |
|
|
|
92794d0 |
%pre
|
|
|
92794d0 |
# https://fedoraproject.org/wiki/PackageUserRegistry
|
|
|
92794d0 |
%__fe_groupadd 44 -r icecream &>/dev/null || :
|
|
|
92794d0 |
%__fe_useradd 44 -r -s /sbin/nologin -d %{_localstatedir}/cache/icecream -M \
|
|
|
30e4dae |
-c 'Icecream distributed compiler' -g icecream icecream &>/dev/null ||:
|
|
|
92794d0 |
|
|
|
92794d0 |
%post
|
|
|
92794d0 |
/sbin/ldconfig
|
|
|
30e4dae |
# if [ "$1" -le 1 ]; then # First install
|
|
|
2e6f2a4 |
%if %{with selinux}
|
|
|
30e4dae |
for selinuxvariant in %{selinux_variants}; do
|
|
|
30e4dae |
semodule -s ${selinuxvariant} -i \
|
|
|
30e4dae |
%{_datadir}/selinux/${selinuxvariant}/icecream.pp 2>/dev/null ||:
|
|
|
30e4dae |
done
|
|
|
30e4dae |
fixfiles -R %{name} restore ||:
|
|
|
83c739d |
restorecon -R %{_localstatedir}/cache/icecream 2>/dev/null ||:
|
|
|
83c739d |
restorecon %{_localstatedir}/log/iceccd 2>/dev/null ||:
|
|
|
30e4dae |
semanage port -a -t iceccd_port_t -p tcp 10245 2>/dev/null ||:
|
|
|
30e4dae |
semanage port -a -t icecc_scheduler_port_t -p tcp 8765 2>/dev/null ||:
|
|
|
d592b35 |
semanage port -a -t icecc_scheduler_port_t -p tcp 8766 2>/dev/null ||:
|
|
|
30e4dae |
semanage port -a -t icecc_scheduler_port_t -p udp 8765 2>/dev/null ||:
|
|
|
2e6f2a4 |
%endif
|
|
|
30e4dae |
# fi
|
|
|
92794d0 |
/sbin/chkconfig --add iceccd
|
|
|
92794d0 |
/sbin/chkconfig --add icecc-scheduler
|
|
|
30e4dae |
exit 0
|
|
|
92794d0 |
|
|
|
92794d0 |
%preun
|
|
|
30e4dae |
if [ "$1" -eq 0 ]; then # Final removal
|
|
|
92794d0 |
/sbin/service iceccd stop > /dev/null 2>&1
|
|
|
92794d0 |
/sbin/service icecc-scheduler stop > /dev/null 2>&1
|
|
|
92794d0 |
/sbin/chkconfig --del iceccd
|
|
|
92794d0 |
/sbin/chkconfig --del icecc-scheduler
|
|
|
30e4dae |
# rm -rf %{_localstatedir}/cache/icecream
|
|
|
2e6f2a4 |
|
|
|
2e6f2a4 |
%if %{with selinux}
|
|
|
30e4dae |
semanage port -d -t iceccd_port_t -p tcp 10245 2>/dev/null ||:
|
|
|
30e4dae |
semanage port -d -t icecc_scheduler_port_t -p tcp 8765 2>/dev/null ||:
|
|
|
d592b35 |
semanage port -d -t icecc_scheduler_port_t -p tcp 8766 2>/dev/null ||:
|
|
|
30e4dae |
semanage port -d -t icecc_scheduler_port_t -p udp 8765 2>/dev/null ||:
|
|
|
30e4dae |
for selinuxvariant in %{selinux_variants}; do
|
|
|
30e4dae |
semodule -s ${selinuxvariant} -r icecream 2>/dev/null ||:
|
|
|
30e4dae |
done
|
|
|
2e6f2a4 |
%endif
|
|
|
2e6f2a4 |
|
|
|
92794d0 |
fi
|
|
|
92794d0 |
exit 0
|
|
|
92794d0 |
|
|
|
92794d0 |
%postun
|
|
|
92794d0 |
/sbin/ldconfig
|
|
|
30e4dae |
if [ "$1" -ge 1 ]; then # Upgrade
|
|
|
92794d0 |
/sbin/service iceccd condrestart > /dev/null 2>&1
|
|
|
92794d0 |
/sbin/service icecc-scheduler condrestart > /dev/null 2>&1
|
|
|
92794d0 |
fi
|
|
|
92794d0 |
exit 0
|
|
|
92794d0 |
|
|
|
92794d0 |
%clean
|
|
|
92794d0 |
rm -rf %{buildroot}
|
|
|
92794d0 |
|
|
|
92794d0 |
%files
|
|
|
92794d0 |
%defattr(-,root,root,-)
|
|
|
6908d74 |
%doc COPYING README NEWS TODO
|
|
|
92794d0 |
%{_bindir}/icecc
|
|
|
2531906 |
%dir %{_libdir}/icecc/
|
|
|
2531906 |
%dir %{_libdir}/icecc/bin/
|
|
|
92794d0 |
%{_libdir}/icecc/bin/cc
|
|
|
92794d0 |
%{_libdir}/icecc/bin/gcc
|
|
|
92794d0 |
%{_libdir}/icecc/bin/c++
|
|
|
92794d0 |
%{_libdir}/icecc/bin/g++
|
|
|
92794d0 |
%{_libdir}/icecc/icecc-create-env
|
|
|
92794d0 |
%{_libdir}/libicecc.so.*
|
|
|
92794d0 |
%{_sbindir}/iceccd
|
|
|
92794d0 |
%{_sbindir}/icecc-scheduler
|
|
|
92794d0 |
%config(noreplace) %{_sysconfdir}/sysconfig/icecream
|
|
|
8d4b890 |
%config(noreplace) %{_sysconfdir}/profile.d/icecream.*sh
|
|
|
92794d0 |
%{_sysconfdir}/rc.d/init.d/iceccd
|
|
|
92794d0 |
%{_sysconfdir}/rc.d/init.d/icecc-scheduler
|
|
|
92794d0 |
%{_localstatedir}/cache/icecream
|
|
|
6908d74 |
%{_mandir}/man*/*
|
|
|
2e6f2a4 |
%{?with_selinux:%{_datadir}/selinux/*/icecream.pp}
|
|
|
92794d0 |
|
|
|
92794d0 |
%files devel
|
|
|
2531906 |
%defattr(-,root,root,-)
|
|
|
2531906 |
%dir %{_includedir}/icecc/
|
|
|
92794d0 |
%{_includedir}/icecc/*.h
|
|
|
92794d0 |
%{_libdir}/libicecc.so
|
|
|
92794d0 |
%{_libdir}/pkgconfig/icecc.pc
|
|
|
92794d0 |
|
|
|
92794d0 |
%changelog
|
|
|
d592b35 |
* Mon Feb 16 2009 Michal Schmidt <mschmidt@redhat.com> - 0.9.3-2
|
|
|
d592b35 |
- Updated and re-enabled the SELinux policy. The scheduler is now confined too.
|
|
|
d592b35 |
|
|
|
5d367fa |
* Mon Feb 16 2009 Michal Schmidt <mschmidt@redhat.com> - 0.9.3-1
|
|
|
5d367fa |
- new upstream release
|
|
|
5d367fa |
- Dropped merged patches.
|
|
|
5d367fa |
- Added an upstream patch to fix compilation with gcc 4.4.
|
|
|
5d367fa |
|
|
|
aa93b14 |
* Sat Feb 07 2009 Michal Schmidt <mschmidt@redhat.com> - 0.9.2-4
|
|
|
aa93b14 |
- one more fix for gcc 4.4.
|
|
|
aa93b14 |
- updated the scheduler renaming patch.
|
|
|
aa93b14 |
|
|
|
9c942a1 |
* Sat Feb 07 2009 Michal Schmidt <mschmidt@redhat.com> - 0.9.2-3
|
|
|
9c942a1 |
- add an upstream patch to fix FTBFS with gcc 4.4
|
|
|
9c942a1 |
|
|
|
0acd02d |
* Wed Jan 28 2009 Michal Schmidt <mschmidt@redhat.com> - 0.9.2-2
|
|
|
0acd02d |
- Fix the create-env script not to crash on relative paths in ld.so.conf.
|
|
|
0acd02d |
- No need to build the native environment as root anymore.
|
|
|
0acd02d |
- Disable the SELinux policy for now, it needs more work.
|
|
|
0acd02d |
|
|
|
6908d74 |
* Thu Nov 13 2008 Michal Schmidt <mschmidt@redhat.com> - 0.9.2-1
|
|
|
6908d74 |
- Update to upstream release 0.9.2.
|
|
|
6908d74 |
- The license is GPLv2+.
|
|
|
6908d74 |
- Add manpages from SUSE src package.
|
|
|
6908d74 |
- Add patch to run icecc --build-native as root.
|
|
|
6908d74 |
|
|
|
2531906 |
* Tue Sep 2 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.8.0-12.20080117svn
|
|
|
2531906 |
- Include unowned icecc directories.
|
|
|
2531906 |
- Add defattr in devel pkg.
|
|
|
2531906 |
|
|
|
83c739d |
* Thu Mar 13 2008 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-11.20080117svn
|
|
|
83c739d |
- Minor SELinux policy fix.
|
|
|
83c739d |
|
|
|
2e6f2a4 |
* Sun Feb 10 2008 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-10.20080117svn
|
|
|
2e6f2a4 |
- Compile fix (added missing #includes).
|
|
|
2e6f2a4 |
- Conditional building of SELinux policy and documentation.
|
|
|
2e6f2a4 |
- Fix build on RHEL5.
|
|
|
2e6f2a4 |
|
|
|
2e6f2a4 |
* Tue Jan 29 2008 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-9.20080117svn
|
|
|
2e6f2a4 |
- SELinux policy fixes.
|
|
|
2e6f2a4 |
|
|
|
89496dd |
* Thu Jan 17 2008 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-8.20080117svn
|
|
|
89496dd |
- Update to current icecream-make-it-cool branch.
|
|
|
89496dd |
|
|
|
1dbccc9 |
* Tue Jan 8 2008 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-7.20071101svn
|
|
|
1dbccc9 |
- Build fix. meinproc is now in kdelibs3. BuildRequire that instead of kdelibs.
|
|
|
1dbccc9 |
|
|
|
4570b12 |
* Thu Nov 29 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-6.20071101svn
|
|
|
4570b12 |
- Rewritten the profile scripts to make icecream work together with ccache.
|
|
|
4570b12 |
|
|
|
89116ae |
* Tue Nov 27 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-5.20071101svn
|
|
|
89116ae |
- SELinux: Allow iceccd to contact the scheduler via UDP.
|
|
|
89116ae |
- Don't add icecream to PATH in the profile scripts if ccache is installed
|
|
|
89116ae |
to avoid recursive invocations (bz #377761).
|
|
|
89116ae |
|
|
|
30e4dae |
* Tue Nov 20 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-4.20071101svn
|
|
|
30e4dae |
- Add a SELinux policy for iceccd
|
|
|
30e4dae |
- Initscripts as sources instead of patches in the .spec file
|
|
|
30e4dae |
- Don't touch /var/log/iceccd in the initscript. Let iceccd create it.
|
|
|
30e4dae |
|
|
|
8d4b890 |
* Mon Nov 12 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-3.20071101svn
|
|
|
8d4b890 |
- Add icecc to $PATH using scripts in profile.d
|
|
|
8d4b890 |
|
|
|
92794d0 |
* Tue Nov 6 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-2.20071101svn
|
|
|
92794d0 |
- Use the _datadir macro instead of hardcoded /usr/share
|
|
|
92794d0 |
|
|
|
92794d0 |
* Thu Nov 01 2007 Michal Schmidt <mschmidt@redhat.com> - 0.8.0-1.20071101svn
|
|
|
92794d0 |
- Initial package for Fedora.
|