Skip to contentSkip to conversation

bitbake-setup steps for release

DISCUSSION Richard Purdie 5 participants 14 messages Nov 13, 2025 – Dec 10, 2025 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi All,

Huge thanks to everyone who has sent patches. Having multiple people looking at this and sending them has allowed "parallel processing" that is really moving us closer to release.

The review call agreed with the patches on master-next and that those should merge. Not all are perfect and there will be some further tweaks needed but they do move things closer to where we need to be.

There are some things we all thought still needed fixing before release:

a) The update command needs to prompt y/n on overwriting bblayers.conf or local.conf and give the users a choice. We need a way for users to update the repos with one command, we can improve the conf file upgrading later.

b) There should be a --no-conf-updates (better naming?) to the update command

c) The default build path should not include the machine name. Ryan mentioned his previous patches which have the concept of a format string, or we have a include y/n piece in the json config. Otherwise you can end up with multiple elements like poky_poky.

d) We need to tell the user how to change the machine/distro layer as nobody knows about the bitbake-config-build command. Mention "bitbake- config-build enable-fragment machine/XXX" in output when running the tool.

e) Add a comment into toolcfg.conf to point at the command to change

f) Catch conf file configuration of MACHINE/DISTRO conflicting with a fragment?

I'll let anyone add anything I've missed.

Thanks all, it was a really useful call and gives us an idea of what we need to do to be able to release.

Cheers,

Richard

#2 lore raw
In reply to Richard Purdie
Quoted 1 line · Richard Purdie via lists.openembedded.org

I'll let anyone add anything I've missed.

FYI, we are working to simplify the "git-remote" element for the simple (and IMHO most common) case : a single remote called "origin". In this case, we plan to be able to replace

        "bitbake": {
            "git-remote": {
                "remotes": {
                    "origin": {
                        "uri":
"git://git.openembedded.org/bitbake;protocol=https"
                    }
                },
                "rev": "master"
            },
        },

by

        "bitbake": {
            "git-remote": {
                "uri": "git://git.openembedded.org/bitbake;protocol=https",
                "rev": "master"
            }
        },

"uri" and "remote" would then be mutually exclusive.

Originally I planned to discuss this around the working patches but since you asked...
I'm not sure we can send this before the release deadline though, but I feel like this is something that can be added between the release and the LTS.
On the other hand, if there is a strong opinion for integrating that into the release I can shuffle priorities and make it happen.

Signature · 2 lines
Yoann Congal
Smile ECS
#3 lore raw

This can wait until after the release I think. I want the optional path tweak in because the schema and the oe-setup-build are already updated but not bitbake-setup.

Alex

Quoted 43 lines · Yoann Congal
Quoted 1 line · Richard Purdie via lists.openembedded.org

I'll let anyone add anything I've missed.

FYI, we are working to simplify the "git-remote" element for the simple (and IMHO most common) case : a single remote called "origin". In this case, we plan to be able to replace

        "bitbake": {
            "git-remote": {
                "remotes": {
                    "origin": {
                        "uri": "git://git.openembedded.org/bitbake;protocol=https"
                    }
                },
                "rev": "master"
            },
        },

by

        "bitbake": {
            "git-remote": {
                "uri": "git://git.openembedded.org/bitbake;protocol=https",
                "rev": "master"
            }
        },

"uri" and "remote" would then be mutually exclusive.

Originally I planned to discuss this around the working patches but since you asked...
I'm not sure we can send this before the release deadline though, but I feel like this is something that can be added between the release and the LTS.
On the other hand, if there is a strong opinion for integrating that into the release I can shuffle priorities and make it happen.
--
Yoann Congal
Smile ECS

#4 lore raw
In reply to Richard Purdie
Quoted 9 lines · Richard Purdie

Hi All,

Huge thanks to everyone who has sent patches. Having multiple people looking at this and sending them has allowed "parallel processing" that is really moving us closer to release.

The review call agreed with the patches on master-next and that those should merge. Not all are perfect and there will be some further tweaks needed but they do move things closer to where we need to be.

