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

AUR package not working with python virtualenv #49

Closed
marc0der opened this issue Mar 25, 2020 · 10 comments
Closed

AUR package not working with python virtualenv #49

marc0der opened this issue Mar 25, 2020 · 10 comments

Comments

@marc0der
Copy link
Contributor

marc0der commented Mar 25, 2020

To bring stability to my system, I use virtualenv to install all python tools through package managers like pip. When installing the auto-cpufreq-git package from the AUR, I noticed that it installed the auto-cpufreq binary into my user space virtualenv:

$ which auto-cpufreq
/home/marco/.virtualenv/bin/auto-cpufreq

When the auto-cpufreq service is started with systemctl it borks with the following:

● auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
     Loaded: bad-setting (Reason: Unit auto-cpufreq.service has a bad unit file setting.)
     Active: inactive (dead)

Mar 24 11:09:21 rocinante systemd[1]: /usr/lib/systemd/system/auto-cpufreq.service:9: Executable "auto-cpufreq" not found in path "/usr/local/bin:/usr/bin"
Mar 24 11:09:21 rocinante systemd[1]: auto-cpufreq.service: Unit configuration has fatal error, unit will not be started.
Mar 24 11:10:12 rocinante systemd[1]: /usr/lib/systemd/system/auto-cpufreq.service:9: Executable "auto-cpufreq" not found in path "/usr/local/bin:/usr/bin"
Mar 24 11:10:12 rocinante systemd[1]: auto-cpufreq.service: Unit configuration has fatal error, unit will not be started.
@AdnanHodzic
Copy link
Owner

AdnanHodzic commented Mar 25, 2020

It seems to be this issue could be similar to #42, which I resolved as part of as part of 1.1.2 release.

@crian any ideas why this might be an issue with AUR package?

@crian
Copy link

crian commented Mar 27, 2020

He is manipulating the install path, so the daemon can't find the file.
It expects the file in usr/local/bin or usr/bin.
The AUR pkg installs it to usr/bin by default.

@marc0der
Copy link
Contributor Author

@crian well, to be fair it isn't me manipulating the install path. It is virtualenv. And this will happen to anyone using virtualenv or pyenv would be my guess.

@crian
Copy link

crian commented Mar 27, 2020

@marc0der can you git clone https://aur.archlinux.org/auto-cpufreq-git.git and edit python setup.py install --root="${pkgdir}" to python setup.py install --prefix=/usr --root="${pkgdir}" in the PKGBUILD and install it?

@marc0der
Copy link
Contributor Author

@crian I tried your suggestion but it didn't work either. I've been messing around for over an hour trying various things to get it to work, but to no avail. It seems that many paths are hardcoded in the package and service file itself, that simply don't align with Arch. Then there is a problem of unresolved dependencies too. Calling it a night now...

@crian
Copy link

crian commented Mar 28, 2020

@marc0der need more details

@AdnanHodzic
Copy link
Owner

@marc0der snapd 2.44 is now available in AUR please install it and then give auto-cpufreq snap package a try sudo snap install auto-cpufreq

@marc0der
Copy link
Contributor Author

@AdnanHodzic thanks for that, I've just installed it with snap and am now running into some other errors. I'll open a new issue for that.

@crian sorry for not pursuing the AUR package any further, feel free to close this issue if you see fit.

@AdnanHodzic
Copy link
Owner

AdnanHodzic commented Aug 6, 2020

Many new changes have been implemented as part of 1.2 release and there's an improved snap package.

sudo snap install auto-cpufreq

I also asked @crian if he could build a new AUR package based on 1.2 release.

Hence, I'll close this issue for now. If the problem persists, please feel free to re-open it.

@dausruddin
Copy link

Just want to notify that this issue is still happening. I ended up uninstalling pyenv to install auto-cpufreq, then reinstall pyenv back. I installed via AUR.

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

4 participants