diff mbox series

[v3,09/16] squashfs-tools: update to 4.7

Message ID 20250606142822.3387675-9-ross.burton@arm.com
State New
Headers show
Series [v3,01/16] libmodulemd: put version in recipe filename | expand

Commit Message

Ross Burton June 6, 2025, 2:28 p.m. UTC
The REPRODUCIBLE_DEFAULT option was removed in 4.7[1].

Backport a patch to fix missing pthread typedefs, and a patch to fix
missing pid_t typedefs.

Also clean up the tasks to be neater and more concise.

[1] squash-tools ae9914d15293af7c596148aedd997b3058e35d9e

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../squashfs-tools/squashfs-tools/pid.patch   | 40 +++++++++++++++++++
 .../squashfs-tools/thread.patch               | 33 +++++++++++++++
 ...s-tools_4.6.1.bb => squashfs-tools_4.7.bb} | 15 ++++---
 3 files changed, 80 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch
 create mode 100644 meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch
 rename meta/recipes-devtools/squashfs-tools/{squashfs-tools_4.6.1.bb => squashfs-tools_4.7.bb} (77%)

Comments

Richard Purdie June 6, 2025, 9:43 p.m. UTC | #1
On Fri, 2025-06-06 at 15:28 +0100, Ross Burton via lists.openembedded.org wrote:
> The REPRODUCIBLE_DEFAULT option was removed in 4.7[1].
> 
> Backport a patch to fix missing pthread typedefs, and a patch to fix
> missing pid_t typedefs.
> 
> Also clean up the tasks to be neater and more concise.
> 
> [1] squash-tools ae9914d15293af7c596148aedd997b3058e35d9e
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  .../squashfs-tools/squashfs-tools/pid.patch   | 40 +++++++++++++++++++
>  .../squashfs-tools/thread.patch               | 33 +++++++++++++++
>  ...s-tools_4.6.1.bb => squashfs-tools_4.7.bb} | 15 ++++---
>  3 files changed, 80 insertions(+), 8 deletions(-)
>  create mode 100644 meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch
>  create mode 100644 meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch
>  rename meta/recipes-devtools/squashfs-tools/{squashfs-tools_4.6.1.bb => squashfs-tools_4.7.bb} (77%)
> 
> diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch
> new file mode 100644
> index 00000000000..a15b6211248
> --- /dev/null
> +++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch
> @@ -0,0 +1,40 @@
> +From 05a895b3f996d1ac157d95b04980f5f047e7dbf7 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@arm.com>
> +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.
> +
> +Upstream-Status: Submitted [https://github.com/plougher/squashfs-tools/pull/314]
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> +---
> + squashfs-tools/print_pager.h | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +diff --git a/squashfs-tools/print_pager.h b/squashfs-tools/print_pager.h
> +index c33d4d2e..f3e0da6c 100644
> +--- 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();
> +-- 
> +2.43.0
> +
> diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch
> new file mode 100644
> index 00000000000..01741639c03
> --- /dev/null
> +++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch
> @@ -0,0 +1,33 @@
> +From b6e9f4b62cc3e762ceeddc0fc099f7d65f7b7361 Mon Sep 17 00:00:00 2001
> +From: Shiji Yang <yangshiji66@outlook.com>
> +Date: Wed, 4 Jun 2025 19:53:39 +0800
> +Subject: [PATCH] thread: add the missing pthread.h header
> +
> +Fix build error on macos:
> +
> +In file included from mksquashfs_help.c:35:
> +./thread.h:46:39: error: unknown type name 'pthread_mutex_t'; did you mean 'pthread_attr_t'?
> +   46 | extern void wait_thread_idle(int tid, pthread_mutex_t *mutex);
> +      |                                       ^~~~~~~~~~~~~~~
> +      |                                       pthread_attr_t
> +
> +Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
> +
> +Upstream-Status: Backport [b6e9f4b62cc3e762ceeddc0fc099f7d65f7b7361]
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> +---
> + squashfs-tools/thread.h | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/squashfs-tools/thread.h b/squashfs-tools/thread.h
> +index 5a22fc43..e56a58cf 100644
> +--- a/squashfs-tools/thread.h
> ++++ b/squashfs-tools/thread.h
> +@@ -22,6 +22,7 @@
> +  *
> +  * thread.h
> +  */
> ++#include <pthread.h>
> + 
> + #define TRUE 1
> + #define FALSE 0
> diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.6.1.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.7.bb
> similarity index 77%
> rename from meta/recipes-devtools/squashfs-tools/squashfs-tools_4.6.1.bb
> rename to meta/recipes-devtools/squashfs-tools/squashfs-tools_4.7.bb
> index 51a2fbdb934..ae6845ddacf 100644
> --- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.6.1.bb
> +++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.7.bb
> @@ -7,8 +7,9 @@ SECTION = "base"
>  LICENSE = "GPL-2.0-only"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
>  
> -SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https;branch=v6.1.1"
> -SRCREV = "d8cb82d9840330f9344ec37b992595b5d7b44184"
> +SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https;branch=master;tag=${PV} \
> +	       file://thread.patch"
> +SRCREV = "2e87d42ed089dc31990d83eeb07437b9d085d6d1"
>  
>  UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
>  
> @@ -16,7 +17,7 @@ S = "${WORKDIR}/git"
>  
>  EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}"
>  
> -PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr zstd reproducible"
> +PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr zstd"
>  PACKAGECONFIG[gzip] = "GZIP_SUPPORT=1,GZIP_SUPPORT=0,zlib"
>  PACKAGECONFIG[xz] = "XZ_SUPPORT=1,XZ_SUPPORT=0,xz"
>  PACKAGECONFIG[lzo] = "LZO_SUPPORT=1,LZO_SUPPORT=0,lzo"
> @@ -24,17 +25,15 @@ PACKAGECONFIG[lz4] = "LZ4_SUPPORT=1,LZ4_SUPPORT=0,lz4"
>  PACKAGECONFIG[lzma] = "LZMA_XZ_SUPPORT=1,LZMA_XZ_SUPPORT=0,xz"
>  PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr"
>  PACKAGECONFIG[zstd] = "ZSTD_SUPPORT=1,ZSTD_SUPPORT=0,zstd"
> -PACKAGECONFIG[reproducible] = "REPRODUCIBLE_DEFAULT=1,REPRODUCIBLE_DEFAULT=0,"
>  
>  do_compile() {
> -        cd ${S}/squashfs-tools
> -	oe_runmake all
> +	oe_runmake -C ${S}/squashfs-tools all
>  }
>  
>  do_install() {
> -        cd ${S}/squashfs-tools
> +	oe_runmake -C ${S}/squashfs-tools install INSTALL_PREFIX=${D}${prefix} INSTALL_MANPAGES_DIR=${D}${datadir}/man/man1
> +
>  	install -d "${D}${includedir}"
> -	oe_runmake install INSTALL_PREFIX=${D}${prefix} INSTALL_MANPAGES_DIR=${D}${datadir}/man/man1
>  	install -m 0644 "${S}"/squashfs-tools/squashfs_fs.h "${D}${includedir}"
>  }
>  

