FoldingAtHome / fah-client-bastet

Folding@home client, code named Bastet
GNU General Public License v3.0
74 stars 12 forks source link

Invalid user 'fah-client' - 8.3.5 #248

Closed CHDAFNI-MSFT closed 4 months ago

CHDAFNI-MSFT commented 5 months ago

headless install on Ubuntu 18_04-lts

I'm used to using the latest stable release - I'm now trying out the 8.x version so my modified install code is likely poor.

Error msg:

Setting up fah-client (8.3.5) ...
install: invalid user ‘fah-client’
dpkg: error processing package fah-client (--configure):
 installed fah-client package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 fah-client
E: Sub-process /usr/bin/dpkg returned an error code (1)

On at least 1 occasion, I did see a group called 'fah-client' - but not the user didn't exist

-- Install script --

sudo add-apt-repository -y ppa:graphics-drivers
sudo apt-get install -y nvidia-driver-430
sudo apt install -y ocl-icd-opencl-dev
sudo apt-get update

    # download and untar
echo apt-get install -y wget bzip2
sudo apt-get install -y wget bzip2 && \

echo sudo apt-get purge -y wget bzip2
sudo apt-get purge -y wget bzip2 && \

echo apt-get clean autoclean
sudo apt-get clean autoclean && \

echo sudo apt-get autoremove
sudo apt-get autoremove --yes && \

echo mkdir /etc/fah-client/
mkdir /etc/fah-client/

echo making config
sudo cat <<EOT >> /etc/fah-client/config.xml
<config>
    <account-token v="TOKEN REDACTED"/>
</config>
EOT

echo wget latest.deb
sudo wget https://download.foldingathome.org/releases/beta/fah-client/debian-10-64bit/release/latest.deb

echo install latest.deb
sudo apt install ./latest.deb
Hou5e commented 5 months ago

(I didn't try to reproduce this) But, are you having permission issues with the config.xml file (or the folder)? FAH v8 doesn't work unless the Owner/Group permissions are set to the fah-client user, like: image

Maybe try adding commands to change the file and folder permissions with that install script order before the FAH installation.

Or, change the script order to run the FAH installer first to make the /etc/fah-client/ folder and config.xml file, then afterwards rewrite the config XML settings to what you want them to be. Where you you might need to stop FAH and restart it with the new config settings at the end with: sudo systemctl restart fah-client.

kbernhagen commented 5 months ago

Optionally creating config.xml before installing is the intended means of pre-configuring a new install.

The post install script will try to set owner and permissions. https://github.com/FoldingAtHome/fah-client-bastet/blob/master/install/debian/postinst.in

kbernhagen commented 5 months ago

The pre install script tries to create the user and group.

jcoffland commented 5 months ago

Try the latest alpha, it's about to go beta anyway: https://foldingathome.org/alpha/

marcosfrm commented 5 months ago

The question is why fah-client user did not exist when postinst ran (failed at install -d). Should be created by preinst...

https://github.com/FoldingAtHome/fah-client-bastet/blob/master/install/debian/preinst

Can you purge fah-client and try again?

postinst will only change ownership of /etc/fah-client/config.xml when it does not exist (importing from v7, from /var/lib/fah-client or creating an empty config). Perhaps we could move down the chown/chmod calls to always run... Edit: but in this case it would need to fix /etc/fah-client/ directory ownership too I think. 😞

jcoffland commented 4 months ago

Please reopen if you can reproduce this on the latest client version.