FS#59477 - [x2goserver] does not create user dirs and makes shadow.service failed

Attached to Project: Arch Linux
Opened by Alexander Meshcheryakov (Self-Perfection) - Saturday, 28 July 2018, 19:02 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 12 August 2018, 18:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
x2goserver package setups new users:
$ cat x2goserver/repos/extra-x86_64/sysusers.d
u x2gouser 111 "x2gouser" /var/lib/x2go
u x2goprint 112 "x2goprint" /var/spool/x2go

But somehow home directory for x2goprint user (/var/spoolx2go) is not created on installation.
I'm not sure about /var/lib/x2go dir, I suspect it is created when user runs `x2godbadmin --createdb` after installation.

shadow.service runs '/usr/bin/pwck -r ...' that checks existence of home directories. Missing /var/spool/x2go makes this service status failed.

Therefore x2goserver installation leads to `systemctl status` being degraded.

Additional info:
* package version(s) - 4.1.0.0-2


This task depends upon

Closed by  Andreas Radke (AndyRTR)
Sunday, 12 August 2018, 18:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  4.1.0.2-1
Comment by Doug Newgard (Scimmia) - Sunday, 29 July 2018, 02:27 GMT
Both are created by systemd.tmpfiles, and the hook is run on package installation.
Comment by Alexander Meshcheryakov (Self-Perfection) - Monday, 30 July 2018, 19:17 GMT
Hmmm they are not created on my system. I tried removing and reinstalling x2goserver package before submitting this issue and /var/spool/x2go was not created.

I've even tried fresh arch installation in virtual machine. Installing package x2goserver does NOT create dir /var/spool/x2go

/var/lib/x2go is not created as well, but on installation package produces messages that suggests one should run `x2godbadmin --createdb` which creates /var/lib/x2go and sqlite db inside it.
Comment by Alexander Meshcheryakov (Self-Perfection) - Monday, 30 July 2018, 19:31 GMT
Ok, I've figured out the issue. The package has TWO configs for tmpfiles

head $(pacman -Ql x2goserver | awk '/tmpfiles.d\/x2goserver.conf/{print $2}')
==> /etc/tmpfiles.d/x2goserver.conf <==
x /tmp/.x2go-*

==> /usr/lib/tmpfiles.d/x2goserver.conf <==
d /var/lib/x2go 0770 x2gouser x2gouser
d /var/spool/x2go 0770 x2goprint x2goprint

The file under /etc OVERRIDES directives from /usr/lib. Thus `/usr/bin/systemd-tmpfiles --create` which does not create /var/{lib,spool}/x2go after installation.
Comment by loqs (loqs) - Monday, 30 July 2018, 21:12 GMT
https://code.x2go.org/gitweb?p=x2goserver.git&a=search&h=HEAD&st=commit&s=tmpfiles
upstream has moved from using /etc/tmpfiles.d/x2goserver.conf to /usr/lib/tmpfiles.d/x2goserver.conf with more recent commits which arch could then add to.
Comment by loqs (loqs) - Tuesday, 31 July 2018, 14:07 GMT
@Self-Perfection please try this patch for the PKGBUILD
Updated to 4.1.0.1 append to upstream's tmpfiles.d/x2goserver.conf and use https now the certificate is valid
Comment by Alexander Meshcheryakov (Self-Perfection) - Tuesday, 31 July 2018, 16:08 GMT
@loqs I've rebuild package with your patch. I've checked:

1) Missing home dirs were successfully created on installation - i.e. this bug is fixed
2) Basic remote access - works

Overall: looks good

Loading...