diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-06-28 17:47:22 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-06-30 22:05:21 +0200 |
commit | b3c490c9185d5c7b4dd5001a434a0d41b14ef084 (patch) | |
tree | d8aee5dc0b9955e17c9be3a5cb02b9d839ef5708 /recipes-support/snapd/files/0002-cmd-snap-do-not-allow-classic-snaps-on-other-distrib.patch | |
parent | 2f1fb4271246cd1ad92ca2c059f09752720cb17d (diff) |
snapd: copied from meta-snappy
https://github.com/morphis/meta-snappy/commit/f6df6a63756d9976bcccb5fefdbc64e5cc794c99
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'recipes-support/snapd/files/0002-cmd-snap-do-not-allow-classic-snaps-on-other-distrib.patch')
-rw-r--r-- | recipes-support/snapd/files/0002-cmd-snap-do-not-allow-classic-snaps-on-other-distrib.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-support/snapd/files/0002-cmd-snap-do-not-allow-classic-snaps-on-other-distrib.patch b/recipes-support/snapd/files/0002-cmd-snap-do-not-allow-classic-snaps-on-other-distrib.patch new file mode 100644 index 0000000..b78eec0 --- /dev/null +++ b/recipes-support/snapd/files/0002-cmd-snap-do-not-allow-classic-snaps-on-other-distrib.patch @@ -0,0 +1,47 @@ +From 24616e1c2b8ade1700ee77dc9549ae839addebf6 Mon Sep 17 00:00:00 2001 +From: Simon Fels <simon.fels@canonical.com> +Date: Mon, 27 Mar 2017 10:17:03 +0200 +Subject: [PATCH 2/4] cmd/snap: do not allow classic snaps on other + distributions + +As of right now classic snaps are not supported on other distributions +than Ubuntu or Debian. This is because of those not allowing us to have +a global /snap directory, so its moved into /var/lib/snapd/snap instead. + +The changed /snap directory breaks classic snaps as those have static +paths hardcoded to binaries/libraries in /snap for the sake of the +linker to work. +--- + cmd/snap/cmd_snap_op.go | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/cmd/snap/cmd_snap_op.go b/cmd/snap/cmd_snap_op.go +index 50095f4..fb86b41 100644 +--- a/cmd/snap/cmd_snap_op.go ++++ b/cmd/snap/cmd_snap_op.go +@@ -36,6 +36,7 @@ import ( + "github.com/snapcore/snapd/i18n" + "github.com/snapcore/snapd/osutil" + "github.com/snapcore/snapd/progress" ++ "github.com/snapcore/snapd/release" + ) + + func lastLogStr(logs []string) string { +@@ -438,6 +439,14 @@ func (x *cmdInstall) installOne(name string, opts *client.SnapOptions) error { + var installFromFile bool + var changeID string + ++ switch release.ReleaseInfo.ID { ++ case "fedora", "centos", "rhel", "opensuse", "suse": ++ if opts.Classic { ++ fmt.Fprintf(Stderr, i18n.G("snap %q can not be installed as classic snaps are not supported on your distribution\n"), name) ++ return nil ++ } ++ } ++ + cli := Client() + if strings.Contains(name, "/") || strings.HasSuffix(name, ".snap") || strings.Contains(name, ".snap.") { + installFromFile = true +-- +2.7.4 + |