Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Yocto 5.0 - Scarthgap #137

Merged
merged 13 commits into from
May 30, 2024
Merged

Conversation

hnez
Copy link
Member

@hnez hnez commented May 14, 2024

This updates meta-lxatac to the yocto scarthgap release.

As part of the update we got rid of a few workarounds we needed for successful nanbield build but gained a few new workarounds needed to build for scarthgap.

The zeroconf/avahi change introduced in poky commit yoctoproject/poky@c152a1e25c may fix the avahi daemon issues we see in #128, but I would like to test that for a bit before closing the issue.

The seccomp PACKECONFIG is already enabled via our DISTRO_FEATURES,
so there is no need to have it here explicitly.

Signed-off-by: Leonard Göhrs <[email protected]>
@hnez hnez requested a review from jluebbe May 14, 2024 09:41
hnez added 2 commits May 14, 2024 11:42
These packageconfigs are enabled by default, so there is no need to list
them here explicitly.

Signed-off-by: Leonard Göhrs <[email protected]>
Starting with version 1.5.0 the conflicting binaries moved to the
libexec directory, so there is no need anymore to rename files in bin.

Signed-off-by: Leonard Göhrs <[email protected]>
# Re-enable LLMNR (but not mDNS, which is handled by avahi),
# which is disabled by the upstream recipe when the zeroconf DISTRO_FEATURE
# is set.
EXTRA_OEMESON:remove = "-Ddefault-llmnr=no"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually use 'zeroconf'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use LLMNR in my setup to resolve LXA TACs in my local network (and other may as well without noticing it by using e.g. ssh root@lxatac-00010 and having it just work), but others may use mDNS (ssh [email protected]), which means zeroconf.

systemd-resolved can do both (with some drawbacks on the mDNS front though, when it comes to service discovery), while avahi (which is enabled by the zeroconf DISTRO_FEATURE) only does mDNS but has the better D-Bus interface.

Right now we do not use any more advanced zeroconf features, like announcing services or detecting other TACs in the network, which means systemd-resolved would be perfectly fine for us. Because of that I initially threw out avahi support and used resolved for both.

But @jluebbe (rightfully) objected, because there are plans to do service announcements and discovery in the tacd in the future, which avahi currently does better.

@@ -0,0 +1,3 @@
# The terminal user interface is the one we document in the manual.
# Make sure it is installed.
PACKAGECONFIG:append = "nmtui"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems as if the upstream change left -Dnmtui=true in the EXTRA_OEMESON . Thus potentially a patch opportunity. This change is fine however.

@hnez
Copy link
Member Author

hnez commented May 14, 2024

I am currently tracking down another issue that needs fixing before this can be merged.

For some reason most of the python3-twisted-* packages in build/tmp/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/python3-twisted/24.3.0/packages-split/ end up being empty (the files all end up mushed into packages-split/python3-twisted), resulting in no packages being generated for e.g. python3-twisted-conch resulting in dependency errors later on:

$ bitbake lxatac-core-bundle-base
…
 * Solver encountered 1 problem(s):
 * Problem 1/1:
 *   - package python3-labgrid-git-r0.cortexa7t2hf-neon-vfpv4 requires python3-autobahn, but none of the providers can be installed
 *   - package python3-autobahn-23.6.2-r0.cortexa7t2hf-neon-vfpv4 requires python3-twisted, but none of the providers can be installed
 *   - conflicting requests
 *   - nothing provides python3-twisted-conch needed by python3-twisted-24.3.0-r0.cortexa7t2hf-neon-vfpv4
 *
 * Solution 1:
 *   - do not ask to install a package providing python3-labgrid
…

@hnez hnez closed this May 14, 2024
@hnez hnez reopened this May 14, 2024
@hnez
Copy link
Member Author

hnez commented May 14, 2024

Sorry, pressed the wrong button ("Close with comment" looks an awful lot like "discard this comment").

I think I've found the change that has cause the issue (FILES:${PN} no longer being overridden due to openembedded/meta-openembedded@a57eea7#diff-6a7860eeab2c96b001eac5f36c73705cbdf45e857db2ff77e39ce8b932b5e393L78-L79 ) and a fix that is already in meta-oe master but not yet in the scarthgap branch openembedded/meta-openembedded@bd1b5cd .

I think I'll backport the fix like I did for the npm caching issue.

@hnez
Copy link
Member Author

hnez commented May 15, 2024

I have added 79ccd1d now, which is not the most elegant solution, but one that at least makes the build work until the openembedded/meta-openembedded scathgap branch is updated again (which is when we can drop it again).

