diff --git a/conf/arm.src.default b/conf/arm.src.default index 395db91..09a5abd 100644 --- a/conf/arm.src.default +++ b/conf/arm.src.default @@ -1,4 +1,4 @@ -SOURCE_URL=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/buster/gitlab-ce___GITLAB_VERSION__-ce.0_armhf.deb/download.deb +SOURCE_URL=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/__GITLAB_DEBIAN_VERSION__/gitlab-ce___GITLAB_VERSION__-ce.0_armhf.deb/download.deb SOURCE_SUM=__GITLAB_SOURCE_SHA256__ SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=__GITLAB_FILENAME__ diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..d2f5f30 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..0562b17 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 7ea29e8..a2874f5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -55,6 +55,17 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen default = false [resources] +# [resources.sources] +# [resources.sources.main] +# extract = false +# rename = "gitlab-ce-15.10.0.deb" +# amd64.url = "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/bullseye/gitlab-ce_15.10.0-ce.0_amd64.deb/download.deb" +# amd64.sha256 = "c8f5aca04549d3f9ba636ca67e76e9bf2b5a6a249a4a16d79365d17856a53d4d" +# armhf.url = "https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/bullseye/gitlab-ce_15.10.0-ce.0_armhf.deb/download.deb" +# armhf.sha256 = "a7a195bf8a74e6ca688de2debe23c0cd5482d989377dcaf7042df484731e10cc" +# arm64.url = "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/bullseye/gitlab-ce_15.10.0-ce.0_arm64.deb/download.deb" +# arm64.sha256 = "63d29c92eb956631a478735a6c692bbb315c898b2041b2f545c12302b230c97f" + [resources.system_user] [resources.install_dir] diff --git a/scripts/change_url b/scripts/change_url index 8dbe772..2cd24cb 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -44,6 +44,7 @@ done #================================================= ynh_script_progression --message="Configure GitLab..." --weight=28 +config_path=/etc/$app mkdir -p $config_path ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+") domain="$new_domain" diff --git a/scripts/install b/scripts/install index cb6fa79..c1942a1 100644 --- a/scripts/install +++ b/scripts/install @@ -134,8 +134,12 @@ tempdir="$(mktemp -d)" ynh_setup_source --dest_dir=$tempdir --source_id=$architecture +chmod 755 $install_dir + ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename +ynh_secure_remove --file="$tempdir" + #================================================= # NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 7dfe258..eab7c67 100644 --- a/scripts/restore +++ b/scripts/restore @@ -44,6 +44,8 @@ fi ynh_script_progression --message="Restoring configuration files of GitLab..." --weight=1 config_path=/etc/$app +chmod 755 $install_dir + ynh_restore_file --origin_path="$config_path/gitlab-secrets.json" ynh_restore_file --origin_path="$config_path/gitlab.rb" ynh_restore_file --origin_path="$config_path/gitlab-persistent.rb" diff --git a/scripts/upgrade b/scripts/upgrade index aee1a30..2f45aa7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= config_path=/etc/$app +chmod 755 $install_dir if [ -z "$puma_max_threads" ] || [ -z "$puma_min_threads" ]; then # If the server has less than 2GB of RAM diff --git a/scripts/upgrade.d/upgrade.14.first.sh b/scripts/upgrade.d/upgrade.14.first.sh index 78e49c7..a150dce 100644 --- a/scripts/upgrade.d/upgrade.14.first.sh +++ b/scripts/upgrade.d/upgrade.14.first.sh @@ -18,11 +18,6 @@ if [ "$architecture" = "x86-64" ]; then elif [ "$architecture" = "arm64" ]; then gitlab_source_sha256=$gitlab_arm64_buster_source_sha256 elif [ "$architecture" = "arm" ]; then - # If the version for arm doesn't exist, then use an older one - if [ -z "$gitlab_arm_buster_source_sha256" ]; then - gitlab_version="14.0.11" - gitlab_arm_buster_source_sha256="5f1de707c840e4a518e99c89b0e90a5c21c32cac91e853f1e12ef054696100dd" - fi gitlab_source_sha256=$gitlab_arm_buster_source_sha256 fi diff --git a/scripts/upgrade.d/upgrade.14.last.sh b/scripts/upgrade.d/upgrade.14.last.sh index 79b160d..a67d193 100644 --- a/scripts/upgrade.d/upgrade.14.last.sh +++ b/scripts/upgrade.d/upgrade.14.last.sh @@ -32,11 +32,6 @@ elif [ "$architecture" = "arm64" ]; then gitlab_source_sha256=$gitlab_arm64_buster_source_sha256 fi elif [ "$architecture" = "arm" ]; then - # If the version for arm doesn't exist, then use an older one - if [ -z "$gitlab_arm_buster_source_sha256" ]; then - gitlab_version="14.10.5" - gitlab_arm_buster_source_sha256="24a1c3089bc2836591a153a38a04ae8e0f8807d7e877e5d7fa64987f84699d56" - fi gitlab_source_sha256=$gitlab_arm_buster_source_sha256 fi diff --git a/scripts/upgrade.d/upgrade.15.first.sh b/scripts/upgrade.d/upgrade.15.first.sh index 1c3fb0c..31e81ad 100644 --- a/scripts/upgrade.d/upgrade.15.first.sh +++ b/scripts/upgrade.d/upgrade.15.first.sh @@ -32,11 +32,6 @@ elif [ "$architecture" = "arm64" ]; then gitlab_source_sha256=$gitlab_arm64_buster_source_sha256 fi elif [ "$architecture" = "arm" ]; then - # If the version for arm doesn't exist, then use an older one - if [ -z "$gitlab_arm_buster_source_sha256" ]; then - gitlab_version="15.0.4" - gitlab_arm_buster_source_sha256="49a1d860eb533baa3e2037b0dd73ada0e5c6709ac4c9d53db2d045bc385f0292" - fi gitlab_source_sha256=$gitlab_arm_buster_source_sha256 fi diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 446b89b..6ca8f65 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -11,8 +11,8 @@ gitlab_x86_64_buster_source_sha256="223b4c3eafd3edf44d9b8153f834c24aface03ea7585 gitlab_arm64_bullseye_source_sha256="63d29c92eb956631a478735a6c692bbb315c898b2041b2f545c12302b230c97f" gitlab_arm64_buster_source_sha256="8a29a50bab93d7bbd2bfcfbd968c051739a20d2750c3cee0da2d676738928a77" -gitlab_arm_buster_source_sha256="60f4c441e8f6f25934d6be3bcb9a8fe058b05b7076e7087a18ff747f9afa4b3a" gitlab_arm_bullseye_source_sha256="a7a195bf8a74e6ca688de2debe23c0cd5482d989377dcaf7042df484731e10cc" +gitlab_arm_buster_source_sha256="60f4c441e8f6f25934d6be3bcb9a8fe058b05b7076e7087a18ff747f9afa4b3a" architecture=$(ynh_app_setting_get --app="$app" --key=architecture) @@ -35,20 +35,10 @@ elif [ "$architecture" = "arm64" ]; then elif [ "$architecture" = "arm" ]; then if [ "$gitlab_debian_version" = "bullseye" ] then - # If the version for arm doesn't exist, then use an older one - if [ -z "$gitlab_arm_buster_source_sha256" ]; then - gitlab_version="15.10.0" - gitlab_arm_buster_source_sha256="60f4c441e8f6f25934d6be3bcb9a8fe058b05b7076e7087a18ff747f9afa4b3a" - fi - gitlab_source_sha256=$gitlab_arm_buster_source_sha256 + gitlab_source_sha256=$gitlab_arm_bullseye_source_sha256 elif [ "$gitlab_debian_version" = "buster" ] then - # If the version for arm doesn't exist, then use an older one - if [ -z "$gitlab_arm_bullseye_source_sha256" ]; then - gitlab_version="15.10.0" - gitlab_arm_bullseye_source_sha256="a7a195bf8a74e6ca688de2debe23c0cd5482d989377dcaf7042df484731e10cc" - fi - gitlab_source_sha256=$gitlab_arm_bullseye_source_sha256 + gitlab_source_sha256=$gitlab_arm_buster_source_sha256 fi fi diff --git a/upgrade-versions.sh b/upgrade-versions.sh index 62fa5ff..6608850 100755 --- a/upgrade-versions.sh +++ b/upgrade-versions.sh @@ -47,14 +47,7 @@ do echo url: $url echo sha256: $new_sha256 - # Only replace the first occurrence - sed -i -e "0,/gitlab_arm_${debian_version}_source_sha256=\".*\"/s//gitlab_arm_${debian_version}_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file - - # if new_sha256 exists for arm, then replace the backup version/sha256 for this arch - if [ -n "$new_sha256" ]; then - sed -i -e "s/gitlab_version=\"[^0-9.]*[0-9.]*[0-9.]\"/gitlab_version=\"$version\"/" $gitlab_directory/scripts/upgrade.d/$file - sed -i -e "s/gitlab_arm_${debian_version}_source_sha256=\".*\"/gitlab_arm_${debian_version}_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file - fi + sed -i -e "s/gitlab_arm_${debian_version}_source_sha256=\".*\"/gitlab_arm_${debian_version}_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file done