Package Details: cuberite 1.12.2c1_efeedcb-1

Git Clone URL: https://aur.archlinux.org/cuberite.git (read-only, click to copy)
Package Base: cuberite
Description: A Minecraft-compatible multiplayer game server that is written in C++ and designed to be efficient with memory and CPU, as well as having a flexible Lua Plugin API. It is compatible with the vanilla Minecraft client.
Upstream URL: https://cuberite.org/
Keywords: C C++ efficient load minecraft optimized plugin server speed
Licenses: Apache
Provides: minecraft-server, spigot
Submitter: edh
Maintainer: edh
Last Packager: edh
Votes: 10
Popularity: 0.31
First Submitted: 2016-05-28 18:48 (UTC)
Last Updated: 2022-01-11 12:08 (UTC)

Required by (0)

Sources (18)

Pinned Comments

edh commented on 2019-11-28 22:17 (UTC)

Unfortunately, upstream does not really have proper releases but instead points to build-versions of the software. Note, I will not push every new build of the package to the AUR but I will update the package upon new minecraft releases, e.g. for 1.14.4 to 1.14.5.

edh commented on 2016-12-11 20:51 (UTC)

You can quit the console without shutting down the server by press ctrl+a d (first ctrl+a and after releasing the buttons press d). This will detach your input from the server console. The attaching and detaching is done with GNU screen since it lets you view and type into the console, sent single commands to it and keep it alive without a connected user. Take a look at the the command overview at the ArchWiki [1] to get a feel for its power. [1] https://wiki.archlinux.org/index.php/GNU_Screen#Common_Commands

Latest Comments

edh commented on 2021-12-22 15:33 (UTC)

The management script to control this minecraft flavor was moved to a dedicated repository at GitHub:Edenhofer/minecraft-server. The script works for various flavors of minecraft. It is very minimalist yet versatile and feature-rich. For more information on how to configure and install the script separately, visit the above linked repository.

edh commented on 2021-06-02 23:06 (UTC)

@abouvier Interesting! Thanks for the link. That was all that I was worried about. I'll remove the commit hashes with the next release.

abouvier commented on 2021-06-02 18:11 (UTC)

It is deterministic :p

https://devops.stackexchange.com/questions/5371/where-is-the-git-submodule-revision-actually-stored

edh commented on 2021-06-02 17:55 (UTC)

@abouvier I wasn't able to spot any such information in the .gitmodules file. Thus, the commits are there to make the package deterministically compile the same software each time you run it.

abouvier commented on 2021-06-02 14:35 (UTC) (edited on 2021-06-02 18:10 (UTC) by abouvier)

Nice, but you don't need to specify each submodule commit because this information is already part of the git repository. The specific commit will be fetched with git submodule update.

edh commented on 2021-06-01 22:01 (UTC)

Done. The package now builds from source.

Note, this was quite a hassle to implement properly as cuberite uses git as dependency management solution. If anyone is interested in a cuberite-bin package I am more than happy to create and maintain such a package as well.

edh commented on 2021-06-01 09:23 (UTC)

@abouvier You are absolutaly right, I'll update the PKGBUILD soon.

abouvier commented on 2021-05-27 21:04 (UTC) (edited on 2021-05-27 21:06 (UTC) by abouvier)

This package should be renamed cuberite-bin or compiled from the available source code (like cuberite-git).

edh commented on 2020-10-03 09:55 (UTC)

Unfortunately there was a bug related to the new way users are created. It has been fixed in the new release of the package but for servers already featuring a cuberite user, manual intervention is needed: If you happen to encounter the error message This account is currently not available., you will need to update the login shell such that you can interact with the console again by running usermod -s /bin/bash cuberite as root.

edh commented on 2020-09-23 10:45 (UTC) (edited on 2020-09-23 10:45 (UTC) by edh)

@nasdack Thanks for the report. It should be fixed now.

eh8 commented on 2020-09-21 21:42 (UTC) (edited on 2020-09-22 01:47 (UTC) by eh8)

==> Starting prepare()...
bsdtar: Error opening archive: Failed to open 'Cuberite.b40_armv7h.tar.gz'
==> ERROR: A failure occurred in prepare().
    Aborting...
error making: cuberite

To fix, please change line 28 from:

