[Bug 194312] games/minecraft-server issues after update to 1.8

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Oct 14 20:05:06 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194312

Jonathan Price <freebsd at jonathanprice.org> changed:

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

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

>The bin/minecraft-server script refers to version 1.7.10 but the port installs > 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. Please > 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 tmux, I
will likely work on it’s 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.properties) it >might seem sensible to convert automatically. As a minimum, users should be >advised to make the necessary adjustments from old to new version.

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 request
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 deleted,
and should be backed up
Rename the existing configs to something like [name].old and inform the user to
make any relevant modifications to the new configs (many options have changed /
been added since 1.4 so a straight-up conversion would be inadvisable).

>Exactly. For some reasons the maintainer decided to install blank >configuration files instead of meaningful content with the 1.8 port revision. >At least, for server.properties it would really be sensible to install some >pre-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 symlinks
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 reasons:
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 >contains precious configuration data (such as server configuration, whitelist, >etc.). Please modify pkg-plist to keep these files upon deinstall and add an >appropriate note to pkg-install to remove it when really not longer needed >(similar to /var/db/minecraft-server etc).

I have tested this, and as long as you’ve run the server at least once (to
generate the configs), the files are kept because they don’t meet the original
SHA256 checksums of the configs. As long as the files aren’t 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 port
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.

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


More information about the freebsd-ports-bugs mailing list