Snapcraft - my first snap issues

On Solus you’ll want to use SNAPCRAFT_CONTAINER_BUILDS=1 snapcraft init.

1 Like

Hello,

I am on Solus, and even with SNAPCRAFT_CONTAINER_BUILDS=1, the init fails with the same error as @Justin.

PS: I had a hard time finding this snap : snap find snapcraft does not returns it in the results (same on the website).

Solus doesn’t currently have lxd in their repos. I asked @ikey last week about this, and I think it’s just not there due to lack of demand. Perhaps someone could follow the request a package page on the Solus website to get lxd in there?’

Bookmarked .
Have you received any reply from Solus?

you can easily do what init does manually to work around this …

SNAPCRAFT_CONTAINER_BUILDS=1 will only affect the build like cleanbuild will (not init) … when you do snapcraft init all that happens is that a ./snap directory gets created and a boilerplate snapcraft.yaml gets put in place:

ogra@anubis:~/dump$ snapcraft init
Created snap/snapcraft.yaml.
Edit the file to your liking or run `snapcraft` to get started

ogra@anubis:~/dump$ cat snap/snapcraft.yaml 
name: my-snap-name # you probably want to 'snapcraft register <name>'
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: nil
1 Like

Apologies, I didn’t realize the container commands didn’t affect anything other than build, thanks! :slight_smile:

That’s because snapcraft hasn’t been released to stable yet, any update on this @sergiusens?

@Ads20000 thanks for the answer. I just did a copy/paste of the command I found above on this post without paying really attention to the --candidate so indeed it logical to not see it in the search results.

@ogra thanks, I created the snapcraft.yml file in the existing snap directory but it doesn’t really help; actually all the snapcraft commands fails with that message. I saw a bug was created some time ago on launchpad so I guess all I can do for now is waiting or use an ubuntu virtual machine.

@Bettys as I understand, there is no intention atm to add native LXD and snapcraft packages in the Solus repository. The idea would be either to use: the snapcraft and the LXD snaps or the snapcraft snap only with the SNAPCRAFT_CONTAINER_BUILDS=1 environment variable. The problem is that currently none of these 2 snaps work on Solus.

Thanks for the help & feedback anyway ! :grinning:

1 Like