c_josie_overlay

sci-biology/fah-client-bin: add webui flag + fah-web-control-bin

Add sci-biology/fah-web-control-bin, upstream's prebuilt Vue/Vite Web Control
bundle (v8.5.7; the source repo has no lockfile, so it is not rebuilt),
installed to /usr/share/fah-client/webui.

The new webui flag on fah-client-bin pulls that package in and writes
/etc/fah-client/config.xml with web-root pointing at it, so the client's
built-in web server serves the local UI at http://localhost:7396/.

5fcd1226674d174c57dab5ab5c38b261a06e2c80
cjosie <administrator@josie-c.com> · 2026-10-14T23:37 · browse files at this commit

parents: 78f6f13

diff --git a/sci-biology/fah-client-bin/fah-client-bin-8.5.6.ebuild b/sci-biology/fah-client-bin/fah-client-bin-8.5.6.ebuild
index 754fe2c..4438c8b 100644
--- a/sci-biology/fah-client-bin/fah-client-bin-8.5.6.ebuild
+++ b/sci-biology/fah-client-bin/fah-client-bin-8.5.6.ebuild
@@ -16,7 +16,7 @@ S="${WORKDIR}"
 LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="systemd"
+IUSE="systemd webui"
 RESTRICT="bindist mirror strip"
 QA_PREBUILT="usr/bin/fah-client"
 
@@ -29,6 +29,7 @@ RDEPEND="
 	virtual/zlib
 	systemd? ( sys-apps/systemd )
 	!systemd? ( sys-auth/elogind )
+	webui? ( sci-biology/fah-web-control-bin )
 "
 
 src_prepare() {
@@ -54,7 +55,17 @@ src_install() {
 	newinitd "${FILESDIR}"/fah-client.initd fah-client
 
 	insinto /etc/fah-client
-	doins "${FILESDIR}"/config.xml
+	if use webui; then
+		# Point the client's built-in web server at the locally installed Web Control.
+		cat > "${T}"/config.xml <<-EOF || die
+		<config>
+		  <web-root v='/usr/share/fah-client/webui'/>
+		</config>
+		EOF
+		newins "${T}"/config.xml config.xml
+	else
+		doins "${FILESDIR}"/config.xml
+	fi
 
 	insinto /usr/share/polkit-1/rules.d
 	doins usr/share/polkit-1/rules.d/10-fah-client.rules
@@ -74,6 +85,9 @@ src_install() {
 pkg_postinst() {
 	optfeature "command-line control with fahctl" dev-python/websocket-client
 	optfeature "sleep inhibition through logind" sys-auth/polkit
+	if use webui; then
+		elog "Local Web Control is installed at http://localhost:7396/"
+	fi
 	elog "Control the client from your browser at https://v8-5.foldingathome.org/"
 	elog "or with fahctl. Start the service with:"
 	elog "(openrc)\trc-service fah-client start"
diff --git a/sci-biology/fah-client-bin/metadata.xml b/sci-biology/fah-client-bin/metadata.xml
index d496af1..75de9b6 100644
--- a/sci-biology/fah-client-bin/metadata.xml
+++ b/sci-biology/fah-client-bin/metadata.xml
@@ -8,4 +8,7 @@
 	<upstream>
 		<remote-id type="github">FoldingAtHome/fah-client-bastet</remote-id>
 	</upstream>
+	<use>
+		<flag name="webui">Pull in sci-biology/fah-web-control-bin and point the client's built-in web server at the local Web Control</flag>
+	</use>
 </pkgmetadata>
diff --git a/sci-biology/fah-web-control-bin/Manifest b/sci-biology/fah-web-control-bin/Manifest
new file mode 100644
index 0000000..5dc018e
--- /dev/null
+++ b/sci-biology/fah-web-control-bin/Manifest
@@ -0,0 +1 @@
+DIST fah-web-control_8.5.7.zip 936846 BLAKE2B 574d4a93341063e641bb34e4b6e8fe700d6e23123201eba8c3be811c5d7f0788a628e71cb78a42d0068f48dbcce4e4f050c6db8c95eb3c1d5a00c3213d2baf8c SHA512 e1bf0958d21f9fe37e3f3221e0e49d163e15d3bc0cc4fa0e7f9e69e6f96e2035b368678111e20c760e8d461535619db0f9ca4e21dc91e9134c3d4c0e10fe08a3
diff --git a/sci-biology/fah-web-control-bin/fah-web-control-bin-8.5.7.ebuild b/sci-biology/fah-web-control-bin/fah-web-control-bin-8.5.7.ebuild
new file mode 100644
index 0000000..947e1eb
--- /dev/null
+++ b/sci-biology/fah-web-control-bin/fah-web-control-bin-8.5.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit unpacker
+
+DESCRIPTION="Folding@home v8 Web Control, the browser UI served by fah-client"
+HOMEPAGE="https://foldingathome.org/"
+# Prebuilt Vue/Vite bundle. The source (github.com/FoldingAtHome/fah-web-client-bastet)
+# ships no lockfile, so it is not rebuilt here; upstream publishes this zip.
+SRC_URI="https://download.foldingathome.org/releases/public/fah-web-control/debian-13-64bit/release/fah-web-control_${PV}.zip"
+S="${WORKDIR}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="bindist mirror strip"
+
+BDEPEND="app-arch/unzip"
+
+src_install() {
+	# The bundle's dist/ directory is the client's web root (index.html + assets).
+	dodir /usr/share/fah-client/webui
+	cp -a fah-web-control_${PV}/dist/. "${ED}"/usr/share/fah-client/webui/ || die
+	dodoc fah-web-control_${PV}/LICENSE
+}
diff --git a/sci-biology/fah-web-control-bin/metadata.xml b/sci-biology/fah-web-control-bin/metadata.xml
new file mode 100644
index 0000000..fefe3b4
--- /dev/null
+++ b/sci-biology/fah-web-control-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>administrator@josie-c.com</email>
+		<name>cjosie</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">FoldingAtHome/fah-web-client-bastet</remote-id>
+	</upstream>
+</pkgmetadata>