Ubuntu Snap auto updates broke my development setup and there is no way to turn them off

栏目: IT技术 · 发布时间: 5年前

内容简介:After updating-by-reinstall to Ubuntu 20.04, I installed CLion viaHere is a picture after the auto update occured.

After updating-by-reinstall to Ubuntu 20.04, I installed CLion via snap since that seemed more convinient than manually downloading a java installation. CLion is the best thing since sliced bread , or I mean a C/C++ IDE by JetBrains. Ubuntu snap is a packaging system made by Canonical and pushed hard in Ubuntu. Today I found out the hard way that snap auto-updates and that there is no way to turn that off permanently. CLion was updated, which I noticed because the process was killed. The update broke several key plugins for my workflow and the theme was weird. In this article I'll discuss my disgust, I as the owner of the computer want to be in full control, not some developer forcing their will, deciding I need auto updates. I ended up removing snap completely, and my next install will not be Ubuntu due to this.

Here is a picture after the auto update occured.

Ubuntu Snap auto updates broke my development setup and there is no way to turn them off

Not just the plugins on the screenshot broke, but also the plugin used to cross compile to ARM, which was the main issue. The theme issue was fixed after switching the theme to Dracula and back to High Contrast.

If you like this article, consider sponsoring me by trying out a Digital Ocean VPS. With this link you'll get $100 credit for 60 days). (referral link)

I do love auto updates and the security benefit, but I rather prefer to be in control on such an important system. I carefully apt update and snap refresh every week, but only after reviewing which packages are included in the update, checking changelogs and holding off CLion updates until they've been out for two weeks. With apt I can hold packages and if I want, disable unattended-upgrades , with snap , this is impossible.

Disable snap updates

There is no way to disable snap updates. Yes you read that right. Ubuntu is worse than windows in this regard, because even Microsoft lets you, in company setups, disable updates (Windows 10 LTSC with group policies, or Windows 10 with WSUS).

There is a three year long forum topic but no solution is provided by the snap developers. The snap store / backend is also not open source, although the client is, you cannot configure any other snap store (like different apt repositories). So in theory, Canonical has full control over your computer and can execute malicious code without user intervention.

You know what the worst thing is? There is a sort-of disable option, but snap ignores that:

After a refresh, the next refresh can be delayed by up to 60 days, after which a refresh will be performed regardless of the refresh.hold value.

source

Workarounds

One workaround I found is to remove snap entirely:

sudo apt autoremove --purge snapd

Which is what I ended up doing. My next (re)install will also probably be Linux Mint since they disable snap and do let their users configure updates.

One other thing I found is people blocking the snap domains in their hosts file or setting up a proxy for snap (why does that not follow system wide settings? Another example of stupid developers reinventing the wheel I guess).

But, workarounds are as the name suggests, workarounds. Just give people the option to disable auto updates. Even if you enable them by default, let me be in control of what and when things happen.

Conclusion

After uninstalling snap and reinstalling the previous version of CLion via the regular java installation method, my plugins worked again. But it did take half an hour of my precious time and caused some frustration when I found out the utter stupidity of the snap development team for forcing their will on everyone. Vote with your wallet, stop buying / using Ubuntu and snap, otherwise it will only get worse.

Tags:blog ,c++ ,clion ,cpp ,development ,linux ,security ,snap ,ubuntu

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

代码大全(第2版)

代码大全(第2版)

[美] 史蒂夫·迈克康奈尔 / 金戈、汤凌、陈硕、张菲 译、裘宗燕 审校 / 电子工业出版社 / 2006-3 / 128.00元

第2版的《代码大全》是著名IT畅销书作者史蒂夫·迈克康奈尔11年前的经典著作的全新演绎:第2版不是第一版的简单修订增补,而是完全进行了重写;增加了很多与时俱进的内容。这也是一本完整的软件构建手册,涵盖了软件构建过程中的所有细节。它从软件质量和编程思想等方面论述了软件构建的各个问题,并详细论述了紧跟潮流的新技术、高屋建瓴的观点、通用的概念,还含有丰富而典型的程序示例。这本书中所论述的技术不仅填补了初......一起来看看 《代码大全(第2版)》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具