From 71deb5b6d58cf100d0ee7cab23a464a1a5e2eae1 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Thu, 20 Nov 2025 21:29:27 +0100 Subject: [PATCH] tools/squashfs4: update to 4.7.4 Remove upstreamed patches: - 0001-mksquashfs-fix-build-for-big-endian-architectures.patch - 0002-gzip_wrapper-fix-byte-swapping-prototype.patch - 0003-mksquashfs-fix-regression-introduced-by-SEEK_DATA-op.patch Link: https://github.com/openwrt/openwrt/pull/20843 Signed-off-by: Nick Hainke --- tools/squashfs4/Makefile | 8 ++-- ...x-build-for-big-endian-architectures.patch | 29 ----------- ..._wrapper-fix-byte-swapping-prototype.patch | 20 -------- ...egression-introduced-by-SEEK_DATA-op.patch | 48 ------------------- 4 files changed, 4 insertions(+), 101 deletions(-) delete mode 100644 tools/squashfs4/patches/0001-mksquashfs-fix-build-for-big-endian-architectures.patch delete mode 100644 tools/squashfs4/patches/0002-gzip_wrapper-fix-byte-swapping-prototype.patch delete mode 100644 tools/squashfs4/patches/0003-mksquashfs-fix-regression-introduced-by-SEEK_DATA-op.patch diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile index d5612e298a..6b887353b6 100644 --- a/tools/squashfs4/Makefile +++ b/tools/squashfs4/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfs4 PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs -PKG_VERSION:=4.7.3 +PKG_VERSION:=4.7.4 PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools -PKG_SOURCE_DATE:=2025-11-06 -PKG_SOURCE_VERSION:=a143ab5534cc9ad4aededf1116fe37bcb1c8674d -PKG_MIRROR_HASH:=aafdeab814de1081882f858a0997d74e227081bf611fccd84e0d4990f9a51ec4 +PKG_SOURCE_DATE:=2025-11-10 +PKG_SOURCE_VERSION:=53e5a67aac42e0bc9ad4a249156d7d549ce7436c +PKG_MIRROR_HASH:=7ce390d95af4b7b4ce768cec18aeb9ac61b8ca413d0ced2c42a81446d9dd8690 HOST_BUILD_PARALLEL:=1 diff --git a/tools/squashfs4/patches/0001-mksquashfs-fix-build-for-big-endian-architectures.patch b/tools/squashfs4/patches/0001-mksquashfs-fix-build-for-big-endian-architectures.patch deleted file mode 100644 index a8efa7f3b4..0000000000 --- a/tools/squashfs4/patches/0001-mksquashfs-fix-build-for-big-endian-architectures.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 65222d06c0fa76bdbcbcb83831dd2195c19d990a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20N=C3=A9ri?= -Date: Fri, 7 Nov 2025 11:58:37 +0100 -Subject: [PATCH 1/2] mksquashfs: fix build for big-endian architectures - ---- - squashfs-tools/mksquashfs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -7313,7 +7313,7 @@ static int sqfstar(int argc, char *argv[ - - memset(&sblk, 0, sizeof(struct squashfs_super_block)); - sblk.s_magic = SQUASHFS_MAGIC_STREAMED; -- SQUASHFS_INSWAP_SUPER_BLOCK(sblk); -+ SQUASHFS_INSWAP_SUPER_BLOCK(&sblk); - write_destination(fd, SQUASHFS_START, - sizeof(struct squashfs_super_block), &sblk); - } -@@ -8600,7 +8600,7 @@ int main(int argc, char *argv[]) - - memset(&sblk, 0, sizeof(struct squashfs_super_block)); - sblk.s_magic = SQUASHFS_MAGIC_STREAMED; -- SQUASHFS_INSWAP_SUPER_BLOCK(sblk); -+ SQUASHFS_INSWAP_SUPER_BLOCK(&sblk); - write_destination(fd, SQUASHFS_START, - sizeof(struct squashfs_super_block), &sblk); - } diff --git a/tools/squashfs4/patches/0002-gzip_wrapper-fix-byte-swapping-prototype.patch b/tools/squashfs4/patches/0002-gzip_wrapper-fix-byte-swapping-prototype.patch deleted file mode 100644 index 0651634bea..0000000000 --- a/tools/squashfs4/patches/0002-gzip_wrapper-fix-byte-swapping-prototype.patch +++ /dev/null @@ -1,20 +0,0 @@ -From bc9e11acadd441371e51696f555db031625a9065 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20N=C3=A9ri?= -Date: Fri, 7 Nov 2025 11:58:37 +0100 -Subject: [PATCH 2/2] gzip_wrapper: fix byte swapping prototype - ---- - squashfs-tools/gzip_wrapper.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/squashfs-tools/gzip_wrapper.h -+++ b/squashfs-tools/gzip_wrapper.h -@@ -27,7 +27,7 @@ - #include "endian_compat.h" - - #if __BYTE_ORDER == __BIG_ENDIAN --extern unsigned int inswap_le16(unsigned short); -+extern unsigned short inswap_le16(unsigned short); - extern unsigned int inswap_le32(unsigned int); - - #define SQUASHFS_INSWAP_COMP_OPTS(s) { \ diff --git a/tools/squashfs4/patches/0003-mksquashfs-fix-regression-introduced-by-SEEK_DATA-op.patch b/tools/squashfs4/patches/0003-mksquashfs-fix-regression-introduced-by-SEEK_DATA-op.patch deleted file mode 100644 index 4baf0b5f50..0000000000 --- a/tools/squashfs4/patches/0003-mksquashfs-fix-regression-introduced-by-SEEK_DATA-op.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 02e51727923da21bd654ddf0ec8c006f751d86c9 Mon Sep 17 00:00:00 2001 -From: Phillip Lougher -Date: Fri, 7 Nov 2025 23:13:03 +0000 -Subject: [PATCH] mksquashfs: fix regression introduced by SEEK_DATA - optimisation - -The representation of a sparse block was changed from 0 to a negative -number. This was to optimise sparse buffer passing between threads, and -where a single buffer can now represent a multi-block sparse span. - -Unfortunately some code was not correctly updated, and this was not -picked up in testing. - -Fixes: https://github.com/plougher/squashfs-tools/issues/336 - -Signed-off-by: Phillip Lougher ---- - squashfs-tools/mksquashfs.c | 4 ++-- - squashfs-tools/process_fragments.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -2889,11 +2889,11 @@ static struct file_info *write_file_proc - sizeof(unsigned int)); - block_list[block ++] = read_buffer->c_byte; - if(!is_sparse(read_buffer)) { -- if(sparse_count(read_buffer) > 1) -- BAD_ERROR("Sparse block too large in write file process\n"); - file_bytes += read_buffer->size; - put_write_buffer_hash(read_buffer); - } else { -+ if(sparse_count(read_buffer) > 1) -+ BAD_ERROR("Sparse block too large in write file process\n"); - sparse += read_buffer->size; - gen_cache_block_put(read_buffer); - } ---- a/squashfs-tools/process_fragments.c -+++ b/squashfs-tools/process_fragments.c -@@ -285,7 +285,7 @@ void *frag_thrd(void *destination_file) - int res; - - if(sparse_files && sparse) { -- file_buffer->c_byte = 0; -+ set_sparse(file_buffer, 1); - file_buffer->fragment = FALSE; - } else - file_buffer->c_byte = file_buffer->size; -- 2.30.2