From d711b60f0e1a12aaa69739cd5871a0f90a0c2fed Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Nov 03 2016 15:24:49 +0000 Subject: update to current git snapshot --- diff --git a/.gitignore b/.gitignore index 42cd26d..c0f9094 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ icecream-manpages.tar.bz2 /icecc-1.0.1.tar.bz2 /icecream-20140822.tar.xz /icecc-1.0.98.tar.bz2 +/icecream-a79f70f.tar.gz diff --git a/0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch b/0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch index 14286d1..4403ed5 100644 --- a/0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch +++ b/0001-Revert-chmod-chown-envs-dir-when-preparing-this.patch @@ -1,9 +1,12 @@ -From ed4bc5a48c33142891e2ebe5a0bfdc676a1ba8d2 Mon Sep 17 00:00:00 2001 +From cbf425504376e21ce2816d80affcc5a5a8806bd3 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 26 Aug 2013 17:08:52 +0200 -Subject: [PATCH 1/3] Revert "chmod/chown envs dir when preparing this" +Subject: [PATCH 1/2] Revert "chmod/chown envs dir when preparing this" This reverts commit 137e683760707c690df496516432d72d8f7a81d3. + +In Fedora our basedir is /var/cache/icecream, it's shipped in the rpm +and its owned by root:icecc. We cannot and do not want to chown/chmod it. --- daemon/environment.cpp | 7 +------ daemon/environment.h | 2 +- @@ -11,10 +14,10 @@ This reverts commit 137e683760707c690df496516432d72d8f7a81d3. 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/daemon/environment.cpp b/daemon/environment.cpp -index a134b8e..3dbf27a 100644 +index a054419ce3..e9aacd7334 100644 --- a/daemon/environment.cpp +++ b/daemon/environment.cpp -@@ -200,7 +200,7 @@ static bool cleanup_directory(const string &directory) +@@ -201,7 +201,7 @@ static bool cleanup_directory(const string &directory) return true; } @@ -23,7 +26,7 @@ index a134b8e..3dbf27a 100644 { flush_debug(); -@@ -219,11 +219,6 @@ bool cleanup_cache(const string &basedir, uid_t user_uid, gid_t user_gid) +@@ -220,11 +220,6 @@ bool cleanup_cache(const string &basedir, uid_t user_uid, gid_t user_gid) return false; } @@ -36,7 +39,7 @@ index a134b8e..3dbf27a 100644 } diff --git a/daemon/environment.h b/daemon/environment.h -index c50a339..3e30f10 100644 +index 3d7fe318ae..87a4033224 100644 --- a/daemon/environment.h +++ b/daemon/environment.h @@ -29,7 +29,7 @@ @@ -49,10 +52,10 @@ index c50a339..3e30f10 100644 uid_t user_uid, gid_t user_gid, const std::string &compiler, const std::list &extrafiles); diff --git a/daemon/main.cpp b/daemon/main.cpp -index 8f7be1c..4db17f2 100644 +index 9c2983a530..696b5ef028 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp -@@ -2268,7 +2268,7 @@ int main(int argc, char **argv) +@@ -2276,7 +2276,7 @@ int main(int argc, char **argv) pidFile << dcc_master_pid << endl; pidFile.close(); @@ -62,5 +65,5 @@ index 8f7be1c..4db17f2 100644 } -- -2.1.0 +2.9.3 diff --git a/0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch b/0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch index fb4de95..8846cab 100644 --- a/0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch +++ b/0002-daemon-main-do-not-create-run-icecc-by-ourselves.patch @@ -1,7 +1,7 @@ -From f99d4abcd23ba589b07acbdab05213e360e66312 Mon Sep 17 00:00:00 2001 +From cbc997fef034c873d95da6e4a6ad00208f8f2844 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 29 Aug 2013 18:12:02 +0200 -Subject: [PATCH 2/3] daemon/main: do not create /run/icecc by ourselves +Subject: [PATCH 2/2] daemon/main: do not create /run/icecc by ourselves In order to be able to restrict the daemon's SELinux policy even more, let's rely on tmpfiles.d to create the /run/icecc directory for us @@ -11,20 +11,20 @@ instead of creating it from the daemon. 1 file changed, 4 deletions(-) diff --git a/daemon/main.cpp b/daemon/main.cpp -index 4db17f2..fc12caf 100644 +index 696b5ef028..615235316b 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp -@@ -2177,10 +2177,6 @@ int main(int argc, char **argv) +@@ -2181,10 +2181,6 @@ int main(int argc, char **argv) logfile = "/var/log/icecc/iceccd.log"; } - mkdir("/var/run/icecc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); - chmod("/var/run/icecc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); -- chown("/var/run/icecc", d.user_uid, d.user_gid); +- ignore_result(chown("/var/run/icecc", d.user_uid, d.user_gid)); - #ifdef HAVE_LIBCAP_NG capng_clear(CAPNG_SELECT_BOTH); capng_update(CAPNG_ADD, (capng_type_t)(CAPNG_EFFECTIVE | CAPNG_PERMITTED), CAP_SYS_CHROOT); -- -2.1.0 +2.9.3 diff --git a/icecream.spec b/icecream.spec index 11191d9..eb0afed 100644 --- a/icecream.spec +++ b/icecream.spec @@ -1,54 +1,55 @@ %global _hardened_build 1 - %bcond_without selinux -Name: icecream -Version: 1.0.98 -Release: 4%{?dist} -Summary: Distributed compiler - -Group: Development/Tools -License: GPLv2+ -URL: https://github.com/icecc/icecream -Source0: icecc-%{version}.tar.bz2 -Source1: fedora-sysconfig.icecream -Source2: %{name}.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 +%global commit0 a79f70f389acaad63aa073b45d4e5ca085f5c8db +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +Name: icecream +Version: 1.1 +Release: 0.1.rc2.g%{shortcommit0}%{?dist} +Summary: Distributed compiler +License: GPLv2+ +URL: https://github.com/icecc/icecream +Source0: https://github.com/icecc/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.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 BuildRequires: systemd BuildRequires: libcap-ng-devel BuildRequires: lzo-devel BuildRequires: docbook2X BuildRequires: environment(modules) +BuildRequires: autoconf automake libtool -Requires: firewalld-filesystem -Requires: environment(modules) -Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires: firewalld-filesystem +Requires: environment(modules) +Requires(pre): shadow-utils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %if %{with selinux} # For SELinux protection: -BuildRequires: checkpolicy selinux-policy-devel hardlink +BuildRequires: checkpolicy selinux-policy-devel hardlink # semanage is in policycoreutils (EL-5) or policycoreutils-python (Fedora). File dep will work in both. -Requires(post): policycoreutils /usr/sbin/semanage -Requires(preun): policycoreutils /usr/sbin/semanage -Requires(postun): policycoreutils +Requires(post): policycoreutils /usr/sbin/semanage +Requires(preun): policycoreutils /usr/sbin/semanage +Requires(postun): policycoreutils %define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp) %if "%{selinux_policyver}" != "" -Requires: selinux-policy >= %{selinux_policyver} +Requires: selinux-policy >= %{selinux_policyver} %endif %define selinux_variants mls strict targeted %endif @@ -73,9 +74,7 @@ Requires: %{name} = %{version}-%{release} This package contains development files for %{name}. %prep -%setup -q -n icecc-%{version} -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 -n icecream-%{commit0} mkdir SELinux cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux @@ -85,6 +84,9 @@ cp -p %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} fedora %build export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" + +./autogen.sh + %configure \ --disable-static \ --enable-shared \ diff --git a/sources b/sources index b9c8157..f9ad4e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a55328bf998e3492abf931c4b581f869 icecc-1.0.98.tar.bz2 +2fae20af1ff67d3b1633f544bae0196b icecream-a79f70f.tar.gz