Live data from Hacker News

Snaps are an anti-pattern on Ubuntu

techtudor.blogspot.com

41–50 of 198 posts

Re: Snaps are an anti-pattern on Ubuntu

#41

The whole snaps business was already annoying. Then my external monitor stopped being detected due to some issue with Nvidia graphics on (which probably is more Nvidia's fault then Ubuntu's). I'm using Thinkpad X1 Extreme Gen 2. Tried Fedora 32's live usb and basically everything worked but the installer didn't detect all partitions and didn't give a choice of choosing exactly what goes into which partition without o…

Say what you will of their hardware, but the system76 team really nailed pop_os. So many little things I was used to suffering through manually configuring on a fresh install were just "right" straight out of the box.

Supposedly they're working on tabbed and stacking layouts for tiled windows- if that is the case I don't know if I'll go back to i3 or sway again!

Re: Snaps are an anti-pattern on Ubuntu

#42
post #32

I think there are some very good critiques of snap (performance, provenance, reproducibility, namespacing, etc), and the first couple points in this article seem reasonable. However I can't agree with this: > apt/deb is a wonderful package management system and everyone is happy with it, at least the majority of Ubuntu/Debian users. Besides, dnf/rpm is also a similar packaging system for Fedora/RH systems and everyon…

And I want: - a user-space install option - rollback functionality (!) - being able to install multiple versions at the same time and switch between them - if I really need to: being able to install the latest version (and even an unstable release); if that means that apt-get has to download and compile stuff, then I'm ok with that.

Sounds like Nix or Guix.

Re: Snaps are an anti-pattern on Ubuntu

#43
post #37

I honestly like snaps. I like having spotify and discord working as to his other concerns I just don't care.

Why not just get a Mac?

Not saying you're wrong, but if the response to people wanting to use linux is "Get a Mac" then that's problematic.

Re: Snaps are an anti-pattern on Ubuntu

#44

I think there are some very good critiques of snap (performance, provenance, reproducibility, namespacing, etc), and the first couple points in this article seem reasonable. However I can't agree with this: > apt/deb is a wonderful package management system and everyone is happy with it, at least the majority of Ubuntu/Debian users. Besides, dnf/rpm is also a similar packaging system for Fedora/RH systems and everyon…

I can only comment on snap for the server (non-desktop) side of things but packages in Ubuntu, which are Debian packages, contain random (none or a lot) amounts of shell scripts /var/lib/dpkg/info/* which may fail for any reason and introduce any number of side effects into the system, as they handle sometimes very complex software migrations and can change any number of things. Surely the desktop has some history here too (packaged proprietary graphics drivers for example doing unspeakable things to Xorg configs come to mind).

Snap is a way to contain / scope this kind of scripted activity. This is a welcome change. Additionally, deb/apt has much worse transaction support than yum and its successors (you can simply roll back yum transactions, good luck rolling back a borked APT system where package maintainer scripts already have done unspeakable things to the system and you're kind of stuck). APT's configuration system is also arcane and badly documented; debhelpers that control how most packages are built and work are tens of thousands of lines of perl, python, C++, C, makefile and m4 code that somehow work but are in no way a way to build straightforward predictable packages. It's ultra flexible, but also ultra complex. The trend in package / release management is going towards simplification, and not complication. A stop gap solution were many projects that allow the generation of Debian packages from venvs, random directory trees (for which you could also use the deprecated old-style DEBIAN package format and pass it to dpkg-build without the arcane dpkg-* toolchain, but again, Debian claims these this kind of packaging is not "well formed", and who knows when it gets removed).

Snaps are just a different way to do integrated containerized applications with scoped config management, versioning and a release system on top (which makes the difference). Perhaps somebody could make a better solution. Meanwhile, RedHat introduced AppStreams -- probably Canonical also felt it needed an answer to that.

Ubuntu's exposure to their "universe" repository component, many packages in which are badly maintained and are not a great part of the release QA, is also a huge risk as an enterprise distribution (where the money is) so it is no surprise that Canonical is looking to decouple their core offering on the server platform from that and maybe at some point remove it from the base install altogether ("take your own risk") and then drop it.

Re: Snaps are an anti-pattern on Ubuntu

#45
Devils advocate: it is plain weird for every app I install to have so much file system and system access. It’s nice to have a sandboxed solution built in. It would be nice if it was a solution that didn’t have the problems that this article listed, but snaps could be adapted to be good with a few changes.

Why a proprietary backend though? I suppose cannonical views packaged apps as a platform opportunity and wants to be the first to “capture” the users without somebody bigger coming and taking over?

Re: Snaps are an anti-pattern on Ubuntu

#47
As a package manager for my app snaps have really been an anti-pattern and we're considering removing support for them.

Here are some problems I've had:

- snaps use a different directory than our main app. So if you install our debian package, then go to a snap package, all your data seems to vanish. It's just in another hidden directory. I tried to figure out how to get the directories to sync up but couldn't get it to work as it's yet 'another thing to support'. I only have so much time.

- snaps have various bugs that you encounter after you've shipped the app that aren't present at build time. Mostly due to being in a container and 'reasonable' things not being accessible and needing to be granted access to via a configuration file.

The strategy I'm thinking of migrating to is to just distribute as a .deb and have our own apt line that is installed during the .deb installation. I think this is what Slack and other Electron packages have migrated to which is easier for them to support.

I mean conceptually it sounds great. Put your apps in a container. They will be isolated. Great. But in practice it's a nightmare.

To be fair though. MacOS has similar issues when they started going with isolation and privileges.

I think the main issue is that none of the OS maintainers spend a day in the shoes of a package maintainer. And if they did they don't care because they own the OS and many of these apps compete with your core product.

At least you have plausible deniability that your behavior isn't anti-competitive - you're just trying to improve the security for the user!

For example, Zoom got a ton of crap about their installer but they compete with Facetime which DOES NOT have to constantly ask the user for privileges. Apple granted Facetime these privileges via the OS.

From the perspective of a user, it's horrible.

"Can this app access your Downloads folder?"

"Can this app access your Webcam?"

"Can this app access your Microphone?"

"Can this app access your Documents folder?"

... and on and on ad nausea.

Re: Snaps are an anti-pattern on Ubuntu

#49
post #36
post #31

Earlier quoted context omitted.

Super users should be using Debian. Not being snarky.

I'm a super user but the last time I tried to use Debian as a desktop OS the experience was so disappointing that I reformatted to Ubuntu. I gave a shot to KDE and reformatted again to Gnome after a couple of weeks. That was 2014. I removed Debian as a possibility, KDE maybe someday. On a server Debian is OK.

What didn’t you like about Debian on the desktop? Old software?

Re: Snaps are an anti-pattern on Ubuntu

#50

The whole snaps business was already annoying. Then my external monitor stopped being detected due to some issue with Nvidia graphics on (which probably is more Nvidia's fault then Ubuntu's). I'm using Thinkpad X1 Extreme Gen 2. Tried Fedora 32's live usb and basically everything worked but the installer didn't detect all partitions and didn't give a choice of choosing exactly what goes into which partition without o…

Say what you will of their hardware, but the system76 team really nailed pop_os. So many little things I was used to suffering through manually configuring on a fresh install were just "right" straight out of the box. Supposedly they're working on tabbed and stacking layouts for tiled windows- if that is the case I don't know if I'll go back to i3 or sway again!

I've been a critic of their hardware in the past, but yes they do a great job on the software. And to be fair the purchase on which my earlier criticisms were based is almost four years old now. Hopefully they have improved the hardware side of things.
Post reply on HN