Call for testing: snapd 2.23 on Fedora

Hey everyone,

thanks to the awesome work from @Conan_Kudo we’re close to release snapd packages based on the 2.23.6 release into the official Fedora repositories. If you want to help testing there some easy instructions for how you can do so:

  1. You need Fedora 25 or 24 installed. If you have rawhide or a snapshot build for the upcoming version 26 you can help too! If you don’t have a physical machine with Fedora on it you can install Fedora in a virtual machine. You can find more details where you can get Fedora from here.

  2. As snapd is still under testing and not yet officially released you have to install it from the updates-testing repository. You can easily do this on the command line via the following command:

    $ sudo dnf install snapd snapd-glib snapd-login-service --enablerepo=updates-testing

  3. Now you have everything setup and can use the snap command as normal. You can find some more details about what it does and which commands it provides here.

  4. If you’re done testing and you have a Fedora developer account you can vote on theBodhi update requests here (you need to select the right update request for your Fedora version). Otherwise if you find bugs you can either file them on the Fedora bugzilla or Ubuntu’s Launchpad by targetting the snapd package.

Generally most features should work on Fedora. What currently doesn’t work

  • AppArmor/Seccomp confinement: Both Seccomp and AppArmor confinement is turned off. AppArmor isn’t supported by Fedora but work torwards adding SELinux into snapd will start in the near future.
  • classic snaps: Snaps using classic confinement are not working yet.
  • Integration into gnome-software. This is something we currently work on together with the gnome-software developers.

Thansk for helping with testing! Have fun!

3 Likes

I had a run on Fedora 25 workstation and server variants. I added my feedback to bodhi here https://bodhi.fedoraproject.org/updates/FEDORA-2017-37a7331620

I think the biggest issue now is that presets somehow don’t work. The socket is not started.

@zyga-snapd I agree. I’ve found this yesterday as well and reported to @Conan_Kudo. Not sure if he has a fix for this already.

The other things you’ve found (e.g. classic confinement) should go into a follow up release with a proper fix by snapd stating if it can do classic confinement on the platform or not.

If you run systemctl status snapd.socket you will see that the vendor preset is “enabled”. Perhaps something we are doing in the %post section is wrong and things run too early? (just guessing)

Yeah that is my guess too. Planing to look into this towards lunch time unless I get a reply from @Conan_Kudo that he already solved the problem :slight_smile: Maybe a reboot helps too as a systemctl start snapd.socket makes everything work.

I tested F24 and marked it as +1

Everyone, please review snapd for Fedora and use bodhi to provide your feedback. We can get it released faster this way and we can actually be sure that what we released works correctly: https://bodhi.fedoraproject.org/updates/?packages=snapd

This should be fixed in snapd-2.23.6-4 builds for Fedora 25 and Fedora 26. I’ve also updated the snapd-glib build to v1.10 for Fedora 24, 25, and 26.

Due to modifying the updates, karma has reset to zero, so please test and give feedback!

1 Like

I tried snapd on F25 on Linode and see that it works straight. I see that snaps are installed in /var/lib/snapd/snap and the path variable in the shell is not set automatically, so I am unable to call the apps/binaries exposed in the snap. Instead, I need to refer to the absolute path-

[root@li421-251 ~]# snap --version
snap    2.23.6-4.fc25
snapd   2.23.6-4.fc25
series  16
fedora  25
kernel  4.9.7-x86_64-linode80
[root@li421-251 ~]# ll /var/lib/snapd/snap/bin/
total 0
lrwxrwxrwx 1 root root 13 Apr  7 22:51 hello-world -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Apr  7 22:51 hello-world.env -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Apr  7 22:51 hello-world.evil -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Apr  7 22:51 hello-world.sh -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Apr  7 22:54 httpstat -> /usr/bin/snap
[root@li421-251 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@li421-251 ~]# hello-world
-bash: hello-world: command not found
[root@li421-251 ~]# /var/lib/snapd/snap/bin/hello-world
Hello World!

This fixes itself once you log out and log back in, as it takes effect once your session is loaded. It’s implemented as a profile.d file.

Thanks for the update. I’ll keep an eye out the next time I try!

@Conan_Kudo Can we make the installation simpler by having the user only install snapd and have snapd-glib and snapd-login-service installed automatically as dependencies?

Well, technically you don’t need either of the latter items. snapd-glib and snapd-login-service are only required if you’re trying to use it via a frontend tool, like GNOME Software. However, enabling Snappy support for GNOME Software in Fedora is not currently possible due to the code being rotten and broken in GNOME Software upstream. @morphis is working with the upstream GNOME Software developers to fix the code so that it can be backported and enabled in Fedora. Getting snapd-glib (and its subpackages, including snapd-login-service) into the distribution is more to prepare for future enabling of this functionality.

