Skip to content

Conversation

@bbhtt
Copy link
Contributor

@bbhtt bbhtt commented Jul 7, 2025

The main problem here is the linter is running from "outside" of the target app, not inside its flatpak run or equivalent sandbox.

So using GLib.find_program_in_path will find the program in the "parent" env and always fail.

We need to use a worse alternative, something like os.access(os.path.join(bin_path, executable), X.OK) where bin_path is <builddir>/files/bin or <path_to_extracted_repo>/files/bin but that comes with its own set of issues.

We can extract from the exported repo, but the executable calculated inside it might be a symlink to something else somewhere. This quickly goes in the issue that we need to extract the entire ostree repo, and even then resolving symlinks may fail.

We have a lot of large apps and extracting the entire repo is not sustainable — we might run out of space.

@bbhtt bbhtt marked this pull request as draft July 7, 2025 06:33
The previous attempt was reverted due to too many false positives
and edge case Exec values.

1117c32
@bbhtt bbhtt force-pushed the bbhtt/check-exec branch from f7a9805 to aaebcc7 Compare July 7, 2025 10:22
@bbhtt
Copy link
Contributor Author

bbhtt commented Jul 7, 2025

There is still the risk of running out of space while running this check, as a bunch of apps place extracted DEBs in /app/bin.

Also, it is essentially a weak verification (stronger than Flatpak's check but still not a 100% foolproof)

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