From patchwork Fri May 3 13:53:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 43241 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 5F149C25B5C for ; Fri, 3 May 2024 13:53:29 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web11.13400.1714744404112597471 for ; Fri, 03 May 2024 06:53:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=qdJurIg7; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6f43015b763so1248054b3a.0 for ; Fri, 03 May 2024 06:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1714744403; x=1715349203; 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=ue3sfaaHxcXo2C21VmFxlpEGL/76/YvB/Cv4QQkH+xA=; b=qdJurIg7mmHk1hUo0YjEfRiEs95qkWol65c6Gng1QAvqiTd6GDQ9Bwmpg2UfyIaKRg 6LCV4ZOd1XW0LFktgEL7KIw882lO2hUkTKNo+r2o5dPL1zDlvTv4DuHZBrmPW4ASRHPl p0ToVGMlgM3ES88pc16vTDZKB/EYKa/DeLbSYYrqkNWnVFIMCHDvNsv+dm0QolL9n43y 8msvW9t3jP5eMucgzlY48NIDEEed/O/J2/GUX7ZOEaxksYF6JEZxtG9/WEofVNLsa6qA 8TZ57n77v+d7b/f0voeUgt6OywJ1FdmtepANjzNUht3/hEBmJTIYCyD7wjgKNAdFWt0G cB8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714744403; x=1715349203; 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=ue3sfaaHxcXo2C21VmFxlpEGL/76/YvB/Cv4QQkH+xA=; b=E2352rD+KgtBxvL9ln9Ea8hLbXHEOoLU+rJD2L7+eol3yDUejOVOwegpdNvBXNlGl2 SX+OVrzeeN40VhWNvmkhQJutXK9I6FsK1OzZnDYVdBpYcuTZuJ4mDKV08KoaKSLTvKme HJ8XH4CrT17fW6ehK/1Tjbuosc2JyyyGpdTlvYlzCYldCYKwzVbfJk6BOqWOYyh9scJT x92Zyd/Ch7NbXRE+I15vIDWa2Sy53qh0c5qoR5yzLsfdrWiPa72Uxp3rWVzzK3XqGOyu gnRXtD6WQkhEGqQFXJs89ZSVE7btvRPpIjhK2PJy56UHE76apuAvu6ua1icCO4A4/vs9 p1sA== X-Gm-Message-State: AOJu0Yxu96xk1Xs3C9KYBv2yaCFHkTjqmYQCi/Bq/7RMoG/NGap5vm0z gdstd2okp0yICPF6ONuYieb5NunqziQGH+nnjyHMosSOQAbOE7Ptea06pSldYsexVJFGMn+Qp1q 5 X-Google-Smtp-Source: AGHT+IHtq7jIgf5pHzbxyjKWgfe0IJKpac0L99NW/5CgQqyN4zEbgyZnJhA7zoUzx5mMOgzljWZpAQ== X-Received: by 2002:a05:6a20:9f0b:b0:1ad:7e68:570c with SMTP id mk11-20020a056a209f0b00b001ad7e68570cmr3996823pzb.4.1714744402958; Fri, 03 May 2024 06:53:22 -0700 (PDT) Received: from xps13.. ([209.237.67.158]) by smtp.gmail.com with ESMTPSA id e2-20020a056a0000c200b006ecee611c05sm3044941pfj.182.2024.05.03.06.53.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 06:53:22 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 1/3] sstate.bbclass: Add _SSTATE_EXCLUDEDEPS_SYSROOT to vardepsexclude Date: Fri, 3 May 2024 06:53:12 -0700 Message-Id: <4138f0a048149195d39347d97f8155199b6cf0cb.1714744247.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 ; Fri, 03 May 2024 13:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198993 From: Mark Hatle When using tinfoil to control the build, multiple commands (serially) could trigger an error such as: When reparsing ....bb:do_package, the basehash value changed from ... to .... The metadata is not deterministic and this needs to be fixed. ERROR: The following commands may help: ERROR: $ bitbake esw-conf -cdo_package -Snone ERROR: Then: ERROR: $ bitbake esw-conf -cdo_package -Sprintdiff However following these commands it was not able to be reproduced. Forcing bitbake to dump the signatures and then running bitbake-diffsigs showed that the value of _SSTATE_EXCLUDEDEPS_SYSROOT was being set in one run, but was blank is a different version. Upon inspecting the code in sstate.bbclass, one usage (without the _) is already excludes, the leading _ version is used as a cache, only if set but is not actually required to be defined. So ignoring the value should work properly. Signed-off-by: Mark Hatle Signed-off-by: Richard Purdie (cherry picked from commit 4ec704ed6a1cfaf0a6c20f2038e7192e361ef590) Signed-off-by: Steve Sakoman --- meta/classes-global/sstate.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass index 04539bbb99..76a7b59636 100644 --- a/meta/classes-global/sstate.bbclass +++ b/meta/classes-global/sstate.bbclass @@ -1115,7 +1115,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, bb.parse.siggen.checkhashes(sq_data, missed, found, d) return found -setscene_depvalid[vardepsexclude] = "SSTATE_EXCLUDEDEPS_SYSROOT" +setscene_depvalid[vardepsexclude] = "SSTATE_EXCLUDEDEPS_SYSROOT _SSTATE_EXCLUDEDEPS_SYSROOT" BB_SETSCENE_DEPVALID = "setscene_depvalid" From patchwork Fri May 3 13:53:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 43242 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 6C245C10F16 for ; Fri, 3 May 2024 13:53:29 +0000 (UTC) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web11.13402.1714744405330003059 for ; Fri, 03 May 2024 06:53:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=opK647i5; spf=softfail (domain: sakoman.com, ip: 209.85.210.181, mailfrom: steve@sakoman.com) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6f449ea8e37so875648b3a.3 for ; Fri, 03 May 2024 06:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1714744405; x=1715349205; 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=Z2PeMhrwbbrPyXzbUV1xnKjRNhEhkPwesMDGTUhXXPQ=; b=opK647i5xqL2Co9fex49P8rhEPx+m7Q+HIUdD/rA3/+71fjlhIBsa+amM25Y5aHE4Z +KSkyTwOa2IRkOUazOsUU9mS8kQda83+fHPV5jBM5sD/0nr3Q5zFMwunFgYqI34cay+P wKZdzz6dEX2gcpnKOxk1uTeSoe6WkzfNONA0dI3AujXkHZWLklQARqUUEnt4Owptu1gM cl08/Z7EBWNgBwD+BqG4j+W0XNmMGVvBnI6rMNxRs6MEgv/Y2+pLx8ENSfi6ToBH/cqi bvey0cRoZ5qWdz421stfBg6QWPE/GgwicN9/U5A6dof1FaZjbQZBtNJVD5Ii4pqdxUOb ACvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714744405; x=1715349205; 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=Z2PeMhrwbbrPyXzbUV1xnKjRNhEhkPwesMDGTUhXXPQ=; b=rQ+sD8tNXhBsCjXJJQOarlPmyTYaLCewhwICXAdYU0wVPBKhvhqZH6t6F8k0Hwees8 Yl43spnAw7qmjRfSUc1V+PFUKoqX/RsNYA98f/eIkBVbhJSEDNqXQSSDKxJLLvujQiLu xxronaBx3hPEr7WXCjLnSjnokU/HCo+M6b1exqxf1dmAyTpd9g5Wu/kA2jupxycTo2lB THfe/I0TrFQewMaJijJcRuyK+mwVNCuY9H4rkUr8OK1FY6aA6NdGAD8yIANLwF4sBHI/ jU3AwXuOrxZesNgqEXvyyRsutq83LSjutliQhZKkMuJwxLMURKPUOjW44TIWF1HGqLgh c1Ow== X-Gm-Message-State: AOJu0YwhzDCUEFZzSdMH27BSPx1cCc5P97pjbp5cx8enbC05zihPXgeg PhAGuT9M+Q2FgUnV7OpiTXkUKAYNWlGuTMIq/W5g9ryIP2iSewAqBGEw3x8GuIjMmsp+0LjOZDU 2 X-Google-Smtp-Source: AGHT+IE3sSZfIBqDTcDr+Cabo4ueieRKw9UtbBuzRu1UTgB74AGRRnFrKgnF3ZUwsPWRzrUhBIlMfw== X-Received: by 2002:a05:6a00:4610:b0:6ea:f4ad:7298 with SMTP id ko16-20020a056a00461000b006eaf4ad7298mr3093060pfb.34.1714744404419; Fri, 03 May 2024 06:53:24 -0700 (PDT) Received: from xps13.. ([209.237.67.158]) by smtp.gmail.com with ESMTPSA id e2-20020a056a0000c200b006ecee611c05sm3044941pfj.182.2024.05.03.06.53.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 06:53:24 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 2/3] scripts/oe-setup-build: write a build environment initialization one-liner into the build directory Date: Fri, 3 May 2024 06:53:13 -0700 Message-Id: <4bf3f11e39312cfce59d4652804faf0eec6b5ace.1714744247.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 ; Fri, 03 May 2024 13:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198994 From: Alexander Kanavin With this, users no longer have to know where oe-init-build-env is relative to the build directory; that information is contained in the one liner and then it's possible to simply use that: . /path/to/build/init-build-env This will particularly help with initializing builds in unpacked build bundles, as users won't have to know where oe-init-build-env is in the bundle directory tree - similar to esdk initialization. (From OE-Core rev: 1cabdf287c2739accdab3a766df060f1bc802b63) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- scripts/oe-setup-build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/oe-setup-build b/scripts/oe-setup-build index 5364f2b481..c0476992a2 100755 --- a/scripts/oe-setup-build +++ b/scripts/oe-setup-build @@ -91,7 +91,16 @@ def setup_build_env(args): builddir = args.b if args.b else template["buildpath"] no_shell = args.no_shell coredir = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) - cmd = "TEMPLATECONF={} . {} {}".format(template["templatepath"], os.path.join(coredir, 'oe-init-build-env'), builddir) + cmd_base = ". {} {}".format(os.path.join(coredir, 'oe-init-build-env'), os.path.abspath(builddir)) + + initbuild = os.path.join(builddir, 'init-build-env') + if not os.path.exists(initbuild): + os.makedirs(builddir, exist_ok=True) + with open(initbuild, 'w') as f: + f.write(cmd_base) + print("\nRun '. {}' to initialize the build in a current shell session.\n".format(initbuild)) + + cmd = "TEMPLATECONF={} {}".format(template["templatepath"], cmd_base) if not no_shell: cmd = cmd + " && {}".format(os.environ['SHELL']) print("Running:", cmd) From patchwork Fri May 3 13:53:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 43243 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 77217C25B5F for ; Fri, 3 May 2024 13:53:29 +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.web10.13222.1714744406523874834 for ; Fri, 03 May 2024 06:53:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Ict8/iLZ; 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-6f3e3d789cdso6698582b3a.1 for ; Fri, 03 May 2024 06:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1714744406; x=1715349206; 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=KUBdXyDQiiF6V/4biQ4tWzrnIlHgE3iqaWXrHlzBiho=; b=Ict8/iLZ8u3+u0YYTRzNm7KqmEP2/peDfujGAIz/czEJUIQtBgg1c8rmXiIU6iwk+G KTf3hdp/QUtmUirAIObTzab/xjd5Mx9qxnhF+XfKTKOTu5c0HtHfn+HmH34OSOttu/Ks BuT2tt9PWoJRCDKMp2eJ/epjMEN5BdYN6vg29kCbiI3SmAoVXBg2LeBevPARfGXTum5K KjU68R/BeMm3OZNCpDwb+b2msvqmSVHxMvj/Ah9E43rM7WTEtBLbYiUDmPre+PyTHDHn R7qcDpFQb2EjXnxl7yXKLRiBHRtSCMrWCfII554lXL+jWOuseaOGm6hKvW+j7jz1eP7R +IwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714744406; x=1715349206; 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=KUBdXyDQiiF6V/4biQ4tWzrnIlHgE3iqaWXrHlzBiho=; b=VbC6RQhjcDCRKiof80zYaiZWWl2LVNu1inIbPEpKcSkgfStgcLaNovKCMMAcDAo+hx Myr/0RrYSAXZHjRQUof+kx8ygzoG89CO0blsVeIKUzHo74sBoUVKaM/eW30MFXq4shsM 0UFHI7LWTGDb1aJNgHwhCDs5WJj74pBeYxWoyJNxhSBHsNiR92rlgx8jIOCxJjJe36DY vqm86wwQ/ZNLbrWQR6q8uqIOe89yVruc4DG6pJfBQG8skeYtrENioP8Pae8YZwCXOlgm oY+7EZq2T05Wq6Xv22a4hHVRJbroyD7fXDH4W1zoPm7cXQfCQiZWa2RuZ6QbT5iVyNhk iYBQ== X-Gm-Message-State: AOJu0Ywon6aUc5tYeLcKFOkb4lwbur/JMmt7hey5CEaWzYqi2H1BinVy L2JP/kkj4ibIPw9SF38MyYLD4w72y/ZWHWvkbZ2udsxONVcrrN4sS3OISlMgOilAm1H9B9TBblu C X-Google-Smtp-Source: AGHT+IFZvAydwqhvWM03v5V6JFWbkLX5+C5wC6EY5G6Ev69gxefEM+ccRDHl1EgkJkXBRgVyexMeYQ== X-Received: by 2002:a05:6a20:12cb:b0:1a7:4f8b:6439 with SMTP id v11-20020a056a2012cb00b001a74f8b6439mr3530043pzg.34.1714744405782; Fri, 03 May 2024 06:53:25 -0700 (PDT) Received: from xps13.. ([209.237.67.158]) by smtp.gmail.com with ESMTPSA id e2-20020a056a0000c200b006ecee611c05sm3044941pfj.182.2024.05.03.06.53.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 06:53:25 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 3/3] systemd: sed ROOT_HOME only if sysusers PACKAGECONFIG is set Date: Fri, 3 May 2024 06:53:14 -0700 Message-Id: <6954cd4bb60762f86981621e8b37dbe5e8236640.1714744247.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 ; Fri, 03 May 2024 13:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198995 From: Christian Bräuner Sørensen Fixes a bug introducted in ebafe46379 systemd: upgrade to 255.1. Besides updating systemd, that commit also made other changes. One of them being when to perform the replacement in order to fix ROOT_HOME. Previously, that happened on a configure prefunc and on ${S}/sysusers.d/basic.conf.in. Now it happens in install and on image/usr/lib/sysusers.d/basic.conf. However, that file is not present if sysusers is not in PACKAGECONFIG, since that file in that case is not installed hence resulting in: sed: can't read /image/usr/lib/sysusers.d/basic.conf: No such file or directory Previously, in the case of sysusers not being in PACKAGECONFIG, that was a "silent error" since the replacement was done but the file was not really used since the file was not installed. Signed-off-by: Christian Bräuner Sørensen Signed-off-by: Richard Purdie Signed-off-by: Martin Hundebøll Signed-off-by: Steve Sakoman --- meta/recipes-core/systemd/systemd_255.4.bb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_255.4.bb index e7498c802d..f58a1bc2b6 100644 --- a/meta/recipes-core/systemd/systemd_255.4.bb +++ b/meta/recipes-core/systemd/systemd_255.4.bb @@ -271,14 +271,16 @@ WATCHDOG_TIMEOUT ??= "60" do_install() { meson_do_install - # Change the root user's home directory in /lib/sysusers.d/basic.conf. - # This is done merely for backward compatibility with previous systemd recipes. - # systemd hardcodes root user's HOME to be "/root". Changing to use other values - # may have unexpected runtime behaviors. - if [ "${ROOT_HOME}" != "/root" ]; then - bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" - sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf - fi + if ${@bb.utils.contains('PACKAGECONFIG', 'sysusers', 'true', 'false', d)}; then + # Change the root user's home directory in /lib/sysusers.d/basic.conf. + # This is done merely for backward compatibility with previous systemd recipes. + # systemd hardcodes root user's HOME to be "/root". Changing to use other values + # may have unexpected runtime behaviors. + if [ "${ROOT_HOME}" != "/root" ]; then + bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" + sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf + fi + fi install -d ${D}/${base_sbindir} if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then # Provided by a separate recipe