From 68ec1118165939580812f0612ebae1ba93350896 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 14 Jul 2021 15:48:08 +0200 Subject: [PATCH] Update to tomcat 9.0.31-1~deb10u4 - It is annoying that older builds are getting removed from source server - Let's rename the downloaded archive to simplify the code --- conf/tomcat9_deb.src | 6 +++--- scripts/install | 8 ++++---- scripts/upgrade | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conf/tomcat9_deb.src b/conf/tomcat9_deb.src index 9d430c7..ba35364 100644 --- a/conf/tomcat9_deb.src +++ b/conf/tomcat9_deb.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://ftp.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.31-1~deb10u3_all.deb -SOURCE_SUM=0f51e6e84f4045564d6c3b249b69e1a7cb10a8f737458003da701b52a2903970 +SOURCE_URL=https://ftp.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.31-1~deb10u4_all.deb +SOURCE_SUM=42276CABAD11856553DD9265B8C7FBCCE245525BF80EAF180085AB74BB078619 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=ar SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=tomcat9_9.0.31-1~deb10u3_all.deb +SOURCE_FILENAME=tomcat9.deb SOURCE_EXTRACT=false diff --git a/scripts/install b/scripts/install index 7ed5ae3..5a41dd6 100755 --- a/scripts/install +++ b/scripts/install @@ -68,7 +68,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." --weight=1 -# Guacamole depends on Apache Tomcat. +# Guacamole depends on Apache Tomcat. # But installing Tomcat from the Debian repos automatically enables and starts it. # So we stop and disable it, unless Tomcat was already enabled or started by the user beforehand @@ -136,13 +136,13 @@ mv "$final_path/etc/guacamole/lib/mariadb-java-client-2.7.2.jar" "$final_path/et ynh_setup_source --source_id="tomcat9_deb" --dest_dir="$final_path/" pushd "$final_path" || ynh_die - ar x "$final_path/tomcat9_9.0.31-1~deb10u3_all.deb" "data.tar.xz" + ar x "$final_path/tomcat9.deb" "data.tar.xz" popd || ynh_die -ynh_secure_remove --file="$final_path/tomcat9_9.0.31-1~deb10u3_all.deb" +ynh_secure_remove --file="$final_path/tomcat9.deb" mkdir -p "$final_path/tomcat9-data" tar -C "$final_path/tomcat9-data" -xJf "$final_path/data.tar.xz" cp -r "$final_path/tomcat9-data/usr/share/tomcat9/etc" -T "$final_path/etc/tomcat9/" -cp -r "$final_path/tomcat9-data/etc/tomcat9/" -T "$final_path/etc/tomcat9/" +cp -r "$final_path/tomcat9-data/etc/tomcat9/" -T "$final_path/etc/tomcat9/" ynh_secure_remove --file="$final_path/data.tar.xz" ynh_secure_remove --file="$final_path/tomcat9-data" diff --git a/scripts/upgrade b/scripts/upgrade index c9d4346..d21cdf5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,13 +92,13 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then ynh_setup_source --source_id="tomcat9_deb" --dest_dir="$final_path/" pushd "$final_path" || ynh_die - ar x "$final_path/tomcat9_9.0.31-1~deb10u3_all.deb" "data.tar.xz" + ar x "$final_path/tomcat9.deb" "data.tar.xz" popd || ynh_die - ynh_secure_remove --file="$final_path/tomcat9_9.0.31-1~deb10u3_all.deb" + ynh_secure_remove --file="$final_path/tomcat9.deb" mkdir -p "$final_path/tomcat9-data" tar -C "$final_path/tomcat9-data" -xJf "$final_path/data.tar.xz" cp -r "$final_path/tomcat9-data/usr/share/tomcat9/etc" -T "$final_path/etc/tomcat9/" - cp -r "$final_path/tomcat9-data/etc/tomcat9/" -T "$final_path/etc/tomcat9/" + cp -r "$final_path/tomcat9-data/etc/tomcat9/" -T "$final_path/etc/tomcat9/" ynh_secure_remove --file="$final_path/data.tar.xz" ynh_secure_remove --file="$final_path/tomcat9-data" fi @@ -116,7 +116,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=1 -# Guacamole depends on Apache Tomcat. +# Guacamole depends on Apache Tomcat. # But installing Tomcat from the Debian repos automatically enables and starts it. # So we stop and disable it, unless Tomcat was already enabled or started by the user beforehand