Bugzilla – Bug 1218223
minetest server gameid
Last modified: 2023-12-22 03:40:10 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.
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
and so, I checked this in the virtual machine by correcting the service file via systemctl edit --full. and it works.
I created a fix, I hope it doesn't go unnoticed: https://build.opensuse.org/request/show/1134119
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
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= %%
(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
(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
This is an autogenerated message for OBS integration: This bug (1218223) was mentioned in https://build.opensuse.org/request/show/1134387 Factory / minetest
checked, now everything works correctly both for new installations and for existing ones