devttys0 / sasquatch

501 stars 155 forks source link

The patch doesn't apply to squashfs-tools-4.4 #33

Open morfikov opened 4 years ago

morfikov commented 4 years ago

Is there any chance to fix the patch so it would be applied to squashfs-tools-4.4 ?

hardfalcon commented 3 years ago

One of the issues that would need to be solved for this is the conflicting compression algorithm identifiers in squashfs-tools/squashfs_fs.h.

sasquatch 4.3:

#define LZ4_COMPRESSION     5
// CJH: Added #defines for additional decompressors
#define LZMA_WRT_COMPRESSION        6
#define LZMA_ADAPTIVE_COMPRESSION   7
#define LZMA_ALT_COMPRESSION        8

squashfs-tools 4.4:

#define LZ4_COMPRESSION     5
#define ZSTD_COMPRESSION    6

You'd probably either have to try to remove zstd support from squashfs-tools 4.4 by reverting commit 6113361316, or (preferably) introduce additional code that allows end-users to switch between supporting lzma_wrt and zstd at runtime.

cole-h commented 3 years ago

I tried my hand at updating the patch in https://github.com/devttys0/sasquatch/pull/40. WRT to the #define LZMA_* stuff, I just adjusted the index by 1 -- is there any obvious reason why this wouldn't be satisfactory? e.g. would it break interacting with squashfs-tools-4.3 stuff? (I'm wholly unfamiliar with this patch.)