diff --git a/README.md b/README.md index 87e3e2c..e6603dc 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Multiplayer voxel RPG inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft -**Shipped version:** 0.11.0~ynh1 +**Shipped version:** 0.12.0~ynh1 **Demo:** server.veloren.net:14004 @@ -30,9 +30,9 @@ Multiplayer voxel RPG inspired by games such as Cube World, Legend of Zelda: Bre Veloren is in pre-alpha, il y aura des bugs. This package provides the last "release" version of Veloren, which is older than that of the official server. You will need to download the corresponding version of the client: - * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=windows) - * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=linux) - * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=macos) + * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=windows) + * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=linux) + * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=macos) ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 3421156..5020ed2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour RPG voxel multijoueur inspiré de jeux tels que Cube World, Legend of Zelda : Breath of the Wild, Dwarf Fortress et Minecraft -**Version incluse :** 0.11.0~ynh1 +**Version incluse :** 0.12.0~ynh1 **Démo :** server.veloren.net:14004 @@ -26,9 +26,9 @@ RPG voxel multijoueur inspiré de jeux tels que Cube World, Legend of Zelda : Br Veloren est en pre-alpha, il y aura des bugs. Ce paquet fournit la dernière version "release" de Veloren, qui est plus ancienne que celle du serveur officiel. Il vous faudra télécharger la version correspondante du client: - * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=windows) - * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=linux) - * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=macos) + * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=windows) + * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=linux) + * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=macos) ## Documentations et ressources diff --git a/check_process b/check_process index fe25aa9..750e7cb 100644 --- a/check_process +++ b/check_process @@ -1,6 +1,3 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest server_name= @@ -36,8 +33,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=generate_custom_world=1& - diff --git a/conf/app.src b/conf/app.src index bf6501d..2e6ec5e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://gitlab.com/veloren/veloren/-/archive/v0.11.0/veloren-v0.11.0.tar.gz -SOURCE_SUM=a2a840fcbbafaaa429c8c2ffce56488de099ed71e310fcae6d56b927409d1f8f +SOURCE_URL=https://gitlab.com/veloren/veloren/-/archive/v0.12.0/veloren-v0.12.0.tar.gz +SOURCE_SUM=10fc0d1cb123ff9caf4ff90412df5241306780dbd2a43be1e37a0c8bac437697 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=veloren-v0.11.0.tar.gz +SOURCE_FILENAME=veloren-v0.12.0.tar.gz SOURCE_EXTRACT=true diff --git a/conf/systemd.service b/conf/systemd.service index 418072f..0ea98ad 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__DATA_PATH__/ Environment=VELOREN_ASSETS=__FINAL_PATH__/ -ExecStart=__FINALPATH__/target/release/veloren-server-cli --basic +ExecStart=__FINALPATH__/live/veloren-server-cli KillSignal=SIGUSR1 TimeoutStopSec=150 StandardOutput=append:/var/log/__APP__/__APP__.log diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..4b1f786 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Multiplayer voxel RPG inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..a166f81 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +RPG voxel multijoueur inspiré de jeux tels que Cube World, Legend of Zelda : Breath of the Wild, Dwarf Fortress et Minecraft diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 704ad17..4f626cd 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,6 +1,6 @@ Veloren is in pre-alpha, il y aura des bugs. This package provides the last "release" version of Veloren, which is older than that of the official server. You will need to download the corresponding version of the client: - * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=windows) - * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=linux) - * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=macos) + * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=windows) + * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=linux) + * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=macos) diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 2338649..0e3ccd3 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,6 +1,6 @@ Veloren est en pre-alpha, il y aura des bugs. Ce paquet fournit la dernière version "release" de Veloren, qui est plus ancienne que celle du serveur officiel. Il vous faudra télécharger la version correspondante du client: - * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=windows) - * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=linux) - * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.11.0/download?job=macos) + * [Windows x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=windows) + * [Linux x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=linux) + * [MacOS x64](https://gitlab.com/veloren/veloren/-/jobs/artifacts/v0.12.0/download?job=macos) diff --git a/manifest.json b/manifest.json index 565a842..869515e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Multiplayer voxel RPG inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft", "fr": "RPG voxel multijoueur inspiré de jeux tels que Cube World, Legend of Zelda : Breath of the Wild, Dwarf Fortress et Minecraft" }, - "version": "0.11.0~ynh1", + "version": "0.12.0~ynh1", "url": "https://veloren.net", "upstream": { "license": "GPL-3.0-only", @@ -22,12 +22,12 @@ "email": "jules.bertholet@gmail.com" }, "requirements": { - "yunohost": ">= 4.1.3" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [], "arguments": { - "install" : [ + "install": [ { "name": "server_name", "type": "string", diff --git a/scripts/_common.sh b/scripts/_common.sh index cc8bc92..4813cd8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,14 +5,14 @@ #================================================= # dependencies used by the app -pkg_dependencies="cargo rustc ca-certificates librust-backtrace+libbacktrace-dev build-essential git git-lfs" +pkg_dependencies="ca-certificates librust-backtrace+libbacktrace-dev build-essential git git-lfs" #================================================= # PERSONAL HELPERS #================================================= function setup_source { - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path/build" patch_source @@ -27,42 +27,42 @@ function patch_source { if [ -z "$world_map_size_lg_y" ]; then world_map_size_lg_y="10" fi - ynh_replace_string -m "MapSizeLg::new(Vec2 { x: [0-9]\{1,\}, y: [0-9]\{1,\} }" -r "MapSizeLg::new(Vec2 { x: $world_map_size_lg_x, y: $world_map_size_lg_y }" -f "$final_path/world/src/sim/mod.rs" + ynh_replace_string -m "MapSizeLg::new(Vec2 { x: [0-9]\{1,\}, y: [0-9]\{1,\} }" -r "MapSizeLg::new(Vec2 { x: $world_map_size_lg_x, y: $world_map_size_lg_y }" -f "$final_path/build/world/src/sim/mod.rs" fi if [ ! -z "$continent_scale_hack" ]; then - ynh_replace_string -m "continent_scale_hack = [0-9]\{1,\}\.[0-9]\{1,\}" -r "continent_scale_hack = $continent_scale_hack" -f "$final_path/world/src/sim/mod.rs" + ynh_replace_string -m "continent_scale_hack = [0-9]\{1,\}\.[0-9]\{1,\}" -r "continent_scale_hack = $continent_scale_hack" -f "$final_path/build/world/src/sim/mod.rs" fi if [ ! -z "$days_in_month" ]; then - ynh_replace_string -m "MONTH: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "MONTH: f32 = $days_in_month" -f "$final_path/world/src/sim2/mod.rs" + ynh_replace_string -m "MONTH: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "MONTH: f32 = $days_in_month" -f "$final_path/build/world/src/sim2/mod.rs" fi if [ ! -z "$months_in_year" ]; then - ynh_replace_string -m "YEAR: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "YEAR: f32 = $months_in_year" -f "$final_path/world/src/sim2/mod.rs" + ynh_replace_string -m "YEAR: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "YEAR: f32 = $months_in_year" -f "$final_path/build/world/src/sim2/mod.rs" fi if [ ! -z "$months_in_tick" ]; then - ynh_replace_string -m "TICK_PERIOD: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "TICK_PERIOD: f32 = $months_in_tick" -f "$final_path/world/src/sim2/mod.rs" + ynh_replace_string -m "TICK_PERIOD: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "TICK_PERIOD: f32 = $months_in_tick" -f "$final_path/build/world/src/sim2/mod.rs" fi if [ ! -z "$years_in_history" ]; then - ynh_replace_string -m "HISTORY_DAYS: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "HISTORY_DAYS: f32 = $years_in_history" -f "$final_path/world/src/sim2/mod.rs" + ynh_replace_string -m "HISTORY_DAYS: f32 = [0-9]\{1,\}\.[0-9]\{1,\}" -r "HISTORY_DAYS: f32 = $years_in_history" -f "$final_path/build/world/src/sim2/mod.rs" fi if [ $generate_economy_csv -eq 1 ]; then - ynh_replace_special_string -m "GENERATE_CSV: bool = false" -r "GENERATE_CSV: bool = true" -f "$final_path/world/src/sim2/mod.rs" + ynh_replace_special_string -m "GENERATE_CSV: bool = false" -r "GENERATE_CSV: bool = true" -f "$final_path/build/world/src/sim2/mod.rs" fi if [ $allow_inter_site_trade -eq 0 ]; then - ynh_replace_special_string -m "INTER_SITE_TRADE: bool = true" -r "INTER_SITE_TRADE: bool = false" -f "$final_path/world/src/sim2/mod.rs" + ynh_replace_special_string -m "INTER_SITE_TRADE: bool = true" -r "INTER_SITE_TRADE: bool = false" -f "$final_path/build/world/src/sim2/mod.rs" fi } function set_permissions { mkdir -p "$final_path" - chown -R root:$app "$final_path" + chown -R $app:$app "$final_path" chmod -R g=u,g-w,o-rwx "$final_path" mkdir -p "$data_path" @@ -74,25 +74,31 @@ function set_permissions { } function install_rust { - sudo -u $app bash -c ' - curl https://sh.rustup.rs -sSf | sh -s -- -q -y 2>&1 - source ~/.cargo/env - rustup toolchain install $(cat "'"$final_path/rust-toolchain"'") 2>&1 - ' + ynh_exec_warn_less ynh_exec_as "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain stable' } function compile_server { install_rust chown -R $app:$app "$final_path" - pushd "$final_path" - sudo -u $app bash -c " - source ~/.cargo/env - NIX_GIT_HASH=\"cf2bdb20/2021-06-12-08:55\" NIX_GIT_TAG=\"v0.10.0\" VELOREN_ASSETS=\"$final_path/assets\" RUSTFLAGS=\"-D warnings\" VELOREN_USERDATA_STRATEGY=system cargo build --bin veloren-server-cli --release --quiet 2>&1 - " + export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" + pushd "$final_path/build" + ynh_exec_warn_less ynh_exec_as "$app" env PATH="$PATH" NIX_GIT_HASH="cf2bdb20/2021-06-12-08:55" NIX_GIT_TAG="v0.10.0" VELOREN_ASSETS="$final_path/assets" RUSTFLAGS="-D warnings" VELOREN_USERDATA_STRATEGY=system cargo build --bin veloren-server-cli --release popd - sudo -u $app ln -sf "$final_path/assets" "$data_path/assets" + ynh_secure_remove --file="$final_path/live" + mkdir -p "$final_path/live/assets/" + cp -af "$final_path/build/target/release/veloren-server-cli" "$final_path/live/veloren-server-cli" + cp -af "$final_path/build/assets/common" "$final_path/live/assets/common" + cp -af "$final_path/build/assets/server" "$final_path/live/assets/server" + cp -af "$final_path/build/assets/world" "$final_path/live/assets/world" + + # Remove build files and rustup + ynh_secure_remove --file="$final_path/build" + ynh_secure_remove --file="$final_path/.cargo" + ynh_secure_remove --file="$final_path/.rustup" + + ynh_exec_as $app ln -sf "$final_path/assets" "$data_path/assets" set_permissions } @@ -103,7 +109,7 @@ function generate_custom_world { add_configuration_files pushd "$data_path" - grep -q "Server is ready to accept connections." <((sudo -u $app VELOREN_ASSETS="$final_path/assets" $final_path/target/release/veloren-server-cli --basic & echo $! >&3 ) 3>pid) + grep -q "Server is ready to accept connections." <((ynh_exec_as $app VELOREN_ASSETS="$final_path/assets" $final_path/live/veloren-server-cli --basic & echo $! >&3 ) 3>pid) kill "$(