Bug 1218223 - minetest server gameid
Summary: minetest server gameid
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-19 15:08 UTC by Dmitry Markov
Modified: 2023-12-22 03:40 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Markov 2023-12-19 15:08:38 UTC
now minetestserver want start with systemd servise from package
Previously, the selection of a game for minetest took place in the config using the default_game directive. Now there is no such option, but there is an option to launch the binary --gameid.
temporarily I solved this problem through systemd edit by adding the gameid I needed. but this is unlikely to be a good permanent solution. I ask the package maintainers to pay attention to this.
Comment 1 Dmitry Markov 2023-12-20 04:31:08 UTC
I think I came up with a more or less elegant solution:

 >[Unit]
 >Description=Minetest multiplayer server %i.conf server config
 >Documentation=man:minetestserver(6)
 >After=network.target
 >
 >[Service]
 >Restart=on-failure
 >User=minetest
 >Group=minetest
 >Type=simple
 >EnvironmentFile=/etc/minetest/%i.env
 >ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --world /var/lib/minetest/%i/ --gameid $MINETEST_GAMEID
 >
 >[Install]
 >WantedBy=multi-user.target

then in the file /etc/minetest/SOMETHING.env you can specify for example

> MINETEST_GAMEID=MineClone2

and it should work.
I would be glad if this or another more adequate solution was added to the package
Comment 2 Dmitry Markov 2023-12-20 04:44:40 UTC
and so, I checked this in the virtual machine by correcting the service file via systemctl edit --full. and it works.
Comment 3 Dmitry Markov 2023-12-20 04:54:34 UTC
I created a fix, I hope it doesn't go unnoticed: https://build.opensuse.org/request/show/1134119
Comment 4 Dmitry Markov 2023-12-21 06:23:43 UTC
I was told that it is impossible to send a request without changes, so the request was superseded
https://build.opensuse.org/request/show/1134375
Comment 5 Dirk Stoecker 2023-12-21 07:11:26 UTC
The solution is incomplete: Either
a) add a default file minetest.env with a standard configuration or
b) include the --gameid in minetest.env for arbitrary options:
   ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --world /var/lib/minetest/%i/ $MINETEST_OPTIONS
which allows to leave it blank.

As it is now an undocumented file is needed for proper setup

c) Do both: USe $MINETEST_OPTIONS and create a default file like

---snip---
# mintestet options for further configuration, e.g. to set the gameid with "--gameid ..."
MINETEST_OPTIONS=
---snip---

I.e. create it like this in spec file:
cat >%{buildroot}%{cgfdir}/%{name}.env <<%%
# mintestet options for further configuration, e.g. to set the gameid with "--gameid ..."
MINETEST_OPTIONS=
%%
Comment 6 Dmitry Markov 2023-12-21 07:34:07 UTC
(In reply to Dirk Stoecker from comment #5)
> The solution is incomplete: Either
> a) add a default file minetest.env with a standard configuration or
> b) include the --gameid in minetest.env for arbitrary options:
>    ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --world
> /var/lib/minetest/%i/ $MINETEST_OPTIONS
> which allows to leave it blank.
> 
> As it is now an undocumented file is needed for proper setup
> 
> c) Do both: USe $MINETEST_OPTIONS and create a default file like
> 
> ---snip---
> # mintestet options for further configuration, e.g. to set the gameid with
> "--gameid ..."
> MINETEST_OPTIONS=
> ---snip---
> 
> I.e. create it like this in spec file:
> cat >%{buildroot}%{cgfdir}/%{name}.env <<%%
> # mintestet options for further configuration, e.g. to set the gameid with
> "--gameid ..."
> MINETEST_OPTIONS=
> %%

you are absolutely right, it really is better.
I made the necessary corrections and tested it on my own server. everything works correctly for me
https://build.opensuse.org/request/show/1134381
Comment 7 Dmitry Markov 2023-12-21 07:45:34 UTC
(In reply to Dmitry Markov from comment #6)
> (In reply to Dirk Stoecker from comment #5)
> > The solution is incomplete: Either
> > a) add a default file minetest.env with a standard configuration or
> > b) include the --gameid in minetest.env for arbitrary options:
> >    ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --world
> > /var/lib/minetest/%i/ $MINETEST_OPTIONS
> > which allows to leave it blank.
> > 
> > As it is now an undocumented file is needed for proper setup
> > 
> > c) Do both: USe $MINETEST_OPTIONS and create a default file like
> > 
> > ---snip---
> > # mintestet options for further configuration, e.g. to set the gameid with
> > "--gameid ..."
> > MINETEST_OPTIONS=
> > ---snip---
> > 
> > I.e. create it like this in spec file:
> > cat >%{buildroot}%{cgfdir}/%{name}.env <<%%
> > # mintestet options for further configuration, e.g. to set the gameid with
> > "--gameid ..."
> > MINETEST_OPTIONS=
> > %%
> 
> you are absolutely right, it really is better.
> I made the necessary corrections and tested it on my own server. everything
> works correctly for me
> https://build.opensuse.org/request/show/1134381

Belatedly, I saw a discrepancy, I sent the correction here: https://build.opensuse.org/request/show/1134385
Comment 8 OBSbugzilla Bot 2023-12-21 09:35:04 UTC
This is an autogenerated message for OBS integration:
This bug (1218223) was mentioned in
https://build.opensuse.org/request/show/1134387 Factory / minetest
Comment 9 Dmitry Markov 2023-12-22 03:40:10 UTC
checked, now everything works correctly both for new installations and for existing ones