Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 709530 - games-action/minetest : server requires home directory for minetest user
Summary: games-action/minetest : server requires home directory for minetest user
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Breathitt Gray
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-02-13 20:55 UTC by William Breathitt Gray
Modified: 2020-03-09 05:55 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Breathitt Gray 2020-02-13 20:55:34 UTC
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
Comment 1 William Breathitt Gray 2020-02-21 21:05:17 UTC
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.
Comment 2 William Breathitt Gray 2020-02-22 22:59:15 UTC
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
Comment 3 William Breathitt Gray 2020-03-09 01:25:27 UTC
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.
Comment 4 Larry the Git Cow gentoo-dev 2020-03-09 05:55:34 UTC
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(+)