Public bug reported:

This looks similar to bug #1589613, but I’m not sure whether I should just 
re-open it, so here’s a new one.
Snapcraft allows building snaps with invalid names, which are then installed 
but cannot be run because snap-confine complains of an invalid security tag:

$ snapcraft 
"grade" property not specified: defaulting to "stable"
Preparing to pull 1foo 
Pulling 1foo 
Preparing to build 1foo 
Building 1foo 
Staging 1foo 
Priming 1foo 
Snapping '1foo' |                                                               
                         
Snapped 1foo_1.0_amd64.snap
$ sudo snap install --dangerous 1foo_1.0_amd64.snap
1foo 1.0 installed
$ 1foo 
security tag snap.1foo.1foo not allowed

This happens if the name of the snap starts with a number (e.g. "1foo").
The documentation for verify_security_tag(…) in snap-confine specifies
that <name> must start with lowercase letter, then may contain lowercase
alphanumerics and '-'.

Snapcraft should bail out early instead of generating a snap with an
invalid name.

** Affects: snapcraft (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  snapcraft should warn of invalid name

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1636016/+subscriptions

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

Reply via email to