I think we're making good progress so thanks to everyone who has helped! More testing and feedback at this stage would still be really appreciated to make sure that bitbake-setup meets the needs of different users & developers.

Quoted 10 lines

There are some things we all thought still needed fixing before release:

a) The update command needs to prompt y/n on overwriting bblayers.conf or local.conf and give the users a choice. We need a way for users to update the repos with one command, we can improve the conf file upgrading later.

b) There should be a --no-conf-updates (better naming?) to the update command

I suggest --conf-updates=[yes,no,prompt] with 'prompt' being the default. 'yes' means update without asking, 'no' means don't touch the config files, 'prompt' means ask separately for each of bblayers.conf and local.conf.

Quoted 10 lines

c) The default build path should not include the machine name. Ryan mentioned his previous patches which have the concept of a format string, or we have a include y/n piece in the json config. Otherwise you can end up with multiple elements like poky_poky.

d) We need to tell the user how to change the machine/distro layer as nobody knows about the bitbake-config-build command. Mention "bitbake- config-build enable-fragment machine/XXX" in output when running the tool.

Quoted 6 lines

e) Add a comment into toolcfg.conf to point at the command to change

f) Catch conf file configuration of MACHINE/DISTRO conflicting with a fragment?

I'll let anyone add anything I've missed.

I'm still struggling to use bitbake-setup while hacking on bitbake & openembedded-core themselves. I've always had permanent working repositories in my home directory and more ephemeral build directories under a path like /mnt/build which may be thrown away when no longer needed. My home directory gets backed up but my build directories don't, so I don't want to do my work inside the layers directory created by bitbake-setup.

I'd like to be able to override the sources specified in a bitbake-setup conf.json file without having to create and manage a new conf.json file myself. I'm imagining a command line argument that I can pass to bitbake-setup, perhaps --local-override/-L, to drop the "git-remote" settings for a given source and set a local path:

    bitbake-setup init -L bitbake=~/src/bitbake \
        -L openembedded-core=~/src/openembedded-core

I don't think this would be difficult to support and I think it'd be a usability win for developers. I'd like to get this in before the release if we can, otherwise I'm going to be hand editing bblayers.conf and fighting against the tools until we have something in place.

We will need bitbake-setup to remember that sources have been overridden so that running bitbake-setup update does the right thing.

Thanks,

Signature · 1 line
Paul Barker
#5 lore raw
Quoted 9 lines · Paul Barker

I'd like to be able to override the sources specified in a bitbake-setup conf.json file without having to create and manage a new conf.json file myself. I'm imagining a command line argument that I can pass to bitbake-setup, perhaps --local-override/-L, to drop the "git-remote" settings for a given source and set a local path:

    bitbake-setup init -L bitbake=~/src/bitbake \
        -L openembedded-core=~/src/openembedded-core
Quoted 7 lines

I don't think this would be difficult to support and I think it'd be a usability win for developers. I'd like to get this in before the release if we can, otherwise I'm going to be hand editing bblayers.conf and fighting against the tools until we have something in place.

We will need bitbake-setup to remember that sources have been overridden so that running bitbake-setup update does the right thing.

There's already support for source override files (yes, there's an extra step of making the file, but you only need to make it once, and it covers all possible tweaks to the sources from the original config), and you can also achieve this by not having these entries in the sources section to begin with, and then enabling the locally managed layers with a bb-layers-relative-this-file. I'm not firmly against a new option but it needs to be justified against these two already existing ones, otherwise we're heading into featuritis territory.

I'd probably extend the schema to have 'local'-type entry in addition to 'git-remote'-type, and then you can override one with the other from the override file.

Alex

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 3 lines · Alexander Kanavin via lists.openembedded.org

I'd probably extend the schema to have 'local'-type entry in addition to 'git-remote'-type, and then you can override one with the other from the override file.

Then the implementation would symlink the original local path into layers/. That way things like bb-layers entries, and various other places that expect sources to be in layers/ will work as before and do not need special casing.

Alex

#8 lore raw
Quoted 4 lines · Alexander Kanavin

