Step copying .snap during 'snapcraft run' fails

Bug #1519251 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Invalid
Undecided
Unassigned

Bug Description

Unrelated to bug 1499242 I'm seeing the following behaviour with current trunk (7093ff8659c29c49edb039e091f24a88bc09d6d3):

localhost login: Warning: Permanently added '[localhost]:8022' (ECDSA) to the list of known hosts.
Running: scp -i /home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa -oStrictHostKeyChecking=no -oUserKnownHostsFile=/tmp/tmpgdy1e4kp -oKbdInteractiveAuthentication=no -P 8022 /home/daniel/dev/apps/bwm-ng.snap/bwm-ng_0.6-3.2_amd64.snap 'ubuntu@localhost:~/'
bwm-ng_0.6-3.2_amd64.snap 100% 76KB 75.7KB/s 00:00
Running: ssh -i /home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa -oStrictHostKeyChecking=no -oUserKnownHostsFile=/tmp/tmpgdy1e4kp -oKbdInteractiveAuthentication=no ubuntu@localhost -p 8022 'sudo snappy install *.snap'
Installing bwm-ng_0.6-3.2_amd64.snap
2015/11/24 08:43:58.807859 verify.go:85: Signature check failed, but installing anyway as requested
2015/11/24 08:43:59.067839 security.go:205: [sc-filtergen --include-policy-dir=/var/lib/snappy/seccomp --policy-vendor=ubuntu-core --policy-version=15.04 --template=network-status --policy-groups=networking] failed
bwm-ng_0.6-3.2_amd64.snap failed to install: exit status 1
Traceback (most recent call last):
  File "../../snappy/snapcraft/bin/snapcraft", line 33, in <module>
    snapcraft.main.main()
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/main.py", line 149, in main
    args.func(args)
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/cmds.py", line 252, in run
    ['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap'])
  File "/home/daniel/dev/snappy/snapcraft/snapcraft/cmds.py", line 388, in _check_call
    return subprocess.check_call(args, **kwargs)
  File "/usr/lib/python3.5/subprocess.py", line 584, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ssh', '-i', '/home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/tmp/tmpgdy1e4kp', '-oKbdInteractiveAuthentication=no', 'ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap']' returned non-zero exit status 1
daniel@daydream:~/dev/apps/bwm-ng.snap$

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1519251] [NEW] Step copying .snap during 'snapcraft run' fails
Download full text (3.4 KiB)

You can't use `snappy build` from trunk or xenial and snapcraft. Much less
install on rolling given the drastic changes going on.

On Tue, Nov 24, 2015 at 5:45 AM, Daniel Holbach <email address hidden>
wrote:

> Public bug reported:
>
> Unrelated to bug 1499242 I'm seeing the following behaviour with current
> trunk (7093ff8659c29c49edb039e091f24a88bc09d6d3):
>
> localhost login: Warning: Permanently added '[localhost]:8022' (ECDSA) to
> the list of known hosts.
> Running: scp -i /home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa
> -oStrictHostKeyChecking=no -oUserKnownHostsFile=/tmp/tmpgdy1e4kp
> -oKbdInteractiveAuthentication=no -P 8022
> /home/daniel/dev/apps/bwm-ng.snap/bwm-ng_0.6-3.2_amd64.snap
> 'ubuntu@localhost:~/'
> bwm-ng_0.6-3.2_amd64.snap
> 100% 76KB 75.7KB/s 00:00
> Running: ssh -i /home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa
> -oStrictHostKeyChecking=no -oUserKnownHostsFile=/tmp/tmpgdy1e4kp
> -oKbdInteractiveAuthentication=no ubuntu@localhost -p 8022 'sudo snappy
> install *.snap'
> Installing bwm-ng_0.6-3.2_amd64.snap
> 2015/11/24 08:43:58.807859 verify.go:85: Signature check failed, but
> installing anyway as requested
> 2015/11/24 08:43:59.067839 security.go:205: [sc-filtergen
> --include-policy-dir=/var/lib/snappy/seccomp --policy-vendor=ubuntu-core
> --policy-version=15.04 --template=network-status
> --policy-groups=networking] failed
> bwm-ng_0.6-3.2_amd64.snap failed to install: exit status 1
> Traceback (most recent call last):
> File "../../snappy/snapcraft/bin/snapcraft", line 33, in <module>
> snapcraft.main.main()
> File "/home/daniel/dev/snappy/snapcraft/snapcraft/main.py", line 149, in
> main
> args.func(args)
> File "/home/daniel/dev/snappy/snapcraft/snapcraft/cmds.py", line 252, in
> run
> ['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap'])
> File "/home/daniel/dev/snappy/snapcraft/snapcraft/cmds.py", line 388, in
> _check_call
> return subprocess.check_call(args, **kwargs)
> File "/usr/lib/python3.5/subprocess.py", line 584, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['ssh', '-i',
> '/home/daniel/.ssh/ubuntudevice_0149BDCB0C009017_id_rsa',
> '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/tmp/tmpgdy1e4kp',
> '-oKbdInteractiveAuthentication=no', 'ubuntu@localhost', '-p', '8022',
> 'sudo snappy install *.snap']' returned non-zero exit status 1
> daniel@daydream:~/dev/apps/bwm-ng.snap$
>
> ** Affects: snapcraft
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> Snapcraft.
> Matching subscriptions: snapcraft
> https://bugs.launchpad.net/bugs/1519251
>
> Title:
> Step copying .snap during 'snapcraft run' fails
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/snapcraft/+bug/1519251/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=snapcraft; status=New; importance=Undecided;
> assignee=None;
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug...

Read more...

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Daniel Holbach (dholbach) wrote :

Hum. Does this need any follow up from me now? Is this a bug in snappy?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I need the snapcraft.yaml and the version of `snappy` you are using. Also, the result of `which snappy` would be useful

Revision history for this message
Daniel Holbach (dholbach) wrote :

snapcraft 0.5 (/usr/bin/snapcraft).

name: bwm-ng
version: 0.6-3.2
vendor: Daniel Holbach <email address hidden>
summary: small and simple console-based bandwidth monitor
description:
 Bandwidth Monitor NG is a small and simple console-based live network and
 disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others
icon: ubuntu.png
binaries:
  bwm-ng:
    exec: usr/bin/bwm-ng
    security-template: network-status

parts:
  bwm-ng:
    plugin: nil
    stage-packages: [bwm-ng]

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

fwiw, the review tools fail as well

 - security:template_exists:meta/bwm-ng.apparmor
 specified unsupported template 'network-status'

The bug fix here is a clean error, not that you can install though ;-)

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

FYI, this is invalid: 'security-template: network-status'. There is no such thing as a 'network-status' template. There is a network-status cap though. The yaml should be adjusted to be:

binaries:
  bwm-ng:
    exec: usr/bin/bwm-ng
    caps: [ network-status ]

Revision history for this message
Daniel Holbach (dholbach) wrote :

Yes, this makes it work. Thanks a lot!

Changed in snapcraft:
status: Incomplete → Invalid
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.