diff options
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 89 | ||||
-rw-r--r-- | foldingathome-nvidia.service | 14 | ||||
-rw-r--r-- | foldingathome-user.service | 14 | ||||
-rw-r--r-- | foldingathome.install | 19 | ||||
-rw-r--r-- | foldingathome.service | 26 |
6 files changed, 124 insertions, 73 deletions
@@ -1,23 +1,26 @@ pkgbase = foldingathome - pkgdesc = Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases. - pkgver = 7.4.4 - pkgrel = 4 - url = http://folding.stanford.edu/ + pkgdesc = A distributed computing project for simulating protein dynamics + pkgver = 7.6.21 + pkgrel = 1 + url = https://foldingathome.org/ install = foldingathome.install - arch = i686 arch = x86_64 - license = CUSTOM + license = custom + depends = gcc-libs depends = glibc - optdepends = opencl-nvidia: for folding with an nVidia GPU - optdepends = cuda: for folding with an nVidia GPU - optdepends = opencl-mesa: for folding with an older AMD GPU - optdepends = opencl-amd: for folding with a newer AMD GPU - conflicts = foldingathome-v7 - replaces = foldingathome-v7 - source = https://folding.stanford.edu/releases/public/release/fahclient/debian-testing-64bit/v7.4/fahclient_7.4.4-64bit-release.tar.bz2 + depends = zlib + optdepends = clinfo: for folding with an NVIDIA GPU + optdepends = cuda: for folding with an NVIDIA GPU + optdepends = ocl-icd: for folding with any GPU + optdepends = opencl-driver: for folding with any GPU + backup = etc/foldingathome/config.xml + source = https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.6/fahclient_7.6.21-64bit-release.tar.bz2 source = foldingathome.service - md5sums = 3a068d236d3a508a2a98a4a161fa14e2 - md5sums = dd55dbae3fbe56f90bed0e40f2b0de3c + source = foldingathome-nvidia.service + source = foldingathome-user.service + sha256sums = 37652bd897b4d9fe3e0dbe067df203aa6b29f243c4b8f5e73c18953acd77e6b2 + sha256sums = a5cb7d55bbccbfd95f40e4b489d6de99c2e9336c2ff9ee5ce5ec70893551a84f + sha256sums = 2b50df72017d4312b6af19733aefbcac7f459599f2fb32b66e6abc0887b48d60 + sha256sums = 41997239dc363570e2ca5bec0eca8c7d88aada6ace0bb5793bf3ec6d101f40bb pkgname = foldingathome - @@ -1,54 +1,49 @@ -# Contributor: paul2lv [at] gmail dot com -# Maintainer: +# Maintainer: Maxime Gauduin <alucryd@archlinux.org> +# Contributor: Jonathan Kotta <jpkotta@gmail.com> +# Contributor: paul2lv <paul2lv@gmail.com> +# Contributor: dtw <dibblethewrecker@gmail.com> pkgname=foldingathome -pkgver=7.4.4 -pkgrel=4 -pkgdesc="Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases." -arch=('i686' 'x86_64') -url="http://folding.stanford.edu/" -license=('CUSTOM') -depends=('glibc') -optdepends=('opencl-nvidia: for folding with an nVidia GPU' - 'cuda: for folding with an nVidia GPU' - 'opencl-mesa: for folding with an older AMD GPU' - 'opencl-amd: for folding with a newer AMD GPU') -replaces=('foldingathome-v7') -conflicts=('foldingathome-v7') +pkgver=7.6.21 +pkgrel=1 +pkgdesc='A distributed computing project for simulating protein dynamics' +arch=(x86_64) +url=https://foldingathome.org/ +license=(custom) +depends=( + gcc-libs + glibc + zlib +) +optdepends=( + 'clinfo: for folding with an NVIDIA GPU' + 'cuda: for folding with an NVIDIA GPU' + 'ocl-icd: for folding with any GPU' + 'opencl-driver: for folding with any GPU' +) +backup=(etc/foldingathome/config.xml) install=foldingathome.install - -# Moronic server -DLAGENTS=("https::/usr/bin/curl -k -o %o %u") - -[ "$CARCH" = "i686" ] &&_source_arch="32bit" -[ "$CARCH" = "x86_64" ] && _source_arch="64bit" - -if [ "$CARCH" = "i686" ]; then - -source=(https://folding.stanford.edu/releases/public/release/fahclient/debian-testing-32bit/v7.4/fahclient_7.4.4-32bit-release.tar.bz2 -foldingathome.service) - md5sums=('cfc23aeb72efed82289b53a055618dfc' 'dd55dbae3fbe56f90bed0e40f2b0de3c') - -elif [ "$CARCH" = "x86_64" ]; then - -source=(https://folding.stanford.edu/releases/public/release/fahclient/debian-testing-64bit/v7.4/fahclient_7.4.4-64bit-release.tar.bz2 -foldingathome.service) - md5sums=('3a068d236d3a508a2a98a4a161fa14e2' 'dd55dbae3fbe56f90bed0e40f2b0de3c') -fi - +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 +) +sha256sums=('37652bd897b4d9fe3e0dbe067df203aa6b29f243c4b8f5e73c18953acd77e6b2' + 'a5cb7d55bbccbfd95f40e4b489d6de99c2e9336c2ff9ee5ce5ec70893551a84f' + '2b50df72017d4312b6af19733aefbcac7f459599f2fb32b66e6abc0887b48d60' + '41997239dc363570e2ca5bec0eca8c7d88aada6ace0bb5793bf3ec6d101f40bb') package() { - cd ${srcdir} - - install -D -c -m755 fahclient_${pkgver}-${_source_arch}-release/FAHClient ${pkgdir}/opt/fah/FAHClient - install -D -c -m755 fahclient_${pkgver}-${_source_arch}-release/FAHCoreWrapper ${pkgdir}/opt/fah/FAHCoreWrapper - install -D -c -m755 fahclient_${pkgver}-${_source_arch}-release/sample-config.xml ${pkgdir}/opt/fah/sample-config.xml - - chmod 755 ${pkgdir}/opt/fah/FAHClient - chmod 755 ${pkgdir}/opt/fah/FAHCoreWrapper - install -D -m644 fahclient_${pkgver}-${_source_arch}-release/copyright ${pkgdir}/usr/share/licenses/${pkgname}/copyright - install -D -m644 fahclient_${pkgver}-${_source_arch}-release/README ${pkgdir}/opt/fah/README - install -D -m644 fahclient_${pkgver}-${_source_arch}-release/ChangeLog ${pkgdir}/opt/fah/ChangeLog - install -D -m644 ${srcdir}/foldingathome.service ${pkgdir}/usr/lib/systemd/system/foldingathome.service + install -Dm 755 fahclient_${pkgver}-64bit-release/FAHClient -t "${pkgdir}"/usr/bin/ + install -Dm 755 fahclient_${pkgver}-64bit-release/FAHCoreWrapper -t "${pkgdir}"/usr/bin/ + install -Dm 644 fahclient_${pkgver}-64bit-release/CHANGELOG.md -t "${pkgdir}"/usr/share/doc/foldingathome/ + install -Dm 644 fahclient_${pkgver}-64bit-release/README.md -t "${pkgdir}"/usr/share/doc/foldingathome/ + 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 } +# vim: ts=2 sw=2 et: diff --git a/foldingathome-nvidia.service b/foldingathome-nvidia.service new file mode 100644 index 000000000000..8b416a0ecfeb --- /dev/null +++ b/foldingathome-nvidia.service @@ -0,0 +1,14 @@ +[Unit] +Description=Folding@home helper for NVIDIA GPUs +After=multi-user.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/nvidia-modprobe +ExecStart=/usr/bin/nvidia-modprobe -c 0 -u +ExecStart=/usr/bin/clinfo +ExecStart=/usr/bin/sleep 60 + +[Install] +WantedBy=multi-user.target + diff --git a/foldingathome-user.service b/foldingathome-user.service new file mode 100644 index 000000000000..99ed888051e6 --- /dev/null +++ b/foldingathome-user.service @@ -0,0 +1,14 @@ +[Unit] +Description=Folding@home distributed computing client +After=network.target + +[Service] +Type=simple +WorkingDirectory=%h/.config/fah +ExecStart=/usr/bin/FAHClient +CPUSchedulingPolicy=idle +IOSchedulingClass=3 + +[Install] +WantedBy=default.target + diff --git a/foldingathome.install b/foldingathome.install index d48431453e1f..0748e4bed3fb 100644 --- a/foldingathome.install +++ b/foldingathome.install @@ -1,10 +1,15 @@ post_install() { - cat << 'EOM' - --> Please cd to /opt/fah/ and execute ./FAHClient --configure - --> as root to configure your settings. If you are using systemd, - --> then run "systemctl enable foldingathome.service" to enable - --> the folding service. If you would like join the Arch Linux - --> team, use team number 45032. -EOM + cat << 'EOF' + --> 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. +EOF } diff --git a/foldingathome.service b/foldingathome.service index 5219a6317ca8..0bbf13d51db6 100644 --- a/foldingathome.service +++ b/foldingathome.service @@ -1,12 +1,32 @@ [Unit] Description=Folding@home distributed computing client +After=multi-user.target After=network.target +After=foldingathome-nvidia.service [Service] Type=simple -WorkingDirectory=/opt/fah -ExecStart=/opt/fah/FAHClient --config /opt/fah/config.xml --exec-directory=/opt/fah --data-directory=/opt/fah +User=fah +SupplementaryGroups=video +DynamicUser=yes +ConfigurationDirectory=foldingathome +LogsDirectory=foldingathome +StateDirectory=fah +WorkingDirectory=/var/lib/fah +ReadWritePaths=-/dev/dri +ExecStartPre=!/usr/bin/chown -R fah:fah /etc/foldingathome +ExecStart=/usr/bin/FAHClient --config /etc/foldingathome/config.xml \ + --log /var/log/foldingathome/log.txt \ + --log-rotate-dir /var/log/foldingathome +CPUSchedulingPolicy=idle +IOSchedulingClass=3 + +# Nvidia +ReadWritePaths=-/dev/nvidia0 +ReadWritePaths=-/dev/nvidiactl +ReadWritePaths=-/dev/nvidia-uvm +ReadWritePaths=-/dev/nvidia-uvm-tools [Install] -WantedBy=multi-user.target +WantedBy=default.target |