Skip to content

init-plex-chown/run: use TMPDIR instead of hardcoded /run/plex-temp#448

Open
evan314159 wants to merge 2 commits intolinuxserver:masterfrom
evan314159:readonly-tmpdir
Open

init-plex-chown/run: use TMPDIR instead of hardcoded /run/plex-temp#448
evan314159 wants to merge 2 commits intolinuxserver:masterfrom
evan314159:readonly-tmpdir

Conversation

@evan314159
Copy link
Contributor

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Changes init-plex-chown/run to use TMPDIR instead of hardcoded /run/plex-temp

Plex uses TMPDIR to store transcodes of music to WAV format for music
analysis (and maybe other things).

LS.io container sets TMPDIR=/run/plex-temp in Dockerfile. With read-only root this
means the /run tmpfs needs to have enough memory to store music analysis
transcodes.

LS.io container hardcoded /run/plex-temp in init so TMPDIR could not be
flexibly changed -- changed to use TMPDIR and clean on restart in case
of unclean shutdown.

Plex container is marked as supporting read-only root.

Benefits of this PR and context:

Compatibility with read-only root with /run as a small tmpfs and TMPDIR moved to a non-tmpfs to service transcoding.

How Has This Been Tested?

Tested (1) with default TMPDIR (2) with TMPDIR set to /transcode/temp with /transcode being a bind mount.

Source / References:

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448/index.html
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448/shellcheck-result.xml

Tag Passed
amd64-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448
arm64v8-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448

@thespad
Copy link
Member

thespad commented Mar 15, 2026

Please rebase this against master and then I'm think I'm happy to merge it.

Changes init-plex-chown/run to use TMPDIR instead of hardcoded /run/plex-temp

Plex uses TMPDIR to store transcodes of music to WAV format for music
analysis (and maybe other things).

LS.io container sets TMPDIR=/run/plex-temp.  With read-only root this
means the /run tmpfs needs to have enough memory to store music analysis
transcodes.

LS.io container hardcoded /run/plex-temp in init so TMPDIR could not be
flexibly changed -- changed to use TMPDIR and clean on restart in case
of unclean shutdown.

Plex container is marked as supporting read-only root.
@evan314159
Copy link
Contributor Author

Rebased against master -- thank you!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448/index.html
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448/shellcheck-result.xml

Tag Passed
amd64-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448
arm64v8-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, didn't notice this. You need to edit the readme-vars.yaml. Any direct changes to the readme.md will be lost when the repo templating runs on build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, these are my first contributions to LS.io and I did not see the readme-vars.yaml. Hopefully third time's a charm!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448/index.html
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448/shellcheck-result.xml

Tag Passed
amd64-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448
arm64v8-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants