summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-misc/boinc/files')
-rw-r--r--sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch60
-rw-r--r--sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch36
-rw-r--r--sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch25
-rw-r--r--sci-misc/boinc/files/90-boincxss13
4 files changed, 134 insertions, 0 deletions
diff --git a/sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch b/sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch
new file mode 100644
index 0000000..456b804
--- /dev/null
+++ b/sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch
@@ -0,0 +1,60 @@
+From 3746e1367fe5dc430c431b349ed6a40ee7156e74 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Thu, 4 Oct 2018 10:30:03 +0200
+Subject: [PATCH 1/3] Install switcher tool to FHS directory
+
+---
+ client/Makefile.am | 2 +-
+ client/{file_names.h => file_names.h.in} | 2 +-
+ configure.ac | 1 +
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+ rename client/{file_names.h => file_names.h.in} (98%)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index f39c45f..0fb91d3 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -24,7 +24,15 @@ endif
+
+ bin_PROGRAMS = boinc_client boinccmd
+ if !OS_WIN32
+-bin_PROGRAMS += switcher
++pkglibexec_PROGRAMS = switcher
+ endif
+
++edit = $(SED) -e 's|@pkglibexecdir[@]|$(pkglibexecdir)|g'
++
++file_names.h: file_names.h.in Makefile
++ $(AM_V_GEN)$(edit) $@.in > $@
++
++BUILT_SOURCES = file_names.h
++CLEANFILES = file_names.h
++
+ boinccmd_SOURCES = boinc_cmd.cpp
+@@ -67,6 +67,7 @@ boinc_client_SOURCES = \
+ current_version.cpp \
+ dhrystone.cpp \
+ dhrystone2.cpp \
++ file_names.h \
+ file_names.cpp \
+ file_xfer.cpp \
+ gpu_amd.cpp \
+diff --git a/client/file_names.h b/client/file_name.h.in
+similarity index 98%
+rename from client/file_names.h
+rename to client/file_name.h.in
+index 37f9b29..67874e5 100644
+--- a/client/file_names.h
++++ b/client/file_names.h.in
+@@ -97,7 +97,7 @@ extern void send_log_after(const char* filename, double t, MIOFILE& mf);
+ #define STATE_FILE_PREV "client_state_prev.xml"
+ #define STDERR_FILE_NAME "stderr.txt"
+ #define STDOUT_FILE_NAME "stdout.txt"
+-#define SWITCHER_DIR "switcher"
++#define SWITCHER_DIR "@pkglibexecdir@"
+ #define SWITCHER_FILE_NAME "switcher"
+ #define TASK_STATE_FILENAME "boinc_task_state.xml"
+ #define TEMP_ACCT_FILE_NAME "temp_acct.xml"
+--
+2.18.0
+
diff --git a/sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch b/sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch
new file mode 100644
index 0000000..fa05160
--- /dev/null
+++ b/sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch
@@ -0,0 +1,36 @@
+From 6a337de43686989fe3db07aed3fd5317b9754a8a Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Thu, 4 Oct 2018 10:31:42 +0200
+Subject: [PATCH 2/3] Install missing tool for sandboxing
+
+---
+ client/Makefile.am | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 0fb91d3..06b48df 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -24,7 +24,7 @@ endif
+
+ bin_PROGRAMS = boinc_client boinccmd
+ if !OS_WIN32
+-pkglibexec_PROGRAMS = switcher
++pkglibexec_PROGRAMS = switcher setprojectgrp
+ endif
+
+ boinccmd_SOURCES = boinc_cmd.cpp
+@@ -127,6 +127,10 @@ switcher_SOURCES = switcher.cpp
+ switcher_LDFLAGS = $(AM_LDFLAGS) -L../lib
+ switcher_LDADD = $(LIBBOINC)
+
++setprojectgrp_SOURCES = setprojectgrp.cpp
++setprojectgrp_LDFLAGS = $(AM_LDFLAGS) -L../lib
++setprojectgrp_LDADD = $(LIBBOINC)
++
+ ## since we are using libtool we need some magic to get boinc and boinc_client
+ ## to both be installed properly. The next two rules do that...
+ all-local: boinc$(EXEEXT)
+--
+2.18.0
+
diff --git a/sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch b/sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch
new file mode 100644
index 0000000..29fd579
--- /dev/null
+++ b/sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch
@@ -0,0 +1,25 @@
+From 5b979fa7f75557b7e246a58290f70601e31db9b9 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Thu, 4 Oct 2018 11:13:35 +0200
+Subject: [PATCH 3/3] Add missing config.h include in setprojectgrp.cpp
+
+---
+ client/setprojectgrp.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/client/setprojectgrp.cpp b/client/setprojectgrp.cpp
+index 608410d..fcf64d2 100644
+--- a/client/setprojectgrp.cpp
++++ b/client/setprojectgrp.cpp
+@@ -23,6 +23,8 @@
+ //
+ // setprojectgrp runs setuid boinc_master and setgid boinc_project
+
++#include "config.h"
++
+ #include <unistd.h>
+ #include <grp.h>
+ #include <cstdio>
+--
+2.18.0
+
diff --git a/sci-misc/boinc/files/90-boincxss b/sci-misc/boinc/files/90-boincxss
new file mode 100644
index 0000000..0c0af5e
--- /dev/null
+++ b/sci-misc/boinc/files/90-boincxss
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# This file is sourced by Xsession(5), not executed.
+BOINC_USER=boinc
+#
+# If xhost installed, use it to give access to the X server to any
+# process from the same user on the local host.
+# Unlike other uses of xhost, this is safe since the kernel can check
+# the actual owner of the calling process.
+
+if type xhost >/dev/null 2>&1; then
+ id -u $BOINC_USER >/dev/null 2>&1 && xhost +SI:localuser:$BOINC_USER || :
+fi