@hnez hnez assigned ejoerns and unassigned jluebbe May 15, 2024
hnez added 9 commits May 23, 2024 14:46
This is a routine update from yocto nanbield to scarthgap,
the next version.

Signed-off-by: Leonard Göhrs <[email protected]>
This is a backport of meta-oe master commit bd1b5cde3
("python3-twisted: prepend split PACKAGES"),
which fixes an issue where the `python3-twisted` package would gobble up
all of the files in the split stage (because it matches broadly and comes
before the other packages in the list) and most of the other packages
ended up empty.
Since this workaround is only required until that commit makes it into
the scarthgap branch go the easy route and just hardcode the package
order achieved by bd1b5cde3.

Signed-off-by: Leonard Göhrs <[email protected]>
Starting with commit f15676592b ("bmaptool: now part of Yocto Project")
bmaptool is part of the Yocto project and has changed name from bmap-tool
to bmaptool.

Signed-off-by: Leonard Göhrs <[email protected]>
The current version of `bottom` does not built with the rust compiler
in scarthgap.
This is fixed in newer `bottom` versions, so it can be re-enabled after
an update of `bottom`.

Signed-off-by: Leonard Göhrs <[email protected]>
…yocto

This workaround was required when building perf for Linux 6.7 and newer
on yocto nanbield (and likely older) but is no longer required on
scarthgap.

Signed-off-by: Leonard Göhrs <[email protected]>
Starting with meta-openembedded commit c331f59e4 ("networkmanager:
fix some missing pkgconfig") the nmtui user interface for networkmanager
is not enabled by default anymore but must instead be enabled via a
pkgconfig.

Signed-off-by: Leonard Göhrs <[email protected]>
Starting with poky commit c152a1e25c ("systemd: disable mdns feature in
resolved for zeroconf") the mDNS and LLMNR features in systemd-resolved
are disabled when the zeroconf DISTRO_FEATURE is enabled, because the
avahi mDNS service (enabled by the zeroconf feature) and the
systemd-resolved mDNS may collide.
Avahi does however not provide LLMNR, so the system will no longer
respond to LLMNR requests at all.
Re-Enable LLMNR to be able to resolve bare hostnames via multicast DNS.

Signed-off-by: Leonard Göhrs <[email protected]>
Systemd assumes the root users home directory to be at /root and does
not support other configurations.
(See the documentation around ROOT_HOME for more information).
Our migration scripts do/did however assume roots home to be at
/home/root.
Add a symlink from /home/root to /root to stay backward compatible to
existing bundles.

Signed-off-by: Leonard Göhrs <[email protected]>
@hnez
Copy link
Member Author

hnez commented May 23, 2024

I've updated meta-oe to the most recent scarthgap branch, which adds a single commit openembedded/meta-openembedded@6de0ab7 (nodejs-oe-cache: fix offline install of dependencies ), which means I was able to remove the nodejs workaround I had before.
(The python3-twisted workaround is however still required. I guess it has lower priority).

I've also noticed that the current version of bottom did not build on the new rust compiler in scarthgap.
This will be fixed by an update in #139 but to make sure that our main branch stays buildable I've disabled bottom for now.

With that I think we are ready to merge this. What do you think @ejoerns / @jluebbe?

Copy link
Member

@Emantor Emantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The largefile DISTRO_FEATURE is the default in nanbield, so it can be removed.

…efile

The largefile feature is enabled by default since Yocto 4.3 nanbield

> Code on 32 bit platforms is now compiled with largefile support
> and 64 bit time_t, to avoid the Y2038 time overflow issue.
> This breaks the ABI and could break existing programs in
> untested layers. [1]

[1]: https://docs.yoctoproject.org/singleindex.html#compiling-changes

Signed-off-by: Leonard Göhrs <[email protected]>
@hnez
Copy link
Member Author

hnez commented May 24, 2024

The largefile DISTRO_FEATURE is the default in nanbield, so it can be removed.

Oh, neat. I've added a commit to remove it.

Copy link
Collaborator

@ejoerns ejoerns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me.

Just to not get it lost: While checking the distro I came across another change that happened in poky (in nanbield) that we might want to adapt to (but not as part of this PR): We could also inherit the create-spdx class in tacos.

https://git.yoctoproject.org/poky/commit/?id=581edf20120cd383e8dea0693239629e7547bb7e

@hnez hnez dismissed Emantor’s stale review May 30, 2024 05:08

I've dropped the largefile DISTRO_FEATURE in a separate commit.

@hnez hnez merged commit 455e826 into linux-automation:scarthgap May 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants