From patchwork Thu May 21 12:58:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 88584 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E91ECD5BB4 for ; Thu, 21 May 2026 12:58:49 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.35794.1779368323114933293 for ; Thu, 21 May 2026 05:58:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=gblz/55y; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 764EC1A365D; Thu, 21 May 2026 12:58:41 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4C6D360495; Thu, 21 May 2026 12:58:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 33E33107E8B86; Thu, 21 May 2026 14:58:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1779368320; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=pzCpfCoSryro31BaigR4AUbv1wjwJ4RHTzb2iodmqd0=; b=gblz/55yQaKT52A8JbBTHGJYXBEoTXuON9At1DsABooikq9HapD3hLs9YzeEDVsa5fZCNh RDztaFvXViH169GwyDR+59sr71ZGKcn6OfvuztMn+hYrA1RwlgtD7Kp9qa7laBai1GPzUu 1XoR4C5RpRu7d8u6ui18qmf2kE06Oz5DospUu5Bvf0N7OIkplZS+lRe4yVLQsf9rhW7xpO l8bVHUEwj946pisnFEXycAvOd4H3vXxIobhUbntwvudyk/jnoutAcZJflJJdHAsTNghhlX wdWokG/dOG1Vt9sMbOvYeWg6QFXaaO8iuVRQdHbK9ZgZkEB+7+9G4xxznfu0VQ== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, Ross.Burton@arm.com, alex.kanavin@gmail.com, paul@pbarker.dev, richard.purdie@linuxfoundation.org, =?utf-8?q?Jo=C3=A3o_M?= =?utf-8?q?arcos_Costa?= Subject: [PATCH v2 1/5] vim: introduce vim-sources.inc file Date: Thu, 21 May 2026 14:58:24 +0200 Message-ID: <20260521125828.718050-2-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> References: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 21 May 2026 12:58:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/237508 This include file contains source-related settings that should be common for any recipes whose sources belong into Vim's source code. The first example is xxd, which will be introduced in a follow-up commit. Signed-off-by: João Marcos Costa --- meta/recipes-support/vim/vim-sources.inc | 9 +++++++++ meta/recipes-support/vim/vim.inc | 14 +------------- meta/recipes-support/vim/vim_9.2.bb | 5 +++++ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 meta/recipes-support/vim/vim-sources.inc diff --git a/meta/recipes-support/vim/vim-sources.inc b/meta/recipes-support/vim/vim-sources.inc new file mode 100644 index 0000000000..19d3b2d15b --- /dev/null +++ b/meta/recipes-support/vim/vim-sources.inc @@ -0,0 +1,9 @@ +SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https;tag=v${PV}" + +PV .= ".0340" +SRCREV = "6addd6c101117706bc9b3609d3a418e26e92618f" + +# Do not consider .z in x.y.z, as that is updated with every commit +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+)\.0" +# Ignore that the upstream version .z in x.y.z is always newer +UPSTREAM_VERSION_UNKNOWN = "1" diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc index 6e0058b13e..190953b9dd 100644 --- a/meta/recipes-support/vim/vim.inc +++ b/meta/recipes-support/vim/vim.inc @@ -12,19 +12,7 @@ RSUGGESTS:${PN} = "diffutils" LICENSE = "Vim" LIC_FILES_CHKSUM = "file://LICENSE;md5=d1a651ab770b45d41c0f8cb5a8ca930e" -SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https;tag=v${PV} \ - file://disable_acl_header_check.patch \ - file://0001-src-Makefile-improve-reproducibility.patch \ - file://no-path-adjust.patch \ - " - -PV .= ".0340" -SRCREV = "6addd6c101117706bc9b3609d3a418e26e92618f" - -# Do not consider .z in x.y.z, as that is updated with every commit -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+)\.0" -# Ignore that the upstream version .z in x.y.z is always newer -UPSTREAM_VERSION_UNKNOWN = "1" +require vim-sources.inc VIMDIR = "vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}" diff --git a/meta/recipes-support/vim/vim_9.2.bb b/meta/recipes-support/vim/vim_9.2.bb index fee9f055e9..59de224aac 100644 --- a/meta/recipes-support/vim/vim_9.2.bb +++ b/meta/recipes-support/vim/vim_9.2.bb @@ -1,5 +1,10 @@ require vim.inc +SRC_URI += "file://disable_acl_header_check.patch \ + file://0001-src-Makefile-improve-reproducibility.patch \ + file://no-path-adjust.patch \ +" + PROVIDES = "xxd" RDEPENDS:${PN} = "ncurses-terminfo-base ${PN}-xxd" From patchwork Thu May 21 12:58:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 88583 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80DCCCD5BAC for ; Thu, 21 May 2026 12:58:49 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.35795.1779368325093595048 for ; Thu, 21 May 2026 05:58:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=smEAZacz; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 02349C2C64F; Thu, 21 May 2026 12:59:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id DBF8D60495; Thu, 21 May 2026 12:58:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A24C5107E8B85; Thu, 21 May 2026 14:58:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1779368322; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=pp6/gPr+goLNLEg57cDdpBzM7Z53WJafWFM+tJ9WsfQ=; b=smEAZaczr74rEDYK0CXYAZLDId4gh7qCsm1SycwhHeUm0gXQwRCapE/gedGMw8zsW7oXYZ AlKjJaYeUkpj0xlvPdjLGwHVNHdSv6pjE0sX073UMrAEWlPeGNNyxab9epd21SlEdznBFl fgYddZnOC92EhFYCjZQbN+tMI0A9cXxqEOSiha+ufi0c1o5FHxziRO1LSxi3HJdF/n73oi j6oPsTWqW0lSrOKAUNglua1Xr7kipMptyv6zq0YLX3N4D66hNjk0l569vrGAly9bnhsezf crtyuPppJEamzqCObXbXR77bsw77KT4OPfaYo1Coy19NmQSg/bM6XqqBTW0/3Q== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, Ross.Burton@arm.com, alex.kanavin@gmail.com, paul@pbarker.dev, richard.purdie@linuxfoundation.org, =?utf-8?q?Jo=C3=A3o_M?= =?utf-8?q?arcos_Costa?= Subject: [PATCH v2 2/5] vim-xxd: introduce new recipe for xxd Date: Thu, 21 May 2026 14:58:25 +0200 Message-ID: <20260521125828.718050-3-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> References: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 21 May 2026 12:58:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/237509 This new recipe's main purpose is to handle xxd in the simplest way possible, stripping it from any needless tasks and/or dependencies that come from the fact it was originally provided by the same recipe as Vim. Not only this recipe is faster to build, but it still provides the very same program for both build-time and run-time, so there should be no migration needed by the recipes depend on xxd. Signed-off-by: João Marcos Costa --- meta/conf/distro/include/maintainers.inc | 1 + meta/recipes-support/vim/vim-xxd_9.2.bb | 35 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-support/vim/vim-xxd_9.2.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 24c5a9d712..dbb53c392c 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -869,6 +869,7 @@ RECIPE_MAINTAINER:pn-vala = "Unassigned " RECIPE_MAINTAINER:pn-valgrind = "Mingli Yu " RECIPE_MAINTAINER:pn-vim = "Unassigned " RECIPE_MAINTAINER:pn-vim-tiny = "Unassigned " +RECIPE_MAINTAINER:pn-vim-xxd = "João Marcos Costa " RECIPE_MAINTAINER:pn-virglrenderer = "Unassigned " RECIPE_MAINTAINER:pn-volatile-binds = "Chen Qi " RECIPE_MAINTAINER:pn-vte = "Unassigned " diff --git a/meta/recipes-support/vim/vim-xxd_9.2.bb b/meta/recipes-support/vim/vim-xxd_9.2.bb new file mode 100644 index 0000000000..5cfacbcea6 --- /dev/null +++ b/meta/recipes-support/vim/vim-xxd_9.2.bb @@ -0,0 +1,35 @@ +SUMMARY = "Hex dump and reverse utility from the Vim source tree" +DESCRIPTION = "xxd is a small utility usually distributed with Vim that creates hex dumps from binary data and can also convert hex dumps back to their original form." +SECTION = "console/utils" +HOMEPAGE = "https://www.vim.org/" +BUGTRACKER = "https://github.com/vim/vim/issues" + +LICENSE = "X11 | GPL-2.0-only" +LIC_FILES_CHKSUM = "\ + file://${COMMON_LICENSE_DIR}/X11;md5=87f08485cf6ba3c63a00eda8ecba7f1d \ + file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ +" + +require vim-sources.inc + +inherit update-alternatives + +PROVIDES += "xxd" + +do_compile() { + cd ${S}/src/xxd; + oe_runmake xxd +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 src/xxd/xxd ${D}${bindir} +} + +RPROVIDES:${PN} += "xxd" + +ALTERNATIVE:${PN} = "xxd" +ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd" +ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" + +BBCLASSEXTEND = "native nativesdk" From patchwork Thu May 21 12:58:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 88582 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F3D2CD5BB1 for ; Thu, 21 May 2026 12:58:49 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.35640.1779368325843647562 for ; Thu, 21 May 2026 05:58:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=tCC5CwRc; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 5997A1A3655; Thu, 21 May 2026 12:58:44 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2F32160495; Thu, 21 May 2026 12:58:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 20E93107E8B86; Thu, 21 May 2026 14:58:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1779368323; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=9lgScfCVwurV7xzYxUp8Kjf9jPheI5HeM6WSVjDIBJE=; b=tCC5CwRcG86ehD6waaWUMhbEU0H8M+t2WqrJ2D/lEHhAo4WLOXjk5BIFemu0wzj9PjbsSv wVmbouKK3Q+9jYx5gIxDtfZOMKRdOhvQAi5BBpKlV1zAGekOxoP2X/iYPAbLKBCd18jPng bQqBa23/0IUyIvyJVbbvJe6LVVc8qdD69vDRY/BKTwlZXFmLpi7JaH3NM1IEKLOx/GtKhy i2VbDnXnRkEVZA6B8YQQJv2eUpOlo9fnpVpmLIHEVldyjpzTmg15Xt5Z6HtHEbmzoEKUUU wFX832DEcSSJ6SleefVE94HoNzfg78M0f5yNmYLN1xPdRJoU8Bs3t3mJFOG6sw== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, Ross.Burton@arm.com, alex.kanavin@gmail.com, paul@pbarker.dev, richard.purdie@linuxfoundation.org, =?utf-8?q?Jo=C3=A3o_M?= =?utf-8?q?arcos_Costa?= Subject: [PATCH v2 3/5] vim: drop references to xxd in base recipe Date: Thu, 21 May 2026 14:58:26 +0200 Message-ID: <20260521125828.718050-4-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> References: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 21 May 2026 12:58:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/237510 The new vim-xxd recipe provides a binary package shipping xxd, along with the update-alternative specific settings, and it also provides xxd for build-time. Remove these settings in Vim's base recipe to avoid duplication and potential conflicts. Signed-off-by: João Marcos Costa --- meta/recipes-support/vim/vim_9.2.bb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/meta/recipes-support/vim/vim_9.2.bb b/meta/recipes-support/vim/vim_9.2.bb index 59de224aac..b5eef2245a 100644 --- a/meta/recipes-support/vim/vim_9.2.bb +++ b/meta/recipes-support/vim/vim_9.2.bb @@ -5,8 +5,6 @@ SRC_URI += "file://disable_acl_header_check.patch \ file://no-path-adjust.patch \ " -PROVIDES = "xxd" - RDEPENDS:${PN} = "ncurses-terminfo-base ${PN}-xxd" # Recommend that runtime data is installed along with vim RRECOMMENDS:${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-common" @@ -14,14 +12,6 @@ RRECOMMENDS:${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-commo PACKAGECONFIG:class-native = "" BBCLASSEXTEND = "native nativesdk" -PACKAGES =+ "${PN}-xxd" -FILES:${PN}-xxd = "${bindir}/xxd" -RPROVIDES:${PN}-xxd = "xxd" - -ALTERNATIVE:${PN}-xxd = "xxd" -ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd" -ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" - # We override the default in security_flags.inc because vim (not vim-tiny!) will abort # in many places for _FORTIFY_SOURCE=2. Security flags become part of CC. # From patchwork Thu May 21 12:58:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 88585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFC6ECD5BB3 for ; Thu, 21 May 2026 12:58:59 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.35643.1779368332091406096 for ; Thu, 21 May 2026 05:58:52 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=0hglDken; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 96B941A3655; Thu, 21 May 2026 12:58:50 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 6D90560495; Thu, 21 May 2026 12:58:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0FF42107E8B89; Thu, 21 May 2026 14:58:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1779368329; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=KQWnnlLOq6/rw4oV0kqntqcUteMF4aMWDtYwCG+aXAs=; b=0hglDkenmanY1y2i3p+5nyzwJr+xjnUt9YX1+NWlS9SUD8cJw6tuM+RKA2b30rZDEiZBQ2 4sdk2T/3P1RJ+C/lIO/gdXT3JKNx+K3glm3vXSOv/r5QB+noyecuHOqAHqrlmQRqXHoOox mqKULw/eCwrJ+Vlfqaz1k/OefB5+tfogu/a/IbBBH9dCNpQWDJ9lFNM/kvsnIi9nt0GLZ1 hO8RJxTSnG68OI8DV6H85Z46qBQalQNv6FeQ1Oab05d/D/ZTy9vy49wkXQQzExi0gaRe4U F+UbtpBLVArm9cd9Ts11i6noX0oawdANGLZMsj9l+MD+HK6rIiWAZ5uHub23CA== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, Ross.Burton@arm.com, alex.kanavin@gmail.com, paul@pbarker.dev, richard.purdie@linuxfoundation.org, =?utf-8?q?Jo=C3=A3o_M?= =?utf-8?q?arcos_Costa?= Subject: [PATCH v2 4/5] vim.inc: remove xxd from the destination directory Date: Thu, 21 May 2026 14:58:27 +0200 Message-ID: <20260521125828.718050-5-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> References: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 21 May 2026 12:58:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/237511 Since the default target depends on xxd, building vim leads to building xxd as well, and this raises (for instance) the error below: error: check_data_file_clashes: Package vim wants to install file /src/build/tmp/work/qemuriscv64-oe-linux/core-image-minimal/1.0/rootfs/usr/bin/xxd But that file is already provided by package vim-xxd This is not the ideal approach, because we are just removing something after it is compiled instead of simply not compiling it in the first place. That being said, merely compiling xxd does not add much (or any?) actual overhead. Signed-off-by: João Marcos Costa --- meta/recipes-support/vim/vim.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc index 190953b9dd..b75fcb7696 100644 --- a/meta/recipes-support/vim/vim.inc +++ b/meta/recipes-support/vim/vim.inc @@ -99,6 +99,10 @@ do_install() { # delete the block. sed -i '/the mouse works just fine/,+4d' ${D}/${datadir}/${BPN}/vimrc fi + + # FIXME: ideally, Vim's makefiles should be tweaked to not build xxd, + # considering xxd (vim-xxd) has its own recipe now + rm ${D}${bindir}/xxd } PARALLEL_MAKEINST = "" From patchwork Thu May 21 12:58:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 88586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A648ACD5BB1 for ; Thu, 21 May 2026 12:58:59 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.35799.1779368333344067687 for ; Thu, 21 May 2026 05:58:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=ZmhIdZJx; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id F236BC2C64F; Thu, 21 May 2026 12:59:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D821E60495; Thu, 21 May 2026 12:58:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C267A107E8B8B; Thu, 21 May 2026 14:58:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1779368331; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=YB66WZWfSwfMq1Cfg41XmvEA86ASwCA+U6HyepF0TqY=; b=ZmhIdZJxYMepqNDegeN5+dRbfptgMKcuqApqcP6QKMZhF+AjZAfWtZIpDqh3VTfl/o5coH YDT9yLODikl+bpxX7r/CmxiXnBjsiJfHqRSdpfbC/s1TXKKKTPkGwwFtOYti6Px2vQN3wD q8Q8utVeiiHVwIYKtTA56E7U6h2O0rQ0iapNdyx839Zxug2iCAOj5U3mkQl4wqJh4NPADb jWr5dSvQz+aDT//CMQdKobgXcoTXZSRt7RJY4QQNRUVTJRnnCRrsk2b/0sUGEYVIWqHV8E v/9GRh0a38ZAe55RNnIPac+KGhMc07/v44ecVRd81gRc00L007Q79Pzs9Q2Kag== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, Ross.Burton@arm.com, alex.kanavin@gmail.com, paul@pbarker.dev, richard.purdie@linuxfoundation.org, =?utf-8?q?Jo=C3=A3o_M?= =?utf-8?q?arcos_Costa?= Subject: [PATCH v2 5/5] base.bbclass: introduce prune_source_tree function Date: Thu, 21 May 2026 14:58:28 +0200 Message-ID: <20260521125828.718050-6-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> References: <20260521125828.718050-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 21 May 2026 12:58:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/237512 Add a helper function to be executed after do_unpack, if PRUNE_KEEP_PATHS is defined. This variable is a list (space-separated) of paths that should be kept, while the others will be pruned. They can be directory names and filenames, but globbing is not supported as of now. prune_source_tree() is not a task on its own, of course. It belongs in do_unpack's 'postfuncs' list, and also in do_unpack_and_patch (archiver.bbclass): this ensures the archived sources (patched or configured) will also be pruned. As a concrete example, add PRUNE_KEEP_PATHS to vim-xxd so that vim's sources are deleted and only xxd sources are kept. Signed-off-by: João Marcos Costa --- meta/classes-global/base.bbclass | 49 +++++++++++++++++++++++++ meta/classes/archiver.bbclass | 1 + meta/recipes-support/vim/vim-xxd_9.2.bb | 4 ++ 3 files changed, 54 insertions(+) diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 62f2814bb7..edf37a8016 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -256,6 +256,55 @@ python create_source_date_epoch_stamp() { } do_unpack[postfuncs] += "create_source_date_epoch_stamp" +PRUNE_KEEP_PATHS ??= "" +python prune_source_tree() { + import shutil + + # Space-separated list of paths (relative to ${S}) to keep. + # + # Example: + # PRUNE_KEEP_PATHS = "READMEdir/Contents.info src/xxd SECURITY.md" + # + keep_paths = (d.getVar("PRUNE_KEEP_PATHS") or "").split() + + if not keep_paths: + bb.debug(1, "do_unpack: prune_source_tree is disabled") + return + + s = d.getVar("S") + keep_abs = {os.path.abspath(os.path.join(s, p)) for p in keep_paths} + + def should_keep(path): + path = os.path.abspath(path) + + for keep in keep_abs: + if ( + path == keep or # exact match with PRUNE_KEEP_PATHS + path.startswith(keep + os.sep) or # parent directories + keep.startswith(path + os.sep) # child directories + ): + return True + return False + + for root, dirs, _ in os.walk(s, topdown=False): + for d in dirs: + path = os.path.join(root, d) + + if not should_keep(path): + bb.debug(1, "Removing directory: %s" % path) + shutil.rmtree(path) + + # in case there are leftover files: + for root, _, files in os.walk(s): + for f in files: + path = os.path.join(root, f) + + if not should_keep(path): + bb.debug(1, "Removing file: %s" % path) + os.remove(path) +} +do_unpack[postfuncs] .= "${@" prune_source_tree" if d.getVar("PRUNE_KEEP_PATHS") else ''}" + def get_source_date_epoch_value(d): return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d) diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 1f1ee45bd7..1a0d6f8eea 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -620,6 +620,7 @@ addtask do_deploy_archives do_build[recrdeptask] += "do_deploy_archives" do_rootfs[recrdeptask] += "do_deploy_archives" do_populate_sdk[recrdeptask] += "do_deploy_archives" +do_unpack_and_patch[postfuncs] .= "${@" prune_source_tree" if d.getVar("PRUNE_KEEP_PATHS") else ''}" python () { # Add tasks in the correct order, specifically for linux-yocto to avoid race condition. diff --git a/meta/recipes-support/vim/vim-xxd_9.2.bb b/meta/recipes-support/vim/vim-xxd_9.2.bb index 5cfacbcea6..b1058e18b7 100644 --- a/meta/recipes-support/vim/vim-xxd_9.2.bb +++ b/meta/recipes-support/vim/vim-xxd_9.2.bb @@ -16,6 +16,10 @@ inherit update-alternatives PROVIDES += "xxd" +# After unpacking, the files/dirs. outside of this list are removed +# see prune_source_tree() in base.bbclass +PRUNE_KEEP_PATHS = "src/xxd/Makefile src/xxd/xxd.c" + do_compile() { cd ${S}/src/xxd; oe_runmake xxd