From nobody Thu Jan 23 10:00:38 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YdxK33Wwgz5khd9; Thu, 23 Jan 2025 10:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YdxK30Zs1z3tx4; Thu, 23 Jan 2025 10:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737626439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfcoND4pKq2jIR5oTkmmKwLvJW5Jo71aWXh8m2KIC1E=; b=eNyWAPUsRZMd2psk6sqQDvRR86qWuaMdxH5b0XL2FcWct4f2ourA4ENTj2M5DC/bK9sAOF yv+COKeHIIFKFsk0IEqcPS9A8f5I7+iSZtEX4emwPiyUUEsNyr/HJ3lVtarMK4FZDt5ffd gViE5YOICFq5dkQNVL/BVLluaxcPA+go8o2tXmuqwe3sv3UuwNqgf97xqwVwTbNJHSqHY/ KaKynRcB6/sipV2uFvQiAZPbNiVfLsUZtDwE5LagxEYEXx2oY6U9FJXeT7B7aIsaAWi7Q3 7MQ4J7coihGUw4zq7V1GxsEMWVp+2GEWWF7fBzAtgbeEmBgrr0qvT3YcNdUfaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737626439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfcoND4pKq2jIR5oTkmmKwLvJW5Jo71aWXh8m2KIC1E=; b=FKUQPKLq0mEpRNDzKwZOsBm7TI1B7WvUDAYBnF9V64pTTQKUIRX9xbKLw0lI9YNtTkwAwL RKIYRKywEMJflTsl0acZnCwaXEWYcWI35xtOcoR8ipqxogHui1sS0Sp+2EWlUMsCyP4NaB P+SPZ8nfxMhN5zrpE1Dh1fxpfih0YpoB9PtmZY8HW5VrpcELi4FDyL9Miex2Z7eLl7ybKQ ouvLSv28+YC7uiocJRhhUViXNAKB8gPcHafr5Wmb3JOngKhDvcpLHLkqfUc0wU9nj53EvF Z7OwUkjbsiy+wmX+yUFNmvoRSSacTggeZpEeW1uGYf1/R5tJ0oB7MrpKx+0lAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737626439; a=rsa-sha256; cv=none; b=KZhf0InX9kJpmkWcPYOKTFAs+hIJSKyLRMkXGBR2FGYME3Kw/YxP3tNroVTRs/t2qO3ExN Ll6WRoiyH/Y6IpkHGlcMaGI8RQcZmWXMslXW7CTFcamcfDknEuncCEPbGqtSqcxZV1UC43 zRtNQjn+B6SY3VE9jCboCr+SSvwt2gLa8wdQq7Yh3QfUro3Qt368qdi6zM0nrkoLuXiQ3a i8KAsrnT+d1Ffj9kkdgSXDQw73Q59jTIff3m3PBnh7/Lyt9uHQTLY/b4O24uuAJlhiiBSH igs4SA9C8tBelfSRT1C8t1Todw/L8rr9YBcY/pFnhPQ9iGmET36mXrxj424+RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YdxK309fYzZjG; Thu, 23 Jan 2025 10:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50NA0c8h087836; Thu, 23 Jan 2025 10:00:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50NA0c8L087833; Thu, 23 Jan 2025 10:00:38 GMT (envelope-from git) Date: Thu, 23 Jan 2025 10:00:38 GMT Message-Id: <202501231000.50NA0c8L087833@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Matthias Fechner Subject: git: 01459265b019 - 2025Q1 - www/gitlab: make it possible to define the log level of gitlab List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mfechner X-Git-Repository: ports X-Git-Refname: refs/heads/2025Q1 X-Git-Reftype: branch X-Git-Commit: 01459265b0191e8a4f62541e598feb444e7237e6 Auto-Submitted: auto-generated The branch 2025Q1 has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=01459265b0191e8a4f62541e598feb444e7237e6 commit 01459265b0191e8a4f62541e598feb444e7237e6 Author: Matthias Fechner AuthorDate: 2025-01-18 12:00:50 +0000 Commit: Matthias Fechner CommitDate: 2025-01-23 09:48:28 +0000 www/gitlab: make it possible to define the log level of gitlab For only warnings, just execute: sysrc gitlab_log_level="warn" and restart gitlab: service gitlab restart Possible values are: debug info warn error (cherry picked from commit 42e0f039048691107d8e521e7f707b74157bc622) --- www/gitlab/Makefile.common | 2 +- www/gitlab/files/gitlab.in | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/www/gitlab/Makefile.common b/www/gitlab/Makefile.common index 0e8f4676d38c..710dccddf139 100644 --- a/www/gitlab/Makefile.common +++ b/www/gitlab/Makefile.common @@ -1,5 +1,5 @@ GITLAB_VERSION= 17.8.0 -GITLAB_PORTREVISION= 1 +GITLAB_PORTREVISION= 2 # Git version gitaly should use (from gitlab mirror) # Find current tag from Makefile and .gitlab-ci.yaml diff --git a/www/gitlab/files/gitlab.in b/www/gitlab/files/gitlab.in index a386086fb70c..b38c8d7c3a11 100644 --- a/www/gitlab/files/gitlab.in +++ b/www/gitlab/files/gitlab.in @@ -47,6 +47,8 @@ stop_precmd=${name}_init : ${gitlab_allow_conflicts:="NO"} : ${gitlab_wait:="120"} : ${gitlab_svcj_options:="net_basic"} +# Use debug, info, warn, error +: ${gitlab_log_level:="info"} load_rc_config $name @@ -377,14 +379,14 @@ start_gitlab() { # Remove old socket if it exists rm -f "$rails_socket" 2>/dev/null # Start the web server - RAILS_ENV=$RAILS_ENV USE_WEB_SERVER=$use_web_server bin/web start + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV USE_WEB_SERVER=$use_web_server bin/web start fi # If sidekiq is already running, don't start it again. if [ "$sidekiq_status" = "0" ]; then echo "The Sidekiq job dispatcher is already running with pid $spid, not restarting" else - RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs start > /dev/null & + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs start > /dev/null & fi if [ "$gitlab_workhorse_status" = "0" ]; then @@ -394,7 +396,7 @@ start_gitlab() { # Because gitlab-workhorse has multiple executables we need to fix # the PATH. $app_root/bin/daemon_with_pidfile $gitlab_workhorse_pid_path \ - /usr/bin/env PATH=$gitlab_workhorse_dir:$PATH \ + /usr/bin/env PATH=$gitlab_workhorse_dir:$PATH GITLAB_LOG_LEVEL=${gitlab_log_level} \ gitlab-workhorse $gitlab_workhorse_options \ >> $gitlab_workhorse_log 2>&1 & fi @@ -404,7 +406,7 @@ start_gitlab() { if [ "$mail_room_status" = "0" ]; then echo "The MailRoom email processor is already running with pid $mpid, not restarting" else - RAILS_ENV=$RAILS_ENV bin/mail_room start & + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV bin/mail_room start & fi fi @@ -413,6 +415,7 @@ start_gitlab() { echo "The GitLab Pages is already running with pid $gppid, not restarting" else $app_root/bin/daemon_with_pidfile $gitlab_pages_pid_path \ + /usr/bin/env GITLAB_LOG_LEVEL=${gitlab_log_level} \ $gitlab_pages_dir/gitlab-pages $gitlab_pages_options \ >> $gitlab_pages_log 2>&1 & fi @@ -423,6 +426,7 @@ start_gitlab() { echo "Gitaly is already running with pid $gapid, not restarting" else $app_root/bin/daemon_with_pidfile $gitaly_pid_path \ + /usr/bin/env GITLAB_LOG_LEVEL=${gitlab_log_level} \ $gitaly_dir/bin/gitaly $gitaly_dir/config.toml >> $gitaly_log 2>&1 & fi fi @@ -439,11 +443,11 @@ stop_gitlab() { if [ "$web_status" = "0" ]; then echo "Shutting down GitLab web server" - RAILS_ENV=$RAILS_ENV USE_WEB_SERVER=$use_web_server bin/web stop + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV USE_WEB_SERVER=$use_web_server bin/web stop fi if [ "$sidekiq_status" = "0" ]; then echo "Shutting down GitLab Sidekiq" - RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs stop + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs stop fi if [ "$gitlab_workhorse_status" = "0" ]; then echo "Shutting down GitLab Workhorse" @@ -451,7 +455,7 @@ stop_gitlab() { fi if [ "$mail_room_enabled" = true ] && [ "$mail_room_status" = "0" ]; then echo "Shutting down GitLab MailRoom" - RAILS_ENV=$RAILS_ENV bin/mail_room stop + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV bin/mail_room stop fi if [ "$gitlab_pages_status" = "0" ]; then echo "Shutting down gitlab-pages" @@ -543,15 +547,15 @@ reload_gitlab(){ exit 1 fi printf "Reloading GitLab web server configuration... " - RAILS_ENV=$RAILS_ENV USE_WEB_SERVER=$use_web_server bin/web reload + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV USE_WEB_SERVER=$use_web_server bin/web reload echo "Done." echo "Restarting GitLab Sidekiq since it isn't capable of reloading its config..." - RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs restart & /dev/null & + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs restart & /dev/null & if [ "$mail_room_enabled" != true ]; then echo "Restarting GitLab MailRoom since it isn't capable of reloading its config..." - RAILS_ENV=$RAILS_ENV bin/mail_room restart + GITLAB_LOG_LEVEL=${gitlab_log_level} RAILS_ENV=$RAILS_ENV bin/mail_room restart fi wait_for_pids