https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/537

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch
new file mode 100644
index 00000000000..a15b6211248
--- /dev/null
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/pid.patch
@@ -0,0 +1,40 @@ 
+From 05a895b3f996d1ac157d95b04980f5f047e7dbf7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+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.
+
+Upstream-Status: Submitted [https://github.com/plougher/squashfs-tools/pull/314]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ squashfs-tools/print_pager.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/squashfs-tools/print_pager.h b/squashfs-tools/print_pager.h
+index c33d4d2e..f3e0da6c 100644
+--- 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();
+-- 
+2.43.0
+
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch
new file mode 100644
index 00000000000..01741639c03
--- /dev/null
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/thread.patch
@@ -0,0 +1,33 @@ 
+From b6e9f4b62cc3e762ceeddc0fc099f7d65f7b7361 Mon Sep 17 00:00:00 2001
+From: Shiji Yang <yangshiji66@outlook.com>
+Date: Wed, 4 Jun 2025 19:53:39 +0800
+Subject: [PATCH] thread: add the missing pthread.h header
+
+Fix build error on macos:
+
+In file included from mksquashfs_help.c:35:
+./thread.h:46:39: error: unknown type name 'pthread_mutex_t'; did you mean 'pthread_attr_t'?
+   46 | extern void wait_thread_idle(int tid, pthread_mutex_t *mutex);
+      |                                       ^~~~~~~~~~~~~~~
+      |                                       pthread_attr_t
+
+Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
+
+Upstream-Status: Backport [b6e9f4b62cc3e762ceeddc0fc099f7d65f7b7361]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ squashfs-tools/thread.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/squashfs-tools/thread.h b/squashfs-tools/thread.h
+index 5a22fc43..e56a58cf 100644
+--- a/squashfs-tools/thread.h
++++ b/squashfs-tools/thread.h
+@@ -22,6 +22,7 @@
+  *
+  * thread.h
+  */
++#include <pthread.h>
+ 
+ #define TRUE 1
+ #define FALSE 0
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.6.1.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.7.bb
similarity index 77%
rename from meta/recipes-devtools/squashfs-tools/squashfs-tools_4.6.1.bb
rename to meta/recipes-devtools/squashfs-tools/squashfs-tools_4.7.bb
index 51a2fbdb934..ae6845ddacf 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.6.1.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.7.bb
@@ -7,8 +7,9 @@  SECTION = "base"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https;branch=v6.1.1"
-SRCREV = "d8cb82d9840330f9344ec37b992595b5d7b44184"
+SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https;branch=master;tag=${PV} \
+	       file://thread.patch"
+SRCREV = "2e87d42ed089dc31990d83eeb07437b9d085d6d1"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
 
@@ -16,7 +17,7 @@  S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}"
 
-PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr zstd reproducible"
+PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr zstd"
 PACKAGECONFIG[gzip] = "GZIP_SUPPORT=1,GZIP_SUPPORT=0,zlib"
 PACKAGECONFIG[xz] = "XZ_SUPPORT=1,XZ_SUPPORT=0,xz"
 PACKAGECONFIG[lzo] = "LZO_SUPPORT=1,LZO_SUPPORT=0,lzo"
@@ -24,17 +25,15 @@  PACKAGECONFIG[lz4] = "LZ4_SUPPORT=1,LZ4_SUPPORT=0,lz4"
 PACKAGECONFIG[lzma] = "LZMA_XZ_SUPPORT=1,LZMA_XZ_SUPPORT=0,xz"
 PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr"
 PACKAGECONFIG[zstd] = "ZSTD_SUPPORT=1,ZSTD_SUPPORT=0,zstd"
-PACKAGECONFIG[reproducible] = "REPRODUCIBLE_DEFAULT=1,REPRODUCIBLE_DEFAULT=0,"
 
 do_compile() {
-        cd ${S}/squashfs-tools
-	oe_runmake all
+	oe_runmake -C ${S}/squashfs-tools all
 }
 
 do_install() {
-        cd ${S}/squashfs-tools
+	oe_runmake -C ${S}/squashfs-tools install INSTALL_PREFIX=${D}${prefix} INSTALL_MANPAGES_DIR=${D}${datadir}/man/man1
+
 	install -d "${D}${includedir}"
-	oe_runmake install INSTALL_PREFIX=${D}${prefix} INSTALL_MANPAGES_DIR=${D}${datadir}/man/man1
 	install -m 0644 "${S}"/squashfs-tools/squashfs_fs.h "${D}${includedir}"
 }