On Thu, 13 Nov 2025 at 14:51, Alexander Kanavin via lists.openembedded.org <[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines

I'd probably extend the schema to have 'local'-type entry in addition to 'git-remote'-type, and then you can override one with the other from the override file.

Then the implementation would symlink the original local path into layers/. That way things like bb-layers entries, and various other places that expect sources to be in layers/ will work as before and do not need special casing.

I think this may be enough of a solution. I also like the idea of bitbake-setup symlinking things into the layers directory so that we don't need to handle these paths as special cases.

So, are we thinking of an override file like this?

    {
        "description": "Local overrides for development",
        "sources": {
            "bitbake": {
                "local": {
                    "path": "~/src/bitbake"
                }
            },
            "openembedded-core": {
                "local": {
                    "path": "~/src/openembedded-core"
                }
            }
        }
    }

I think it's important to support '~' in the path, we can easily call os.path.expanduser() to handle this. We should also support relative paths, which are interpreted as relative to directory containing the override json file.

Thanks,

Signature · 1 line
Paul Barker
#9 lore raw
Quoted 22 lines · Paul Barker

I think this may be enough of a solution. I also like the idea of bitbake-setup symlinking things into the layers directory so that we don't need to handle these paths as special cases.

So, are we thinking of an override file like this?

    {
        "description": "Local overrides for development",
        "sources": {
            "bitbake": {
                "local": {
                    "path": "~/src/bitbake"
                }
            },
            "openembedded-core": {
                "local": {
                    "path": "~/src/openembedded-core"
                }
            }
        }
    }
Quoted 4 lines

I think it's important to support '~' in the path, we can easily call os.path.expanduser() to handle this. We should also support relative paths, which are interpreted as relative to directory containing the override json file.

Yes, this looks good to me (there's an existing, optional path property one level up, but it's intended for where code from remote repositories goes in a designated checkout location (e.g. setup_dir/layers/...), and so I don't think it's appropriate to reuse that).

If you embark on writing the code to support this, don't forget:

- update the schema in oe-core (I think it should be moved to bitbake repo as well, we just had other more pressing matters). Make 'local' and 'git-remote' mutually exclusive.
- update the bitbake-selftest to test both the override function and the 'local'-type source.
- I think this feature isn't actually a blocker for release, and can be added afterwards to bitbake master, and used from there. Bitbake-setup is not coupled to the yocto release it's setting up.

Alex

#10 lore raw

bitbake-setup: support local sources

In reply to Paul Barker
Quoted 22 lines · Paul Barker

I think this may be enough of a solution. I also like the idea of bitbake-setup symlinking things into the layers directory so that we don't need to handle these paths as special cases.

So, are we thinking of an override file like this?

    {
        "description": "Local overrides for development",
        "sources": {
            "bitbake": {
                "local": {
                    "path": "~/src/bitbake"
                }
            },
            "openembedded-core": {
                "local": {
                    "path": "~/src/openembedded-core"
                }
            }
        }
    }
Quoted 4 lines

I think it's important to support '~' in the path, we can easily call os.path.expanduser() to handle this. We should also support relative paths, which are interpreted as relative to directory containing the override json file.

I've (mostly) implemented this, and I realized it's easy to support both the above, and a command line option from a single code path, so people can pick what they prefer for any particular situation.

So there will also be support for the original idea, a kind of shortcut/syntactic sugar (for this particular use of overrides) that doesn't require making a file:

bitbake-setup init -L bitbake ~/src/bitbake -L openembedded-core ~/src/openembedded-core

Alex

#11 lore raw
In reply to Paul Barker
Quoted 50 lines · Paul Barker
Quoted 9 lines · Richard Purdie

Hi All,

Huge thanks to everyone who has sent patches. Having multiple people looking at this and sending them has allowed "parallel processing" that is really moving us closer to release.

The review call agreed with the patches on master-next and that those should merge. Not all are perfect and there will be some further tweaks needed but they do move things closer to where we need to be.

I think we're making good progress so thanks to everyone who has helped! More testing and feedback at this stage would still be really appreciated to make sure that bitbake-setup meets the needs of different users & developers.

Quoted 10 lines

There are some things we all thought still needed fixing before release:

a) The update command needs to prompt y/n on overwriting bblayers.conf or local.conf and give the users a choice. We need a way for users to update the repos with one command, we can improve the conf file upgrading later.

