From 516d3a7715eaf7303ae08bcb9487ba68d68be272 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 22 Apr 2020 19:50:43 +0200 Subject: [PATCH] add debian_version for x86_64 --- conf/x86-64.src.default | 2 +- scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + scripts/upgrade.d/upgrade.11.sh | 3 +++ scripts/upgrade.d/upgrade.last.sh | 2 ++ 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/x86-64.src.default b/conf/x86-64.src.default index 927df9e..b33624e 100644 --- a/conf/x86-64.src.default +++ b/conf/x86-64.src.default @@ -1,4 +1,4 @@ -SOURCE_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce___VERSION__-ce.0_amd64.deb/download.deb +SOURCE_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/__DEBIAN_VERSION__/gitlab-ce___VERSION__-ce.0_amd64.deb/download.deb SOURCE_SUM=__SHA256_SUM__ SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=__SOURCE_FILENAME__ diff --git a/scripts/install b/scripts/install index 05816fa..dafce4c 100644 --- a/scripts/install +++ b/scripts/install @@ -178,6 +178,7 @@ ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitla if [ $architecture = "x86-64" ]; then ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_x86_64_source_sha256" --target_file="../conf/$architecture.src" + ynh_replace_string --match_string="__DEBIAN_VERSION__" --replace_string="$gitlab_x86_64_debian_verion" --target_file="../conf/$architecture.src" elif [ $architecture = "arm" ]; then ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src" fi diff --git a/scripts/restore b/scripts/restore index 9914ebb..0b6c49e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -107,6 +107,7 @@ ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitla if [ $architecture = "x86-64" ]; then ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_x86_64_source_sha256" --target_file="../conf/$architecture.src" + ynh_replace_string --match_string="__DEBIAN_VERSION__" --replace_string="$gitlab_x86_64_debian_verion" --target_file="../conf/$architecture.src" elif [ $architecture = "arm" ]; then ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src" fi diff --git a/scripts/upgrade b/scripts/upgrade index 8fb06b7..b3a282b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -267,6 +267,7 @@ then if [ $architecture = "x86-64" ]; then ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_x86_64_source_sha256" --target_file="../conf/$architecture.src" + ynh_replace_string --match_string="__DEBIAN_VERSION__" --replace_string="$gitlab_x86_64_debian_verion" --target_file="../conf/$architecture.src" elif [ $architecture = "arm" ]; then ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src" fi diff --git a/scripts/upgrade.d/upgrade.11.sh b/scripts/upgrade.d/upgrade.11.sh index 64724d0..69b1f93 100644 --- a/scripts/upgrade.d/upgrade.11.sh +++ b/scripts/upgrade.d/upgrade.11.sh @@ -1,5 +1,8 @@ gitlab_version="11.11.5" +# There is no buster version for gitlab 11.X +gitlab_x86_64_debian_verion="stretch" + gitlab_x86_64_source_sha256="1ee3d6e8d2cc198f5466de0884c03f6016299db24859126af9a191501dbdef10" gitlab_arm_source_sha256="366e12b1f3d3b1694fcb6f13da9de908360ba93f75768d97e8d01e61e8652705" diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index a765708..77224b6 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -9,6 +9,8 @@ else gitlab_x86_64_source_sha256="ed24c9bd072b6f15f7c73367df04acba3e64ee53bb3562f25e768a2dda533ca2" fi +gitlab_x86_64_debian_verion="$(lsb_release -sc)" + gitlab_arm_source_sha256="5d4b1d76997de08e9707e5cb17445a38ed832bd9995f31a5af0b87134b7f0834" gitlab_filename="gitlab-ce-${gitlab_version}.deb"