From 7a17d468afee50858e18ce6a740486bdef2af080 Mon Sep 17 00:00:00 2001 From: Grant Orndorff Date: Fri, 8 Dec 2023 14:30:56 -0500 Subject: [PATCH] debian: rename binary packages We're renaming the following packages using transitional packages to align the package names with the product naming: * ubuntu-advantage-tools -> ubuntu-pro-client * ubuntu-advantage-pro -> ubuntu-pro-image-auto-attach Because ubuntu-pro-client "Breaks" ubuntu-advantage-tools <<31~, existing instances will need to upgrade to ubuntu-advantage-tools 31 (the transitional package) in order to install the new ubuntu-pro-client package. Because of that, all previous package migrations (from versions older than 31) are left in ubuntu-advantage-tools.{preinst,postinst,postrm}. All future package migrations will happen in ubuntu-pro-client.{preinst,postinst,postrm}. --- debian/control | 28 +++++- debian/rules | 39 ++++---- debian/source/lintian-overrides | 4 +- debian/ubuntu-advantage-pro.lintian-overrides | 3 - debian/ubuntu-advantage-tools.postinst | 10 -- debian/ubuntu-advantage-tools.postrm | 26 ----- ...tion => ubuntu-pro-client.bash-completion} | 0 ...ge-tools.links => ubuntu-pro-client.links} | 0 debian/ubuntu-pro-client.lintian-overrides | 10 ++ ....logrotate => ubuntu-pro-client.logrotate} | 0 ...ls.manpages => ubuntu-pro-client.manpages} | 0 debian/ubuntu-pro-client.postinst | 98 +++++++++++++++++++ debian/ubuntu-pro-client.postrm | 37 +++++++ ...ge-tools.prerm => ubuntu-pro-client.prerm} | 0 ...tu-pro-image-auto-attach.lintian-overrides | 3 + preferences.d/ubuntu-pro-esm-apps | 2 +- preferences.d/ubuntu-pro-esm-infra | 2 +- setup.py | 2 +- tools/ua.bash | 2 +- uaclient/apt.py | 8 +- uaclient/cli/tests/test_cli.py | 2 +- uaclient/messages/__init__.py | 2 +- uaclient/version.py | 4 +- 23 files changed, 206 insertions(+), 76 deletions(-) delete mode 100644 debian/ubuntu-advantage-pro.lintian-overrides rename debian/{ubuntu-advantage-tools.bash-completion => ubuntu-pro-client.bash-completion} (100%) rename debian/{ubuntu-advantage-tools.links => ubuntu-pro-client.links} (100%) create mode 100644 debian/ubuntu-pro-client.lintian-overrides rename debian/{ubuntu-advantage-tools.logrotate => ubuntu-pro-client.logrotate} (100%) rename debian/{ubuntu-advantage-tools.manpages => ubuntu-pro-client.manpages} (100%) create mode 100644 debian/ubuntu-pro-client.postinst create mode 100644 debian/ubuntu-pro-client.postrm rename debian/{ubuntu-advantage-tools.prerm => ubuntu-pro-client.prerm} (100%) create mode 100644 debian/ubuntu-pro-image-auto-attach.lintian-overrides diff --git a/debian/control b/debian/control index 1f3b59275d..6fbbfc606c 100644 --- a/debian/control +++ b/debian/control @@ -32,6 +32,14 @@ Vcs-Browser: https://github.com/canonical/ubuntu-pro-client Rules-Requires-Root: no Package: ubuntu-advantage-tools +Depends: ubuntu-pro-client, ${misc:Depends} +Architecture: all +Priority: optional +Section: oldlibs +Description: transitional package + This is a transitional package. It can safely be removed. + +Package: ubuntu-pro-client Homepage: https://canonical-ubuntu-pro-client.readthedocs-hosted.com/ Architecture: any Depends: ${misc:Depends}, @@ -41,6 +49,9 @@ Depends: ${misc:Depends}, python3-pkg-resources, ${extra:Depends} Recommends: ubuntu-pro-client-l10n +Breaks: ubuntu-advantage-tools (<<31~) +Replaces: ubuntu-advantage-tools (<<31~) +Provides: ubuntu-advantage-tools Description: Management tools for Ubuntu Pro Ubuntu Pro is a suite of additional services provided by Canonical on top of Ubuntu. Whether you’re an enterprise customer deploying systems @@ -50,17 +61,26 @@ Description: Management tools for Ubuntu Pro Package: ubuntu-pro-client-l10n Architecture: any -Depends: ${misc:Depends}, ubuntu-advantage-tools (>=30~) +Depends: ${misc:Depends}, ubuntu-pro-client (>=31~) Description: Translations for Ubuntu Pro Client This package delivers translations of Ubuntu Pro Client for various languages. Package: ubuntu-advantage-pro +Depends: ubuntu-pro-image-auto-attach, ${misc:Depends} +Architecture: all +Priority: optional +Section: oldlibs +Description: transitional package + This is a transitional package. It can safely be removed. + +Package: ubuntu-pro-image-auto-attach Homepage: https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/explanations/what_are_ubuntu_pro_cloud_instances/ Architecture: all -Depends: ${misc:Depends}, ubuntu-advantage-tools (>=20.2) -Replaces: ubuntu-advantage-tools (<<20.2) -Breaks: ubuntu-advantage-tools (<<20.2) +Depends: ${misc:Depends}, ubuntu-pro-client (>=31~) +Breaks: ubuntu-advantage-pro (<<31~) +Replaces: ubuntu-advantage-pro (<<31~) +Provides: ubuntu-advantage-pro Description: Service to auto-attach Ubuntu Pro cloud images This package delivers an additional service that performs an auto-attach operation for Ubuntu Pro cloud instances. This package should not be manually diff --git a/debian/rules b/debian/rules index 7b04ac101d..7ac80d6352 100755 --- a/debian/rules +++ b/debian/rules @@ -43,44 +43,47 @@ endif endif override_dh_gencontrol: - echo extra:Depends=$(APT_PKG_DEPS) $(DISTRO_INFO_DEPS) >> debian/ubuntu-advantage-tools.substvars + echo extra:Depends=$(APT_PKG_DEPS) $(DISTRO_INFO_DEPS) >> debian/ubuntu-pro-client.substvars dh_gencontrol override_dh_systemd_enable: - dh_systemd_enable -pubuntu-advantage-pro ua-auto-attach.service - dh_systemd_enable -pubuntu-advantage-tools ua-reboot-cmds.service - dh_systemd_enable -pubuntu-advantage-tools ua-timer.timer - dh_systemd_enable -pubuntu-advantage-tools ua-timer.service - dh_systemd_enable -pubuntu-advantage-tools ubuntu-advantage.service + dh_systemd_enable -pubuntu-pro-image-auto-attach ua-auto-attach.service + dh_systemd_enable -pubuntu-pro-client ua-reboot-cmds.service + dh_systemd_enable -pubuntu-pro-client ua-timer.timer + dh_systemd_enable -pubuntu-pro-client ua-timer.service + dh_systemd_enable -pubuntu-pro-client ubuntu-advantage.service ifeq (${VERSION_ID},"16.04") # Only enable cloud-id-shim on Xenial - dh_systemd_enable -pubuntu-advantage-tools ubuntu-advantage-cloud-id-shim.service + dh_systemd_enable -pubuntu-pro-client ubuntu-advantage-cloud-id-shim.service endif override_dh_systemd_start: - dh_systemd_start -pubuntu-advantage-tools ua-timer.timer - dh_systemd_start -pubuntu-advantage-tools ubuntu-advantage.service + dh_systemd_start -pubuntu-pro-client ua-timer.timer + dh_systemd_start -pubuntu-pro-client ubuntu-advantage.service override_dh_auto_install: - dh_auto_install --destdir=debian/ubuntu-advantage-tools + dh_auto_install --destdir=debian/ubuntu-pro-client flist=$$(find $(CURDIR)/debian/ -type f -name version.py) && sed -i 's,@@PACKAGED_VERSION@@,$(DEB_VERSION),' $${flist:-did-not-find-version-py-for-replacement} # We install the conf file even on non-LTS version to avoid issues on upgrade scenarios - make -C apt-hook DESTDIR=$(CURDIR)/debian/ubuntu-advantage-tools install-conf - make -C apt-hook DESTDIR=$(CURDIR)/debian/ubuntu-advantage-tools install + make -C apt-hook DESTDIR=$(CURDIR)/debian/ubuntu-pro-client install-conf + make -C apt-hook DESTDIR=$(CURDIR)/debian/ubuntu-pro-client install # We want to guarantee that we are not shipping any conftest files - find $(CURDIR)/debian/ubuntu-advantage-tools -type f -name conftest.py -delete + find $(CURDIR)/debian/ubuntu-pro-client -type f -name conftest.py -delete ifneq (${VERSION_ID},"16.04") # Only install cloud-id-shim on Xenial - rm $(CURDIR)/debian/ubuntu-advantage-tools/lib/systemd/system/ubuntu-advantage-cloud-id-shim.service + rm $(CURDIR)/debian/ubuntu-pro-client/lib/systemd/system/ubuntu-advantage-cloud-id-shim.service endif - # Move ua-auto-attach.service out to ubuntu-advantage-pro - mkdir -p debian/ubuntu-advantage-pro/lib/systemd/system - mv debian/ubuntu-advantage-tools/lib/systemd/system/ua-auto-attach.* debian/ubuntu-advantage-pro/lib/systemd/system - cd debian/ubuntu-advantage-tools + # Move ua-auto-attach.service out to ubuntu-pro-image-auto-attach + mkdir -p debian/ubuntu-pro-image-auto-attach/lib/systemd/system + mv debian/ubuntu-pro-client/lib/systemd/system/ua-auto-attach.* debian/ubuntu-pro-image-auto-attach/lib/systemd/system + cd debian/ubuntu-pro-client + + # TODO move patch status json to ubuntu-advantage-tools + # TODO anything else only needed for old migrations? override_dh_auto_clean: diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides index 069783308c..423348f049 100644 --- a/debian/source/lintian-overrides +++ b/debian/source/lintian-overrides @@ -1,5 +1,5 @@ # Lintian doesn't see dh-systemd alternative when building on xenial -ubuntu-advantage-tools: missing-build-dependency-for-dh_-command dh_systemd_start => dh-systemd +ubuntu-pro-client: missing-build-dependency-for-dh_-command dh_systemd_start => dh-systemd # Lintian can't handle the multiline debhelper/dh-systemd dependencies explained in debian/control -ubuntu-advantage-tools: missing-build-dependency-for-dh-addon *systemd* +ubuntu-pro-client: missing-build-dependency-for-dh-addon *systemd* diff --git a/debian/ubuntu-advantage-pro.lintian-overrides b/debian/ubuntu-advantage-pro.lintian-overrides deleted file mode 100644 index ba165de5ee..0000000000 --- a/debian/ubuntu-advantage-pro.lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# Avoid warning on wanted-by-target - -ubuntu-advantage-pro: systemd-service-file-refers-to-unusual-wantedby-target diff --git a/debian/ubuntu-advantage-tools.postinst b/debian/ubuntu-advantage-tools.postinst index b11748fee8..2fac82c5dc 100644 --- a/debian/ubuntu-advantage-tools.postinst +++ b/debian/ubuntu-advantage-tools.postinst @@ -450,7 +450,6 @@ case "$1" in rm_old_license_check_marker disable_new_timer_if_old_timer_already_disabled remove_old_systemd_units - /usr/lib/ubuntu-advantage/cloud-id-shim.sh || true # On old version of ubuntu-advantange-tools, we don't have a public # machine_token.json file on attached machines. Since the non-root @@ -474,15 +473,6 @@ case "$1" in if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "29~"; then rename_gpg_keys fi - - if grep -q "^ua_config:" /etc/ubuntu-advantage/uaclient.conf; then - echo "Warning: uaclient.conf contains old ua_config field." >&2 - echo " Please do the following:" >&2 - echo " 1. Run 'pro config set field=value' for each field/value pair" >&2 - echo " present under ua_config in /etc/ubuntu-advantage/uaclient.conf" >&2 - echo " 2. Delete ua_config and all sub-fields in" >&2 - echo " /etc/ubuntu-advantage/uaclient.conf" >&2 - fi ;; esac diff --git a/debian/ubuntu-advantage-tools.postrm b/debian/ubuntu-advantage-tools.postrm index e0e930daf6..cb64b0bfe6 100644 --- a/debian/ubuntu-advantage-tools.postrm +++ b/debian/ubuntu-advantage-tools.postrm @@ -3,33 +3,7 @@ set -e -remove_apt_auth(){ - # config file created at runtime, needs explicit handling on purge - rm -f /etc/apt/auth.conf.d/90ubuntu-advantage -} - -remove_cache_dir(){ - rm -rf /var/lib/ubuntu-advantage -} - -remove_logs(){ - rm -f /var/log/ubuntu-advantage.log* - rm -f /var/log/ubuntu-advantage-timer.log* - rm -f /var/log/ubuntu-advantage-license-check.log* - rm -f /var/log/ubuntu-advantage-daemon.log* -} - -remove_gpg_files(){ - rm -f /etc/apt/trusted.gpg.d/ubuntu-pro-*.gpg -} - case "$1" in - purge) - remove_apt_auth - remove_cache_dir - remove_logs - remove_gpg_files - ;; abort-install|abort-upgrade) # LP: #2004280 if dpkg --compare-versions "$2" lt "27.14~"; then diff --git a/debian/ubuntu-advantage-tools.bash-completion b/debian/ubuntu-pro-client.bash-completion similarity index 100% rename from debian/ubuntu-advantage-tools.bash-completion rename to debian/ubuntu-pro-client.bash-completion diff --git a/debian/ubuntu-advantage-tools.links b/debian/ubuntu-pro-client.links similarity index 100% rename from debian/ubuntu-advantage-tools.links rename to debian/ubuntu-pro-client.links diff --git a/debian/ubuntu-pro-client.lintian-overrides b/debian/ubuntu-pro-client.lintian-overrides new file mode 100644 index 0000000000..6dc2905272 --- /dev/null +++ b/debian/ubuntu-pro-client.lintian-overrides @@ -0,0 +1,10 @@ +# We are silencing this issue because of this LP: #1930121 +ubuntu-pro-client: command-with-path-in-maintainer-script + +# Ubuntu doesn't support sysv init.d +ubuntu-pro-client: package-supports-alternative-init-but-no-init.d-script + +# We have made the decision of delivering those files +ubuntu-pro-client: package-installs-apt-preferences + +ubuntu-pro-client: possible-bashism-in-maintainer-script diff --git a/debian/ubuntu-advantage-tools.logrotate b/debian/ubuntu-pro-client.logrotate similarity index 100% rename from debian/ubuntu-advantage-tools.logrotate rename to debian/ubuntu-pro-client.logrotate diff --git a/debian/ubuntu-advantage-tools.manpages b/debian/ubuntu-pro-client.manpages similarity index 100% rename from debian/ubuntu-advantage-tools.manpages rename to debian/ubuntu-pro-client.manpages diff --git a/debian/ubuntu-pro-client.postinst b/debian/ubuntu-pro-client.postinst new file mode 100644 index 0000000000..11f7ef95da --- /dev/null +++ b/debian/ubuntu-pro-client.postinst @@ -0,0 +1,98 @@ +#!/bin/sh + +set -e + +. /etc/os-release # For VERSION_ID + +# Needed even if this script doesn't call debconf, see: +# https://lintian.debian.org/tags/postinst-does-not-load-confmodule.html +# Note: this may re-exec the postinst script. +. /usr/share/debconf/confmodule + +if [ -z "${VERSION_ID}" ]; then + echo "Warning: missing VERSION_ID in /etc/os-release" >&2 + VERSION_ID="NO-VERSION_ID" +fi + + +XENIAL_CLOUD_ID_SHIM_UNIT_LOCATION="/etc/systemd/system/multi-user.target.wants/ubuntu-advantage-cloud-id-shim.service" + +NOTICES_DIR="/var/lib/ubuntu-advantage/notices" +TEMP_NOTICES_DIR="/run/ubuntu-advantage/notices" +REBOOT_CMD_MARKER_FILE="/var/lib/ubuntu-advantage/marker-reboot-cmds-required" + + +# +# Helpers that change state of pro-client +# +add_notice() { + notice=$1 + mkdir -p $NOTICES_DIR + touch $NOTICES_DIR/$notice +} +add_temp_notice() { + notice=$1 + mkdir -p $TEMP_NOTICES_DIR + touch $TEMP_NOTICES_DIR/$notice +} +mark_reboot_cmds_as_needed() { + if [ ! -f "$REBOOT_CMD_MARKER_FILE" ]; then + touch $REBOOT_CMD_MARKER_FILE + fi +} + + +case "$1" in + configure) + PREVIOUS_PKG_VER=$2 + + # + # Migrations from previous ubuntu-pro-client package versions + # + # These should always be version-gated using PREVIOUS_PKG_VER and execute in order from oldest to newest. + # For example: + # if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "33~"; then + # # do the migrations to version 33 + # fi + # if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "34~"; then + # # do the migrations to version 34 + # fi + # + + # none yet for ubuntu-pro-client package + + + # + # do-release-upgrade migrations from previous Ubuntu release ubuntu-pro-client package versions + # + + # Xenial -> Bionic: clean up unnecessary cloud-id-shim unit that is only in xenial packages + if [ "$VERSION_ID" = "18.04" ]; then + if echo "$PREVIOUS_PKG_VER" | grep -q "16.04"; then + if [ -L $XENIAL_CLOUD_ID_SHIM_UNIT_LOCATION ]; then + deb-systemd-helper purge ubuntu-advantage-cloud-id-shim.service > /dev/null || true + deb-systemd-helper unmask ubuntu-advantage-cloud-id-shim.service > /dev/null || true + fi + fi + fi + + + # + # Always do these to ensure ubuntu-pro-client is in correct state + # + + /usr/lib/ubuntu-advantage/cloud-id-shim.sh || true + + if grep -q "^ua_config:" /etc/ubuntu-advantage/uaclient.conf; then + echo "Warning: uaclient.conf contains old ua_config field." >&2 + echo " Please do the following:" >&2 + echo " 1. Run 'pro config set field=value' for each field/value pair" >&2 + echo " present under ua_config in /etc/ubuntu-advantage/uaclient.conf" >&2 + echo " 2. Delete ua_config and all sub-fields in" >&2 + echo " /etc/ubuntu-advantage/uaclient.conf" >&2 + fi + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/ubuntu-pro-client.postrm b/debian/ubuntu-pro-client.postrm new file mode 100644 index 0000000000..918384dffb --- /dev/null +++ b/debian/ubuntu-pro-client.postrm @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + + +remove_apt_auth(){ + # config file created at runtime, needs explicit handling on purge + rm -f /etc/apt/auth.conf.d/90ubuntu-advantage +} + +remove_cache_dir(){ + rm -rf /var/lib/ubuntu-advantage +} + +remove_logs(){ + rm -f /var/log/ubuntu-advantage.log* + rm -f /var/log/ubuntu-advantage-timer.log* + rm -f /var/log/ubuntu-advantage-license-check.log* + rm -f /var/log/ubuntu-advantage-daemon.log* +} + +remove_gpg_files(){ + rm -f /etc/apt/trusted.gpg.d/ubuntu-pro-*.gpg +} + +case "$1" in + purge) + remove_apt_auth + remove_cache_dir + remove_logs + remove_gpg_files + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/ubuntu-advantage-tools.prerm b/debian/ubuntu-pro-client.prerm similarity index 100% rename from debian/ubuntu-advantage-tools.prerm rename to debian/ubuntu-pro-client.prerm diff --git a/debian/ubuntu-pro-image-auto-attach.lintian-overrides b/debian/ubuntu-pro-image-auto-attach.lintian-overrides new file mode 100644 index 0000000000..f3c0c7b087 --- /dev/null +++ b/debian/ubuntu-pro-image-auto-attach.lintian-overrides @@ -0,0 +1,3 @@ +# Avoid warning on wanted-by-target + +ubuntu-pro-image-auto-attach: systemd-service-file-refers-to-unusual-wantedby-target diff --git a/preferences.d/ubuntu-pro-esm-apps b/preferences.d/ubuntu-pro-esm-apps index 5ded6f8f7a..ccdff4be92 100644 --- a/preferences.d/ubuntu-pro-esm-apps +++ b/preferences.d/ubuntu-pro-esm-apps @@ -1,4 +1,4 @@ -# This file is used by Ubuntu Pro and supplied by the ubuntu-advantage-tools +# This file is used by Ubuntu Pro and supplied by the ubuntu-pro-client # package. It has no effect if Ubuntu Pro services are not in use since no # other apt repositories are expected to match o=UbuntuESMApps. # diff --git a/preferences.d/ubuntu-pro-esm-infra b/preferences.d/ubuntu-pro-esm-infra index e956e0ae38..125b31d09f 100644 --- a/preferences.d/ubuntu-pro-esm-infra +++ b/preferences.d/ubuntu-pro-esm-infra @@ -1,4 +1,4 @@ -# This file is used by Ubuntu Pro and supplied by the ubuntu-advantage-tools +# This file is used by Ubuntu Pro and supplied by the ubuntu-pro-client # package. It has no effect if Ubuntu Pro services are not in use since no # other apt repositories are expected to match o=UbuntuESM. # diff --git a/setup.py b/setup.py index 2628f7b36a..e73bfcc2a5 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from uaclient import defaults -NAME = "ubuntu-advantage-tools" +NAME = "ubuntu-pro-client" INSTALL_REQUIRES = open("requirements.txt").read().rstrip("\n").split("\n") diff --git a/tools/ua.bash b/tools/ua.bash index c655a8333f..1576825424 100644 --- a/tools/ua.bash +++ b/tools/ua.bash @@ -1,4 +1,4 @@ -# bash completion for ubuntu-advantage-tools +# bash completion for ubuntu-pro-client . /etc/os-release # For VERSION_ID diff --git a/uaclient/apt.py b/uaclient/apt.py index fdf7fb82e2..dcd1ccfdd9 100644 --- a/uaclient/apt.py +++ b/uaclient/apt.py @@ -17,16 +17,16 @@ from uaclient.defaults import ESM_APT_ROOTDIR APT_HELPER_TIMEOUT = 60.0 # 60 second timeout used for apt-helper call -APT_AUTH_COMMENT = " # ubuntu-advantage-tools" +APT_AUTH_COMMENT = " # ubuntu-pro-client" APT_CONFIG_AUTH_FILE = "Dir::Etc::netrc/" APT_CONFIG_AUTH_PARTS_DIR = "Dir::Etc::netrcparts/" APT_CONFIG_LISTS_DIR = "Dir::State::lists/" APT_PROXY_CONFIG_HEADER = """\ /* - * Autogenerated by ubuntu-advantage-tools + * Autogenerated by ubuntu-pro-client * Do not edit this file directly * - * To change what ubuntu-advantage-tools sets, use the `pro config set` + * To change what ubuntu-pro-client sets, use the `pro config set` * or the `pro config unset` commands to set/unset either: * global_apt_http_proxy and global_apt_https_proxy * for a global apt proxy @@ -53,7 +53,7 @@ ESM_REPO_FILE_CONTENT = """\ -# Written by ubuntu-advantage-tools +# Written by ubuntu-pro-client deb https://esm.ubuntu.com/{name}/ubuntu {series}-{name}-security main # deb-src https://esm.ubuntu.com/{name}/ubuntu {series}-{name}-security main diff --git a/uaclient/cli/tests/test_cli.py b/uaclient/cli/tests/test_cli.py index 79d84ff99a..96a01a3a50 100644 --- a/uaclient/cli/tests/test_cli.py +++ b/uaclient/cli/tests/test_cli.py @@ -859,7 +859,7 @@ def test_get_valid_entitlements(self, _m_valid_services, FakeConfig): expected_notice = r""".*[info].* A new version is available: 1.2.3 Please run: - sudo apt-get install ubuntu-advantage-tools + sudo apt-get install ubuntu-pro-client to get the latest bug fixes and new features. """ diff --git a/uaclient/messages/__init__.py b/uaclient/messages/__init__.py index 3b1e9ce1be..d7538d0092 100644 --- a/uaclient/messages/__init__.py +++ b/uaclient/messages/__init__.py @@ -104,7 +104,7 @@ class TxtColor: """\ A new version is available: {version} Please run: - sudo apt-get install ubuntu-advantage-tools + sudo apt-get install ubuntu-pro-client to get the latest bug fixes and new features.""" ) ) diff --git a/uaclient/version.py b/uaclient/version.py index 5fe84e86f7..545a9207f9 100644 --- a/uaclient/version.py +++ b/uaclient/version.py @@ -52,9 +52,7 @@ def get_last_known_candidate() -> Optional[str]: or os.stat(CANDIDATE_CACHE_PATH).st_mtime < last_apt_cache_update ): try: - candidate_version = get_pkg_candidate_version( - "ubuntu-advantage-tools" - ) + candidate_version = get_pkg_candidate_version("ubuntu-pro-client") if candidate_version: os.makedirs(UAC_RUN_PATH, exist_ok=True) with open(CANDIDATE_CACHE_PATH, "w") as f: