summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Gauduin2020-04-21 11:01:34 +0200
committerMaxime Gauduin2020-04-21 11:02:03 +0200
commit56a02d0cbb7f2fe04ed992a42a25904000398b4e (patch)
treed77ca04fe853b4b7a5eb4f1506b3775d7ebbd97d
parentd2d54115859c5daf581b4cd2174e818ffce0c447 (diff)
downloadaur-56a02d0cbb7f2fe04ed992a42a25904000398b4e.tar.gz
add foldingathome-nvidia.service
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD7
-rw-r--r--foldingathome-nvidia.service13
-rw-r--r--foldingathome.install7
-rw-r--r--foldingathome.service5
5 files changed, 29 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fa18feeefc7..3b88a10c1ad 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = foldingathome
pkgdesc = A distributed computing project for simulating protein dynamics
pkgver = 7.6.9
- pkgrel = 2
+ pkgrel = 3
url = https://foldingathome.org/
install = foldingathome.install
arch = x86_64
@@ -17,10 +17,12 @@ pkgbase = foldingathome
backup = etc/foldingathome/config.xml
source = https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.6/fahclient_7.6.9-64bit-release.tar.bz2
source = foldingathome.service
+ source = foldingathome-nvidia.service
source = foldingathome-user.service
source = GPUs.txt
sha256sums = b580a8076f3147bacb9d1599e1b1765956a8e37b8a79bd961ffe2e3adc7df110
- sha256sums = 03633db6db07d2d5f077e14caeec6398f2302d684374f2fe6394ab3edc2de995
+ sha256sums = df73687b3171fe846b81e0c1ce414f11d23bb72d3a0a08af1be14da35a935693
+ sha256sums = b5f5f78c41bd44ff236613d3838f8c679dc6f322cfdb52baee44868b6db34ac2
sha256sums = 41997239dc363570e2ca5bec0eca8c7d88aada6ace0bb5793bf3ec6d101f40bb
sha256sums = 5944a6df06b42c5edd4e5f0922f16e3f04cb755bd248d0e610c9262f3814aff9
diff --git a/PKGBUILD b/PKGBUILD
index a02928a97ec..d61b96665bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=foldingathome
pkgver=7.6.9
-pkgrel=2
+pkgrel=3
pkgdesc='A distributed computing project for simulating protein dynamics'
arch=(x86_64)
url=https://foldingathome.org/
@@ -27,11 +27,13 @@ install=foldingathome.install
source=(
https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v${pkgver%.*}/fahclient_${pkgver}-64bit-release.tar.bz2
foldingathome.service
+ foldingathome-nvidia.service
foldingathome-user.service
GPUs.txt
)
sha256sums=('b580a8076f3147bacb9d1599e1b1765956a8e37b8a79bd961ffe2e3adc7df110'
- '03633db6db07d2d5f077e14caeec6398f2302d684374f2fe6394ab3edc2de995'
+ 'df73687b3171fe846b81e0c1ce414f11d23bb72d3a0a08af1be14da35a935693'
+ 'b5f5f78c41bd44ff236613d3838f8c679dc6f322cfdb52baee44868b6db34ac2'
'41997239dc363570e2ca5bec0eca8c7d88aada6ace0bb5793bf3ec6d101f40bb'
'5944a6df06b42c5edd4e5f0922f16e3f04cb755bd248d0e610c9262f3814aff9')
@@ -43,6 +45,7 @@ package() {
install -Dm 644 fahclient_${pkgver}-64bit-release/copyright -t "${pkgdir}"/usr/share/licenses/foldingathome/
install -Dm 644 fahclient_${pkgver}-64bit-release/sample-config.xml "${pkgdir}"/etc/foldingathome/config.xml
install -Dm 644 foldingathome.service -t "${pkgdir}"/usr/lib/systemd/system/
+ install -Dm 644 foldingathome-nvidia.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm 644 foldingathome-user.service "${pkgdir}"/usr/lib/systemd/user/foldingathome.service
install -Dm 644 GPUs.txt -t "${pkgdir}"/etc/foldingathome/
}
diff --git a/foldingathome-nvidia.service b/foldingathome-nvidia.service
new file mode 100644
index 00000000000..05851182246
--- /dev/null
+++ b/foldingathome-nvidia.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Folding@home helper for NVIDIA GPUs
+After=default.target
+After=network.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/nvidia-modprobe
+ExecStart=/usr/bin/nvidia-modprobe -c 0 -u
+
+[Install]
+WantedBy=default.target
+
diff --git a/foldingathome.install b/foldingathome.install
index b40a15c96bf..0748e4bed3f 100644
--- a/foldingathome.install
+++ b/foldingathome.install
@@ -1,12 +1,15 @@
post_install() {
cat << 'EOF'
- --> To join the Arch Linux team, please use team number 45032
+ --> To start folding, please enable and start foldingathome.service.
+ --> If you have an NVIDIA GPU, please first enable and start
+ --> foldingathome-nvidia.service.
+ --> To join the Arch Linux team, please use team number 45032.
EOF
}
post_upgrade() {
cat << 'EOF'
- --> Please migrate your configuration to /etc/foldingathome/config.xml
+ --> Please migrate your configuration to /etc/foldingathome/config.xml.
EOF
}
diff --git a/foldingathome.service b/foldingathome.service
index 1269a9badb0..d6edba73e68 100644
--- a/foldingathome.service
+++ b/foldingathome.service
@@ -1,7 +1,8 @@
[Unit]
Description=Folding@home distributed computing client
-After=multi-user.target
+After=default.target
After=network.target
+After=foldingathome-nvidia.service
[Service]
Type=simple
@@ -21,8 +22,6 @@ IOSchedulingClass=3
ReadWritePaths=-/dev/nvidia0
ReadWritePaths=-/dev/nvidiactl
ReadWritePaths=-/dev/nvidia-uvm
-ExecStartPre=!-/usr/bin/nvidia-modprobe
-ExecStartPre=!-/usr/bin/nvidia-modprobe -c 0 -u
[Install]
WantedBy=default.target