b) There should be a --no-conf-updates (better naming?) to the update command

I suggest --conf-updates=[yes,no,prompt] with 'prompt' being the default. 'yes' means update without asking, 'no' means don't touch the config files, 'prompt' means ask separately for each of bblayers.conf and local.conf.

Quoted 10 lines

c) The default build path should not include the machine name. Ryan mentioned his previous patches which have the concept of a format string, or we have a include y/n piece in the json config. Otherwise you can end up with multiple elements like poky_poky.

d) We need to tell the user how to change the machine/distro layer as nobody knows about the bitbake-config-build command. Mention "bitbake- config-build enable-fragment machine/XXX" in output when running the tool.

Quoted 6 lines

e) Add a comment into toolcfg.conf to point at the command to change

f) Catch conf file configuration of MACHINE/DISTRO conflicting with a fragment?

I'll let anyone add anything I've missed.

Quoted 7 lines

I'm still struggling to use bitbake-setup while hacking on bitbake & openembedded-core themselves. I've always had permanent working repositories in my home directory and more ephemeral build directories under a path like /mnt/build which may be thrown away when no longer needed. My home directory gets backed up but my build directories don't, so I don't want to do my work inside the layers directory created by bitbake-setup.

Perhaps bitbake-setup needs a build-dir equivalent to top-dir that specifies where the build directories get placed (using the same setup-name scheme)? If unspecified it would just default to top-dir.

Quoted 22 lines

I'd like to be able to override the sources specified in a bitbake-setup conf.json file without having to create and manage a new conf.json file myself. I'm imagining a command line argument that I can pass to bitbake-setup, perhaps --local-override/-L, to drop the "git-remote" settings for a given source and set a local path:

    bitbake-setup init -L bitbake=~/src/bitbake \
        -L openembedded-core=~/src/openembedded-core

I don't think this would be difficult to support and I think it'd be a usability win for developers. I'd like to get this in before the release if we can, otherwise I'm going to be hand editing bblayers.conf and fighting against the tools until we have something in place.

We will need bitbake-setup to remember that sources have been overridden so that running bitbake-setup update does the right thing.

Thanks,

--
Paul Barker

#12 lore raw
Quoted 59 lines · Joshua Watt
Quoted 50 lines · Paul Barker
Quoted 9 lines · Richard Purdie

Hi All,

Huge thanks to everyone who has sent patches. Having multiple people looking at this and sending them has allowed "parallel processing" that is really moving us closer to release.

The review call agreed with the patches on master-next and that those should merge. Not all are perfect and there will be some further tweaks needed but they do move things closer to where we need to be.

I think we're making good progress so thanks to everyone who has helped! More testing and feedback at this stage would still be really appreciated to make sure that bitbake-setup meets the needs of different users & developers.

Quoted 10 lines

There are some things we all thought still needed fixing before release:

a) The update command needs to prompt y/n on overwriting bblayers.conf or local.conf and give the users a choice. We need a way for users to update the repos with one command, we can improve the conf file upgrading later.

b) There should be a --no-conf-updates (better naming?) to the update command

I suggest --conf-updates=[yes,no,prompt] with 'prompt' being the default. 'yes' means update without asking, 'no' means don't touch the config files, 'prompt' means ask separately for each of bblayers.conf and local.conf.

Quoted 10 lines

c) The default build path should not include the machine name. Ryan mentioned his previous patches which have the concept of a format string, or we have a include y/n piece in the json config. Otherwise you can end up with multiple elements like poky_poky.

d) We need to tell the user how to change the machine/distro layer as nobody knows about the bitbake-config-build command. Mention "bitbake- config-build enable-fragment machine/XXX" in output when running the tool.

Quoted 6 lines

e) Add a comment into toolcfg.conf to point at the command to change

f) Catch conf file configuration of MACHINE/DISTRO conflicting with a fragment?

