News for hackers. Stuff that matters.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by pwnna on Thursday February 02, 2017 @01:15PM (#13552929)
Snap looks like the way forward by bring some of the isolation from things like Android to desktop, but at the same time the way it handles app distribution makes it tempting to use instead of docker especially if your machine is a single purpose machine (runs 1 application only).

Can anyone comment on using snap vs something like flatpak and docker for deploy your own applications to servers?

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by elopio on Thursday February 02, 2017 @01:32PM (#13553102)
Here's the docker question in askubuntu.com: https://askubuntu.com/questions/808524/whats-the-main-differ...
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by Mister_Snuggles on Thursday February 02, 2017 @12:56PM (#13552728)
I wish there was a better divide between "system" and "other" software in Linux distributions.

The BSDs, for example, keep all of the system stuff in /usr, /etc, /bin, etc, and any extra stuff you install from ports or packages ends up in /usr/local.

It looks like Snaps are a way of accomplishing much the same thing (and more) in the Linux world.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by lmm on Thursday February 02, 2017 @01:07PM (#13552842)
> The BSDs, for example, keep all of the system stuff in /usr, /etc, /bin, etc, and any extra stuff you install from ports or packages ends up in /usr/local.

Which is awful, because it means stuff you install from ports ends up in the same place as hand-compiled programs and there's no way to tell them apart. A distinction between "system" and "ports" is maybe sort of useful I guess (though I'm not sure exactly what I'm supposed to be gaining from it), but the distinction between automatically-managed-at-all and not is far far more important.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by Mister_Snuggles on Thursday February 02, 2017 @05:43PM (#13555651)
The problem I have with Linux distributions in general is that applications are too infrequently updated. Of course, you can add extra repos to get these updated applications but then you end up with a horrible mix of base-system stuff plus 3rd-party stuff.

BSD sidesteps this problem, but introduces the one you mention.

It sounds like snaps will potentially solve both problems.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by evand on Thursday February 02, 2017 @01:05PM (#13552817)
Exactly. Snaps mostly avoid polluting the filesystem the way debs and other package formats do. You still have systemd jobs in /etc and seccomp rules in /var/lib/snapd, but the rest lives in /snap/$app_name/$revision with data in /var/snap/$app_name.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by smacktoward on Thursday February 02, 2017 @12:45PM (#13552589)
What's the benefit to me as a user to installing it via snap, instead of via the traditional methods of apt-get/the Ubuntu software app?
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by jamiebennett09 on Thursday February 02, 2017 @12:54PM (#13552704)
Generally the snap will be much more up to date.

Installing from the Ubuntu Archive with apt-get means you get the version that was released with that version of the OS, say Ubuntu 16.10, sometimes with minor updates. With Snaps you get the version that the software developer pushes to you which could be their latest stable software released just yesterday (there is a concept of Snap channels that open up things like beta/candidate/daily builds e.t.c. but that is another topic).

Snaps can also update themselves, allow dependency bundling, are confined in sandboxes e.t.c. but for a user, it means you get very fresh software on your device. You can read more about them at https://snapcraft.io/

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by smacktoward on Thursday February 02, 2017 @01:41PM (#13553179)
That does sound pretty compelling!

Are there risks/potential issues with having snap-based apps and apt-based apts coexist on the same installation of Ubuntu? I know there's now "Ubuntu Core" which replaces apt with snap for everything, but if you're just using plain old Ubuntu on a workstation or server, how safe is it to dip a toe in with a few snaps while leaving everything else managed with apt?

(Apologies if these are dumb questions, I just haven't been able to find much messaging on snaps that speaks to end-user concerns instead of developer ones...)

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by flexiondotorg on Thursday February 02, 2017 @02:50PM (#13553903)
No problem at all, snaps will happily co-exist alongside debs or any other package format for that matter :-)
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by jamiebennett09 on Thursday February 02, 2017 @02:56PM (#13553973)
Exactly, you can even have the same application as a snap and a deb. PATH resolution will call the first one defined in your environment but that can be obviously be changed and when you are happy with the snap-only offering you can remove the deb if necessary (or visa-versa).
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by zzalpha on Thursday February 02, 2017 @01:00PM (#13552773)
This is a solved problem with ppa's.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by flexiondotorg on Thursday February 02, 2017 @01:10PM (#13552865)
Decide for yourself, here are links to the LibreOffice snapcraft.yaml and the Debian packaging. Snaps are far, far simpler.

## Snapcraft

https://git.launchpad.net/~bjoern-michaelsen/df-libreoffice/...

## Debian

https://anonscm.debian.org/git/pkg-openoffice/libreoffice.gi...

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by snovv_crash on Thursday February 02, 2017 @01:03PM (#13552799)
Not if the ppa depends on a system library not available on your release. Then you need to go hunting for more ppas, until you eventually need to up/downgrade your entire system.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by zzalpha on Thursday February 02, 2017 @01:06PM (#13552836)
Yes, you're right, the originator of the package actually has to release PPAs that work on your release.

That's a perfectly manageable issue.

But don't claim snap's are the only solution to the problem of getting up-to-date software. That's not at all true. We've been solving this problem for far longer than Ubuntu has been around, and their approach is hardly a panacea. For example, it can and will result in additional memory and on-disk bloat as a consequence of duplicated dependencies across packages until de-duplication is implemented.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by snovv_crash on Thursday February 02, 2017 @01:29PM (#13553064)
You only get a single duplicate of the library no matter how many things depend on it. That is the whole point of snaps over just statically linking.

Well, that and the sandbox features, so that they can't interfere with the rest of the system.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by zzalpha on Thursday February 02, 2017 @02:38PM (#13553790)
You only get a single duplicate of the library no matter how many things depend on it.

Huh?

If a snap includes version 1.0.0 of libxyz, and another does the same, you have two copies. If a third snap comes along and uses version 1.0.0 libxyz, you now have three.

Snaps do not automatically de-duplicate today.

That means two copies of the library living on disk and in memory at run-time.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by jamiebennett09 on Thursday February 02, 2017 @03:00PM (#13554012)
That would be the same with any platform that does not use some kind of explicit linking/sharing of resources. Snaps have a sharing mechanism called interfaces but yes, the software author has to declare they want to use it, no magic there.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by zzalpha on Thursday February 02, 2017 @03:25PM (#13554299)
Snaps have a sharing mechanism called interfaces but yes, the software author has to declare they want to use it, no magic there.

So, they've reinvented dependencies (though, to their credit, they gave them a different name), one of the very things snaps were intended to alleviate?

Look, don't get me wrong, snaps have some interesting advantages (sandboxing being the one major selling point, IMO). But, again, they're no panacea.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by slitaz on Thursday February 02, 2017 @05:54PM (#13555745)
Snaps are apps in a container. Why bother with docker containers to run services while you can install everything together on a single computer? Each docker replicates the same rooted again and again.

Just like docker, snaps make sense even if there is some duplication of the libraries. Other benefits outweigh the extra size.

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by snovv_crash on Friday February 03, 2017 @01:46AM (#13558219)
The advantage is that there are no dependency collisions. With apt/yum I can't have multiple versions of the same library installed at the same time. Snaps fix this.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by flexiondotorg on Thursday February 02, 2017 @01:13PM (#13552900)
Snap has a feature called content sharing which enables a snap to connect to assets (which can be data, shared objects, anything) in another snap.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by zzalpha on Thursday February 02, 2017 @02:34PM (#13553758)
That's only true if they share a run-time/platform snap. AKA, they each have a dependency on a shared snap.

If only there was some existing solution for packaging and deploying software where you could declare dependencies between shared resources...

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by abrowne on Thursday February 02, 2017 @01:54PM (#13553329)
It's not solved when any PPA I add can replace any system package simply by using a higher version number.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by elopio on Thursday February 02, 2017 @01:05PM (#13552825)
PPAs were good for some things, but they require you to package the software as a deb, which is a lot more work than to make a snap. And during the installation of a deb coming from a PPA, the user is at risk because it is being installed with root permissions. snaps are much more secure, during installation they are just unpacked into their confined space.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by smacktoward on Thursday February 02, 2017 @01:27PM (#13553041)
Heck, I will be happy if snaps just eliminate having to go back and re-enable all my PPAs by hand after doing a dist-upgrade...
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by elopio on Thursday February 02, 2017 @01:34PM (#13553116)
Rejoice. The same snap will work in trusty, xenial, yakkety and zesty. You don't have to do anything, and the developer doesn't have to do anything either.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by chipaca on Thursday February 02, 2017 @03:30PM (#13554350)
Darn, saying it like that, you're going to make me blush :-D
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by platz on Thursday February 02, 2017 @02:58PM (#13553992)
"snap run libreoffice" gives me this error http://i.imgur.com/tTKkpZe.png
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by jamiebennett09 on Thursday February 02, 2017 @03:22PM (#13554267)
You should be using just 'libreoffice' on the command line or to be 100% sure, /snap/bin/libreoffice or running it from the dash (second icon per the blog post if you have both deb and snap installed). Why snap run? Also, knowing which version of snapd and which Ubuntu version would be interesting but if you feel this is a bug then it would be great to see more information at https://launchpad.net/ubuntu/+source/snapd.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by platz on Thursday February 02, 2017 @09:31PM (#13557159)
/snap/bin/ is not on my path after installation of snapd and libreoffice, so just 'libreoffice' results in 'command not found'

    [1] $ snap version

    snap    2.21+16.10
    snapd   2.21+16.10
    series  16
    ubuntu  16.10

    $ /snap/bin/libreoffice
    datahome: /home/jon/snap/libreoffice/17/.local-5.3.0.3/share

    (soffice:13608): Gtk-WARNING **: Locale not supported by C library.
	    Using the fallback 'C' locale.

    (soffice:13608): Gtk-WARNING **: Could not find the icon 'dialog-warning-symbolic-ltr'. The 'hicolor' theme
    was not found either, perhaps you need to install it.
    You can get a copy from:
	    http://icon-theme.freedesktop.org/releases

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
    Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark

    (soffice:13608): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by mhall119 on Friday February 03, 2017 @02:56PM (#13562722)
/snap/bin will likely be added to your PATH from now on, but if your current shell session was already running when you installed snapd it wouldn't be updated.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by amelius on Thursday February 02, 2017 @02:00PM (#13553396)
I'm wondering how Snap deals with shared libraries? Are they downloaded with the release and placed in a sandbox? Or are binaries "statified" somehow?
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by rlpb on Thursday February 02, 2017 @02:32PM (#13553728)
They're bundled into the snap at build time. The tooling to create snaps makes this process fairly automatic. In this respect it works like Docker. App developers shipping snaps don't have to worry about how their users are going to get dependencies, or if the dependency versions will make a difference to the behavior of the app.
Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by amelius on Thursday February 02, 2017 @03:14PM (#13554184)
So a snap runs inside some sort of chroot jail?

(By the way, shared libraries were invented to reduce memory usage. Not sure what will happen to that goal now.)

Re:How to install LibreOffice 5.3 from snap on Ubuntu 16.04 ... by mhall119 on Thursday February 02, 2017 @03:18PM (#13554223)
Kind of, they run in a restricted AppArmor profile that limits what they can see and do, but the filesystem the do see is the same as any other process.

KSM should prevent duplicate libraries from taking up extra memory on your machine.