Compare commits

...

13 Commits

Author SHA1 Message Date
LinuxServer-CI
ba4ea42004 Bot Updating Package Versions 2023-04-22 10:46:53 -05:00
LinuxServer-CI
9eb549257c Bot Updating Package Versions 2023-04-15 17:46:32 +02:00
LinuxServer-CI
9d937649a3 Bot Updating Package Versions 2023-04-08 17:50:10 +02:00
LinuxServer-CI
fb3cf77ee1 Bot Updating Package Versions 2023-04-02 10:13:37 -05:00
LinuxServer-CI
ba4c2d4ddf Bot Updating Templated Files 2023-04-02 10:01:59 -05:00
LinuxServer-CI
872a422b3b Bot Updating Templated Files 2023-04-02 10:00:27 -05:00
LinuxServer-CI
0fc26ae6d2 Bot Updating Templated Files 2023-04-02 09:58:49 -05:00
LinuxServer-CI
86630cc696 Bot Updating Package Versions 2023-03-28 13:31:01 -05:00
aptalca
e6e49062ec Merge pull request #221 from linuxserver/piconbuild
extract picons during build
2023-03-28 14:13:23 -04:00
LinuxServer-CI
d7e8758b7d Bot Updating Package Versions 2023-03-26 10:07:35 -05:00
aptalca
a1c3f4e8a9 fix lsiown command 2023-03-17 14:01:28 -04:00
aptalca
fa7487747d Use lsiown to fix perms 2023-03-17 10:00:17 -04:00
aptalca
cf936490b9 extract picons during build 2023-03-17 09:43:24 -04:00
14 changed files with 109 additions and 131 deletions

View File

@@ -1,12 +0,0 @@
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

14
.github/workflows/call_issue_pr_tracker.yml vendored Executable file
View File

@@ -0,0 +1,14 @@
name: Issue & PR Tracker
on:
issues:
types: [opened,reopened,labeled,unlabeled]
pull_request_target:
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled]
jobs:
manage-project:
permissions:
issues: write
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
secrets: inherit

13
.github/workflows/call_issues_cron.yml vendored Executable file
View File

@@ -0,0 +1,13 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: '27 13 * * *'
workflow_dispatch:
jobs:
stale:
permissions:
issues: write
pull-requests: write
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
secrets: inherit

View File

@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
on:
schedule:
- cron: '52 14 * * 0'
- cron: '25 15 * * 6'
workflow_dispatch:
jobs:

View File

@@ -1,9 +1,10 @@
name: Permission check
on:
pull_request:
pull_request_target:
paths:
- '**/run'
- '**/finish'
- '**/check'
jobs:
permission_check:
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

View File

@@ -1,23 +0,0 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6.0.1
with:
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 30
days-before-close: 365
exempt-issue-labels: 'awaiting-approval,work-in-progress'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,5 +1,10 @@
# syntax=docker/dockerfile:1
############## picons stage ##############
# built by https://github.com/linuxserver/picons-builder
FROM ghcr.io/linuxserver/picons-builder as piconsstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
############## build stage ##############
@@ -12,8 +17,9 @@ ARG TZ="Etc/UTC"
ARG TVHEADEND_COMMIT
ENV HOME="/config"
# copy patches
# copy patches and picons
COPY patches/ /tmp/patches/
COPY --from=piconsstage /picons.tar.bz2 /picons.tar.bz2
RUN \
echo "**** install build packages ****" && \
@@ -211,10 +217,12 @@ RUN \
make -j 2 && \
make DESTDIR=/tmp/comskip-build install
############## picons stage ##############
# built by https://github.com/linuxserver/picons-builder
FROM ghcr.io/linuxserver/picons-builder as piconsstage
RUN \
echo "***** extract picons ****" && \
mkdir -p /picons && \
tar xf \
/picons.tar.bz2 -C \
/picons
############## runtime stage ##############
FROM ghcr.io/linuxserver/baseimage-alpine:3.17
@@ -313,7 +321,7 @@ COPY --from=buildstage /tmp/tvheadend-build/usr/ /usr/
COPY --from=buildstage /tmp/xmltv-build/usr/ /usr/
COPY --from=buildstage /usr/local/share/man/ /usr/local/share/man/
COPY --from=buildstage /usr/local/share/perl5/ /usr/local/share/perl5/
COPY --from=piconsstage /picons.tar.bz2 /picons.tar.bz2
COPY --from=buildstage /picons /picons
COPY root/ /
# ports and volumes

View File

@@ -1,5 +1,10 @@
# syntax=docker/dockerfile:1
############## picons stage ##############
# built by https://github.com/linuxserver/picons-builder
FROM ghcr.io/linuxserver/picons-builder as piconsstage
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as buildstage
############## build stage ##############
@@ -12,8 +17,9 @@ ARG TZ="Etc/UTC"
ARG TVHEADEND_COMMIT
ENV HOME="/config"
# copy patches
# copy patches and picons
COPY patches/ /tmp/patches/
COPY --from=piconsstage /picons.tar.bz2 /picons.tar.bz2
RUN \
echo "**** install build packages ****" && \
@@ -211,9 +217,12 @@ RUN \
make -j 2 && \
make DESTDIR=/tmp/comskip-build install
############## picons stage ##############
# built by https://github.com/linuxserver/picons-builder
FROM ghcr.io/linuxserver/picons-builder as piconsstage
RUN \
echo "***** extract picons ****" && \
mkdir -p /picons && \
tar xf \
/picons.tar.bz2 -C \
/picons
############## runtime stage ##############
@@ -311,7 +320,7 @@ COPY --from=buildstage /tmp/tvheadend-build/usr/ /usr/
COPY --from=buildstage /tmp/xmltv-build/usr/ /usr/
COPY --from=buildstage /usr/local/share/man/ /usr/local/share/man/
COPY --from=buildstage /usr/local/share/perl5/ /usr/local/share/perl5/
COPY --from=piconsstage /picons.tar.bz2 /picons.tar.bz2
COPY --from=buildstage /picons /picons
COPY root/ /
# ports and volumes

23
Jenkinsfile vendored
View File

