Snap and modern software (was: Remove /snap directory)
Keith
keith at caramail.com
Wed Dec 14 05:56:32 UTC 2022
On 12/13/22 7:41 PM, Jeffrey Walton wrote:
> On Tue, Dec 13, 2022 at 5:28 PM Keith <keith at caramail.com> wrote:
>>
>> On 12/13/22 2:30 PM, Jeffrey Walton wrote:
>>> On Tue, Dec 13, 2022 at 1:45 PM Ian Bruntlett <ian.bruntlett at gmail.com> wrote:
>>>>
>>>> On Tue, 13 Dec 2022 at 18:14, Liam Proven <lproven at gmail.com> wrote:
>>>>>
>>>>> Since then, I have relented from this hardline position, partly after
>>>>> listening to sometime list member Oliver Grawert's talk at the Ubuntu
>>>>> Summit last month. I also attached a few of my laptops to my free
>>>>> Ubuntu Pro account, which automatically, and without asking,
>>>>> re-installed Snap and installed the livepatch tool. :-D
>>>>
>>>> Was Oliver's talk on snaps recorded somewhere? Tried looking for it on Google but didn't find that.
>>>>
>>>>> So I tolerate it, but I mostly use deb-get to install native packages,
>>>>> and usually I have almost no snaps installed on most of my machines.
>>>>
>>>> Same here. For one (major) reason: it will mean an installation of an LTS Ubuntu will get to run reasonably up to date software (at least, regarding snaps). OTOH, I could be *completely* wrong with that observation :)
>>>
>>> I've never been able to figure out what Snap is supposed to do that
>>> Apt does not do. In my mind's eye, it's a solution looking for a
>>> problem.
>>>
>>> To keep software up-to-date by following major releases on Ubuntu, you
>>> use do-release-upgrade every year. That's similar in cadence to Fedora
>>> and dnf-system-upgrade.
>>>
>>> When a user chooses an Ubuntu LTS or ESM release, then they are only
>>> following point releases. They are wandering into antique software
>>> land. It's the realm of Red Hat Enterprise Linux and CentOS, where a
>>> stable ABI is valued over modern software.
>>>
>>> Snap does not solve the problem of building software with up to date
>>> components. Ubuntu's SRU [1] does not allow it. About the best you can
>>> do is Upstream Microreleases.[2]
>>
>> That's not true. Snap packages are not governed by SRU policy at all.
>
> Correct. But that's not my point.
>
> The base OS is governed by SRU, and that's what matters. That's what
> custom software is going to use. That's what deb packages are going to
> use. That's what you are going to use when you build your favorite
> warez from GitHub.
You do know that you're not limited to using dev packages on the host
system to develop software, correct? You can configure a build
environment pretty much any way and anywhere you want nowdays. With
virtualization, cross-compilers, etc., a developer isn't even limited to
the particular architecture platform of his host machine to develop
software for.
I don't know why you would think you'd just be limited to using source
packages and build tools from the particular release of Ubuntu you're
running, though.
>
>>> As a case in point, suppose I want to build and use the latest cURL
>>> library in my C program. cURL has a number of dependencies that will
>>> remain downlevel: zLib, Bzip2, IDN2, PCRE2, libxml2, libunistring,
>>> ngHTTP2, OpenSSL, and OpenLDAP. Those are first order dependencies,
>>> and they don't include the secord order dependencies, like GNU's
>>> Gnulib, Ncurses, iConvert, Readline, etc.
>>
>> https://curl.se/
>> "What's the latest curl?
>>
>> The most recent stable version is 7.86.0, released on 26th of October
>> 2022. Currently, 81 of the listed downloads are of the latest version."
>>
>> $ snap info curl
>> name: curl
>> summary: CLI tool for transferring data with URL syntax (HTTP, HTTPS, etc)
>> publisher: Wouter van Bommel (woutervb)
>> store-url: https://snapcraft.io/curl
>> contact: https://github.com/woutervb/snap-curl
>> license: curl
>> description: |
>> A command line tool and library for transferring data with URL syntax,
>> supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB,
>> TELNET,DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and RTMP.
>> libcurl offers a myriad of powerful features
>> snap-id: jFJhGxzO7zh4xPun3oLzsYPesPvyGblh
>> channels:
>> latest/stable: 7.86.0 2022-11-03 (1256) 6MB -
>> latest/candidate: 7.86.0 2022-11-03 (1256) 6MB -
>> latest/beta: ↑
>> latest/edge: 7.86.0 2022-12-12 (1350) 6MB -
>
> And what happens when you try to build your C program against
> libcurl4? Are all the development headers and libraries available?
No, you'd need the source code for that. Easily obtained from the link
to the site I posted above.
But the deb packaged curl and libcurl4 library don't include development
headers either. You'd have to download and install the curl source
package to get those.
The curl snap provides the curl binaries (curl and curl-config) and all
it needs to run in a containerized package. That's it.
Installing the curl snap is equivalent to installing the curl deb
package. The difference, as it relates to software versions, is that
snaps allow you to run newer versions of applications independent of the
older native shared libraries installed on the host system which may not
be compatible with the newer version.
The same curl snap package that allows me on 22.04 to run the latest
version of curl (7.86) would also allow me to run it on 18.04 (maybe
16.04 too, if its under ESM. not sure though). It also allows me to run
it on other distributions, including RPM based ones.
With the installation of the of snapd and the snapcraft framework, you
can theoretically even create, build and publish snaps to the snap store
from CentOS, RHEL, OpenSuse, etc. I don't know if there's any of those
in the store now, but one goal of containerized applications is the
ability to distribute them across distros.
And of course snaps also allows you to run closed source, proprietary
software which cannot be included in Ubuntu distributions.
>
> I suspect not. I can't find these, and these are the basis of a lot of
> libraries and programs:
>
> * https://snapcraft.io/search?q=bzip2
> * https://snapcraft.io/search?q=libz
> * https://snapcraft.io/search?q=readline
> * https://snapcraft.io/search?q=ncurses
> * https://snapcraft.io/search?q=iconv
> * https://snapcraft.io/search?q=idn2
> * https://snapcraft.io/search?q=pcre2
Snaps are primarily distributing containerized, already compiled
binaries, not for distributing source code for libraries. Not sure why
you're hung up on that.
>
> Old libraries and programs are a problem, but Snap is not solving that problem.
Yes, it does.
> If it is the intention of the Snap folks to provide an entire mirror
> of the base system in /opt/snap (or wherever it puts artifacts), then
> the team may as well provide a Snap Linux distro derived from Ubuntu
> that is a rolling release.
I dunno about rolling release, but containerizing more and more
applications is the direction where this is going and not just with Ubuntu.
--
Keith
More information about the ubuntu-users
mailing list