I'll let anyone add anything I've missed.

Quoted 7 lines

I'm still struggling to use bitbake-setup while hacking on bitbake & openembedded-core themselves. I've always had permanent working repositories in my home directory and more ephemeral build directories under a path like /mnt/build which may be thrown away when no longer needed. My home directory gets backed up but my build directories don't, so I don't want to do my work inside the layers directory created by bitbake-setup.

Quoted 3 lines

Perhaps bitbake-setup needs a build-dir equivalent to top-dir that specifies where the build directories get placed (using the same setup-name scheme)? If unspecified it would just default to top-dir.

This bit actually works fine for me as things are. In my global settings.conf file I have:

[default]
top-dir-prefix = /mnt/build
top-dir-name =
dl-dir = /mnt/downloads

It's using my existing bitbake & layer checkouts without having to push/pull git branches which needs a little extra support.

Thanks,

Signature · 1 line
Paul Barker
#13 lore raw
In reply to Richard Purdie
Quoted 7 lines · Richard Purdie

a) The update command needs to prompt y/n on overwriting bblayers.conf or local.conf and give the users a choice. We need a way for users to update the repos with one command, we can improve the conf file upgrading later.

b) There should be a --no-conf-updates (better naming?) to the update command

Antonin's patches are nearly ready (one more simple tweak and I'm happy).

Quoted 11 lines

c) The default build path should not include the machine name. Ryan mentioned his previous patches which have the concept of a format string, or we have a include y/n piece in the json config. Otherwise you can end up with multiple elements like poky_poky.

d) We need to tell the user how to change the machine/distro layer as nobody knows about the bitbake-config-build command. Mention "bitbake- config-build enable-fragment machine/XXX" in output when running the tool.

e) Add a comment into toolcfg.conf to point at the command to change

This was discussed on the patch review call. The unresolved question is what to do with c, as d and e are simple tweaks.

The situation right now is:
- it's possible to specify a custom setup dir name with --setup-dir-name=...
- it's also possible to type in a custom setup dir name in an interactive initialization, if the suggested default isn't okay
- so the unresolved part is this: the suggested default is long and ugly. But on the other hand it is guaranteed to be unique, and includes all the parts that allow easily identifying what kind of configuration is found inside that directory. I wrote it that way to basically please myself, as I'm jugging at least 30 different build directories, and need some kind of structure in their names to see what is where. Aesthetically pleasant, short names are not important (to me personally :).

So how is it long and ugly? As of now, if someone initializes poky from the default registry they will get bitbake configuration in something like this:

./bitbake-builds/poky-master-poky-distro_poky-machine_qemux86-64/build/conf/

The parts are:
- 'poky-master' is the filename of the configuration file. It contains the project name and the branch/release name, so a different choice could produce oenodistro-whintter
- 'poky' is the selected configuration inside that file. Another option right now is 'poky-with-sstate'
- the remaining parts are fragment selections. bitbake-setup does not know anything about machine or distro, it just concatenates the fragment selections made during initialization: name-value.

So where do we go from here? How can we prevent poky being mentioned three times? Should the tool try a short directory name first, and if that already exists, try a longer one, and if that's taken, add even more pieces, and, as a last resort, a magic number? Honestly, I don't have clarity in my head now. Asking the audience!

Quoted 2 lines

f) Catch conf file configuration of MACHINE/DISTRO conflicting with a fragment?

Chen Qi is working on this piece.

Thanks all!

Alex

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 5 lines · Alexander Kanavin via lists.openembedded.org

So where do we go from here? How can we prevent poky being mentioned three times? Should the tool try a short directory name first, and if that already exists, try a longer one, and if that's taken, add even more pieces, and, as a last resort, a magic number? Honestly, I don't have clarity in my head now. Asking the audience!

Another possibility is a new setting, similar to Ryan's patch (which added a command line option), that sets the format string, or a 'style' (short, medium, full). Defaulting to short (e.g. 'poky-master') but geeks like myself would switch it to full. And if the directory exists, the tool could try longer and longer styles until there's something not taken yet.

Alex