summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-10cleanup: move directory serialization to separate fileDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-10gensquashfs: do pushd/popd when needed instead of chdirDavid Oberhollenzer
This commit replaces the chdir to the input directory with pushd/popd when building the fstree and again when packing files. This simplifies handling of other file paths given on the command line that have to be accessed and are relative to the original working directories. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-10Add pushd/popd utilityDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-09Add workaround to make empty directories with xattrs workDavid Oberhollenzer
The problem: SquashFS uses extended inode types for inodes with xattrs, so for directories we need to generate an ldir inode. The ldir inode type includes a directory index which cannot be empty (the counter is off by 1, so 0 means 1 entry) and the entry is expected to contain a file name with the same issue (must be at least 1 byte). This has probably not really been thought through. What the mksquashfs actually does is generating an ldir inode without an index. The kernel does not bother to read the index, since the size of the directory is 0. Its a hack that just so happens to work. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-08Replace e-mail addressv0.1David Oberhollenzer
I did this in my spare time, so replace the company address with the infraroot.at address. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-07Update README fileDavid Oberhollenzer
Remove agressive remarks and give credit where credit is due. Generally express thinks in a more positive way. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-31Update documentationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-31gensquashfs: allow combining packdir and packfileDavid Oberhollenzer
If packdir and packfile are both specified, use packdir as alternate root. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-31gensquashfs: chdir into directory where the input file liesDavid Oberhollenzer
This makes path handling a lot easier. We no longer need to paste paths together to get input file relative paths, since we are in the same directory. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-26gensquashfs: add option to simply pack an input directoryDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-25Update documentationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-25gensquashfs: Make '-X help' work without specifying input/output filesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-25Add options for lzma2 compressorDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-23Add options for deflate compressorDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-21Add options for lz4 compressorDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-21Add options for lzo compressorDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-21Add options for zstd compressorDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-21Add command line flag for compressor options, pass them to compressorsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-21fix: inode number difference in dirent is actually signedDavid Oberhollenzer
For now, it is enough to reduce the comparison value, since the inode numbers are increasing. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20Update READMEDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20cleanup: remove squashfs type from fstree nodesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20cleanup: internalize frag_reader_t implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20cleanup: remove overly excessive commentsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20cleanup: internalize meta reader/writer implementationsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20Get rid of unalligned pointersDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20Add string table headerDavid Oberhollenzer
Fix a line in the Automake file where the source file was added a second time instead of the header file. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19rdsquashfs: fix read_inode_slink_ext returnDavid Oberhollenzer
Return the actual object, not 0. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Update manpageDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add ZSTD compressor implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Update REAMEDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Generate extended attribute tableDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add xattr indices to inodesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add SELinux option to gensquashfsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add SELinux labeling to fstree codeDavid Oberhollenzer
Use libselinux to lookup the context attributes from a file. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add extended attributes to fstreeDavid Oberhollenzer
We use a str_table_t to generate unique IDs for all unique keys and all unique values and then use a post processing step to deduplicate xattr listings. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add string table implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Fix directory index (yet again)David Oberhollenzer
Turns out (after countless hours of debugging since the squashfs kernel code is so convoluted) that the offset is relative to the first directory header for no apparant reason (the field holding the offset is way larger than neccessary to store absolute values). Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-13Add yet another magic clutch to squashfs dir entry generationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-13Generate dir index for extended dir inodeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-06Add lz4 compressor implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-06Implement reading and writing of compressor optionsDavid Oberhollenzer
- 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>
2019-05-06Add LZO compressor implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-05Comment on all the thingsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-05Add man pagesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-05fix fstree listing parseDavid Oberhollenzer
- accept "nod" line as advertised, i.e. with space instead of colon - actually accept "sock" line (copy & paste fail) Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-05rdsquashfs: reorder unpack flags, add flag to produce listingDavid Oberhollenzer
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>
2019-05-05Print out what we are doing on the way and options to keep quietDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04rdsquashfs: malloc extraction buffers ahead of timeDavid Oberhollenzer
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>
2019-05-04rdsquashfs: more cleanupDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04cleanup: rdsquashfs: store global data in structureDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>