The other day I was trying to install massCode application. For installation, it provided a Snap file to download.
When I tried to install the application from Snap file
sudo snap install snap_file
It gave me the following error:
error: cannot find signatures with metadata for snap “masscode_2.6.1_amd64.snap”
That was strange. While adding external repositories in Ubuntu, you have to add the GPG key. But no such things were provided by the developer here.
The ‘fix’ is easy and simple. Let me explain it to you.
Handling “cannot find signatures with metadata for snap” error
There are no signatures involved here.
What happens is that you have downloaded a Snap installer file from a third party. The snap mechanism in Ubuntu expects you to get the snap packages from the official snap store.
Since it doesn’t come from the snap store, you see the ‘cannot find signatures with metadata for snap’ error message. The error message is not descriptive, like most error messages.
So, what’s the solution here?
Any snap package that is not distributed through the Snap store has to be installed with the –dangerous flag. That’s the rule.
sudo snap install --dangerous path_to_snap_file
This way, you tell the snap package manager to explicitly install the snap package.
Here, I used this flag and was able to install massCode from its snap package successfully.
How ‘dangerous’ is it to install snap packages this way? Almost the same as downloading and installing packages in deb format.
In my opinion, if you are downloading the snap package from the project developer’s website, you are already entrusting the project. In such cases, you can install it with the –dangerous flag.
Of course, you should first search if the package is available in the snap store or not:
snap find package_name
I hope this quick little tip helped you fix the Snap error. If you have questions or suggestions please let me know. If you want to learn more, see this guide on using Snap commands.
Am I doing this correctly?
$ sudo snap install linux-eos-voter-0.3.0-amd64.snap error: cannot find signatures with metadata for snap "linux-eos-voter-0.3.0-amd64.snap" $ snap --version snap 2.33.1 snapd 2.33.1 series 16 ubuntu 18.04 kernel 4.15.0-23-generic
«Ubuntu 18.04 LTS»
I made a compromise and built the snap myself then installed using:
$ sudo snap install --dangerous release/linux-eos-voter-0.3.0-amd64.snap
Apparently the snap offers some level of snadboxing .. I wonder what is involved in getting a valid signature.
Do you know if it is possible to verify the build hashes? I built the v0.3.0 but the SHA sums for the snap did not match the site (worth a try).
From the looks of it I don’t think you’re doing anything wrong. I’ll look into that error for the snap, there’s a couple other errors that have prevented me from uploading it to the snapcraft store as well.
Regarding your last question about verifying custom build hashes — I don’t think so, but I can check. I’m not sure I’ve ever had the binaries end up with the same hash, even after recompiling the same exact code.
I’ve been doing a bit of research on this — and this error message is apparently by design and will always be present if the *.snap
file is downloaded from a source like GitHub (or compiled locally). The --dangerous
flag is required to install anything you download manually, since the signatures themselves come from the snapcraft store, and the only way to actually get around that specific error is installing from the snapcraft store itself.
Today we successfully got the application publishing on the snapcraft store as well, so installation from the store itself is just sudo snap install eos-voter
, which will grab the latest release.
Great .. Does the snapcraft store build the package for you?
On Ubuntu 18.04 I get the Gtk-Message errors below but eos-voter UI still shows up. On Debian Stretch I get the following output but the UI does not show up:
$ sudo snap install eos-voter eos-voter 0.3.1 from 'jesta' installed $ eos-voter Gtk-Message: Failed to load module "canberra-gtk-module" Gtk-Message: Failed to load module "canberra-gtk-module" [20:03:55.194] [info] app: initializing [20:03:55.662] [info] app: will-finish-launching [20:03:55.663] [info] app: ready [20:03:55.663] [info] new installation detected [20:03:55.663] [info] ui: creating Failed to generate minidump.Illegal instruction $ egrep NAME /etc/os-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux"
I imagine this is a snap bug so this may get fixed for you. Don’t worry about it too much, I have a way to use eos-voter .. you might like to know about this though.
I’m still building them manually, and then publishing them via the snapcraft
command line utility.
I briefly tried setting up the automatic building through their services — but couldn’t get the yaml file configured properly for an electron app. The app itself uses the electron-builder framework and I think that’s causing some issues with how their services are designed to assemble it automatically (as opposed to straight electron).
Ahh the adventures of packaging an application for so many different platforms 😄
Well, if something like the beaker browser were standard and stable on all platforms then that might do the trick (or something along those lines).. It is worth keeping an eye on in my view..
Yeah agreed.
The integration and refinement of our snapcraft, and potentially Apple/Windows store offerings, I think are going to end up as something we slowly chip away at as we continue to improve the app.
We have 2x more major milestones we’re pushing hard on (account creation and account permissions), then after that we’ll have some less demanding features and can probably devote more time to polishing our app store offerings.
Can you please share your snap configuration file? I’ll work with it and see what I can do..
I don’t think I have a specific snap configuration file, the yarn package-linux
build does all the heavy lifting at the moment and electron-builder builds the snap with defaults at the moment.
With the new Ledger integration though, I’m having issues with the snap package not being allowed to access the HID/USB device, which is what I’m researching today and might lead to the creation of a snap config.
I’m still relatively unexperienced in this stuff — so figuring it out as I go along.
На днях пытался установить код массы заявление. Для установки он предоставил файл Snap для загрузки.
Когда я пытался установить приложение из Snap-файла
sudo snap установить snap_file
Это дало мне следующую ошибку:
ошибка: не удается найти подписи с метаданными для оснастки «masscode_2.6.1_amd64.snap»
Это было странно. Пока добавление внешних репозиториев в Ubuntu, вы должны добавить ключ GPG. Но таких вещей разработчик здесь не предусмотрел.
«Исправить» легко и просто. Позвольте мне объяснить это вам.
Обработка ошибки «не удается найти подписи с метаданными для snap»
Здесь нет никаких подписей.
Что происходит, так это то, что вы загрузили файл установщика Snap от третьего лица. Механизм моментальных снимков в Ubuntu предполагает, что вы получите пакеты моментальных снимков из официального магазина моментальных снимков.
Поскольку он не поступает из хранилища моментальных снимков, вы видите сообщение об ошибке «не удается найти подписи с метаданными для моментальных снимков». Сообщение об ошибке не является описательным, как и большинство сообщений об ошибках.
Итак, какое решение здесь?
Любой пакет Snap, который не распространяется через хранилище Snap, должен быть установлен вместе с -опасный флаг. Это правило.
sudo snap install --dangerous path_to_snap_file
Таким образом, вы указываете менеджеру пакетов Snap явно установить пакет Snap.
Здесь я использовал этот флаг и смог успешно установить massCode из его моментального пакета.
Насколько «опасно» устанавливать snap-пакеты таким образом? Почти так же, как загрузка и установка пакетов в формате deb.
На мой взгляд, если вы скачиваете snap-пакет с сайта разработчика проекта, вы уже доверяете проект. В таких случаях вы можете установить его с флагом –dangerous.
Конечно, сначала следует поискать, доступен ли пакет в snap store или нет:
быстро найти package_name
Я надеюсь, что этот небольшой совет помог вам исправить ошибку Snap. Если у вас есть вопросы или предложения, пожалуйста, дайте мне знать. Если вы хотите узнать больше, см. это руководство по использованию команд Snap.
1. Overview
A snap is a bundle of an app and its dependencies that works without modification across many different Linux distributions. Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Snapcraft is a powerful and easy to use command line tool for building snaps. It reads a simple, declarative file and runs the build for us.
In this tutorial, we’re going to explore some of snapcraft’s best features before using it to create an ideal first snap. For a more detailed look at building snaps, see Creating a snap in the official documentation.
What you’ll learn
In this tutorial, we’ll cover how to: — install the snapcraft tool — create a new project — declare snap metadata — use parts to define an app — build a snap — fix common build issues — upload a snap to the Snap Store
What you’ll need
- Ubuntu 20.04.1 LTS (Focal Fossa), or later, or a derivative
- running from a nested VM requires accelerated/nested VM functionality
- basic command line knowledge and how to edit a file
- rudimentary knowledge of snaps
For an introduction to snaps, and how to use them, take a look at Getting started.
How will you use this tutorial?
-
Only read through it
Read it and complete the exercises
What is your current level of experience?
-
Novice
Intermediate
Proficient
Originally authored by Gerry Boland.
2. Getting started
This tutorial has been written to work on Ubuntu 20.04 LTS. However, it should work without modification on later Ubuntu releases and other GNU/Linux distributions derived from an Ubuntu 18.04+ base, such as Linux Mint 19.x.
Installing dependencies
First, open up a terminal and make sure you have snap installed:
$ snap version
If it’s installed, you’ll see something similar to the following:
snap 2.49
snapd 2.49
series 16
ubuntu 20.04
kernel 5.4.0-62-generic
See Installing snapd if snap isn’t installed.
We can now install Snapcraft with a single command:
$ sudo snap install --classic snapcraft
NOTE: The --classic
switch enables the installation of a snap that uses classic confinement. We discuss snap security confinement in the following section.
We’re all set. Let’s get cracking and build our first snap!
3. Building a snap is easy
Starting the project
The first thing to do is to create a general snaps directory followed by a working directory for this specific snap project:
$ mkdir -p ~/mysnaps/hello
$ cd ~/mysnaps/hello
It is from within this hello
directory where we will invoke all subsequent commands.
NOTE: Due to a limitation in the project we’re going to build, the path of the directory you put the hello
directory in shouldn’t contain any spaces.
Get started by initialising your snap environment:
$ snapcraft init
This creates a snapcraft.yaml
in which you declare how the snap is built and which properties it exposes to the user. We will edit this later.
The directory structure now looks like this:
mysnaps/
└── hello
└── snap
└── snapcraft.yaml
Note: Any future snaps you want to create should be put within their own directory under mysnaps
.
Describing the snap
Let’s take a look at the top part of your snapcraft.yaml file. It should look somewhat as shown below:
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
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
This part of snapcraft.yaml
is mandatory and is basic metadata for the snap.
Let’s go through this line by line:
-
name: The name of the snap.
-
base: A foundation snap that provides a run-time environment with a minimal set of libraries that are common to most applications. The template defaults to using
core18
, which equates to Ubuntu 18.04 LTS. See Base snaps for further options. -
version: The current version of the snap. This is just a human readable string. All snap uploads will get an incremental snap revision, which is independent from this version. It’s separated so that you can upload multiple times the same snap for the same architecture with the same version. See it as a string that indicates to your user the current version, like “stable”, “2.0”, etc.
-
summary: A short, one-line summary or tag-line for your snap.
-
description: A longer description of the snap. It can span over multiple lines if prefixed with the ‘|’ character.
-
grade: Can be used by the publisher to indicate the quality confidence in the build. The store will prevent publishing ‘devel’ grade builds to the ‘stable’ channel.
-
confinement: A snap’s confinement level is the degree of isolation it has from your system, and there are three levels:
strict
,classic
anddevmode
. strict snaps run in complete isolation,classic
snaps have open access to system resources and devmode snaps run as strict but with open access to the system. The latter is ideal for development, but your snap will need move from devmode to be published. See Snap confinement for more details.In this tutorial, we will focus on
devmode
andstrict
confinement.
For more detailed information on this top-level metadata, see Adding global metadata.
And that’s it for the basics. It’s now time to customise the snapcraft.yaml file for our own snap. Taking the above into account, we can change the top of the file to be:
name: hello
base: core18
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
GNU hello prints a friendly greeting.
grade: devel
confinement: devmode
Note: Version information is for snap user consumption only, and has no effect on snap updates. It’s defined within quotes, ('2.10'
), because it needs to be a YAML string rather than a floating-point number. Using a string allows for non-numeric version details, such as ‘myfirstversion
’ or ‘2.3-git
’.
Adding a part
Parts are used to describe your application, where its various components can be found, its build and run-time requirements, and those of its dependencies. A snap consists of one or more parts, depending on its complexity.
Here are a few multiple-part snap examples:
- snaps with separate logical parts, such as a server snap containing a web server, a database and the application itself
- a game which ships the game engine and game data for three different games, each one being defined in its own part
- snaps with parts from different locations — parts which are built in a different way
Our hello
snap will be nice and simple. It will consist of only one part for now. In the following pages we are going to gradually extend it.
Two must-haves for every part are the ‘source’ and ‘plugin’ definition. Think of these as the “what” and the “how”, respectively. As source you can, for example, pick a source repository (like git
), a tarball, or a local directory. Snapcraft supports many plugins, allowing you to build a wide variety of project types (e.g. autotools, cmake, go, maven, nodejs, python2, python3).
To build hello
, add the following ‘parts’ stanza to your snapcraft.yaml
file (replace anything else that might be there):
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
So we have added a part called gnu-hello
(its name is arbitrary). For ‘source’, we specified a tarball located on the GNU project’s FTP server. As ‘plugin’ we’ve chosen autotools
which uses the traditional ./configure && make && make install
build steps.
See Supported plugins, or run snapcraft list-plugins
, to get more information on which build-tools and platforms Snapcraft supports.
To build our snap all you need to do is:
$ snapcraft
The first time you run snapcraft, you may be asked for permission to install Multipass. Snapcraft uses Multipass to both simplify the build process and to confine the build environment within a virtual machine. It offers the best build experience, so we highly recommend answering ‘y’. However, if you’d rather not use Multipass, you can also build natively, remotely, and with LXD. See Build options for details.
During the build, snapcraft will show plenty of output, however a successful build will end with:
[...]
Staging gnu-hello
+ snapcraftctl stage
Priming gnu-hello
+ snapcraftctl prime
Snapping |
Snapped hello_2.10_amd64.snap
Congratulations! You’ve just built your first snap, which is now ready to be installed:
$ sudo snap install --devmode hello_2.10_amd64.snap
The output should declare:
hello 2.10 installed
To get some info on the installed snap:
$ snap list hello
Sample output:
Name Version Rev Tracking Publisher Notes
hello 2.10 x1 - - devmode
Let’s try to execute it:
$ hello
On traditional Ubuntu you will get:
The program 'hello' can be found in the following packages:
* hello
* hello-traditional
Try: sudo apt install <selected package>
Or you might get a different error if you previously installed the hello
snap:
$ hello
Output:
bash: /snap/bin/hello No such file
The command doesn’t exist despite being part of our snap and installed! Indeed, snaps don’t expose anything to the user by default (command, services, etc.). We have to do this explicitly and that’s exactly what you are going to tackle next!
If it does work for you, you should verify that it’s the correct hello
command. Check the output of which hello
— it might list something like /usr/bin/hello
. What we’re after is a binary under the /snap/bin
directory.
4. Exposing an app via your snap!
Defining commands
In order for services and commands to be exposed to users, you need to specify them in snapcraft.yaml
of course! This will take care of a couple of things for you:
- it will make sure that services are automatically started/stopped
- all commands will be “namespaced”, so that you could, for example, install the same snap from different publishers and still be able to run the snaps separately
Exposing the hello
command is painless. All you need to do is add the following to your snapcraft.yaml
file:
apps:
hello:
command: bin/hello
This defines an app named hello
, which points to the executable bin/hello
in the directory structure shipped by the snap.
We generally advise to put this stanza between the metadata fields and the ‘parts’ field. Technically the order doesn’t matter, but it makes sense to place basic pieces before more complex ones.
Our snapcraft.yaml
file should now resemble this:
name: hello
base: core18
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
GNU hello prints a friendly greeting.
grade: devel
confinement: devmode
apps:
hello:
command: bin/hello
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
Iterating over your snap
Now that the command is defined, let’s rebuild the snap. You can do do this by simply running snapcraft again — only the new or changed elements will be built and merged into a new snap.
However, to show a more typical snap-building process, we’re going to use a slightly different command that will allow us to peek into the snap we’re building before the snap is created:
$ snapcraft prime --shell
This command tells snapcraft to run the build up until the “prime” step and open a shell within the snap build environment, with prime being the final stage in a four step process:
- pull: downloads or otherwise retrieves the components needed to build the part
- build: constructs the part from the previously pulled components
- copies the built components into the staging area
- copies the staged components into the priming area, to their final locations for the resulting snap.
Another useful command is snapcraft --debug
. This will open a shell in the build environment when an error occurs, letting you investigate the error before resuming the build.
From within the shell, you can see that while the binary we just added is in the stage directory, it’s not yet in prime:
$ ls stage/bin/
hello
$ ls prime/bin/
ls: cannot access 'prime/bin': No such file or directory
You can continue building your snap from within the build environment using the same snapcraft commands you use outside, with the convenience of having a prompt directly within the environment. To build the prime stage, for example, just type snapcraft prime
:
$ snapcraft prime
Skipping pull gnu-hello (already ran)
Skipping build gnu-hello (already ran)
Skipping stage gnu-hello (already ran)
Priming gnu-hello
+ snapcraftctl prime
The hello binary will now be in the prime/bin directory:
$ ls prime/bin/
hello
To resume the build and generate the snap, you can type snapcraft
within the build environment, or exit and run snapcraft
again from there. Either way, the resultant snap will be placed in the snap project directory.
We can now re-install the new snap and run hello:
$ sudo snap install --devmode hello_2.10_amd64.snap
$ hello
Hello, world!
The path for the binary should be correctly set too:
$ which hello
/snap/bin/hello
Well done! You’ve just made your first working snap!
5. A snap is made of parts
Let’s add another part to make the snap a bit more interesting. In the ‘parts’ definition, make an addition:
parts:
[...]
gnu-bash:
source: http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
plugin: autotools
You will notice that this part (named gnu-bash
) works very much like the gnu-hello
part from before: it downloads a tarball and builds it using the autotools
plugin.
As we did before, we need to define the command we want to expose. Let’s do this now. In the ‘apps’ definition, add:
apps:
[...]
bash:
command: bash
This time the command name is different from the snap name. By default, all commands are exposed to the user as <snap-name>.<command-name>
. This binary will thus be hello.bash
. That way, we will avoid a clash with /bin/bash
(system binaries trump binaries shipped by snaps) or any other snaps shipping a bash
command. However, as you may remember, the first binary is named hello
. This is due to the simplification when equals . Instead of hello.hello
, we have the command condensed to hello
.
Our snap will thus result in two binaries being shipped: hello
and hello.bash
.
Note that we set bash
as the command parameter, and not bin/bash
relative to the system snap directory ($SNAP=/snap/hello/current
) as we did for hello
. Both are equally valid because snapcraft
and snapd
create a small wrapper around your executable command which sets some environment variables. Technically, $SNAP/bin
will be prepended to your $PATH
for this snap. This avoids the need to set the path explicitly. This topic will be touched upon in upcoming sections.
Now re-do the build:
$ snapcraft
Only the gnu-bash
part will be built now (as nothing changed in the other part). This makes things quicker but since Bash is itself a significant piece of software this command will still take quite some time to complete.
Install the resulting snap again and check whether the new binary is available:
$ sudo snap install --devmode hello_2.10_amd64.snap
$ hello
Hello, world!
Now try bash:
$ hello.bash
The above should yield:
bash-4.3$ env
[ outputs a list of environment variables ]
Now exit that Bash shell:
bash-4.3$ exit
You will see that the environment variables available from your snap are a little different from your user environment. Some additional variables are added like $SNAP_
and some system environment variables have been altered to point to your snap directory, like $PATH
or $LD_LIBRARY_PATH
. Take the time to get familiar with them!
See Environment variables for further details.
Excellent work! You have it all nice and working!
6. Removing devmode
One last thing you might want to do before the snap is ready for wider consumption is to remove the devmode
status.
Important:
Users of snaps using devmode
will need to pass --devmode
during the installation, so they explicitly agree to trust you and your snap. Another benefit of removing devmode
is that you will be able to ship your snap on the ‘stable’ or ‘candidate’ channels (you can only release to the other channels, like ‘beta’ or ‘edge’ as your snap is less trusted) and users will be able to search for it using snap find
.
For this to be declared in your snap, let’s set confinement
to strict
in snapcraft.yaml
:
confinement: strict
Now let’s build the snap and install it properly! That is, we are going to call snapcraft
without --devmode
to really test it under confinement:
$ snapcraft
[...]
$ sudo snap install hello_2.10_amd64.snap
Yikes! This gives:
error: cannot find signatures with metadata for snap "hello_2.10_amd64.snap"
Indeed, we tried to install a snap that wasn’t signed by the Snap Store. Previously, we performed local installations via --devmode
which implied (in addition to being run without confinement) that an unsigned snap was OK to be installed. As this is not the case any more we need to indicate that it’s OK to install an unsigned snap. This is done via the --dangerous
option:
$ sudo snap install hello_2.10_amd64.snap --dangerous
Test again!
$ hello
Hello, world!
Creating a new shell
$ hello.bash
…and issue a command there:
bash-4.3$ ls
now gives:
ls: cannot open directory '.': Permission denied
Exit the shell for now:
bash-4.3$ exit
What’s happening here? Your snap is not broken, it’s just confined now and so it can only access its own respective directories.
Note:
For other snaps you might need to declare if commands or services need special permissions (e.g. access to the network or audio). A tutorial on “interfaces”, “slots”, and “plugs” will cover this very topic.
You are done. This snap is ready for publication. Awesome!
7. Push to the store
Applications are easily uploaded to the Snap Store. Registering an account is easy, so let’s do that first.
Registering an account
Begin by going to the Snapcraft dashboard and clicking on the “Sign in or register” button in the top-right corner:
If you do not already have an Ubuntu One (SSO) account then select “I am a new Ubuntu One user” and complete the needed data:
Once logged into Ubuntu One you will see your name in the top-right corner. Click your name to reveal a menu and then choose “Account details”. You will need to agree to the Developer Terms and Conditions before clicking the green “Sign up” button:
Your current settings will be displayed. Review them. Your “Snap store username” may be preset and non-editable. There are “Contact details” you may wish to fill out as well as a personal photo to upload.
If you made any changes, press the green “Update my account” button.
Command-line authentication
We’ll now log in with the snapcraft command using your new account. The first time you do so you will be asked to enable multi-factor authentication and agree with the developer terms & conditions:
$ snapcraft login
A sample session follows:
Enter your Ubuntu One e-mail address and password.
If you do not have an Ubuntu One account, you can create one at https://snapcraft.io/account
Email: myemail@provider.com
Password:
Second-factor auth: (press Enter if you don't use two-factor authentication):
Login successful.
You can log out any time with snapcraft logout
.
Register a snap name
Before being able to upload a snap, you will need to register (reserve) a name for it. This is done with snapcraft register <some_name>
.
Here, assuming javier is the store username established above, we’ll do:
$ snapcraft register javier-hello
A sample session follows:
We always want to ensure that users get the software they expect
for a particular name.
If needed, we will rename snaps to ensure that a particular name
reflects the software most widely expected by our community.
For example, most people would expect 'thunderbird' to be published by
Mozilla. They would also expect to be able to get other snaps of
Thunderbird as 'thunderbird-$username'.
Would you say that MOST users will expect 'javier-hello' to come from
You, and be the software you intend to publish there? [y/N]: y
Registering javier-hello.
Congratulations! You're now the publisher for 'javier-hello'.
Clearly, the Store prefers the name to be of the format <local snap name>-<store-username>
.
The snap name javier-hello
is different from hello
that we initially placed in our snapcraft.yaml
file. We will need to edit that file accordingly and rebuild the snap. This is also an opportune time to change the ‘grade’ to ‘stable’!
The file should now include the following lines:
name: javier-hello
grade: stable
Rebuild:
$ snapcraft
You should now have a snap package called javier_-hello_2.10_amd64.snap
.
Note:
Recall that you already installed a snap package called hello_2.10_amd64.snap
. Don’t forget to uninstall it with sudo snap remove hello
.
Push and release your snap
It’s time to make this snap available to the world!
Let’s release it to the ‘candidate’ channel for now:
$ snapcraft upload javier-hello_2.10_amd64.snap --release=candidate
Output:
Pushing javier-hello_2.10_amd64.snap
After pushing, an attempt will be made to release to 'candidate'
Preparing to push '/home/ubuntu/mysnaps/hello/javier-hello_2.10_amd64.snap' to the store.
Pushing javier-hello_2.10_amd64.snap [=====================================================] 100%
Processing...|
Ready to release!
Revision 1 of 'javier-hello' created.
Track Arch Channel Version Revision
latest amd64 stable - -
candidate 2.10 1
beta ^ ^
edge ^ ^
The 'candidate' channel is now open.
You should receive an email informing you that your snap is pending review (automatic checking). If you are not using any reserved interfaces and security checks are passing, users will be able to install it like so:
$ sudo snap install javier-hello --channel=candidate
As we uploaded an amd64 binary, only people on 64-bit machines will get access to this snap. You can either focus on one architecture to support, manually build a binary for each architecture you wish to support, or use remote build or build.snapcraft.io to push your snapcraft.yaml
, and get resulting snaps built on all architectures for you!
See Build options for more details.
From here, if you are happy with the testing of your snap, you can use the snapcraft release
command to have fine-grained control over what you are releasing and where:
snapcraft release <snap-name> <revision> <channel>
Therefore, to release javier-hello
to the ‘stable’ channel, and make it immediately visible in the Store:
$ snapcraft release javier-hello 1 stable
Remember that snaps with confinement: devmode
can’t be released to the ‘stable’ or ‘candidate’ channels.
The web interface will give you information about the publication status. Take a look to see all the available options!
8. That’s all folks!
Easy, wasn’t it?
Congratulations! You made it!
By now you will have built your first snap, fixed build issues, exposed user commands, learned about uploading snaps to the Snap Store, and found out about a lot of other useful details (plugins, snapcraft help, channels, etc.).
For reference, the final state of your snapcraft.yaml file should be as follows:
name: hello
base: core18
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
GNU hello prints a friendly greeting.
grade: stable
confinement: strict
apps:
hello:
command: bin/hello
bash:
command: bash
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
gnu-bash:
source: http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
plugin: autotools
Next steps
- Take a look at tutorial Build a nodejs service snap. It is the logical follow-up to this tutorial. It includes debugging techniques, more information on confinement, and how to package a snap as a service.
- Learn some advanced snap coding techniques by looking at some of the other snap tutorials.
- Join the Snapcraft community on the Snapcraft forum.
Further readings
- See the Snapcraft documentation for the definitive snap and snapcraft documentation.
- The Snapcraft command reference covers all command syntax and options, including those for the daemon.
Was this tutorial useful?
Thank you for your feedback.
Как правильно задавать вопросы
Правильно сформулированный вопрос и его грамотное оформление способствует высокой вероятности получения достаточно содержательного и по существу ответа. Общая рекомендация по составлению тем: 1. Для начала воспользуйтесь поиском форума. 2. Укажите версию ОС вместе с разрядностью. Пример: LM 19.3 x64, LM Sarah x32 3. DE. Если вопрос касается двух, то через запятую. (xfce, KDE, cinnamon, mate) 4. Какое железо. (достаточно вывод inxi -Fxz
в спойлере (как пользоваться спойлером смотрим здесь)) или же дать ссылку на hw-probe 5. Суть. Желательно с выводом консоли, логами. 6. Скрин. Просьба указывать 2, 3 и 4 независимо от того, имеет ли это отношение к вопросу или нет. Так же не забываем об общих правилах Как пример вот
-
CaMINTcadze
- Сообщения: 83
- Зарегистрирован: 25 ноя 2017, 18:04
- Благодарил (а): 4 раза
- Контактная информация:
Как установить пакет из .snap?
29 сен 2018, 22:07
Скачал RamBox с официального сайта, а он с расширением .snap
Полез гуглить, мне говорят ставь «snapd» и через «snap find» ищи нужны пакет. Запускаю — не находит.
Его куда-то конкретно положить нужно, или он вообще ищет не по локальному диску, а где-то в своем репозитории?
Помогите поставить. Затык.
Linux Mint 21 (Cinnamon 5.4.11)
-
Dja
- Сообщения: 6633
- Зарегистрирован: 27 авг 2016, 20:03
- Решено: 28
- Откуда: Voskresensk
- Благодарил (а): 1188 раз
- Поблагодарили: 698 раз
- Контактная информация:
Как установить пакет из .snap?
#2
29 сен 2018, 22:08
Код: Выделить всё
dja-laptop ~ $ apt search snapd
p snapd - Daemon and tooling that enable snap packag
Или затык после этого?
-
rogoznik
- Сообщения: 9443
- Зарегистрирован: 27 июн 2017, 13:36
- Решено: 119
- Откуда: Нижний Тагил
- Благодарил (а): 715 раз
- Поблагодарили: 1815 раз
- Контактная информация:
Как установить пакет из .snap?
#3
29 сен 2018, 22:15
Dja, snapd он поставил, он не может установить packagename.snap
CaMINTcadze, попробуй двойным кликом по пакету, или sudo snap install packagename.snap
или sudo snap install ./packagename.snap
-
Dja
- Сообщения: 6633
- Зарегистрирован: 27 авг 2016, 20:03
- Решено: 28
- Откуда: Voskresensk
- Благодарил (а): 1188 раз
- Поблагодарили: 698 раз
- Контактная информация:
Как установить пакет из .snap?
#4
29 сен 2018, 22:28
darkfenix, ну начнем с того, что при наличии snap никто не мешает глянуть
или
Там и расписано как использовать.
И потом возможно понадобится и
p snapd-login-service - Daemon to allow non-root access to snapd
-
CaMINTcadze
- Сообщения: 83
- Зарегистрирован: 25 ноя 2017, 18:04
- Благодарил (а): 4 раза
- Контактная информация:
Как установить пакет из .snap?
#5
29 сен 2018, 22:34
darkfenix писал(а): ↑
29 сен 2018, 22:15
Dja, snapd он поставил, он не может установить packagename.snap
CaMINTcadze, попробуй двойным кликом по пакету, илиsudo snap install packagename.snap
илиsudo snap install ./packagename.snap
Спасибо.
Но не поставил из за ошибки
«error:cannot find signatures with metadata for snap»
Типа, это не снап файл???
ОМГ. Линукс — ни дня без бубна
Linux Mint 21 (Cinnamon 5.4.11)
-
di_mok
- Сообщения: 5439
- Зарегистрирован: 27 авг 2016, 19:06
- Решено: 32
- Откуда: Арзамас
- Благодарил (а): 1569 раз
- Поблагодарили: 1262 раза
- Контактная информация:
Как установить пакет из .snap?
#6
29 сен 2018, 23:29
Настоящая водка — это не пьянство, а ключ к своей совести, с нее-то и начинается настоящая мудрость. (c)
-
Dja
- Сообщения: 6633
- Зарегистрирован: 27 авг 2016, 20:03
- Решено: 28
- Откуда: Voskresensk
- Благодарил (а): 1188 раз
- Поблагодарили: 698 раз
- Контактная информация:
Как установить пакет из .snap?
#7
29 сен 2018, 23:37
di_mok, ну видимо на официальном сайте его нет, а гуглить ему лень
-
Vasiliy Terkin
- Сообщения: 187
- Зарегистрирован: 13 ноя 2018, 09:00
- Откуда: СССР
- Благодарил (а): 23 раза
- Поблагодарили: 5 раз
- Контактная информация:
Как установить пакет из .snap?
#8
10 дек 2018, 19:35
А чтоб в менеджере приложений оный появился что нужно?
-
KOT040188
- Сообщения: 827
- Зарегистрирован: 11 май 2017, 22:01
- Решено: 5
- Откуда: РБ
- Благодарил (а): 11 раз
- Поблагодарили: 34 раза
- Контактная информация:
Как установить пакет из .snap?
#9
10 дек 2018, 23:47
Vasiliy Terkin писал(а): ↑
10 дек 2018, 19:35
А чтоб в менеджере приложений оный появился что нужно?
Ничего. Он там не появится. Скачай и двойным кликом установи.
А у snap своё хранилище пакетов, в нём он и ищет.
! | Сообщение из: darkfenix |
Не нужно в темах писать как в чате. Свои сообщения можно редактировать и дополнять. |
Вы думаете у котов лёгкая жизнь? А вы попробуйте целый день лизать меховую шапку!
Как бы хотелось однажды проснуться, а тебе 8 лет и вся эта херня просто приснилась…
Чудесный сон приснился мне когда-то… четыре грузчика несли мою зарплату.
-
Vasiliy Terkin
- Сообщения: 187
- Зарегистрирован: 13 ноя 2018, 09:00
- Откуда: СССР
- Благодарил (а): 23 раза
- Поблагодарили: 5 раз
- Контактная информация:
Как установить пакет из .snap?
#10
11 дек 2018, 08:59
KOT040188 писал(а): ↑
10 дек 2018, 23:47
Vasiliy Terkin писал(а): ↑
10 дек 2018, 19:35
А чтоб в менеджере приложений оный появился что нужно?Ничего. Он там не появится. Скачай и двойным кликом установи.
А у snap своё хранилище пакетов, в нём он и ищет.
snapd Это не работает?