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

Submitted by Peter Morrow on Sept. 14, 2020, 9:59 a.m. | Patch ID: 176479

Details

Message ID 1600077571-7368-1-git-send-email-pemorrow@linux.microsoft.com
State New
Headers show

Commit Message

Peter Morrow Sept. 14, 2020, 9:59 a.m.
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.

Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
---
 meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index b06951d..42fae28 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -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
 }

Comments

Andre McCurdy Sept. 14, 2020, 4:54 p.m.
On Mon, Sep 14, 2020 at 2:59 AM Peter Morrow
<pemorrow@linux.microsoft.com> wrote:
>
> 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.
>
> Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
> ---
>  meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
> index b06951d..42fae28 100644
> --- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
> +++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
> @@ -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.

>  do_compile() {
>         oe_runmake all
>  }
> --
> 1.8.3.1
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142545): https://lists.openembedded.org/g/openembedded-core/message/142545
Mute This Topic: https://lists.openembedded.org/mt/76838796/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-