From patchwork Tue Dec 1 12:17:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 106792 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.9535.1796127466988460889 for ; Tue, 01 Dec 2026 04:17:47 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=ZYO0834z; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AA7481477 for ; Tue, 1 Dec 2026 04:17:43 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 327F63F86F for ; Tue, 1 Dec 2026 04:17:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796127466; bh=lPB7oV3swVhZ935/zR7iRaLZCaXZei4MfqgCIdVn91g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZYO0834zNYPfme1W1Ijm5y358l5SX0wftvHBc5BQC4eZh2QWuPd6QgJKw2unF57Lp 9P14PtxKddWen7vmSxRUfscDg0vX8jeCqMlDLz4x256kwSnmWggUtQliUDMplQzk8D vxOQr80um8RJ/zrUfvTR7IGfCIZ73QGZNCHpIp8I= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/8] classes/populate_sdk_base: use bsdtar instead of zip to create the .zip Date: Tue, 1 Dec 2026 12:17:36 +0000 Message-ID: <20261201121743.1889751-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261201121743.1889751-1-ross.burton@arm.com> References: <20261201121743.1889751-1-ross.burton@arm.com> MIME-Version: 1.0 X-ARM-No-Footer: NoDisclaimer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 12:17:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251724 Info-Zip was last released in 2008 and is both entirely unmaintained and accumulating CVEs. libarchive's 'bsdtar' can create zip files, so use that to create the zip file instead. We can remove the '-y' option which was used to store symlinks as links instead of another copy of the data, as this is the default behaviour with bsdtar. Signed-off-by: Ross Burton --- meta/classes-recipe/populate_sdk_base.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass index 35d2f203399..fa547ef7aaa 100644 --- a/meta/classes-recipe/populate_sdk_base.bbclass +++ b/meta/classes-recipe/populate_sdk_base.bbclass @@ -91,7 +91,7 @@ TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" SDK_ARCHIVE_TYPE ?= "tar.xz" SDK_XZ_COMPRESSION_LEVEL ?= "-9" SDK_XZ_OPTIONS ?= "${XZ_DEFAULTS} ${SDK_XZ_COMPRESSION_LEVEL}" -SDK_ZIP_OPTIONS ?= "-y" +SDK_ZIP_OPTIONS ?= "" SDK_7ZIP_OPTIONS ?= "-mx=9 -mm=BZip2" SDK_7ZIP_TYPE ?= "7z" SDK_ZSTD_COMPRESSION_LEVEL ?= "-17" @@ -99,10 +99,10 @@ SDK_ZSTD_COMPRESSION_LEVEL ?= "-17" # To support different sdk type according to SDK_ARCHIVE_TYPE, now support zip and tar.xz python () { if d.getVar('SDK_ARCHIVE_TYPE') == 'zip': - d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native') + d.setVar('SDK_ARCHIVE_DEPENDS', 'libarchive-native') # SDK_ARCHIVE_CMD used to generate archived sdk ${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR} # recommand to cd into input dir first to avoid archive with buildpath - d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDK_ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .') + d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; bsdtar -c --format zip ${SDK_ZIP_OPTIONS} -f ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .') elif d.getVar('SDK_ARCHIVE_TYPE') == '7zip': d.setVar('SDK_ARCHIVE_DEPENDS', '7zip-native') d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; 7za a -r ${SDK_7ZIP_OPTIONS} ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_7ZIP_TYPE} .')