Snapd on openSUSE Thumbleweed


#1

A response to call_for_testing_snapd_2325_in_systemsnappy

snap      2.32.5-1.1
snapd     2.32.5-1.1
series    16
opensuse  20180410
kernel    4.16.0-1-default

Here my test results

  1. When installing this snap with --classic --dangerous flags and run it, I get (the snap works otherwise):

    fish: Could not set up terminal.
    fish: TERM environment variable set to ‘xterm-256color’.
    fish: Check that this terminal type is supported on this system.
    fish: Using fallback terminal type ‘ansi’.

Info: The fish-snap gets started from /usr/bin/fish.

  1. When updating snapd the package always reports a conflict error and I have manually to confirm that I want the snapd package to replace the previous version by typing “yes”. No other package on my system prints such an error message. Beside from the first point, snapd works.

#2

About 1, since the snap uses classic confinement (that is, no confinement, no isolation) there’s probably something that it assumes about the host that doesn’t work for openSUSE. That’s a downside of classic confinement, that apps behave differently on different systems. You can report this issue to the maker of that specific snap and see if it can be resolved.

About 2, can you please tell me how such a warning looks like? I haven’t seen it before.
Did you download the .rpm manually or did you add the repository with zypper?


#3
  1. Since I’m the snap author :slight_smile: I have no clue how to resolve the problem. I did test it on Ubuntu (16.04 & 17.10), everything works fine there.

  2. Here the update dialog after forcing snapd to be reinstalled:

    [sudo] password for root:
    Loading repository data…
    Reading installed packages…
    Forcing installation of ‘snapd-2.32.5-1.1.x86_64’ from repository ‘snappy’.
    Resolving package dependencies…

    The following package is going to be reinstalled:
    snapd

    1 package to reinstall.
    Overall download size: 8.9 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
    Continue? [y/n/…? shows all options] (y):
    Retrieving package snapd-2.32.5-1.1.x86_64 (1/1), 8.9 MiB ( 46.0 MiB unpacked)
    Retrieving: snapd-2.32.5-1.1.x86_64.rpm …[done (3.6 MiB/s)]
    Checking for file conflicts: …[error]
    Detected 3 file conflicts:

    File /usr/lib/snapd/snap-confine
    from install of
    snapd-2.32.5-1.1.x86_64 (snappy)
    conflicts with file from package
    snap-confine-1.0.38-1.1.x86_64 (@System)

    File /usr/lib/udev/rules.d/80-snappy-assign.rules
    from install of
    snapd-2.32.5-1.1.x86_64 (snappy)
    conflicts with file from package
    snap-confine-1.0.38-1.1.x86_64 (@System)

    File /usr/lib/udev/snappy-app-dev
    from install of
    snapd-2.32.5-1.1.x86_64 (snappy)
    conflicts with file from package
    snap-confine-1.0.38-1.1.x86_64 (@System)

    File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
    Continue? [yes/no] (no):


#4

Ah, I see. The snap-confine package has been merged into snapd now so you should be able to simply remove it.

As for the first issue. I suspect your snap is loading termcap database and that the location is different on different systems.


#5

Yep, after removing snap-confine the error is gone. Maybe auto-remove snap-confine automatically with an update, since I guess I’m not the only long-term-snapd-package-user on Tumbleweed.


#6

Thank you for the feedback. I will look into making snap-confine upgrades painless.


#8

Found one more issue.

When using fish shell the snap binaries are not in $PATH. Things work fine when using bash.


#9

Maybe fish is not picking up /etc/profile.d/snapd.sh or you overwrite the path somewhere in your local config?


#10

I think fish needs a dedicated configuration file. Last time I looked at that (>> year ago) it seemed to be the case.


#11

You are right, fish is not reading /etc/profile.d. I guess there should be a file in /usr/share/fish/vendor_conf.d with the content: set -gx PATH /snap/bin $PATH