From patchwork Mon May 2 14:51:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 7492 X-Patchwork-Delegate: reatmon@ti.com 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 2FA2EC35280 for ; Mon, 2 May 2022 14:51:30 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web08.11690.1651503085735352390 for ; Mon, 02 May 2022 07:51:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 9795A40C88 for ; Mon, 2 May 2022 14:51:23 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gCRmN6lZmJ4Z for ; Mon, 2 May 2022 14:51:23 +0000 (UTC) Received: from mail.denix.org (pool-100-15-86-127.washdc.fios.verizon.net [100.15.86.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 8DAF940C86 for ; Mon, 2 May 2022 14:51:23 +0000 (UTC) Received: from thorin.denix (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id 71153174924 for ; Mon, 2 May 2022 10:51:21 -0400 (EDT) From: Denys Dmytriyenko To: meta-ti@lists.yoctoproject.org Subject: [master][PATCH 15/26] u-boot-ti: Use SRCREV to get short commit ID Date: Mon, 2 May 2022 14:51:09 +0000 Message-Id: <20220502145120.726632-16-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220502145120.726632-1-denis@denix.org> References: <20220502145120.726632-1-denis@denix.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 02 May 2022 14:51:30 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/14655 From: Devarsh Thakkar Due to recent security update in git, we are not able to fetch revision currently using existing method: https://github.blog/2022-04-12-git-security-vulnerability-announced/ So instead, use the SRCREV to parse the short commit ID and set the UBOOT_LOCALVERSION variable. Signed-off-by: Devarsh Thakkar Signed-off-by: Ryan Eatmon Signed-off-by: Denys Dmytriyenko --- meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc index c3c32f9c..5ddcaff7 100644 --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc @@ -1,14 +1,6 @@ # UBOOT_LOCALVERSION can be set to add a tag to the end of the # U-boot version string. such as the commit id -def get_git_revision(p): - import subprocess - - try: - return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip() - except OSError: - return None - -UBOOT_LOCALVERSION = "-g${@get_git_revision('${S}').__str__()[:10]}" +UBOOT_LOCALVERSION = "-g${@d.getVar("SRCREV", False).__str__()[:10]}" UBOOT_SUFFIX ?= "img" SPL_BINARY ?= "MLO"