squashfs-tools: bump to version 4.7
authorAlexandru Ardelean <[email protected]>
Thu, 7 Aug 2025 08:53:01 +0000 (11:53 +0300)
committerAlexandru Ardelean <[email protected]>
Thu, 14 Aug 2025 12:09:43 +0000 (15:09 +0300)
This updates squashfs-tools to version 4.7

Tweaked build option flags.

Need to backport patch from upstream to fix compiler error for pid_t type.

Signed-off-by: Alexandru Ardelean <[email protected]>
utils/squashfs-tools/Config.in
utils/squashfs-tools/Makefile
utils/squashfs-tools/patches/0001-print_pager-add-missing-includes.patch [new file with mode: 0644]

index b0d6b4c62b863c86260e442dfbcd7e364039d1c0..e76e5ea28289cb44371a7b825b51fe37a8db646d 100644 (file)
@@ -1,3 +1,9 @@
+config SQUASHFS_TOOLS_GZIP_SUPPORT
+       depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+       bool "Enable GZIP support"
+       select PACKAGE_zlib
+       default y
+
 config SQUASHFS_TOOLS_LZO_SUPPORT
        depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
        bool "Enable LZO support"
@@ -16,6 +22,11 @@ config SQUASHFS_TOOLS_XZ_SUPPORT
        select PACKAGE_liblzma
        default y
 
+config SQUASHFS_TOOLS_XZ_EXTENDED_SUPPORT
+       depends on SQUASHFS_TOOLS_XZ_SUPPORT
+       bool "Enable XZ extended support"
+       default y
+
 config SQUASHFS_TOOLS_ZSTD_SUPPORT
        depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
        bool "Enable ZSTD support"
index 8a8b72b2f0477b78073f52652befb0d5856a2324..56db9bf0264e0d2b3bdbccf22bdbfbe450ac26e3 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squashfs-tools
-PKG_VERSION:=4.6.1
+PKG_VERSION:=4.7
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0-only
@@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:squashfs-tools_project:squashfs-tools
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/plougher/squashfs-tools/tar.gz/${PKG_VERSION}?
-PKG_HASH:=94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c
+PKG_HASH:=f1605ef720aa0b23939a49ef4491f6e734333ccc4bda4324d330da647e105328
 
 PKG_BUILD_PARALLEL:=1
 include $(INCLUDE_DIR)/package.mk
@@ -29,7 +29,8 @@ define Package/squashfs-tools/Default
   SUBMENU:=Filesystem
   TITLE:=Tools to create and extract Squashfs filesystems
   URL:=https://github.com/plougher/squashfs-tools
-  DEPENDS += +libpthread +zlib \
+  DEPENDS += +libpthread \
+       +SQUASHFS_TOOLS_GZIP_SUPPORT:zlib \
        +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \
        +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \
        +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma \
@@ -52,21 +53,16 @@ endef
 
 Build/Configure:=
 
-ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
-MAKE_FLAGS += XZ_SUPPORT=1
-endif
-
-ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
-MAKE_FLAGS += LZO_SUPPORT=1
-endif
-
-ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),)
-MAKE_FLAGS += LZ4_SUPPORT=1
-endif
-
-ifneq ($(CONFIG_SQUASHFS_TOOLS_ZSTD_SUPPORT),)
-MAKE_FLAGS += ZSTD_SUPPORT=1
-endif
+MAKE_FLAGS += \
+       CONFIG=1 \
+       SMALL_READER_THREADS=4 \
+       BLOCK_READER_THREADS=4 \
+       GZIP_SUPPORT=$(if $(CONFIG_SQUASHFS_TOOLS_GZIP_SUPPORT),1,0) \
+       XZ_SUPPORT=$(if $(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),1,0) \
+       XZ_EXTENDED_OPTIONS=$(if $(CONFIG_SQUASHFS_TOOLS_XZ_EXTENDED_SUPPORT),1,0) \
+       LZO_SUPPORT=$(if $(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),1,0) \
+       LZ4_SUPPORT=$(if $(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),1,0) \
+       ZSTD_SUPPORT=$(if $(CONFIG_SQUASHFS_TOOLS_ZSTD_SUPPORT),1,0) \
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
diff --git a/utils/squashfs-tools/patches/0001-print_pager-add-missing-includes.patch b/utils/squashfs-tools/patches/0001-print_pager-add-missing-includes.patch
new file mode 100644 (file)
index 0000000..4e29c1e
--- /dev/null
@@ -0,0 +1,34 @@
+From 05a895b3f996d1ac157d95b04980f5f047e7dbf7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Fri, 6 Jun 2025 15:23:07 +0100
+Subject: [PATCH] print_pager: add missing includes
+
+When building with musl:
+
+  print_pager.h:33:25: error: unknown type name 'pid_t'
+     33 | extern void wait_to_die(pid_t process);
+        |                         ^~~~~
+  print_pager.h:34:25: error: unknown type name 'pid_t'
+     34 | extern FILE *exec_pager(pid_t *process);
+        |                         ^~~~~
+
+print_pager.h uses pid_t and FILE, so add the required #includes to
+ensure that these are defined.
+
+Signed-off-by: Ross Burton <[email protected]>
+---
+ squashfs-tools/print_pager.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/squashfs-tools/print_pager.h
++++ b/squashfs-tools/print_pager.h
+@@ -30,6 +30,9 @@
+ #define MORE_PAGER 2
+ #define UNKNOWN_PAGER 3
++#include <stdio.h>
++#include <sys/types.h>
++
+ extern void wait_to_die(pid_t process);
+ extern FILE *exec_pager(pid_t *process);
+ extern int get_column_width();