* [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/
@ 2017-01-29 20:10 David Seifert
0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2017-01-29 20:10 UTC (permalink / raw
To: gentoo-commits
commit: 6c8e0dbe77c59d92a08b26f10c9177e55740348f
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sun Jan 29 09:18:12 2017 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 20:09:40 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c8e0dbe
sci-misc/boinc: remove unused patch
Closes: https://github.com/gentoo/gentoo/pull/3709
sci-misc/boinc/files/boinc-7.2.0-fix_subdirs.patch | 69 ----------------------
1 file changed, 69 deletions(-)
diff --git a/sci-misc/boinc/files/boinc-7.2.0-fix_subdirs.patch b/sci-misc/boinc/files/boinc-7.2.0-fix_subdirs.patch
deleted file mode 100644
index be0a02c..00000000
--- a/sci-misc/boinc/files/boinc-7.2.0-fix_subdirs.patch
+++ /dev/null
@@ -1,69 +0,0 @@
- Makefile.am | 14 +++++++-------
- configure.ac | 5 -----
- 2 files changed, 7 insertions(+), 12 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 6322db1..45d8b67 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -10,13 +10,13 @@ ACLOCAL_AMFLAGS = -I m4
-
- if ENABLE_LIBRARIES
- API_SUBDIRS = api lib
--if ENABLE_SERVER
-- API_SUBDIRS += zip
--endif
-+#if ENABLE_SERVER
-+# API_SUBDIRS += zip
-+#endif
- endif
-
- if ENABLE_SERVER
-- SERVER_SUBDIRS = db test py sched apps tools vda html
-+ SERVER_SUBDIRS = db test py sched apps tools vda
- ## once contained samples/example_app which breaks out-of-source-tree builds
- endif
-
-@@ -26,9 +26,9 @@ endif
-
- if ENABLE_MANAGER
- CLIENTGUI_SUBDIRS = clientgui locale
--if BUILD_X11_SCREENSAVER
-- CLIENTGUI_SUBDIRS += clientscr
--endif
-+#if BUILD_X11_SCREENSAVER
-+# CLIENTGUI_SUBDIRS += clientscr
-+#endif
- endif
-
- # ORDER MATTERS below. One must build dependencies FIRST, then things
-diff --git a/configure.ac b/configure.ac
-index 2bef437..5a9e104 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -955,7 +955,6 @@ AC_CONFIG_FILES([
- apps/Makefile
- clientgui/Makefile
- clientgui/res/Makefile
-- clientscr/Makefile
- client/Makefile
- client/win/boinc_path_config.py:py/boinc_path_config.py.in
- client/scripts/Makefile
-@@ -963,7 +962,6 @@ AC_CONFIG_FILES([
- db/Makefile
- doc/Makefile
- doc/manpages/Makefile
-- html/Makefile
- lib/Makefile
- locale/Makefile
- Makefile
-@@ -993,9 +991,6 @@ AC_CONFIG_FILES([
- tools/boinc_path_config.py:py/boinc_path_config.py.in
- tools/Makefile
- vda/Makefile
-- zip/Makefile
-- zip/zip/Makefile
-- zip/unzip/Makefile
- m4/Makefile
- ])
-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/
@ 2021-02-21 21:30 Conrad Kostecki
0 siblings, 0 replies; 5+ messages in thread
From: Conrad Kostecki @ 2021-02-21 21:30 UTC (permalink / raw
To: gentoo-commits
commit: d50e52de49b98f11d6f596fd68eacfc8a789c89e
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sun Feb 21 11:27:45 2021 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Feb 21 21:28:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50e52de
sci-misc/boinc: remove unused patches/file
Closes: https://github.com/gentoo/gentoo/pull/19574
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
sci-misc/boinc/files/7.10-fix_xlocale.patch | 37 -------------------------
sci-misc/boinc/files/7.8-fix_xlocale.patch | 42 -----------------------------
sci-misc/boinc/files/boinc.service | 11 --------
3 files changed, 90 deletions(-)
diff --git a/sci-misc/boinc/files/7.10-fix_xlocale.patch b/sci-misc/boinc/files/7.10-fix_xlocale.patch
deleted file mode 100644
index 6d2360138f8..00000000000
--- a/sci-misc/boinc/files/7.10-fix_xlocale.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/configure.ac 2018-03-21 12:08:02.287768932 +0100
-+++ b/configure.ac 2018-03-21 12:09:32.918771652 +0100
-@@ -592,7 +592,7 @@
- echo "DEBUG: GLUT_CFLAGS = $GLUT_CFLAGS" >&5
- echo "DEBUG: GLUT_LIBS = $GLUT_LIBS" >&5
-
-- AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h libnotify/notify.h gtk/gtk.h locale.h xlocale.h])
-+ AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h libnotify/notify.h gtk/gtk.h locale.h])
-
- AC_CHECK_LIB([jpeg], [jpeg_start_compress],[have_jpeg=1],[have_jpeg=0])
- AC_CHECK_HEADER([jpeglib.h],[have_jpeg=1],[have_jpeg=0])
---- a/lib/gui_rpc_client.h 2018-03-21 12:07:51.300768602 +0100
-+++ b/lib/gui_rpc_client.h 2018-03-21 12:09:11.671771015 +0100
-@@ -810,8 +810,8 @@
-
- #elif defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4)
- // uselocale() is not available in OS 10.3.9 so use weak linking
--#if HAVE_XLOCALE_H
--#include <xlocale.h>
-+#if HAVE_LOCALE_H
-+#include <locale.h>
- #endif
- extern int freelocale(locale_t) __attribute__((weak_import));
- extern locale_t newlocale(int, __const char *, locale_t) __attribute__((weak_import));
---- a/clientgui/AsyncRPC.cpp 2018-03-21 12:08:17.241769380 +0100
-+++ b/clientgui/AsyncRPC.cpp 2018-03-21 12:08:50.664770384 +0100
-@@ -19,8 +19,8 @@
- #pragma implementation "AsyncRPC.h"
- #endif
-
--#if HAVE_XLOCALE_H
--#include <xlocale.h>
-+#if HAVE_LOCALE_H
-+#include <locale.h>
- #endif
-
- #include "stdwx.h"
diff --git a/sci-misc/boinc/files/7.8-fix_xlocale.patch b/sci-misc/boinc/files/7.8-fix_xlocale.patch
deleted file mode 100644
index 8b80258cf6c..00000000000
--- a/sci-misc/boinc/files/7.8-fix_xlocale.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/configure.ac 2017-12-18 17:45:19.829854890 +0100
-+++ b/configure.ac 2017-12-18 17:46:13.845853923 +0100
-@@ -602,7 +602,7 @@
- echo "DEBUG: GLUT_CFLAGS = $GLUT_CFLAGS" >&5
- echo "DEBUG: GLUT_LIBS = $GLUT_LIBS" >&5
-
-- AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h libnotify/notify.h gtk/gtk.h locale.h xlocale.h])
-+ AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h libnotify/notify.h gtk/gtk.h locale.h])
-
- AC_CHECK_LIB([jpeg], [jpeg_start_compress],[have_jpeg=1],[have_jpeg=0])
- AC_CHECK_HEADER([jpeglib.h],[have_jpeg=1],[have_jpeg=0])
-@@ -986,9 +986,6 @@
- #ifdef HAVE_LOCALE_H
- #include <locale.h>
- #endif
--#ifdef HAVE_XLOCALE_H
--#include <xlocale.h>
--#endif
- ]])
-
- dnl Checks for typedefs, structures, and compiler characteristics.
---- a/lib/gui_rpc_client.h 2017-12-18 17:47:22.826852688 +0100
-+++ b/lib/gui_rpc_client.h 2017-12-18 17:48:42.384851263 +0100
-@@ -807,7 +807,6 @@
-
- #elif defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4)
- // uselocale() is not available in OS 10.3.9 so use weak linking
--#include <xlocale.h>
- extern int freelocale(locale_t) __attribute__((weak_import));
- extern locale_t newlocale(int, __const char *, locale_t) __attribute__((weak_import));
- extern locale_t uselocale(locale_t) __attribute__((weak_import));
---- a/clientgui/AsyncRPC.cpp 2017-12-18 17:47:30.727852546 +0100
-+++ b/clientgui/AsyncRPC.cpp 2017-12-18 17:48:56.785851005 +0100
-@@ -20,7 +20,7 @@
- #endif
-
- #if !(defined(_WIN32) || (defined(__WXMAC__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4)))
--#include <xlocale.h>
-+#include <locale.h>
- #endif
-
- #include "stdwx.h"
diff --git a/sci-misc/boinc/files/boinc.service b/sci-misc/boinc/files/boinc.service
deleted file mode 100644
index af8edf4d504..00000000000
--- a/sci-misc/boinc/files/boinc.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=BOINC Daemon
-
-[Service]
-User=boinc
-Group=boinc
-Nice=19
-ExecStart=/usr/bin/boinc_client --dir /var/lib/boinc --redirectio
-
-[Install]
-WantedBy=multi-user.target
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/
@ 2017-01-04 13:42 David Seifert
0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2017-01-04 13:42 UTC (permalink / raw
To: gentoo-commits
commit: e4bdce024162b77ee4947674c2e4399fc4cf23f7
Author: Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Thu Dec 8 09:21:44 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jan 4 13:41:54 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4bdce02
sci-misc/boinc: Update init script to fix bug 584386 and 603522
Gentoo-Bug: 584386
The boinc init script starts boinc_client in daemon mode, and relies on
boinccmd to send a quit signal to stop the service.
This leads to the following two problems:
1) It is not possible to generate a pid file, as the pid read from the
started boinc_client is invalid after it forked to background.
2) The stop command immediately returns, but boinc_client can still be
active for a long time, over a minute in fact, while it is stopping
running projects and cleaning up its work data. This is especially
problematic when boinc is stopped while shutting down the machine.
Gentoo-Bug: 603522
The init script for boinc calls "chown -R" on "${RUNTIMEDIR}".
This leads to the security issue, that the "boinc" user can create a
hardlink within ${RUNTIMEDIR} pointing to a file that he does not
own, and the next time the daemon is started, the init script (as
root) will give ownership of the *target* of the hardlink to the
boinc user.
This commit removes the usage of "chown -R" from start_pre(), and
adds a single call to "chown" to create_work_directory() if, and only
if the working directory has been newly created.
Other fixes and changes:
Another problem found is the function cuda_check(), which assumes the cuda
libraries to be installed in /opt/cuda/lib, leading to an invalid symlink
for libcudart.so on 64 bit machines where the library is installed in
/opt/cuda/lib64.
This commit changes the following behaviour, besides some long overdue
cleanup:
1) start() no longer uses the --daemon option of the boinc_client, but
the --background option of the start-stop-daemon command. Further it
creates a pid file in the path set by the new config variable
BOINC_PIDFILE, that has been added to boinc.conf.
2) stop() no longer uses boinccmd to send a quit signal, but uses the
--stop and --pidfile options of the start-stop-daemon command. The
waiting time should be large enough to successfully await the end of
the exiting task of the boinc_client program.
3) cuda_check() now checks the validity of the libcudart.so symlink and
removes it if it is invalid. Further it looks for a present
libcudart.so library in /opt/cuda/lib* and picks the newest found to
create a new symlink if none is present.
4) The suspend() and resume() functions have been updated to use the
start-stop-daemon command, so both the user:group and a possibly
required password are now used to circumvent authentication errors.
Package-Manager: portage-2.3.3
Closes: https://github.com/gentoo/gentoo/pull/3056
sci-misc/boinc/files/boinc.conf | 6 +++
sci-misc/boinc/files/boinc.init | 106 +++++++++++++++++++++++++++++++---------
2 files changed, 89 insertions(+), 23 deletions(-)
diff --git a/sci-misc/boinc/files/boinc.conf b/sci-misc/boinc/files/boinc.conf
index 0fef6ae..22fcca0 100644
--- a/sci-misc/boinc/files/boinc.conf
+++ b/sci-misc/boinc/files/boinc.conf
@@ -10,6 +10,12 @@ RUNTIMEDIR="/var/lib/boinc"
# Location of the boinc command line binary
BOINCBIN="/usr/bin/boinc_client"
+# Location of the boinc_client pid file
+BOINC_PIDFILE="/var/run/boinc_client.pid"
+
+# Location of the boinccmd command
+BOINCCMD="/usr/bin/boinccmd"
+
# Allow remote gui RPC yes or no
ALLOW_REMOTE_RPC="no"
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index 07b8b80..4067105 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -5,7 +5,6 @@
extra_started_commands="attach resume suspend"
-
depend() {
# we can use dns and net, but we can also in most cases live without them
use dns net ntp-client ntpd
@@ -13,15 +12,19 @@ depend() {
create_work_directory() {
- if [ ! -d "${RUNTIMEDIR}" ]; then
+ if [[ ! -d "${RUNTIMEDIR}" ]]; then
einfo "Directory ${RUNTIMEDIR} does not exist, creating now."
mkdir -p "${RUNTIMEDIR}"
- if [ ! -d "${RUNTIMEDIR}" ]; then
+ if [[ ! -d "${RUNTIMEDIR}" ]]; then
eeror "Directory ${RUNTIMEDIR} could not be created!"
return 1
fi
+
+ # ensure proper ownership
+ chown "${USER}:${GROUP}" "${RUNTIMEDIR}"
fi
- if [ ! -e "${RUNTIMEDIR}"/ca-bundle.crt ] ; then
+
+ if [[ ! -e "${RUNTIMEDIR}"/ca-bundle.crt ]]; then
ln -s /etc/ssl/certs/ca-certificates.crt "${RUNTIMEDIR}"/ca-bundle.crt
fi
@@ -30,9 +33,20 @@ create_work_directory() {
cuda_check() {
- if [ -f /opt/cuda/lib/libcudart.so ]; then
- # symlink wont harm :]
- ln -snf /opt/cuda/lib/libcudart.so "${RUNTIMEDIR}"/libcudart.so
+ local libtarget="${RUNTIMEDIR}/libcudart.so"
+ local libsource="$(ls -t /opt/cuda/lib*/libcudart.so 2>/dev/null | head -n 1)"
+
+ # Remove a broken symlink
+ if [[ -h "${libtarget}" ]] \
+ && [[ "${libsource}" != "$(readlink "${libtarget}")" ]]; then
+ rm -f "${libtarget}"
+ fi
+
+ # symlink the correct path
+ if [[ -n "${libsource}" ]] \
+ && [[ -f "${libsource}" ]] \
+ && [[ ! -h "${libtarget}" ]]; then
+ ln -snf "$libsource" "${libtarget}"
fi
}
@@ -43,17 +57,26 @@ env_check() {
: ${GROUP:="boinc"}
: ${RUNTIMEDIR:="/var/lib/boinc"}
: ${BOINCBIN:="$(which boinc_client)"}
+ : ${BOINC_PIDFILE:="/var/run/boinc_client.pid"}
+ : ${BOINCCMD:="$(which /usr/bin/boinccmd)"}
: ${ALLOW_REMOTE_RPC:="yes"}
: ${NICELEVEL:="19"}
# ARGS is not checked, it could have been explicitly set
# to be empty by the user.
# If the client was not found (how?) something is seriously wrong
- if [ ! -x "$BOINCBIN" ] ; then
+ if [[ ! -x "$BOINCBIN" ]]; then
eerror "No boinc_client found!"
return 1
fi
+ # The boinccmd is crucial, or we can not attach, suspend or resume
+ # the boinc client
+ if [[ ! -x "$BOINCCMD" ]]; then
+ eerror "No boinccmd_program found!"
+ return 1
+ fi
+
return 0
}
@@ -75,10 +98,7 @@ start_pre() {
create_work_directory || return 1
cuda_check
- # always ensure proper ownership
- chown -R "${USER}:${GROUP}" "${RUNTIMEDIR}"
-
- if [ ! -f "${RUNTIMEDIR}/lockfile" ]; then
+ if [[ ! -f "${RUNTIMEDIR}/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."
@@ -94,14 +114,17 @@ start_pre() {
start() {
- if [ "${ALLOW_REMOTE_RPC}" = "yes" ]; then
+ if [[ "${ALLOW_REMOTE_RPC}" = "yes" ]]; then
ARGS="${ARGS} --allow_remote_gui_rpc"
fi
- ARGS="${ARGS} --daemon --dir "${RUNTIMEDIR}" --redirectio"
+ ARGS="${ARGS} --dir "${RUNTIMEDIR}" --redirectio"
ebegin "Starting ${RC_SVCNAME}"
- start-stop-daemon -S -N ${NICELEVEL} -u ${USER} -q -x "${BOINCBIN}" -- ${ARGS}
+ start-stop-daemon --start --nicelevel ${NICELEVEL} \
+ --user "${USER}:${GROUP}" --quiet --make-pidfile \
+ --pidfile "$BOINC_PIDFILE" --background \
+ --exec "${BOINCBIN}" -- ${ARGS}
eend $?
}
@@ -113,7 +136,7 @@ attach() {
env_check || return 1
- einfo "If you cant find your account key just try to obtain it by using:"
+ einfo "If you can't find your account key just try to obtain it by using:"
einfo " boinccmd --passwd PASSWORD_FROM_GUI_RPC_AUTH --lookup_account URL EMAIL PASSWORD"
printf " Enter the Project URL: "
@@ -130,16 +153,19 @@ attach() {
fi
ebegin "${RC_SVCNAME}: Attaching to project"
- start-stop-daemon -u ${USER} -q -d "${RUNTIMEDIR}" -x boinccmd -- ${password} --project_attach ${url} ${key}
+ start-stop-daemon --user "${USER}:${GROUP}" --quiet \
+ --chdir "${RUNTIMEDIR}" --exec "${BOINCCMD}" \
+ -- ${password} --project_attach ${url} ${key}
eend $?
- sleep 10
+ sleep 10s
tail "${RUNTIMEDIR}/stdoutdae.txt"
}
stop() {
local password=""
+ local stop_timeout="SIGTERM/60/SIGTERM/30/SIGKILL/30"
env_check || return 1
@@ -148,20 +174,54 @@ stop() {
fi
ebegin "Stopping ${RC_SVCNAME}"
- start-stop-daemon -u ${USER} -q -d "${RUNTIMEDIR}" -x boinccmd -- ${password} --quit
+ start-stop-daemon --stop --quiet --progress \
+ --retry $stop_timeout \
+ --pidfile "${BOINC_PIDFILE}"
eend $?
}
resume() {
- for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do
- boinccmd --project ${url} resume
+ env_check || return 1
+
+ local password=""
+ local master_urls=( \
+ $("${BOINCCMD}" --get_project_status | \
+ sed -n 's/\s*master URL: //p') \
+ )
+
+ if need_passwd_arg; then
+ password="--passwd \"$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")\""
+ fi
+
+ for url in "${master_urls[@]}"; do
+ ebegin "Resuming $url"
+ start-stop-daemon --user "${USER}:${GROUP}" --quiet \
+ --chdir "${RUNTIMEDIR}" --exec "${BOINCCMD}" \
+ -- ${password} --project ${url} resume
+ eend $?
done
}
suspend() {
- for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do
- boinccmd --project ${url} suspend;
+ env_check || return 1
+
+ local password=""
+ local master_urls=( \
+ $("${BOINCCMD}" --get_project_status | \
+ sed -n 's/\s*master URL: //p') \
+ )
+
+ if need_passwd_arg; then
+ password="--passwd \"$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")\""
+ fi
+
+ for url in "${master_urls[@]}"; do
+ ebegin "Suspending $url"
+ start-stop-daemon --user "${USER}:${GROUP}" --quiet \
+ --chdir "${RUNTIMEDIR}" --exec "${BOINCCMD}" \
+ -- ${password} --project ${url} suspend
+ eend $?
done
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/
@ 2016-11-12 15:39 David Seifert
0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2016-11-12 15:39 UTC (permalink / raw
To: gentoo-commits
commit: 14de3518f17d22f210aa99d1023f13aeaa49c8de
Author: Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Sat Nov 12 15:23:43 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Nov 12 15:39:11 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14de3518
sci-misc/boinc: Add suspend/resume to boinc init script, fix null byte input.
Gentoo-Bug: 493476
Enable users to suspend/resume all projects without having to start
and use the manager GUI.
Gentoo-Bug: 584386 (partly)
After upgrading to the current app-shells/bash-4.4 the stop command
provokes the following warning:
"command substitution: ignored null byte in input"
This happens due to the usage of "cut" with --output-delimiter=''.
Obviously "cut" puts a null byte out if the delimiter was set to
nothing. (Checked with hexdump, it does.)
The fix is to use "tr -d ." to concatenate the version numbers, and
then to compare against an "expr substr".
Package-Manager: portage-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/2768
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sci-misc/boinc/files/boinc.init | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index e20c8df..07b8b80 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -3,7 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-extra_started_commands="attach"
+extra_started_commands="attach resume suspend"
depend() {
@@ -59,9 +59,9 @@ env_check() {
need_passwd_arg() {
- local vers=$(${BOINCBIN} --version | cut -d '.' --output-delimiter='' -f 1,2)
- [ -z "$vers" ] && vers=0
- [ $vers -lt 74 ] && return 0
+ local vers=$(${BOINCBIN} --version | tr -d .)
+ [ -z "$vers" ] && vers="00"
+ [ $(expr substr "$vers" 1 2) -lt 74 ] && return 0
# From version 7.4 on, the default is to read
# gui_rpc_auth.cfg for the password.
@@ -151,3 +151,17 @@ stop() {
start-stop-daemon -u ${USER} -q -d "${RUNTIMEDIR}" -x boinccmd -- ${password} --quit
eend $?
}
+
+
+resume() {
+ for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do
+ boinccmd --project ${url} resume
+ done
+}
+
+
+suspend() {
+ for url in $(boinccmd --get_project_status | sed -n 's/\s*master URL: //p'); do
+ boinccmd --project ${url} suspend;
+ done
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/
@ 2016-04-26 7:23 Patrice Clement
0 siblings, 0 replies; 5+ messages in thread
From: Patrice Clement @ 2016-04-26 7:23 UTC (permalink / raw
To: gentoo-commits
commit: 6fbb2367cc20a9b34acde2f1df699900f310a9cf
Author: Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Wed Apr 13 12:09:53 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 07:07:58 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fbb2367
sci-misc/boinc: Migrated boinc.init to use start-stop-daemon
The boinc init script can no longer start, attach or stop the boinc
manager if openrc-0.20 and newer is used, because openrc no longer
passes $SHELL to init scripts.
To solve the issue the init script has been migrated to use
start-stop-daemon instead of using 'su' directly.
This change should have no impact for users of previous openrc
versions.
Gentoo-Bug: https://bugs.gentoo.org/574260
Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1244
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
sci-misc/boinc/files/boinc.init | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index a350e3e..6ed9041 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -1,4 +1,7 @@
#!/sbin/runscript
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
extra_started_commands="attach"
@@ -59,7 +62,7 @@ start() {
fi
ebegin "Starting ${SVCNAME}"
- su -m ${USER} -c "nice -n ${NICELEVEL} \"${BOINCBIN}\" ${ARGS} --daemon --dir \"${RUNTIMEDIR}\" --redirectio"
+ start-stop-daemon -S -N ${NICELEVEL} -u ${USER} -q -x "${BOINCBIN}" -- ${ARGS} --daemon --dir "${RUNTIMEDIR}" --redirectio
eend $?
}
@@ -81,7 +84,7 @@ attach() {
password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
ebegin "${SVCNAME}: Attaching to project"
- su -m ${USER} -c "boinccmd --passwd \"${password}\" --project_attach ${url} ${key}"
+ start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --project_attach ${url} ${key}
eend $?
unset password url key
@@ -96,7 +99,7 @@ stop() {
password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
ebegin "Stopping ${SVCNAME}"
- su -m ${USER} -c "boinccmd --passwd \"${password}\" --quit"
+ start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --quit
eend $?
unset password
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-21 21:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-29 20:10 [gentoo-commits] repo/gentoo:master commit in: sci-misc/boinc/files/ David Seifert
-- strict thread matches above, loose matches on Subject: below --
2021-02-21 21:30 Conrad Kostecki
2017-01-04 13:42 David Seifert
2016-11-12 15:39 David Seifert
2016-04-26 7:23 Patrice Clement
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox