this post was submitted on 16 Sep 2024
814 points (97.4% liked)

linuxmemes

20761 readers
1612 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
814
Snap out of it (lemmy.zip)
submitted 4 days ago* (last edited 4 days ago) by [email protected] to c/[email protected]
 

How do you guys get software that is not in your distribution's repositories?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 day ago (1 children)

I understand appimages. I use them exclusively. Can someone explain what flatpak and SNAP are and how they work? I have autism so please be as clear and concise as possible?

[–] [email protected] 1 points 18 hours ago

The easiest way to think of it is flatpaks are AppImages with a repository and snaps are flatpaks but bad.

That has benefits and detriments. Appimages contain everything they need to run, flatpak's mostly do, but can also use runtimes that are shared between flatpaks.

All flatpaks are sandboxed, which tends to make them more secure. AppImages can be sandboxed, but many aren't.

Flatpaks tend to integrate with the host system better, you can (kinda) theme them, their updates are handled via the flatpak repo, and they register apps with the system.

AppImages are infinitely more portable. Everything's in one file, so you can pretty much just copy that to any system and you have the app.

[–] [email protected] 3 points 2 days ago (1 children)

Install from source if there isn't a repo for the software.

[–] [email protected] 2 points 2 days ago (1 children)
[–] [email protected] 2 points 1 day ago

Way back in the before times there was only the source.

[–] [email protected] 7 points 2 days ago

it's called snap cos thats what the community will do to your bones if you use it. apparently

[–] [email protected] 4 points 2 days ago

I have yet to find a need to go outside of the Debian repos.

[–] [email protected] -1 points 2 days ago

I pretty consistently find the snaps to be the best trade-off of being up-to-date and stable for me. Especially for CLI tools and services.

[–] [email protected] 6 points 2 days ago (1 children)

I don’t really like neither of the 3, personally. But I understand the need and the benefits

[–] [email protected] 2 points 2 days ago

I feel like that's a pretty good take. As long as you're getting the software in an elegant way that doesn't break the dev's back, we're good.

[–] [email protected] 48 points 3 days ago* (last edited 2 days ago) (3 children)

Why not just stick to what we've always been doing?

  1. wget something.tar.gz
  2. tar something.tar.gz
  3. man tar
  4. tar xzf something.tar.gz
  5. cd something
  6. ls -al
  7. ./config.sh
  8. chmod +x config.sh
  9. ./config.sh
  10. make config
  11. Try to figure out where to get some obscure dependency, with the right version number. Discover that the last depency was hosted on the dev's website that the dev self-hosted when it went belly up 5 years ago. Finally find the lib on some weird site with a TLD you could have sworn wasn't even in latin characters.
  12. make config
  13. make
  14. Go for coffee
  15. make install
  16. SU root
  17. make install
[–] [email protected] 8 points 2 days ago

I much prefer our modern package format solutions:

  1. sudo apt install something
  2. open
  3. wtf this is like 6 months old
  4. find a PPA hosted by someone claiming to have packaged the new version
  5. search how to install PPAs
  6. sudo apt <I forgot>
  7. install app finally
  8. wtf it's 2 months old and full of bugs
  9. repo tells me to report to original developer
  10. report bugs
  11. mfw original dev breaks my kneecaps for reporting a bug in out of date versions packed with weird dependency constraints they can't recreate
[–] [email protected] 2 points 2 days ago* (last edited 2 days ago) (1 children)

We should normalize programs that don't use such exotic and impossible libraries that you have to do anything besides type "make" and "make install" for it to work.

In theory it's a no brainer. In practice not so much.

[–] [email protected] 2 points 2 days ago

in the end we end up using containers afaict

[–] [email protected] 0 points 3 days ago

If not in Fedora repos or any Copr, then AppImage (manage using Gear Lever for that ease of use) then Flatpak

[–] [email protected] 11 points 3 days ago (5 children)

Linux noob here, can someone ELI5 why snaps are bad? And how does .deb works?

[–] [email protected] 4 points 2 days ago

Nothing necessarily at the tech level. They're more capable than Appimages or flatpaks to the point that you can use it to build a reproducible system hardened against tampering or defective updates.

The downside is that it's controlled entirely by canonical, has limited abilities (if any?) for hosting storefronts/packages outside of their ecosystem, and said ecosystem is insecure and has already allowed multiple waves of malicious apps to reach end users because of poor moderation of listings masquerading as legitimate versions.

Canonical has also been increasingly hostile to flatpaks - removing it from Ubuntu and derivatives by default to push users towards snap.

The whole loopfs thing is just an annoyance, but the aggressive posturing by canonical as well as the closed nature of the storefront that has led to malicious attacks on end users is enough to give it more than a few haters.

[–] [email protected] 10 points 2 days ago

The primary thing I hate about them is that every snap package appears to your system as a separate mounted filesystem. So if you look in your file explorer, you can potentially see dozens of phantom drives clogging up your sidebar.

[–] [email protected] 8 points 2 days ago (3 children)

I don't think snaps are bad (and when someone tries to explain why they are, about 85% of the time they say something wrong enough that I suspect they're probably just parroting someone else rather than actually knowing what's going on). It's sad, because if we could get rid of the bullshit we could actually have decent discussions about the benefits and shortcomings of snaps (and how to fix those shortcomings).

On the .deb front: it's a package format made by Debian. Each archive contains a data tarball, which has the files in the package in their full structure from /, and a control tarball, which contains metadata such as name, version and dependencies as well as pre-install, pre-remove, post-install and post-remove scripts, which are used doing any setup or removal work that can't be done just by extracting or deleting the files.

The upside of deb files is that they tend to be pretty small. The downside is that this typically comes from having a tight coupling to library versions on the system, which means upgrading a library can break seemingly unrelated things. (This is why you get warnings like this page: https://wiki.debian.org/DontBreakDebian) Many third party distributors (e.g. Google with Chrome) take care of this by packaging most dependencies inside the deb, inflating the size.

Another major difference between packages like debs and rpms and newer formats like snaps and flatpaks is that the latter have confinement systems to prevent apps from having full access to your system.

[–] [email protected] 1 points 2 days ago (1 children)

Honestly if not for the convoluted Linux FS layout, debs would be pretty serviceable and aren't really different to the Windows solution. The fs layout makes installations way too fickle to clashing with other applications.

That and dependency hell, which distros should have never been allowed to touch beyond the core dependencies required to get your desktop running.

[–] [email protected] 1 points 2 days ago

Well that's what /opt is for. Well-behaved application packages that aren't part of your core distro should install themselves in there.

[–] [email protected] 3 points 2 days ago

For me, it was snapd taking ~2.5 GiB of RAM.

[–] [email protected] 2 points 2 days ago (1 children)

Worth noting that the confinement of Flatpaks and Snaps can have major drawbacks. It has been a major pain in the ass to get Flatpaks working nicely with fractional scaling (think tiny cursor, huge text, tiny text etc etc)

[–] [email protected] 1 points 2 days ago (2 children)

Nothing in theory makes that an issue of flatpaks and snap, just that both rely on different means to interact with the host system that have been woefully slow to implement. If enough protocols are developed a flatpak or snap should be as capable as a native app with the safety benefits for free.

[–] [email protected] 1 points 2 days ago

If you look through the desktop portals GitHub, it seems to be a mess of bikeshedding, mostly on the part of a small number of people on the flatpak side. Canonical seem to have been working around this in snaps by writing their own interfaces as stopgaps until the desktop portals catch up, probably because they got such pushback when the similar frustration on the display server side resulted in them releasing mir with its own protocol until the Wayland folks could get their act together.

[–] [email protected] 1 points 2 days ago

While you're right in pointing out that in theory it's basically as capable as native, it's a royal pain in the ass as it is right now, which disqualifies it from a great deal of applications.

[–] [email protected] 18 points 3 days ago (2 children)

Snaps are a standard for apps that Ubuntu's parent company, Canonical, has been trying to push for years.

The issue that most people have with them, is that Canonical controls the servers, which are closed source. Meaning that only they can distribute Snap software, which many Linux users feel violates the spirit & intention of the wider free and open source community.

Appimages and Flatpaks are fully open source standards, anybody can package their software in those ways and distribute them however they want.

.deb files are software packaged for the Debian distribution, and frequently also work with other distros that are based on Debian, like Linux Mint.

[–] [email protected] 7 points 2 days ago (1 children)

Some further context on this that @[email protected] might want to know:

While Canonical's snap store is proprietary (which, to be clear, I don't really like), all the client software is open source and the API is well documented (though a bit janky). Their snap store relay app (which is open source) has a full implementation of it. There was a fully functional open snap store for a while, but the project died out of a lack of interest. You can also distribute snaps through another mechanism and install them locally on the machine (though you then lose the benefit of snapd's auto updates). You can even do this with snapd still checking the signatures of the snaps.

The standard for snaps is fully open, as is snapd itself.

There's no need to oversell the negatives to the point of being wrong.

[–] [email protected] 1 points 2 days ago (1 children)

Interesting, didn't know it was feasible to make the distribution open.

That doesn't give me much to complain about in theory, but canonical has lost way too much good faith to give people a reason to keep open snap distribution going for free. They should definitely consider hosting an open store just to get people on board again.

[–] [email protected] 2 points 2 days ago

It was being done by a group of snapd developers at Canonical, IIRC, but after a couple of years of exactly zero interaction from anyone outside Canonical I think they just gave up and decided it wasn't worth it because they were getting accused of trying to monopolise whether they had an open store or just an open API.

Of course, you can also distribute snaps without using the snap store API. I've used this for airgapped machines in the past. You can either just grab the .snap file (which is just a squashfs file with a meta/snap.yaml in it so snapd knows how to treat it) and install it with --dangerous, or you can include an assertion file for that snap signed by a certificate that your machine's snapd trusts and not even have to do that. (Those airgapped machines trusted our own certificate so we could ensure that the snaps came from our CI process and weren't a developer's random test snap).

[–] [email protected] 1 points 2 days ago

Thanks, I recently needed picocrypt and not being comfortable with the terminal, snap were a rather convenient way to get it installed, I'll avoid them from now on.

[–] [email protected] 2 points 3 days ago (2 children)

The snap store is some proprietary store Canonical runs, and snaps are friggin huge in size. I don't really know though as I don't use Ubuntu anymore

[–] [email protected] 1 points 2 days ago

Size isn't an issue imo. Applications are bulky for many more reasons than their packaging formats.

[–] [email protected] 3 points 2 days ago (1 children)

The first two snaps I compared sizes of on my system are uv and bitwarden. The uv snap is 9.5 megs vs. the wheel's 12.2 megs, and the bitwarden snap is 97 megs vs. the Deb's 79 megs and the AppImage's 114 megs. These seem pretty reasonable - doubly so since snaps also have delta updates.

[–] [email protected] 1 points 2 days ago (1 children)

OK that's better than what I've seen. Notepadqq I think was 2.4gb and I said no to that one. But again I don't run Ubuntu.

[–] [email protected] 1 points 2 days ago

I don't use Notepadqq anywhere (I use kate btw), but on my KDE Neon system it's currently showing:

$ snap info notepadqq
name:      notepadqq
summary:   A Notepad++-like editor for Linux.
publisher: Daniele Di Sarli (danieleds)
store-url: https://snapcraft.io/notepadqq
license:   GPL-3.0
description: |
  It helps developers by providing all you can expect from a general purpose text editor, such as
  syntax highlighting for more than 100 different languages, code folding, color schemes, file
  monitoring, multiple selection and much more.
  You can search text using the power of regular expressions. You can organize documents side by
  side. You can use real-time highlighting to find near identifiers in no time.
snap-id: 6iueWFAtx9P2OQz4SIW64Kry9hT8aUCL
channels:
  latest/stable:    1.4.8          2018-09-14 (855) 151MB -
  latest/candidate: ↑                                     
  latest/beta:      2.0.0-beta+git 2019-10-12 (890) 201MB classic
  latest/edge:      2.0.0-beta+git 2019-10-16 (897) 197MB classic

It seems to be a dead project (the last release on GitHub is that same 2.0 beta from 2019), but looking at the snapcraft.yaml file, it looks like it's because they're vendoring in a pretty big chunk of KDE and gtk libraries. 2019 was before I started doing anything with snaps or flatpaks for desktops so I'm not sure what the state of KDE content snaps was then (I know there was a GNOME one because the core18 gnome content snap is installed on my system for uhh... some app that I have), but these days for desktop apps there are content snaps for gnome (published by Canonical) and KDE Frameworks (published by KDE) to deduplicate those dependencies.

load more comments
view more: next ›