2020-06-23 13:28:57 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-07-15 11:12:49 +02:00
|
|
|
gitlab_version="13.1.4"
|
2018-12-16 23:04:05 +01:00
|
|
|
|
2020-04-22 19:36:44 +02:00
|
|
|
# sha256sum found here: https://packages.gitlab.com/gitlab
|
|
|
|
|
2020-07-15 11:02:10 +02:00
|
|
|
gitlab_debian_version="$(lsb_release -sc)"
|
2020-05-06 11:08:54 +02:00
|
|
|
|
2020-07-15 11:12:49 +02:00
|
|
|
gitlab_x86_64_buster_source_sha256="b39df97b871b2def2287ddf3995fc44f9afa1ad68982a0beecfc2740761b769a"
|
2020-06-23 13:28:57 +02:00
|
|
|
|
2020-07-15 11:12:49 +02:00
|
|
|
gitlab_arm_buster_source_sha256="092b17f00cc36ccf08076c5194f8418e52c34a9f07aa6529d01ef0784c5bae88"
|
2018-12-16 23:04:05 +01:00
|
|
|
|
2020-07-15 11:12:49 +02:00
|
|
|
gitlab_x86_64_stretch_source_sha256="733ad6468e5ecd571a6233c88d1512c092591ada3f8bc24dcaa7f68f61d52d69"
|
2020-07-15 11:02:10 +02:00
|
|
|
|
2020-07-15 11:12:49 +02:00
|
|
|
gitlab_arm_stretch_source_sha256="26266529281d9c0b6c6f7b1d29b97de2f9c08a2ffb86ada18f09f29cc0fd0fef"
|
2020-07-15 11:02:10 +02:00
|
|
|
|
|
|
|
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
|
|
|
|
|
|
|
|
if [ "$architecture" = "x86-64" ]; then
|
|
|
|
if [ "$gitlab_debian_version" = "buster" ]
|
|
|
|
then
|
|
|
|
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
|
|
|
|
else
|
|
|
|
gitlab_source_sha256=$gitlab_x86_64_stretch_source_sha256
|
|
|
|
fi
|
|
|
|
elif [ "$architecture" = "arm" ]; then
|
|
|
|
if [ "$gitlab_debian_version" = "buster" ]
|
|
|
|
then
|
|
|
|
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
|
|
|
|
else
|
|
|
|
gitlab_source_sha256=$gitlab_arm_stretch_source_sha256
|
|
|
|
fi
|
2020-06-23 13:28:57 +02:00
|
|
|
fi
|
2019-03-16 02:38:12 +01:00
|
|
|
|
2019-03-17 20:14:56 +01:00
|
|
|
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
|
2019-07-04 20:30:29 +02:00
|
|
|
|
|
|
|
# Action to do in case of failure of the package_check
|
|
|
|
package_check_action() {
|
2019-07-31 17:49:20 +02:00
|
|
|
local sysctl_file="$final_path/embedded/cookbooks/package/resources/gitlab_sysctl.rb"
|
2020-04-22 21:53:25 +02:00
|
|
|
ynh_replace_string --match_string="command \"sysctl -e \(.*\)\"" --replace_string="command \"sysctl -e \1 || true\"" --target_file=$sysctl_file
|
|
|
|
|
|
|
|
sysctl_file="/opt/gitlab/embedded/cookbooks/package/recipes/sysctl.rb"
|
|
|
|
ynh_replace_string --match_string="command \"sysctl -e \(.*\)\"" --replace_string="command \"sysctl -e \1 || true\"" --target_file=$sysctl_file
|
2019-07-04 20:30:29 +02:00
|
|
|
}
|