News for hackers. Stuff that matters.
Re:Linux Mint drops Ubuntu Snap packages by petre on Wednesday July 08, 2020 @03:40PM (#23773480)
Debian has a lot of rules, some of which prevent statically linked binaries, like Go programs, from being packaged and shipped with it. A notable example is lxd.

Appimages are great but there's no sandboxing or updates. But hey, we used to downlad debs and install them by hand on Debian 1.3, before apt was a thing. Maybe appimages could be signed and distributed in a similar fashion.

Re:Linux Mint drops Ubuntu Snap packages by cyphar on Wednesday July 08, 2020 @10:26PM (#23776398)
Go programs are not (generally speaking) statically linked, unless you're explicitly doing CGO_ENABLED=0, -tags 'netgo' and the whole variety of other tricks needed to coax static binaries out of the compiler. Try running "ldd" or "file" on your Go binaries -- most of the time they'll be dynamic objects and linked to glibc, especially if you're just doing a stock "go build".

In addition, Debian definitely does package Go programs -- they've packaged some of mine and they have possibly the most ambitious way of solving the great vendor/ issue (which most other distributions have ignored).

The likely issue with LXD is that they require specific versions of various system libraries that they package in their source code bundles (including a fork of sqlite3!). I packaged LXD for openSUSE[1]. It wasn't really fun, but it is fairly doable if you have a flexible enough view on "good packaging practices" (and I imagine Debian packagers didn't feel like going through all the necessary workarounds -- which includes patching the ELF binary in the openSUSE case). And note that LXD isn't even a static binary -- I tried to compile it statically to get around a whole range of issues and it was a nightmare.

[1]: https://build.opensuse.org/package/show/Virtualization:conta...

Re:Linux Mint drops Ubuntu Snap packages by ReallyOldLurker on Wednesday July 08, 2020 @08:09PM (#23775674)
"Appimages are great but there's no sandboxing or updates"

Actually there is sandboxing and updates, if you want to take an extra steps.

I prefer AppImages over Flatpack and Snaps for essentially the same reasons commented above.

I typically launch them with Firejail for the sandboxing. i.e. "firejail --appimage /path/to/appimage" instead of just the appimage alone. Seems to work just fine. Firejail has additional options that can be done.

Some AppImage creators do provide an update method that can be installed using zsync2, but I've not tried it since the whole point is disposability.

Re:Linux Mint drops Ubuntu Snap packages by viraptor on Wednesday July 08, 2020 @06:36PM (#23774963)
> prevent statically linked binaries, like Go programs

What do you mean? There's debian go packaging team: https://go-team.pages.debian.net/ as well as go packages in stable (for example https://packages.debian.org/buster/influxdb)

Re:Linux Mint drops Ubuntu Snap packages by Izkata on Wednesday July 08, 2020 @10:29PM (#23776415)
> Appimages are great but there's no sandboxing or updates.

I know nothing about AppImages, but up above someone said they do have updates: https://news.ycombinator.com/item?id=23773878

Re:Linux Mint drops Ubuntu Snap packages by pjmlp on Thursday July 09, 2020 @02:10AM (#23777412)
Go also supports dynamic linking actually.
Re:Linux Mint drops Ubuntu Snap packages by pabs3 on Thursday July 09, 2020 @03:37AM (#23777846)
Unfortunately even micro releases of the Go compiler break ABI, so Go dynamic linking isn't feasible for distros to use:

https://wiki.debian.org/StaticLinking#Go

Re:Linux Mint drops Ubuntu Snap packages by cyphar on Friday July 10, 2020 @11:49PM (#23799301)
There are two types of "static linking" being discussed:

  * Linking with system libraries (what GP mentioned).
  * Linking with Go packages (what you're talking about).
Yes, Go doesn't really support -buildmode=shared anymore (and it was pretty broken from the outset). But this is a separate question to whether a Go binary is actually a static object. In most cases (and by default), Go binaries are dynamically linked to system libraries (with Go packages being statically linked into the program).
Re:Linux Mint drops Ubuntu Snap packages by pabs3 on Tuesday July 14, 2020 @10:48PM (#23840660)
pjmlp's comment seemed to be about Go packages to me, not system libraries.
Re:Linux Mint drops Ubuntu Snap packages by cyphar on Wednesday July 15, 2020 @09:07PM (#23854558)
The original comment[1] spoke about "statically linked binaries" which has a pretty specific meaning ("file" says its a static binary). There are similar issues for Debian packaging if you had a hypothetical language which required you to vendor your dependencies because maintenance for security issues would be annoying (Debian worked around this problem in Go through "de-vendoring" and Go modules -- in theory -- mostly solve this issue today). But static binaries are generally not distributed in distributions because they make make core library updates worse in terms of download size as well as inflating memory usage due to lack of page-cache sharing.

[1]: https://news.ycombinator.com/item?id=23773480