Skip to contentSkip to conversation

squashfs-tools: Allow COMP_DEFAULT to be changed easily at build time

PATCH In review Peter Morrow 2 participants 2 messages Sep 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 squashfs-tools: Allow COMP_DEFAULT to be changed easily at build time

The default compression algorithm is currently gzip, this patch allows the default to be changed by setting SQUASHFS_TOOLS_COMP_DEFAULT to a valid compression algorithm.

---
 meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +3 -0
index b06951d..42fae28 100644
@@ -25,6 +25,9 @@ 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,"
 
+SQUASHFS_TOOLS_COMP_DEFAULT ?= "gzip"
+EXTRA_OEMAKE += "COMP_DEFAULT=${SQUASHFS_TOOLS_COMP_DEFAULT}"
+
 do_compile() {
 	oe_runmake all
 }
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 15 lines · Peter Morrow

The default compression algorithm is currently gzip, this patch allows the default to be changed by setting SQUASHFS_TOOLS_COMP_DEFAULT to a valid compression algorithm.

---
 meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +0 -0
index b06951d..42fae28 100644

meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr" · line 29

Quoted 5 lines
meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +2 -0
@@ -25,6 +25,9 @@ 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,"
 
+SQUASHFS_TOOLS_COMP_DEFAULT ?= "gzip"
+EXTRA_OEMAKE += "COMP_DEFAULT=${SQUASHFS_TOOLS_COMP_DEFAULT}"

Since you can easily override COMP_DEFAULT by setting EXTRA_OEMAKE from a .bbappend, I don't think it's necessary to add this to the main recipe.

Quoted 7 lines
meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +0 -1
 do_compile() {
        oe_runmake all
 }
--

1.8.3.1