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: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-02-13 20:55 UTC by William Breathitt Gray
Modified: 2021-05-12 11:03 UTC (History)
2 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(+)
Comment 5 Marek Szuba archtester gentoo-dev 2021-05-12 10:25:36 UTC
As Comment 4 shows, this got resolved more than a year ago.
Comment 6 William Breathitt Gray 2021-05-12 10:30:06 UTC
(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
Comment 7 Marek Szuba archtester gentoo-dev 2021-05-12 10:59:07 UTC
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.
Comment 8 William Breathitt Gray 2021-05-12 11:03:09 UTC
(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.