From 215ab5fedf78ca2d72408ddaaf264e46c37b22da Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 27 Dec 2023 17:55:49 +0100 Subject: [PATCH] libarchive: remove more unneeded packageconfigs to reduce recovery image size We depend on libarchive so that swupdate can perform updates with .tar.gz files, but by default, libarchive is configured to support a lot of additional features that pull in even more dependencies. This increases the size of the recovery image, which barely fits on platforms with limited internal storage like the ccimx6ul. We already removed zstd support to mitigate this, but the image size increased again after adding imx-kobs to it in commit aa2480d1de9c22d982f5a958b4cadf621ba5f9fb. Since libarchive isn't used by any other package in our system, remove the configurations that bloat the recovery image and are not needed at all for our file update use case. Note that removing the "lzo" packageconfig doesn't remove its respective library from the image because mtd-utils also depends on it, but it still reduces the size of libarchive. On the ccimx6ul, this removes 193 KiB worth of libraries and trims libarchive down by 20.5 KiB in the recovery image. https://onedigi.atlassian.net/browse/DEL-8819 Signed-off-by: Gabriel Valcazar --- meta-digi-dey/conf/distro/dey.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index 5f28ef0ce..76e970d23 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -85,7 +85,9 @@ PACKAGECONFIG:append:class-target:pn-qtbase = " examples" PACKAGECONFIG:append:class-target:pn-qtdeclarative = " examples" PACKAGECONFIG:append:class-target:pn-qtquick3d = " examples" PACKAGECONFIG:append:class-target:pn-qtwebengine = " examples" -# libarchive is using "zstd" in its package config. -# This is not used in the swupdate that is the only consumer of the libarchive package. -# Remove it to reduce the size of the recovery image. -PACKAGECONFIG:remove:class-target:pn-libarchive = " zstd" + +# Remove unnecessary libarchive configurations to trim down the recovery image, +# while keeping the "zlib" one to make sure our file update mechanism still +# works (libarchive needs to be able to handle .tar.gz files, every other +# format can be omitted). +PACKAGECONFIG:remove:class-target:pn-libarchive = "bz2 xz lzo zstd acl xattr"