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

chore: alternatives workaround refactor #536

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

bsherman
Copy link
Contributor

@bsherman bsherman commented Mar 26, 2024

This creates /var/lib/alternatives so that any RPM which has a
post-install script referencing 'alternatives' will not fail due to its
absense.

In addition, this goes the extra mile by copying the contents of
/var/lib/alternatives into the resulting image, which preserves the
alternatives database for any installed packages.

This second part could be controversial as there is an expectation that
there's minimal (or no) contents left in /var after running
'ostree container commit', but it does work and is useful.

If we agree to merge this, I'll also be including it in the HWE images (nvidia, asus*, surface*, etc) and it can be used to replace other workarounds like manually symlinking ld in bluefin/bazzite/etc.

This is a general form of a workaround for problems like: ublue-os/hwe#188

I've tried to keep the boilerplate of image building in the
Containerfile, while the content and details specific to the image being
built is in scripts:
- install.sh
- packages.sh
- post-install.sh

This refactor moves some commands to the scripts which had instead been
added to Containerfile.
This creates /var/lib/alternatives so that any RPM which has a
post-install script referencing 'alternatives' will not fail due to its
absense.

In addition, this goes the extra mile by copying the contents of
/var/lib/alternatives into the resulting image, which preserves the
altenratives database for any installed packages.

This second part could be controversial as there is an expectation that
there's minimal (or no) contents left in /var after running
'ostree container commit', but it does work and is useful.
@bsherman bsherman changed the base branch from main to refactor-cleanup March 26, 2024 22:11
Base automatically changed from refactor-cleanup to main March 26, 2024 22:38
@bsherman bsherman marked this pull request as ready for review March 26, 2024 22:41
@bsherman bsherman enabled auto-merge March 26, 2024 22:43
@bsherman bsherman added this pull request to the merge queue Mar 26, 2024
Merged via the queue into main with commit e832505 Mar 26, 2024
33 checks passed
@bsherman bsherman deleted the alternatives-workaround-refactor branch March 26, 2024 22:58
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