News for hackers. Stuff that matters.
Re:Why is Debian the way it is? by hyperman1 on Sunday October 08, 2023 @12:29PM (#37811897)
I'd like you to explain this a bit deeper. As a user from the '90s I am quite happy with it, but I might be stuck in my ways, who knows? So not saying you're wrong, but what are we missing exactly?
Re:Why is Debian the way it is? by em-bee on Sunday October 08, 2023 @01:34PM (#37812583)
what deb and rpm and any similar packaging are missing is true version control of the whole packaging ecosystem. at present it is difficult to track which combination of package versions has been tested, and you can't easily roll back to a tested combination. the current systems assume that versioning is linear and that a newer version of any package is always better than an older version. downgrading any package so that every user of the distribution can benefit from the downgrade is difficult and confusing.

there are distributions that provide rollback. but as far as i can tell they require you to keep the old version to roll back to, stored on your computer. you can't roll back otherwise.

i really want this to work like revision systems for code, where i can just checkout any old version that was committed.

another feature that i would like to see everywhere is stickiness of the packaging source. currently, if i include additional repos they override the main repo, such that always the newest version is picked from any repo.

this makes it difficult to include less trusted 3rd party repos. i would like to be able to add 3rd party repos such that only the packages that i explicitly install from that repo will also be updated from that repo, while any other packages in that repo will be ignored unless no other repo has them.

in debian it is possible to set priorities for different repos, but that is not easy to manage. the priorities to have each package update stick to the original repo should be default.

guix and nix do provide some of this as far as i can tell, but i am not a fan of keeping every package self contained with massive link trees. (i may change my mind on that some time maybe, but that's what i feel for now)

conary was/(is?) a packaging system that did have both of these features, although, according to some of the developers the repository was a bit clunky and could have been better. but that was under the hood, not noticeable to users and packagers. i loved working with it and i wish foresight, the distribution using it had become more popular so that it would have had the manpower to keep going.

Re:Why is Debian the way it is? by pabs3 on Monday October 09, 2023 @02:27AM (#37817514)
With snapshot.debian.org you can roll back to any version of any package that has been saved. Using that you can even bisect where issues started.

https://manpages.debian.org/testing/devscripts/debbisect.1.e... https://wiki.debian.org/BisectDebian

Re:Why is Debian the way it is? by pabs3 on Monday October 09, 2023 @02:28AM (#37817524)
You can use pinning to achieve what you want with 3rd-party repos, using the origin feature.

https://wiki.debian.org/AptConfiguration#apt_preferences_.28...

Re:Why is Debian the way it is? by klysm on Sunday October 08, 2023 @03:03PM (#37813428)
A few of my gripes:

* creating Debian packages is a difficult process to learn. There’s a bunch of tools and wrappers around those tools to handle inadequacies and it’s not clear how to do it “right”. For example, if I just have a binary and want to put it into a Debian package without pulling in some random shell scripts that aren’t part of Debian proper, it’s not immediately clear how to do that.

* Non-atomic and imperative install/remove/etc. hooks make it difficult to robustly handle failures. Since there is no file system manifest or sandboxing, there’s no real guarantees that removing a package will actually remove it.

* there’s no spec for a .deb package. This means the only way to correctly generate a Debian package is through the difficult tooling. I understand why this choice is made, and it has a lot of benefits for the continued evolution of the debian project. However, it makes it difficult to build better tooling around deb packages.

Re:Why is Debian the way it is? by pabs3 on Monday October 09, 2023 @02:22AM (#37817476)
The spec for .deb packages is in the deb(5) manual page:

https://manpages.debian.org/bookworm/dpkg-dev/deb.5.en.html

Re:Why is Debian the way it is? by klysm on Monday October 09, 2023 @01:22PM (#37822802)
That's not a 'spec' - it's a vague description of the archive names.
Re:Why is Debian the way it is? by pabs3 on Tuesday October 10, 2023 @03:27AM (#37829405)
It and the other manual pages linked from it contain everything you need to make a .deb from scratch.
Re:Why is Debian the way it is? by klysm on Wednesday October 11, 2023 @12:21AM (#37840853)
I can’t find it right now, but the Debian docs explicitly indicate that you shouldn’t do that because the internal format is not stable. It has changed significantly in the past, and the only “supported” way to do it is with the official Debian tools
Re:Why is Debian the way it is? by pabs3 on Wednesday October 11, 2023 @04:12AM (#37842084)
The .deb format doesn't change significantly at all, the only changes in recent years have been changes to default compression choices (old ones are retained forever though) and some additional fields in the control file.

The only significant future change I can think of is the mtree stuff, which would add an additional metadata file to .deb files.

There are several warts in the .deb file format that the dpkg folks aren't fixing because of compatibility concerns.

https://wiki.debian.org/Teams/Dpkg/RoadMap https://wiki.debian.org/Teams/Dpkg/Spec/MetadataTracking https://wiki.debian.org/Teams/Dpkg/TimeTravelFixes

Re:Why is Debian the way it is? by pabs3 on Monday October 09, 2023 @02:25AM (#37817506)
If you "just have a binary" then you aren't compiling from source, which means you can't make modifications to that binary easily, which Debian wants to be able to do to fix security issues and other bugs.

There is a large range of documentation, everything from the simple to the more advanced to different packaging niches. The large amount of docs makes that harder to navigate though, and a lot of stuff is moving towards automated packaging these days anyway.

https://wiki.debian.org/AutomaticPackagingTools

Re:Why is Debian the way it is? by klysm on Monday October 09, 2023 @11:24AM (#37821403)
Having to use these automatic packaging tools is exactly my gripe. I don’t want to have to rely on whatever scripts someone conjured up if it’s not supported by the distro itself.

I agree it always makes sense to have sources involved for packages that are getting distributed as part of the distro, but what if I want to just deploy my product on a server without the sources?

Re:Why is Debian the way it is? by pabs3 on Tuesday October 10, 2023 @06:49AM (#37830494)
The tools I am talking about are integrated into, supported by, and used by packages within, the distro itself. I'm not talking about external things that make low quality packages.

If you want to make external packages (such as those that don't come with source), then you can just use `dpkg-deb --build` or one of its many wrappers to shove the binary into a .deb.