-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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}.
- Loading branch information
1 parent
73195ff
commit 7a17d46
Showing
23 changed files
with
206 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Avoid warning on wanted-by-target | ||
|
||
ubuntu-pro-image-auto-attach: systemd-service-file-refers-to-unusual-wantedby-target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.