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

plex: use buildFHSUserEnv; update to 1.13.9.5439 #48506

Closed
wants to merge 2 commits into from

Conversation

colemickens
Copy link
Member

@colemickens colemickens commented Oct 16, 2018

NOTE: Credit for this work and change all goes to @yegortimoshenko who actually did this module rewrite. I've just rebased it.

Motivation for this change

The original motivation is that Plex now downloads plugins at runtime and expects to be able to randomly execute such binaries.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Copy link
Member

@lukateras lukateras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks reverse compatibility though, which is why I was hesitant to merge it.

@colemickens
Copy link
Member Author

Is it the plugin stuff that is not backward/reverse compatible? I had tried upgrading to your rewritten module, and then removing your changes and Plex was still able to startup normally and had my library contents. Otherwise, I'm not sure I understand the problem.

@lukateras
Copy link
Member

lukateras commented Oct 16, 2018

I think local SQLite DB is not reverse-compatible, i.e. you will have to relogin. I might be wrong, though.

@colemickens
Copy link
Member Author

I'm not sure I understand why the data would be affected by the module changes. There's two things I can think about:

  • the module rewrite - but it still stores data in the same place, so I don't see why it would be impacted?
  • a plex upgrade that changes the DB in a way that isn't backward compatible -- given that we don't have any testing, this could have happened in the past, or maybe will never happen. It seems separate from the module rewrite.

The database also stores the media metadata. It seemed to work with and without your changes when I tested it - forward and backward. And if there were a login/logout, maybe it was the systemd unit restart (stores cookies in mem?)? If that's the only side effect, it seems small to me.

@lukateras
Copy link
Member

It seemed to work with and without your changes when I tested it - forward and backward.

Oh, OK, meaning I was wrong about SQLite DB. I thought it's now being stored in a different path.

Let's merge then.

@colemickens
Copy link
Member Author

@yegortimoshenko So, I accidentally dropped your fix for the removed options, was trying to recreate it, and now I understand what you're concerned about.

I don't really understand how the Plex library plugins work, but it looks like the symlinking of the "skeleton directory" was customizable previously via the dataDir variable that is now removed. (I can't tell if it actually was customizing the location of the Plex runtime data though.)

Unfortunately, I am less confident that this won't break things if someone was using dataDir to change the plex data location, now that I realize this was customizable.

If it was just as simple as redirecting the entire /var/lib/plex directory, then I assume we can continue to support an option like that with the new buildFHSUserEnv. Let me know if you have suggestions and I can try to implement and test various upgrade/downgrades with my library in a custom dataDir.

(Also, if you have a branch with the renamed/removed options, can you repush it? Thanks.)

@dywedir
Copy link
Member

dywedir commented Nov 4, 2018

Just merged update to 1.13.9.5456 #49715

@infinisil
Copy link
Member

The NixOS options need to be marked as removed, see mkRemovedOptionModule

@andrew-d
Copy link
Contributor

I just ran into #25502, which I think this fixes; anything I can do to help get this merged?

@colemickens
Copy link
Member Author

@andrew-d Some context from my very fuzzy recollection:

  1. @yegortimoshenko had pushed some commits that I accidentally overwrote. It's been a while but I think it had to do with properly deprecating options I'd removed.
  2. When I tried to reproduce it, I finally understood why there were concerns about this breaking people who were using the dataDir option previously, though I can't re-articulate them now.

Basically, I've been carrying this PR locally for months. I'd love to see it merged as well, but I need someone who uses dataDir option to weigh in, or I need someone with more weight to say that we can merge and deal with consequences later.

@bachp
Copy link
Member

bachp commented May 2, 2019

I think this can be closed now that #56565 is merged

@lukateras lukateras closed this May 2, 2019
@colemickens colemickens deleted the plex branch January 30, 2020 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants