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

Flatpak Port #139

Closed
B0BP4G3 opened this issue May 8, 2023 · 10 comments
Closed

Flatpak Port #139

B0BP4G3 opened this issue May 8, 2023 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@B0BP4G3
Copy link

B0BP4G3 commented May 8, 2023

Any chance to have a port to Flatpak for easy installs on Steam Deck, or maybe you'd allow me or someone else to port it there?

@orowith2os
Copy link

I'm going to note here that I will gladly help on providing tips and guiding the porting of this to Flatpak. I'd appreciate a matrix channel though, for general project discussion as well as this.

Oversteer would need the following changes:

  • Use portals where possible
  • Use pkexec to install the udev rules
  • Go through Flatpak-spawn for pkexec if running in a sandbox
  • versions in the metadata file

Ideally oversteer would be Wayland-native to make sure it shows up well on Flathub too, if it isn't already. Oversteer should also stop assuming it's running in distro packages, and instead try and go for a more neutral style.

@berarma
Copy link
Owner

berarma commented May 8, 2023

PRs are welcome.

Edit: There's a Matrix channel dedicated to simracing projects here.

@B0BP4G3
Copy link
Author

B0BP4G3 commented May 8, 2023

Alright, I'll join it.

@berarma berarma added enhancement New feature or request help wanted Extra attention is needed labels Jul 12, 2023
@vrement
Copy link

vrement commented Oct 18, 2023

Hey i too can't make a thing on how to install this software! Is there any estimate for this simple flatpak package? Thank you alot

@jo5huajohn
Copy link
Contributor

jo5huajohn commented Mar 8, 2024

Hi, is anyone working on this? I'm new to building flatpaks, but I'm willing to contribute. I've gotten as far as putting in most of the python dependencies in. As of now, the build fails when it tries to get udev via pkg-config and cmake:

Pkg-config binary for 1 is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (2.1.1)
Determining dependency 'udev' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
-----------
Called: `/usr/bin/pkg-config --modversion udev` -> 1
stderr:
Package udev was not found in the pkg-config search path.
Perhaps you should add the directory containing `udev.pc'
to the PKG_CONFIG_PATH environment variable
Package 'udev', required by 'virtual:world', not found
-----------
CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/bin/cmake (3.28.3)
Extracting basic cmake information
Try CMake generator: auto
Calling CMake (['/usr/bin/cmake']) in /run/build/oversteer/_flatpak_build/meson-private/cmake_udev with:
  - "--trace-expand"
  - "--trace-format=json-v1"
  - "--no-warn-unused-cli"
  - "--trace-redirect=cmake_trace.txt"
  - "-DCMAKE_TOOLCHAIN_FILE=/run/build/oversteer/_flatpak_build/meson-private/cmake_udev/CMakeMesonToolchainFile.cmake"
  - "."
  -- Module search paths:    ['/', '/usr']
  -- CMake root:             /usr/share/cmake-3.28
  -- CMake architectures:    ['aarch64-linux-gnu', 'arm-linux-gnueabihf', 'i386-linux-gnu', 'x86_64-linux-gnu']
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share', '', 'lib/aarch64-linux-gnu', 'lib/arm-linux-gnueabihf', 'lib/i386-linux-gnu', 'lib/x86_64-linux-gnu']
Preliminary CMake check failed. Aborting.
Run-time dependency udev found: NO (tried pkgconfig and cmake)

Looking at the meson.build file, its looking for udev, which afaik, isn't possible in a flatpak. Maybe it should look for libudev instead?

Edit: I realize that the meson build is looking for a path. I've created a workaround patch to set the path in meson_options.txt and apply it during the flatpak build.

@jo5huajohn
Copy link
Contributor

I've got the flatpak running, but as expected, it cannot detect devices. I'm sorta stuck here, trying to come up with a workaround.

@berarma
Copy link
Owner

berarma commented Mar 9, 2024

It was expected. Since Flatpak applications run inside containers they can't access udev directly.

I recall some weeks ago a Flatpak dev was asking for examples of applications which needed udev to work. I think it was on Twitter. You might want to ask them about that.

@jo5huajohn
Copy link
Contributor

I found the tweet and it looks like the idea is still being floated around. I let them know about oversteer in case they wanted to take a look.
I guess we can get users to install the udev rules manually as a workaround? I got the application working after sharing the /sys/devices, sys/class/leds , and /run/udev directories. Sharing these directories isn't a good idea, but it is a workaround. I'm open to other ideas though.

@jo5huajohn
Copy link
Contributor

I've created #198 if anyone wants to check it out.

@berarma
Copy link
Owner

berarma commented Apr 28, 2024

Please, follow at #198.

@berarma berarma closed this as completed Apr 28, 2024
@berarma berarma mentioned this issue Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants