Skip to content

Install into /usr instead of /usr/local#20

Open
Eliasin wants to merge 1 commit intoelegos:mainfrom
Eliasin:main
Open

Install into /usr instead of /usr/local#20
Eliasin wants to merge 1 commit intoelegos:mainfrom
Eliasin:main

Conversation

@Eliasin
Copy link

@Eliasin Eliasin commented May 10, 2025

These are the changes I needed to make things work as mentioned in #19, other than the prefix changes I ran into a really weird issue where during the invocation of pyinstaller the which command could not be found, so I did a quick hack to keep everything working.

I tested the output and rpm-ostree installs it fine, though as mentioned in the issue I haven't been able to test the functionality yet.

+ python -m pipenv run pyinstaller arctis-manager.spec
42 INFO: PyInstaller: 6.12.0, contrib hooks: 2025.1
42 INFO: Python: 3.13.3
43 INFO: Platform: Linux-6.14.2-x86_64-with-glibc2.40
43 INFO: Python environment: /home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi
/bin/sh: line 1: which: command not found
Traceback (most recent call last):
    File "/home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi/bin/pyinstaller", line 8, in <module>
    sys.exit(_console_script_run())
    ~~~~~~~~~~~~~~~~~~~^^
    File "/home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi/lib/python3.13/site-packages/PyInstaller/__main__.py", line 231, in _console_script_run
    run()
    ~~~^^
    File "/home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi/lib/python3.13/site-packages/PyInstaller/__main__.py", line 215, in run
    run_build(pyi_config, spec_file, **vars(args))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi/lib/python3.13/site-packages/PyInstaller/__main__.py", line 70, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi/lib/python3.13/site-packages/PyInstaller/building/build_main.py", line 1270, in main
    build(specfile, distpath, workpath, clean_build)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/build/.local/share/virtualenvs/arctis-manager-1.17-build-9po78Wpi/lib/python3.13/site-packages/PyInstaller/building/build_main.py", line 1208, in build
    exec(code, spec_namespace)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^
    File "arctis-manager.spec", line 15, in <module>
    which_python_p = subprocess.run('which python3', shell=True, check=True, stdout=subprocess.PIPE)
    File "/usr/lib64/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
            output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command 'which python3' returned non-zero exit status 127.

@elegos
Copy link
Owner

elegos commented Jul 4, 2025

I'm not quite sure that changing from /usr to /usr/local will change something, and not having which recognized is weird.

I think I'm going to study deeper Bazzite and try to sort out an alternative to the current installation (I'd leave /usr/ to official packages only, rather than making it dirt with unofficial ones).

@Eliasin
Copy link
Author

Eliasin commented Jul 7, 2025

You're right that it doesn't usually make a difference, but Bazzite and other universal blue immutable distros

I'm not quite sure that changing from /usr to /usr/local will change something, and not having which recognized is weird.

I think I'm going to study deeper Bazzite and try to sort out an alternative to the current installation (I'd leave /usr/ to official packages only, rather than making it dirt with unofficial ones).

You're right that it won't change anything for most distros, but Bazzite and universal blue based distros don't expect any "system" packages to install into /usr/local and excludes them from rpm-ostree's functionality because they preserve it across system upgrades. Some details about that are included here https://ostreedev.github.io/ostree/adapting-existing/ and here coreos/fedora-coreos-tracker#1681

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

Successfully merging this pull request may close these issues.

2 participants