diff --git a/.github/workflows/release-build-trixie.yaml b/.github/workflows/release-build-trixie.yaml deleted file mode 100644 index c4b7b87..0000000 --- a/.github/workflows/release-build-trixie.yaml +++ /dev/null @@ -1,127 +0,0 @@ -name: "Release Build Trixie" - -on: - workflow_dispatch: - # Manual trigger (from bot) - inputs: - version: - required: true - type: string - description: 'The server and web stable release tag (i.e. "vX.Y.Z")' - -env: - SDK_VERSION: "9.0.x" - -permissions: - contents: read - -jobs: - Debian: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - release: - - trixie - arch: - #- amd64 - - arm64 - continue-on-error: false # true in prod, false for testing - steps: - - name: "Set dated version for unstable builds" - id: version - run: |- - echo "JELLYFIN_VERSION=${{ inputs.version }}" >> $GITHUB_ENV - echo "JELLYFIN_RELEASE_TYPE=stable" >> $GITHUB_ENV - - - name: "Install dependencies" - run: |- - sudo apt-get update - sudo apt-get install --yes python3-git python3-yaml debsigs devscripts - - - name: "Checkout repository" - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - - name: "Prepare repository" - run: |- - ./checkout.py ${{ inputs.version || 'master' }} - - - name: "Run builder for ${{ matrix.version }} ${{ matrix.arch }}" - run: |- - sudo --preserve-env ./build.py ${{ env.JELLYFIN_VERSION }} debian ${{ matrix.arch }} ${{ matrix.release }} ${{ env.DEBUG_FLAG }} - sudo chown --recursive $USER out/debian - - - name: "Import repository signing GPG key" - run: | - echo -n "${{ secrets.DEBIAN_SIGNING_KEY }}" | base64 --decode | gpg --batch --yes --import - - - name: "Sign Debian package and source files" - run: | - for file in out/debian/*.deb; do - debsigs --sign=origin --default-key=${{ secrets.DEBIAN_SIGNING_KEY_ID }} ${file} - done - debsign -k ${{ secrets.DEBIAN_SIGNING_KEY_ID }} out/debian/*.changes - - - name: "Remove repository signing GPG key" - run: | - gpg --batch --yes --delete-secret-keys ${{ secrets.DEBIAN_SIGNING_KEY_ID }} - - - name: "Upload artifacts to repository server" - uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1.0.0 - with: - host: "${{ secrets.REPO_HOST }}" - username: "${{ secrets.REPO_USER }}" - key: "${{ secrets.REPO_KEY }}" - source: "out/debian/*" - strip_components: 2 - target: "/srv/incoming/server/${{ env.JELLYFIN_VERSION }}/debian/${{ matrix.release }}/${{ matrix.arch }}" - - - name: "Import artifacts into reprepro" - uses: appleboy/ssh-action@2ead5e36573f08b82fbfce1504f1a4b05a647c6f # v1.2.2 - with: - host: "${{ secrets.REPO_HOST }}" - username: "${{ secrets.REPO_USER }}" - key: "${{ secrets.REPO_KEY }}" - debug: false - script: | - set -o xtrace - COMPONENT="main" - # Only include the architecture-dependent deb here, as the others are done only for amd64 - sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/server/${{ env.JELLYFIN_VERSION }}/debian/${{ matrix.release }}/${{ matrix.arch }}/*_${{ matrix.arch }}.deb || exit 1 - if [[ ${{ matrix.arch }} == "amd64" ]]; then - # Only include the architecture-independent packages for amd64; the other architectures are the same and conflict - sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/server/${{ env.JELLYFIN_VERSION }}/debian/${{ matrix.release }}/${{ matrix.arch }}/*_all.deb || exit 1 - # Only include the source DSC for amd64; the other architectures are the same and conflict - sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/server/${{ env.JELLYFIN_VERSION }}/debian/${{ matrix.release }}/${{ matrix.arch }}/*.dsc || exit 1 - fi - - # Only keep the latest point release for a given stable version; i.e. 10.10.14 obsoletes 10.10.13 and removes it, while leaving 10.9.10 - NEW_VERSION=${{ matrix.release }} - NEW_MAJOR_VERSION="${NEW_VERSION#v}" - NEW_MAJOR_VERSION="${NEW_MAJOR_VERSION%.*}" - NEW_POINT_VERSION="${NEW_VERSION##*.}" - if [[ ${NEW_POINT_VERSION} -gt 0 ]]; then - LAST_POINT_VERSION=$(( NEW_POINT_VERSION - 1 )) - LAST_VERSION="${NEW_MAJOR_VERSION}.${LAST_POINT_VERSION}" - for PACKAGE in jellyfin jellyfin-server jellyfin-web; do - for SCRAP_VERSION in $( sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} list ${{ matrix.release }} | grep "${PACKAGE} " | grep "${LAST_VERSION}" | sort | uniq ); do - sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} remove ${{ matrix.release }} ${PACKAGE}=${SCRAP_VERSION} - done - done - fi - - - name: "Move artifacts into repository" - uses: appleboy/ssh-action@2ead5e36573f08b82fbfce1504f1a4b05a647c6f # v1.2.2 - with: - host: "${{ secrets.REPO_HOST }}" - username: "${{ secrets.REPO_USER }}" - key: "${{ secrets.REPO_KEY }}" - debug: false - script: | - export BASEDIR="/srv/repository/main/server/debian" - sudo mkdir -p ${BASEDIR}/${{ env.JELLYFIN_RELEASE_TYPE }}/${{ env.JELLYFIN_VERSION }}/${{ matrix.arch }} || exit 1 - sudo mv -t ${BASEDIR}/${{ env.JELLYFIN_RELEASE_TYPE }}/${{ env.JELLYFIN_VERSION }}/${{ matrix.arch }}/ /srv/incoming/server/${{ env.JELLYFIN_VERSION }}/debian/${{ matrix.release }}/${{ matrix.arch }}/* || exit 1 - sudo rm ${BASEDIR}/latest-${{ env.JELLYFIN_RELEASE_TYPE }} || true - sudo ln -sf ${BASEDIR}/${{ env.JELLYFIN_RELEASE_TYPE }}/${{ env.JELLYFIN_VERSION }} ${BASEDIR}/latest-${{ env.JELLYFIN_RELEASE_TYPE }} || exit 1 - sudo rm ${BASEDIR}/latest || true - sudo ln -sf ${BASEDIR}/${{ env.JELLYFIN_RELEASE_TYPE }}/${{ env.JELLYFIN_VERSION }} ${BASEDIR}/latest || exit 1 diff --git a/build.py b/build.py index 2c06824..153fc57 100755 --- a/build.py +++ b/build.py @@ -58,7 +58,6 @@ def _determine_framework_versions(): framework_args = dict() - submodules = dict() for submodule in this_repo.submodules: if submodule.name in configurations["frameworks"].keys(): for framework_arg in configurations["frameworks"][submodule.name].keys(): @@ -412,7 +411,7 @@ def build_docker( if build_arch: if build_arch not in architectures: - log(f"Error: Archtecture {build_arch} is not valid.") + log(f"Error: Architecture {build_arch} is not valid.") exit(1) else: architectures = [build_arch] @@ -448,7 +447,6 @@ def build_docker( # Get our ARCH variables from the archmaps PACKAGE_ARCH = configurations["docker"]["archmaps"][_build_arch]["PACKAGE_ARCH"] DOTNET_ARCH = configurations["docker"]["archmaps"][_build_arch]["DOTNET_ARCH"] - QEMU_ARCH = configurations["docker"]["archmaps"][_build_arch]["QEMU_ARCH"] IMAGE_ARCH = configurations["docker"]["archmaps"][_build_arch]["IMAGE_ARCH"] TARGET_ARCH = configurations["docker"]["archmaps"][_build_arch]["TARGET_ARCH"] @@ -460,10 +458,10 @@ def build_docker( # Clean up any existing qemu static image log( - f">>> {docker_run_cmd} --privileged multiarch/qemu-user-static:register --reset" + f">>> {docker_run_cmd} --privileged linuxserver/qemu-static --reset -p yes" ) os.system( - f"{docker_run_cmd} --privileged multiarch/qemu-user-static:register --reset" + f"{docker_run_cmd} --privileged linuxserver/qemu-static --reset -p yes" ) log("") @@ -471,7 +469,6 @@ def build_docker( build_args = list() build_args.append(f"--build-arg PACKAGE_ARCH={PACKAGE_ARCH}") build_args.append(f"--build-arg DOTNET_ARCH={DOTNET_ARCH}") - build_args.append(f"--build-arg QEMU_ARCH={QEMU_ARCH}") build_args.append(f"--build-arg IMAGE_ARCH={IMAGE_ARCH}") build_args.append(f"--build-arg TARGET_ARCH={TARGET_ARCH}") build_args.append(f"--build-arg JELLYFIN_VERSION={jellyfin_version}") @@ -485,6 +482,9 @@ def build_docker( f"--build-arg {arg}={framework_versions[arg]}" ) + if local: + build_args.append("--load") + build_args = ' '.join(build_args) # Build the dockerfile diff --git a/build.yaml b/build.yaml index 842bd9a..e9bf6d1 100644 --- a/build.yaml +++ b/build.yaml @@ -118,13 +118,11 @@ docker: DOTNET_ARCH: x64 IMAGE_ARCH: amd64 PACKAGE_ARCH: amd64 - QEMU_ARCH: x86_64 TARGET_ARCH: amd64 arm64: DOTNET_ARCH: arm64 IMAGE_ARCH: arm64v8 PACKAGE_ARCH: arm64 - QEMU_ARCH: aarch64 TARGET_ARCH: arm64/v8 dockerfile: docker/Dockerfile imagename: jellyfin/jellyfin diff --git a/docker/Dockerfile b/docker/Dockerfile index 5d792b3..89bad71 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ ARG DOTNET_VERSION=8.0 ARG NODEJS_VERSION=20 # Combined image version (Debian) -ARG OS_VERSION=bookworm +ARG OS_VERSION=trixie # Jellyfin FFMPEG package ARG FFMPEG_PACKAGE=jellyfin-ffmpeg7 @@ -27,8 +27,6 @@ ARG MALI_PKG_CFG=valhall-g610-g24p0-gbm ARG PACKAGE_ARCH # Dotnet architeture (x64, arm64, arm), set by build script ARG DOTNET_ARCH -# QEMU architecture (x86_64, aarch64, arm), set by build script -ARG QEMU_ARCH # Base Image architecture (amd64, arm64v8, arm32v7), set by build script ARG IMAGE_ARCH # Target platform architecture (amd64, arm64/v8, arm/v7), set by build script @@ -74,9 +72,10 @@ RUN npm ci --no-audit --unsafe-perm \ # # Build the server artifacts # -FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${OS_VERSION}-slim AS server +FROM --platform=linux/${TARGET_ARCH} ${IMAGE_ARCH}/debian:${OS_VERSION}-slim AS server ARG DOTNET_ARCH +ARG DOTNET_VERSION ARG SOURCE_DIR=/src ARG ARTIFACT_DIR=/server @@ -88,6 +87,13 @@ WORKDIR ${SOURCE_DIR} COPY jellyfin-server . ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +RUN apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests --yes \ + curl \ + ca-certificates \ + libicu76 \ + && curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel ${DOTNET_VERSION} --install-dir /usr/local/bin + RUN dotnet publish Jellyfin.Server --arch ${DOTNET_ARCH} --configuration ${CONFIG} \ --output="${ARTIFACT_DIR}" --self-contained \ -p:DebugSymbols=false -p:DebugType=none @@ -95,7 +101,6 @@ RUN dotnet publish Jellyfin.Server --arch ${DOTNET_ARCH} --configuration ${CONFI # # Build the final combined image # -FROM multiarch/qemu-user-static:x86_64-${QEMU_ARCH} AS qemu FROM --platform=linux/${TARGET_ARCH} ${IMAGE_ARCH}/debian:${OS_VERSION}-slim AS combined ARG OS_VERSION @@ -113,11 +118,6 @@ ARG MALI_PKG_TAG ARG MALI_PKG_CFG ARG PACKAGE_ARCH -ARG DOTNET_ARCH -ARG QEMU_ARCH - -# Copy the QEMU runtime -COPY --from=qemu /usr/bin/* /usr/bin # Set the health URL ENV HEALTHCHECK_URL=http://localhost:8096/health @@ -150,15 +150,23 @@ RUN apt-get update \ ca-certificates \ gnupg \ curl \ - apt-transport-https \ && curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key \ - | gpg --dearmor -o /etc/apt/trusted.gpg.d/debian-jellyfin.gpg \ - && echo "deb [arch=${PACKAGE_ARCH}] https://repo.jellyfin.org/master/debian ${OS_VERSION} main" > /etc/apt/sources.list.d/jellyfin.list \ - && apt-get update \ + | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg \ + && cat < /etc/apt/sources.list.d/jellyfin.sources +Types: deb +URIs: https://repo.jellyfin.org/debian +Suites: ${OS_VERSION} +Components: main +Architectures: ${PACKAGE_ARCH} +Signed-By: /etc/apt/keyrings/jellyfin.gpg +EOF + +RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests --yes \ ${FFMPEG_PACKAGE} \ openssl \ locales \ + libicu76 \ libfontconfig1 \ libfreetype6 \ libjemalloc2 \ @@ -175,7 +183,7 @@ RUN if test "${PACKAGE_ARCH}" = "amd64"; then \ && curl -LO https://github.com/intel/compute-runtime/releases/download/${NEO_VER}/libigdgmm12_${GMMLIB_VER}_amd64.deb \ -LO https://github.com/intel/intel-graphics-compiler/releases/download/v${IGC2_VER}/intel-igc-core-2_${IGC2_VER}+${IGC2_BUILD}_amd64.deb \ -LO https://github.com/intel/intel-graphics-compiler/releases/download/v${IGC2_VER}/intel-igc-opencl-2_${IGC2_VER}+${IGC2_BUILD}_amd64.deb \ - -LO https://github.com/intel/compute-runtime/releases/download/${NEO_VER}/intel-opencl-icd_${NEO_VER}_amd64.deb \ + -LO https://github.com/intel/compute-runtime/releases/download/${NEO_VER}/intel-opencl-icd_${NEO_VER}-0_amd64.deb \ -LO https://github.com/intel/intel-graphics-compiler/releases/download/igc-${IGC1_LEGACY_VER}/intel-igc-core_${IGC1_LEGACY_VER}_amd64.deb \ -LO https://github.com/intel/intel-graphics-compiler/releases/download/igc-${IGC1_LEGACY_VER}/intel-igc-opencl_${IGC1_LEGACY_VER}_amd64.deb \ -LO https://github.com/intel/compute-runtime/releases/download/${NEO_LEGACY_VER}/intel-opencl-icd-legacy1_${NEO_LEGACY_VER}_amd64.deb \ @@ -226,7 +234,6 @@ RUN mkdir -p ${JELLYFIN_DATA_DIR} ${JELLYFIN_CACHE_DIR} \ COPY --from=server /server /jellyfin COPY --from=web /web /jellyfin/jellyfin-web - ARG JELLYFIN_VERSION LABEL "org.opencontainers.image.source"="https://github.com/jellyfin/jellyfin-packaging" LABEL "org.opencontainers.image.title"="Jellyfin"