Repository navigation
port(linux): upload extension, Secret Service SFTP passwords and permanent-failure retries on 2.0 - #93
Open
kalopsia-space wants to merge 4 commits into
Open
port(linux): upload extension, Secret Service SFTP passwords and permanent-failure retries on 2.0#93kalopsia-space wants to merge 4 commits into
kalopsia-space wants to merge 4 commits into
Conversation
2.0's uploader spec only knew the Windows bundle (FTHR-Uploader.fthrplugin, 'FTHR Uploader.exe', the Windows hash) and stored plugins under LOCALAPPDATA, which on Linux resolved to ~/AppData/Local. Pick the bundle by platform: Linux uses FTHR-Uploader-linux.fthrplugin with the FTHR-Uploader entrypoint and lives under XDG_DATA_HOME (~/.local/share). The Linux hash is read with getattr because the committed 2.0 manifest has no Linux binding yet; an empty binding fails closed with a message that says why, instead of installing an unverified bundle. Activation restores the executable bit zip archives drop, and uploader settings.json (Catbox userhash, server auth header) is written owner-only on POSIX, as on linux. Windows keeps the exact previous spec and write path.
Restore the linux branch fix 2.0 does not have: a 4xx response from Catbox or a custom server (file too large, bad auth) was retried three times with 5/15/45 s back-off before failing. Only 429 and 5xx are transient; other HTTP statuses now fail on the first attempt. Non-HTTP errors keep retrying.
2.0 refused saved SFTP passwords anywhere but Windows Credential Manager. On Linux select keyring's SecretService backend explicitly (SecretStorage and jeepney, no plaintext or chained fallback) and probe it first: when no Secret Service daemon is running or D-Bus activatable, saving, reading and forgetting fail with a message naming the missing keyring rather than a generic vault error. Other non-Windows platforms are refused outright. The settings note names the store for the platform. Tests use a stand-in backend and never talk to a real Secret Service.
Windows file modes have no executable bit, so the Linux activation test cannot observe the chmod there even with sys.platform patched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase B uploader port for the 2.0 catch-up. 2.0's uploader only knew the Windows bundle and Windows Credential Manager, so on Linux it looked for
FTHR Uploader.exeunder~/AppData/Localand refused to save SFTP passwords.Changes
core/upload_manager.py): pick the bundle by platform. Linux usesFTHR-Uploader-linux.fthrpluginwith theFTHR-Uploaderentrypoint, installed under$XDG_DATA_HOME/FTHR Clips/plugins(~/.local/share). The Linux hash comes fromEXPECTED_UPLOADER_LINUX_BUNDLE_SHA256, whichtools/build_linux_uploader.pywrites duringbuild_linux.sh; a build without that binding refuses to install with a message that says why. Activation restores the executable bit that zip drops, and uploadersettings.json(Catbox userhash, auth header) is written0600. Windows keeps the exact previous spec and write path.FTHR_Uploader/sftp_provider.py): select keyring's SecretService backend explicitly (no plaintext or chained fallback), probe it first, and name the missing keyring when no daemon is running. The settings note names the store per platform.FTHR_Uploader/upload_runtime.py): restores thelinuxfix that a 4xx response is not retried.The bundle hash is a build output, so no Linux hash is committed: the AppImage build binds the bundle it ships.
These are the parked
port/linux-2.0-uploadercommits, cherry-picked onto the currentlinux-2.0without conflicts.Testing
test_uploader_plugin_boundary,test_sftp_provider,test_upload_manager_retry,test_uploader_builders,test_optional_uploader_runtimeand the other upload tests) pass locally with an isolatedHOME.linux-2.0(both runs excludetest_game_detection_popup.py, the segfault fix(tests): stop the game detection popup tests segfaulting Ubuntu CI #85 fixes): same failure set as the base. The one extra failure,test_binary_exists, comes from the worktree having no engine build.tools/build_linux_uploader.pybuilds and sealsFTHR-Uploader-linux.fthrpluginlocally (71 payload ELF files unpacked for the glibc gate).