Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2014 20:05:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 194312] games/minecraft-server issues after update to 1.8
Message-ID:  <bug-194312-13-wg3KfPBWic@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-194312-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-194312-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194312

Jonathan Price <freebsd@jonathanprice.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #148309|                            |maintainer-approval+
              Flags|                            |

--- Comment #11 from Jonathan Price <freebsd@jonathanprice.org> ---
Created attachment 148309
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D148309&action=
=3Dedit
diff based on proposed changes

>The bin/minecraft-server script refers to version 1.7.10 but the port inst=
alls > version 1.8.

I do apologise for that, I must have only modified my local copy without
modifying the port when I tested the upgrade to 1.8. This is now fixed.

> minecraft-server does no longer work in "daemon mode" due to the removal =
of
> the sysutils/tmux logic. This is a rather unfortunate feature removal. Pl=
ease > add it again.

 This is actually by design. This decision was modelled around the
games/xonotic port. The main reasons for this are:
- Simplified port with fewer dependencies
- Gives end users the flexibility to use whichever method of running in the
background (screen, tmux, nohup, etc.)

If further demand is shown for a return to the pre-written daemon using tmu=
x, I
will likely work on it=E2=80=99s return.

>Install ignores the existing contents of configuration files of a previous=
 >1.4.6 installation located in /usr/local/etc/minecraft/. Since the config=
 file >syntax has changed from plain text to JSON (except for server.proper=
ties) it >might seem sensible to convert automatically. As a minimum, users=
 should be >advised to make the necessary adjustments from old to new versi=
on.

Being that 1.4.6 was released in 2012, and there have been 16 updates since
(over half of which have required client updates) I had assumed that there =
were
few remaining users still using this port. However, it is a reasonable requ=
est
to handle this situation more elegantly. I will look into a way a couple of
possibilities for this particular issue:
Provide a notice to the user that their existing configuration will be dele=
ted,
and should be backed up
Rename the existing configs to something like [name].old and inform the use=
r to
make any relevant modifications to the new configs (many options have chang=
ed /
been added since 1.4 so a straight-up conversion would be inadvisable).

>Exactly. For some reasons the maintainer decided to install blank >configu=
ration files instead of meaningful content with the 1.8 port revision. >At =
least, for server.properties it would really be sensible to install some >p=
re-configured content. This was the case for the previous port revision. No=
 >idea why it was changed.

The files had to be manually created so that the port could create the syml=
inks
to /usr/local/share/minecraft-server. When you run the server for the first
time it will populate the files with a default configuration (note: it will=
 not
be fully populated until you accept the EULA). I opted for this rather than
manually populating them with a default configuration for a couple of reaso=
ns:
It keeps the port size and complexity to a minimum
When Mojang updates the default configuration (with additional / removed
options, or a new syntax), it will not require additional work to modify the
port.

If you can propose a good argument against this methodology, I will be more
than happy to review this.

>Deinstall removes /usr/local/etc/minecraft-server/* but this directory >co=
ntains precious configuration data (such as server configuration, whitelist=
, >etc.). Please modify pkg-plist to keep these files upon deinstall and ad=
d an >appropriate note to pkg-install to remove it when really not longer n=
eeded >(similar to /var/db/minecraft-server etc).

I have tested this, and as long as you=E2=80=99ve run the server at least o=
nce (to
generate the configs), the files are kept because they don=E2=80=99t meet t=
he original
SHA256 checksums of the configs. As long as the files aren=E2=80=99t blank =
this should
not be a problem.

-----------------------

I have attached a patch which fixes the following problems:
- /usr/local/bin/minecraft-server now correctly points to the correct file =
name
- added %%DATADIR%% and %%ETCDIR%% to pkg-plist so that both folders are now
owned by mcserver. This corrects an issue with EULA generation, as well as
fixing a potential issue with configuration files being removed when the po=
rt
is uninstalled.
- added a message notifying users that if they're upgrading from version < =
1.8
to populate the new config files, and then merge any desired changes.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194312-13-wg3KfPBWic>