From patchwork Wed Aug 14 12:02:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47772 X-Patchwork-Delegate: steve@sakoman.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 891A0C52D7D for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web10.96182.1723636941235429151 for ; Wed, 14 Aug 2024 05:02:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ZcDhGPGy; spf=softfail (domain: sakoman.com, ip: 209.85.215.172, mailfrom: steve@sakoman.com) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7c3e0a3c444so601622a12.1 for ; Wed, 14 Aug 2024 05:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636940; x=1724241740; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9q2V8K1AV5Bt4jA9l19XPN9+cnziQ6a53cmAawxD1IY=; b=ZcDhGPGyake7J+AOBJsFM8QC8dLkwdNnadPFMLGKbD8uHyVpVXaKLtYl6mNY0s0lbO qrWqopd3Kvr/GnNtoWS8OAhDm8/8e64g0mTzzdKkt58apNYoXb6j2wnY/oCtjiQareO2 sTO9GvIKc6h1tWB+yWwJZ8ETNuZpOji5f0YV6OLy3d9cyj71o/TaWmA83A2u7CEm4lCH cE60glV7WMRwzmswxdm/c+sKvZMDzRwbnw0Its543OTknOvjV3QbaNWViocXuJhoHDNr ShMv+6obtOwEoc/Ffpmuy+PJmsH2odDmOL7Ck9n0Og/axkwNYHYjElEPEUY7TCppPwE3 yucg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636940; x=1724241740; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9q2V8K1AV5Bt4jA9l19XPN9+cnziQ6a53cmAawxD1IY=; b=kZi5i7VDQyZTLKGus+B7Kkb3z5g8YIqctMv60V2UpyCzx/ec2amEWJ29QDusfkkgjy B6K40+hXWLH0zmRv1rJMNbWX6uDRwPi/L+cwnT89TEu5MCaw4XiUwlZCEKbpN/kBRcRw hWhkVI5RteAFnjJCZuT+gRt3QbWWQHqY8AfTCbcYEx4JSgvE+xUuJ2xwy4mics37Eg+R 3l6fWYWIGNaraJKvjNnb3cFXyb8wXQnBRCPLlj9S7pPj4WoabqpdTjNMTvGApGoXPsJC p3282nSBXVJLZU33yxbq+2gzKcECLO3yuPpoOPI5hrubj1zG6JWkxETmG318OceSDVCe ujAg== X-Gm-Message-State: AOJu0Yx5AsF0sIozrAjp1F6avisk7CVeCVs8CIHppwfM0mhHZkliQHbM ASII8Se3slG+1elS8BXEuxB0BWxewgGuv44nfueMhXx78yei19cQzi4uuBXWCNZCAwGwPGgHYsw 2mbk= X-Google-Smtp-Source: AGHT+IFCeSeK/Kl4hAxXSwrrkANqWpD0OUaM6N93NuT/7Qb6OdB0zCu78UuHv2kAhp3nsuew4wVRtg== X-Received: by 2002:a17:90a:d586:b0:2c9:6abd:ca64 with SMTP id 98e67ed59e1d1-2d3acbf5253mr2981891a91.9.1723636940041; Wed, 14 Aug 2024 05:02:20 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:19 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 1/9] cve_check: Use a local copy of the database during builds Date: Wed, 14 Aug 2024 05:02:01 -0700 Message-Id: <468a9077d9b3466d60ee8c5b6144529ea5e5c849.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203312 From: Richard Purdie Rtaher than trying to use a sqlite database over NFS from DL_DIR, work from a local copy in STAGING DIR after fetching. Signed-off-by: Richard Purdie (cherry picked from commit 03596904392d257572a905a182b92c780d636744) Signed-off-by: Steve Sakoman --- meta/classes/cve-check.bbclass | 7 ++++--- .../meta/cve-update-nvd2-native.bb | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 93a2a1413d..c946de29a4 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -31,8 +31,9 @@ CVE_PRODUCT ??= "${BPN}" CVE_VERSION ??= "${PV}" -CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK" -CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2-1.db" +CVE_CHECK_DB_FILENAME ?= "nvdcve_2-1.db" +CVE_CHECK_DB_DIR ?= "${STAGING_DIR}/CVE_CHECK" +CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/${CVE_CHECK_DB_FILENAME}" CVE_CHECK_DB_FILE_LOCK ?= "${CVE_CHECK_DB_FILE}.lock" CVE_CHECK_LOG ?= "${T}/cve.log" @@ -198,7 +199,7 @@ python do_cve_check () { } addtask cve_check before do_build -do_cve_check[depends] = "cve-update-nvd2-native:do_fetch" +do_cve_check[depends] = "cve-update-nvd2-native:do_unpack" do_cve_check[nostamp] = "1" python cve_check_cleanup () { diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb index 1901641965..2d23d28c3e 100644 --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb @@ -8,7 +8,6 @@ INHIBIT_DEFAULT_DEPS = "1" inherit native -deltask do_unpack deltask do_patch deltask do_configure deltask do_compile @@ -35,7 +34,9 @@ CVE_DB_INCR_UPDATE_AGE_THRES ?= "10368000" # Number of attempts for each http query to nvd server before giving up CVE_DB_UPDATE_ATTEMPTS ?= "5" -CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DIR}/temp_nvdcve_2.db" +CVE_CHECK_DB_DLDIR_FILE ?= "${DL_DIR}/CVE_CHECK/${CVE_CHECK_DB_FILENAME}" +CVE_CHECK_DB_DLDIR_LOCK ?= "${CVE_CHECK_DB_DLDIR_FILE}.lock" +CVE_CHECK_DB_TEMP_FILE ?= "${CVE_CHECK_DB_FILE}.tmp" python () { if not bb.data.inherits_class("cve-check", d): @@ -52,9 +53,9 @@ python do_fetch() { bb.utils.export_proxies(d) - db_file = d.getVar("CVE_CHECK_DB_FILE") + db_file = d.getVar("CVE_CHECK_DB_DLDIR_FILE") db_dir = os.path.dirname(db_file) - db_tmp_file = d.getVar("CVE_DB_TEMP_FILE") + db_tmp_file = d.getVar("CVE_CHECK_DB_TEMP_FILE") cleanup_db_download(db_file, db_tmp_file) # By default let's update the whole database (since time 0) @@ -77,6 +78,7 @@ python do_fetch() { pass bb.utils.mkdirhier(db_dir) + bb.utils.mkdirhier(os.path.dirname(db_tmp_file)) if os.path.exists(db_file): shutil.copy2(db_file, db_tmp_file) @@ -89,10 +91,16 @@ python do_fetch() { os.remove(db_tmp_file) } -do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}" +do_fetch[lockfiles] += "${CVE_CHECK_DB_DLDIR_LOCK}" do_fetch[file-checksums] = "" do_fetch[vardeps] = "" +python do_unpack() { + import shutil + shutil.copyfile(d.getVar("CVE_CHECK_DB_DLDIR_FILE"), d.getVar("CVE_CHECK_DB_FILE")) +} +do_unpack[lockfiles] += "${CVE_CHECK_DB_DLDIR_LOCK} ${CVE_CHECK_DB_FILE_LOCK}" + def cleanup_db_download(db_file, db_tmp_file): """ Cleanup the download space from possible failed downloads From patchwork Wed Aug 14 12:02:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47776 X-Patchwork-Delegate: steve@sakoman.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 D2732C531DF for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mx.groups.io with SMTP id smtpd.web10.96184.1723636942838481289 for ; Wed, 14 Aug 2024 05:02:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=tV7pDHba; spf=softfail (domain: sakoman.com, ip: 209.85.210.171, mailfrom: steve@sakoman.com) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-710cad5778fso5276382b3a.3 for ; Wed, 14 Aug 2024 05:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636942; x=1724241742; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=R7X5+twBMDBYsKvHS+pd9Hq1EKh1ZhSmMyeGc7bBt7c=; b=tV7pDHbaPtkrk0VqZ1HhuZiqfVjPfmI6W1EuKdLB4InCj4m1xpi6Z87AlN6uxzeNRI G4yDpHJELPcUq0szNVEykA9McoDgPOaDeahWI8Q7OuMeWeGK6HKY6yniBEik938PNl9J Ehzsk4Kj4irPg5S75o+Ym8MjVi5BuHeXqm8WMLLc5kuL8SScBxbRt70HfeF20jVx7Pu7 jnNAfLruejOf48YaeUq+r1b5zDTHk7wMS+BMn3S11hld2wEeeAtxJ2X2dhLjw3wap0Nz j/JSQtvt7tY+UvfgWSsIeKpVwD8Ksx64sz7SESKw/MGFf++dRqtpjqi3EZ/XY6v3R+7a bSdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636942; x=1724241742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R7X5+twBMDBYsKvHS+pd9Hq1EKh1ZhSmMyeGc7bBt7c=; b=ZuHZ5KriqhepTVDcGQhRSV3ikZtTgtuxk4fMieIlwiY8kGQ3W1nMn1n4KkL8zKnJ9M tMZ6jYQkBqPxBu9OKL84OEnW7Pb6ss/Bs0WiqloNcjJtefD5iH66qc9UrQTmNHQKW9LW UT++hJqN9ooATOSHIOeadITWDq1qO2EttzhlMTE+gaNLeaps49bzvyCbMXoATujEBo0t +h7OqPcRgr8ayH29bW3LsgLKA0Kfh5gmJmRLAC2EYa7ZbKFBJ0jFy7+WqYTq/6fnf9i3 Q+nVLlG+1O+W5TkH/377Lg42t84n34lRud2OSVYNcrL3eAalEJuybppYJoBnCEloubp6 TxHw== X-Gm-Message-State: AOJu0Yxn2cJr9jnGQQLvaA6l3sJwak4GtZk8HgoC0Wa7j0WrUiBSSEpX G/4QIlbUcZWWKW+Mzei1ph0j3VINep3PbO+JzpleeJrwK5R6eWWl6+MqFKWVHbH9BDr1oPB37uA GSrY= X-Google-Smtp-Source: AGHT+IEYf9otxgtsYPJpOCBcjNhDTwFSGIBIib2htmbkTXOS/mZgXcCZCDUPKzYaTvrnwh+E5+3q1g== X-Received: by 2002:a05:6a21:b85:b0:1c4:aedd:7b97 with SMTP id adf61e73a8af0-1c8eae97e74mr3206161637.32.1723636941657; Wed, 14 Aug 2024 05:02:21 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:21 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 2/9] libyaml: ignore CVE-2024-35326 Date: Wed, 14 Aug 2024 05:02:02 -0700 Message-Id: <63445474e797967578f5e9dc9eff3642ebe44712.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203313 From: Peter Marko This is the same problem as already ignored CVE-2024-35328. See laso this comment in addition: https://github.com/yaml/libyaml/issues/298#issuecomment-2167684233 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- meta/recipes-support/libyaml/libyaml_0.2.5.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb b/meta/recipes-support/libyaml/libyaml_0.2.5.bb index 1c6a5fcb45..334d9113d2 100644 --- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb +++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb @@ -18,6 +18,7 @@ inherit autotools DISABLE_STATIC:class-nativesdk = "" DISABLE_STATIC:class-native = "" +CVE_STATUS[CVE-2024-35326] = "upstream-wontfix: Upstream thinks there is no working code that is exploitable - https://github.com/yaml/libyaml/issues/302" CVE_STATUS[CVE-2024-35328] = "upstream-wontfix: Upstream thinks there is no working code that is exploitable - https://github.com/yaml/libyaml/issues/302" BBCLASSEXTEND = "native nativesdk" From patchwork Wed Aug 14 12:02:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47777 X-Patchwork-Delegate: steve@sakoman.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 D299FC5320E for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web11.96290.1723636944243803789 for ; Wed, 14 Aug 2024 05:02:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=PY7btL3N; spf=softfail (domain: sakoman.com, ip: 209.85.210.170, mailfrom: steve@sakoman.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-70d1cbbeeaeso4895747b3a.0 for ; Wed, 14 Aug 2024 05:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636943; x=1724241743; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RRIkrDX2wrtMwu8nWwPVs6FS2h+bIa2Qv6SHacO8WTU=; b=PY7btL3N+fr3BbINC1vKNvJERl141BWS/j89XlCh/oOaqiWU+quzor6Qc5S82tX5VC UDzSOKhiyRV5r6bka8nJQ4nzbpUzqKI1i2shxXVWeYgMRAEK5fmqHfTdXOta1yEc+uc8 VzdPxvQug3/Z3QDdEb5H/m1vgKh6wPfhuhauaUQ2cMvO7RaKCgLrl1Thacy/PF3DzaCw NJL6Q5jHyrt4YdrV6rJrES6SqIb1Q1Y23BuDem46iJKQyfDtpzr/g8N2j9XfJ9AQda8t 4BW41RVtZs6lzNMcrGO6z42Jdc1wR+yDLAE6jQs/504WacIMpxFBiT1UKvpXqLHODalv q8Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636943; x=1724241743; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RRIkrDX2wrtMwu8nWwPVs6FS2h+bIa2Qv6SHacO8WTU=; b=XBv4mNswOxGJPXuacvFjy3dG11aLoWz5tiNlUrPhj6zS4MKiCoTD7kXUqCCVH5mjIy qMXt0/jqhaj/8sdkv67/Z5g/H882gKg00gwpXi59iHcSUwiBBxkJUkpqk+sIa2sEfVBu IQdfQUx0l6EMa8d431Yc5ZyxyC3GDff9ft3gp+ax40BAntkoVeeZ8Q19x58qbpNCq26b OYQLMntMwJCWlstIuayEebRdn28S8gXBYyZUeGj6YRhUhrnUh89Qbef17wvR0SQqlfwT XrpvfYXJgengy5WEP84qaTG8YEqdpjGF63/r1murEyqbLzBeTCh8ZwSUC/4rN9nvLque Dwfw== X-Gm-Message-State: AOJu0YyyZV2orLL8nAKjtXTHsfqdM3J2fvtcxDdpNP8Z4mpB06qD2SD3 lSHDbj2TY1B03IYVuQwvxeZ/w0ZYoKJkL8z7CaZJ21Srtm5zFXCXIoYAlp2hY31Vrv5kJGkyIpW Yf38= X-Google-Smtp-Source: AGHT+IFmoIsF6qadyVjSbvle2B4+VDuQPZZ+RIOBeoaaksWsgSV93egvDTl6Mn4dv9svLlhXZce+Aw== X-Received: by 2002:a05:6a21:918a:b0:1c0:f529:bad6 with SMTP id adf61e73a8af0-1c8eaf8c373mr3126774637.45.1723636943175; Wed, 14 Aug 2024 05:02:23 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:22 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 3/9] python3-certifi: Fix CVE-2024-39689 Date: Wed, 14 Aug 2024 05:02:03 -0700 Message-Id: <03772ffaccf53266d98204a70fe82eb1dbea70b5.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203314 From: Soumya Sambu Certifi is a curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. Certifi starting in 2021.05.30 and prior to 2024.07.4 recognized root certificates from `GLOBALTRUST`. Certifi 2024.07.04 removes root certificates from `GLOBALTRUST` from the root store. These are in the process of being removed from Mozilla's trust store. `GLOBALTRUST`'s root certificates are being removed pursuant to an investigation which identified "long-running and unresolved compliance issues."Certifi is a curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. Certifi starting in 2021.05.30 and prior to 2024.07.4 recognized root certificates from `GLOBALTRUST`. Certifi 2024.07.04 removes root certificates from `GLOBALTRUST` from the root store. These are in the process of being removed from Mozilla's trust store. `GLOBALTRUST`'s root certificates are being removed pursuant to an investigation which identified "long-running and unresolved compliance issues." References: https://nvd.nist.gov/vuln/detail/CVE-2024-39689 Upstream-patch: https://github.com/certifi/python-certifi/commit/bd8153872e9c6fc98f4023df9c2deaffea2fa463 Signed-off-by: Soumya Sambu Signed-off-by: Steve Sakoman --- .../python3-certifi/CVE-2024-39689.patch | 69 +++++++++++++++++++ .../python/python3-certifi_2024.2.2.bb | 3 + 2 files changed, 72 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-certifi/CVE-2024-39689.patch diff --git a/meta/recipes-devtools/python/python3-certifi/CVE-2024-39689.patch b/meta/recipes-devtools/python/python3-certifi/CVE-2024-39689.patch new file mode 100644 index 0000000000..a2ecc15d2c --- /dev/null +++ b/meta/recipes-devtools/python/python3-certifi/CVE-2024-39689.patch @@ -0,0 +1,69 @@ +From bd8153872e9c6fc98f4023df9c2deaffea2fa463 Mon Sep 17 00:00:00 2001 +From: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> +Date: Wed, 3 Jul 2024 21:34:29 -0400 +Subject: [PATCH] 2024.07.04 (#295) + +Co-authored-by: alex <772+alex@users.noreply.github.com> + +CVE: CVE-2024-39689 + +Upstream-Status: Backport [https://github.com/certifi/python-certifi/commit/bd8153872e9c6fc98f4023df9c2deaffea2fa463] + +Signed-off-by: Soumya Sambu +--- + certifi/cacert.pem | 40 ---------------------------------------- + 1 file changed, 40 deletions(-) + +diff --git a/certifi/cacert.pem b/certifi/cacert.pem +index 1bec256..6bb8cf8 100644 +--- a/certifi/cacert.pem ++++ b/certifi/cacert.pem +@@ -3857,46 +3857,6 @@ DgQWBBQxCpCPtsad0kRLgLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ + +RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+CAezNIm8BZ/3Hobui3A= + -----END CERTIFICATE----- + +-# Issuer: CN=GLOBALTRUST 2020 O=e-commerce monitoring GmbH +-# Subject: CN=GLOBALTRUST 2020 O=e-commerce monitoring GmbH +-# Label: "GLOBALTRUST 2020" +-# Serial: 109160994242082918454945253 +-# MD5 Fingerprint: 8a:c7:6f:cb:6d:e3:cc:a2:f1:7c:83:fa:0e:78:d7:e8 +-# SHA1 Fingerprint: d0:67:c1:13:51:01:0c:aa:d0:c7:6a:65:37:31:16:26:4f:53:71:a2 +-# SHA256 Fingerprint: 9a:29:6a:51:82:d1:d4:51:a2:e3:7f:43:9b:74:da:af:a2:67:52:33:29:f9:0f:9a:0d:20:07:c3:34:e2:3c:9a +------BEGIN CERTIFICATE----- +-MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkG +-A1UEBhMCQVQxIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkw +-FwYDVQQDExBHTE9CQUxUUlVTVCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYx +-MDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9u +-aXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAyMDIwMIICIjANBgkq +-hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWiD59b +-RatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9Z +-YybNpyrOVPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3 +-QWPKzv9pj2gOlTblzLmMCcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPw +-yJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCmfecqQjuCgGOlYx8ZzHyyZqjC0203b+J+ +-BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKAA1GqtH6qRNdDYfOiaxaJ +-SaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9ORJitHHmkH +-r96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj0 +-4KlGDfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9Me +-dKZssCz3AwyIDMvUclOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIw +-q7ejMZdnrY8XD2zHc+0klGvIg5rQmjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2 +-nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +-AQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1UdIwQYMBaAFNwu +-H9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA +-VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJC +-XtzoRlgHNQIw4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd +-6IwPS3BD0IL/qMy/pJTAvoe9iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf +-+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS8cE54+X1+NZK3TTN+2/BT+MAi1bi +-kvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2HcqtbepBEX4tdJP7 +-wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxSvTOB +-TI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6C +-MUO+1918oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn +-4rnvyOL2NSl6dPrFf4IFYqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+I +-aFvowdlxfv1k7/9nR4hYJS8+hge9+6jlgqispdNpQ80xiEmEU5LAsTkbOYMBMMTy +-qfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg== +------END CERTIFICATE----- +- + # Issuer: CN=ANF Secure Server Root CA O=ANF Autoridad de Certificacion OU=ANF CA Raiz + # Subject: CN=ANF Secure Server Root CA O=ANF Autoridad de Certificacion OU=ANF CA Raiz + # Label: "ANF Secure Server Root CA" +-- +2.40.0 diff --git a/meta/recipes-devtools/python/python3-certifi_2024.2.2.bb b/meta/recipes-devtools/python/python3-certifi_2024.2.2.bb index 4e61b8d9d4..116add2079 100644 --- a/meta/recipes-devtools/python/python3-certifi_2024.2.2.bb +++ b/meta/recipes-devtools/python/python3-certifi_2024.2.2.bb @@ -7,6 +7,9 @@ HOMEPAGE = " http://certifi.io/" LICENSE = "ISC" LIC_FILES_CHKSUM = "file://LICENSE;md5=11618cb6a975948679286b1211bd573c" +SRC_URI += "file://CVE-2024-39689.patch \ + " + SRC_URI[sha256sum] = "0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f" inherit pypi setuptools3 From patchwork Wed Aug 14 12:02:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47771 X-Patchwork-Delegate: steve@sakoman.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 901FEC531DD for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mx.groups.io with SMTP id smtpd.web11.96291.1723636945960426087 for ; Wed, 14 Aug 2024 05:02:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=j3QfBjPu; spf=softfail (domain: sakoman.com, ip: 209.85.216.45, mailfrom: steve@sakoman.com) Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2d396f891c4so1352197a91.3 for ; Wed, 14 Aug 2024 05:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636945; x=1724241745; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DtK9OBl/YfcfRxWZMi2VMraOORAFOYztTbTobMRTJNQ=; b=j3QfBjPuyU3C5zRxOGv0n9PgDQsCO5O8ZhDyCa6sLjr55bSxpUKel1975kYFO54dDw MRg3cAsru3kqiStAErapP+4fXtzPvedfEvN1bySx/aHpuvuegVQR7FYQaQp7YCHe15tc /TmCcEw7elw/xzAc8zxJAEP3rEO3yqtwZC/Jj4GM8GxOh29UuUBlG+OrE6jdI8Q7wZVs 22erQTYQq05WVvCIL1yY1BiUU4ft+5lk+SfQqwFjcIi6c0d5A7GvQGbV9Z2FxvqAa0RA RsFGqDON8xfFC8+qtDqS2i4m0cdPoLAXcjT+RpGoC9+FQ9V3wsHwzQ21/do5+IJzFwJN LnWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636945; x=1724241745; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DtK9OBl/YfcfRxWZMi2VMraOORAFOYztTbTobMRTJNQ=; b=m/4tviG2K4u84wD30iMniH9hgri+K3Ar8V/bFvk7ERF50ZG7dq3fes52nhxKbDaKJF LZLAxvgu1R2WyVMJ6hMstSXPv0z28PHyaMYRtdEWnK5/AdzaSdUdx5KA5usMT92nQ+md J20Gazqmz/ezzzrIMBiA+SumgSFcH7xZEdJLSQFschTz1BFSmGHRS6scG5C6Gx1zr0RO PI7TqnY39MbToR7YBE9mj1S/UAEPlJc9uXt9SbbEzUBUGhOsZXxLLECH/IYRCOrPyqS4 eGmITGYfuvA9tHx6OXg7lq1Rp+YRA24vKFL8lwdDC5cVfhjooI9eSCPtTPSubDpEqkIW ivfg== X-Gm-Message-State: AOJu0YwhNZVZnRVqpQuwLFEVLYeE9Gx648rAn2ovjJtzLbckbsfKeHFW /N4KI12i+fWfpea04txfwtbStJjjACbT2sAngHcBgahKVwykj9O2HCpRplgEcztI3YlZ81YeVqa 3ELU= X-Google-Smtp-Source: AGHT+IHehjtfcxs61KZT6dRO79ncHFl1oOFluk7fo1lI18Iwhpu3CveD7ySrilkZeZslfmwFd/B0NA== X-Received: by 2002:a17:90a:7c0b:b0:2c9:999d:a22d with SMTP id 98e67ed59e1d1-2d3aab74e0cmr2752770a91.30.1723636944752; Wed, 14 Aug 2024 05:02:24 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:24 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 4/9] ffmpeg: fix CVE-2023-50008 Date: Wed, 14 Aug 2024 05:02:04 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203315 From: Archana Polampalli Buffer Overflow vulnerability in Ffmpeg v.n6.1-3-g466799d4f5 allows a local attacker to execute arbitrary code via the av_malloc function in libavutil/mem.c:105:9 component. Signed-off-by: Archana Polampalli Signed-off-by: Steve Sakoman --- .../ffmpeg/ffmpeg/CVE-2023-50008.patch | 29 +++++++++++++++++++ .../recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-50008.patch diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-50008.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-50008.patch new file mode 100644 index 0000000000..4b8935628f --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-50008.patch @@ -0,0 +1,29 @@ +From 5f87a68cf70dafeab2fb89b42e41a4c29053b89b Mon Sep 17 00:00:00 2001 +From: Paul B Mahol +Date: Mon, 27 Nov 2023 12:08:20 +0100 +Subject: [PATCH] avfilter/vf_colorcorrect: fix memory leaks + +CVE: CVE-2023-50008 + +Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/5f87a68cf70dafeab2fb89b42e41a4c29053b89b] + +Signed-off-by: Archana Polampalli +--- + libavfilter/vf_colorcorrect.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c +index 1c4dea5..6bdec2c 100644 +--- a/libavfilter/vf_colorcorrect.c ++++ b/libavfilter/vf_colorcorrect.c +@@ -497,6 +497,8 @@ static av_cold void uninit(AVFilterContext *ctx) + ColorCorrectContext *s = ctx->priv; + + av_freep(&s->analyzeret); ++ av_freep(&s->uhistogram); ++ av_freep(&s->vhistogram); + } + + static const AVFilterPad colorcorrect_inputs[] = { +-- +2.40.0 diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb index 05919e6ffd..9b74d78fb1 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb @@ -30,6 +30,7 @@ SRC_URI = " \ file://CVE-2023-49502.patch \ file://CVE-2024-31578.patch \ file://CVE-2024-31582.patch \ + file://CVE-2023-50008.patch \ " SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968" From patchwork Wed Aug 14 12:02:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47773 X-Patchwork-Delegate: steve@sakoman.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 B1272C531DE for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web10.96185.1723636947543849987 for ; Wed, 14 Aug 2024 05:02:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=tL+0gixJ; spf=softfail (domain: sakoman.com, ip: 209.85.216.49, mailfrom: steve@sakoman.com) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2cfdc4deeecso4840636a91.3 for ; Wed, 14 Aug 2024 05:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636947; x=1724241747; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TtI5+eLMVtEJ0NggdLUxRaQ8HZa2JoHLdhq5Fadf2pc=; b=tL+0gixJdN76fE8+tmyU0IAdMMlZzUgkQFlS5i3+eXAXPmBevR3UjLd34kxh69XIKX TdB98621aypm485ZnAJMrOnQQYJaF0O6hdvPY9ke4xD0Gvrov9nZJDr5MgzlZtKhx3/z INhdgkFlL24cLi/ZNGD7JfZ9c/jIyI+ph14CJpG7WHB/TYdl/2cucMXhgyHmRfgpuMHY H7lEr9A0Bs1cXCnr83fRlODDrWnxzNKkuTGbCIz1UTPTrWHyun1Uem3L91WnrjE+Wn+b e2oH1ngmh/GIpydabDASDizsH6IgIwnKk2QP/x/1Yf8N8glTlKaKqZqBzjIXITsRCaWu EqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636947; x=1724241747; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TtI5+eLMVtEJ0NggdLUxRaQ8HZa2JoHLdhq5Fadf2pc=; b=WeL7Jd5vAFiMNmKQkCdlS8VT09t9deWL7V3JJCIjHEEOFI/F8kKxgk3Ulp4b6JeCsv 3JusNySNi/G8DoEch3TKbL+/vASron+qO2Sla936D3I94vVjPvzxVPWpHe1WlqKS3HM7 OZ1CfzW2GEXKFA6vDyCDsNv655G5Ivs267BlUOKD0Ys8UCj7U5ML1pGWxyAFACrjNmYg xrGQmHZ/de6WXd7dMH9oCPObcSQNZoaqMBhe1c3e2ufZ7ulST8F4cSUZIpNq5dsBmT1J 7NUXDR1CQhBh9Hey1fxxWAdDElCY+tN+Sn0hRX9d0nZKH6nTcwOymwGVzhcBFXFGqy/l o+JQ== X-Gm-Message-State: AOJu0YwwruJqtCUpGqpsFohn2r7nJ/+jphQKiXWe4F7IiZPDrljsixBd vtNhUH6M+ouJliETQlH0CpDK/FVyR5dP8CSIk+FzqbizPpc/OaT8TfoPKCVHlPM2C/W8qxwULJm 9ggs= X-Google-Smtp-Source: AGHT+IFiMCOe5WCBViqs2g0+9WMGyKVC3BRa3m34C3u+3+KAmxkfe7JufVjei++PNXGTsgX+/PT5cA== X-Received: by 2002:a17:90a:2c4c:b0:2c9:6d07:18f4 with SMTP id 98e67ed59e1d1-2d3aab86430mr2815375a91.35.1723636946233; Wed, 14 Aug 2024 05:02:26 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:25 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 5/9] python3-pycryptodome(x): use python_setuptools_build_meta build class Date: Wed, 14 Aug 2024 05:02:05 -0700 Message-Id: <1f33cbdeb5756eb876f01b637e3d0ea9dae0c63f.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203316 From: Ross Burton This package can be built using pep517 classes now. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit a32fa3e64d1daf5846c29403e9f258aea42212d3) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/python/python3-pycryptodome_3.20.0.bb | 2 +- meta/recipes-devtools/python/python3-pycryptodomex_3.20.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/python/python3-pycryptodome_3.20.0.bb b/meta/recipes-devtools/python/python3-pycryptodome_3.20.0.bb index d24fa58d43..6c93c205ac 100644 --- a/meta/recipes-devtools/python/python3-pycryptodome_3.20.0.bb +++ b/meta/recipes-devtools/python/python3-pycryptodome_3.20.0.bb @@ -1,5 +1,5 @@ require python-pycryptodome.inc -inherit setuptools3 +inherit python_setuptools_build_meta SRC_URI[sha256sum] = "09609209ed7de61c2b560cc5c8c4fbf892f8b15b1faf7e4cbffac97db1fffda7" diff --git a/meta/recipes-devtools/python/python3-pycryptodomex_3.20.0.bb b/meta/recipes-devtools/python/python3-pycryptodomex_3.20.0.bb index 2673ea8326..54578d2850 100644 --- a/meta/recipes-devtools/python/python3-pycryptodomex_3.20.0.bb +++ b/meta/recipes-devtools/python/python3-pycryptodomex_3.20.0.bb @@ -1,5 +1,5 @@ require python-pycryptodome.inc -inherit setuptools3 +inherit python_setuptools_build_meta SRC_URI[sha256sum] = "7a710b79baddd65b806402e14766c721aee8fb83381769c27920f26476276c1e" From patchwork Wed Aug 14 12:02:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47775 X-Patchwork-Delegate: steve@sakoman.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 A3A18C52D7B for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.96186.1723636948578630516 for ; Wed, 14 Aug 2024 05:02:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=rmKkNu+S; spf=softfail (domain: sakoman.com, ip: 209.85.215.179, mailfrom: steve@sakoman.com) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7a1843b4cdbso4503646a12.2 for ; Wed, 14 Aug 2024 05:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636948; x=1724241748; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=rmUCahev+kHuk+PRAU26SPrsgeWhgXjic2PqOE4wx68=; b=rmKkNu+Sy8FApUiB5h6c2n7kJkErOr0q5VE40/MmDNqYfV1UC2P5L4muA5S3H9cRID gabRJ0MVozGzkQsdVf2sPlMBbAhJ+nDOHODZS/KY447bJ58w8668pXBCzKHxGBMscLfB Td/hxzf4d24s6/MUIB3gYL1D9S7qm8moBiv7eCyyaDEPA7HlE5384k/ITWUC+X05F3cV nTNVN2+KSmNr2HXPdf6lPosRezQlqzckbYM79OHhis9wuc/b1YNFMIDuDdnqcbWynlnr xrUoW+SJqr1TO1GF3hUa3Qvmx4XHjJ17liH157rHORtm7QaqgnVAgZM0CMfySr6FAl+4 0ttA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636948; x=1724241748; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rmUCahev+kHuk+PRAU26SPrsgeWhgXjic2PqOE4wx68=; b=WmPKlDVXWNZcr4tCJLWWpNeSR4n9ug/exBH0WWXdqHQrYJ+vO0rVo13SbghAshbn5o LI6UcnxCZbcanuIrgwVXda/laDaFi8/s3RQ6C407upuP1c9e17/9wr6TGcGm8QEcnBD2 un+rk/Io8GuPBlFgtjgTiRhlc+Rzx7Zti1aK5hDPNEfcjjRcoJPY0C1UrC4c0dFxtj5J owP5+1UapaOkDkeUqHLSmwiS0H9N9uQEDEV6eiPB1Q9QPGxtv+JhyWvxr09k+v3F1DtK 1ce27uetpVtSn0Uxuuj2BZyv21Pb/OBLFqyBknsH8uQXRuoUzQxpk6SPeLCoCiGQZE/y dzMw== X-Gm-Message-State: AOJu0YxmJTxS9GzDm719lGJtm3PrBBLEOpeQmggX7DrQ+lFHIpPytzG6 /7P/LEVEqYwC6IMRO62sE2B97HkYrmWXuKSbytIFxjKH657R05/DqJy4VPThheFvSDUGxCb8okQ jQyw= X-Google-Smtp-Source: AGHT+IHZCnSAeZmXFug3KKtLZH0MfJuWaLCNKks+x1iWxqZtNCVnYfsiE+VipJnWUmF/234JHljP0g== X-Received: by 2002:a17:90b:1996:b0:2c2:deda:8561 with SMTP id 98e67ed59e1d1-2d3aabec65emr2705405a91.41.1723636947657; Wed, 14 Aug 2024 05:02:27 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:27 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 6/9] systemd: Mitigate /var/log type mismatch issue Date: Wed, 14 Aug 2024 05:02:06 -0700 Message-Id: <32f9e9236be217531fdf1b87187fa05de703ca9b.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203317 From: Niko Mauno When VOLATILE_LOG_DIR evaluates as True, the base-files recipe provides /var/log -> /var/volatile/log symlink which is in conflict with systemd upstream tmpfiles.d/var.conf.in which defines it as a directory. This generates following error in journal: Jul 03 14:28:00 qemux86-64 systemd-tmpfiles[165]: "/var/log" already exists and is not a directory. Mitigate the issue by defining /var/log as symlink corresponding to the one created by base-files, when appropriate. (From OE-Core rev: 711ee36e88c8968e3c45ea787b3adcf64352adf9) Signed-off-by: Niko Mauno Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- meta/recipes-core/systemd/systemd_255.4.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_255.4.bb index f58a1bc2b6..0ccca8a567 100644 --- a/meta/recipes-core/systemd/systemd_255.4.bb +++ b/meta/recipes-core/systemd/systemd_255.4.bb @@ -307,9 +307,10 @@ do_install() { fi if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then - # /var/log is typically a symbolic link to inside /var/volatile, - # which is expected to be empty. + # base-files recipe provides /var/log which is a symlink to /var/volatile/log rm -rf ${D}${localstatedir}/log + printf 'L\t\t%s/log\t\t-\t-\t-\t-\t%s/volatile/log\n' "${localstatedir}" \ + "${localstatedir}" >>${D}${nonarch_libdir}/tmpfiles.d/00-create-volatile.conf elif [ -e ${D}${localstatedir}/log/journal ]; then chown root:systemd-journal ${D}${localstatedir}/log/journal From patchwork Wed Aug 14 12:02:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47774 X-Patchwork-Delegate: steve@sakoman.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 7F5D0C3DA4A for ; Wed, 14 Aug 2024 12:02:30 +0000 (UTC) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mx.groups.io with SMTP id smtpd.web11.96294.1723636949813483621 for ; Wed, 14 Aug 2024 05:02:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=f0hhdV9W; spf=softfail (domain: sakoman.com, ip: 209.85.215.171, mailfrom: steve@sakoman.com) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-7bb75419123so4461653a12.3 for ; Wed, 14 Aug 2024 05:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636949; x=1724241749; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ou49xhD4sD8kVdAnMfknOzxlWbK+44Oud1YA0NKu+3I=; b=f0hhdV9WB+Yi4FkPAjUV2xr5XHqqaMvZrOFsYPNUux52KblWO89vkAjWQR0JeIhFa0 0PCVwb9Nf2lv5oFzPF7tz4+25DTl822Tr3MGaihgiY1P6CdeQFtOoRtW6XnGEnoGVoXH CntJmJKjgoZ0wPSpz7PmNhLTIgKJGh3w8Lr4RGIBOsuCL8pVeOqdTbjY90DRyV2w2T0C feRFm6W10rM0nUv04Ebu9LKWxKTdk0wgCtwJojSrP8xa4+rVq7e52OJVj9DHH1+4yAG3 aw0PMe3TiHC6pGPy9o6m/hNrBXg7UwyAEWdjuRsMH1nsBQTCpw+gP1N6KX/IhzZRcp/g ZsPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636949; x=1724241749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ou49xhD4sD8kVdAnMfknOzxlWbK+44Oud1YA0NKu+3I=; b=f9+LJ7co3LxWhdTv6CvTYfwDP6N6WOrS2eKs5Z28eBUl8vMlag7JixA8j83hgKt7oQ /t5lzK6jVLzNh7jGCuH+Q0Lz6WSDrCV5VyreeDw3uKnbTlh3Hom70JRne3j0MxudWpIe riEW5iNXtvVU5Jvf6H/dT8peka+0SYx6zjYL7iPuzlZdh7f+lC1uqdXOf+XpkILErUKN HvVzJmW5Irv98mMQqJ/wsT5o8dWjLwMJL/lKo63uHxyF2ftLX3X7CgJ/pUv6QbvkqXu/ FsbWAm3WFK6iMXPQQ0Yhh1372Q+0HviS4p+bPEQuOB8D+RoBe3gTWnpkylZbcYD7Z5Bq XKAA== X-Gm-Message-State: AOJu0Yx9PwfE5BY2qaD2U68btRQWyWpjW1Oxe7ADC6t8FrGlecgiqlij wvI3BxTRXGiQR5pPR0x0OkyK0lEIYjmO2UrxvV4FzAE9KgudbRTXwVukuSrTCiyBwCUSxy2gvYz Mgd4= X-Google-Smtp-Source: AGHT+IGgldUGsZ3+MbUA3L64JNC1jmcxxOWutzbSsBq/CjeoTW3D2O2CRkl+hy7kR+smEq3tggdDgg== X-Received: by 2002:a17:90a:bd92:b0:2c9:7e6e:3578 with SMTP id 98e67ed59e1d1-2d3aaa71889mr2659564a91.7.1723636949005; Wed, 14 Aug 2024 05:02:29 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:28 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 7/9] systemd: Mitigate /var/tmp type mismatch issue Date: Wed, 14 Aug 2024 05:02:07 -0700 Message-Id: <1238b7e2889ba654964ca0a437aebc74ef7a54fc.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203318 From: Niko Mauno The base-files recipe provides /var/tmp -> /var/volatile/tmp symlink which is in conflict with systemd upstream tmpfiles.d/tmp.conf which defines it as a directory (or subvolume on btrfs). This generates following error in journal: Jul 03 15:37:21 qemux86-64 systemd-tmpfiles[158]: "/var/tmp" already exists and is not a directory. Mitigate the issue by defining /var/tmp as symlink corresponding to the one created by base-files. (From OE-Core rev: 1f1f6f45e3cfe24dfee8a09d01a5d32f3080e381) Signed-off-by: Niko Mauno Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- meta/recipes-core/systemd/systemd/00-create-volatile.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf index c4277221a2..043b2ef1d8 100644 --- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf @@ -6,3 +6,4 @@ d /run/lock 1777 - - - d /var/volatile/log - - - - d /var/volatile/tmp 1777 - - +L /var/tmp - - - - /var/volatile/tmp From patchwork Wed Aug 14 12:02:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47778 X-Patchwork-Delegate: steve@sakoman.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 CDD38C52D7B for ; Wed, 14 Aug 2024 12:02:40 +0000 (UTC) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mx.groups.io with SMTP id smtpd.web10.96187.1723636951487385662 for ; Wed, 14 Aug 2024 05:02:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=hIbW4hgk; spf=softfail (domain: sakoman.com, ip: 209.85.210.179, mailfrom: steve@sakoman.com) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-70d199fb3dfso5277478b3a.3 for ; Wed, 14 Aug 2024 05:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636951; x=1724241751; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BFKIXIva1SufJ27wPtxF5EtXeM4BxnEiNPt2PKXBXwE=; b=hIbW4hgkEJ1eUXjCIQFdHygDOcSdytzujadr3ZBo+r9xn/v5g9K6Zthug+xpVIbQvy 0trIzbDYlQeF+oZRfGSVoRk69nGjNOqs14sv76stS+RuHuomu1VesqlzHxcSU3I3qbNH T27sTmvBaZ2ev8tTLekKDAB2Z7RwyZllKkzSbjlOogAqH46aaAm7kMxRVeBXuKy3Wtpk y2f98gsydcPr/fTadDyWpfxJy1755IpJOjcbqlf/3yauINAyhbW0R294dOYcURG/h6tF l3Vq/BO5AZSirNE2BXUKeKoxhaPm79PbdaMEDId9nVuTSPOD2XwAv8szm5CnsJbIhPVB 6/ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636951; x=1724241751; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BFKIXIva1SufJ27wPtxF5EtXeM4BxnEiNPt2PKXBXwE=; b=DKI/R8qUvRwB7B3HaXi2yUlD7E0OYjWGn+kYtZWHwXODll5e/EOh3VkkJfAcbkZ7cD AP8GGYBu7p9VnJ2Gv8fGvO92MqzVylOWWpQk7rZemV6nORSZikEmMfjSBbbZzbQCnZJx zSUOUUTjMr38KIBbVxeSbC5G6z+gPV1O6NtytL1QIfjAxWCLu3h0rKvsYcD9iUZZ4GMd fZcnLWmBC8oF6PvpVcSwbp/C4qtp4UZ8ePhP4vlLaDqQPBdNiIqyRZpD7RQRKhLFQKye 3UNMJv8Ish4K46h35cvgNjU7KiCbheENAP9BeHoH4JGvN/tkvfWPzEfnWFqafNwjPG1q HKeA== X-Gm-Message-State: AOJu0YyITdr4oUYvO0RtstfckVJkEMV5c50v2cbyWFcR17E5PXl2+yO+ kTCZbzcTmsTjRGnQ1KRy4JK0KMmJmOIfIAP1XuY2yJS2O0Z+QKr9LlgvevXRpm8jYB19G+kVrmO z9DQ= X-Google-Smtp-Source: AGHT+IF+AOUD25N/hbSPuxV8fWZWvyAoU1r8/5Us5uXkCCbp3+aZ/olYtq6XCjGJscZnQRihalE5UQ== X-Received: by 2002:a05:6a21:3a81:b0:1c6:f043:693f with SMTP id adf61e73a8af0-1c8eae6f47dmr3217238637.17.1723636950620; Wed, 14 Aug 2024 05:02:30 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:30 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 8/9] image_types.bbclass: Use --force also with lz4,lzop Date: Wed, 14 Aug 2024 05:02:08 -0700 Message-Id: <59b60266edd078679df46cb4043353c4bd1662ca.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203319 From: Niko Mauno Several conversion commands already make use of 'force' option in the compression, which enables overwriting existing files without prompting. Since occasionally an existing residual destination file from a previously aborted or failed task can prevent the re-execution of the conversion command task, by enabling the 'force' option also for lz4 and lzop compression commands we can avoid following kind of BitBake failures with these compressors: | DEBUG: Executing shell function do_image_cpio | 117685 blocks | 2 blocks | example-image.cpio.lz4 already exists; do you want to overwrite (y/N) ? not overwritten | Error 20 : example-image.cpio : open file error | WARNING: exit code 20 from a shell command. ERROR: Task (.../recipes-core/images/example-image.bb:do_image_cpio) failed with exit code '1' (From OE-Core rev: 623ab22434909f10aaf613cd3032cc2a2c6e3ff9) Signed-off-by: Niko Mauno Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- meta/classes-recipe/image_types.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index 2f948ecbf8..28afff4571 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass @@ -335,8 +335,8 @@ CONVERSION_CMD:lzma = "lzma -k -f -7 ${IMAGE_NAME}.${type}" CONVERSION_CMD:gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}.${type} > ${IMAGE_NAME}.${type}.gz" CONVERSION_CMD:bz2 = "pbzip2 -f -k ${IMAGE_NAME}.${type}" CONVERSION_CMD:xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.${type} > ${IMAGE_NAME}.${type}.xz" -CONVERSION_CMD:lz4 = "lz4 -9 -z -l ${IMAGE_NAME}.${type} ${IMAGE_NAME}.${type}.lz4" -CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}.${type}" +CONVERSION_CMD:lz4 = "lz4 -f -9 -z -l ${IMAGE_NAME}.${type} ${IMAGE_NAME}.${type}.lz4" +CONVERSION_CMD:lzo = "lzop -f -9 ${IMAGE_NAME}.${type}" CONVERSION_CMD:zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}.${type}.zip ${IMAGE_NAME}.${type}" CONVERSION_CMD:7zip = "7za a -mx=${7ZIP_COMPRESSION_LEVEL} -mm=${7ZIP_COMPRESSION_METHOD} ${IMAGE_NAME}.${type}.${7ZIP_EXTENSION} ${IMAGE_NAME}.${type}" CONVERSION_CMD:zst = "zstd -f -k -c ${ZSTD_DEFAULTS} ${IMAGE_NAME}.${type} > ${IMAGE_NAME}.${type}.zst" From patchwork Wed Aug 14 12:02:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 47779 X-Patchwork-Delegate: steve@sakoman.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 C85EEC3DA4A for ; Wed, 14 Aug 2024 12:02:40 +0000 (UTC) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web10.96188.1723636953677531804 for ; Wed, 14 Aug 2024 05:02:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=vLvw8w2Z; spf=softfail (domain: sakoman.com, ip: 209.85.214.169, mailfrom: steve@sakoman.com) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-201d5af11a4so7423855ad.3 for ; Wed, 14 Aug 2024 05:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1723636953; x=1724241753; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PA7hkJNObA2mqqkW9MldrO9LLRzZlNZBtzHqdckrOdY=; b=vLvw8w2ZsYYLgiJ+UC7IhkCi0o7ZIuz+aYlELO77hzh9cAkZhopcW/P5TIvVIzezZo deNEx9HmEI99aL34eTtEZUvoVnn01kJ5sbJvqN7aeWyI87+1q6A7/7PCfAQdzQ7YGP+J NFO8k8+jFUxKUlKd46N+/8p/1cKlZP3Tc0pwGgN/2xO3UmUGKWzxfKwjU1ILHqrY2B4n iNmhYGKYvyl0H1JEUENldJ+K0jYQ4J9u9xfHxYnR4DDPKrTC/2YeXFGrC68oZXAsXuh4 Np7JmA1nsHPKvqcO/6KYEQk9gUOgeWTH23lt7iVsz43woZN2xenxGhyhHJzqWM0W3l4w S7cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723636953; x=1724241753; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PA7hkJNObA2mqqkW9MldrO9LLRzZlNZBtzHqdckrOdY=; b=VD6XDa12ewsE595+/WDRAnqMoXI8jf4T6WgOl7UPr+abQmvQpmfXCyoCmR2jOsbCv4 BL7VKRmK7X+XsrkgylWYulwNpJVJE8JS+btLiwkqfmrZ5P6ZISzDVpc+0PuNpXFRznf6 T3OhWOFMdbFQSSUvwnbSmQcTZE+FwgdOc1aRZll2cfpCR567AYYVCMkYOO53ezIi+cUl fVESOGrgtNzYW7oB6hIn38EAjCXsVZea48i7H+FmAESWUrnGgCxszewUhP6PwdsQPYHE hoLMDZl8QYNNoRf7a8fUe+GEt0HuHAyM/LvwO4roLIe00Cphu+ZnYDhEtdaq/zyYoBIH OSiw== X-Gm-Message-State: AOJu0Yz7Mjx7ABdeu3zdO7Nu5rIyO3SkGqpfLsuZ618u04W4el66AKfG 2Krkb5Rk16rxJenEiBNv4zOlk5YqFTbAk4Jka0UYi1Zc1xSAmjTyMq8KSGi5uKmKX2nOnzx3KnJ 7vbc= X-Google-Smtp-Source: AGHT+IG6ALFjkSUcamI5IYKVLFvPo3qeZy/xLPrBi3VkwgK+uAa6dNzt43ys8+ahnzkrMci18vaK5g== X-Received: by 2002:a17:903:22cb:b0:1fb:451a:449b with SMTP id d9443c01a7336-201d64c966dmr27709755ad.60.1723636952364; Wed, 14 Aug 2024 05:02:32 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3ac80e0d1sm1512214a91.43.2024.08.14.05.02.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 05:02:32 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 9/9] u-boot.inc: Refactor do_* steps into functions that can be overridden Date: Wed, 14 Aug 2024 05:02:09 -0700 Message-Id: <0b86ba7fb0303bab7b4d953c5c97eea1debc8bf3.1723636705.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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 ; Wed, 14 Aug 2024 12:02:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203320 From: Ryan Eatmon The looping logic for handling (and not handling) UBOOT_CONFIG has led to the various do_* functions to be large and unwieldy. In order to modify one of the functional blocks inside of a loop (or in the else condition) means you either have to replace the function entirely, or append the function and undo something it did and then do what you need for your change. This refactor breaks out all of the inner loops and else clauses into new functions that themselves can be overridden without needing to worry about the bulk of the looping logic. It should not break any existing recipes doing prepends, appends, or overrides. None of the functional blocks were changed, just refactored out into new functions. Backport from master: https://git.openembedded.org/openembedded-core/commit/?id=937bcc229502fcc154cc676b4fcc93c561873def Signed-off-by: Ryan Eatmon Signed-off-by: Steve Sakoman --- meta/recipes-bsp/u-boot/u-boot-configure.inc | 36 ++- meta/recipes-bsp/u-boot/u-boot.inc | 281 ++++++++++++------- 2 files changed, 208 insertions(+), 109 deletions(-) diff --git a/meta/recipes-bsp/u-boot/u-boot-configure.inc b/meta/recipes-bsp/u-boot/u-boot-configure.inc index 378d675364..a15511f8b2 100644 --- a/meta/recipes-bsp/u-boot/u-boot-configure.inc +++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc @@ -18,23 +18,35 @@ do_configure () { for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); if [ $j -eq $i ]; then - oe_runmake -C ${S} O=${B}/${config} ${config} - if [ -n "${@' '.join(find_cfgs(d))}" ]; then - merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} - oe_runmake -C ${S} O=${B}/${config} oldconfig - fi + uboot_configure_config $config $type fi done unset j done unset i else - if [ -n "${UBOOT_MACHINE}" ]; then - oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} - else - oe_runmake -C ${S} O=${B} oldconfig - fi - merge_config.sh -m .config ${@" ".join(find_cfgs(d))} - cml1_do_configure + uboot_configure fi } + +uboot_configure_config () { + config=$1 + type=$2 + + oe_runmake -C ${S} O=${B}/${config} ${config} + if [ -n "${@' '.join(find_cfgs(d))}" ]; then + merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))} + oe_runmake -C ${S} O=${B}/${config} oldconfig + fi +} + +uboot_configure () { + if [ -n "${UBOOT_MACHINE}" ]; then + oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} + else + oe_runmake -C ${S} O=${B} oldconfig + fi + merge_config.sh -m .config ${@" ".join(find_cfgs(d))} + cml1_do_configure +} + diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index f5b43f6e36..3c01720192 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc @@ -54,40 +54,21 @@ do_compile () { if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ] then - unset i j k + unset i j for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); if [ $j -eq $i ] then - oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} - for binary in ${UBOOT_BINARIES}; do - k=$(expr $k + 1); - if [ $k -eq $i ]; then - cp ${B}/${config}/${binary} ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} - fi - done - - # Generate the uboot-initial-env - if [ -n "${UBOOT_INITIAL_ENV}" ]; then - oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env - cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type} - fi - - unset k + uboot_compile_config $i $config $type fi done unset j done unset i else - oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} - - # Generate the uboot-initial-env - if [ -n "${UBOOT_INITIAL_ENV}" ]; then - oe_runmake -C ${S} O=${B} u-boot-initial-env - fi + uboot_compile fi if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ] @@ -96,6 +77,46 @@ do_compile () { fi } +uboot_compile_config () { + i=$1 + config=$2 + type=$3 + + oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} + + unset k + for binary in ${UBOOT_BINARIES}; do + k=$(expr $k + 1); + if [ $k -eq $i ]; then + uboot_compile_config_copy_binary $config $type $binary + fi + done + unset k + + # Generate the uboot-initial-env + if [ -n "${UBOOT_INITIAL_ENV}" ]; then + oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env + cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type} + fi +} + +uboot_compile_config_copy_binary () { + config=$1 + type=$2 + binary=$3 + + cp ${B}/${config}/${binary} ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} +} + +uboot_compile () { + oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} + + # Generate the uboot-initial-env + if [ -n "${UBOOT_INITIAL_ENV}" ]; then + oe_runmake -C ${S} O=${B} u-boot-initial-env + fi +} + do_install () { if [ -n "${UBOOT_CONFIG}" ] then @@ -105,32 +126,14 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} - - # Install the uboot-initial-env - if [ -n "${UBOOT_INITIAL_ENV}" ]; then - install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${type} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV} - fi + uboot_install_config $config $type fi done unset j done unset i else - install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} - ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} - - # Install the uboot-initial-env - if [ -n "${UBOOT_INITIAL_ENV}" ]; then - install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV} - fi + uboot_install fi if [ -n "${UBOOT_ELF}" ] @@ -143,17 +146,14 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} + uboot_install_elf_config $config $type fi done unset j done unset i else - install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + uboot_install_elf fi fi @@ -172,17 +172,14 @@ do_install () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE} + uboot_install_spl_config $config $type fi done unset j done unset i else - install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} + uboot_install_spl fi fi @@ -198,6 +195,63 @@ do_install () { fi } +uboot_install_config () { + config=$1 + type=$2 + + install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} + + # Install the uboot-initial-env + if [ -n "${UBOOT_INITIAL_ENV}" ]; then + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${type} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV} + fi +} + +uboot_install () { + install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + + # Install the uboot-initial-env + if [ -n "${UBOOT_INITIAL_ENV}" ]; then + install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV} + fi +} + +uboot_install_elf_config () { + config=$1 + type=$2 + + install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} +} + +uboot_install_elf () { + install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} +} + +uboot_install_spl_config () { + config=$1 + type=$2 + + install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE} +} + +uboot_install_spl () { + install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} +} + PACKAGE_BEFORE_PN += "${PN}-env ${PN}-extlinux" RPROVIDES:${PN}-env += "u-boot-default-env" @@ -223,40 +277,14 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - cd ${DEPLOYDIR} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} - - # Deploy the uboot-initial-env - if [ -n "${UBOOT_INITIAL_ENV}" ]; then - install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} - cd ${DEPLOYDIR} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${type} - fi + uboot_deploy_config $config $type fi done unset j done unset i else - install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} - - cd ${DEPLOYDIR} - rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} - - # Deploy the uboot-initial-env - if [ -n "${UBOOT_INITIAL_ENV}" ]; then - install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} - cd ${DEPLOYDIR} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV} - fi + uboot_deploy fi if [ -e ${WORKDIR}/fw_env.config ] ; then @@ -276,20 +304,14 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + uboot_deploy_elf_config $config $type fi done unset j done unset i else - install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} - ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + uboot_deploy_elf fi fi @@ -304,21 +326,14 @@ do_deploy () { j=$(expr $j + 1); if [ $j -eq $i ] then - install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} - rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK} + uboot_deploy_spl_config $config $type fi done unset j done unset i else - install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} + uboot_deploy_spl fi fi @@ -342,4 +357,76 @@ do_deploy () { fi } +uboot_deploy_config () { + config=$1 + type=$2 + + install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + cd ${DEPLOYDIR} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} + ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} + + # Deploy the uboot-initial-env + if [ -n "${UBOOT_INITIAL_ENV}" ]; then + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} + cd ${DEPLOYDIR} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${type} + fi +} + +uboot_deploy () { + install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + + cd ${DEPLOYDIR} + rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} + + # Deploy the uboot-initial-env + if [ -n "${UBOOT_INITIAL_ENV}" ]; then + install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} + cd ${DEPLOYDIR} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE} + ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV} + fi +} + +uboot_deploy_elf_config () { + config=$1 + type=$2 + + install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} +} + +uboot_deploy_elf () { + install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} +} + +uboot_deploy_spl_config () { + config=$1 + type=$2 + + install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} + rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK} +} + +uboot_deploy_spl () { + install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} +} + addtask deploy before do_build after do_compile