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

os-release: Manage os-release outside of baselayout #4086

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ReillyBrogan
Copy link
Contributor

Summary

  • Add new package os-release which manages the os-release file.

joebonrichie
joebonrichie previously approved these changes Oct 17, 2024
@EbonJaeger
Copy link
Member

@HarveyDevel noted in Matrix that if this makes baselayout appear as broken when running eopkg check, users will try to reinstall baselayout, breaking their system. We might want to make sure that eopkg check knows to ignore the os-release file when this lands.

@ermo
Copy link
Contributor

ermo commented Oct 17, 2024

With this PR installed, /etc/os-release looks good, but lsb_release looks like it's missing its data...? This is how it looked after 2 reboots on my end with the packages from this PR all installed:

ermo@solus:~/repos/getsolus/monorepo [os-release* +2 ~3 -0 !]
$ cat /etc/os-release 
NAME="Solus"
VERSION="4.6"
ID="solus"
VERSION_CODENAME=convergence
VERSION_ID="4.6"
PRETTY_NAME="Solus 4.6 Convergence"
ANSI_COLOR="1;34"
HOME_URL="https://getsol.us"
SUPPORT_URL="https://help.getsol.us/docs/user/contributing/getting-involved"
BUG_REPORT_URL="https://dev.getsol.us/"
LOGO="distributor-logo-solus"
ermo@solus:~/repos/getsolus/monorepo [os-release* +2 ~3 -0 !]
$ lsb_release -a
LSB Version:	n/a
Distributor ID:	n/a
Description:	(none)
Release:	n/a
Codename:	n/a
ermo@solus:~/repos/getsolus/monorepo [os-release* +2 ~3 -0 !]
$  eopkg info -f lsb-release-data
/usr/lib/tmpfiles.d/lsb-release-data.conf, type: library, size: 64, sha1sum: d065eb300229cb416fee75167acf743700f2179e
/usr/share/os-release/lsb-release, type: data, size: 110, sha1sum: a13202479fbc38e3f55f3e41fae50b42ce9e3de1
Package found in Local repository:
Name                : lsb-release-data, version: 4.6, release: 1
Summary             : lsb-release data file
Description         : lsb-release data file
Licenses            : MIT
Component           : system.utils
Dependencies        : 
Distribution        : Solus, Dist. Release: 1
Architecture        : x86_64, Installed Size: 174.00  B, Package Size: 1.39 KB
Reverse Dependencies: lsb-release

ermo@solus:~/repos/getsolus/monorepo [os-release* +2 ~3 -0 !]
$ cat /usr/share/os-release/lsb-release
LSB_VERSION=1.4
DISTRIB_ID=Solus
DISTRIB_DESCRIPTION="Solus"
DISTRIB_RELEASE=4.6
DISTRIB_CODENAME=convergence

@EbonJaeger EbonJaeger added the hacktoberfest-accepted This PR is accepted for Hacktoberfest label Oct 18, 2024
@ermo
Copy link
Contributor

ermo commented Oct 20, 2024

FTR, this is waiting on the feature where the /usr-merge script becomes resilient to baselayout re-installs.

blocked-by: #4118

Context: @HarveyDevel and @sheepman4267 both pointed out that users will run eopkg check and then decide to re-install baselayout to fix that, because that's what we taught them to do... 😭

@ermo ermo added Platform Integration Integration of various components within Solus Plumbing Core components Blocked This is blocked on something else labels Oct 20, 2024
@ermo ermo added this to the Solus 4.7 milestone Oct 20, 2024
@ermo ermo requested a review from silkeh October 20, 2024 15:40
@ReillyBrogan
Copy link
Contributor Author

Theoretically if a user sees a broken eopkg check as a result of this then that implies that they have a fully updated eopkg. That means that we can ensure that baselayout is ignored by the eopkg-check (if it isn't already). I've been thinking that we need to make the usr-merge script run every boot, right now it skips it if the marker file is found, but that means that if a user does something where the system now needs to be usr-merged again (such as installing 32bit libraries after the system has already been usr-merged or somehow having eopkg do something stupid) that it won't run again. I think the logic could be modified so that it starts up, checks whether the symlinks are present and then only displays the message to the user if it has to do work.

@silkeh
Copy link
Member

silkeh commented Oct 22, 2024

That means that we can ensure that baselayout is ignored by the eopkg-check (if it isn't already).

/etc/os-release is already ignored, probably because its a configuration file:

$ echo 'MYVALUE="bork"' | sudo tee -a /etc/os-release
$ sudo eopkg.bin check baselayout
Checking integrity of baselayout    OK
$ sudo env LC_ALL=C eopkg check baselayout
Checking integrity of baselayout    OK
$ sudo eopkg.bin sf /etc/os-release
Searching for /etc/os-release
Package baselayout has file /etc/os-release

I haven't tried it with the packages from this PR, but I don't see how that would be different.

right now it skips it if the marker file is found, but that means that if a user does something where the system now needs to be usr-merged again (such as installing 32bit libraries after the system has already been usr-merged or somehow having eopkg do something stupid) that it won't run again. I think the logic could be modified so that it starts up, checks whether the symlinks are present and then only displays the message to the user if it has to do work.

That's pretty much what I had in mind for #4118.

Copy link
Member

@silkeh silkeh left a comment

Choose a reason for hiding this comment

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

LGTM, please rebase to fix conflicts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked This is blocked on something else hacktoberfest-accepted This PR is accepted for Hacktoberfest Platform Integration Integration of various components within Solus Plumbing Core components
Projects
Status: Ready
Development

Successfully merging this pull request may close these issues.

5 participants