News for hackers. Stuff that matters.
Re:Packaging Kubernetes for Debian by gitweb on Saturday October 31, 2020 @01:07AM (#24949260)
The packaging nightmare is why I left Debian and Ubuntu for Arch. I now maintain multiple packages in the AUR with relative ease, and see how easily other maintainers manage multiple packages like Kubernetes without issue, but if it was using Deb packages it would be a full-time job.
Re:Packaging Kubernetes for Debian by barumi on Saturday October 31, 2020 @02:06AM (#24949465)
> The packaging nightmare is why I left Debian and Ubuntu for Arch.

I find this comment odd and highly dubious. There is absolutely nothing wrong with Debian's packaging system. At most, some individual packages could have been packaged differently, which is arguably a matter of personal taste. Normally, everything just works, and works very well.

Either you shed some additional light on your personal struggles with Debian's packaging, which you did not do at all, or I have to scratch off your baseless assertion as a kin of someone on the internet shouting at clouds.

Re:Packaging Kubernetes for Debian by raziel2p on Saturday October 31, 2020 @05:23AM (#24950035)
In my experience, once you have a .deb package, it does indeed work perfectly. However, getting to that stage, unless you're packaging a collection of plain files with very simple dependencies, is the hard part.

Ignoring the weird scaffolding you need just to package a static "hello world" binary, there's also all the dh_ scripts which you should use for your package to be "well-made".

I remember looking up how to properly package a Python application, found like 5 different ways documented on the debian wiki, couldn't get any of them to work, gave up and just shipped a whole virtualenv.

Re:Packaging Kubernetes for Debian by sgtcodfish on Saturday October 31, 2020 @06:33AM (#24950302)
This mirrors my experience, too. Building a simple RPM isn't too bad, even if spec files are a little arcane. Packaging for the AUR isn't super complicated as far as I've seen.

The "standard" way to build even the simplest deb file seems super overcomplicated whenever I've tried to do it, with layers of complexity, shims and fudges.

For most simple stuff you just want to specify a bit of metadata, a couple of install scripts and specify "X goes in /usr/bin/X, Y goes in /usr/share/...".

I tend to find that fpm (https://fpm.readthedocs.io/en/latest/) does that for me, and I now use it for building my own deb files pretty much everywhere.

Re:Packaging Kubernetes for Debian by user5994461 on Saturday October 31, 2020 @08:45AM (#24950976)
>>> gave up and just shipped a whole virtualenv.

That is incidentally the most reasonable way to ship a python applications. :D

Re:Packaging Kubernetes for Debian by raziel2p on Saturday October 31, 2020 @10:30AM (#24951769)
Debian and Python purists will say otherwise, and there are some reasons not to do it - e.g. wanting to support multiple Python versions across multiple distributions (such as Debian, Ubuntu, and CentOS). But I agree, in my opinion it is the most reasonable way.
Re:Packaging Kubernetes for Debian by gitweb on Saturday October 31, 2020 @12:01PM (#24952511)
Not to ship, but to install using pip if you're doing it outside your system packaging. Here is the recommended approach for Arch:

https://wiki.archlinux.org/index.php/Python_package_guidelin...

Re:Packaging Kubernetes for Debian by barumi on Saturday October 31, 2020 @07:29AM (#24950580)
> However, getting to that stage, unless you're packaging a collection of plain files with very simple dependencies, is the hard part.

What do you mean plain files with simple dependencies? A deb file is just a zip that stores metadata and your artifacts exactly where you want then to be in the directory structure you see fit. You specify the packages you depend on in the meditada, zip them up, and that's it.

If you need something fancy you can add shell scripts that are triggered in parts of the installation lifecycle, but those are far from being mandatory.

Hell, if you prefer to follow the lazy way out you can even get build systems to generate your deb files for you. Cmake handles this out-of-the-box.

> Ignoring the weird scaffolding you need just to package a static "hello world" binary

What? That "weird scaffolding" you're referring to is literally the directory you zip with the artifacts in their destination and the metadata! Is it too weird for you to deploy libraries in /use/local/lib before you package them? What are you talking about? You build your static "hello world" binary, you place them in the destination folder, you fill in the metadata to specify dependencies and stuff like your name and email address, and you proceed to zip up the package. Done.

> (...) found like 5 different ways documented on the debian wiki

No you really didn't. At most you found references to 5 different tools that help you do the same exact thing.

Here's a link to a process you tried to described as undecryptable:

https://ubuntuforums.org/showthread.php?t=910717

Re:Packaging Kubernetes for Debian by jcelerier on Saturday October 31, 2020 @08:43AM (#24950955)
> You build your static "hello world" binary, you place them in the destination folder, you fill in the metadata to specify dependencies and stuff like your name and email address, and you proceed to zip up the package.

this small "fill in the metadata" part is already half-an-afternoon of reading and understanding all the concepts and mandatory files in there: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html ... and that's only one small part of the manual.

Arch packages in comparison can be a single 15-20 lines PKGBUILD shell script.

Re:Packaging Kubernetes for Debian by raziel2p on Saturday October 31, 2020 @10:47AM (#24951899)
The scaffolding I'm referring to is the "debian" directory containing rules, controls etc..

The built-in Debian packaging tools are already wrappers on top of wrappers on top of wrappers, adding another layer on top of that (with Cmake or whatever) only adds to the confusion and goes to show how over-complicated it is.

For example, the article you linked uses dpkg-deb --build while I've seen alternatives use dpkg-buildpackage and debuild.

The 5 different documented ways was specifically referring to Python packages.

There are also helpers like dh_systemd which I could never get to work so just ran systemctl commands in postinst and such.

Re:Packaging Kubernetes for Debian by jchw on Saturday October 31, 2020 @03:24AM (#24949685)
It is a recurring theme that whenever Arch proponents mention that they don't like Debian packaging, there is a frustrated reaction to it. But I don't understand what people want to hear; there's clearly a reason why people would choose Debian over Arch, Arch users say packaging is a big part of it, and it seems like nobody can accept that this is right.

I can at least tell you that people don't choose Arch over Debian for the installation experience. :)

Re:Packaging Kubernetes for Debian by debiandev on Saturday October 31, 2020 @09:41AM (#24951398)
Debian Developer here. Some people take a very cursory look at Debian and assume the packaging is an exercise in masochism that we inflict on ourselves.

And yet the number of DDs keeps increasing (and Debian is one of most successful projects).

Indeed it takes time to do packaging, and this is by design. Packagers are expected to thoroughly review the code they are packaging and smooth out various sharp corners.

Many times I've found bugs in the upstream code while packaging. Sometimes around security and privacy, often around documentation, usability or non-x86 architectures.

Every time I check if other distributions opened bugs or applied patches for the same issues. It almost never happens.

This is why I might spend 2 hours on a package instead of 10 minutes.

Re:Packaging Kubernetes for Debian by gitweb on Saturday October 31, 2020 @11:00AM (#24951978)
It isn't a cursory look. I worked at Canonical. I used to do lots of Debian packaging. My packages on Arch aren't low-quality. Yet, the packaging process was a lot simpler and a lot more fun on Arch. Plus my package and dependencies are actually based on the stable packages and not a 4 year old patched 10x to maintain compatibility package due to a 3 year old kernel.
Re:Packaging Kubernetes for Debian by lloeki on Saturday October 31, 2020 @05:49AM (#24950119)
> I can at least tell you that people don't choose Arch over Debian for the installation experience

Well, I do (sample of one). The Arch installation has been streamlined a lot. Now it’s all about

0) boot the image (cd, usb, PXE), which is actually an Arch install

a) creating your filesystem (pick you poison), and mounting it

b) telling pacman to install base, base-devel, and a bootloader on the target fs

c) installing and configuring the bootloader

d) rebooting

Done.

d-i barely takes care of that for you, it’s “just” wrapping it behind a UI (which is sort of useful, sure saves one from reading docs, but has been an annoying abstraction/obfuscation/magic layer for me more often than not).

The remainder (setting up X/Wayland/whatever is no different on Debian than on Arch, as d-i does not help much.

Re:Packaging Kubernetes for Debian by zozbot234 on Saturday October 31, 2020 @09:07AM (#24951121)
Debian supports the same install workflow via debootstrap. You don't have to use d-i.
Re:Packaging Kubernetes for Debian by bawolff on Saturday October 31, 2020 @04:41AM (#24949911)
The parent was a bit aggressive, but i think asking why the first poster likes arch packages better than debian is a fair question, since that's the interesting part.
Re:Packaging Kubernetes for Debian by ghthor on Saturday October 31, 2020 @11:45AM (#24952348)
Debian packaging is so arcane, I use the arch PKGBUILDs to build the file system tree and one of the deb tools that build a package from a file tree.
Re:Packaging Kubernetes for Debian by rstuart4133 on Saturday October 31, 2020 @11:34PM (#24957029)
I'm a DD, and I can see his point of view. The debian build system started form the simplest thing that would work, and grew from organically from there. Building in the same area as the source for example, and then having to clean the mess up as opposed to just building in a clean temporary directory like rpm did from day 1. We only got clean separation of debian patches from the upstream sources a while ago. Kinda. Sometimes debian has to repackage the upstream sourced due top copyright problems. uscan is hardly a nice solution syntax wise, nor is is policy so there doesn't have to be a fully scripted way of going from upstream source to debian package. And there is the dh sequencer, which splits the configuration into a zillion tiny little files. It goes on.

Like any organic solution it works, and somewhat impressively works for all the use cases created by debian's 60k odd packages. However, pretty or simple it isn't. Learning the interactions of the various dh_ helpers with the build systems they try to automate, the "guesses" (term they use in the manual) they make and when they are applicable is a huge job. The learning hill is consequently steep, and I would say unpleasant.

However, I don't want to undersell the end result. The QA checks done FTP masters, lintian, the discipline imposed by testing and the long transition from testing to stable mean the end result is very, very good. Better than I've seen in any other distro, including the .rpm ones I used to use. From a sysadmin point of view, that trumps everything. From what I can tell debian could be described as a bunch of programmers beavering away for free to produce something that none of them could produce on their own - a Linux distribution so good the base their day jobs on it.

Re:Packaging Kubernetes for Debian by viraptor on Saturday October 31, 2020 @01:31AM (#24949356)
I'm not sure this is a fair comparison. AUR has next to no rules. You could just as easily maintain a PPA. As described in the article, the package is available via Debian-testing.
Re:Packaging Kubernetes for Debian by gitweb on Saturday October 31, 2020 @10:46AM (#24951887)
I encourage everyone to go evaluate building and submitting a package using the AUR vs Launchpad (PPA). I worked at Canonical and would never go back to Dpkg. I recommend users try it out themselves and see how much easier and cleaner the PKGBUILD approach is.

AUR does have a process to rate, flag and comment on packages. It is also much easier to review the installation script using PKGBUILD. There are a lot of high quality packages in the AUR but you should review everything you install unofficially, just like installing packages from a PPA.

Re:Packaging Kubernetes for Debian by loopz on Saturday October 31, 2020 @01:56AM (#24949434)
Arch/Manjaro is often praised as simpler, more powerful etc., but there are also complaints about instability. Mint has several QA links: upstream, debian, Ubuntu, Mint. With Mint sanitizing the corporate influence, ie. snap being off by default. I don't need bleeding edge, just stable desktop. So I've found my optimum in Mint, though nothing is perfect.

Vendoring is shifting focus back to individual projects though. K8s could almost replace an OS in many regards. It is made to be modular, but only within its own framework. So it is changing the way software is run, similarly to initd and systemd. Such systems as we've seen, tend to "take over" and not be made to be part of and integrate well from inside an OS. Vendoring is really old practice, but also makes testing and support simpler for upstream. We all know the dynamic approach tend to be more unchanging, or associated with several circles of dependency hells.

It's just different end goals for software development and deployment, that affect how software is distributed. Kind of similar to touted goals of JEE of java fame, which also is too monolithic to integrate well within complex systems.

Re:Packaging Kubernetes for Debian by cbmuser on Saturday October 31, 2020 @08:46AM (#24950980)
Arch doesn’t have to support multiple architectures and releases.

Also, Arch usually puts all files into a single binary package while Debian splits arch-dependent and arch-independent files into separate packages. Also, Debian separates packages into runtime and development libraries, another thing Arch doesn’t do either.

Re:Packaging Kubernetes for Debian by gitweb on Saturday October 31, 2020 @11:07AM (#24952020)
This is incorrect
Re:Packaging Kubernetes for Debian by Foxboron on Saturday October 31, 2020 @12:47PM (#24952904)
How is the previous statement incorrect?
Re:Packaging Kubernetes for Debian by gitweb on Saturday October 31, 2020 @05:09PM (#24955215)
> Also, Debian separates packages into runtime and development libraries, another thing Arch doesn’t do either.

Arch definitely has separate packages for runtime and development libraries. It doesn't have as many, but they exist and can be found by simply searching for `-dev`.

> Arch usually puts all files into a single binary package while Debian splits arch-dependent and arch-independent files into separate packages

Arch has `any` and then architecture specific packages:

https://wiki.archlinux.org/index.php/Arch_package_guidelines...

> Arch doesn’t have to support multiple architectures and releases

https://wiki.archlinux.org/index.php/32-bit_package_guidelin...

There are also distros of Arch for ARM and 32bit, however if you're looking for a more integrated multi-arch PKGBUILD-comparable distro then Alpine is it and probably what I'll be migrating to at some point.

Re:Packaging Kubernetes for Debian by Foxboron on Saturday October 31, 2020 @05:51PM (#24955480)
> Arch definitely has separate packages for runtime and development libraries. It doesn't have as many, but they exist and can be found by simply searching for `-dev`.

They are an exception to the rule, where the benefits outweights the negatives. It's been done to ensure we have smaller container images, or if the maintaine thinks it makes sense. But as a rule, we do not care while debian does.

>Arch has `any` and then architecture specific packages:

How is the `any` arch related to package splitting?

>https://wiki.archlinux.org/index.php/32-bit_package_guidelin...

> There are also distros of Arch for ARM and 32bit, however if you're looking for a more integrated multi-arch PKGBUILD-comparable distro then Alpine is it and probably what I'll be migrating to at some point.

Those package guidelines exist, but are dated and not used by us, the packagers.

Arch ARM and 32bit are also seperate distirbutions that isn't affiliated with the 64bit Arch Linux distribution.

Re:Packaging Kubernetes for Debian by konjin on Saturday October 31, 2020 @01:47AM (#24949399)
The packaging nightmare also means that when you stand up a system it won't need upgrades for a decade

Leave an arch system without an upgrade for a month and you're playing Russian roulette.

Re:Packaging Kubernetes for Debian by gravypod on Saturday October 31, 2020 @01:53AM (#24949424)
It will need upgrades for those decades you're just hoping someone remembers how to apply them 9years after they're I'm wide spread adoption.
Re:Packaging Kubernetes for Debian by konjin on Saturday October 31, 2020 @07:10AM (#24950480)
No, it will need security updates. Which Debian stable provides for seven years currently.
Re:Packaging Kubernetes for Debian by jchw on Saturday October 31, 2020 @02:40AM (#24949573)
People say this all the time but it isn’t true. Occasionally a package will require manual intervention to update properly. The manual intervention steps are generally pretty easy and documented on the Arch homepage, so if you haven’t updated in a while and are concerned, all you really have to do is check the homepage. But I don’t even do that. I just pacman -Syu and check if it failed. For the past few years this has worked out just fine. Most of the packages, I don’t even have installed, so I hardly ever hit a manual intervention step.

Of course, Debian doesn’t require manual intervention for most updates, but it also isn’t rolling release. If you want packages that are actually recent you have to sit on Sid, which is a lot less stable than Arch. And if you have a Debian machine that’s a couple years old and you want to upgrade it to the latest Debian version? Good luck. Some of that isn’t Debian’s fault, but whereas on Arch major, breaking package changes are rare but irregular, on Debian they tend to hit you simultaneously in one major upgrade. For home machines, I definitely prefer an occasional manual intervention and continuous fixes over major breakages every couple years where I often just give up and reinstall from scratch.

That said I use Arch a lot less nowadays as I’ve moved onto NixOS. Nix is clearly headed somewhere new, though it remains to be seen if the complexity of the approach is actually maintainable.

If I want to make an idiomatic Arch package, it’s usually easy: PKGBUILDs are intuitive and simple. Nix is much the same for most stuff, especially since most of the boilerplate for various build systems has been automated; though for a program as complex as Kubernetes its a nightmare, to be sure. For Dpkg though, it seems like so much complexity, and I don’t think I ever really had a good experience.

And honestly, I have no idea how to make an RPM package anymore.

Re:Packaging Kubernetes for Debian by tremon on Saturday October 31, 2020 @08:29AM (#24950866)
And if you have a Debian machine that’s a couple years old and you want to upgrade it to the latest Debian version? Good luck.

To counter that with my anecdata, my Debian installations usually outlast the hardware they've been built on. I've found that it's much easier to start new builds with a backup (or the original disk) of the machine they're replacing, that's how easy it is to maintain a Debian system for me.

Heck, my first Linux desktop started out as Ubuntu Breezy, and ended its life as Debian Squeeze. Its replacement started out as Debian Wheezy, and is now on Bullseye.

Re:Packaging Kubernetes for Debian by konjin on Saturday October 31, 2020 @09:11AM (#24951151)
I'm typing on a machine that's started life as Debian Etch, and has moved from a desktop, to a laptop and back, gotten cloned and is now three machines. It still doesn't use systemd.
Re:Packaging Kubernetes for Debian by foresto on Saturday October 31, 2020 @05:17PM (#24955259)
> If you want packages that are actually recent you have to sit on Sid

There are other options. For example, you can sit on stable and get specific packages from unstable, so long as they don't have dependency conflicts with the rest of your system. It requires a little more thought than just running with the defaults, but the docs are pretty clear and detailed (man apt_preferences), and it's mostly a one-time operation. I do this with docker, the kernel, and a maybe a couple other things.

> And if you have a Debian machine that’s a couple years old and you want to upgrade it to the latest Debian version? Good luck.

I guess I'm among the others here who have had good luck, then. The first counterexample that comes to mind is a NAS appliance that is now around ten years old. I replaced its stock OS with debian stable (Squeeze, maybe?) and ran it that way until a year or so past the next stable release, then upgraded. It went fine. I did the same thing repeatedly over the years, until finally decommissioning it last month. It now runs Buster, so that's at least four major version upgrades done past their expiration dates. None of them gave me any trouble. The only thing wrong with it is that my needs have outgrown the hardware.

Re:Packaging Kubernetes for Debian by fiddlerwoaroof on Saturday October 31, 2020 @03:41AM (#24949749)
I’ve successfully upgraded two or three version out of date Debian machines: it isn’t usually a huge deal, unless you use software that is careless about backwards compatibility.
Re:Packaging Kubernetes for Debian by csande17 on Saturday October 31, 2020 @03:03AM (#24949629)
Say what you will about Gentoo, but I've actually really liked making some small packages for personal use. It's the closest system I've seen to just writing down the steps you'd normally take to compile the software manually.
Re:Packaging Kubernetes for Debian by 1_player on Saturday October 31, 2020 @04:44AM (#24949922)
That how Arch Linux packages work. Just a shell file with some metadata