The Minetest server tries to locate a home directory on start up and fails with the following message if a home directory is not available: ERROR[Main]: Cannot create user data directory Since the default Gentoo minetest user does not have a home directory by default, the Minetest server is unable to start by default. Reproducible: Always
Minetest searches for the user's home directory in order to create/access the .minetest directory. The path for this directory is currently not configurable in the Minetest source code. There are a few ways to resolve this. The easiest and most obvious is to give the Gentoo minetest user a home directory. Although this is the solution put forward by the upstream Minetest team (see https://github.com/minetest/minetest/issues/6869), I don't think there's a technical reason why the user running Minetest must have a home directory set. Perhaps we should try implementing a command line option to allow the relevant directory to be configured by the user rather than hardcoded to the home directory.
I've submitted a patch upstream implementing a commandline option to configure a custom user data directory path: https://github.com/minetest/minetest/pull/9424
I haven't received word from upstream yet about the patch to add support for custom user data paths, so I have implemented an update to acct-user/minetest to add a default home directory of /var/lib/minetest to the Gentoo minetest user: https://github.com/gentoo/gentoo/pull/14890 The custom user data path patch would be the proper way to resolve this, but I hesitate adding it to Gentoo just yet since upstream might ultimately reject it. For now, setting a default home directory for the Gentoo minetest user should fix this until upstream responds to the upstream patch submission.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81b2e9fc9306cec4d6cd9d1614b4fad8321dae87 commit 81b2e9fc9306cec4d6cd9d1614b4fad8321dae87 Author: William Breathitt Gray <vilhelm.gray@gmail.com> AuthorDate: 2020-03-09 01:03:38 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-03-09 05:55:10 +0000 acct-user/minetest: Add home directory Minetest requires a home directory to store user data. This patch adds /var/lib/minetest as the default home directory for the minetest user. Bug: https://bugs.gentoo.org/709530 Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14890 Signed-off-by: Joonas Niilola <juippis@gentoo.org> acct-user/minetest/minetest-1.ebuild | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
As Comment 4 shows, this got resolved more than a year ago.
(In reply to Marek Szuba from comment #5) > As Comment 4 shows, this got resolved more than a year ago. The upstream patch is pending merge by the Minetest team. I recommend keeping this open until that PR closes: https://github.com/minetest/minetest/pull/9424
Nah. On the one hand this has already been merged into the tree, on the other having acct-user/minetest define $HOME and making it possible for games-action/minetest to use directories other than $HOME for its data are two completely differen issues.
(In reply to Marek Szuba from comment #7) > Nah. On the one hand this has already been merged into the tree, on the > other having acct-user/minetest define $HOME and making it possible for > games-action/minetest to use directories other than $HOME for its data are > two completely differen issues. That's a fair point, the original issue has been resolved in the end so I suppose there's no need to reopen after all.