We no longer need this, since we can now produce our own squashfs images
directly from package files.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Otherwise we can get really funky corner cases where an inode offset is
indicated as just 1 byte after the end of a block. The unsquashfs program
doesn't complain but the kernel implementation really doesn't like that.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
The kernel implementation BAILS if a directory header is followed by
more than a hard-coded maximum of entries (currently 256).
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
The uncompressor will know when end of file is reached. Flushing
prematurely won't help. Especially the way the loop was constructed,
using an external buffer that is a lot larger than the internal
buffer of the compressor will cause multiple erroneous flushes.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
The squashfs kernel implementation relies on the following properties:
- directory entries are ordered asciibetically by name
- directory entries have consecutive inode numbers
- inode numbers are assigned in that order
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
The goal is to transform a package file to a squashfs image. The mksquashfs
utility is a PITA with all kinds of idiotic not-thought-through corner
cases (e.g. the way "pseudo file definitions" have been tacked on, the
inabillity to set UID/GID for / *AND* have files not owned by root, the
way xattrs are handled, .....).
It would be preferable to fix mksquashfs itself, but the source code itself
is a horrid, unmaintained garbage pile. Its easier to write a small utility
instead that can turn a pkg file into a squashfs image in a way that
propperly treats file permissions and ownership, and is deterministic
(i.e. reproducable).
The utility currently generates an uncompressed squashfs image that
unsquashfs can unpack, but the kernel refuses the mount. The exact
problem still needs to be determined.
Furthermore, compression has to be implemented and some cleanup shoul
be done.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
- Remove compressor registration interface. Doesn't work in a static
library, since all the files containing no exported members are
optimized away at link time.
- Repack as seperate utility library.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
In build strategy, record a linked list of providers instead of just
one per binary package. Add an option to scan a preference list in
addition.
When looking up the provider and there is more than one, choose the
preferred one. Produce an error if none is given.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>