Repository navigation
Set up the webcam when /dev/video0 is a leftover regular file - #196
Merged
Merged
Conversation
Without CAP_MKNOD the webcam block falls back to touch, which leaves a regular file at /dev/video0. Where /dev outlives a restart of the init, that file made the existence test skip the whole block on every later start. A regular file there is now treated as the placeholder it is. A character device is still left alone, so a real video device passed in from the host is not touched. closes linuxserver#195
Member
|
dev gets synched to all the branches when we do waterfalls this should time with selkies 2.1 if everything goes to plan. |
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.
Description:
One line in
init-selkies-config. The webcam block now also runs when/dev/video0is already a regular file, and otherwise behaves as before:The test is scoped to a regular file, as suggested in #195. A character device at
/dev/video0is still left alone, so a real video device or a v4l2 loopback mounted in from the host is not touched.Benefits of this PR and context:
Closes #195. Without
CAP_MKNODthe block falls back totouch, which leaves a regular file. Where/devoutlives a restart of the init, that file made the! -etest false on every later start, soSELKIES_WEBCAM_ENABLEDwas not set and the interposer was not added toLD_PRELOAD. The webcam worked on the first start only.How Has This Been Tested?
On
ghcr.io/linuxserver/baseimage-selkies:dev-5e1478e9-ls23, amd64, Docker 29, with the image's owninit-selkies-config/runbind-mounted once unchanged and once with this line, every run with--cap-drop MKNOD. After init, read/run/s6/container_environment:/dev/video0before initLD_PRELOADLD_PRELOAD--device /dev/null:/dev/video0)NO_WEBCAMsetNot tested: the other distro branches, arm64, and a real video device passed in from a host.
No changelog entry added to
readme-vars.yml, as this is a small fix; happy to add one if you prefer.Source / References:
#195