4 ms·
It turns out that if all you want is to package a bunch of files to get copied into the filesystem, the bit of the debian tooling that you actually need is tiny
by regularfry 1y ago
It turns out that if all you want is to package a bunch of files to get copied into the filesystem, the bit of the debian tooling that you actually need is tiny. Basically just a DEBIAN file, your file tree, and dpkg-deb, from memory. But figuring that out from the docs is terrible, because they want to funnel you into source packages and the higher-level (more complex, obscure) tooling.
- hereonout2 1y agoYes, it is incredibly easy if those files have no external dependencies - say a go binary for example. The format of the .deb package itself is also pretty simple and straightforward. But historically and probably now even almost all packages were nothing like this. When you need to target particular shared libs as dependencies and link against them, confirming that via build isolation, etc - which is what the vast majority of packages have to do - then all the other complex tools become a necessity.
- CamouflagedKiwi 1y agoYou're probably right - I didn't figure that out (I vaguely recall some dh_thing commands but I've fortunately reclaimed most neurons involved with it). It also turns out that the only thing we did want to do was copy files onto the filesystem - early on we had some more complex bits like pre and post install scripts, and they got us into a horrible mess via not being written sufficiently defensively and apt giving you basically no safety rail and being very unhelpful at getting you out of a bad situation. After that we banned anything that wasn't just "put files on system".
- wasmperson 1y agoYup, dpkg-deb is all you need, but I could never find it looking through online documentation. The thing that finally helped me figure out how to make .deb files was an internet outage, believe it or not. While bored I started looking at packaging-related documentation in my computer's locally-installed manual pages, and landed on these two, which explain the basics in simple terms: https://manpage.me/index.cgi?apropos=0&q=dpkg-deb&sektion=0&manpath=Debian+8.1.0&arch=default&format=html https://manpage.me/index.cgi?apropos=0&q=dpkg-deb&sektion=0&... https://manpage.me/index.cgi?apropos=0&q=deb-control&sektion=0&manpath=Debian+8.1.0&arch=default&format=html https://manpage.me/index.cgi?apropos=0&q=deb-control&sektion...