summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2025-02-14 09:21:35 +0100
committerAlexander Leidinger <netchild@FreeBSD.org>2025-02-14 09:21:35 +0100
commit353e24e2753c2b774a7b44f2da0440a501fc906b (patch)
tree83993b99d678ee841492774a7e029105d1a9dce3
parentprint/py-pypdf: Update to 5.3.0 (diff)
biology/linux-foldingathome: Update to 8.4.9.
The sample config is from the old version, the new one doesn't come with a sample config. While I'm here, add svcj options to the start script. Reviewed by: 0mp Approved by: 0mp
-rw-r--r--biology/linux-foldingathome/Makefile23
-rw-r--r--biology/linux-foldingathome/distinfo6
-rw-r--r--biology/linux-foldingathome/files/config.xml.sample64
-rw-r--r--biology/linux-foldingathome/files/fahclient.in9
-rw-r--r--biology/linux-foldingathome/files/pkg-message.in7
-rw-r--r--biology/linux-foldingathome/pkg-plist3
6 files changed, 92 insertions, 20 deletions
diff --git a/biology/linux-foldingathome/Makefile b/biology/linux-foldingathome/Makefile
index 656e4a1bcaa9..93c320c4176c 100644
--- a/biology/linux-foldingathome/Makefile
+++ b/biology/linux-foldingathome/Makefile
@@ -1,10 +1,10 @@
PORTNAME= foldingathome
-DISTVERSION= 7.6.21
+DISTVERSION= 8.4.9
CATEGORIES= biology linux
-MASTER_SITES= https://download.foldingathome.org/releases/v7/public/fahclient/centos-6.7-64bit/release/
+MASTER_SITES= https://download.foldingathome.org/releases/public/fah-client/debian-10-64bit/release/
PKGNAMEPREFIX= linux-
-DISTNAME= fahclient-${DISTVERSION}-1
-EXTRACT_SUFX= .x86_64.rpm
+DISTNAME= fah-client_${DISTVERSION}-64bit-release
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= 0mp@FreeBSD.org
COMMENT= Folding@home Client
@@ -13,15 +13,15 @@ WWW= https://foldingathome.org/
# Distribution without permission is prohibited
LICENSE= FAHSL
LICENSE_NAME= Folding@home Software License
-LICENSE_FILE= ${WRKSRC}/usr/share/doc/fahclient/copyright
+LICENSE_FILE= ${WRKSRC}/${DISTNAME}/LICENSE
LICENSE_PERMS= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell \
auto-accept
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS_REASON= has not been ported to this architecture
-USES= dos2unix linux
-DOS2UNIX_FILES= usr/share/doc/fahclient/*
+USES= linux:rl9
+USE_LINUX= systemd-libs
USE_RC_SUBR= fahclient
ETCDIR= ${PREFIX}/etc/fahclient
@@ -45,19 +45,18 @@ OPTIONS_DEFINE= DOCS
_FAHCLIENT_CONFIG_XML= ${ETCDIR}/config.xml
_FAHCLIENT_WORK_DIR= /var/db/fahclient
-_FAHCLIENT_PROGRAM= ${PREFIX}/bin/FAHClient
+_FAHCLIENT_PROGRAM= ${PREFIX}/bin/fah-client
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/usr/bin/FAHClient ${STAGEDIR}${PREFIX}/bin/
- ${INSTALL_PROGRAM} ${WRKSRC}/usr/bin/FAHCoreWrapper ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/${DISTNAME}/fah-client ${STAGEDIR}${PREFIX}/bin/
@${MKDIR} ${STAGEDIR}${ETCDIR}
- ${INSTALL_DATA} ${WRKSRC}/usr/share/doc/fahclient/sample-config.xml \
+ ${INSTALL_DATA} ${FILESDIR}/config.xml.sample \
${STAGEDIR}${_FAHCLIENT_CONFIG_XML}.sample
@${MKDIR} ${STAGEDIR}${_FAHCLIENT_WORK_DIR}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/usr/share/doc/fahclient/|} \
+ ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/${DISTNAME}/|} \
${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/biology/linux-foldingathome/distinfo b/biology/linux-foldingathome/distinfo
index 33d4bcc5607a..39784f4f8008 100644
--- a/biology/linux-foldingathome/distinfo
+++ b/biology/linux-foldingathome/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1624640434
-SHA256 (fahclient-7.6.21-1.x86_64.rpm) = a9f8b5073cd800cc63e32c623a8b4d7487c4e19a1e84760202e451b997d95073
-SIZE (fahclient-7.6.21-1.x86_64.rpm) = 3779272
+TIMESTAMP = 1739437601
+SHA256 (fah-client_8.4.9-64bit-release.tar.bz2) = 2acccbeda05649f6f913d29f91a22308e88ec3e117499f636a18dc56244d6cf1
+SIZE (fah-client_8.4.9-64bit-release.tar.bz2) = 3649371
diff --git a/biology/linux-foldingathome/files/config.xml.sample b/biology/linux-foldingathome/files/config.xml.sample
new file mode 100644
index 000000000000..9efd165f6abf
--- /dev/null
+++ b/biology/linux-foldingathome/files/config.xml.sample
@@ -0,0 +1,64 @@
+<config>
+ <!--
+ This is a sample XML configuration file for the Folding@home
+ console client. This configuration file format is explained
+ in detail in the Client User's Guide.
+
+ Copy this file to 'config.xml' and edit.
+
+ To set your user name, team and passkey just edit the text
+ in quotes below.
+ -->
+
+ <!-- User Information -->
+ <user value="anonymous"/> <!-- Enter your user name here -->
+ <team value="0"/> <!-- Your team number -->
+ <passkey value=""/> <!-- 32 hexadecimal characters if provided -->
+
+ <power value="light"/>
+ <gpu value="false"/> <!-- If true, attempt to autoconfigure GPUs -->
+ <fold-anon value="false"/>
+
+ <!-- Folding Slots
+ No folding slot configuration is necessary. The client will
+ automaticlaly choose a good configuration for you. However, here
+ are some examples:
+
+ <slot id="0" type="CPU"/>
+
+ or
+
+ <slot id="0" type="CPU"/>
+ <slot id="1" type="GPU"/>
+
+ All slots in a configuration MUST have unique ids.
+ -->
+
+ <!-- Granting Remote FAHControl Access
+ To grant remote access to FAHControl and the remote command server add
+ the following:
+
+ <allow>127.0.0.1 x.x.x.x</allow>
+ <password>PASS</password>
+
+ Where x.x.x.x is the IP address of the computer which should be granted
+ remote access and PASS is you choose to further secure the connection.
+ -->
+
+ <!-- Granting Remote Web Access
+ If you would like to grant remote Web access then you need these two
+ configuration lines:
+
+ <allow>127.0.0.1 x.x.x.x</allow>
+ <web-allow>127.0.0.1 x.x.x.x</web-allow>
+
+ Where x.x.x.x is the IP address of the computer which should be granted
+ remote access. You may also need to open port 7396 on your firewall.
+
+ You can then access the Web interface remotely by going to this address:
+
+ http://y.y.y.y:7396/
+
+ Where y.y.y.y is the IP address of this computer.
+ -->
+</config>
diff --git a/biology/linux-foldingathome/files/fahclient.in b/biology/linux-foldingathome/files/fahclient.in
index 6b42171980fe..8cc7e80e0d7d 100644
--- a/biology/linux-foldingathome/files/fahclient.in
+++ b/biology/linux-foldingathome/files/fahclient.in
@@ -67,6 +67,7 @@ load_rc_config 'fahclient'
: "${fahclient_enable:=NO}"
: "${fahclient_user:=fahclient}"
: "${fahclient_chdir:=%%FAHCLIENT_WORK_DIR%%}"
+: "${fahclient_svcj_options:=net_basic}"
: "${fahclient_donor:=Anonymous}"
: "${fahclient_team:=11743}"
@@ -78,7 +79,7 @@ load_rc_config 'fahclient'
pidfile="${fahclient_pidfile}"
procname="%%FAHCLIENT_PROGRAM%%"
command="/usr/sbin/daemon"
-command_args="-o ${fahclient_logfile} -p ${pidfile} -- ${procname}"
+command_args="-p ${pidfile} -- ${procname}"
# Some notes on the specified options:
# - fahclient_flags are passed in before other options by the rc
# framework.
@@ -96,7 +97,10 @@ _fahclient_command_args=
_fahclient_command_args="${_fahclient_command_args} --user=${fahclient_donor}"
_fahclient_command_args="${_fahclient_command_args} --team=${fahclient_team}"
_fahclient_command_args="${_fahclient_command_args} --config=${fahclient_config}"
-_fahclient_command_args="${_fahclient_command_args} --chdir=${fahclient_chdir}"
+#_fahclient_command_args="${_fahclient_command_args} --chdir=${fahclient_chdir}"
+_fahclient_command_args="${_fahclient_command_args} --log=${fahclient_logfile}"
+_fahclient_command_args="${_fahclient_command_args} --log-rotate-dir=$(dirname ${fahclient_logfile})"
+_fahclient_command_args="${_fahclient_command_args} --log-to-screen=false"
_fahclient_command_args="${_fahclient_command_args} ${fahclient_extra_flags}"
command_args="${command_args} ${_fahclient_command_args}"
extra_commands="log showconfig"
@@ -107,4 +111,5 @@ if [ -n "$fahclient_user" ]; then
fi
required_modules='linprocfs linsysfs linux64:linux64elf'
+cd ${fahclient_chdir}
run_rc_command "$1"
diff --git a/biology/linux-foldingathome/files/pkg-message.in b/biology/linux-foldingathome/files/pkg-message.in
index 01766900a847..3df201f3a973 100644
--- a/biology/linux-foldingathome/files/pkg-message.in
+++ b/biology/linux-foldingathome/files/pkg-message.in
@@ -26,7 +26,12 @@ Here is a list of steps to quickly get started with Folding@home on FreeBSD:
service fahclient start
-At this point, the daemon should be up and folding.
+At this point, the daemon should be up. By default it listens on http://localhost:7396
+for incoming HTTP connections. There you can login and configure and/or
+register/connect with your F@H account. If you have already an existing account you
+can join by getting the account-token from there and adding it either to a config
+file or by running
+ sysrc fahclient_extra_flags+=" --account-token=<your-token>"
Additional notes
================
diff --git a/biology/linux-foldingathome/pkg-plist b/biology/linux-foldingathome/pkg-plist
index be21039da1c9..4079af2c2b99 100644
--- a/biology/linux-foldingathome/pkg-plist
+++ b/biology/linux-foldingathome/pkg-plist
@@ -1,5 +1,4 @@
-bin/FAHClient
-bin/FAHCoreWrapper
+bin/fah-client
@dir(fahclient,fahclient,) %%ETCDIR%%
@sample(fahclient,fahclient,) %%ETCDIR%%/config.xml.sample
@dir(fahclient,fahclient,) %%FAHCLIENT_WORK_DIR%%