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

steamtinkerlaunch: Missing xxd dependency and write protections #226086

Closed
garaiza-93 opened this issue Apr 13, 2023 · 19 comments
Closed

steamtinkerlaunch: Missing xxd dependency and write protections #226086

garaiza-93 opened this issue Apr 13, 2023 · 19 comments
Labels
0.kind: bug Something is broken

Comments

@garaiza-93
Copy link
Contributor

garaiza-93 commented Apr 13, 2023

Describe the bug

According to logs, the xxd dependency is missing.
Additionally, write protections on files within lang/ can make steamtinkerlaunch look "stuck" when really rm is waiting for user input.

Steps To Reproduce

Steps to reproduce the behavior:

  1. In terminal, execute steamtinkerlaunch compat add to add it as a compatability tool.
  2. Execute steam in a terminal.
  3. Set a game to use steamtinkerlaunch in the game's Properties.
  4. Start the game; note steam's output to the terminal.
  5. Note the following lines:
    rm: remove write-protected regular file '/home/user/.config/steamtinkerlaunch/lang/english.txt'?
Thu Apr 13 04:55:39 PM CDT 2023 ERROR - checkIntDeps - xxd not found!
Thu Apr 13 04:55:39 PM CDT 2023 ERROR - checkIntDeps - Above programs need to be installed to use 'steamtinkerlaunch'
Thu Apr 13 04:55:39 PM CDT 2023 ERROR - checkIntDeps The dependency check can be disabled by enabling 'SKIPINTDEPCHECK' - exiting now

Expected behavior

  • No prompts for removing a write protected file (should it even be write-protected?)
  • xxd dependency included OOTB.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

I tested this on Fallout: New Vegas, and Skyrim Special Edition.

Notify maintainers

@urandom2

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.22, NixOS, 23.05 (Stoat), 23.05.20230403.53dad94`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@garaiza-93 garaiza-93 added the 0.kind: bug Something is broken label Apr 13, 2023
@garaiza-93
Copy link
Contributor Author

@urandom2 I believe this is related to #210018 (but actually has details)

@daemonspudguy
Copy link

But why is there a write protect error?

@daemonspudguy
Copy link

@r-ryantm you contributed the latest update for this, do you have any ideas as to why steamtinkerlaunch is having write protect issues?

@daemonspudguy
Copy link

It's write protected because the Nix store is read-only. And the script doesn't know how to account for that.

@daemonspudguy
Copy link

@ryantam @urandom2 so, Steam Tinker Launch on NixOS is currently 100% useless when installed through nixpkgs because it can't remove a file in its config folder. Should the package even exist if it flat out doesn't work?

@urandom2
Copy link
Contributor

urandom2 commented Jun 3, 2023

there is still value to packaging, nixos is not the only environment that can consume this script, and you are welcome to provide a patch to fix it

@daemonspudguy
Copy link

The problem is unfixable with a read only Nix store.

@bayazidbh
Copy link

Aren't there build options to make packages writeable? According to home-manager, nix-build can accept the --no-write-lock-file option, and is it not possible to just enable that for stl in a similar way to how certain nixpkgs have an unwrapped option?

@garaiza-93
Copy link
Contributor Author

@daemonspudguy

when installed through nixpkgs

Did you happen to get STL to work outside of nixpkgs? A flake, maybe?

@garaiza-93
Copy link
Contributor Author

btw @urandom2, is the message about xxd a red herring? I noticed that it's in the derivation.

@daemonspudguy
Copy link

Yes. I installed it through ProtonUp-QT's flatpak.

@urandom2
Copy link
Contributor

urandom2 commented Jun 7, 2023

btw @urandom2, is the message about xxd a red herring? I noticed that it's in the derivation.

need to spend some time to read through the source to be sure, but that is my gut; xxd is definitely in $PATH

@garaiza-93
Copy link
Contributor Author

i'm spending some time on finding out where in the source lang files are created and deleted. it may be a nix store thing, and maybe a substitution can be done to preserve write permissions, or to skip deletion entirely.

@daemonspudguy
Copy link

It's a nix store thing.

@garaiza-93
Copy link
Contributor Author

sonic2kk/steamtinkerlaunch#822 (comment)

All available lang files are in the Nix store, so they are read-only. Then, when lang files are copied to the user's config directory, they keep those same read-only permissions!

I think I may have an idea, but how to patch that I don't really know. Maybe we can use something like substituteInPlace on steamtinkerlaunch to add write permissions to the files copied to the user's config directory?

@garaiza-93
Copy link
Contributor Author

I've put in a PR here just in case to address the write permissions issue. Basically, it adds write permissions to the language files before and after it's updated. sonic2kk/steamtinkerlaunch#824

Just keeping y'all up to speed

@garaiza-93
Copy link
Contributor Author

@jakehamilton thanks for these notes! https://gist.github.com/jakehamilton/632edeb9d170a2aedc9984a0363523d3

@urandom2, do you think that makeWrapper could be the reason why the dependencies aren't being found, despite them being in PATH?

@sonic2kk
Copy link

sonic2kk commented Jun 7, 2023

SteamTinkerLaunch maintainer here 👋

It's nice to see all the discussion here, first of all! Thanks a bunch to @garaiza-93 for the PR. Just wanted to mention that if there is anything that can be done on my end to help improve packaging for Nix (i.e. anything to fix dependencies not being found), please feel free to open an issue, or a PR if you have a general improvement/fix in mind (or both!) - There is no pressure for anyone to contribute, just getting the word out that I am very happy to help any communities around STL where I can. That line on the readme "Many thanks to all package maintainers" isn't just for show ;-)

@Atemu
Copy link
Member

Atemu commented Mar 14, 2024

Closing in favour of #295902 where I've identified the root causes and discussed some solutions.

@Atemu Atemu closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

6 participants