source_armv7h=("Cuberite.b${_build_armv7h}_armhf.tar.gz"::"https://builds.cuberite.org/view/all/job/linux-armhf/${_build_armv7h}/artifact/Cuberite.tar.gz")

to

source_armv7h=("Cuberite.b${_build_armv7h}_armv7h.tar.gz"::"https://builds.cuberite.org/view/all/job/linux-armhf/${_build_armv7h}/artifact/Cuberite.tar.gz")

edh commented on 2020-06-25 09:29 (UTC)

@ludwhe Oh, that was sloppy. Sorry for that and thanks a bunch for the patch! Though I am still a little surprised by the change as it is not reflected in their installation guide.

ludwhe commented on 2020-06-25 08:37 (UTC)

Hello again edh! Thank you for updating the package. It seems that upstream has modified the build directory structure, and this breaks this package's build. I have created a patch to fix that, which is as follows:

diff --git a/PKGBUILD b/PKGBUILD
index cf3c4c3..f23a45f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,7 +24,10 @@ source=("${pkgname}-backup.service"
        "${pkgname}.sh")
 source_i686=("Cuberite.b${_build_i686}_i686.tar.gz"::"https://builds.cuberite.org/job/Cuberite%20Linux%20x86%20Master/${_build_i686}/artifact/Cuberite.tar.gz")
 source_x86_64=("Cuberite.b${_build_x86_64}_x86_64.tar.gz"::"https://builds.cuberite.org/job/Cuberite%20Linux%20x64%20Master/${_build_x86_64}/artifact/Cuberite.tar.gz")
