The horrors of package formats, in Rust!
Flat files #
- Do I even need to say anything here? Horrible choice of package format, unless you’re distributing one file.
- As far as I can tell, the
tarcrate can only unpack to a real directory on the filesystem, because nobody would ever have a use-case for extracting a tarball in-memory.
tarcrate follows symlinks by default.
- Directories are an entry of type
- Symlinks are an entry of type
- Symlinks have special extra metadata directly on the tar entry header.
- If you forget to set the checksum on an entry header, tooling may break in new and unhelpful ways.
- Downloading an image, building an image, and uploading a rootfs tarball to the daemon are all the same command (
- An exported Docker image is a tarball of tarballs (that may contain more tarballs as part of the layer!) + some metadata.
- An exported Docker image may contain more than one image.
- NOTE: I don’t remember the actual reason, but the metadata is an array which suggests that it’s possible.
- Everything about tarballs applies if you’re working with exporting or importing images.
- Yes, EVERYTHING.
- Docker’s external interface is basically just a glorified wrapper around tar. This is actually a good thing and doesn’t belong on this list.
Arch packages #
- All the metadata inside the package is optional, except for
- Version numbers MUST end in
-\d+$or similar. I’m not certain why and couldn’t find an answer.
pacmanwill just refuse to install your package until you figure this out.
.PKGINFOdoes not support quoted strings.
builddateis optional and can be set to
sizeis optional and can be set to
Part 2 soon, where we meet
.deb, RPM, AppImage, and friends!