Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin esm but only esm #2681

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/airgapped.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Feature: Performing attach using ua-airgapped
When I run `apt-cache policy hello` with sudo
Then stdout matches regexp:
"""
500 .*:9000/ubuntu jammy-apps-security/main
510 .*:9000/ubuntu jammy-apps-security/main
"""
And stdout matches regexp:
"""
500 .*:8000/ubuntu jammy-infra-security/main
510 .*:8000/ubuntu jammy-infra-security/main
"""
Then I verify that running `pro refresh` `with sudo` exits `0`

Expand Down
16 changes: 10 additions & 6 deletions features/attached_enable.feature
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,20 @@ Feature: Enable command behaviour when attached to an Ubuntu Pro subscription
See: sudo pro status
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
<esm-infra-url> <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `510`
"""
<esm-infra-url> <release>-infra-security/main amd64 Packages
"""
And I verify that running `apt update` `with sudo` exits `0`
When I run `apt install -y <infra-pkg>` with sudo, retrying exit [100]
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 <esm-infra-url> <release>-infra-security/main amd64 Packages
\s*510 <esm-infra-url> <release>-infra-security/main amd64 Packages
"""

Examples: ubuntu release
Expand Down Expand Up @@ -1124,11 +1128,11 @@ Feature: Enable command behaviour when attached to an Ubuntu Pro subscription
"""
And I verify that running `apt update` `with sudo` exits `0`
When I run `apt-cache policy` as non-root
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -1138,8 +1142,8 @@ Feature: Enable command behaviour when attached to an Ubuntu Pro subscription
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I verify that running `pro enable esm-apps` `with sudo` exits `1`
Then stdout matches regexp
Expand Down
42 changes: 21 additions & 21 deletions features/ubuntu_pro.feature
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,19 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
To use a different subscription first run: sudo pro detach.
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -310,7 +310,7 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And stdout matches regexp:
"""
Expand All @@ -321,8 +321,8 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I create the file `/var/lib/ubuntu-advantage/marker-reboot-cmds-required` with the following:
"""
Expand Down Expand Up @@ -416,19 +416,19 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
To use a different subscription first run: sudo pro detach.
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -437,7 +437,7 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And stdout matches regexp:
"""
Expand All @@ -448,8 +448,8 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I create the file `/var/lib/ubuntu-advantage/marker-reboot-cmds-required` with the following:
"""
Expand Down Expand Up @@ -542,19 +542,19 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
To use a different subscription first run: sudo pro detach.
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -563,7 +563,7 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And stdout matches regexp:
"""
Expand All @@ -574,8 +574,8 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO image
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I create the file `/var/lib/ubuntu-advantage/marker-reboot-cmds-required` with the following:
"""
Expand Down
48 changes: 24 additions & 24 deletions features/ubuntu_pro_fips.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
To use a different subscription first run: sudo pro detach.
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -85,11 +85,11 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And stdout matches regexp:
"""
Expand All @@ -100,8 +100,8 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I run `pro enable fips-updates --assume-yes` with sudo
Then I will see the following on stdout:
Expand Down Expand Up @@ -280,19 +280,19 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
To use a different subscription first run: sudo pro detach.
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -305,11 +305,11 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And stdout matches regexp:
"""
Expand All @@ -320,8 +320,8 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I run `pro enable fips-updates --assume-yes` with sudo
Then I will see the following on stdout:
Expand Down Expand Up @@ -553,19 +553,19 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
To use a different subscription first run: sudo pro detach.
"""
When I run `apt-cache policy` with sudo
Then apt-cache policy for the following url has permission `500`
Then apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-updates/main amd64 Packages
"""
And apt-cache policy for the following url has permission `500`
And apt-cache policy for the following url has permission `510`
"""
https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
Expand All @@ -578,11 +578,11 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
And I run `apt-cache policy <infra-pkg>` as non-root
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-security/main amd64 Packages
"""
Then stdout matches regexp:
"""
\s*500 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
\s*510 https://esm.ubuntu.com/infra/ubuntu <release>-infra-updates/main amd64 Packages
"""
And stdout matches regexp:
"""
Expand All @@ -593,8 +593,8 @@ Feature: Command behaviour when auto-attached in an ubuntu PRO fips image
Then stdout matches regexp:
"""
Version table:
\s*\*\*\* .* 500
\s*500 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
\s*\*\*\* .* 510
\s*510 https://esm.ubuntu.com/apps/ubuntu <release>-apps-security/main amd64 Packages
"""
When I run `pro enable fips-updates --assume-yes` with sudo
Then I will see the following on stdout:
Expand Down
3 changes: 3 additions & 0 deletions preferences.d/ubuntu-pro-esm-apps
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Package: *
Pin: release o=UbuntuESMApps
Pin-Priority: 510
3 changes: 3 additions & 0 deletions preferences.d/ubuntu-pro-esm-infra
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Package: *
Pin: release o=UbuntuESM
Pin-Priority: 510
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def _get_data_files():
"/etc/update-manager/release-upgrades.d/",
["release-upgrades.d/ubuntu-advantage-upgrades.cfg"],
),
("/etc/apt/preferences.d", glob.glob("preferences.d/*")),
(defaults.CONFIG_DEFAULTS["data_dir"], []),
("/lib/systemd/system", glob.glob("systemd/*")),
(
Expand Down
Loading
Loading