Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Disk space monitoring fragment and minor tooling tweaks
@ 2026-08-21 12:26 Antonin Godard
  2026-08-21 12:26 ` [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions Antonin Godard
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Antonin Godard @ 2026-08-21 12:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Thomas Petazzoni, Antonin Godard

First two patches are minor adjustments, no functional changes. The last
patch proposes a new fragment to enable disk usage monitoring.

I was also wondering if simple fragments that enable a class would be
interesting, such as one for buildstats for example. But it would be
very tiny, as it would only consist of:

  USER_CLASSES:append = " buildstats"

Yet it would probably promote the feature a bit more.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
Antonin Godard (3):
      meta/conf/fragments: harmonize fragment summaries and descriptions
      lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists
      meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment

 .../autobuilder-resource-constraints.conf              |  4 ++--
 meta/conf/fragments/yocto-autobuilder/autobuilder.conf |  4 ++--
 meta/conf/fragments/yocto/monitor-disk-space.conf      | 18 ++++++++++++++++++
 meta/conf/fragments/yocto/sbom-cve-check.conf          |  2 +-
 meta/lib/bbconfigbuild/configfragments.py              |  2 +-
 5 files changed, 24 insertions(+), 6 deletions(-)
---
base-commit: 7944665886cb0bf881807a5d849ebdf42a33d1bf
change-id: 20260821-sbom-cve-check-fragment-desc-c5a2a44a8398



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions
  2026-08-21 12:26 [PATCH 0/3] Disk space monitoring fragment and minor tooling tweaks Antonin Godard
@ 2026-08-21 12:26 ` Antonin Godard
  2026-08-21 14:01   ` [OE-core] " Quentin Schulz
  2026-08-21 12:26 ` [PATCH 2/3] lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists Antonin Godard
  2026-08-21 12:26 ` [PATCH 3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment Antonin Godard
  2 siblings, 1 reply; 7+ messages in thread
From: Antonin Godard @ 2026-08-21 12:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Thomas Petazzoni, Antonin Godard

Use the present tense for fragment summaries, so that the
'bitbake-config-build list-fragments' has a coherent output.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 .../fragments/yocto-autobuilder/autobuilder-resource-constraints.conf | 4 ++--
 meta/conf/fragments/yocto-autobuilder/autobuilder.conf                | 4 ++--
 meta/conf/fragments/yocto/sbom-cve-check.conf                         | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf b/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf
index 58cadd92b6..c3fc9990eb 100644
--- a/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf
+++ b/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf
@@ -1,5 +1,5 @@
-BB_CONF_FRAGMENT_SUMMARY = "Resource constraint variables used on the Yocto Projects autobuilder"
-BB_CONF_FRAGMENT_DESCRIPTION = "Resource constraint variables used on the Yocto Projects autobuilder"
+BB_CONF_FRAGMENT_SUMMARY = "Set resource constraint variables for Yocto Project Autobuilder builds"
+BB_CONF_FRAGMENT_DESCRIPTION = "Resource constraint variables for Yocto Project Autobuilder builds"
 
 BB_NUMBER_THREADS = '16'
 BB_NUMBER_PARSE_THREADS = '16'
diff --git a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
index 81adebe5ae..1f16c87d98 100644
--- a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
+++ b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
@@ -1,5 +1,5 @@
-BB_CONF_FRAGMENT_SUMMARY = "Default variables used on the Yocto Projects autobuilder builds"
-BB_CONF_FRAGMENT_DESCRIPTION = "Default variables used on the Yocto Projects autobuilder builds"
+BB_CONF_FRAGMENT_SUMMARY = "Set default variables for Yocto Project Autobuilder builds"
+BB_CONF_FRAGMENT_DESCRIPTION = "Default variables for Yocto Project Autobuilder builds"
 
 QEMU_USE_KVM ?= 'True'
 INHERIT += 'report-error'
diff --git a/meta/conf/fragments/yocto/sbom-cve-check.conf b/meta/conf/fragments/yocto/sbom-cve-check.conf
index 46f6965a0d..f4178af4ec 100644
--- a/meta/conf/fragments/yocto/sbom-cve-check.conf
+++ b/meta/conf/fragments/yocto/sbom-cve-check.conf
@@ -1,4 +1,4 @@
-BB_CONF_FRAGMENT_SUMMARY = "This fragment enables sbom-cve-check with recommended default options"
+BB_CONF_FRAGMENT_SUMMARY = "Enable sbom-cve-check with recommended default options"
 BB_CONF_FRAGMENT_DESCRIPTION = "Enables sbom-cve-check and applies the following configurations: \
  - Adds the sbom-cve-check class to IMAGE_CLASSES. \
  - Configures CVE database recipes to fetch the latest git revision using AUTOREV. \

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists
  2026-08-21 12:26 [PATCH 0/3] Disk space monitoring fragment and minor tooling tweaks Antonin Godard
  2026-08-21 12:26 ` [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions Antonin Godard
@ 2026-08-21 12:26 ` Antonin Godard
  2026-08-21 14:06   ` [OE-core] " Quentin Schulz
  2026-08-21 12:26 ` [PATCH 3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment Antonin Godard
  2 siblings, 1 reply; 7+ messages in thread
From: Antonin Godard @ 2026-08-21 12:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Thomas Petazzoni, Antonin Godard

Make the output of "Available built-in fragments" and "Enabled built-in
fragments" use the same output format:

  Available built-in fragments:
  machine/...     Sets MACHINE = "..."

  Enabled built-in fragments:
  machine/qemuarm64       Sets MACHINE = "qemuarm64"

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 meta/lib/bbconfigbuild/configfragments.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py
index 47605f3ddb..ccc1d8b610 100644
--- a/meta/lib/bbconfigbuild/configfragments.py
+++ b/meta/lib/bbconfigbuild/configfragments.py
@@ -66,7 +66,7 @@ class ConfigFragmentsPlugin(LayerPlugin):
             print('Available built-in fragments:')
             builtin_dict = {i[0]:i[1] for i in [f.split(':') for f in builtin]}
             for prefix,var in builtin_dict.items():
-                print('{}/...\tSets {} = ...'.format(prefix, var))
+                print('{}/...\tSets {} = "..."'.format(prefix, var))
             print('')
             enabled_builtin_fragments = [f for f in enabled if self.builtin_fragment_exists(f)]
             print('Enabled built-in fragments:')

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment
  2026-08-21 12:26 [PATCH 0/3] Disk space monitoring fragment and minor tooling tweaks Antonin Godard
  2026-08-21 12:26 ` [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions Antonin Godard
  2026-08-21 12:26 ` [PATCH 2/3] lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists Antonin Godard
@ 2026-08-21 12:26 ` Antonin Godard
  2026-08-21 14:15   ` [OE-core] " Quentin Schulz
  2 siblings, 1 reply; 7+ messages in thread
From: Antonin Godard @ 2026-08-21 12:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Thomas Petazzoni, Antonin Godard

Add a "core/yocto/monitor-disk-space" fragment to enable the
functionality previously provided by the default definition of
BB_DISKMON_DIRS in local.conf.sample. As the definition might not be
obvious to set, having a simple way of enabling the feature through a
fragment makes it more approachable.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 meta/conf/fragments/yocto/monitor-disk-space.conf | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/meta/conf/fragments/yocto/monitor-disk-space.conf b/meta/conf/fragments/yocto/monitor-disk-space.conf
new file mode 100644
index 0000000000..95ff54465f
--- /dev/null
+++ b/meta/conf/fragments/yocto/monitor-disk-space.conf
@@ -0,0 +1,18 @@
+BB_CONF_FRAGMENT_SUMMARY = "Monitor disk space during the build"
+BB_CONF_FRAGMENT_DESCRIPTION = "Monitor the disk space during the build. If \
+there is less that 1GB of space or less than 100K inodes in any key build \
+location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully shutdown the build. If there \
+is less than 100MB or 1K inodes, perform a hard halt of the build. The reason \
+for this is that running completely out of space can corrupt files and damages \
+the build in ways which may not be easily recoverable. It's necessary to monitor \
+/tmp, if there is no space left the build will fail with very exotic errors."
+
+BB_DISKMON_DIRS = "\
+    STOPTASKS,${TMPDIR},1G,100K \
+    STOPTASKS,${DL_DIR},1G,100K \
+    STOPTASKS,${SSTATE_DIR},1G,100K \
+    STOPTASKS,/tmp,100M,100K \
+    HALT,${TMPDIR},100M,1K \
+    HALT,${DL_DIR},100M,1K \
+    HALT,${SSTATE_DIR},100M,1K \
+    HALT,/tmp,10M,1K"

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions
  2026-08-21 12:26 ` [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions Antonin Godard
@ 2026-08-21 14:01   ` Quentin Schulz
  0 siblings, 0 replies; 7+ messages in thread
From: Quentin Schulz @ 2026-08-21 14:01 UTC (permalink / raw)
  To: antonin.godard, openembedded-core; +Cc: Thomas Petazzoni

Hi Antonin,

On 8/21/26 2:26 PM, Antonin Godard via lists.openembedded.org wrote:
> Use the present tense for fragment summaries, so that the
> 'bitbake-config-build list-fragments' has a coherent output.
> 
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   .../fragments/yocto-autobuilder/autobuilder-resource-constraints.conf | 4 ++--
>   meta/conf/fragments/yocto-autobuilder/autobuilder.conf                | 4 ++--
>   meta/conf/fragments/yocto/sbom-cve-check.conf                         | 2 +-
>   3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf b/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf
> index 58cadd92b6..c3fc9990eb 100644
> --- a/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf
> +++ b/meta/conf/fragments/yocto-autobuilder/autobuilder-resource-constraints.conf
> @@ -1,5 +1,5 @@
> -BB_CONF_FRAGMENT_SUMMARY = "Resource constraint variables used on the Yocto Projects autobuilder"
> -BB_CONF_FRAGMENT_DESCRIPTION = "Resource constraint variables used on the Yocto Projects autobuilder"
> +BB_CONF_FRAGMENT_SUMMARY = "Set resource constraint variables for Yocto Project Autobuilder builds"
> +BB_CONF_FRAGMENT_DESCRIPTION = "Resource constraint variables for Yocto Project Autobuilder builds"
>   
>   BB_NUMBER_THREADS = '16'
>   BB_NUMBER_PARSE_THREADS = '16'
> diff --git a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
> index 81adebe5ae..1f16c87d98 100644
> --- a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
> +++ b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
> @@ -1,5 +1,5 @@
> -BB_CONF_FRAGMENT_SUMMARY = "Default variables used on the Yocto Projects autobuilder builds"
> -BB_CONF_FRAGMENT_DESCRIPTION = "Default variables used on the Yocto Projects autobuilder builds"
> +BB_CONF_FRAGMENT_SUMMARY = "Set default variables for Yocto Project Autobuilder builds"
> +BB_CONF_FRAGMENT_DESCRIPTION = "Default variables for Yocto Project Autobuilder builds"
>   
>   QEMU_USE_KVM ?= 'True'
>   INHERIT += 'report-error'
> diff --git a/meta/conf/fragments/yocto/sbom-cve-check.conf b/meta/conf/fragments/yocto/sbom-cve-check.conf
> index 46f6965a0d..f4178af4ec 100644
> --- a/meta/conf/fragments/yocto/sbom-cve-check.conf
> +++ b/meta/conf/fragments/yocto/sbom-cve-check.conf
> @@ -1,4 +1,4 @@
> -BB_CONF_FRAGMENT_SUMMARY = "This fragment enables sbom-cve-check with recommended default options"
> +BB_CONF_FRAGMENT_SUMMARY = "Enable sbom-cve-check with recommended default options"
>   BB_CONF_FRAGMENT_DESCRIPTION = "Enables sbom-cve-check and applies the following configurations: \

This denotes from the rest of this patch in two ways:
- has a verb while other BB_CONF_FRAGMENT_DESCRIPTION above don't,
- uses the (implicit) third person while the rest uses imperative (I 
believe that's the correct term?),

It also denotes from the tense used in its own BB_CONF_FRAGMENT_SUMMARY 
(Enable/Enables and applies).

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH 2/3] lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists
  2026-08-21 12:26 ` [PATCH 2/3] lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists Antonin Godard
@ 2026-08-21 14:06   ` Quentin Schulz
  0 siblings, 0 replies; 7+ messages in thread
From: Quentin Schulz @ 2026-08-21 14:06 UTC (permalink / raw)
  To: antonin.godard, openembedded-core; +Cc: Thomas Petazzoni

Hi Antonin,

On 8/21/26 2:26 PM, Antonin Godard via lists.openembedded.org wrote:
> Make the output of "Available built-in fragments" and "Enabled built-in
> fragments" use the same output format:
> 
>    Available built-in fragments:
>    machine/...     Sets MACHINE = "..."
> 
>    Enabled built-in fragments:
>    machine/qemuarm64       Sets MACHINE = "qemuarm64"
> 
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   meta/lib/bbconfigbuild/configfragments.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py
> index 47605f3ddb..ccc1d8b610 100644
> --- a/meta/lib/bbconfigbuild/configfragments.py
> +++ b/meta/lib/bbconfigbuild/configfragments.py
> @@ -66,7 +66,7 @@ class ConfigFragmentsPlugin(LayerPlugin):
>               print('Available built-in fragments:')
>               builtin_dict = {i[0]:i[1] for i in [f.split(':') for f in builtin]}
>               for prefix,var in builtin_dict.items():
> -                print('{}/...\tSets {} = ...'.format(prefix, var))
> +                print('{}/...\tSets {} = "..."'.format(prefix, var))

Wondering if we shouldn't simply store the string before .format() in a 
variable and reuse it?

print_frag = '{}\tSets {} = "{}"'

[...]
print(print_frag.format(prefix + '/...', var, '...'))
[...]
print(print_frag.format(f, builtin_dict[prefix], value))

In any case:

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH 3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment
  2026-08-21 12:26 ` [PATCH 3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment Antonin Godard
@ 2026-08-21 14:15   ` Quentin Schulz
  0 siblings, 0 replies; 7+ messages in thread
From: Quentin Schulz @ 2026-08-21 14:15 UTC (permalink / raw)
  To: antonin.godard, openembedded-core; +Cc: Thomas Petazzoni

Hi Antonin,

On 8/21/26 2:26 PM, Antonin Godard via lists.openembedded.org wrote:
> Add a "core/yocto/monitor-disk-space" fragment to enable the
> functionality previously provided by the default definition of
> BB_DISKMON_DIRS in local.conf.sample. As the definition might not be
> obvious to set, having a simple way of enabling the feature through a
> fragment makes it more approachable.
> 
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   meta/conf/fragments/yocto/monitor-disk-space.conf | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/meta/conf/fragments/yocto/monitor-disk-space.conf b/meta/conf/fragments/yocto/monitor-disk-space.conf
> new file mode 100644
> index 0000000000..95ff54465f
> --- /dev/null
> +++ b/meta/conf/fragments/yocto/monitor-disk-space.conf
> @@ -0,0 +1,18 @@
> +BB_CONF_FRAGMENT_SUMMARY = "Monitor disk space during the build"
> +BB_CONF_FRAGMENT_DESCRIPTION = "Monitor the disk space during the build. If \
> +there is less that 1GB of space or less than 100K inodes in any key build \
> +location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully shutdown the build. If there \
> +is less than 100MB or 1K inodes, perform a hard halt of the build. The reason \
> +for this is that running completely out of space can corrupt files and damages \

Remove "The reason for this is that".

I can suggest also rewording after the "and":

and can make unrecoverable damages to the build.

which is lighter (to me) when reading.

> +the build in ways which may not be easily recoverable. It's necessary to monitor \
> +/tmp, if there is no space left the build will fail with very exotic errors."

"No space left" is implied by the context of the text above so I think 
it can be removed.

-very, exotic is already strong enough to me.

> +
> +BB_DISKMON_DIRS = "\> +    STOPTASKS,${TMPDIR},1G,100K \
> +    STOPTASKS,${DL_DIR},1G,100K \
> +    STOPTASKS,${SSTATE_DIR},1G,100K \
> +    STOPTASKS,/tmp,100M,100K \

According to your commit log, this should be 1K instead? but I guess 
this comes straight from meta/conf/templates/default/local.conf.sample 
where the inconsistency already exists.

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-21 18:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 12:26 [PATCH 0/3] Disk space monitoring fragment and minor tooling tweaks Antonin Godard
2026-08-21 12:26 ` [PATCH 1/3] meta/conf/fragments: harmonize fragment summaries and descriptions Antonin Godard
2026-08-21 14:01   ` [OE-core] " Quentin Schulz
2026-08-21 12:26 ` [PATCH 2/3] lib/bbconfigbuild/configfragments.py: match Available and Enabled built-in fragment lists Antonin Godard
2026-08-21 14:06   ` [OE-core] " Quentin Schulz
2026-08-21 12:26 ` [PATCH 3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment Antonin Godard
2026-08-21 14:15   ` [OE-core] " Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox