diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b52d5201..8873b0a0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -48,10 +48,10 @@ RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ libxv1 \ libxtst6 \ libxext6 && \ - if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get install --no-install-recommends -y xcvt libopenh264-dev svt-av1 aom-tools; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \ + if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then apt-get install --no-install-recommends -y xcvt libopenh264-dev svt-av1 aom-tools; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \ sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* -RUN if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then \ +RUN if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then \ sudo apt-get update && \ sudo apt-get install --no-install-recommends -y xcvt && \ sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/*; \ diff --git a/.devcontainer/features/desktop-selkies/src/install.sh b/.devcontainer/features/desktop-selkies/src/install.sh index 53da1f14..e500fe33 100755 --- a/.devcontainer/features/desktop-selkies/src/install.sh +++ b/.devcontainer/features/desktop-selkies/src/install.sh @@ -53,7 +53,7 @@ apt-get update && apt-get install --no-install-recommends -y \ libxv1 \ libxtst6 \ libxext6 && \ -if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get install --no-install-recommends -y xcvt libopenh264-dev svt-av1 aom-tools; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \ +if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then apt-get install --no-install-recommends -y xcvt libopenh264-dev svt-av1 aom-tools; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* # Install system dependencies @@ -62,7 +62,7 @@ apt-get update && apt-get install --no-install-recommends -y \ coturn && \ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* -if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get install --no-install-recommends -y xcvt; fi +if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then apt-get install --no-install-recommends -y xcvt; fi # Install desktop environment ./install-desktop-environment.sh ${DESKTOP} diff --git a/.github/workflows/build_and_publish_all_images.yaml b/.github/workflows/build_and_publish_all_images.yaml index 990592f2..e50dfbb2 100644 --- a/.github/workflows/build_and_publish_all_images.yaml +++ b/.github/workflows/build_and_publish_all_images.yaml @@ -63,49 +63,55 @@ jobs: - name: gstreamer version_suffix: -ubuntu20.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 context: addons/gstreamer - name: gstreamer version_suffix: -ubuntu22.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 context: addons/gstreamer - name: gstreamer version_suffix: -ubuntu24.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 context: addons/gstreamer - name: js-interposer version_suffix: -ubuntu20.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 PKG_NAME=selkies-js-interposer PKG_VERSION=0.0.0 context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: js-interposer version_suffix: -ubuntu22.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 PKG_NAME=selkies-js-interposer PKG_VERSION=0.0.0 context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: js-interposer version_suffix: -ubuntu24.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 PKG_NAME=selkies-js-interposer PKG_VERSION=0.0.0 context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: turn-rest @@ -142,6 +148,7 @@ jobs: version_suffix: -ubuntu20.04 build_args: | PACKAGE_VERSION=0.0.0.dev0 + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} @@ -154,6 +161,7 @@ jobs: version_suffix: -ubuntu22.04 build_args: | PACKAGE_VERSION=0.0.0.dev0 + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} @@ -166,6 +174,7 @@ jobs: version_suffix: -ubuntu24.04 build_args: | PACKAGE_VERSION=0.0.0.dev0 + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} diff --git a/.github/workflows/build_and_publish_changed_images.yaml b/.github/workflows/build_and_publish_changed_images.yaml index 8dbcb8d0..431f68d7 100644 --- a/.github/workflows/build_and_publish_changed_images.yaml +++ b/.github/workflows/build_and_publish_changed_images.yaml @@ -74,49 +74,55 @@ jobs: - name: gstreamer version_suffix: -ubuntu20.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 context: addons/gstreamer - name: gstreamer version_suffix: -ubuntu22.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 context: addons/gstreamer - name: gstreamer version_suffix: -ubuntu24.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 context: addons/gstreamer - name: js-interposer version_suffix: -ubuntu20.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 PKG_NAME=selkies-js-interposer PKG_VERSION=0.0.0 context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: js-interposer version_suffix: -ubuntu22.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 PKG_NAME=selkies-js-interposer PKG_VERSION=0.0.0 context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: js-interposer version_suffix: -ubuntu24.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 PKG_NAME=selkies-js-interposer PKG_VERSION=0.0.0 context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: turn-rest @@ -162,6 +168,7 @@ jobs: version_suffix: -ubuntu20.04 build_args: | PACKAGE_VERSION=0.0.0.dev0 + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} @@ -174,6 +181,7 @@ jobs: version_suffix: -ubuntu22.04 build_args: | PACKAGE_VERSION=0.0.0.dev0 + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} @@ -186,6 +194,7 @@ jobs: version_suffix: -ubuntu24.04 build_args: | PACKAGE_VERSION=0.0.0.dev0 + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.ref_name || 'main' }} diff --git a/.github/workflows/build_and_publish_release.yaml b/.github/workflows/build_and_publish_release.yaml index de536226..3fe97fe6 100644 --- a/.github/workflows/build_and_publish_release.yaml +++ b/.github/workflows/build_and_publish_release.yaml @@ -93,49 +93,55 @@ jobs: - name: gstreamer version_suffix: -ubuntu20.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 context: addons/gstreamer - name: gstreamer version_suffix: -ubuntu22.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 context: addons/gstreamer - name: gstreamer version_suffix: -ubuntu24.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 context: addons/gstreamer - name: js-interposer version_suffix: -ubuntu20.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 PKG_NAME=selkies-js-interposer PKG_VERSION=${{ needs.get_semver.outputs.semver }} context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: js-interposer version_suffix: -ubuntu22.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 PKG_NAME=selkies-js-interposer PKG_VERSION=${{ needs.get_semver.outputs.semver }} context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: js-interposer version_suffix: -ubuntu24.04 build_args: | + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 PKG_NAME=selkies-js-interposer PKG_VERSION=${{ needs.get_semver.outputs.semver }} context: addons/js-interposer - dockerfile: Dockerfile.ubuntu_debpkg + dockerfile: Dockerfile.debpkg platforms: linux/amd64,linux/arm64 - name: turn-rest @@ -177,6 +183,7 @@ jobs: version_suffix: -ubuntu20.04 build_args: | PACKAGE_VERSION=${{ needs.get_semver.outputs.semver }} + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=20.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.event.inputs.tag || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.event.inputs.tag || 'main' }} @@ -189,6 +196,7 @@ jobs: version_suffix: -ubuntu22.04 build_args: | PACKAGE_VERSION=${{ needs.get_semver.outputs.semver }} + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=22.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.event.inputs.tag || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.event.inputs.tag || 'main' }} @@ -201,6 +209,7 @@ jobs: version_suffix: -ubuntu24.04 build_args: | PACKAGE_VERSION=${{ needs.get_semver.outputs.semver }} + DISTRIB_IMAGE=ubuntu DISTRIB_RELEASE=24.04 GSTREAMER_BASE_IMAGE_RELEASE=${{ github.event_name != 'pull_request' && github.event.inputs.tag || 'main' }} PY_BUILD_IMAGE=ghcr.io/${{ github.repository }}/py-build:${{ github.event_name != 'pull_request' && github.event.inputs.tag || 'main' }} diff --git a/addons/example/Dockerfile b/addons/example/Dockerfile index d37f491c..7c5486fe 100644 --- a/addons/example/Dockerfile +++ b/addons/example/Dockerfile @@ -124,7 +124,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ mesa-vulkan-drivers \ vulkan-tools \ radeontop && \ - if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get install --no-install-recommends -y xcvt libopenh264-dev svt-av1 aom-tools; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \ + if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then apt-get install --no-install-recommends -y xcvt libopenh264-dev svt-av1 aom-tools; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \ if [ "$(dpkg --print-architecture)" = "amd64" ]; then apt-get install --no-install-recommends -y intel-gpu-tools nvtop va-driver-all i965-va-driver-shaders intel-media-va-driver-non-free; fi && \ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* && \ echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ diff --git a/addons/gstreamer/Dockerfile b/addons/gstreamer/Dockerfile index a6a08d29..0c74e6df 100644 --- a/addons/gstreamer/Dockerfile +++ b/addons/gstreamer/Dockerfile @@ -68,7 +68,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ libxv-dev \ libxtst-dev \ libxext-dev && \ - if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get update && apt-get install --no-install-recommends -y libopenh264-dev svt-av1 libsvtav1enc-dev libsvtav1dec-dev aom-tools libaom-dev; fi && \ + if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then apt-get update && apt-get install --no-install-recommends -y libopenh264-dev svt-av1 libsvtav1enc-dev libsvtav1dec-dev aom-tools libaom-dev; fi && \ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* # Install GST-Python dependencies, Meson, and Ninja @@ -83,8 +83,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ # GStreamer monorepo build with prefix for standalone install WORKDIR /src ARG GSTREAMER_VERSION=1.24.8 -RUN if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then export GSTREAMER_EXTRA_ARGS="-Dgst-plugins-bad:aom=enabled ${GSTREAMER_EXTRA_ARGS}"; else export GSTREAMER_EXTRA_ARGS="${GSTREAMER_EXTRA_ARGS}"; fi && \ - if [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "22.04" ]; then export GSTREAMER_EXTRA_ARGS="-Dgst-plugins-bad:svtav1=enabled ${GSTREAMER_EXTRA_ARGS}"; fi && \ +RUN if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "11" ]; }; then export GSTREAMER_EXTRA_ARGS="-Dgst-plugins-bad:aom=enabled ${GSTREAMER_EXTRA_ARGS}"; else export GSTREAMER_EXTRA_ARGS="${GSTREAMER_EXTRA_ARGS}"; fi && \ + if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "22.04" ]; } || { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "debian" ] && [ "$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "12" ]; }; then export GSTREAMER_EXTRA_ARGS="-Dgst-plugins-bad:svtav1=enabled ${GSTREAMER_EXTRA_ARGS}"; fi && \ curl --proto '=https' --tlsv1.2 -fsSL "https://sh.rustup.rs" | sh -s -- -y && \ . "$HOME/.cargo/env" && \ cargo install cargo-c && \ diff --git a/addons/js-interposer/Dockerfile.ubuntu_debpkg b/addons/js-interposer/Dockerfile.debpkg similarity index 93% rename from addons/js-interposer/Dockerfile.ubuntu_debpkg rename to addons/js-interposer/Dockerfile.debpkg index 6b394550..0b6a0d40 100644 --- a/addons/js-interposer/Dockerfile.ubuntu_debpkg +++ b/addons/js-interposer/Dockerfile.debpkg @@ -4,8 +4,9 @@ # --build-arg=DEBEMAIL=dan.isla@gmail.com \ # --build-arg=PKG_NAME=selkies-js-interposer \ # --build-arg=PKG_VERSION=0.0.1 \ +# --build-arg=DISTRIB_IMAGE=ubuntu \ # --build-arg=DISTRIB_RELEASE=24.04 \ -# -t selkies-js-interposer-deb:latest -f Dockerfile.ubuntu_debpkg . +# -t selkies-js-interposer-deb:latest -f Dockerfile.debpkg . ARG DISTRIB_IMAGE=ubuntu ARG DISTRIB_RELEASE=24.04 @@ -27,7 +28,7 @@ ARG DEBEMAIL="danisla@users.noreply.github.com" WORKDIR /opt/build COPY . . -RUN ./build_ubuntu_deb.sh && \ +RUN ./build_deb.sh && \ tar -czvf /opt/${PKG_NAME}_${PKG_VERSION}.tar.gz selkies_joystick_interposer*.so ARG DISTRIB_IMAGE diff --git a/addons/js-interposer/build_ubuntu_deb.sh b/addons/js-interposer/build_deb.sh old mode 100755 new mode 100644 similarity index 100% rename from addons/js-interposer/build_ubuntu_deb.sh rename to addons/js-interposer/build_deb.sh diff --git a/dev/build-gstreamer-ubuntu2004.sh b/dev/build-gstreamer-ubuntu2004.sh index 8302e52d..9b57985e 100755 --- a/dev/build-gstreamer-ubuntu2004.sh +++ b/dev/build-gstreamer-ubuntu2004.sh @@ -3,16 +3,19 @@ SCRIPT_DIR=$(readlink -f $(dirname $0)) BUILD_DIR=${SCRIPT_DIR?}/../addons/gstreamer -# Change this to set the base ubuntu image -BASE_IMAGE=ubuntu:20.04 +# Change this to set the Linux distribution and version +DISTRIB_IMAGE=ubuntu +DISTRIB_RELEASE=20.04 -IMAGE_TAG=gstreamer:latest-ubuntu${BASE_IMAGE//*:/} +BASE_IMAGE=${DISTRIB_IMAGE}:${DISTRIB_RELEASE} + +IMAGE_TAG=gstreamer:latest-${DISTRIB_IMAGE}${DISTRIB_RELEASE} (cd ${BUILD_DIR?} && docker build --cache-from ${IMAGE_TAG?} --build-arg=BASE_IMAGE=${BASE_IMAGE?} -t ${IMAGE_TAG?} .) ( cd ${SCRIPT_DIR?}/.. for image in dist web test; do - GSTREAMER_BASE_IMAGE=gstreamer GSTREAMER_BASE_IMAGE_RELEASE=latest TEST_IMAGE=selkies-gstreamer-example:${IMAGE_TAG//*:/} DISTRIB_RELEASE=${BASE_IMAGE//*:/} docker-compose build ${image} + GSTREAMER_BASE_IMAGE=gstreamer GSTREAMER_BASE_IMAGE_RELEASE=latest TEST_IMAGE=selkies-gstreamer-example:${IMAGE_TAG//*:/} DISTRIB_IMAGE=${DISTRIB_IMAGE} DISTRIB_RELEASE=${DISTRIB_RELEASE} docker-compose build ${image} done ) \ No newline at end of file diff --git a/dev/build-gstreamer-ubuntu2204.sh b/dev/build-gstreamer-ubuntu2204.sh index 5142c766..7e30e274 100755 --- a/dev/build-gstreamer-ubuntu2204.sh +++ b/dev/build-gstreamer-ubuntu2204.sh @@ -3,16 +3,19 @@ SCRIPT_DIR=$(readlink -f $(dirname $0)) BUILD_DIR=${SCRIPT_DIR?}/../addons/gstreamer -# Change this to set the base ubuntu image -BASE_IMAGE=ubuntu:22.04 +# Change this to set the Linux distribution and version +DISTRIB_IMAGE=ubuntu +DISTRIB_RELEASE=22.04 -IMAGE_TAG=gstreamer:latest-ubuntu${BASE_IMAGE//*:/} +BASE_IMAGE=${DISTRIB_IMAGE}:${DISTRIB_RELEASE} + +IMAGE_TAG=gstreamer:latest-${DISTRIB_IMAGE}${DISTRIB_RELEASE} (cd ${BUILD_DIR?} && docker build --cache-from ${IMAGE_TAG?} --build-arg=BASE_IMAGE=${BASE_IMAGE?} -t ${IMAGE_TAG?} .) ( cd ${SCRIPT_DIR?}/.. for image in dist web test; do - GSTREAMER_BASE_IMAGE=gstreamer GSTREAMER_BASE_IMAGE_RELEASE=latest TEST_IMAGE=selkies-gstreamer-example:${IMAGE_TAG//*:/} DISTRIB_RELEASE=${BASE_IMAGE//*:/} docker-compose build ${image} + GSTREAMER_BASE_IMAGE=gstreamer GSTREAMER_BASE_IMAGE_RELEASE=latest TEST_IMAGE=selkies-gstreamer-example:${IMAGE_TAG//*:/} DISTRIB_IMAGE=${DISTRIB_IMAGE} DISTRIB_RELEASE=${DISTRIB_RELEASE} docker-compose build ${image} done ) \ No newline at end of file diff --git a/dev/build-gstreamer-ubuntu2404.sh b/dev/build-gstreamer-ubuntu2404.sh index 7e1867c0..878d5d7c 100755 --- a/dev/build-gstreamer-ubuntu2404.sh +++ b/dev/build-gstreamer-ubuntu2404.sh @@ -3,16 +3,19 @@ SCRIPT_DIR=$(readlink -f $(dirname $0)) BUILD_DIR=${SCRIPT_DIR?}/../addons/gstreamer -# Change this to set the base ubuntu image -BASE_IMAGE=ubuntu:24.04 +# Change this to set the Linux distribution and version +DISTRIB_IMAGE=ubuntu +DISTRIB_RELEASE=24.04 -IMAGE_TAG=gstreamer:latest-ubuntu${BASE_IMAGE//*:/} +BASE_IMAGE=${DISTRIB_IMAGE}:${DISTRIB_RELEASE} + +IMAGE_TAG=gstreamer:latest-${DISTRIB_IMAGE}${DISTRIB_RELEASE} (cd ${BUILD_DIR?} && docker build --cache-from ${IMAGE_TAG?} --build-arg=BASE_IMAGE=${BASE_IMAGE?} -t ${IMAGE_TAG?} .) ( cd ${SCRIPT_DIR?}/.. for image in dist web test; do - GSTREAMER_BASE_IMAGE=gstreamer GSTREAMER_BASE_IMAGE_RELEASE=latest TEST_IMAGE=selkies-gstreamer-example:${IMAGE_TAG//*:/} DISTRIB_RELEASE=${BASE_IMAGE//*:/} docker-compose build ${image} + GSTREAMER_BASE_IMAGE=gstreamer GSTREAMER_BASE_IMAGE_RELEASE=latest TEST_IMAGE=selkies-gstreamer-example:${IMAGE_TAG//*:/} DISTRIB_IMAGE=${DISTRIB_IMAGE} DISTRIB_RELEASE=${DISTRIB_RELEASE} docker-compose build ${image} done ) \ No newline at end of file diff --git a/dev/start-test-ubuntu2004.sh b/dev/start-test-ubuntu2004.sh index 1ba9ea58..d419ad46 100755 --- a/dev/start-test-ubuntu2004.sh +++ b/dev/start-test-ubuntu2004.sh @@ -2,10 +2,11 @@ SCRIPT_DIR=$(readlink -f $(dirname $0)) -# Change this to set the ubuntu version -UBUNTU_VERSION=20.04 +# Change this to set the Linux distribution and version +DISTRIB_IMAGE=ubuntu +DISTRIB_RELEASE=20.04 ( cd ${SCRIPT_DIR?}/.. && \ - GSTREAMER_BASE_IMAGE=gstreamer TEST_IMAGE=selkies-gstreamer-example:latest-ubuntu${UBUNTU_VERSION} DISTRIB_RELEASE=${UBUNTU_VERSION} docker-compose run --service-ports test + GSTREAMER_BASE_IMAGE=gstreamer TEST_IMAGE=selkies-gstreamer-example:latest-${DISTRIB_IMAGE}${DISTRIB_RELEASE} DISTRIB_IMAGE=${DISTRIB_IMAGE} DISTRIB_RELEASE=${DISTRIB_RELEASE} docker-compose run --service-ports test ) \ No newline at end of file diff --git a/dev/start-test-ubuntu2204.sh b/dev/start-test-ubuntu2204.sh index 1c762ed2..f8467fdf 100755 --- a/dev/start-test-ubuntu2204.sh +++ b/dev/start-test-ubuntu2204.sh @@ -2,10 +2,11 @@ SCRIPT_DIR=$(readlink -f $(dirname $0)) -# Change this to set the ubuntu version -UBUNTU_VERSION=22.04 +# Change this to set the Linux distribution and version +DISTRIB_IMAGE=ubuntu +DISTRIB_RELEASE=22.04 ( cd ${SCRIPT_DIR?}/.. && \ - PYTHON_BASE=/usr/local/lib/python3.10 GSTREAMER_BASE_IMAGE=gstreamer TEST_IMAGE=selkies-gstreamer-example:latest-ubuntu${UBUNTU_VERSION} DISTRIB_RELEASE=${UBUNTU_VERSION} docker-compose run --service-ports test + GSTREAMER_BASE_IMAGE=gstreamer TEST_IMAGE=selkies-gstreamer-example:latest-${DISTRIB_IMAGE}${DISTRIB_RELEASE} DISTRIB_IMAGE=${DISTRIB_IMAGE} DISTRIB_RELEASE=${DISTRIB_RELEASE} docker-compose run --service-ports test ) \ No newline at end of file diff --git a/dev/start-test-ubuntu2404.sh b/dev/start-test-ubuntu2404.sh index 0668e543..50b7c376 100755 --- a/dev/start-test-ubuntu2404.sh +++ b/dev/start-test-ubuntu2404.sh @@ -2,10 +2,11 @@ SCRIPT_DIR=$(readlink -f $(dirname $0)) -# Change this to set the ubuntu version -UBUNTU_VERSION=24.04 +# Change this to set the Linux distribution and version +DISTRIB_IMAGE=ubuntu +DISTRIB_RELEASE=24.04 ( cd ${SCRIPT_DIR?}/.. && \ - PYTHON_BASE=/usr/local/lib/python3.10 GSTREAMER_BASE_IMAGE=gstreamer TEST_IMAGE=selkies-gstreamer-example:latest-ubuntu${UBUNTU_VERSION} DISTRIB_RELEASE=${UBUNTU_VERSION} docker-compose run --service-ports test + GSTREAMER_BASE_IMAGE=gstreamer TEST_IMAGE=selkies-gstreamer-example:latest-${DISTRIB_IMAGE}${DISTRIB_RELEASE} DISTRIB_IMAGE=${DISTRIB_IMAGE} DISTRIB_RELEASE=${DISTRIB_RELEASE} docker-compose run --service-ports test ) \ No newline at end of file