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
plex: use buildFHSUserEnv #38767
plex: use buildFHSUserEnv #38767
Conversation
Haven't been able to get this to run. Something about |
Sorry, I had failed to cherry-pick both commits properly. When I do so, I'm back to basically getting zero useful output from the journal. This is literally all I get now:
|
With this PR applied, if I run Either way, I'm not sure how to proceed debugging the systemd unit that is emitted for plex to get it to start properly. |
febd5ca
to
72a68c0
Compare
1ccca68
to
654f3bf
Compare
This is now working great for me. Thank you very much! |
pkgs/servers/plex/default.nix
Outdated
vsnHash = plexpkg.vsnHash; | ||
sha256 = plexpkg.sha256; | ||
name = "plexmediaserver-${version}"; | ||
version = "1.9.6.4429-23901a099"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing I noticed, this is a major step back in terms of version.
The latest publicly available release works fine.
diff --git a/pkgs/servers/plex/default.nix b/pkgs/servers/plex/default.nix
index 4ce1410e46a..247eb7ad737 100644
--- a/pkgs/servers/plex/default.nix
+++ b/pkgs/servers/plex/default.nix
@@ -2,11 +2,11 @@
let
name = "plexmediaserver-${version}";
- version = "1.9.6.4429-23901a099";
+ version = "1.13.2.5154-fd05be322";
src = fetchurl { url = "https://downloads.plex.tv/plex-media-server/${version}/${name}.x86_64.rpm";
- sha256 = "0bmqf8b2d9h2h5q3n4ahs8y6a9aihj63rch7wd82rcr1l9xnqk9d";
+ sha256 = "09hy9xhhv17jbzplyls13xrzaxndlc278amp6k3w8q4j6wpsi6np";
};
11b3d6f
to
ce7a73a
Compare
Updated package. Rebased from nixos-unstable-small and squashed commits for cherry picking. Tested on my local setup and works for me. |
ce7a73a
to
2ebfa1e
Compare
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: plex Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: plex Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: plex Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been using for a few days. Have encountered no issues.
Will merge when I address reverse compatibility issues (this works much better, but not reverse compatible). |
What's not compatible? Did you move the database? |
(My existing media database just worked with the commit I pulled, anyway.) |
The only problem I've found is the |
patchelf --set-interpreter "${glibc.out}/lib/ld-linux-x86-64.so.2" "$out/usr/lib/plexmediaserver/$bin" | ||
patchelf --set-rpath "$out/usr/lib/plexmediaserver" "$out/usr/lib/plexmediaserver/$bin" | ||
done | ||
buildFHSUserEnv { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use buildFHSUserEnv instead of patching a few binaries, doesn't this make accessing media way more complicated then it should be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes Plex plugins usable.
I believe that FHS containers are better for pre-built binaries than patchelf because that means original binary doesn't have to be refetched on every major rebuild. That's especially important when there are redistribution restrictions on the binary. Also, that allows programs to download additional executables at run time.
Also that doesn't break self-checksumming executables. Generally, this is less prone to break over time.
More importantly, though, is that it seems like a more proper separation of concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you can't patch binaries that Plex downloads at runtime.
Gentle ping. Is there anything I can do to help this along? |
Ping again. |
I'd be willing to jump in and either send a new PR or try to finish up whatever is remaining on this one. Any suggestions? |
The main concern is preserving data and config when upgrading to the new derivation. You can either write a script to take care of it, or show that nothing is lost during an upgrade. |
Are we concerned about downgrading as well? I didn't have to reconfigure when using this PR, so upgrading doesn't seem to damage the library. I can drop this and reconfirm locally, I just want to make sure we don't also need to worry about downgrade. |
No, not that I'm aware of. Upgrade should be fine. We're concerned mostly about avoiding people losing data when updating their systems.
El 4 de octubre de 2018 0:25:09 GMT+01:00, Cole Mickens <notifications@github.com> escribió:
…Are we concerned about downgrading as well? I didn't have to
reconfigure when using this PR, so upgrading doesn't seem to damage the
library. I can drop this and reconfirm locally, I just want to make
sure we don't also need to worry about downgrade.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#38767 (comment)
--
Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi brevedad.
|
I've just been flipping back and forth between Note, I can't speak to every permutation. I've been running this module for a while. It's possible that a big version jump for older users might have different behaviors. But as far as I can tell, and from what I remember when I started using this PR... it's fine. I confirmed by checking |
If it sounds okay, maybe @yegortimoshenko can rebase, or I can send a rebase/plex-updated PR to succeed this. Let me know. |
Here's a branch, rebased, with the latest Plex package. https://github.com/colemickens/nixpkgs/commits/plex |
@colemickens diff between my branch and yours. Why?
|
@mkaito I don't know. That diff appears in the original PR form @yegortimoshenko. I'm not sure where your branch came from, etc. As far as I know, my branch should be the same commits as the PR, just rebased, and then with one extra commit bumping up the version. |
(I do know that Plex (particularly in NixOS) has had issues in the past when it's home directory didn't exist ahead of time. Also, the other change looks like a syntax-only change as well.) |
I think it was probably a rebase gone bad at some point. 👍 |
Superseded by #48506. |
Fixes #25502. NixOS module is not tested yet.
/cc @mkaito @izuk @thanegill