-source_armv7h=("Cuberite.b${_build_arm}_armhf.tar.gz"::"https://builds.cuberite.org/job/Cuberite%20Linux%20raspi-armhf%20Master/${_build_arm}/artifact/Cuberite.tar.gz")
+source_armv7h=("Cuberite.b${_build_armv7h}_armhv7h.tar.gz"::"https://builds.cuberite.org/job/Cuberite%20Linux%20raspi-armhf%20Master/${_build_armv7h}/artifact/Cuberite.tar.gz")
+noextract=("Cuberite.b${_build_i686}_i686.tar.gz"
+       "Cuberite.b${_build_x86_64}_x86_64.tar.gz"
+       "Cuberite.b${_build_armv7h}_armv7h.tar.gz")
 sha512sums=('4b4161558343dd2ec4d6b2be41b958e061df2a41961d9476ac1d38f28530043f99735d20115ba65bdbdc04003582f3ab8beb00b19623aae72ecab81797eb05dc'
             '2ae834c75dfc299e823308bcb500e028020f1ac47675c645c4a7832ae225f63e9f7d22c08cd1bbb754388db7cf57ab3d4c359615be70f8d234e82013c148b024'
             'afc35227b91bc302e095c84c30ee85114e4b97220e8ee6acf8e7250306bee969e2cd4d57b4d2afd1e43298b32fc7ecaa543bdf6fead8c0f218cfc37aa51b524e'
@@ -37,6 +40,12 @@ sha512sums_armv7h=('51d131faa04250d2f37c254c449dd53a5bd03f7678cf990cf3eaf9924ed7
 _game="cuberite"
 _server_root="/srv/cuberite"

+prepare() {
+       _build="_build_$CARCH"
+       mkdir Server
+       bsdtar -xf "Cuberite.b${!_build}_${CARCH}.tar.gz" -C Server
+}
+
 package() {
        install -Dm644 ${_game}.conf              "${pkgdir}/etc/conf.d/${_game}"
        install -Dm755 ${_game}.sh                "${pkgdir}/usr/bin/${_game}"

edh commented on 2020-06-24 10:25 (UTC)

@ludwhe Oh, that's blunder. I'll fix it today! Thanks a lot for the comment!

ludwhe commented on 2020-06-24 08:55 (UTC)

Hello edh, in the last update, _build_x86_64 was changed to 270 instead of 1270 ; this has the effect of installing a very old version of Cuberite using the current PKGBUILD. The last build is _build_x86_64=1278 with sha512sums_x86_64=('b768afec4baa01063d26a170ccf23884408d9ee9a662a384d5313319fd285c86d42b9c7e62c2a7e4847d592c605d9ba49f33590fd0c718d4d403454d06808689') Thank you for maintaining this package!

edh commented on 2019-11-28 22:17 (UTC)

Unfortunately, upstream does not really have proper releases but instead points to build-versions of the software. Note, I will not push every new build of the package to the AUR but I will update the package upon new minecraft releases, e.g. for 1.14.4 to 1.14.5.

edh commented on 2019-04-05 08:48 (UTC)

@carey The management script would ideally work for more than just those three servers. Note, the regex is not that complicated and is properly explained in comments surrounding the expressions. Surely it is not more complex than the regex which you proposed disregarding the removal of colors from the string. It is juts more general. Imagine if I were to introduce the change. The three if statements would basically all look the same and I would probably be asked the question why I do not merge them.

carey commented on 2019-04-05 02:22 (UTC)

@edh Sorry, but honestly, I'm just going to stick with my patch. I know it works and I trust it more than the huge regexes currently in the script.

Since it seems like trying to use the same script for multiple servers is where most of the regex complexity comes from, it might be better to set it up something like this:

# change this line depending on the server you're using
server_type="cuberite"

is_player_online(){
  if [ "$server_type" == "cuberite" ]; then
    # do cuberite check
  elif [ "$server_type" == "spigot" ]; then
    # do spigot check
  # ...
  fi
}

That way you can still use the same script for all the packages you maintain (thank you!), but can have simpler code where they differ.

edh commented on 2019-03-27 13:08 (UTC)

@carey I think I found the bug; I made a mistake during a string comparison. The following change should fix the observed problem:

@@ -82,14 +82,16 @@ game_command() {
 # Check whether there are player on the server through list
 is_player_online() {
        response="$(sleep_time=0.6 return_stdout=true game_command list)"
+       # Delete leading line and free response string from fancy characters
+       response="$(echo "${response}" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[JKmsuG]//g')"
        # The list command prints a line containing the usernames after the last occurrence of ": "
        # and since playernames may not contain this string the clean player-list can easily be retrieved.
        # Otherwiese check the first digit after the last occurrence of "There are". If it is 0 then there
        # are no players on the server. Should this test fail as well. Assume that a player is online.
-       if [[ $(echo "${response}" | grep ":" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[JKmsuG]//g' -e 's/.*\: //' |
 tr -d '\n' | wc -c) -le 1 ]]; then
+       if [[ $(echo "${response}" | grep ":" | sed -e 's/.*\: //' | tr -d '\n' | wc -c) -le 1 ]]; then
                # No player is online
                return 0
-       elif [[ $(echo "${response}" | grep "There are" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[JKmsuG]//g' -e 's/.*\: //' -e 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/' | tr -d '\n') -eq 0 ]]; then
+       elif [[ "x$(echo "${response}" | grep "There are" | sed -r -e 's/.*\: //' -e 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/' | tr -d '\n')" == "x0" ]]; then
                # No player is online
                return 0
        else

The first check should always have reported that there are indeed players online but the second check probably passed without being supposed to do so. This should now be fixed. I would be thrilled if you could test the change and report back to me, whether this indeed solved the problem. If it does, I will roll out the change immediately.

edh commented on 2019-03-27 12:30 (UTC)

@carey The script is intended to serve minecraft, spigot and cuberite. All of them are quite different and like to print fancy output strings. As such it is not possible to just replace the is_player_online check with one simple query. Can you please send me the full output of the list command, and I will do my best to incorporate it into the script.

For now, the following change should work for you:

@@ -92,6 +92,9 @@ is_player_online() {
        elif [[ $(echo "${response}" | grep "There are" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[JKmsuG]//g' -e 's/
.*\: //' -e 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/' | tr -d '\n') -eq 0 ]]; then
                # No player is online
                return 0
+       elif [[ $(echo "${response}" | sed -n -e 's/^.*Players (\(.*\)):.*$/\1/p') -eq 0 ]]; then
+               # No player is online
+               return 0
        else
                # A player is online (or it could not be determined)
                return 1

carey commented on 2019-03-26 17:35 (UTC) (edited on 2019-04-05 02:11 (UTC) by carey)

The player detection currently isn't working for me. This causes the server to always shut down after $IDLE_IF_TIME seconds regardless of if any players were connected. I had a look at the launch script and the comments make it seem like the format of the "list" command response has changed.

I've updated the is_player_online function to work with the current version. The code is available here: https://pastebin.com/r4i0WMUU

@edh: Would you me able to integrate this change into the package?

edh commented on 2017-11-04 10:20 (UTC)

@rumbah Done.

rumbah commented on 2017-11-04 00:03 (UTC)

Would you mind to update the package to the latest build (908 at the moment). Then the server would support client version 1.12.2 . Thanks

edh commented on 2017-06-27 15:56 (UTC)

@Alpaone Done. However I would encourage you to increase the build tag yourself for small releases. The variable (_build) is easily editable and there are no further changes required.

Alpaone commented on 2017-06-27 15:41 (UTC)

I would appreciate it if you could update the package to a build newer than 784. Thank you :)

edh commented on 2017-06-18 09:36 (UTC)

@steadybright Done. Unfortunately AFAIK they do not provide tagged release but only refer to the last successful builds and it is therefore hard to keep track of.

steadybright commented on 2017-06-18 03:35 (UTC)

Cuberite web site has version 1.12-compatible version available. Will you have 1.12 version available for Arch soon? Thank you, sb

edh commented on 2016-12-11 20:51 (UTC)

You can quit the console without shutting down the server by press ctrl+a d (first ctrl+a and after releasing the buttons press d). This will detach your input from the server console. The attaching and detaching is done with GNU screen since it lets you view and type into the console, sent single commands to it and keep it alive without a connected user. Take a look at the the command overview at the ArchWiki [1] to get a feel for its power. [1] https://wiki.archlinux.org/index.php/GNU_Screen#Common_Commands

edh commented on 2016-06-26 20:07 (UTC)

Remember to close all cuberite sessions prior to upgrading GNU screen since you can not reattach to the previous session [1] after the upgrade. [1] https://www.archlinux.org/news/screen-440-1-unable-to-attach-old-sessions/

edh commented on 2016-06-24 17:19 (UTC) (edited on 2016-06-24 17:19 (UTC) by edh)

I added complete cuberite support to the minecraft-server management script in a recent commit: * Handle server command output completely through screen instead of relying on a possible outdated log file. (Implemented in the game_command function.) The default screen command dump resides in /tmp. * LOGPATH is not needed anymore. * Unite various java options into one lengthier SERVER_START_CMD. * Update configuration file accordingly. Not only is it now possible to attach to the console but rather all features from the minecraft-server are available for cuberite: backup, restore, idle_server, single command execution and proper systemd support. I turned away from solely relying on the log file and chose to better integrate GNU screen since cuberite apparently logs only in 4 KiB blocks to reduce the system footprint and neither did I wanted to circumvent this optimization nor did I wanted to drop the feature. See [1] for more details. [1] https://github.com/Edenhofer/abs/pull/3

edh commented on 2016-06-19 20:45 (UTC)

@spyrothemagic Theoretically it should be quite easy to port this script to cuberite and I initially tried but apparently the server is not logging commands directly to the current log file which makes more advanced things (suspening, command output and even restarting) quite complicated. In addition cuberite provides a proper web interface with the basic functionality. Though admittedly I would prefer a command line interface as well, it at least removes the pressure to create a script. Since there obviously is a desire for a cli, I will have another look next weekend. Please feel free to manipulate the script [1] to fit your needs. It is about ~500 lines of pure bash code and the config file is in bash as well. Furthermore I licensed it under GPL [2] in order to be used in whicherever way seems fitting. [1] https://github.com/Edenhofer/abs/blob/master/minecraft-server/minecraftd.sh [2] https://github.com/Edenhofer/abs/blob/master/README.md

spyrothemagic commented on 2016-06-18 03:50 (UTC)

@edh Thanks. Would it be possible to use the spigot.sh script to launch this server? I understand you own the copyright on that particular script. Ideally perhaps splitting the spigot.sh script out to its own package and having this package depend on it? This is just a thought/suggestion. I am happy to help with some of the legwork here, but I might need some guidance.

edh commented on 2016-06-17 10:38 (UTC)

@spyrothemagic Done.

spyrothemagic commented on 2016-06-17 06:13 (UTC)

This can be built for the raspberry pi if you add: _build_pi=469 source_armv7h=("Cuberite.b${_build}_armhf.tar.gz"::"https://builds.cuberite.org/job/Cuberite%20Linux%20raspi-armhf%20Master/${_build_pi}/artifact/Cuberite.tar.gz") and change: arch=('i686' 'x86_64' 'armv7h')