2 Likes

Are you saying that we don’t need to use those 2 additional packages unless installing via GNOME Software? Fwiw, when I try and install snapd by itself on F24, I don’t see snapd-glib and snapd-login-service installed automatically.

[root@fedora ~]# dnf install snapd --enablerepo=updates-testing
Last metadata expiration check: 0:20:31 ago on Fri Apr  7 23:54:01 2017.
Dependencies resolved.
======================================================================================================================================================
 Package                                     Arch                  Version                                       Repository                      Size
======================================================================================================================================================
Installing:
 audit-libs-python3                          x86_64                2.7.3-1.fc24                                  updates                         97 k
 checkpolicy                                 x86_64                2.5-8.fc24                                    updates                        298 k
 kernel-debug-core                           x86_64                4.10.8-100.fc24                               updates                         22 M
 kernel-debug-modules                        x86_64                4.10.8-100.fc24                               updates                         23 M
 libcgroup                                   x86_64                0.41-8.fc24                                   fedora                          67 k
 libsemanage-python3                         x86_64                2.5-6.fc24                                    updates                        112 k
 linux-firmware                              noarch                20170313-72.git695f2d6d.fc24                  updates-testing                 38 M
 policycoreutils-python-utils                x86_64                2.5-16.fc24                                   updates                        216 k
 policycoreutils-python3                     x86_64                2.5-16.fc24                                   updates                        1.8 M
 setools-libs                                x86_64                3.3.8-10.fc24                                 fedora                         561 k
 snap-confine                                x86_64                2.23.6-3.fc24                                 updates-testing                 66 k
 snapd                                       x86_64                2.23.6-3.fc24                                 updates-testing                8.4 M
 snapd-selinux                               noarch                2.23.6-3.fc24                                 updates-testing                 30 k
 sqlite                                      x86_64                3.13.0-1.fc24                                 updates                        488 k
 squashfs-tools                              x86_64                4.3-12.fc24                                   fedora                         161 k

Transaction Summary
======================================================================================================================================================
Install  15 Packages

Total download size: 95 M
Installed size: 240 M

Notice the same behavior for removal. When I try and remove snapd I don’t see snapd-glib and snapd-login-service on F24-

[root@fedora ~]# dnf remove snapd
Dependencies resolved.
======================================================================================================================================================
 Package                                     Arch                  Version                                      Repository                       Size
======================================================================================================================================================
Removing:
 audit-libs-python3                          x86_64                2.7.3-1.fc24                                 @updates                        541 k
 checkpolicy                                 x86_64                2.5-8.fc24                                   @updates                        1.2 M
 kernel-debug-core                           x86_64                4.10.8-100.fc24                              @updates                         56 M
 kernel-debug-modules                        x86_64                4.10.8-100.fc24                              @updates                         23 M
 libcgroup                                   x86_64                0.41-8.fc24                                  @fedora                         129 k
 libsemanage-python3                         x86_64                2.5-6.fc24                                   @updates                        417 k
 linux-firmware                              noarch                20170313-72.git695f2d6d.fc24                 @updates-testing                119 M
 policycoreutils-python-utils                x86_64                2.5-16.fc24                                  @updates                        129 k
 policycoreutils-python3                     x86_64                2.5-16.fc24                                  @updates                        3.2 M
 setools-libs                                x86_64                3.3.8-10.fc24                                @fedora                         1.5 M
 snap-confine                                x86_64                2.23.6-3.fc24                                @updates-testing                167 k
 snapd                                       x86_64                2.23.6-3.fc24                                @updates-testing                 33 M
 snapd-selinux                               noarch                2.23.6-3.fc24                                @updates-testing                 36 k
 sqlite                                      x86_64                3.13.0-1.fc24                                @updates                        950 k
 squashfs-tools                              x86_64                4.3-12.fc24                                  @fedora                         380 k

Transaction Summary
======================================================================================================================================================
Remove  15 Packages

Installed size: 240 M
Is this ok [y/N]: 

GNOME Software will use those two packages, you don’t ever need to manually install them. When we get there, we’ll have special dependency magic to make it resolve automagically and give you Snappy support immediately after installing the snapd package.

We’re just not there yet. :wink:

1 Like

Noted :slight_smile: Apprecite your prompt help with this!

Thank you for testing Snappy on Fedora and giving excellent feedback! :smile:

@Conan_Kudo Just tried the path on F24 and notice it is setup appropriately-

[root@fedora ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/snapd/snap/bin:/root/bin

Thanks to @Conan_Kudo for notifying me that everything was now in place in the Fedora archive. The refreshed Install steps at https://snapcraft.io/docs/core/install-fedora have been deployed!