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

[FEATURE] Package for use in atomic distros #92

Open
ngraham20 opened this issue Nov 28, 2024 · 12 comments
Open

[FEATURE] Package for use in atomic distros #92

ngraham20 opened this issue Nov 28, 2024 · 12 comments
Labels
enhancement New feature or request

Comments

@ngraham20
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I am running on Bazzite, a UniversalBlue distro (based on Fedora Silverblue), and since it's a read-only root filesystem, the python files do not have the right permissions to create the services.

Describe the solution you'd like
I don't know if a flatpak is even possible, though I suspect it's not. A good alternative would be to package as an RPM file, as this can be layered in as part of the OS.

Additional context
Add any other context or screenshots about the feature request here.

Would you like to be involved in the development?
I am happy to be involved in the development. I have absolutely no background in creating RPM packages, but I am willing to learn

@ngraham20 ngraham20 added the enhancement New feature or request label Nov 28, 2024
@Svenum
Copy link
Contributor

Svenum commented Nov 28, 2024

Maybe our Nix-Package is a solution for you. If you are able to install nix package manager on your distro you can install the nix package on userlevel, as far as I know.
I never used nix on non nixos-systems, and I never used Bazzite, so this is only a blind guess.

@ngraham20
Copy link
Contributor Author

ngraham20 commented Nov 28, 2024

Maybe our Nix-Package is a solution for you. If you are able to install nix package manager on your distro you can install the nix package on userlevel, as far as I know.
I never used nix on non nixos-systems, and I never used Bazzite, so this is only a blind guess.

Wouldn't it still need to copy the service files into the proper locations? I don't know how nix packages deal with services. I know that they contain their own dependencies separately from the system, which I like, but the service files?

@ngraham20
Copy link
Contributor Author

ngraham20 commented Nov 28, 2024

Here's an idea I'd like to play around with. Is the installation as simple as

  • download ectool binary and put it in PATH
  • copy the service files and enable/start them
  • put the fw-fanctrl python script in PATH

?

@tulilirockz
Copy link

https://github.com/tulilirockz/fw-fanctrl-rpm
Implemented this thing!

@ngraham20
Copy link
Contributor Author

https://github.com/tulilirockz/fw-fanctrl-rpm Implemented this thing!

you rock!

@butu
Copy link

butu commented Dec 23, 2024

How would i install this on e.g. Bluefin or any of the Ublue images?

@tulilirockz
Copy link

tulilirockz commented Dec 23, 2024

How would i install this on e.g. Bluefin or any of the Ublue images?

If you'd like to layer it on top of those images, you can do this:

dnf5 copr enable tulilirockz/fw-fanctrl
rpm-ostree install fw-fanctrl

If you are making a custom image you can just use dnf5 to install it instead, like this:

dnf5 copr enable tulilirockz/fw-fanctrl
dnf5 install fw-fanctrl

@butu
Copy link

butu commented Dec 23, 2024

Great, that worked! Package is layered. Thank you!

But I can't use fw-fanctrl. Am I doing something wrong?

❯ fw-fanctrl
bash: fw-fanctrl: command not found
❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:stable
                   Digest: sha256:c0e0a330b55a6674bdd8bf86cb6097fc1247d08ce177869bc6f00a4a36135344
                  Version: 41.20241222 (2024-12-22T06:10:08Z)
          LayeredPackages: fw-fanctrl

@tulilirockz
Copy link

Great, that worked! Package is layered. Thank you!

But I can't use fw-fanctrl. Am I doing something wrong?

❯ fw-fanctrl
bash: fw-fanctrl: command not found
❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:stable
                   Digest: sha256:c0e0a330b55a6674bdd8bf86cb6097fc1247d08ce177869bc6f00a4a36135344
                  Version: 41.20241222 (2024-12-22T06:10:08Z)
          LayeredPackages: fw-fanctrl

Oh ahahaha im sorry, I fixed this on the latest commit to the copr but I forgot to rebuild it. It should be fixed in a few minutes. You can also run the program by running fanctrl.py on your terminal for now

@tulilirockz
Copy link

@tulilirockz
Copy link

Alright! You should be able to just rpm-ostree update your system, it should update alongside your other packages

@butu
Copy link

butu commented Dec 23, 2024

Aaah, I see! :D

So a simple rpm-ostree update did not work, it wouldn't update. But after clearing the metadata cache with rpm-ostree cleanup -m it updated!

Now fw-fanctrl is available, but there seem to be more problems:

fw-fanctrl print
[Error] > An error occurred: [Errno 2] No such file or directory
fw-fanctrl run
Exception in thread Thread-1 (startServerSocket):
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
Traceback (most recent call last):
  File "/usr/lib64/python3.13/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/usr/lib64/python3.13/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/fw-fanctrl", line 349, in startServerSocket
    os.makedirs(SOCKETS_FOLDER_PATH)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "<frozen os>", line 227, in makedirs
PermissionError: [Errno 13] Permission denied: '/run/fw-fanctrl'
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
speed: 15%, temp: 50°C, movingAverageTemp: 50.0°C, effectureTemp: 50.0°C
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
speed: 15%, temp: 50°C, movingAverageTemp: 50.0°C, effectureTemp: 50.0°C
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.

I am sorry that I only contribute with bad news, at least it's a great learning experience for me! :D

Another idea: Considering bluefin supports Framework and the fw-fanctrl repository is very popular, could this be something for ujust in Bluefin? Like ujust fw-fanctrl. Or would that be completely wrong there?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants