cpupower icon indicating copy to clipboard operation
cpupower copied to clipboard

Not installable on ostree OSes

Open marcolaux opened this issue 2 years ago • 9 comments

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

marcolaux avatar Jun 23 '22 21:06 marcolaux

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!

fin-ger avatar Jun 24 '22 03:06 fin-ger

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 avatar Jun 24 '22 05:06 marcolaux

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 avatar Jun 24 '22 05:06 marcolaux

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.

marcolaux avatar Jun 24 '22 05:06 marcolaux

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!

fin-ger avatar Jun 24 '22 05:06 fin-ger

What do you think about /opt/ :)

marcolaux avatar Jun 24 '22 07:06 marcolaux

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 avatar Jun 24 '22 08:06 fin-ger

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.

fin-ger avatar Jun 24 '22 09:06 fin-ger

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

marcolaux avatar Jun 29 '22 08:06 marcolaux