-
Notifications
You must be signed in to change notification settings - Fork 75
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
Binary package rename (SC-1623) #2887
Conversation
8ee5d9d
to
97339fb
Compare
Jira: SC-1623 GitHub Issues: No GitHub issues are fixed by this PR. (No commits have Fixes: #### references) Launchpad Bugs: No Launchpad bugs are fixed by this PR. (No commits have LP: #### references) Documentation: The changes in this PR do not require documentation changes. 👍 this comment to confirm that this is correct. |
🌎 This PR changes translatable messages. 🌏 Please select which scenarios apply. For further explanation, please read our policy on message changes.
|
Only the package name inside a message is being updated. Any translated messages that include it will be updated in this PR. |
9539e30
to
0f5d0a8
Compare
debian/control
Outdated
@@ -32,6 +32,15 @@ Vcs-Browser: https://github.com/canonical/ubuntu-pro-client | |||
Rules-Requires-Root: no | |||
|
|||
Package: ubuntu-advantage-tools | |||
Depends: ubuntu-pro-client, ${misc:Depends} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need ${misc:Depends}
here (but it's also not harmful in any way).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it but then lintian gives debhelper-but-no-misc-depends
as a warning so I'll add it back
debian/control
Outdated
|
||
Package: ubuntu-pro-client-l10n | ||
Architecture: any | ||
Depends: ${misc:Depends}, ubuntu-advantage-tools (>=30~) | ||
Depends: ${misc:Depends}, ubuntu-pro-client (>=31~) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to automate these versioned dependencies by using ${binary:Version}
, see the deb-substvars(5) manpage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @paride mentioned, we still need to explore ${binary:Version}
, but besides that point, I can confirm that this setup works and we don't detach when upgrading to the new binary package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, works on the local tests I did.
However, as I would not have the expertise for a final approval, I am binding this to Paride+SRU aproval of course :D
b7af0f7
to
e0e1fff
Compare
ec64a2c
to
23e58f7
Compare
@paride @basak We are officially using this method for the binary package rename. Please review it here in this PR. When we are happy with it, I'll merge and add it on top of the release PR (#2913). Also, please note that there is a product desire to totally remove the |
1817847
to
2733f3e
Compare
2733f3e
to
289252e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On d/control:
The identical descriptions for the transitional packages make lintian slightly unhappy:
I: ubuntu-advantage-tools source: duplicate-long-description ubuntu-advantage-pro ubuntu-advantage-tools [debian/control]
I: ubuntu-advantage-tools source: duplicate-short-description ubuntu-advantage-pro ubuntu-advantage-tools [debian/control]
Consider overriding that lintian tag, or using slightly different descriptions (e.g. naming the package: transitional dummy package for <package>
).
On lintian
This one way I run lintian. From the unpackage source tree (the proposed branch in this case), I build the package creating a .changes file that contains both the binary packages and source package, e.g.
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -sa -us -uc
That nocheck
is to skip tests, useful to make iterations quicker. Then I run lintian like this:
lintian -EvIL +pedantic
to get all possible warnings. It will automatically find the relevant ../*.changes
file and check it both the binary packages and source package it refers.
Let's make sure that this branch does not introduce new warnings; or if it does and we are OK with those, let's override them.
debian/control
Outdated
Architecture: all | ||
Priority: optional | ||
Section: oldlibs | ||
Description: transitional package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the best practice is to use the "transitional dummy package" string, see https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.en.html#best-practices-for-debian-control.
debian/control
Outdated
@@ -35,6 +35,15 @@ Vcs-Browser: https://github.com/canonical/ubuntu-pro-client | |||
Rules-Requires-Root: no | |||
|
|||
Package: ubuntu-advantage-tools | |||
Depends: ubuntu-pro-client (= ${binary:Version}), ${misc:Depends} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Depends together with Architecture: all
(which is correct for a transitional package) causes the following lintian error:
E: ubuntu-advantage-tools source: not-binnmuable-all-depends-any ubuntu-advantage-tools -> ubuntu-pro-client
(Run lintian-explain-tags not-binnmuable-all-depends-any
for more info on it.) Now, this is not an issue on Ubuntu, because in Ubuntu we don't name binNMUs, however I think we should still avoid in in any case.
The easiest way in my opinion is to drop the versioned dependency altogether, we don't need to worry about an ubuntu-pro-client package being "old" because we're just introducing it. It will be the "real" package to have versioned dependencies as needed.
debian/control
Outdated
Breaks: ubuntu-advantage-tools (<<31~) | ||
Replaces: ubuntu-advantage-tools (<<31~) | ||
# IMPORTANT: ubuntu-pro-client does not "Provide" ubuntu-advantage-tools | ||
# TODO fill this in with rationale after testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine not to have a Provides for the replaced package if not needed, but if you have an explanation on why we don't want it (so we avoid adding it in the future), +1 for adding a comment on it under the ubuntu-pro-client binary package stanza.
@orndorffgrant added a few review comments, but it should be all small stuff, the general approach looks good. |
3e4272d
to
a82c752
Compare
Thank you @paride! I believe I have addressed all of your comments in the latest commits |
a82c752
to
1bc8515
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all the review comments, this LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, this is very complex and so I fear that it will go wrong for some edge case. We will need to rely on good testing, and I understand that's already been discussed and there's a good plan for this. I have not been able to spot any significant issues. A couple of very minor comments are inline.
debian/rules
Outdated
@@ -39,50 +58,54 @@ 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) $(SELF_DEPS) >> debian/ubuntu-pro-client.substvars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've got >
in $(SELF_DEPS)
so does the echo need to be quoted? Presumably you've tested it and it works as-is so this is just a style thing, but it is making me twitchy :-)
Eg. I think this should work?
echo "extra:Depends=$(APT_PKG_DEPS) $(DISTRO_INFO_DEPS) $(SELF_DEPS)" >> debian/ubuntu-pro-client.substvars
Ah - I think this line might have been removed in a future commit anyway? But still I think we're still writing >
to substvars so quoting is a good idea unless I've missed something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep the end result of this PR is currently no change to that part of the line, but it should have quotes. I'll go ahead and add them in a new commit on top.
debian/control
Outdated
# On those releases, ubuntu-minimal (and ubuntu-cloud-minimal) Depends on | ||
# ubuntu-advantage-tools, which prevents it from being removed without also | ||
# removing ubuntu-minimal or ubuntu-cloud-minimal. We consider that to be a | ||
# sufficient # warning to users that removing ubuntu-advantage-tools is not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Very very minor) wrap error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! I'll fix it
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 old versions of ubuntu-advantage-tools will break ESM upon removal, and ubuntu-pro-client "Breaks" ubuntu-advantage-tools <<31~, we need to force existing instances to upgrade to ubuntu-advantage-tools 31 (the transitional package) in order to install the new ubuntu-pro-client package. Enforcing that is accomplished via a Depends: ubuntu-advantage-tools on existing Ubuntu releases. Future Ubuntu releases (Noble onward) will not have this Depends. 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}.
By removing "Provides: ubuntu-advantage-tools", we lower the chances of ubuntu-advantage-tools <31 being removed during an install of ubuntu-pro-client, becuase ubuntu-minimal (and ubuntu-cloud-minimal) Depend on ubuntu-advantage-tools. This removes the need for ubuntu-pro-client Depends: ubuntu-advantage-tools.
Add integration test that install the ubuntu-advantage-tools transition package and checks that it also install the new ubuntu-pro-client package. We are also performing the same check for the ubuntu-advantage-pro package
0286348
to
afc801d
Compare
afc801d
to
5fc24b0
Compare
Why is this needed?
This PR renames the binary packages created from ubuntu-advantage-tools as agreed. The new package names are "ubuntu-pro-client" and "ubuntu-pro-image-auto-attach".
This PR is packaging heavy and deserves extra scrutiny there.
This PR also adjusts our tests to use the new packages.
A subsequent PR will also include a manual test script for testing the transition
Test Steps
Test adding this ppa and upgrading:
ppa:orndorffgrant/proclient-rename-test
A test that can only be done with debs and not with a proper apt source of the full ubuntu-advantage-tools set of binaries:
apt install ubuntu-pro-client.deb
That should fail saying that ubuntu-advantage-tools >=31 is also required
Checklist
Does this PR require extra reviews?