4 ms·
Fun fact, deb packages are just ar files with a funky header (d.e.b) and some pre/post scripts. Ar files are also .o files after compilation but before linking,
by gabereiser 4y ago
Fun fact, deb packages are just ar files with a funky header (d.e.b) and some pre/post scripts. Ar files are also .o files after compilation but before linking, what!?! Also, tar is based on Ar, WHAT!?! Elf files, the whole thing is standardized! WHAAAT!?!
https://en.wikipedia.org/wiki/Ar_(Unix) https://en.wikipedia.org/wiki/Ar_(Unix)
- Andrex 4y agoI wasn't expecting my world to be thrown so hard from reading HN comments today, but here we are...
- bayindirh 4y ago...and younger generations think that the older tech and file formats are just incapable piles of bytes put together haphazardly. We all have much to learn from the past tech, yet we ignore and re-invent the same problems over and over again, proverbially walking in circles. BTW, while the parent is technically correct, .deb files can contain much more features and magic than that.
- gabereiser 4y agotrying not to completely blow their mind. Keeping it simple, describing it just as an archive.
- msla 4y ago> We all have much to learn from the past tech Yes, we certainly can't forget shell archives.
- oefrha 4y agoThe rpm file format is indeed a pile of bytes put together haphazardly. https://xyrillian.de/thoughts/posts/argh-pm.html https://xyrillian.de/thoughts/posts/argh-pm.html
- noirscape 4y agoThe quick mention of the LSB spec led me to this fun Wikipedia page[0]. Apparently Red Hat once wanted to force Linux distros to accept gzipped RPM packages, as well as demand that things like CUPS were always installed. Attempts to comply with it were pretty much non-existent outside of the still used legacy lsb_release command and its associated configuration file, since Red Hat had apparently never actually considered whether or not anyone wanted to comply with it. The entire thing is an ISO spec even, which is kinda baffling. Deprecation was also a mess, with it initially only being possible to remove things from the spec 3 major versions after the specs release (only for that to be violated with version 4.0->4.1 where they removed Java as an optional module that was required to be LSB compliant). The entire thing went bust in 2015 due to lack of interest. [0]: https://en.wikipedia.org/wiki/Linux_Standard_Base https://en.wikipedia.org/wiki/Linux_Standard_Base
- Sakos 4y agoLovecraftian horror as a file format. What a great article. I had a look at when this article was posted on HN a few years ago. The comments are typical nitpicky HN comments like "but why did he want to make his own implementation" or "he didn't have to understand the file format, just use rpmbuild". How disappointing. As if half the stuff on HN isn't understanding/analysing obscure interesting crap that nobody outside of tech would ever care about.
- npteljes 4y agoIt makes more sense if you realize that for a good lot of tech, the goal was not to create a better tech. Even if they happen to say so. It's just people wanting to go ahead, to do their own thing, to make money, be famous, be the one that created a thing. Learning from the past is orthogonal to these goals.
- m463 4y agoIt's interesting to note that tar files have no checksum/crc, the .gz compression takes care of that.
- SoftTalker 4y agoThe tar format was originally intended to be written to tape.
- glandium 4y agoFun fact, deb packages are just ar files with a funky header, containing a "debian-binary" file containing the deb version (nowadays 2.0), and two compressed tar files, control.tar.$comp and data.tar.$comp, where $comp can be gz, xz, or whatever else is supported.
- gabereiser 4y agodevil in the details. But yes, you are correct. There are archives of archives in the archive. :insert Keanu whoa:
- tenebrisalietum 4y agoI think bookworm is going to support zstd, or at least `tar` will.
- qznc 4y agoOnce I made myself a little script to build Deb packages using only basic tools: https://github.com/qznc/simpledeb/blob/master/simpledeb#L61 https://github.com/qznc/simpledeb/blob/master/simpledeb#L61 You need to populate a few files with certain values but apart from that it is just tar and ar.