Skip to content

Commit 6443235

Browse files
DragonBluephauke
authored andcommitted
tools/squashfs4: update to 4.7.3
Release Note: https://github.com/plougher/squashfs-tools/releases/tag/4.7.3 The three backported patches fixed the regression and build issue on squashfs-tools v4.7.3. Signed-off-by: Shiji Yang <[email protected]> Link: openwrt/openwrt#20683 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 1f1db75 commit 6443235

File tree

4 files changed

+101
-4
lines changed

4 files changed

+101
-4
lines changed

tools/squashfs4/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk
88

99
PKG_NAME:=squashfs4
1010
PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
11-
PKG_VERSION:=4.7.2
11+
PKG_VERSION:=4.7.3
1212
PKG_RELEASE=1
1313

1414
PKG_SOURCE_PROTO:=git
1515
PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
16-
PKG_SOURCE_DATE:=2025-08-19
17-
PKG_SOURCE_VERSION:=99d23a31b471433c51e9c145aeba2ab1536e34df
18-
PKG_MIRROR_HASH:=229a1b8f465fa0f576b5ace1753a8e9d28a2c4254ec2b019668baa676094f6c3
16+
PKG_SOURCE_DATE:=2025-11-06
17+
PKG_SOURCE_VERSION:=a143ab5534cc9ad4aededf1116fe37bcb1c8674d
18+
PKG_MIRROR_HASH:=aafdeab814de1081882f858a0997d74e227081bf611fccd84e0d4990f9a51ec4
1919

2020
HOST_BUILD_PARALLEL:=1
2121

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 65222d06c0fa76bdbcbcb83831dd2195c19d990a Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Daniel=20N=C3=A9ri?= <[email protected]>
3+
Date: Fri, 7 Nov 2025 11:58:37 +0100
4+
Subject: [PATCH 1/2] mksquashfs: fix build for big-endian architectures
5+
6+
---
7+
squashfs-tools/mksquashfs.c | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
--- a/squashfs-tools/mksquashfs.c
11+
+++ b/squashfs-tools/mksquashfs.c
12+
@@ -7313,7 +7313,7 @@ static int sqfstar(int argc, char *argv[
13+
14+
memset(&sblk, 0, sizeof(struct squashfs_super_block));
15+
sblk.s_magic = SQUASHFS_MAGIC_STREAMED;
16+
- SQUASHFS_INSWAP_SUPER_BLOCK(sblk);
17+
+ SQUASHFS_INSWAP_SUPER_BLOCK(&sblk);
18+
write_destination(fd, SQUASHFS_START,
19+
sizeof(struct squashfs_super_block), &sblk);
20+
}
21+
@@ -8600,7 +8600,7 @@ int main(int argc, char *argv[])
22+
23+
memset(&sblk, 0, sizeof(struct squashfs_super_block));
24+
sblk.s_magic = SQUASHFS_MAGIC_STREAMED;
25+
- SQUASHFS_INSWAP_SUPER_BLOCK(sblk);
26+
+ SQUASHFS_INSWAP_SUPER_BLOCK(&sblk);
27+
write_destination(fd, SQUASHFS_START,
28+
sizeof(struct squashfs_super_block), &sblk);
29+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
From bc9e11acadd441371e51696f555db031625a9065 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Daniel=20N=C3=A9ri?= <[email protected]>
3+
Date: Fri, 7 Nov 2025 11:58:37 +0100
4+
Subject: [PATCH 2/2] gzip_wrapper: fix byte swapping prototype
5+
6+
---
7+
squashfs-tools/gzip_wrapper.h | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
--- a/squashfs-tools/gzip_wrapper.h
11+
+++ b/squashfs-tools/gzip_wrapper.h
12+
@@ -27,7 +27,7 @@
13+
#include "endian_compat.h"
14+
15+
#if __BYTE_ORDER == __BIG_ENDIAN
16+
-extern unsigned int inswap_le16(unsigned short);
17+
+extern unsigned short inswap_le16(unsigned short);
18+
extern unsigned int inswap_le32(unsigned int);
19+
20+
#define SQUASHFS_INSWAP_COMP_OPTS(s) { \
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From 02e51727923da21bd654ddf0ec8c006f751d86c9 Mon Sep 17 00:00:00 2001
2+
From: Phillip Lougher <[email protected]>
3+
Date: Fri, 7 Nov 2025 23:13:03 +0000
4+
Subject: [PATCH] mksquashfs: fix regression introduced by SEEK_DATA
5+
optimisation
6+
7+
The representation of a sparse block was changed from 0 to a negative
8+
number. This was to optimise sparse buffer passing between threads, and
9+
where a single buffer can now represent a multi-block sparse span.
10+
11+
Unfortunately some code was not correctly updated, and this was not
12+
picked up in testing.
13+
14+
Fixes: https://github.com/plougher/squashfs-tools/issues/336
15+
16+
Signed-off-by: Phillip Lougher <[email protected]>
17+
---
18+
squashfs-tools/mksquashfs.c | 4 ++--
19+
squashfs-tools/process_fragments.c | 2 +-
20+
2 files changed, 3 insertions(+), 3 deletions(-)
21+
22+
--- a/squashfs-tools/mksquashfs.c
23+
+++ b/squashfs-tools/mksquashfs.c
24+
@@ -2889,11 +2889,11 @@ static struct file_info *write_file_proc
25+
sizeof(unsigned int));
26+
block_list[block ++] = read_buffer->c_byte;
27+
if(!is_sparse(read_buffer)) {
28+
- if(sparse_count(read_buffer) > 1)
29+
- BAD_ERROR("Sparse block too large in write file process\n");
30+
file_bytes += read_buffer->size;
31+
put_write_buffer_hash(read_buffer);
32+
} else {
33+
+ if(sparse_count(read_buffer) > 1)
34+
+ BAD_ERROR("Sparse block too large in write file process\n");
35+
sparse += read_buffer->size;
36+
gen_cache_block_put(read_buffer);
37+
}
38+
--- a/squashfs-tools/process_fragments.c
39+
+++ b/squashfs-tools/process_fragments.c
40+
@@ -285,7 +285,7 @@ void *frag_thrd(void *destination_file)
41+
int res;
42+
43+
if(sparse_files && sparse) {
44+
- file_buffer->c_byte = 0;
45+
+ set_sparse(file_buffer, 1);
46+
file_buffer->fragment = FALSE;
47+
} else
48+
file_buffer->c_byte = file_buffer->size;

0 commit comments

Comments
 (0)