To summarize, as expected, all non-precise releases behave the same:

a) enable-esm fails with a valid token because ESM is not available for
non-precise ubuntu releases. That causes apt-get update to fail with a
404. The situation is resolved by running the disable-esm command.

b) MOTD gets no ubuntu-advantage or esm related messages, regardless if
esm is enabled or not. This is correct, since esm is only available for
precise, and ubuntu-advantage has no other functionality.

After having done the above passes on trusty, xenial and zesty, I
decided to take another pass and verify that if ca-certificates or apt-
transport-https are missing, that ubuntu-advantage would install them.
This already happens on precise, but maybe the package names or
dependencies changed in other releases.

To properly test this I configured apt to not install recommends by
default, otherwise just by installing apt-transport-https we would
already get ca-certificates. I'm going to update the [Test Case] section
of this SRU about this extra test and its preparation:

$ cat /etc/apt/apt.conf.d/no-recommends 
APT::Install-Recommends "false";

Here are the results:

a) zesty:
ubuntu@zesty-ubuntu-advantage:~$ sudo ubuntu-advantage enable-esm <redacted>
Installing missing dependency apt-transport-https
Installing missing dependency ca-certificates
Running apt-get update...
(...)

b) xenial:
ubuntu@xenial-ubuntu-advantage:~$ sudo ubuntu-advantage enable-esm <redacted>
Installing missing dependency apt-transport-https
Installing missing dependency ca-certificates
Running apt-get update...
(...)

c) trusty:
ubuntu@trusty-ubuntu-advantage-1686183:~$ sudo ubuntu-advantage enable-esm 
<redacted>
Installing missing dependency apt-transport-https
Installing missing dependency ca-certificates
Running apt-get update...
(...)

** Description changed:

  The ubuntu-advantage-tools package is a bit odd as it was first landed
  in precise to support the ESM effort inside canonical. [0]  In order to
  bring this package up to date across other series in ubuntu, it has been
  recommended by the Ubuntu Foundations team to land into trusty next,
  then forward-port pocket-copy to all supported series until we get to
  the devel release.
  
  The version here:
  
  https://github.com/CanonicalLtd/ubuntu-advantage-script/releases/tag/v2
  
  ... has all on-disk bits correctly working, for all series, but no-ops
  on any release other than precise (ESM is only for "unsupported" LTS
  releases as it were).  This is a request to land ubuntu-advantage-tools
  into trusty, then pocket-copy it to supported series of ubuntu once that
  is finished.
  
  [Impact]
  
   * Allow ubuntu-advantage users to access the extended security
  maintenance script with a simple command line tool.  This script needs
  to hit precise machines and be easy for ubuntu-advantage customers to
  enable, thus basefiles was chosen as a home.
  
  [Test Case]
  
   * Run ubuntu-advantage, it should print out help
-  * Run sudo ubuntu-advantage enable <token> (without sudo it will warn you), 
but you need to be an ubuntu-advantage customer to get that token.  In the end, 
the script simply adds and removes an /etc/apt/sources.list.d entry.
-  * Verify that the MOTD does not contain any mention of ubuntu-advantage esm 
or precise and its end of life
-  * you can contact me (d...@canonical.com) if you would like a token for test 
purposes.
+ 
+  * Run sudo ubuntu-advantage enable <token> (without sudo it will warn
+ you), but you need to be an ubuntu-advantage customer to get that token.
+ In the end, the script simply adds and removes an
+ /etc/apt/sources.list.d entry.
+ 
+  * Verify that the MOTD does not contain any mention of ubuntu-advantage
+ esm or precise and its end of life
+ 
+  * Verify that ubuntu-advantage enable-esm <token> installs needed 
dependencies:
+   - create the following file and its contents to have apt not install 
recommended packages by default:
+ $ cat /etc/apt/apt.conf.d/no-recommends
+ APT::Install-Recommends "false";
+   - remove ca-certificates and apt-transport-https:
+ $ sudo apt remove ca-certificates apt-transport-https
+   - run sudo ubuntu-advantage enable-esm <token> and verify that the two 
removed packages are reinstalled
+ 
+  * you can contact me (d...@canonical.com) if you would like a token for
+ test purposes.
  
  [Regression Potential]
  
   * Low, this is a new script, not included in any automated startup
  paths.
  
  [Other Info]
  
   * http://blog.dustinkirkland.com/2017/03/ubuntu-1204-esm.html
  
  [0] https://insights.ubuntu.com/2017/03/14/introducing-ubuntu-12-04-esm-
  extended-security-maintenance/

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1686183

Title:
  Ship ubuntu-advantage in ubuntu-minimal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1686183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to