Create 'ua' symlink pointing at 'ubuntu-advantage'

Bug #1721272 reported by Andreas Hasenack
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Fix Released
Medium
Andreas Hasenack

Bug Description

[Impact]

We want to add a short alias named 'ua' to the ubuntu-advantage script.
This can be easily accomplished by creating a 'ua' symlink pointing at the 'ubuntu-advantage' script. Likewise for its manpage.

Documentation and tests were updated.

Full diff of all changes on github: https://github.com/CanonicalLtd/ubuntu-advantage-script/compare/v10...v13

v13 also enables running the tests during package build (as requested by SRU verification team (sil2100)).

[Test Case]

{ua symlink}
 * Install v13 ubuntu-advantage-tool package
 * Look if symlink "/usr/bin/ua" exist, pointing to /usr/bin/ubuntu-advantage and working.
 * Validate "man ua" which should display the manpage of its symlink TARGET "/usr/bin/ubuntu-advantage"

Basically "ubuntu-advantage" script or symlink "ua" can be use to perform the same set of tasks.

{Testsuite at build time}
 * Look the buildlog and make sure dh_auto_test succeed as follow :

Output took from PPA build test :
   debian/rules override_dh_auto_test
python3 -m unittest discover tests
Ran 55 tests in 4.995s
OK

[Regression Potential]

 * Regression is low

 * First, the fix incorporate the testsuite at build time (as requested by SRU verification team), so no effect on the actual source code and secondly, it introduce a new symlink "ua" pointing to an existing script "ubuntu-advantage"

[Other Info]

GitHub Upstream commit:
https://github.com/CanonicalLtd/ubuntu-advantage-script/commit/9963f1907a5f13c705bbeaa7e8c8dd2bfa0eee84

[Original Description]
We want to add a short alias named 'ua' to the ubuntu-advantage script.
This can be easily accomplished by creating a 'ua' symlink pointing at the 'ubuntu-advantage' script. Likewise for its manpage.

Documentation and tests were updated.

Full diff of all changes on github: https://github.com/CanonicalLtd/ubuntu-advantage-script/compare/v10...v13

v13 also enables running the tests during package build.

summary: - Update ubuntu-advantage-tools to version 11 which renames the script
+ Rename 'ubuntu-advantage' script to 'advantage'
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: Rename 'ubuntu-advantage' script to 'advantage'

v11

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

debdiff (annoying to see because of the rename)

description: updated
description: updated
summary: - Rename 'ubuntu-advantage' script to 'advantage'
+ [FFe] Rename 'ubuntu-advantage' script to 'advantage'
description: updated
description: updated
description: updated
description: updated
tags: added: patch
description: updated
description: updated
description: updated
description: updated
description: updated
Changed in ubuntu-advantage-tools (Ubuntu):
status: In Progress → New
assignee: Andreas Hasenack (ahasenack) → nobody
description: updated
summary: - [FFe] Rename 'ubuntu-advantage' script to 'advantage'
+ [FFe] Main script should be called 'advantage'
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Re: [FFe] Main script should be called 'advantage'

