diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-01-31 15:19:36 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-01-31 15:19:36 +0000 |
commit | d47863bc51c405215f4e17e7f7f904771bc0517a (patch) | |
tree | 92c65c0411c1af5f4b5c316673a886089eddacb8 /sci-misc/boinc/files | |
parent | Mask cuda use flag for boinc. Make it work only for nonhardened amd64 and x86. (diff) | |
download | historical-d47863bc51c405215f4e17e7f7f904771bc0517a.tar.gz historical-d47863bc51c405215f4e17e7f7f904771bc0517a.tar.bz2 historical-d47863bc51c405215f4e17e7f7f904771bc0517a.zip |
Version bump. Remove old cruft. Per bug #251766.
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'sci-misc/boinc/files')
-rw-r--r-- | sci-misc/boinc/files/08_all_Makefile.patch | 25 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc-4.72.20050813-gcc4-fix.patch | 11 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc-5.10.45-gcc4.3.patch | 55 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc-5.2.14-gcc-4.1.patch | 13 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc-6.2.15-mute-warnings.patch | 47 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc-6.2.15-project-list-size.patch | 10 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc.conf | 8 | ||||
-rw-r--r-- | sci-misc/boinc/files/boinc.init | 103 | ||||
-rw-r--r-- | sci-misc/boinc/files/gui_rpc_auth.cfg | 0 |
9 files changed, 78 insertions, 194 deletions
diff --git a/sci-misc/boinc/files/08_all_Makefile.patch b/sci-misc/boinc/files/08_all_Makefile.patch deleted file mode 100644 index 4968ed7bbaee..000000000000 --- a/sci-misc/boinc/files/08_all_Makefile.patch +++ /dev/null @@ -1,25 +0,0 @@ -# 08_all-Makefile.patches by Marcus D. Hanwell <cryos@gentoo.org> -# -# Link to ../lib with a higher precedence than /usr/lib - allows upgrades ---- client/Makefile.in 2005-12-05 01:28:26.000000000 +0000 -+++ client/Makefile.in 2005-12-11 21:00:07.000000000 +0000 -@@ -336,7 +336,7 @@ - - AM_CFLAGS = $(AM_CPPFLAGS) - AM_CXXFLAGS = $(AM_CPPFLAGS) --AM_LDFLAGS = -+AM_LDFLAGS = -L../lib - - # dependencies to make sure libs gets compiled before - # programs linking to them: ---- clientgui/Makefile.in 2005-12-11 21:07:55.000000000 +0000 -+++ clientgui/Makefile.in 2005-12-11 21:07:29.000000000 +0000 -@@ -354,7 +354,7 @@ - - AM_CFLAGS = $(AM_CPPFLAGS) - AM_CXXFLAGS = $(AM_CPPFLAGS) --AM_LDFLAGS = -+AM_LDFLAGS = -L../lib - - # dependencies to make sure libs gets compiled before - # programs linking to them: diff --git a/sci-misc/boinc/files/boinc-4.72.20050813-gcc4-fix.patch b/sci-misc/boinc/files/boinc-4.72.20050813-gcc4-fix.patch deleted file mode 100644 index a0624b3e05a2..000000000000 --- a/sci-misc/boinc/files/boinc-4.72.20050813-gcc4-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- boinc_public/lib/shmem.C.orig 2005-11-11 02:46:07.000000000 +0100 -+++ boinc_public/lib/shmem.C 2005-11-11 02:46:20.000000000 +0100 -@@ -128,7 +128,7 @@ - return ERR_SHMGET; - } - p = shmat(id, 0, 0); -- if ((int)p == -1) { -+ if ((long)p == -1) { - return ERR_SHMAT; - } - *pp = p; diff --git a/sci-misc/boinc/files/boinc-5.10.45-gcc4.3.patch b/sci-misc/boinc/files/boinc-5.10.45-gcc4.3.patch deleted file mode 100644 index 778d016419e3..000000000000 --- a/sci-misc/boinc/files/boinc-5.10.45-gcc4.3.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -Naur boinc-5.10.45/client/client_msgs.C boinc-5.10.45.new/client/client_msgs.C ---- boinc-5.10.45/client/client_msgs.C 2008-04-15 13:20:37.000000000 -0400 -+++ boinc-5.10.45.new/client/client_msgs.C 2008-04-17 14:26:48.000000000 -0400 -@@ -27,6 +27,7 @@ - - using std::deque; - -+#include <cstring> - #include "log_flags.h" - #include "client_types.h" - #include "client_msgs.h" -diff -Naur boinc-5.10.45/client/cs_account.C boinc-5.10.45.new/client/cs_account.C ---- boinc-5.10.45/client/cs_account.C 2008-04-15 13:20:36.000000000 -0400 -+++ boinc-5.10.45.new/client/cs_account.C 2008-04-17 14:28:19.000000000 -0400 -@@ -30,6 +30,7 @@ - #endif - #endif - -+#include <algorithm> - #include "filesys.h" - #include "parse.h" - #include "str_util.h" -diff -Naur boinc-5.10.45/lib/crypt.C boinc-5.10.45.new/lib/crypt.C ---- boinc-5.10.45/lib/crypt.C 2008-04-15 13:19:19.000000000 -0400 -+++ boinc-5.10.45.new/lib/crypt.C 2008-04-17 14:24:26.000000000 -0400 -@@ -28,6 +28,7 @@ - #include <cstdlib> - #endif - -+#include <cstring> - #include "md5_file.h" - #include "error_numbers.h" - -diff -Naur boinc-5.10.45/lib/parse.h boinc-5.10.45.new/lib/parse.h ---- boinc-5.10.45/lib/parse.h 2008-04-15 13:19:19.000000000 -0400 -+++ boinc-5.10.45.new/lib/parse.h 2008-04-17 14:23:30.000000000 -0400 -@@ -27,6 +27,7 @@ - #include <cstdlib> - #include <string> - #include <math.h> -+#include <cstring> - #ifdef solaris - #include <ieeefp.h> - #endif -diff -Naur boinc-5.10.45/lib/procinfo_unix.C boinc-5.10.45.new/lib/procinfo_unix.C ---- boinc-5.10.45/lib/procinfo_unix.C 2008-04-15 13:19:19.000000000 -0400 -+++ boinc-5.10.45.new/lib/procinfo_unix.C 2008-04-17 14:25:30.000000000 -0400 -@@ -29,6 +29,7 @@ - - #include <stdio.h> - -+#include <cstring> - #include <ctype.h> - #include <sys/types.h> - #include <dirent.h> diff --git a/sci-misc/boinc/files/boinc-5.2.14-gcc-4.1.patch b/sci-misc/boinc/files/boinc-5.2.14-gcc-4.1.patch deleted file mode 100644 index 6f350aed7801..000000000000 --- a/sci-misc/boinc/files/boinc-5.2.14-gcc-4.1.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ur boinc-5.2.14-orig/clientgui/BOINCTaskBar.h boinc-5.2.14/clientgui/BOINCTaskBar.h ---- boinc-5.2.14-orig/clientgui/BOINCTaskBar.h 2006-04-13 14:09:32.000000000 -0400 -+++ boinc-5.2.14/clientgui/BOINCTaskBar.h 2006-04-13 14:10:03.000000000 -0400 -@@ -76,7 +76,7 @@ - #endif - - #ifndef __WXMSW__ -- inline bool CTaskBarIcon::IsBalloonsSupported() { -+ inline bool IsBalloonsSupported() { - return false; - } - #endif - diff --git a/sci-misc/boinc/files/boinc-6.2.15-mute-warnings.patch b/sci-misc/boinc/files/boinc-6.2.15-mute-warnings.patch deleted file mode 100644 index a2a9ba32f9e9..000000000000 --- a/sci-misc/boinc/files/boinc-6.2.15-mute-warnings.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- lib/parse.h.orig 2008-09-15 16:37:16.000000000 -0700 -+++ lib/parse.h 2008-09-15 16:44:37.000000000 -0700 -@@ -23,9 +23,10 @@ - #ifdef _WIN32 - #include "boinc_win.h" - #else --#include "config.h" -+//#include "config.h" - #include <stdio.h> - #include <stdlib.h> -+#include <cstring> - #ifdef HAVE_STRING_H - #include <string.h> - #endif ---- api/boinc_gl.h.orig 2008-09-15 16:42:22.000000000 -0700 -+++ api/boinc_gl.h 2008-09-15 16:42:42.000000000 -0700 -@@ -37,7 +37,7 @@ - - - #else // !_WIN32, !__APPLE_CC__ --#include "config.h" -+//#include "config.h" - - # if defined(HAVE_GL_H) - # include <gl.h> ---- ./api/texfont.C.orig 2008-09-15 18:28:54.000000000 -0700 -+++ ./api/texfont.C 2008-09-15 18:31:56.000000000 -0700 -@@ -7,6 +7,8 @@ - #pragma warning (disable:4244) // disable bogus conversion warnings - #endif - -+#include "config.h" -+ - #include <assert.h> - #include <ctype.h> - #include <stdlib.h> ---- api/txf_util.C.orig 2008-09-15 18:32:24.000000000 -0700 -+++ api/txf_util.C 2008-09-15 18:32:40.000000000 -0700 -@@ -24,6 +24,8 @@ - #include "boinc_win.h" - #endif - -+#include "config.h" -+ - #include <cstring> - #include "filesys.h" - #include "boinc_api.h" diff --git a/sci-misc/boinc/files/boinc-6.2.15-project-list-size.patch b/sci-misc/boinc/files/boinc-6.2.15-project-list-size.patch deleted file mode 100644 index 2f28f3bc018b..000000000000 --- a/sci-misc/boinc/files/boinc-6.2.15-project-list-size.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- clientgui/ProjectInfoPage.cpp.orig 2008-09-16 17:17:02.000000000 -0700 -+++ clientgui/ProjectInfoPage.cpp 2008-09-16 17:57:51.000000000 -0700 -@@ -132,6 +132,7 @@ - m_pProjectListCtrl = new CProjectListCtrl; - m_pProjectListCtrl->Create( itemWizardPage23 ); - itemFlexGridSizer3->Add(m_pProjectListCtrl, 0, wxGROW|wxRIGHT, 10); -+ itemFlexGridSizer3->SetMinSize(-1,200); - - wxFlexGridSizer* itemFlexGridSizer11 = new wxFlexGridSizer(2, 1, 0, 0); - itemFlexGridSizer11->AddGrowableRow(0); diff --git a/sci-misc/boinc/files/boinc.conf b/sci-misc/boinc/files/boinc.conf index 827025b7da20..223b160b4b4c 100644 --- a/sci-misc/boinc/files/boinc.conf +++ b/sci-misc/boinc/files/boinc.conf @@ -18,3 +18,11 @@ ALLOW_REMOTE_RPC="no" # nice level NICELEVEL="19" + +# scheduling parameters, arguments to chrt(1) +SCHED_PARAM="--batch 0" + +# Relative CPU allocation for boinc user, default is 1024, +# requires CONFIG_FAIR_GROUP_SCHED and CONFIG_USER_SCHED, +# see /usr/src/linux/Documentation/scheduler/sched-design-CFS.txt +CPU_SHARE="128" diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init index 8a2543faae3b..55ebfd4398ff 100644 --- a/sci-misc/boinc/files/boinc.init +++ b/sci-misc/boinc/files/boinc.init @@ -3,49 +3,85 @@ opts="${opts} attach" depend() { - use dns - need net + # we can use dns and net, but we can also in most cases live without them + use dns net } -start() { - ebegin "Starting BOINC" - if [ ! -d ${RUNTIMEDIR} ]; then - einfo "Directory ${RUNTIMEDIR} not existing, creating now." - /bin/mkdir ${RUNTIMEDIR} - /bin/chown ${USER}:${GROUP} ${RUNTIMEDIR} - if [ ! -d ${RUNTIMEDIR} ]; then - eerror "Directory ${RUNTIMEDIR} could not be created!" +create_work_directory() { + if [[ ! -d $RUNTIMEDIR ]]; then + einfo "Directory $RUNTIMEDIR not existing, creating now." + mkdir $RUNTIMEDIR + chown ${USER}:${GROUP} $RUNTIMEDIR + if [[ ! -d $RUNTIMEDIR ]]; then + eeror "Directory $RUNTIMEDIR could not be created!" return 1 fi + ln -s /etc/ssl/certs/ca-certificates.crt $RUNTIMEDIR/ca-bundle.crt fi +} - cd ${RUNTIMEDIR} +generate_logs() { + if [[ ! -f $LOGFILE ]]; then + einfo "No $LOGFILE around. Creating new..." + einfo "For good log rotation is great tool app-admin/logrotate" + touch $LOGFILE + chown ${USER}:${GROUP} $LOGFILE + fi +} - if [ ! -f lockfile ]; then - einfo "File ${RUNTIMEDIR}/lockfile does not exist, assuming first run." - einfo "You need to setup an account on the BOINC project homepage beforehand! Go to http://boinc.berkeley.edu/ and locate your project." - einfo "Then either run /etc/init.d/boinc attach or connect with a gui client and attach to a project with that." +cuda_check() { + if [[ -f /opt/cuda/lib/libcudart.so ]]; then + # symlink wont harm :] + ln -snf /opt/cuda/lib/libcudart.so $RUNTIMEDIR/libcudart.so fi +} - # if the log file doesn't exist, create it with root privs, then change ownership to boinc - if [ ! -f ${LOGFILE} ]; then - touch ${LOGFILE} - chown ${USER}:${GROUP} ${LOGFILE} - else - mv ${LOGFILE} ${LOGFILE}.old - touch ${LOGFILE} - chown ${USER}:${GROUP} ${LOGFILE} +start() { + ebegin "Starting BOINC" + + create_work_directory + cuda_check + + cd $RUNTIMEDIR + + if [[ ! -f lockfile ]]; then + einfo "File $RUNTIMEDIR/lockfile does not exist, assuming first run." + einfo "You need to setup an account on the BOINC project homepage beforehand!" + einfo "Go to http://boinc.berkeley.edu/ and locate your project." + einfo "Then either run /etc/init.d/boinc attach or connect with a gui client" + einfo "and attach to a project with that." + echo + ewarn "Note that for attaching to some project you need your network up and running." + ewarn "network is needed only for jobs fetching afterwards" fi - if [ ${ALLOW_REMOTE_RPC} = "yes" ]; then + generate_logs + + if [[ ${ALLOW_REMOTE_RPC} = "yes" ]]; then ARGS="${ARGS} -allow_remote_gui_rpc" fi + + # sys-apps/util-linux + CHRT="/usr/bin/chrt ${SCHED_PARAM}" - setsid start-stop-daemon --quiet --start --chdir ${RUNTIMEDIR} \ + ${CHRT} start-stop-daemon \ + --quiet --start --chdir ${RUNTIMEDIR} \ --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \ - --nicelevel ${NICELEVEL} -- ${ARGS} > ${LOGFILE} 2>&1 & + --background --stdout ${LOGFILE} --stderr ${LOGFILE} \ + --nicelevel ${NICELEVEL} -- ${ARGS} - eend $? + RESULT=$? + + if [ "${CPU_SHARE}" -a -d /sys/kernel/uids ]; then + BUID=`id -u ${USER}` + # It might take a moment for start-stop-daemon to chuid + [[ -d /sys/kernel/uids/${BUID} ]] || sleep 5 # 5 was working always here + if [[ -w /sys/kernel/uids/${BUID}/cpu_share ]]; then + echo ${CPU_SHARE} > /sys/kernel/uids/${BUID}/cpu_share + fi + fi + + eend $RESULT } attach() { @@ -55,26 +91,27 @@ attach() { read key RC_QUIET_STDOUT="yes" svc_status - if [ $? == 1 ]; then + if [[ $? = 1 ]]; then svc_start fi ebegin "Attaching to project" - # boinc cmd does not return 1 when it fails currently - boinc_cmd --project_attach ${url} ${key} &> /dev/null + # we have to work in runtime directory + cd $RUNTIMEDIR + # boinc does not return 1 when it fails currently + $BOINCBIN --attach_project $url $key &> /dev/null eend $? sleep 10 - tail ${LOGFILE} + tail $LOGFILE } stop() { ebegin "Stopping BOINC" - start-stop-daemon --stop --quiet --exec ${BOINCBIN} + start-stop-daemon --stop --retry 3 --quiet --exec $BOINCBIN eend $? } restart() { svc_stop - sleep 6 svc_start } diff --git a/sci-misc/boinc/files/gui_rpc_auth.cfg b/sci-misc/boinc/files/gui_rpc_auth.cfg deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/sci-misc/boinc/files/gui_rpc_auth.cfg +++ /dev/null |