From patchwork Thu Sep 14 11:25:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 30444 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 B4610EDE9AC for ; Thu, 14 Sep 2023 11:25:57 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web11.9525.1694690749892871975 for ; Thu, 14 Sep 2023 04:25:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=hrBVbH+r; spf=pass (domain: gmail.com, ip: 209.85.208.43, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-52bd9ddb741so1001109a12.0 for ; Thu, 14 Sep 2023 04:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694690748; x=1695295548; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CMUfp/GSwbXqodtQDIZCDOwLR4plKxbJL719NyDo//k=; b=hrBVbH+rroVBLvLWRAb7hCaXWzJ3mPKlsQi9D+W9+FyKjwLpITv5wuF1JoAskMDIXi BPqFDyU+LAnGF2d4D4ikyYYgVVvgBuYxE0SdJzsljwSF1jItGzrZp8BdSVr83SHeHV3q PqGCv+TEX/TnfdtVgGqdNVEWSyvkAB5IX8edq1/IfkhYNndXEZg4YdEZSHFWqlZOkLSM JO+FwwnTQZt3fCyKi54Om4dGGIDSyJVBvV6w74qR285x+TbDI9Zr2X9fq3C3PWloUZzI vlQPM9RXRdCM86pWv6BHpZ9rhNUd7URsBl5Q1Wv5WAu0X9wSv3cb0I1zOfnDVatmJ3lz 92hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694690748; x=1695295548; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CMUfp/GSwbXqodtQDIZCDOwLR4plKxbJL719NyDo//k=; b=FfJ5WrBUxLOB4Pk/XPb6bVTU0CnzxMScQQArQYiYLyyddGP5Xyht7HS5NGI7PpEZxL rZ1kN21Mk9VI2BwHpyU1s0hC3pXtZsw/ejWd5oXSJ/LIYHO7+gffkOeabnMn1+Rf0Vbt pHOiGCESjSYZr+VkZP2SZZYN4pqiS4tuUJ4e89iWr/ASLwG8WZeEcDH85g0BndWnRbeJ V6FbecISEZCnS4E728PM2BgTXFtThBctlPj993pD/Aeed0lXSm/5565sPXKiv9M7IIV8 0STZdPV9npXM26iyh5sGdKZWjzJRJHZjJnDQxKqWOHWJOxfP4caT5eUIudXfCp37hcdv wc8Q== X-Gm-Message-State: AOJu0YwfnM1JAWIDoWA36mrWbj5FG+lDg3u0ByXZ5cayoB5W6ify6PlI err/rhtfOwwXmz0f930/GeMF2VyMTgQ= X-Google-Smtp-Source: AGHT+IHRtdnSjtOIAe7diT7BCbhuOk4epbtB/y/2CUukwImKNR2Xl/xzLrvpVJfhrr2QubiHZY/uWA== X-Received: by 2002:a17:906:20d0:b0:99d:dce8:41d6 with SMTP id c16-20020a17090620d000b0099ddce841d6mr4347245ejc.71.1694690747636; Thu, 14 Sep 2023 04:25:47 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id o23-20020a170906861700b00992d70f8078sm873832ejx.106.2023.09.14.04.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:25:47 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 1/3] meta/conf/templates/default/conf-description.txt: add a template description Date: Thu, 14 Sep 2023 13:25:38 +0200 Message-Id: <20230914112540.2214062-1-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 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 ; Thu, 14 Sep 2023 11:25:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/187634 Existing conf-notes.txt is not adequate in situations where the user needs to select a config template from several, or get an overview of them and is interested only in a brief explanation of what the template is for, but not extended multi-paragraph instructions for how to use it. Such descriptions can be provided via conf-description.txt and this patch adds such a description for the oe-core default template. Updates to the tools and a tool for selecting templates which will make specific use of the description will follow. Signed-off-by: Alexander Kanavin --- meta/conf/templates/default/conf-description.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 meta/conf/templates/default/conf-description.txt diff --git a/meta/conf/templates/default/conf-description.txt b/meta/conf/templates/default/conf-description.txt new file mode 100644 index 00000000000..e49172fa0ce --- /dev/null +++ b/meta/conf/templates/default/conf-description.txt @@ -0,0 +1 @@ +This is the default build configuration for the openembedded-core layer. From patchwork Thu Sep 14 11:25:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 30443 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 B5579EDE9A9 for ; Thu, 14 Sep 2023 11:25:57 +0000 (UTC) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mx.groups.io with SMTP id smtpd.web10.9605.1694690749746031610 for ; Thu, 14 Sep 2023 04:25:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=CLTUQd99; spf=pass (domain: gmail.com, ip: 209.85.218.49, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-9a9d6b98845so437857366b.0 for ; Thu, 14 Sep 2023 04:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694690748; x=1695295548; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qJV9xIkegC/1KTNNCLgDN077WlgsoZu4GiJ8/lyG+Ss=; b=CLTUQd99fy8GsWV8M4UbbHLz7hD/Ep8YWEt/nqNkLa2CzJEKH/7MVkjc4V24fuKH54 hBXzvcror2Pe0WKl8Wu2vI+B85v0WgxqYJQUiiZdPkmQ/PhCbmLIPz1L2VN0iyNDnK1Q WF1fU5roxlWV6xrj5JAu1RY8S+0ZzIBa0Flb0CydhENR8QsgCbPNgxq2+rMZGyp9Fr+e tYSPq/qXaZm7fY2wWb+5DtMs0+4qLNjr0n3OOxb0pKb+NZ9nWsBjfqwK858HUApTh2NI fV8vVSgA8ah6rbPVFhLrVTVGm3l1ljr34rJqjNXJvo59ODw4qpnFB7AmLmXE029HJ7D9 xuFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694690748; x=1695295548; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qJV9xIkegC/1KTNNCLgDN077WlgsoZu4GiJ8/lyG+Ss=; b=XexLu9fA2R77NZ/3BKVs3NjDmyHPNdqitRkJnAeAIbTT3U7kyV6zoh5/j1pqFd15A5 2ehtRgYx32JX494flspNAGpuFeOY7kRaG1iCiZbHHz6GN0fitdX3TTAGsZQjr4+/6ELY mR7J934uCE7m4SvaSCQh/fZI+S37J4WzxKyKuznaOtLTeOqhAI5AY/gkEtzEZc50tUW9 1O7aka7KZPRLaI6nGFwV9C4gqiu7+kzt6fgRhxTjZl46Q0L5B/rGIfgHk+hzE33L6qjK aK4Eg2pNWSrV6VevinGCIb5240ZwslXIl/qTuEG8TwmCrCtTWrGDnoX2pEx0UTMJK8J3 fXtA== X-Gm-Message-State: AOJu0YxU27sTEyIdq9D3y3Sryf4TrT3Yh7D6W5AZpK+o0Sv+oZbah10c FAxRvFKaRBbzr4U3D224M2Op+qpp9e4= X-Google-Smtp-Source: AGHT+IGzDLSLxZtyuzN6eYMFcBFToeLYLLJMLHo3CrW+LKGTNRtAwawBGouugQvvEZhE1AoUpldeEA== X-Received: by 2002:a17:906:73cc:b0:9a9:f0e6:904e with SMTP id n12-20020a17090673cc00b009a9f0e6904emr2121539ejl.16.1694690748116; Thu, 14 Sep 2023 04:25:48 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id o23-20020a170906861700b00992d70f8078sm873832ejx.106.2023.09.14.04.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:25:47 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 2/3] meta/lib/bblayers/buildconf.py: add support for configuration descriptions Date: Thu, 14 Sep 2023 13:25:39 +0200 Message-Id: <20230914112540.2214062-2-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230914112540.2214062-1-alex@linutronix.de> References: <20230914112540.2214062-1-alex@linutronix.de> 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 ; Thu, 14 Sep 2023 11:25:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/187633 Signed-off-by: Alexander Kanavin --- meta/lib/bblayers/buildconf.py | 10 ++++++++-- meta/lib/oeqa/selftest/cases/bblayers.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meta/lib/bblayers/buildconf.py b/meta/lib/bblayers/buildconf.py index ccab332adfb..a299b135669 100644 --- a/meta/lib/bblayers/buildconf.py +++ b/meta/lib/bblayers/buildconf.py @@ -26,7 +26,10 @@ def plugin_init(plugins): return BuildConfPlugin() class BuildConfPlugin(LayerPlugin): - notes_fixme = """FIXME: Please place here the description of this build configuration. + notes_fixme = """FIXME: Please place here the detailed instructions for using this build configuration. +They will be shown to the users when they set up their builds via TEMPLATECONF. +""" + description_fixme = """FIXME: Please place here the short description of what this build configuration is for. It will be shown to the users when they set up their builds via TEMPLATECONF. """ @@ -47,14 +50,17 @@ It will be shown to the users when they set up their builds via TEMPLATECONF. bblayers_data = bblayers_data.replace(abspath, "##OEROOT##/" + relpath) dest.write(bblayers_data) + with open(os.path.join(destdir, "conf-description.txt"), 'w') as dest: + dest.write(self.description_fixme) with open(os.path.join(destdir, "conf-notes.txt"), 'w') as dest: dest.write(self.notes_fixme) logger.info("""Configuration template placed into {} Please review the files in there, and particularly provide a configuration description in {} +and notes in {} You can try out the configuration with TEMPLATECONF={} . {}/oe-init-build-env build-try-{}""" -.format(destdir, os.path.join(destdir, "conf-notes.txt"), destdir, oecorepath, templatename)) +.format(destdir, os.path.join(destdir, "conf-description.txt"), os.path.join(destdir, "conf-notes.txt"), destdir, oecorepath, templatename)) def do_save_build_conf(self, args): """ Save the currently active build configuration (conf/local.conf, conf/bblayers.conf) as a template into a layer.\n This template can later be used for setting up builds via TEMPLATECONF. """ diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py index 8faa0602348..819ddf51bcd 100644 --- a/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/meta/lib/oeqa/selftest/cases/bblayers.py @@ -121,7 +121,7 @@ class BitbakeLayers(OESelftestTestCase): self.assertEqual(bb_vars['BBFILE_PRIORITY_%s' % layername], str(priority), 'BBFILE_PRIORITY_%s != %d' % (layername, priority)) result = runCmd('bitbake-layers save-build-conf {} {}'.format(layerpath, "buildconf-1")) - for f in ('local.conf.sample', 'bblayers.conf.sample', 'conf-notes.txt'): + for f in ('local.conf.sample', 'bblayers.conf.sample', 'conf-description.txt', 'conf-notes.txt'): fullpath = os.path.join(layerpath, "conf", "templates", "buildconf-1", f) self.assertTrue(os.path.exists(fullpath), "Template configuration file {} not found".format(fullpath)) From patchwork Thu Sep 14 11:25:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 30442 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 BCFABEDE9AD for ; Thu, 14 Sep 2023 11:25:57 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web11.9526.1694690750270503179 for ; Thu, 14 Sep 2023 04:25:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dkKYobY7; spf=pass (domain: gmail.com, ip: 209.85.208.43, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-530199bca8eso921260a12.0 for ; Thu, 14 Sep 2023 04:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694690748; x=1695295548; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=11k/uoqSGgfJOCKbeCRlo1ZDT3y98PYsK7szmHCaPak=; b=dkKYobY7fhDaXFT7zh3UKIKuT/zTnGZovRxRHjrzwkGKacCZmIcGRvJiPVSOlEugPQ Saeewc9xXpAw0oWmNeLgKMgRTOr520IWkErMkesqms2X3K0xAQGXKlKgPyUrf5xsj+xI thmBSwUgH2JytUuEjdp+EHrGnSOEzRh5q7jq/YynwYsl68Wqn4cK/x/tfge2/P7MEUc7 2sWPQ1L7maublFqmeU4XPnSjv6PtEEy2mccsqBvPHS/yjgL5s2PJxDZ85LBWaEeAA3b2 y4A+xHFtH4XxolEdJnTE6OOuc70DCTYZHD/oEO8Bxx4HWfE+pr5GrL6slLhA5uU9lq67 OE2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694690748; x=1695295548; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=11k/uoqSGgfJOCKbeCRlo1ZDT3y98PYsK7szmHCaPak=; b=NH6omsTW9nOLxlxo8KzbeB9ffihAVzYAEAYMYtkb7YIr5fFP+q8+IOD5/DISyBfC7k b53DHd8Fzzqfce44KHqn7c19JLsW54/JPokjovCcX+TawUJdgYcHeAHG2iM4FyycUHND WSILaFxPwbdVIwutSvpGgUvC7WCeZzeMn6BxNV9071U12J0xCJzIfuG9ypKGoxKyd9pJ miO6wdT+e33TeVwhJD0SH2XODL03ruoGNJIb1S2vYpzS1RK34xlV2HCxsqGrZN8aHEs9 jn0kYOjMlQnKiTqL9jjFXvIuH9mMO2xOfEBOtSLkEuT3z+dPfAgCUEjuVlty5H4hI8mK U9xw== X-Gm-Message-State: AOJu0YzNs6HcNkNttcP6dNZd8GPVgVoBmvEol3koRb+SkZxISW6BMzYA fIuFZIR+aWIGiNKoiA30V4X1BCFGDE0= X-Google-Smtp-Source: AGHT+IHLoAJ6pftTiKa3hkT+zo8JywicgXpthwDS+RpBiNod42B3O5VmeYT3ZL7oCNYtNLGFuLrshg== X-Received: by 2002:a17:906:cc4b:b0:9a9:e858:e731 with SMTP id mm11-20020a170906cc4b00b009a9e858e731mr2068082ejb.24.1694690748576; Thu, 14 Sep 2023 04:25:48 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id o23-20020a170906861700b00992d70f8078sm873832ejx.106.2023.09.14.04.25.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:25:48 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/3] scripts/oe-setup-builddir: add support for configuration descriptions Date: Thu, 14 Sep 2023 13:25:40 +0200 Message-Id: <20230914112540.2214062-3-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230914112540.2214062-1-alex@linutronix.de> References: <20230914112540.2214062-1-alex@linutronix.de> 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 ; Thu, 14 Sep 2023 11:25:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/187635 They are handled exactly same as conf-notes.txt. Signed-off-by: Alexander Kanavin --- scripts/oe-setup-builddir | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index 678aeac4be5..1b5dc55743e 100755 --- a/scripts/oe-setup-builddir +++ b/scripts/oe-setup-builddir @@ -57,6 +57,7 @@ if [ -n "$TEMPLATECONF" ]; then fi OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample" OECORELOCALCONF="$TEMPLATECONF/local.conf.sample" + OECOREDESCRCONF="$TEMPLATECONF/conf-description.txt" OECORENOTESCONF="$TEMPLATECONF/conf-notes.txt" fi @@ -98,6 +99,13 @@ EOM SHOWYPDOC=yes fi +if [ -z "$OECOREDESCRCONF" ]; then + OECOREDESCRCONF="$OEROOT/meta/conf/templates/default/conf-description.txt" +fi +if [ ! -r "$BUILDDIR/conf/conf-description.txt" ]; then + [ ! -r "$OECOREDESCRCONF" ] || cp "$OECOREDESCRCONF" "$BUILDDIR/conf/conf-description.txt" +fi + if [ -z "$OECORENOTESCONF" ]; then OECORENOTESCONF="$OEROOT/meta/conf/templates/default/conf-notes.txt" fi @@ -108,6 +116,7 @@ fi # Prevent disturbing a new GIT clone in same console unset OECORELOCALCONF unset OECORELAYERCONF +unset OECOREDESCRCONF unset OECORENOTESCONF # Ending the first-time run message. Show the YP Documentation banner. @@ -124,6 +133,7 @@ EOM # unset SHOWYPDOC fi +[ ! -r "$BUILDDIR/conf/conf-description.txt" ] || cat "$BUILDDIR/conf/conf-description.txt" [ ! -r "$BUILDDIR/conf/conf-notes.txt" ] || cat "$BUILDDIR/conf/conf-notes.txt" if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then