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

Not installable on ostree OSes #192

Open
marcolaux opened this issue Jun 23, 2022 · 9 comments
Open

Not installable on ostree OSes #192

marcolaux opened this issue Jun 23, 2022 · 9 comments

Comments

@marcolaux
Copy link

Hello and good day,

would you be interested to make this nice extension compatible with immutable OSes like Fedora Silverblue?

/usr for example is not writable and the udev rules for example could be written to /etc instead.

The script itself could still rely within the extension folder and does not need to be in /usr/bin or /usr/local/bin.

What do you think?

All the best
marco

@fin-ger
Copy link
Member

fin-ger commented Jun 24, 2022

Afaik GNOME Shell extensions are unsupported on ostree by design. Therefore no GNOME shell extension is able to run on Silverblue. Please prove me wrong if that is not the case. Thank you for your contribution!

@marcolaux
Copy link
Author

marcolaux commented Jun 24, 2022

Afaik GNOME Shell extensions are unsupported on ostree by design. Therefore no GNOME shell extension is able to run on Silverblue. Please prove me wrong if that is not the case. Thank you for your contribution!

This not quite true. I have several extensions installed.
Extensions are install-able by the user.

It's just that changes to the root filesystems can't be made without creating a layer.

But everything in userspace does not change at all.

@marcolaux
Copy link
Author

Because /etc/ is still writable the udev rules could be moved to there and the executable could rely within the path of the extension itself instead to get moved to /usr or /local/usr, that is not writable in Silverblue.

@marcolaux
Copy link
Author

In Silverblue and Kinoite the changeable things by the user are moved to /var (/var/etc, /var/home) and the previous paths (/etc and /home) are just symlinks to there. Everything in /var is changable.

@fin-ger
Copy link
Member

fin-ger commented Jun 24, 2022

Having the cpufreqctl executable in a user-writable location is a no-go for security reasons as this script gets executed with superuser rights and must never be writable by an unprivileged user.

But nevertheless ostree support is then worth having a look at. Thanks for your hint!

@marcolaux
Copy link
Author

What do you think about /opt/ :)

@fin-ger
Copy link
Member

fin-ger commented Jun 24, 2022

If that's a location usable in ostree and not writable by normal users, it's fine, I think. I think the easiest approach would be to package this extension as a native package for ostree based distros. In other distros /opt is usually managed by the distros package manager and therefore not a good location to put the cpufreqctl binary. /usr/local is I think the only sane location for GNOME extension website installs.

@fin-ger
Copy link
Member

fin-ger commented Jun 24, 2022

If that's not possible because GNOME shell extensions are only installable via the Extensions website on ostree, a native companion package which provides the polkit rules and cpufreqctl tool would be a good solution. If there exists a reliable mechanism to identify ostree distros, the extension could ask the user to install this companion package instead of trying to install itself into /usr/local.

@marcolaux
Copy link
Author

I learned that it's indeed possible to use /usr/local/bin for custom executables and scripts.

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

No branches or pull requests

2 participants