From eb923a62bf2a6eb385db0627b5fd3834d877bcf933f2e33e563ce0403b49a130 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Tue, 10 Dec 2024 17:50:58 +0000 Subject: [PATCH] Add glab-disable_update_check.patch to disable the update check by default OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/glab?expand=0&rev=75 --- glab-disable_update_check.patch | 43 +++++++++++++++++++++++++++++++++ glab.changes | 6 +++++ glab.spec | 2 ++ 3 files changed, 51 insertions(+) create mode 100644 glab-disable_update_check.patch diff --git a/glab-disable_update_check.patch b/glab-disable_update_check.patch new file mode 100644 index 0000000..c1dbb88 --- /dev/null +++ b/glab-disable_update_check.patch @@ -0,0 +1,43 @@ +Description: Disable glab update check + Change default for the Debian package to not do update checks by default. +Author: Nicolas Schier +Forwarded: not-needed +Last-Update: 2023-07-06 + +--- glab-1.31.0.orig/internal/config/config.yaml.lock ++++ glab-1.31.0/internal/config/config.yaml.lock +@@ -7,7 +7,7 @@ browser: + # Set your desired Markdown renderer style. Available options are [dark, light, notty]. To set a custom style, refer to https://github.com/charmbracelet/glamour#styles + glamour_style: dark + # Allow glab to automatically check for updates and notify you when there are new updates. +-check_update: true ++check_update: false + # Whether or not to display hyperlink escape characters when listing items like issues or merge requests. Set to TRUE to display hyperlinks in TTYs only. Force hyperlinks by setting FORCE_HYPERLINKS=1 as an environment variable. + display_hyperlinks: false + # Default GitLab hostname to use. +--- glab-1.31.0.orig/internal/config/config_stub.go ++++ glab-1.31.0/internal/config/config_stub.go +@@ -57,7 +57,7 @@ func rootConfig() *yaml.Node { + }, + { + Kind: yaml.ScalarNode, +- Value: "true", ++ Value: "false", + }, + { + HeadComment: "# Whether or not to display hyperlink escape characters when listing items like issues or merge requests. Set to TRUE to display hyperlinks in TTYs only. Force hyperlinks by setting FORCE_HYPERLINKS=1 as an environment variable.", + + +Description: Reflect changed update check default in help text +Author: Georg Pfuetzenreuter +--- a/commands/config/config.go 2024-11-28 10:28:19.000000000 +0100 ++++ b/commands/config/config.go 2024-12-09 03:14:48.647482334 +0100 +@@ -26,7 +26,7 @@ + - visual: Takes precedence over 'editor'. If unset, uses the default editor. Override with environment variable $VISUAL. + - glamour_style: Your desired Markdown renderer style. Options are dark, light, notty. Custom styles are available using [glamour](https://github.com/charmbracelet/glamour#styles). + - glab_pager: Your desired pager command to use, such as 'less -R'. +-- check_update: If true, notifies of new versions of glab. Defaults to true. ++- check_update: If true, notifies of new versions of glab. Defaults to false on openSUSE. + - display_hyperlinks: If true, and using a TTY, outputs hyperlinks for issues and merge request lists. Defaults to false. + `, "`"), + Aliases: []string{"conf"}, diff --git a/glab.changes b/glab.changes index 784519b..dd82847 100644 --- a/glab.changes +++ b/glab.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 9 02:06:17 UTC 2024 - Georg Pfuetzenreuter + +- Add glab-disable_update_check.patch to disable the update check by default + (it is not useful for distribution packages) + ------------------------------------------------------------------- Fri Nov 29 08:29:43 UTC 2024 - opensuse_buildservice@ojkastl.de diff --git a/glab.spec b/glab.spec index 5036e88..40bb9a9 100644 --- a/glab.spec +++ b/glab.spec @@ -28,6 +28,8 @@ Group: Development/Tools/Other URL: https://gitlab.com/gitlab-org/cli Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.gz +# https://sources.debian.org/src/glab/1.49.0-1/debian/patches/0001-Disable-update-check.patch +Patch0: glab-disable_update_check.patch %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?almalinux_version} || 0%{?rocky_version} BuildRequires: golang >= 1.23.0 %else