From 6e2bf6a10d1e7cf1fcd2da6cd22974e0118a545d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 29 Mar 2021 11:46:03 +0200 Subject: [PATCH 1/3] Upgrade to 13.10.0 --- README.md | 2 +- README_fr.md | 2 +- conf/gitlab.rb | 66 ++++++++++++++++++++++++++++--- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 6 +-- 5 files changed, 67 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cdd269a..a23a630 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to GitLab is a web-based Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features, using an open-source license, developed by GitLab Inc. -**Shipped version:** 13.9.2 +**Shipped version:** 13.10.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index ab24da3..f9b598c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour GitLab est un gestionnaire Web de dépôt Git fournissant des fonctionnalités de wiki, de rapports de bugs et de pipeline CI/CD. GitLab est une application open source développée par GitLab Inc. -**Version incluse :** 13.9.2 +**Version incluse :** 13.10.0 ## Captures d'écran diff --git a/conf/gitlab.rb b/conf/gitlab.rb index 51de626..98e5e32 100644 --- a/conf/gitlab.rb +++ b/conf/gitlab.rb @@ -188,8 +188,9 @@ external_url '__GENERATED_EXTERNAL_URL__' # gitlab_rails['remove_unaccepted_member_invites_cron_worker'] = "10 15 * * *" # gitlab_rails['schedule_migrate_external_diffs_worker_cron'] = "15 * * * *" # gitlab_rails['ci_platform_metrics_update_cron_worker'] = '47 9 * * *' -# gitlab_rails['analytics_instance_statistics_count_job_trigger_worker_cron'] = "50 23 */1 * *" +# gitlab_rails['analytics_usage_trends_count_job_trigger_worker_cron'] = "50 23 */1 * *" # gitlab_rails['member_invitation_reminder_emails_worker_cron'] = "0 0 * * *" +# gitlab_rails['user_status_cleanup_batch_worker_cron'] = "* * * * *" ### Webhook Settings ###! Number of seconds to wait for HTTP response after sending webhook HTTP POST @@ -237,6 +238,11 @@ external_url '__GENERATED_EXTERNAL_URL__' # } # } +### Allowed hosts +###! Customize the `host` headers that should be catered by the Rails +###! application. By default, everything is allowed. +# gitlab_rails['allowed_hosts'] = [] + ### Monitoring settings ###! IP whitelist controlling access to monitoring endpoints # gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '::1/128'] @@ -1555,8 +1561,13 @@ nginx['listen_https'] = false # gitlab_pages['status_uri'] = "/@status" ##! Tune the maximum number of concurrent connections GitLab Pages will handle. -##! This should be in the range 1 - 10000, defaulting to 5000. -# gitlab_pages['max_connections'] = 5000 +##! Default to 0 for unlimited connections. +# gitlab_pages['max_connections'] = 0 + +##! Setting the propagate_correlation_id to true allows installations behind a reverse proxy +##! generate and set a correlation ID to requests sent to GitLab Pages. If a reverse proxy +##! sets the header value X-Request-ID, the value will be propagated in the request chain. +# gitlab_pages['propagate_correlation_id'] = false ##! Configure to use JSON structured logging in GitLab Pages # gitlab_pages['log_format'] = "json" @@ -1613,6 +1624,23 @@ nginx['listen_https'] = false ##! Domain configuration source, defaults to disk if set to nil # gitlab_pages['domain_config_source'] = nil +##! Advanced settings for API-based configuration for GitLab Pages. +##! The recommended default values are set inside GitLab Pages. +##! Should be changed only if absolutely needed. + +##! The maximum time a domain's configuration is stored in the cache. +# gitlab_pages['gitlab_cache_expiry'] = "600s" +##! The interval at which a domain's configuration is set to be due to refresh (default: 60s). +# gitlab_pages['gitlab_cache_refresh'] = "60s" +##! The interval at which expired items are removed from the cache (default: 60s). +# gitlab_pages['gitlab_cache_cleanup'] = "60s" +##! The maximum time to wait for a response from the GitLab API per request. +# gitlab_pages['gitlab_retrieval_timeout'] = "30s" +##! The interval to wait before retrying to resolve a domain's configuration via the GitLab API. +# gitlab_pages['gitlab_retrieval_interval'] = "1s" +##! The maximum number of times to retry to resolve a domain's configuration via the API +# gitlab_pages['gitlab_retrieval_retries'] = 3 + ##! Define custom gitlab-pages HTTP headers for the whole instance # gitlab_pages['headers'] = [] @@ -1666,6 +1694,11 @@ nginx['listen_https'] = false ##! Docs: https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/blob/master/README.md ################################################################################ +##! Settings used by the GitLab application +# gitlab_rails['gitlab_kas_enabled'] = true +# gitlab_rails['gitlab_kas_external_url'] = ws://gitlab.example.com/-/kubernetes-agent +# gitlab_rails['gitlab_kas_internal_url'] = grpc://localhost:8153 + ##! Enable GitLab KAS # gitlab_kas['enable'] = true @@ -1684,6 +1717,8 @@ nginx['listen_https'] = false # gitlab_kas['listen_address'] = 'localhost:8150' # gitlab_kas['listen_network'] = 'tcp' # gitlab_kas['listen_websocket'] = true +# gitlab_kas['internal_api_listen_network'] = 'tcp' +# gitlab_kas['internal_api_listen_address'] = 'localhost:8153' ##! Metrics configuration for GitLab KAS # gitlab_kas['metrics_usage_reporting_period'] = 60 @@ -2001,6 +2036,27 @@ nginx['listen_https'] = false # grafana['metrics_basic_auth_password'] = 'please_set_a_unique_password' # default: nil # grafana['alerting_enabled'] = false +### SMTP Configuration +# +# See: http://docs.grafana.org/administration/configuration/#smtp +# +# grafana['smtp'] = { +# 'enabled' => true, +# 'host' => 'localhost:25', +# 'user' => nil, +# 'password' => nil, +# 'cert_file' => nil, +# 'key_file' => nil, +# 'skip_verify' => false, +# 'from_address' => 'admin@grafana.localhost', +# 'from_name' => 'Grafana', +# 'ehlo_identity' => 'dashboard.example.com', +# 'startTLS_policy' => nil +# } + +# Grafana usage reporting defaults to gitlab_rails['usage_ping_enabled'] +# grafana['reporting_enabled'] = true + ### Dashboards # # See: http://docs.grafana.org/administration/provisioning/#dashboards @@ -2261,8 +2317,8 @@ package['modify_kernel_parameters'] = __MODIFY_KERNEL_PARAMETERS__ # gitlab_rails['kerberos_https'] = true ################################################################################ -## Package repository (EE Only) -##! Docs: https://docs.gitlab.com/ee/administration/maven_packages.md +## Package repository +##! Docs: https://docs.gitlab.com/ee/administration/packages/ ################################################################################ # gitlab_rails['packages_enabled'] = true diff --git a/manifest.json b/manifest.json index b78464d..79367eb 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "GitLab", "id": "gitlab", "packaging_format": 1, - "version": "13.9.2~ynh1", + "version": "13.10.0~ynh1", "description": { "en": "Git-repository manager.", "fr": "Gestionnaire de dépôts Git." diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 490b455..fa28cfc 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,13 +1,13 @@ #!/bin/bash -gitlab_version="13.9.2" +gitlab_version="13.10.0" # sha256sum found here: https://packages.gitlab.com/gitlab gitlab_debian_version="buster" -gitlab_x86_64_buster_source_sha256="ea86f17d0e6101c0c45bf2ff472434e0c9f7654c9d57fb918da6ecdc5b03576e" +gitlab_x86_64_buster_source_sha256="85a02b3fa8bfa5ec2a69ef039e2dd787ad317d920c05b697be314e3e74542190" -gitlab_arm_buster_source_sha256="c3763b7fd90a532a86c361d67855e9e89eb191086f80ff1a64130f0aa283468e" +gitlab_arm_buster_source_sha256="1613a02e2925af265ddbdf809d3614cc609d7dc037a82f6bdcbf285bf76494dd" architecture=$(ynh_app_setting_get --app="$app" --key=architecture) From c62229004e0a1cae71038354e1e3ac9afc67fc75 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 29 Mar 2021 11:46:48 +0200 Subject: [PATCH 2/3] Add arm64 support --- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- scripts/upgrade.d/upgrade.last.sh | 4 ++++ upgrade-versions.sh | 10 ++++++++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index bf5e437..10019b2 100644 --- a/scripts/install +++ b/scripts/install @@ -43,8 +43,8 @@ final_path=/opt/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Detect the system architecture -if [ -n "$(uname -m | grep aarch64)" ]; then - ynh_die "Gitlab is not compatible with arm64 architecture" +if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then + architecture="arm64" elif [ -n "$(uname -m | grep x86_64)" ]; then architecture="x86-64" elif [ -n "$(uname -m | grep 86)" ]; then diff --git a/scripts/upgrade b/scripts/upgrade index d5843ad..478b73b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,8 +76,8 @@ fi # If architecture doesn't exist, create it if [ -z "$architecture" ]; then - if [ -n "$(uname -m | grep aarch64)" ]; then - ynh_die "Gitlab is not compatible with arm64 architecture" + if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then + architecture="arm64" elif [ -n "$(uname -m | grep x86_64)" ]; then architecture="x86-64" elif [ -n "$(uname -m | grep 86)" ]; then diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index fa28cfc..12858e2 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -7,12 +7,16 @@ gitlab_debian_version="buster" gitlab_x86_64_buster_source_sha256="85a02b3fa8bfa5ec2a69ef039e2dd787ad317d920c05b697be314e3e74542190" +gitlab_arm64_buster_source_sha256="fb7a1e4ef95651211f4327cbe1680bdd59c039365f83f1d47a319176f796f824" + gitlab_arm_buster_source_sha256="1613a02e2925af265ddbdf809d3614cc609d7dc037a82f6bdcbf285bf76494dd" architecture=$(ynh_app_setting_get --app="$app" --key=architecture) if [ "$architecture" = "x86-64" ]; then gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256 +elif [ "$architecture" = "arm64" ]; then + gitlab_source_sha256=$gitlab_arm64_buster_source_sha256 elif [ "$architecture" = "arm" ]; then gitlab_source_sha256=$gitlab_arm_buster_source_sha256 fi diff --git a/upgrade-versions.sh b/upgrade-versions.sh index c9895fe..5ddc9b4 100755 --- a/upgrade-versions.sh +++ b/upgrade-versions.sh @@ -24,6 +24,16 @@ echo sha256: $new_sha256 sed -i -e "s/gitlab_x86_64_buster_source_sha256=\".*\"/gitlab_x86_64_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file +# arm64 +url=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/buster/gitlab-ce_$version-ce.0_arm64.deb + +new_sha256=$(curl -s $url | sed -n '/SHA256$/,/<\/tr>$/{ /SHA256$/d; /<\/tr>$/d; p; }' | cut -d$'\n' -f3 | xargs) + +echo url: $url +echo sha256: $new_sha256 + +sed -i -e "s/gitlab_arm64_buster_source_sha256=\".*\"/gitlab_arm64_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file + # arm url=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/buster/gitlab-ce_$version-ce.0_armhf.deb From 92a76006ec725f7c58b683e133b61fc34885efb8 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 30 Mar 2021 18:41:16 +0200 Subject: [PATCH 3/3] add arm64.src file --- conf/arm64.src.default | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 conf/arm64.src.default diff --git a/conf/arm64.src.default b/conf/arm64.src.default new file mode 100644 index 0000000..89040e9 --- /dev/null +++ b/conf/arm64.src.default @@ -0,0 +1,6 @@ +SOURCE_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/__DEBIAN_VERSION__/gitlab-ce___VERSION__-ce.0_arm64.deb/download.deb +SOURCE_SUM=__SHA256_SUM__ +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=__SOURCE_FILENAME__ +SOURCE_EXTRACT=false +SOURCE_FORMAT=deb