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

Add eclass/usr-ldscript.eclass to package automation #2373

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

krnowak
Copy link
Member

@krnowak krnowak commented Oct 11, 2024

CI: http://jenkins.infra.kinvolk.io:8080/job/container/job/sdk/1781/cldsv/

--

It couldn't be added before to automation, because the eclass in Gentoo would introduce have unwanted side-effects into our built images. But the Gentoo version of the eclass is essentially a no-op when USE=split-usr is disabled. We have recently moved to use Gentoo profiles that disable USE=split-usr altogether, and with this move, we can now safely put the eclass into automation.

This marks the point where the entirety of the portage-stable is under automation.

Closes flatcar/Flatcar#645.
Closes flatcar/Flatcar#646.

--

  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

It's from Gentoo commit a7361d2e880798bce305c5085c2f63b5d2c747a6.
It couldn't be added before to automation, because the eclass in
Gentoo would introduce have unwanted side-effects into our built
images. But the Gentoo version of the eclass is essentially a no-op
when USE=split-usr is disabled. We have recently moved to use Gentoo
profiles that disable USE=split-usr altogether, and with this move, we
can now safely put the eclass into automation.

This marks the point where the entirety of the portage-stable is under
automation.
@krnowak
Copy link
Member Author

krnowak commented Oct 15, 2024

This does not seem to be exactly a no-op change, though. But the changes seem to be minor - previously some packages were installing /usr/lib64/libfoo.so.1.2.3 (being a proper dynamic library), /usr/lib64/libfoo.so.1 (being a symlink to the libfoo.so.1.2.3), and /usr/lib64/libfoo.so (being some linker script). Now /usr/lib64/libfoo.so is also a symlink to libfoo.so.1.2.3 instead.

The linker script was fixing some linking issues that stemmed from the fact that some dynamic libraries were stored in /lib, whereas static libraries - in /usr/lib. This fix is clearly irrelevant, because we only have /usr/lib, and /lib is a symlink to the former. This means that the fix was for profiles that enabled USE=split-usr. We are not using such profiles anymore.

The reason that this change occurred now is because some ebuilds are calling gen_usr_ldscript function (which created those linker scripts, clobbering the libfoo.so -> libfoo.so.1.2.3 symlink) and this PR added the usr-ldscript.eclass which brings in the second definition of the function (and it clobbers the first one), and this function became essentially a no-op because it does an early return if USE=split-usr is disabled. The first definition came from toolchain-funcs.eclass', it's documented as deprecated and doesn't have the shortcut for USE=split-usrbeing disabled. So earlier,gen_usr_ldscriptfromtoolchain-funcs.eclasswas in use and it was generating linker scripts, nowgen_usr_ldscriptfromusr-ldscript.eclass` is in use and it does nothing.

@krnowak krnowak marked this pull request as ready for review October 15, 2024 13:58
Copy link

github-actions bot commented Oct 15, 2024

@krnowak krnowak requested a review from a team October 15, 2024 13:58
@krnowak
Copy link
Member Author

krnowak commented Oct 15, 2024

CI passed.

@krnowak krnowak merged commit ecd0d40 into main Oct 16, 2024
1 check failed
@krnowak krnowak deleted the krnowak/add-usr-ldscript-eclass-to-pkg-auto branch October 16, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

[RFE] Move out customizations out from portage-stable [RFE] Keep packages in portage-stable updated
2 participants