Fix Trixie cross-building
Debian 13 removed the `cross-gcc-dev` package as it was unmaintained (Debian bug #1107126). This broke the existing cross build setup. Instead, switch to using binary cross-gcc packages, which work the same without having to manually generate the libraries. This is still fully symmetrical.
This commit is contained in:
@@ -48,7 +48,7 @@ This repository contains operating system and Docker packaging for Jellyfin, for
|
|||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
To build Jellyfin packages for yourself, follow this quickstart guide. You will need to be running on a Linux system, preferably Debian- or Ubuntu-based, with Docker, Python3 and the Python packages `PyYAML` and `git` (`python3-yaml` and `python3-git` in Debian). Other systems including WSL are untested.
|
To build Jellyfin packages for yourself, follow this quickstart guide. You will need to be running on an amd64 Linux system, preferably Debian- or Ubuntu-based, with Docker, Python3 and the Python packages `PyYAML` and `git` (`python3-yaml` and `python3-git` in Debian). Other systems including WSL are untested.
|
||||||
|
|
||||||
1. Install Docker on your system. The build scripts leverage Docker containers to perform clean builds and avoid contaminating the host system with dependencies.
|
1. Install Docker on your system. The build scripts leverage Docker containers to perform clean builds and avoid contaminating the host system with dependencies.
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ If you want a non-Docker image output (`.deb`, `tar`/`zip` archive, etc.) follow
|
|||||||
|
|
||||||
* The second argument is the "platform" you want to build for. The available options are listed as top-level keys in the `build.yaml` configuration file or in the `-h` help output.
|
* The second argument is the "platform" you want to build for. The available options are listed as top-level keys in the `build.yaml` configuration file or in the `-h` help output.
|
||||||
|
|
||||||
* The third argument is, for all platforms except `portable` (DotNET portable), the architecture you want to build for. For each platform, the available architectures can be found as the keys under `archmaps` in the `build.yaml` configuration file.
|
* The third argument is, for all platforms except `portable` (DotNET portable), the architecture you want to build for. For each platform, the available architectures can be found as the keys under `archmaps` in the `build.yaml` configuration file. Cross-building of `arm64` on `amd64` is supported, but not the other way around.
|
||||||
|
|
||||||
* The fourth argument is exclusive to `debian` and `ubuntu` `.deb` packages, and is the release codename of Debian or Ubuntu to build for. For each platform, the available releases can be found as the keys under `releases` in the `build.yaml` configuration file.
|
* The fourth argument is exclusive to `debian` and `ubuntu` `.deb` packages, and is the release codename of Debian or Ubuntu to build for. For each platform, the available releases can be found as the keys under `releases` in the `build.yaml` configuration file.
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ If you want a Docker image output follow this process:
|
|||||||
|
|
||||||
* The second argument is the "platform" you want to build for. For Docker images, this should be `docker`.
|
* The second argument is the "platform" you want to build for. For Docker images, this should be `docker`.
|
||||||
|
|
||||||
* The third argument is the architecture you wish to build for. This argument is optional, and not providing it will build images for all supported architectures (sequentially).
|
* The third argument is the architecture you wish to build for. This argument is optional, and not providing it will build images for all supported architectures (sequentially). Cross-building of `arm64` on `amd64` is supported, but not the other way around.
|
||||||
|
|
||||||
* The fourth argument is `--local`, which should be provided to prevent the script from trying to generate image manifests and push the resulting images to our repositories.
|
* The fourth argument is `--local`, which should be provided to prevent the script from trying to generate image manifests and push the resulting images to our repositories.
|
||||||
|
|
||||||
|
|||||||
2
build.py
2
build.py
@@ -106,6 +106,7 @@ def build_package_deb(
|
|||||||
f"{build_version} is not a valid {build_type} version in {configurations[build_type]['releases'].keys()}"
|
f"{build_version} is not a valid {build_type} version in {configurations[build_type]['releases'].keys()}"
|
||||||
)
|
)
|
||||||
PACKAGE_ARCH = _determine_arch(build_type, build_arch, build_version)
|
PACKAGE_ARCH = _determine_arch(build_type, build_arch, build_version)
|
||||||
|
GCC_ARCH = configurations[build_type]["archmaps"][build_arch]["GCC_ARCH"]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log(f"Invalid/unsupported arguments: {e}")
|
log(f"Invalid/unsupported arguments: {e}")
|
||||||
exit(1)
|
exit(1)
|
||||||
@@ -147,6 +148,7 @@ def build_package_deb(
|
|||||||
build_args.append(f"--build-arg PACKAGE_TYPE={os_type}")
|
build_args.append(f"--build-arg PACKAGE_TYPE={os_type}")
|
||||||
build_args.append(f"--build-arg PACKAGE_VERSION={os_version}")
|
build_args.append(f"--build-arg PACKAGE_VERSION={os_version}")
|
||||||
build_args.append(f"--build-arg PACKAGE_ARCH={PACKAGE_ARCH}")
|
build_args.append(f"--build-arg PACKAGE_ARCH={PACKAGE_ARCH}")
|
||||||
|
build_args.append(f"--build-arg GCC_ARCH={GCC_ARCH}")
|
||||||
build_args.append(f"--build-arg GCC_VERSION={crossgccvers}")
|
build_args.append(f"--build-arg GCC_VERSION={crossgccvers}")
|
||||||
|
|
||||||
# Determine framework versions
|
# Determine framework versions
|
||||||
|
|||||||
@@ -30,8 +30,10 @@ debian:
|
|||||||
archmaps:
|
archmaps:
|
||||||
amd64:
|
amd64:
|
||||||
PACKAGE_ARCH: amd64
|
PACKAGE_ARCH: amd64
|
||||||
|
GCC_ARCH: x86-64
|
||||||
arm64:
|
arm64:
|
||||||
PACKAGE_ARCH: arm64
|
PACKAGE_ARCH: arm64
|
||||||
|
GCC_ARCH: aarch64
|
||||||
cross-gcc:
|
cross-gcc:
|
||||||
bullseye: '10'
|
bullseye: '10'
|
||||||
bookworm: '12'
|
bookworm: '12'
|
||||||
|
|||||||
8
debian/docker/Dockerfile
vendored
8
debian/docker/Dockerfile
vendored
@@ -7,6 +7,7 @@ ARG GCC_VERSION=12
|
|||||||
ARG PACKAGE_TYPE
|
ARG PACKAGE_TYPE
|
||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ARG PACKAGE_ARCH
|
ARG PACKAGE_ARCH
|
||||||
|
ARG GCC_ARCH
|
||||||
|
|
||||||
FROM ${PACKAGE_TYPE}:${PACKAGE_VERSION}
|
FROM ${PACKAGE_TYPE}:${PACKAGE_VERSION}
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ ARG NODEJS_VERSION
|
|||||||
ARG PACKAGE_TYPE
|
ARG PACKAGE_TYPE
|
||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ARG PACKAGE_ARCH
|
ARG PACKAGE_ARCH
|
||||||
|
ARG GCC_ARCH
|
||||||
ARG GCC_VERSION
|
ARG GCC_VERSION
|
||||||
|
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
@@ -26,6 +28,7 @@ ENV DEB_BUILD_OPTIONS=noddebs
|
|||||||
ENV TYPE=${PACKAGE_TYPE}
|
ENV TYPE=${PACKAGE_TYPE}
|
||||||
ENV VERSION=${PACKAGE_VERSION}
|
ENV VERSION=${PACKAGE_VERSION}
|
||||||
ENV ARCH=${PACKAGE_ARCH}
|
ENV ARCH=${PACKAGE_ARCH}
|
||||||
|
ENV GCC_ARCH=${GCC_ARCH}
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update -y \
|
RUN apt-get update -y \
|
||||||
@@ -69,9 +72,6 @@ RUN if test "${PACKAGE_ARCH}" != "$( dpkg --print-architecture )"; then \
|
|||||||
&& set -o xtrace \
|
&& set -o xtrace \
|
||||||
&& dpkg --add-architecture ${PACKAGE_ARCH} \
|
&& dpkg --add-architecture ${PACKAGE_ARCH} \
|
||||||
&& apt-get update -y \
|
&& apt-get update -y \
|
||||||
&& apt-get install --no-install-recommends -y cross-gcc-dev \
|
|
||||||
&& TARGET_LIST="${PACKAGE_ARCH}" cross-gcc-gensource ${GCC_VERSION} \
|
|
||||||
&& cd cross-gcc-packages-amd64/cross-gcc-${GCC_VERSION}-${PACKAGE_ARCH} \
|
|
||||||
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
|
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
|
||||||
apt-get -f install --no-install-recommends -o Dpkg::Options::="--force-overwrite" -y \
|
apt-get -f install --no-install-recommends -o Dpkg::Options::="--force-overwrite" -y \
|
||||||
bison \
|
bison \
|
||||||
@@ -92,6 +92,8 @@ RUN if test "${PACKAGE_ARCH}" != "$( dpkg --print-architecture )"; then \
|
|||||||
binutils-aarch64-linux-gnu \
|
binutils-aarch64-linux-gnu \
|
||||||
binutils-arm-linux-gnueabihf \
|
binutils-arm-linux-gnueabihf \
|
||||||
gcc-${GCC_VERSION}-source \
|
gcc-${GCC_VERSION}-source \
|
||||||
|
gcc-${GCC_ARCH}-linux-gnu \
|
||||||
|
binutils-${GCC_ARCH}-linux-gnu \
|
||||||
libstdc++-${GCC_VERSION}-dev-${PACKAGE_ARCH}-cross \
|
libstdc++-${GCC_VERSION}-dev-${PACKAGE_ARCH}-cross \
|
||||||
libc6-dev:${PACKAGE_ARCH} \
|
libc6-dev:${PACKAGE_ARCH} \
|
||||||
linux-libc-dev:${PACKAGE_ARCH} \
|
linux-libc-dev:${PACKAGE_ARCH} \
|
||||||
|
|||||||
Reference in New Issue
Block a user