@@ -59,7 +59,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
}
script{
env.LS_RELEASE_NUMBER = sh(
@@ -240,17 +240,14 @@ pipeline {
}
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
sh '''#! /bin/bash
set -e
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
docker run --rm \
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
-e FILE_NAME="shellcheck-result.xml" \
-e MIMETYPE="text/xml" \
-v ${WORKSPACE}:/mnt \
-e SECRET_KEY=\"${S3_SECRET}\" \
-e ACCESS_KEY=\"${S3_KEY}\" \
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
python /upload.py'''
-v ${WORKSPACE}:/mnt \
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
apk add --no-cache py3-pip && \
pip install s3cmd && \
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
}
}
}
@@ -287,7 +284,7 @@ pipeline {
echo "Jenkinsfile is up to date."
fi
# Stage 2 - Delete old templates
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md\n.github/ISSUE_TEMPLATE/issue.bug.md\n.github/ISSUE_TEMPLATE/issue.feature.md"
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
@@ -304,7 +301,7 @@ pipeline {
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old templates"
echo "Deleting old and deprecated templates"
rm -Rf ${TEMPDIR}
exit 0
else

View File

@@ -301,6 +301,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **17.03.23:** - Extract picons during build instead of init.
* **23.02.23:** - Rebase to Alpine 3.17, migrate to s6v3, drop armhf support.
* **31.08.22:** - Update sample env vars and how RUN_OPTS are handled.
* **19.08.22:** - Switch to new picons builder.

View File

@@ -2,7 +2,7 @@ NAME VERSION TYPE
alpine-baselayout 3.4.0-r0 apk
alpine-baselayout-data 3.4.0-r0 apk
alpine-keys 2.4-r1 apk
alpine-release 3.17.2-r0 apk
alpine-release 3.17.3-r0 apk
alsa-lib 1.2.8-r0 apk
aom-libs 3.5.0-r0 apk
apk-tools 2.12.10-r1 apk
@@ -18,11 +18,11 @@ certifi 2022.12.7 python
charset-normalizer 3.0.1 python
cjson 1.7.15-r3 apk
coreutils 9.1-r0 apk
curl 7.88.1-r0 apk
curl 8.0.1-r0 apk
dbus-libs 1.14.4-r0 apk
ffmpeg 5.1.2-r1 apk
ffmpeg-libs 5.1.2-r1 apk
ffmpeg4-libs 4.4.3-r0 apk
ffmpeg 5.1.3-r0 apk
ffmpeg-libs 5.1.3-r0 apk
ffmpeg4-libs 4.4.4-r0 apk
flac-libs 1.4.2-r0 apk
fontconfig 2.14.1-r0 apk
freetype 2.12.1-r0 apk
@@ -49,8 +49,8 @@ libblkid 2.38.1-r1 apk
libbsd 0.11.7-r0 apk
libbz2 1.0.8-r4 apk
libc-utils 0.7.2-r3 apk
libcrypto3 3.0.8-r0 apk
libcurl 7.88.1-r0 apk
libcrypto3 3.0.8-r4 apk
libcurl 8.0.1-r0 apk
libdav1d 1.0.0-r2 apk
libdrm 2.4.114-r0 apk
libdvbcsa 1.1.0-r1 apk
@@ -76,7 +76,7 @@ libsndfile 1.1.0-r2 apk
libsodium 1.0.18-r2 apk
libsrt 1.5.1-r0 apk
libssh 0.10.4-r0 apk
libssl3 3.0.8-r0 apk
libssl3 3.0.8-r4 apk
libstdc++ 12.2.1_git20220924-r4 apk
libtasn1 4.19.0-r0 apk
libtheora 1.1.1-r16 apk
@@ -94,12 +94,12 @@ libxcb 1.15-r0 apk
libxdmcp 1.1.4-r0 apk
libxext 1.3.5-r0 apk
libxfixes 6.0.0-r0 apk
libxml2 2.10.3-r1 apk
libxslt 1.1.37-r0 apk
libxml2 2.10.4-r0 apk
libxslt 1.1.37-r1 apk
libzmq 4.3.4-r1 apk
linux-headers 5.19.5-r0 apk
linux-pam 1.5.2-r1 apk
mbedtls 2.28.2-r0 apk
mbedtls 2.28.3-r0 apk
mesa 22.2.5-r1 apk
mpdecimal 2.5.1-r1 apk
musl 1.2.3-r4 apk
@@ -115,7 +115,7 @@ opus 1.3.1-r1 apk
orc 0.4.33-r0 apk
p11-kit 0.24.1-r1 apk
pcre2 10.42-r0 apk
perl 5.36.0-r0 apk
perl 5.36.0-r1 apk
perl-archive-zip 1.68-r2 apk
perl-b-hooks-endofscope 0.26-r0 apk
perl-boolean 0.46-r2 apk
@@ -133,14 +133,14 @@ perl-date-manip 6.89-r0 apk
perl-datetime 1.59-r0 apk
perl-datetime-format-strptime 1.79-r0 apk
perl-datetime-locale 1.37-r0 apk
perl-datetime-timezone 2.56-r0 apk
perl-datetime-timezone 2.60-r0 apk
perl-dbd-sqlite 1.72-r0 apk
perl-dbi 1.643-r4 apk
perl-devel-stacktrace 2.04-r3 apk
perl-devel-symdump 2.18-r2 apk
perl-digest-sha1 2.13-r15 apk
perl-dist-checkconflicts 0.11-r2 apk
perl-doc 5.36.0-r0 apk
perl-doc 5.36.0-r1 apk
perl-encode-locale 1.05-r3 apk
perl-eval-closure 0.14-r2 apk
perl-exception-class 1.45-r0 apk
@@ -241,12 +241,12 @@ py3-charset-normalizer 3.0.1-r0 apk
py3-idna 3.4-r2 apk
py3-requests 2.28.1-r1 apk
py3-urllib3 1.26.12-r0 apk
python 3.10.10 binary
python3 3.10.10-r0 apk
python 3.10.11 binary
python3 3.10.11-r0 apk
readline 8.2.0-r0 apk
requests 2.28.1 python
scanelf 1.3.5-r1 apk
sdl2 2.26.3-r0 apk
sdl2 2.26.5-r0 apk
shadow 4.13-r0 apk
skalibs 2.12.0.1-r0 apk
soxr 0.1.3-r3 apk
@@ -254,8 +254,8 @@ speexdsp 1.2.1-r0 apk
sqlite-libs 3.40.1-r0 apk
ssl_client 1.35.0-r29 apk
svt-av1-libs 1.3.0-r0 apk
tdb-libs 1.4.7-r0 apk
tzdata 2022f-r1 apk
tdb-libs 1.4.6-r0 apk
tzdata 2023c-r0 apk
uriparser 0.9.7-r0 apk
urllib3 1.26.12 python
utmps-libs 0.1.2.0-r1 apk

View File

@@ -123,6 +123,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "17.03.23:", desc: "Extract picons during build instead of init." }
- { date: "23.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3, drop armhf support." }
- { date: "31.08.22:", desc: "Update sample env vars and how RUN_OPTS are handled." }
- { date: "19.08.22:", desc: "Switch to new picons builder." }

View File

@@ -3,50 +3,19 @@
# make folders
mkdir -p \
/config/comskip
/config/comskip
# copy config
if [[ ! -e /config/dvr/config ]]; then
(mkdir -p /config/dvr/config && cp /defaults/7a5edfbe189851e5b1d1df19c93962f0 /config/dvr/config/7a5edfbe189851e5b1d1df19c93962f0)
(mkdir -p /config/dvr/config && cp /defaults/7a5edfbe189851e5b1d1df19c93962f0 /config/dvr/config/7a5edfbe189851e5b1d1df19c93962f0)
fi
if [[ ! -e /config/comskip/comskip.ini ]]; then
cp /defaults/comskip.ini.org /config/comskip/comskip.ini
cp /defaults/comskip.ini.org /config/comskip/comskip.ini
fi
if [[ ! -e /config/config ]]; then
(cp /defaults/config /config/config)
fi
# extract picons on first run
if [[ -f /picons.tar.bz2 ]]; then
mkdir -p /picons
tar xf \
/picons.tar.bz2 -C \
/picons &&
rm -f /picons.tar.bz2
fi
# function to randomly sample 5 files for their owner and only chown if not abc
chowner () {
files=(${1}/*)
for i in {1..5}; do
user=$(stat -c '%U' $(printf "%s\n" "${files[RANDOM % ${#files[@]}]}"))
if [ "${user}" != "abc" ]; then
chown -R abc:abc ${1}
break
fi
done
}
# permissions
echo "Setting permissions"
abc_dirs=( \
/config \
/picons \
)
for i in "${abc_dirs[@]}"; do
if [ "$(ls -A ${i})" ]; then
chowner ${i}
else
chown -R abc:abc ${i}
fi
done
lsiown -R abc:abc /config

View File

@@ -5,23 +5,23 @@ 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-z0-9' | head -c8)"
groupadd "$VIDEO_NAME"
groupmod -g "$VIDEO_GID" "$VIDEO_NAME"
fi
usermod -a -G "$VIDEO_NAME" abc
touch /groupadd
fi
fi
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-z0-9' | head -c8)"
groupadd "$VIDEO_NAME"
groupmod -g "$VIDEO_GID" "$VIDEO_NAME"
fi
usermod -a -G "$VIDEO_NAME" abc
touch /groupadd
fi
fi
done
if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then
usermod -a -G root abc
usermod -a -G root abc
fi