diff --git a/acc_disable-update-check.patch b/acc_disable-update-check.patch new file mode 100644 index 0000000..2578399 --- /dev/null +++ b/acc_disable-update-check.patch @@ -0,0 +1,42 @@ +diff -Nru azure-cli-core-2.12.1.orig/azure/cli/core/util.py azure-cli-core-2.12.1/azure/cli/core/util.py +--- azure-cli-core-2.12.1.orig/azure/cli/core/util.py 2020-09-28 10:37:30.000000000 +0200 ++++ azure-cli-core-2.12.1/azure/cli/core/util.py 2020-09-30 14:51:49.700308773 +0200 +@@ -331,37 +331,7 @@ + + + def show_updates_available(new_line_before=False, new_line_after=False): +- from azure.cli.core._session import VERSIONS +- import datetime +- +- if VERSIONS[_VERSION_CHECK_TIME]: +- version_check_time = datetime.datetime.strptime(VERSIONS[_VERSION_CHECK_TIME], '%Y-%m-%d %H:%M:%S.%f') +- if datetime.datetime.now() < version_check_time + datetime.timedelta(days=7): +- return +- +- _, updates_available_components = get_az_version_string(use_cache=True) +- if updates_available_components: +- if new_line_before: +- logger.warning("") +- show_updates(updates_available_components) +- if new_line_after: +- logger.warning("") +- VERSIONS[_VERSION_CHECK_TIME] = str(datetime.datetime.now()) +- +- +-def show_updates(updates_available_components): +- if updates_available_components is None: +- logger.warning('Unable to check if your CLI is up-to-date. Check your internet connection.') +- elif updates_available_components: # pylint: disable=too-many-nested-blocks +- if in_cloud_console(): +- warning_msg = 'You have %i updates available. They will be updated with the next build of Cloud Shell.' +- else: +- warning_msg = "You have %i updates available." +- if CLI_PACKAGE_NAME in updates_available_components: +- warning_msg = "{} Consider updating your CLI installation with 'az upgrade'".format(warning_msg) +- logger.warning(warning_msg, len(updates_available_components)) +- else: +- print('Your CLI is up-to-date.') ++ return + + + def get_json_object(json_string): diff --git a/azure-cli-core-2.12.0.tar.gz b/azure-cli-core-2.12.0.tar.gz deleted file mode 100644 index 6878a1d..0000000 --- a/azure-cli-core-2.12.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f861c57b59040d1a85320001e3c1a2d0e99f044f29d89abc13973be811f3f366 -size 146560 diff --git a/azure-cli-core-2.12.1.tar.gz b/azure-cli-core-2.12.1.tar.gz new file mode 100644 index 0000000..ae08d81 --- /dev/null +++ b/azure-cli-core-2.12.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2282e6ae3d366c8d0728dc38c13cd958df053a0e554b8b2c883b809dc664e6a +size 146622 diff --git a/azure-cli-core.changes b/azure-cli-core.changes index 3a03f88..9b90ef6 100644 --- a/azure-cli-core.changes +++ b/azure-cli-core.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Sep 30 12:53:01 UTC 2020 - John Paul Adrian Glaubitz + +- New upstream release + + Version 2.12.1 + + For detailed information about changes see the + HISTORY.rst file provided with this package +- Add patch to disable automatic check for updates (boo#1175289) + + acc_disable-update-check.patch + ------------------------------------------------------------------- Tue Sep 22 10:47:00 UTC 2020 - John Paul Adrian Glaubitz diff --git a/azure-cli-core.spec b/azure-cli-core.spec index 61e2ec7..406f4c5 100644 --- a/azure-cli-core.spec +++ b/azure-cli-core.spec @@ -17,7 +17,7 @@ Name: azure-cli-core -Version: 2.12.0 +Version: 2.12.1 Release: 0 Summary: Microsoft Azure CLI Core Module License: MIT @@ -25,6 +25,7 @@ Group: System/Management URL: https://github.com/Azure/azure-cli Source: https://files.pythonhosted.org/packages/source/a/azure-cli-core/azure-cli-core-%{version}.tar.gz Source1: LICENSE.txt +Patch0: acc_disable-update-check.patch BuildRequires: azure-cli-nspkg BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -79,6 +80,7 @@ Microsoft Azure CLI Core Module %prep %setup -q -n azure-cli-core-%{version} +%patch0 -p1 %build install -m 644 %{SOURCE1} %{_builddir}/azure-cli-core-%{version}