The product this refers to ( https://www.ubuntu.com/support/plans-and-pricing ) is called "Ubuntu Advantage", I'm not sure grabbing generic namespace for the tool makes sense in that context. "Run the ubuntu-advantage tool" maps nicely in brainspace with "we pay for Ubuntu Advantage", whereas "run the advantage tool" doesn't quite as well.

This isn't so much me bikeshedding names and paths as it is about plain English word namespace grabs (which have bitten us repeatedly in the past) where they don't seem particularly useful (and, in this case, I'd say matching the tool to the product name sort of makes some sense).

Did Mark request this in a sabdfl override capacity, or in a "pass it through the process and see how it fares" sort of way? If the latter, let's debate what's best. If the former, a comment from him to that effect will render mine moot. :P

Revision history for this message
Steve Langasek (vorlon) wrote :

I had discussed this with Andreas on IRC, and have followed up with Dustin and Mark it person. We have an agreement to name this 'ua' instead of 'advantage' - very short names also carry some risk of collision, but arguably less so than the risk from using a common English word, and 'ua' is also the name we use generally.

I believe this should be made a symlink to ubuntu-advantage, not an outright rename, and that the package name should remain unchanged.

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

Ok, so I will:
- revert this change we have here in the bug
- make /usr/bin/ua -> /usr/bin/ubuntu-advantage
- make /usr/share/man/man1/ua.1 -> /usr/share/man/man1/ubuntu-advantage.1
- change contents of ubuntu-advantage.1 to also refer to the short name "ua"
- change README.md to also refer to the script as "ua"
- let unit tests keep using the name ubuntu-advantage
- maybe change ubuntu-advantage (the script) to use $0 instead of its name in the help output

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

I also believe the window for a FFe is over and this will become a normal SRU for Artful now.

tags: added: sts
summary: - [FFe] Main script should be called 'advantage'
+ [FFe] Create 'ua' symlink pointing at 'ubuntu-advantage'
description: updated
description: updated
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: [FFe] Create 'ua' symlink pointing at 'ubuntu-advantage'

v12

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

v10-v12 debdiff

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

Let's try an FFe again, maybe there is time. If not, we will SRU after.

summary: - [FFe] Create 'ua' symlink pointing at 'ubuntu-advantage'
+ Create 'ua' symlink pointing at 'ubuntu-advantage'
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Removed attachments (debdiff and tarball) as this needs to be redone for bionic.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
description: updated
Eric Desrochers (slashd)
description: updated
tags: added: sts-sru-needed
description: updated
Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

Hi Andreas,

May I suggest you remove the portion in debian/changelog that refer to reverting "./advantage".

IMHO, it is confusing cause this is something that has been done upstream but never landed to the Ubuntu package.

bionic is at version 10, where the introduction of "./advantage" seems to happen upsream at v11[1] and reverted in v12.

Since we are now talking about moving bionic from v10 to v13, I would simply mention that you add "ua" symlink without mentioning the upstream effort that didn't land in Ubuntu package, simply to avoid confusion.

- Eric

[1] fffb231 Rename ubuntu-advantage script and manpage to just advantage. Also setup symlinks for the former names.

git describe --contains fffb231
v11~2^2~8

[2] - 9963f19 revert rename, add link as "ua"
git describe --contains 9963f19
v12~1^2~1

Eric Desrochers (slashd)
Changed in ubuntu-advantage-tools (Ubuntu):
importance: High → Medium
status: New → In Progress
assignee: nobody → Andreas Hasenack (ahasenack)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I don't think I can mess with past changelog entries. We have a ppa with daily builds for this, and there is also a sort of chicken an egg problem: this is a native package (for reasons). The upstream code has a debian/ directory in it. So everytime I *want* to make an ubuntu release, I have to add a d/changelog entry to the upstream tarball. Whether it *gets* into ubuntu or not, I don't know at that time, since I can't upload it. Turns out that first new name attempt was rejected, and we are now with this "ua" shorter one.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

So as mentioned before this has a bit of back and forth, ignoring that the effective changes are:
- not renaming, but aliasing to "ua"
- fixup and enable tests on build (was requested on a former review)
- I checked, the symlinks are good after install
- I checked the tests are running fine on build
- I verified that the debdiff changes 100% match the git changes they are based on
- I don't mind that the changelog has v11/v12 being mostly a revert, that is the "true" changelog, so I agree to keeping it.

From our IRC discussion I know that you already know that some of this hardly backports for different constraints, so I don't need to mention that - for Bionic and that is important now that LGTM. I'd only have been concerned on the "ua" namespace, but since Steve acked that in c#3 I'm good.

Sponsored into Bionic as of now, since the last released version was 10 I built with -v10.

@Andreas - please track migration (which might take a while for the dep8 tests to run atm), to trigger the SRUs at the right time.

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

Will do

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 13

---------------
ubuntu-advantage-tools (13) bionic; urgency=medium

  * New upstream release:
    - run tests during package build

ubuntu-advantage-tools (12) artful; urgency=medium

  * New upstream release:
    - revert the latest name changes
    - instead of "advantage", add a "ua" symlink pointing at the
      ubuntu-advantage script. Likewise for its manpage. (LP: #1721272)

ubuntu-advantage-tools (11) artful; urgency=medium

  * New upstream release:
    - rename the ubuntu-advantage script to advantage, including where it's
      mentioned in the documentation. Also provide symlinks pointing at the
      previous name. (LP: #1721272)
    - slightly reword some of the FIPS messages

 -- Andreas Hasenack <email address hidden> Mon, 30 Oct 2017 16:37:30 -0200

Changed in ubuntu-advantage-tools (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.