commit 54ebac784a3f479aa816014bcdcd1f494893764d Author: Troy Frew Date: Mon Jun 27 02:09:47 2016 -0400 Initial project structure. More to come soon.. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5fa4b3e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Travertine-Proxy diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f5069af --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Waterfall"] + path = Waterfall + url = https://github.com/WaterfallMC/Waterfall.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..f129e01 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2015-2016 Waterfall Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..023086e --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Travertine + +Travertine is Waterfall with additional protocols. Waterfall is a fork of the well-known [BungeeCord](https://github.com/SpigotMC/BungeeCord) server teleportation suite. + +Waterfall focuses on three main areas: + +* **Stability**: Waterfall aims to be stable. We will achieve this through making the code base testable and discouraging practices that lead to proxy lag. +* **Features**: Waterfall aims to include more features than canonical BungeeCord. +* **Scalability**: Waterfall should be able to handle a large number of concurrent players, given a reasonably modern CPU, memory, and good network connection. + +Travertine focuses on one main area: + +* **Additional Client Version Support**: Travertine aims to support client versions older then what is supported in upstream. This includes 1.7 support. Additionally Travertine may release Snapshot and PRE Client support patches as time permits. + +## Why fork Waterfall? + +Travertine has a goal of adding additional protocol versions. + +Travertine was forked because of the fact that Waterfall intends to only support protocol versions supported by upstream BungeeCord. + +Travertine will track upstream Waterfall and merge changes as needed. + +## Join us + +* Feel free to open a PR! We accept contributions. +* Join us on IRC (irc.esper.net #waterfall, [webchat](http://webchat.esper.net/?nick=&channels=waterfall)). +* Visit our forums on [Aquifer](https://aquifermc.org). + +Special Thanks To +----------------- +![YourKit-Logo](https://yourkit.com/images/yklogo.png) + +[YourKit](https://yourkit.com/), makers of the outstanding Java profiler, supports open source projects of all kinds with their full-featured [Java](https://yourkit.com/features/) and [.NET](https://yourkit.com/dotnet/features/) application profilers. We thank them for granting Waterfall an OSS license so that we can make our software the best it can be. diff --git a/Waterfall b/Waterfall new file mode 160000 index 0000000..a64fd87 --- /dev/null +++ b/Waterfall @@ -0,0 +1 @@ +Subproject commit a64fd874f2d8363a764d67083b8529e4756a6604 diff --git a/Waterfall-Proxy-Patches/0001-POM-Changes.patch b/Waterfall-Proxy-Patches/0001-POM-Changes.patch new file mode 100644 index 0000000..17d493f --- /dev/null +++ b/Waterfall-Proxy-Patches/0001-POM-Changes.patch @@ -0,0 +1,547 @@ +From 7aa7359005c392b4d3a2430506a7aa0d62334f88 Mon Sep 17 00:00:00 2001 +From: Troy Frew +Date: Mon, 27 Jun 2016 01:56:24 -0400 +Subject: [PATCH] POM Changes + + +diff --git a/api/pom.xml b/api/pom.xml +index b276c45..bf0b243 100644 +--- a/api/pom.xml ++++ b/api/pom.xml +@@ -5,41 +5,41 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-api ++ travertine-api + 1.10-SNAPSHOT + jar + +- Waterfall-API ++ Travertine-API + API implemented by the Elastic Portal Suite + + + + io.github.waterfallmc +- waterfall-chat ++ travertine-chat + ${project.version} + compile + + + io.github.waterfallmc +- waterfall-config ++ travertine-config + ${project.version} + compile + + + io.github.waterfallmc +- waterfall-event ++ travertine-event + ${project.version} + compile + + + io.github.waterfallmc +- waterfall-protocol ++ travertine-protocol + ${project.version} + compile + +diff --git a/bootstrap/pom.xml b/bootstrap/pom.xml +index 07cf1d0..29e904c 100644 +--- a/bootstrap/pom.xml ++++ b/bootstrap/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-bootstrap ++ travertine-bootstrap + 1.10-SNAPSHOT + jar + +- Waterfall-Bootstrap +- Java 1.6 loader for Waterfall ++ Travertine-Bootstrap ++ Java 1.6 loader for Travertine + + + 1.6 +@@ -27,7 +27,7 @@ + + + io.github.waterfallmc +- waterfall-proxy ++ travertine-proxy + ${project.version} + compile + +@@ -40,7 +40,7 @@ + + + +- Waterfall ++ Travertine + + + +diff --git a/chat/pom.xml b/chat/pom.xml +index 866b39a..11de3ba 100644 +--- a/chat/pom.xml ++++ b/chat/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-chat ++ travertine-chat + 1.10-SNAPSHOT + jar + +- Waterfall-Chat +- Minecraft JSON chat API intended for use with Waterfall ++ Travertine-Chat ++ Minecraft JSON chat API intended for use with Travertine + + + +diff --git a/config/pom.xml b/config/pom.xml +index 8280c2d..7fd29a5 100644 +--- a/config/pom.xml ++++ b/config/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-config ++ travertine-config + 1.10-SNAPSHOT + jar + +- Waterfall-Config +- Generic java configuration API intended for use with Waterfall ++ Travertine-Config ++ Generic java configuration API intended for use with Travertine + + + +diff --git a/event/pom.xml b/event/pom.xml +index 60970e9..ac5a4c2 100644 +--- a/event/pom.xml ++++ b/event/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-event ++ travertine-event + 1.10-SNAPSHOT + jar + +- Waterfall-Event +- Generic java event dispatching API intended for use with Waterfall. ++ Travertine-Event ++ Generic java event dispatching API intended for use with Travertine. + + + +diff --git a/module/cmd-alert/pom.xml b/module/cmd-alert/pom.xml +index 0c076f9..9ef13e2 100644 +--- a/module/cmd-alert/pom.xml ++++ b/module/cmd-alert/pom.xml +@@ -5,13 +5,13 @@ + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module-cmd-alert ++ travertine-module-cmd-alert + 1.10-SNAPSHOT + jar + +diff --git a/module/cmd-find/pom.xml b/module/cmd-find/pom.xml +index 2cf8d6d..aeaa23b 100644 +--- a/module/cmd-find/pom.xml ++++ b/module/cmd-find/pom.xml +@@ -5,13 +5,13 @@ + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module-cmd-find ++ travertine-module-cmd-find + 1.10-SNAPSHOT + jar + +diff --git a/module/cmd-list/pom.xml b/module/cmd-list/pom.xml +index 0300b5c..7b6c1de 100644 +--- a/module/cmd-list/pom.xml ++++ b/module/cmd-list/pom.xml +@@ -5,13 +5,13 @@ + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module-cmd-list ++ travertine-module-cmd-list + 1.10-SNAPSHOT + jar + +diff --git a/module/cmd-send/pom.xml b/module/cmd-send/pom.xml +index 6d96f3a..4d1b677 100644 +--- a/module/cmd-send/pom.xml ++++ b/module/cmd-send/pom.xml +@@ -5,13 +5,13 @@ + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module-cmd-send ++ travertine-module-cmd-send + 1.10-SNAPSHOT + jar + +diff --git a/module/cmd-server/pom.xml b/module/cmd-server/pom.xml +index 1c508e3..284adb3 100644 +--- a/module/cmd-server/pom.xml ++++ b/module/cmd-server/pom.xml +@@ -5,13 +5,13 @@ + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module-cmd-server ++ travertine-module-cmd-server + 1.10-SNAPSHOT + jar + +diff --git a/module/pom.xml b/module/pom.xml +index 19d50c6..aad91d7 100644 +--- a/module/pom.xml ++++ b/module/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + pom + +- Waterfall Modules +- Parent project for all Waterfall modules. ++ Travertine Modules ++ Parent project for all Travertine modules. + + + cmd-alert +@@ -34,7 +34,7 @@ + + + io.github.waterfallmc +- waterfall-api ++ travertine-api + ${project.version} + compile + +diff --git a/module/reconnect-yaml/pom.xml b/module/reconnect-yaml/pom.xml +index 93d2b4a..cb6ce39 100644 +--- a/module/reconnect-yaml/pom.xml ++++ b/module/reconnect-yaml/pom.xml +@@ -5,13 +5,13 @@ + + + io.github.waterfallmc +- waterfall-module ++ travertine-module + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-module-reconnect-yaml ++ travertine-module-reconnect-yaml + 1.10-SNAPSHOT + jar + +diff --git a/native/pom.xml b/native/pom.xml +index a2b422c..c4ecb05 100644 +--- a/native/pom.xml ++++ b/native/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-native ++ travertine-native + 1.10-SNAPSHOT + jar + +- Waterfall-Native +- Optional native code to speed up and enhance Waterfall functionality. ++ Travertine-Native ++ Optional native code to speed up and enhance Travertine functionality. + + + +diff --git a/pom.xml b/pom.xml +index 6fe9ef4..2134785 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -10,14 +10,14 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + pom + +- Waterfall-Parent +- Parent project for all Waterfall modules. +- https://github.com/WaterfallMC/Waterfall +- 2015 ++ Travertine-Parent ++ Parent project for all Travertine modules. ++ https://github.com/WaterfallMC/Travertine ++ 2016 + + WaterfallMC + https://github.com/WaterfallMC +@@ -40,6 +40,9 @@ + + kashike + ++ ++ fuzzybot ++ + + + +@@ -56,13 +59,13 @@ + + + +- scm:git:git@github.com:com:WaterfallMC/Waterfall.git +- scm:git:git@github.com:WaterfallMC/Waterfall.git +- git@github.com:WaterfallMC/Waterfall.git ++ scm:git:git@github.com:com:WaterfallMC/Travertine.git ++ scm:git:git@github.com:WaterfallMC/Travertine.git ++ git@github.com:WaterfallMC/Travertine.git + + + GitHub +- https://github.com/WaterfallMC/Waterfall/issues ++ https://github.com/WaterfallMC/Travertine/issues + + + teamcity +diff --git a/protocol/pom.xml b/protocol/pom.xml +index 58e107e..5f74b5e 100644 +--- a/protocol/pom.xml ++++ b/protocol/pom.xml +@@ -5,23 +5,23 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-protocol ++ travertine-protocol + 1.10-SNAPSHOT + jar + +- Waterfall-Protocol +- Minimal implementation of the Minecraft protocol for use in Waterfall ++ Travertine-Protocol ++ Minimal implementation of the Minecraft protocol for use in Travertine + + + + io.github.waterfallmc +- waterfall-chat ++ travertine-chat + ${project.version} + compile + +diff --git a/proxy/pom.xml b/proxy/pom.xml +index 9d792b5..1079c13 100644 +--- a/proxy/pom.xml ++++ b/proxy/pom.xml +@@ -5,17 +5,17 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-proxy ++ travertine-proxy + 1.10-SNAPSHOT + jar + +- Waterfall-Proxy ++ Travertine-Proxy + Proxy component of the Elastic Portal Suite + + +@@ -40,25 +40,25 @@ + + + io.github.waterfallmc +- waterfall-api ++ travertine-api + ${project.version} + compile + + + io.github.waterfallmc +- waterfall-native ++ travertine-native + ${project.version} + compile + + + io.github.waterfallmc +- waterfall-protocol ++ travertine-protocol + ${project.version} + compile + + + io.github.waterfallmc +- waterfall-query ++ travertine-query + ${project.version} + compile + +diff --git a/query/pom.xml b/query/pom.xml +index 1d76633..b1fd982 100644 +--- a/query/pom.xml ++++ b/query/pom.xml +@@ -5,18 +5,18 @@ + + + io.github.waterfallmc +- waterfall-parent ++ travertine-parent + 1.10-SNAPSHOT + ../pom.xml + + + io.github.waterfallmc +- waterfall-query ++ travertine-query + 1.10-SNAPSHOT + jar + +- Waterfall-Query +- Minecraft query implementation based on the Waterfall API. ++ Travertine-Query ++ Minecraft query implementation based on the Travertine API. + + + +@@ -27,7 +27,7 @@ + + + io.github.waterfallmc +- waterfall-api ++ travertine-api + ${project.version} + compile + +-- +2.7.4 (Apple Git-66) + diff --git a/applyPatches.sh b/applyPatches.sh new file mode 100755 index 0000000..0171df5 --- /dev/null +++ b/applyPatches.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +PS1="$" +basedir="$(cd "$1" && pwd -P)" +workdir="$basedir/work" +gpgsign="$(git config commit.gpgsign || echo "false")" +echo "Rebuilding Forked projects.... " + +function enableCommitSigningIfNeeded { + if [[ "$gpgsign" == "true" ]]; then + echo "Re-enabling GPG Signing" + # Yes, this has to be global + git config --global commit.gpgsign true + fi +} + +function applyPatch { + what=$1 + what_name=$(basename "$what") + target=$2 + branch=$3 + + cd "$basedir/$what" + git fetch + git branch -f upstream "$branch" >/dev/null + + cd "$basedir" + if [ ! -d "$basedir/$target" ]; then + git clone "$what" "$target" + fi + cd "$basedir/$target" + + echo "Resetting $target to $what_name..." + git remote rm upstream > /dev/null 2>&1 + git remote add upstream "$basedir/$what" >/dev/null 2>&1 + git checkout master 2>/dev/null || git checkout -b master + git fetch upstream >/dev/null 2>&1 + git reset --hard upstream/upstream + + echo " Applying patches to $target..." + + git am --abort >/dev/null 2>&1 + git am --3way --ignore-whitespace "$basedir/${what_name}-Patches/"*.patch + if [ "$?" != "0" ]; then + echo " Something did not apply cleanly to $target." + echo " Please review above details and finish the apply then" + echo " save the changes with rebuildPatches.sh" + enableCommitSigningIfNeeded + exit 1 + else + echo " Patches applied cleanly to $target" + fi +} + +# Disable GPG signing before AM, slows things down and doesn't play nicely. +# There is also zero rational or logical reason to do so for these sub-repo AMs. +# Calm down kids, it's re-enabled (if needed) immediately after, pass or fail. +if [[ "$gpgsign" == "true" ]]; then + echo "_Temporarily_ disabling GPG signing" + git config --global commit.gpgsign false +fi + + +# Apply patches +applyPatch Waterfall/Waterfall-Proxy Travertine-Proxy HEAD + +enableCommitSigningIfNeeded diff --git a/rebuildPatches.sh b/rebuildPatches.sh new file mode 100755 index 0000000..9535384 --- /dev/null +++ b/rebuildPatches.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +( +PS1="$" +basedir="$(cd "$1" && pwd -P)" +workdir="$basedir/work" +echo "Rebuilding patch files from current fork state..." +git config core.safecrlf false + +function cleanupPatches { + cd "$1" + for patch in *.patch; do + echo "$patch" + gitver=$(tail -n 2 "$patch" | grep -ve "^$" | tail -n 1) + diffs=$(git diff --staged "$patch" | grep -E "^(\+|\-)" | grep -Ev "(From [a-z0-9]{32,}|\-\-\- a|\+\+\+ b|.index)") + + testver=$(echo "$diffs" | tail -n 2 | grep -ve "^$" | tail -n 1 | grep "$gitver") + if [ "x$testver" != "x" ]; then + diffs=$(echo "$diffs" | sed 'N;$!P;$!D;$d') + fi + + if [ "x$diffs" == "x" ] ; then + git reset HEAD "$patch" >/dev/null + git checkout -- "$patch" >/dev/null + fi + done +} + +function savePatches { + what=$1 + what_name=$(basename "$what") + target=$2 + echo "Formatting patches for $what..." + + cd "$basedir/${what_name}-Patches/" + if [ -d "$basedir/$target/.git/rebase-apply" ]; then + # in middle of a rebase, be smarter + echo "REBASE DETECTED - PARTIAL SAVE" + last=$(cat "$basedir/$target/.git/rebase-apply/last") + next=$(cat "$basedir/$target/.git/rebase-apply/next") + for i in $(seq -f "%04g" 1 1 $last) + do + if [ $i -lt $next ]; then + rm ${i}-*.patch + fi + done + else + rm -rf *.patch + fi + + cd "$basedir/$target" + + git format-patch --no-stat -N -o "$basedir/${what_name}-Patches/" upstream/upstream >/dev/null + cd "$basedir" + git add -A "$basedir/${what_name}-Patches" + cleanupPatches "$basedir/${what_name}-Patches" + echo " Patches saved for $what to $what_name-Patches/" +} + +savePatches "Waterfall/Waterfall-Proxy" "Travertine-Proxy" +)