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

overlay.d & tests: Add alternatives migration and test #3253

Open
wants to merge 2 commits into
base: testing-devel
Choose a base branch
from

Conversation

travier
Copy link
Member

@travier travier commented Nov 13, 2024

overlay.d: Add empty statoverride config files


overlay.d & tests: Add alternatives migration and test

  • Add an overlay with the migration logic for alternatives
  • Add a test for the migration script

This should make sure that the system is setup properly and that the
migration script will do the right thing on older systems.

See: coreos/fedora-coreos-tracker#1818
See: coreos/fedora-coreos-tracker#677
See: https://docs.fedoraproject.org/en-US/fedora-coreos/alternatives/

@travier travier force-pushed the testing-devel-alternatives-migration branch from 484d98b to 2ba6b2a Compare November 15, 2024 12:04
@travier travier force-pushed the testing-devel-alternatives-migration branch from 2ba6b2a to 086b0fa Compare November 18, 2024 09:56
- Add an overlay with the migration logic for alternatives
- Add a test for the migration script

This should make sure that the system is setup properly and that the
migration script will do the right thing on older systems.

See: coreos/fedora-coreos-tracker#1818
See: coreos/fedora-coreos-tracker#677
See: https://docs.fedoraproject.org/en-US/fedora-coreos/alternatives/
@travier travier force-pushed the testing-devel-alternatives-migration branch from 086b0fa to 273dbde Compare November 18, 2024 16:18
@travier travier changed the title tests: Add initial alternatives test overlay.d & tests: Add alternatives migration and test Nov 18, 2024
@travier
Copy link
Member Author

travier commented Nov 18, 2024

I've now added the migration script to this PR and a test for it. Not fully tested yet.


main() {
# Should never happen as systemd checks this, but just in case
if [[ ! -d "/var/lib/alternatives" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

On silverblue, check /var/lib/alternatives is broken link, should we care about this?

$ ls /var/lib/alternatives  -al
lrwxrwxrwx. 1 root root 26 Oct 16 07:16 /var/lib/alternatives -> ../../usr/lib/alternatives

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, if we want to have a single migration script for all variants then we should take this one into account.

Copy link
Member

@HuijingHei HuijingHei left a comment

Choose a reason for hiding this comment

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

Overall LGTM.

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.

3 participants