diff options
-rw-r--r-- | academic/boinc/README | 11 | ||||
-rw-r--r-- | academic/boinc/README.Slackware | 27 | ||||
-rw-r--r-- | academic/boinc/boinc.SlackBuild | 23 | ||||
-rw-r--r-- | academic/boinc/boinc.info | 6 | ||||
-rw-r--r-- | academic/boinc/boincgui.sh | 2 | ||||
-rw-r--r-- | academic/boinc/doinst.sh | 26 | ||||
-rw-r--r-- | academic/boinc/rc.boinc.txt | 105 |
7 files changed, 182 insertions, 18 deletions
diff --git a/academic/boinc/README b/academic/boinc/README index 35ab04a75adda..b617f82986776 100644 --- a/academic/boinc/README +++ b/academic/boinc/README @@ -14,21 +14,18 @@ types of scientific research. It's safe, secure, and easy. Building -(1) BOINC needs a static library for wxGTK3, compile with - - STATIC=yes ./wxGTK3.SlackBuild - -(2) Edit DATADIR in the script or run +(1) Edit DATADIR in the script or run DATADIR="/home/<user>/.boinc_data" ./boinc.SlackBuild to set the data directory in your user's home and build the package. -(3) If you do not wish to build the boincmgr GUI, +(2) If you do not wish to build the boincmgr GUI, BOINCMGR=no ./boinc.SlackBuild -then you do not need to install the dependencies (wxGTK3). +then you do not need to install the dependencies (wxGTK3). See +README.Slackware for details. After installation you need to join a BOINC project: http://boinc.berkeley.edu/projects.php diff --git a/academic/boinc/README.Slackware b/academic/boinc/README.Slackware new file mode 100644 index 0000000000000..5dc39e60abc88 --- /dev/null +++ b/academic/boinc/README.Slackware @@ -0,0 +1,27 @@ +For headless operation, a start up script is included. The script will +execute as root with the data directory as '/var/lib/boinc_data'. +Modify as needed: + +BOINC_DIR=/var/lib/boinc_data # directory of boinc files +BOINC_USER=root # user that will run boinc process + +Refer to the boinc manpage for parameters you can add to +BOINC_OPTIONS. + +To run boinc on boot, add the following code to /etc/rc.d/rc.local: + +if [ -x /etc/rc.d/rc.boinc ]; then + /etc/rc.d/rc.boinc start +fi + +and to /etc/rc.d/rc.local_shutdown + +if [ -x /etc/rc.d/rc.boinc ]; then + /etc/rc.d/rc.boinc stop +fi + +Note: The default configuration enables boinc control on the running +host via boinccmg or boincmgr on th same running host. To truly run +headless, you will need to configure boinc to allow RPC access from +another host. + diff --git a/academic/boinc/boinc.SlackBuild b/academic/boinc/boinc.SlackBuild index de61709dc2739..c093c7132566c 100644 --- a/academic/boinc/boinc.SlackBuild +++ b/academic/boinc/boinc.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for boinc -# Copyright 2013-2018 Edward Koenig, Vancouver, WA, USA <kingbeowulf@gmail.com> +# Copyright 2013-2022 Edward Koenig, Vancouver, WA, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,15 +22,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# TODO: add rc.boinc. - -# 20220308 bkw: Modified by SlackBuilds.org: fix conflict with wxPython. +# 01MAY2022: +# Version update +# Removed need for STATIC wxWidgets-3.0 to avoid conflicts. +# Bypass wxconfig symlink for compatibility. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=boinc -VERSION=${VERSION:-7.16.16} -BRANCH=${BRANCH:-7.16} +VERSION=${VERSION:-7.18.1} +BRANCH=${BRANCH:-7.18} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -121,17 +122,25 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r cat $CWD/boincgui.sh > $PKG/usr/bin/boincgui.sh sed -i "s|WORKDIR|$DATADIR|g" $PKG/usr/bin/boincgui.sh chmod +x $PKG/usr/bin/boincgui.sh +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.boinc.txt > $PKG/etc/rc.d/rc.boinc.new mkdir -p $PKG/usr/share/{applications,pixmaps} cp $CWD/boinc.desktop $PKG/usr/share/applications cp $CWD/boinc.png $PKG/usr/share/pixmaps mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING COPYING.LESSER COPYRIGHT INSTALL todo notes $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING COPYING.LESSER COPYRIGHT INSTALL notes $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild rm -f $PKG/usr/lib*/*.la +# remove unneeded init script, systemd service +rm -rf $PKG/etc/default +rm -rf $PKG/etc/init.d +rm -rf $PKG/usr/lib +rm -f $PKG/usr/bin/boinc_client + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh diff --git a/academic/boinc/boinc.info b/academic/boinc/boinc.info index f8f8fc215e714..259064a22773e 100644 --- a/academic/boinc/boinc.info +++ b/academic/boinc/boinc.info @@ -1,8 +1,8 @@ PRGNAM="boinc" -VERSION="7.16.16" +VERSION="7.18.1" HOMEPAGE="https://boinc.berkeley.edu/" -DOWNLOAD="https://github.com/BOINC/boinc/archive/client_release/7.16/7.16.16/boinc-client_release-7.16-7.16.16.tar.gz" -MD5SUM="debf658ed8748c1c434c12f8a8a932a1" +DOWNLOAD="https://github.com/BOINC/boinc/archive/client_release/7.18/7.18.1/boinc-client_release-7.18-7.18.1.tar.gz" +MD5SUM="039fa9d0ad58a23784a162394ac1c599" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="wxGTK3" diff --git a/academic/boinc/boincgui.sh b/academic/boinc/boincgui.sh index 435bb29e63848..5251e68d789c4 100644 --- a/academic/boinc/boincgui.sh +++ b/academic/boinc/boincgui.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2013-2014 Edward Koenig, Vancouver, WA, USA <kingbeowulf@gmail.com> +# Copyright 2013-2014 Edward W. Koenig, Vancouver, WA, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is diff --git a/academic/boinc/doinst.sh b/academic/boinc/doinst.sh index 5fb28930db0b9..9634ecf6f7075 100644 --- a/academic/boinc/doinst.sh +++ b/academic/boinc/doinst.sh @@ -1,3 +1,29 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.boinc.new + if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi diff --git a/academic/boinc/rc.boinc.txt b/academic/boinc/rc.boinc.txt new file mode 100644 index 0000000000000..fe3cf94b76954 --- /dev/null +++ b/academic/boinc/rc.boinc.txt @@ -0,0 +1,105 @@ +#!/bin/bash
+
+# rc.boinc - BOINC startup/control script for Slackware Linux
+#
+# Copyright 2022 Edward Koenig, Vancouver, WA, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+BOINC_DIR=/var/lib/boinc_data # directory of boinc files
+BOINC_BIN=boinc # name of the boinc binary
+BOINC_USER=root # user that will run boinc process
+BOINC_OPTIONS="--dir $BOINC_DIR --redirectio"
+# "--dir $BOINC_DIR --daemon" will send logs syslog instead of
+# stdoutdae.txt and stderrdae.txt
+
+boinc_status() {
+ if ( ps -ef | grep "$BOINC_BIN$" > /dev/null 2>&1 ); then
+ return 0
+ else
+ return 3
+fi
+}
+
+boinc_start() {
+ boinc_status
+ if [ $? = 0 ]; then
+ echo "BOINC is already running"
+ exit 1
+ fi
+
+ if [ ! -d $BOINC_DIR ]; then
+ echo "ERROR: $BOINC_DIR does not exist"
+ exit 1
+ elif [ ! -x BOINC_BIN ]; then
+ echo "ERROR: BOINC_BIN does not exist or not executable"
+ exit 1
+ fi
+
+ echo "Starting BOINC client"
+ su - $BOINC_USER -c "cd $BOINC_DIR; exec /usr/bin/BOINC_BIN $BOINC_OPTIONS" &
+
+}
+
+boinc_stop() {
+ echo "Stopping BOINC client"
+ killall $BOINC_BIN
+}
+
+boinc_restart() {
+ echo "Restarting BOINC client"
+
+ boinc_status
+ if [ $? = 0 ]; then
+ boinc_stop
+ sleep 3
+ boinc_start
+ else
+ boinc_start
+ fi
+}
+
+
+case "$1" in
+ start)
+ boinc_start
+ exit 0
+ ;;
+ stop)
+ boinc_stop
+ exit 0
+ ;;
+ restart)
+ boinc_restart
+ exit 0
+ ;;
+ status)
+ boinc_status
+ if [ $? = 0 ]; then
+ echo "BOINC is running"
+ else
+ echo "BOINC is not running"
+ fi
+ ;;
+ *)
+ echo "Usage: $0 start|stop|restart|status"
+ exit 1
+ ;;
+
+esac
|