I’d like to request the following aliases for the zerotier package:
snap alias zerotier.cli zerotier-cli
snap alias zerotier.idtool zerotier-idtool
Additionally:
snap alias zerotier.cli zerotier
Since we will be transitioning to this form in the future.
Please let me know if there is anything I need to do on my end to facilitate this. I’ll review what needs to be added to my yaml file but I wanted to get the ball rolling on this.
It probably makes more sense to rename zerotier.cli to simply zerotier (change the app name in your snapcraft.yaml from cli to zerotier) and then create an alias from the zerotier part to zerotier-cli. This avoids one unnecessary override for the alias by the store.
Every snap always has the ability to make an executable named after its own package name without store approval.
( I’m not a reviewer though but this is pointed out in the docs somewhere as a preference so I thought I’d bring it up so you can consider it sooner )
The zerotier package chiefly has one binary zerotier-one. This is our daemon.
In an ordinary installation we use two symlinks: zerotier-cli and zerotier-idtool to zerotier-one. This allows the user to interact with different “personalities” of the zerotier-one binary.
So in normal usage one can expect:
zerotier-one: to start the daemon
zerotier-cli: to get status, join networks, etc
zerotier-idtool: to generate ids
With the default snap package installation I am seeing that our commands are implemented as <namespace>.<app> (E.g. zerotier.cli). I would like to alias this to zerotier-cli. And the same for zerotier-idtool.
As far as I can tell, that is impossible without permission from the store for an override. Correct?
When I build and install this locally with --dangerous and --devmode I don’t see any aliases defined for the snap. Is there a way for me to test this locally?
Yes, I think historically the snaps could define their own aliases like you’ve done in the example above, but that’s legacy and now it’s handled by the store by appending to the assertation file they download for package verification, you could remove the aliases: from the snapcraft.yaml entirely and I’d recommend doing it. Because of this, I don’t think it’s possible to test this locally in advance, but it would act exactly like the snap alias commands you’re using, except done automatically during the installation. (Explicitly, this means it’s done automatically when downloading from the store, the aliases would never be automatic when using --dangerous)
My recommendation following on from above would be to modify
You’ll notice then it won’t have the form of zerotier.zerotier and instead will simply deduplicate into zerotier. It’s then preferable to alias zerotier --> zerotier-cli.
Everything else would be just business as usual and a matter of waiting for the review team to do the review and make the modifications on their end.
snap alias zerotier zerotier-cli
snap alias zerotier zerotier-idtool
Note: I’ll be leaving the previous <namespace>.<app> forms intact in the yaml as to not break anything for people unaware of the change but they will be removed some time in the future.