Merge ~jchittum/ubuntu/+source/lxd-installer:devel-channel-version-selector into ubuntu/+source/lxd-installer:ubuntu/devel

Proposed by John Chittum
Status: Merged
Merged at revision: 635941782bc5ed36c433f6ea4496d6fa97025b1c
Proposed branch: ~jchittum/ubuntu/+source/lxd-installer:devel-channel-version-selector
Merge into: ubuntu/+source/lxd-installer:ubuntu/devel
Diff against target: 47 lines (+15/-6)
2 files modified
debian/changelog (+6/-0)
lxd-installer-service (+9/-6)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Chad Smith (community) Approve
Simon Déziel (community) Approve
Review via email: mp+456019@code.launchpad.net

Commit message

fix: update channel selection to ubuntu-VERSION_ID

To post a comment you must log in.
Revision history for this message
Simon Déziel (sdeziel) :
Revision history for this message
John Chittum (jchittum) :
Revision history for this message
Simon Déziel (sdeziel) wrote :

LGTM and Tom Parrott also agreed. Thanks!

review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote (last edit ):

2 issues I think here.

1. Don't we expect noble or any non jammy/focal release to be `latest/stable` channel?

I think that warrants a default setting that clears channel_suffix to "stable"

2. No current channels exists with format `stable/ubuntu-XX.YY` We probably need those channels for lxd snap to show up before landing this right?

```
snap-id: J60k4JY0HppjwOjW8dZdYc8obXKxujRu
tracking: 5.16/stable
refresh-date: 2023-08-30
channels:
  latest/stable: 5.19-8635f82 2023-11-22 (26200) 159MB -
  latest/candidate: 5.19-b8ce621 2023-12-04 (26415) 158MB -
  latest/beta: ↑
  latest/edge: git-fdc3dc6 2023-12-05 (26461) 158MB -
  5.19/stable: 5.19-31ff7b6 2023-10-20 (26093) 159MB -
  5.19/candidate: ↑
  5.19/beta: ↑
  5.19/edge: ↑
  5.18/stable: 5.18-762f582 2023-09-26 (25748) 189MB -
  5.18/candidate: ↑
  5.18/beta: ↑
  5.18/edge: ↑
  5.17/stable: 5.17-e5ead86 2023-08-29 (25505) 184MB -
  5.17/candidate: ↑
  5.17/beta: ↑
  5.17/edge: ↑
  5.16/stable: 5.16-f2b0200 2023-07-26 (25353) 183MB -
  5.16/candidate: ↑
  5.16/beta: ↑
  5.16/edge: ↑
  5.15/stable: 5.15-3fe7435 2023-06-28 (25086) 181MB -
  5.15/candidate: ↑
  5.15/beta: ↑
  5.15/edge: ↑
  5.0/stable: 5.0.2-838e1b2 2023-01-25 (24322) 117MB -
  5.0/candidate: 5.0.2-838e1b2 2023-01-18 (24322) 117MB -
  5.0/beta: ↑
  5.0/edge: git-250277b 2023-12-05 (26449) 126MB -
  4.0/stable: 4.0.9-a29c6f1 2022-12-04 (24061) 96MB -
  4.0/candidate: 4.0.9-a29c6f1 2022-12-02 (24061) 96MB -
  4.0/beta: ↑
  4.0/edge: git-407205d 2022-11-22 (23988) 96MB -
  3.0/stable: 3.0.4 2019-10-10 (11348) 55MB -
  3.0/candidate: 3.0.4 2019-10-10 (11348) 55MB -
  3.0/beta: ↑
  3.0/edge: git-81b81b9 2019-10-10 (11362) 55MB -
installed: 5.16-f2b0200 (25353) 183MB -
```

Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
John Chittum (jchittum) :
Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
Chad Smith (chad.smith) wrote :

Thanks John. Acknowledged here, and approved. I didn't grok the stable channels/branches aliases as I made those comments. I confirm this works as designed and pulls latest/stable/ubuntu-24.04 even on devel releases like noble,

review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote :

And confired jammy/focal success installing from the following respective channels.
--channel=5.0/stable/ubuntu-22.04
--channel=5.0/stable/ubuntu-20.04

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is missing a debian/changelog entry, which should also refer to LP: #2044185

review: Needs Fixing
Revision history for this message
Andreas Hasenack (ahasenack) :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, +1

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Sponsored:

Uploading lxd-installer_3.dsc
Uploading lxd-installer_3.tar.xz
Uploading lxd-installer_3_source.buildinfo
Uploading lxd-installer_3_source.changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 97e238f..6d504f0 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+lxd-installer (3) noble; urgency=medium
7+
8+ * update channel selection to ubuntu-VERSION_ID (LP: #2044185)
9+
10+ -- jchittum <john.chittum@canonical.com> Wed, 13 Dec 2023 14:32:38 -0600
11+
12 lxd-installer (2) noble; urgency=medium
13
14 * Pick the proper snap channel (LP: #2043843)
15diff --git a/lxd-installer-service b/lxd-installer-service
16index 7d814ca..536f316 100644
17--- a/lxd-installer-service
18+++ b/lxd-installer-service
19@@ -1,19 +1,22 @@
20 #!/bin/sh
21 lxd_channel() {
22- channel="5.0/stable"
23+ channel_version="latest"
24
25+ # lxd follows a pattern of $VERSION/stable/ubuntu-$VERSION
26+ # default in development is "latest"
27+ # with major version assigned and opened prior to Ubuntu release
28 # shellcheck disable=SC1091
29 [ -r /etc/os-release ] && . /etc/os-release
30+ channel_suffix="stable/ubuntu-${VERSION_ID}"
31 case "${UBUNTU_CODENAME:-""}" in
32- "noble")
33- channel="6.0/stable";;
34+ "jammy")
35+ channel_version="5.0";;
36 "focal")
37- channel="4.0/stable";;
38+ channel_version="4.0";;
39 *)
40 ;;
41 esac
42-
43- echo "${channel}"
44+ echo "${channel_version}/${channel_suffix}"
45 }
46
47 snap install lxd --channel="$(lxd_channel)" 1>&2

Subscribers

People subscribed via source and target branches