Age | Commit message (Collapse) | Author |
|
Use the directory reader from libsquashfs instead.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Parallel unpacking didn't really improve the speed that much. Actually
sorting the files for optimized unpack order improved speed much more
than the parallel unpacker.
Furthermore, the fork based parallel unpacker was actually pretty messy
to begin with.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This of course entails turning the entire project over to libtool magic.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The idea is to make libsquashfs.a independend of libfstree.a, so it becomes
a general purpose squashfs manipulation library. All the high level glue code
for libfstree.a and utilites that are overly specific with to tools are moved
to a seperate librarby.
This commit makes the first step by moving the stuff with dependencies on
libfstree to a seperate library.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
We can't change the mod of symlinks and hence AT_SYMLINK_NOFOLLOW is
not supported by chmod(2 -> RTFM!).
The solution is to not use that flag and simply skip symlinks.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Do not try to change the nameless root node which is mapped to the
output directory.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit creates a new data structure called 'sqfs_reader_t' that
takes care of all the repetetive tasks like opening the file, reading
the super block, creating the compressor, deserializing an fstree and
creating a data reader.
This in turn makes it possible to remove all the duplicate code from
rdsquashfs and sqfs2tar.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit moves the file unpacking order & job scheduling to a libfstree
function. The ordering is improved by making sure fragment blocks are not
extracted more than once and files with data blocks are extracted in order.
This way, serial unpacking of a 2GiB Debian live image could be reduced
from ~5' on my test machine to ~3.5', whereas parallel unpacking stays
roughly the same (~3' for -j 4).
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
If -DNDEBUG is set, the entire thing is omitted from the output.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
File names may contain traces of white space.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The names generated by fstree are always in the correct format, but this
is still needed for the sake of documentation and to guide static
analysis tools.
Should canonicalize_name fail on an fstree generated name, something is
serverly broken.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Should the main process exit (e.g. the user presses CTRL+C) or explcitily
sends it a signal, the desired behaviour is for the children to stop
unpacking and exit.
This commit adds a line to configure the kernel to send SIGKILL to the
children if their parent dies.
The same option also exists on various BSDs (not all of them) but with a
different name which has to be checked for and adjusted should the program
be required to run on one of those.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
If some library isn't present, the variable $(FOO_LIBS) simply evaluates
to empty string, so it can be simply be added to LDADD without any checks.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The utility programs pretty much all have the same structure of including
one central header per C file that includes all required library headers,
so we can simply include config.h which we need for large file support
from there and remove it from the C files.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Would cause the build to fail if zstd was enable and lz4 was disabled.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Requires that config.h be included before other headers, since the macro
_FILE_OFFSET_BITS changes the definitions of things like 'struct stat'.
I chose to simply include it at the top of every C file and at
immediately after the double-inclusion guards of every header.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Use a seperate variable to iterate over directory children and don't
modify n. Otherwise, the chown/chmod code below derefernces a null
pointer when trying to access n->name, n->uid and n->gid.
Bug found using scan-build.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- gensquashfs simply asks the backend compressor to write its options
to the file and does accounting
- rdsquasfs simply asks the backend compressor to transparentyl snort
the options from the file
- not implemented in any compressor backend yet
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The listing command has been used successfully to do the following:
- generate a prestine file system using gensquashfs
- repeate multiple times:
- generate a listing from the file system
- unpack only the regular files from the file system
- generate a new file system from the listing
- run `diff` on the old and new filesystem and admire that they
are identical
- replace the old file system with the new one, since they are
identical
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of malloc/freeing the buffers for every file, allocate them
once, ahead of time.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit changes the names of the tools to gensquashfs and rdsquashfs
so they don't collide with the names used by the squashfs-tools package
and the two can be installed side by side.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|