diff --git a/.github/workflows/call_invalid_helper.yml b/.github/workflows/call_invalid_helper.yml new file mode 100644 index 0000000..773767c --- /dev/null +++ b/.github/workflows/call_invalid_helper.yml @@ -0,0 +1,12 @@ +name: Comment on invalid interaction +on: + issues: + types: + - labeled +jobs: + add-comment-on-invalid: + if: github.event.label.name == 'invalid' + permissions: + issues: write + uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1 + secrets: inherit diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index fbd8b7c..cff2925 100755 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -18,7 +18,7 @@ jobs: fi echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_FFMPEG_MASTER\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(echo 4.4-cli) + EXT_RELEASE=$(echo 5.1.2-cli) if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for ffmpeg branch master" diff --git a/Dockerfile b/Dockerfile index 904afc5..e86bdee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ +# syntax=docker/dockerfile:1 + FROM ghcr.io/linuxserver/ffmpeg:bin as binstage -FROM ghcr.io/linuxserver/baseimage-ubuntu:focal +FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy # Add files from binstage COPY --from=binstage / / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index f04e631..40c549f 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,5 +1,7 @@ +# syntax=docker/dockerfile:1 + FROM ghcr.io/linuxserver/ffmpeg:arm64v8-bin as binstage -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy # Add files from binstage COPY --from=binstage / / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 3844ccf..cfc5639 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,5 +1,7 @@ +# syntax=docker/dockerfile:1 + FROM ghcr.io/linuxserver/ffmpeg:arm32v7-bin as binstage -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy # Add files from binstage COPY --from=binstage / / diff --git a/Jenkinsfile b/Jenkinsfile index 5b262c0..c7178f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,7 +97,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' echo 4.4-cli ''', + script: ''' echo 5.1.2-cli ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/README.md b/README.md index 8fb9106..5b84003 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **14.12.22:** - Rebase to Jammy, bump to 5.1.2. * **19.06.22:** - Rebase to Focal. * **26.08.21:** - Add support for libOpenCL. * **01.07.21:** - Bump to 4.4. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index e4ac60b..defc5f6 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-ffmpeg external_type: na -custom_version_command: "echo 4.4-cli" +custom_version_command: "echo 5.1.2-cli" release_type: stable release_tag: latest ls_branch: master diff --git a/readme-vars.yml b/readme-vars.yml index e054a0d..bfeb745 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -132,6 +132,7 @@ full_custom_readme: | ## Versions + * **14.12.22:** - Rebase to Jammy, bump to 5.1.2. * **19.06.22:** - Rebase to Focal. * **26.08.21:** - Add support for libOpenCL. * **01.07.21:** - Bump to 4.4. diff --git a/root/ffmpegwrapper.sh b/root/ffmpegwrapper.sh index cc32b20..bb1a19c 100755 --- a/root/ffmpegwrapper.sh +++ b/root/ffmpegwrapper.sh @@ -36,29 +36,38 @@ do done ## hardware support ## -FILES=$(find /dev/dri -type c -print 2>/dev/null) +FILES=$(find /dev/dri /dev/dvb -type c -print 2>/dev/null) + for i in $FILES do - VIDEO_GID=$(stat -c '%g' "$i") - if id -G abc | grep -qw "$VIDEO_GID"; then - touch /groupadd - else - if [ ! "${VIDEO_GID}" == '0' ]; then - VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}') - if [ -z "${VIDEO_NAME}" ]; then - VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)" - groupadd "$VIDEO_NAME" - groupmod -g "$VIDEO_GID" "$VIDEO_NAME" - fi - usermod -a -G "$VIDEO_NAME" abc - touch /groupadd + VIDEO_GID=$(stat -c '%g' "${i}") + VIDEO_UID=$(stat -c '%u' "${i}") + # check if user matches device + if id -u abc | grep -qw "${VIDEO_UID}"; then + echo "**** permissions for ${i} are good ****" + else + # check if group matches and that device has group rw + if id -G abc | grep -qw "${VIDEO_GID}" && [ $(stat -c '%A' "${i}" | cut -b 5,6) = "rw" ]; then + echo "**** permissions for ${i} are good ****" + # check if device needs to be added to video group + elif ! id -G abc | grep -qw "${VIDEO_GID}"; then + # check if video group needs to be created + VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}') + if [ -z "${VIDEO_NAME}" ]; then + VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-z0-9' | head -c4)" + groupadd "${VIDEO_NAME}" + groupmod -g "${VIDEO_GID}" "${VIDEO_NAME}" + echo "**** creating video group ${VIDEO_NAME} with id ${VIDEO_GID} ****" + fi + echo "**** adding ${i} to video group ${VIDEO_NAME} with id ${VIDEO_GID} ****" + usermod -a -G "${VIDEO_NAME}" abc + fi + # check if device has group rw + if [ $(stat -c '%A' "${i}" | cut -b 5,6) != "rw" ]; then + echo -e "**** The device ${i} does not have group read/write permissions, attempting to fix inside the container. ****" + chmod g+rw "${i}" + fi fi - fi done -if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then - usermod -a -G root abc -fi - run_ffmpeg -