From 42c98da47046de9f0ff44f7990c6a4103d12385e Mon Sep 17 00:00:00 2001 From: LordGrey <48840279+Lord-Grey@users.noreply.github.com> Date: Fri, 21 Jul 2023 16:45:37 +0200 Subject: [PATCH] Update platforms (#1617) * Remove stretch, bionic, add lunar * Fix CEC CMakeList for Ubuntu 23.04 * Fix git version identification when run in docker and local code * Update SYSTEM_LIBS_SKIP list * Updates after Ubuntu Server 20.04, latest PI OS Light and CoreElec 20 * Update year * Skip List working with Fedora38 Server (x86) and libreElec 11 (x86) * Update platform tag handling * Show error, if ssl lib cannot be found * Update supported platforms * Script to install selected Pull Requests * Fix misspelled explanation + improve description * Correct run-id evaluation * Support python3 and python2 * Support to copy existing config for PR testing --- .github/workflows/apt/amd64.json | 16 +- .github/workflows/apt/arm64.json | 8 - .github/workflows/apt/armhf.json | 16 -- .github/workflows/pull-request.yml | 10 +- .github/workflows/push-master.yml | 10 +- CMakeLists.txt | 21 +- Installation.md | 6 +- assets/webconfig/i18n/en.json | 4 +- bin/scripts/docker-compile.sh | 5 +- bin/scripts/install_pr.sh | 239 +++++++++++++++++++ cmake/Dependencies.cmake | 23 +- cmake/FindGitVersion.cmake | 2 +- debian/distributions | 13 +- doc/development/CompileHowto.md | 16 +- doc/development/SupportedPlatforms.md | 25 +- libsrc/cec/CMakeLists.txt | 1 + libsrc/hyperion/schema/schema-webConfig.json | 2 +- src/hyperiond/CMakeLists.txt | 2 +- 18 files changed, 310 insertions(+), 109 deletions(-) create mode 100755 bin/scripts/install_pr.sh diff --git a/.github/workflows/apt/amd64.json b/.github/workflows/apt/amd64.json index 7c794117..ecfa56c3 100644 --- a/.github/workflows/apt/amd64.json +++ b/.github/workflows/apt/amd64.json @@ -1,12 +1,4 @@ [ - { - "distribution": "Bionic", - "architecture": "amd64", - "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl1.0-dev, libmbedtls-dev", - "package-depends": "libpython3.6, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls10, libasound2, libturbojpeg, libcec4", - "cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release", - "description": "Ubuntu 18.04 (Bionic Beaver) (amd64)" - }, { "distribution": "Focal", "architecture": "amd64", @@ -32,12 +24,12 @@ "description": "Ubuntu 22.10 (Kinetic Kudu) (amd64)" }, { - "distribution": "Stretch", + "distribution": "Lunar", "architecture": "amd64", - "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl1.0-dev, libmbedtls-dev", - "package-depends": "libpython3.5, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls10, libasound2, libturbojpeg0, libcec4", + "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev", + "package-depends": "libpython3.11, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6", "cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release", - "description": "Debian 9.x (Stretch) (amd64)" + "description": "Ubuntu 23.04 (Lunar Lobster) (amd64)" }, { "distribution": "Buster", diff --git a/.github/workflows/apt/arm64.json b/.github/workflows/apt/arm64.json index 5f0f233e..8cf6325e 100644 --- a/.github/workflows/apt/arm64.json +++ b/.github/workflows/apt/arm64.json @@ -1,12 +1,4 @@ [ - { - "distribution": "Bionic", - "architecture": "arm64", - "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl1.0-dev, libmbedtls-dev", - "package-depends": "libpython3.6, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls10, libasound2, libturbojpeg, libcec4", - "cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release", - "description": "Ubuntu 18.04 (Bionic Beaver) (arm64)" - }, { "distribution": "Focal", "architecture": "arm64", diff --git a/.github/workflows/apt/armhf.json b/.github/workflows/apt/armhf.json index 66842969..ed4b9b4d 100644 --- a/.github/workflows/apt/armhf.json +++ b/.github/workflows/apt/armhf.json @@ -1,12 +1,4 @@ [ - { - "distribution": "Bionic", - "architecture": "armhf", - "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl1.0-dev, libmbedtls-dev", - "package-depends": "libpython3.6, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls10, libasound2, libturbojpeg, libcec4", - "cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release", - "description": "Ubuntu 18.04 (Bionic Beaver) (armhf)" - }, { "distribution": "Focal", "architecture": "armhf", @@ -31,14 +23,6 @@ "cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release", "description": "Ubuntu 22.10 (Kinetic Kudu) (armhf)" }, - { - "distribution": "Stretch", - "architecture": "armhf", - "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl1.0-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev", - "package-depends": "libpython3.5, libusb-1.0-0, libqt5widgets5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls10, libasound2, libturbojpeg0, libcec4", - "cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release", - "description":"Debian 9.x (Stretch) (armhf)" - }, { "distribution": "Buster", "architecture": "armhf", diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4aab0779..b7cd0bd3 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -18,16 +18,16 @@ jobs: dockerImage: [ x86_64, armv6l, armv7l, aarch64 ] include: - dockerImage: x86_64 - dockerName: Debian Stretch (x86_64) + dockerName: Debian Buster (x86_64) platform: x11 - dockerImage: armv6l - dockerName: Debian Stretch (Raspberry Pi v1 & ZERO) + dockerName: Debian Buster (Raspberry Pi v1 & ZERO) platform: rpi - dockerImage: armv7l - dockerName: Debian Stretch (Raspberry Pi 2 & 3) + dockerName: Debian Buster (Raspberry Pi 2 & 3) platform: rpi - dockerImage: aarch64 - dockerName: Debian Stretch (Generic AARCH64) + dockerName: Debian Buster (Generic AARCH64) platform: amlogic steps: @@ -47,7 +47,7 @@ jobs: - name: Build packages env: DOCKER_IMAGE: ${{ matrix.dockerImage }} - DOCKER_TAG: stretch + DOCKER_TAG: buster DOCKER_NAME: ${{ matrix.dockerName }} PLATFORM: ${{ matrix.platform }} shell: bash diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index dc290a5b..b5c575f3 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -20,16 +20,16 @@ jobs: dockerImage: [ x86_64, armv6l, armv7l, aarch64 ] include: - dockerImage: x86_64 - dockerName: Debian Stretch (x86_64) + dockerName: Debian Buster (x86_64) platform: x11 - dockerImage: armv6l - dockerName: Debian Stretch (Raspberry Pi v1 & ZERO) + dockerName: Debian Buster (Raspberry Pi v1 & ZERO) platform: rpi - dockerImage: armv7l - dockerName: Debian Stretch (Raspberry Pi 2 & 3) + dockerName: Debian Buster (Raspberry Pi 2 & 3) platform: rpi - dockerImage: aarch64 - dockerName: Debian Stretch (Generic AARCH64) + dockerName: Debian Buster (Generic AARCH64) platform: amlogic steps: @@ -41,7 +41,7 @@ jobs: - name: Build packages env: DOCKER_IMAGE: ${{ matrix.dockerImage }} - DOCKER_TAG: stretch + DOCKER_TAG: buster DOCKER_NAME: ${{ matrix.dockerName }} PLATFORM: ${{ matrix.platform }} shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index e0c45882..cbb1ef3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,19 +180,18 @@ if ( "${PLATFORM}" MATCHES "osx" ) elseif ( "${PLATFORM}" MATCHES "rpi" ) SET ( DEFAULT_DISPMANX ON ) SET ( DEFAULT_DEV_WS281XPWM ON ) -elseif ( "${PLATFORM}" STREQUAL "amlogic" ) +elseif ( "${PLATFORM}" MATCHES "^amlogic" ) SET ( DEFAULT_AMLOGIC ON ) -elseif ( "${PLATFORM}" STREQUAL "amlogic-dev" ) - SET ( DEFAULT_AMLOGIC ON ) - SET ( DEFAULT_DISPMANX OFF ) - SET ( DEFAULT_QT OFF ) - SET ( DEFAULT_CEC OFF ) -elseif ( "${PLATFORM}" STREQUAL "amlogic64" ) - SET ( DEFAULT_AMLOGIC ON ) -elseif ( "${PLATFORM}" MATCHES "x11" ) + if ( "${PLATFORM}" MATCHES "-dev$" ) + SET ( DEFAULT_AMLOGIC ON ) + SET ( DEFAULT_DISPMANX OFF ) + SET ( DEFAULT_QT OFF ) + SET ( DEFAULT_CEC OFF ) + endif() +elseif ( "${PLATFORM}" MATCHES "^x11" ) SET ( DEFAULT_X11 ON ) SET ( DEFAULT_XCB ON ) - if ( "${PLATFORM}" STREQUAL "x11-dev" ) + if ( "${PLATFORM}" MATCHES "-dev$" ) SET ( DEFAULT_AMLOGIC ON) SET ( DEFAULT_DEV_WS281XPWM ON ) endif() @@ -201,7 +200,7 @@ elseif ( "${PLATFORM}" STREQUAL "imx6" ) endif() # enable tests for -dev builds -if ( "${PLATFORM}" MATCHES "-dev" ) +if ( "${PLATFORM}" MATCHES "-dev$" ) SET ( DEFAULT_TESTS ON ) endif() diff --git a/Installation.md b/Installation.md index 9f2fa84a..f55c1cdf 100644 --- a/Installation.md +++ b/Installation.md @@ -7,9 +7,9 @@ For Windows and macOS is an installation file available on our [Release page](ht ## Linux: On the following operating systems, Hyperion can currently be installed/updated using the method listed below: -- Raspbian Stretch/Raspberry Pi OS and later (armhf/arm64) -- Debian Stretch (9) and later (armhf/arm64/x86_64) -- Ubuntu 18.04 and later (armhf/arm64/x86_64) +- Raspbian Buster/Raspberry Pi OS and later (armhf/arm64) +- Debian Buster(10) and later (armhf/arm64/x86_64) +- Ubuntu 20.04 and later (armhf/arm64/x86_64) *** diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json index 6845685d..263c8bd6 100644 --- a/assets/webconfig/i18n/en.json +++ b/assets/webconfig/i18n/en.json @@ -560,7 +560,9 @@ "edt_conf_webc_keyPassPhrase_title": "Key password", "edt_conf_webc_keyPath_expl": "Path to the key file (format PEM, encrypted with RSA)", "edt_conf_webc_keyPath_title": "Private key path", - "edt_conf_webc_sslport_expl": "Port oft the HTTPS-Webserver", + "edt_conf_webc_port_expl": "Port for the WebServer, RPC and WebSocket HTTP connections", + "edt_conf_webc_port_title": "HTTP Port", + "edt_conf_webc_sslport_expl": "Port for the WebServer, RPC and WebSocket HTTPS connections", "edt_conf_webc_sslport_title": "HTTPS Port", "edt_dev_auth_key_title": "Authentication Token", "edt_dev_auth_key_title_info": "Authentication Token required to acccess the device", diff --git a/bin/scripts/docker-compile.sh b/bin/scripts/docker-compile.sh index a6abd11d..ce298b96 100755 --- a/bin/scripts/docker-compile.sh +++ b/bin/scripts/docker-compile.sh @@ -62,8 +62,7 @@ function printHelp { echo "######################################################## ## A script to compile Hyperion inside a docker container ## Requires installed Docker: https://www.docker.com/ -## Without arguments it will compile Hyperion for Debian Buster (x86_64) and uses Hyperion code from GitHub repository. -## Supports Raspberry Pi (armv6l, armv7l) cross compilation (Debian Stretch/Buster) and native compilation (Raspbian Stretch/Buster) +## Without arguments it will compile Hyperion for Debian Bullseye (x86_64) and uses Hyperion code from GitHub repository. ## For all images and tags currently available, see https://github.com/orgs/hyperion-project/packages ## ## Homepage: https://www.hyperion-project.org @@ -73,7 +72,7 @@ echo "######################################################## # # docker-compile.sh -h, --help # Show this help message # docker-compile.sh -i, --image # The docker image, e.g., x86_64, armv6l, armv7l, aarch64 -# docker-compile.sh -t, --tag # The docker tag, e.g., stretch, buster, bullseye, bookworm +# docker-compile.sh -t, --tag # The docker tag, e.g., buster, bullseye, bookworm # docker-compile.sh -b, --type # Release or Debug build # docker-compile.sh -p, --packages # If true, build packages with CPack # docker-compile.sh -l, --local # Run build using local code files diff --git a/bin/scripts/install_pr.sh b/bin/scripts/install_pr.sh new file mode 100755 index 00000000..ce029a08 --- /dev/null +++ b/bin/scripts/install_pr.sh @@ -0,0 +1,239 @@ +#!/bin/bash +# Script for downloading a specific open Pull Request Artifact from Hyperion.NG + +# Fixed variables +api_url="https://api.github.com/repos/hyperion-project/hyperion.ng" +type wget > /dev/null 2> /dev/null +hasWget=$? +type curl > /dev/null 2> /dev/null +hasCurl=$? +type python3 > /dev/null 2> /dev/null +hasPython3=$? +type python > /dev/null 2> /dev/null +hasPython2=$? + +if [[ "${hasWget}" -ne 0 ]] && [[ "${hasCurl}" -ne 0 ]]; then + echo '---> Critical Error: wget or curl required to download pull request artifacts' + exit 1 +fi + +if [[ "${hasPython3}" -eq 0 ]]; then + pythonCmd="python3" +else + if [[ "${hasPython2}" -eq 0 ]]; then + pythonCmd="python" + else + echo '---> Critical Error: python3 or python2 required to download pull request artifacts' + fi + exit 1 +fi + +function request_call() { + if [ $hasWget -eq 0 ]; then + echo $(wget --quiet --header="Authorization: token ${PR_TOKEN}" -O - $1) + elif [ $hasCurl -eq 0 ]; then + echo $(curl -skH "Authorization: token ${PR_TOKEN}" $1) + fi +} + +while getopts ":c:t:m:r:" opt; do + case "$opt" in + t) PR_TOKEN=$OPTARG ;; + r) run_id=$OPTARG ;; + m) ARCHITECTURE=$OPTARG ;; + c) CONFIGDIR=$OPTARG ;; + esac +done +shift $(( OPTIND - 1 )) + +# Check for a command line argument (PR number) +if [ "$1" == "" ] || [ $# -gt 1 ] || [ -z ${PR_TOKEN} ]; then + echo "Usage: $0 -t -m -r -c " >&2 + exit 1 +else + pr_number="$1" +fi + +# Set welcome message +echo '*******************************************************************************' +echo 'This script will download a specific open Pull Request Artifact from Hyperion.NG' +echo 'Created by hyperion-project.org - the official Hyperion source.' +echo '*******************************************************************************' + +# Determine the architecture, if not given +if [[ -z ${ARCHITECTURE} ]]; then + ARCHITECTURE=`uname -m` +fi + +#Test if multiarchitecture setup, i.e. user-space is 32bit +if [ ${ARCHITECTURE} == "aarch64" ]; then + USER_ARCHITECTURE=$ARCHITECTURE + IS_V7L=`cat /proc/$$/maps |grep -m1 -c v7l` + if [ $IS_V7L -ne 0 ]; then + USER_ARCHITECTURE="armv7l" + else + IS_V6L=`cat /proc/$$/maps |grep -m1 -c v6l` + if [ $IS_V6L -ne 0 ]; then + USER_ARCHITECTURE="armv6l" + fi + fi + if [ $ARCHITECTURE != $USER_ARCHITECTURE ]; then + echo "---> Identified kernel target architecture: $ARCHITECTURE" + echo "---> Identified user space target architecture: $USER_ARCHITECTURE" + ARCHITECTURE=$USER_ARCHITECTURE + fi +fi + +echo 'armv6l armv7l aarch64 x86_64' | grep -qw ${ARCHITECTURE} +if [ $? -ne 0 ]; then + echo "---> Critical Error: Target architecture $ARCHITECTURE is unknown -> abort" + exit 1 +else + echo "---> Download Pull Request for identified runtime architecture: $ARCHITECTURE" +fi + +# Determine if PR number exists +pulls=$(request_call "$api_url/pulls") + +pr_exists=$(echo "$pulls" | tr '\r\n' ' ' | ${pythonCmd} -c """ +import json,sys +data = json.load(sys.stdin) + +for i in data: + if i['number'] == "$pr_number": + print('exists') + break +""" 2>/dev/null) + +if [ "$pr_exists" != "exists" ]; then + echo "---> Pull Request $pr_number not found -> abort" + exit 1 +fi + +# Get head_sha value from 'pr_number' +head_sha=$(echo "$pulls" | tr '\r\n' ' ' | ${pythonCmd} -c """ +import json,sys +data = json.load(sys.stdin) + +for i in data: + if i['number'] == "$pr_number": + print(i['head']['sha']) + break +""" 2>/dev/null) + +if [ -z "$head_sha" ]; then + echo "---> The specified PR #$pr_number has no longer any artifacts." + echo "---> It may be older than 14 days. Ask the PR creator to recreate the artifacts at the following URL:" + echo "---> https://github.com/hyperion-project/hyperion.ng/pull/$pr_number" + exit 1 +fi + +if [ -z "$run_id" ]; then +# Determine run_id from head_sha +runs=$(request_call "$api_url/actions/runs") +run_id=$(echo "$runs" | tr '\r\n' ' ' | ${pythonCmd} -c """ +import json,sys +data = json.load(sys.stdin) + +for i in data['workflow_runs']: + if i['head_sha'] == '"$head_sha"': + print(i['id']) + break +""" 2>/dev/null) +fi + +if [ -z "$run_id" ]; then + echo "---> The specified PR #$pr_number has no longer any artifacts." + echo "---> It may be older than 14 days. Ask the PR creator to recreate the artifacts at the following URL:" + echo "---> https://github.com/hyperion-project/hyperion.ng/pull/$pr_number" + exit 1 +fi + +# Get archive_download_url from workflow +artifacts=$(request_call "$api_url/actions/runs/$run_id/artifacts") +archive_download_url=$(echo "$artifacts" | tr '\r\n' ' ' | ${pythonCmd} -c """ +import json,sys +data = json.load(sys.stdin) + +for i in data['artifacts']: + if i['name'] == '"$ARCHITECTURE"': + print(i['archive_download_url']) + break +""" 2>/dev/null) + +if [ -z "$archive_download_url" ]; then + echo "---> The specified PR #$pr_number has no longer any artifacts." + echo "---> It may be older than 14 days. Ask the PR creator to recreate the artifacts at the following URL:" + echo "---> https://github.com/hyperion-project/hyperion.ng/pull/$pr_number" + exit 1 +fi + +# Download packed PR artifact +echo "---> Downloading the Pull Request #$pr_number" +if [ $hasCurl -eq 0 ]; then + curl -skH "Authorization: token ${PR_TOKEN}" -o $HOME/temp.zip -L --get $archive_download_url +elif [ $hasWget -eq 0 ]; then + echo "wget" + wget --quiet --header="Authorization: token ${PR_TOKEN}" -O $HOME/temp.zip $archive_download_url +fi + +# Create new folder & extract PR artifact +echo "---> Extracting packed Artifact" +mkdir -p $HOME/hyperion_pr$pr_number +unzip -p $HOME/temp.zip | tar --strip-components=2 -C $HOME/hyperion_pr$pr_number share/hyperion/ -xz + +# Delete PR artifact +echo '---> Remove temporary files' +rm $HOME/temp.zip 2>/dev/null + +# Create the startup script +echo '---> Create startup script' +STARTUP_SCRIPT="#!/bin/bash -e + +# Stop hyperion service, if it is running +"'CURRENT_SERVICE=$(systemctl --type service | { grep -o "hyperion.*\.service" || true; }) +if [[ ! -z ${CURRENT_SERVICE} ]]; then + echo "---> Stop current service: ${CURRENT_SERVICE}" + + STOPCMD="systemctl stop --quiet ${CURRENT_SERVICE} --now" + USERNAME=${SUDO_USER:-$(whoami)} + if [ ${USERNAME} != "root" ]; then + STOPCMD="sudo ${STOPCMD}" + fi + + ${STOPCMD} >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "---> Critical Error: Failed to stop service: ${CURRENT_SERVICE}, Hyperion may not be started. Stop Hyperion manually." + else + echo "---> Service ${CURRENT_SERVICE} successfully stopped, Hyperion will be started" + fi +fi'"" + +TARGET_CONFIGDIR="$HOME/hyperion_pr$pr_number/config" + +if [[ ! -z ${CONFIGDIR} ]]; then +STARTUP_SCRIPT+=" +# Copy existing configuration file +"'echo "Copy existing configuration from "'${CONFIGDIR}" +mkdir -p "$TARGET_CONFIGDIR" +cp -ri "${CONFIGDIR}/*" "$TARGET_CONFIGDIR"" +fi + +STARTUP_SCRIPT+=" +# Start PR artifact +cd $HOME/hyperion_pr$pr_number +./bin/hyperiond -d -u $TARGET_CONFIGDIR" + +# Place startup script +echo "$STARTUP_SCRIPT" > $HOME/hyperion_pr$pr_number/$pr_number.sh + +# Set the executen bit +chmod +x -R $HOME/hyperion_pr$pr_number/$pr_number.sh + +echo "*******************************************************************************" +echo "Download finished!" +$REBOOTMESSAGE +echo "You can test the pull request with this command: ~/hyperion_pr$pr_number/$pr_number.sh" +echo "Remove the test installation with: rm -R ~/hyperion_pr$pr_number" +echo "Feedback is welcome at https://github.com/hyperion-project/hyperion.ng/pull/$pr_number" +echo "*******************************************************************************" diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index a727b0ad..08120831 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -132,28 +132,33 @@ macro(DeployLinux TARGET) include(GetPrerequisites) set(SYSTEM_LIBS_SKIP + "libatomic" "libc" + "libdbus" "libdl" "libexpat" "libfontconfig" - "libfreetype" "libgcc_s" "libgcrypt" - "libGL" - "libGLdispatch" + "libglib" "libglib-2" - "libGLX" "libgpg-error" + "liblz4" + "liblzma" "libm" + "libpcre" + "libpcre2" "libpthread" "librt" "libstdc++" + "libsystemd" "libudev" + "libusb" "libusb-1" "libutil" - "libX11" + "libuuid" "libz" - ) + ) if (ENABLE_DISPMANX) list(APPEND SYSTEM_LIBS_SKIP "libcec") @@ -161,7 +166,9 @@ macro(DeployLinux TARGET) # Extract dependencies ignoring the system ones get_prerequisites(${TARGET_FILE} DEPENDENCIES 0 1 "" "") - + + message(STATUS "Dependencies for target file: ${DEPENDENCIES}") + # Append symlink and non-symlink dependencies to the list set(PREREQUISITE_LIBS "") foreach(DEPENDENCY ${DEPENDENCIES}) @@ -203,6 +210,8 @@ macro(DeployLinux TARGET) get_filename_component(file_canonical ${openssl_lib} REALPATH) gp_append_unique(PREREQUISITE_LIBS ${file_canonical}) endforeach() + else() + message( WARNING "OpenSSL NOT found (https webserver will not work)") endif(OPENSSL_FOUND) # Detect the Qt plugin directory, source: https://github.com/lxde/lxqt-qtplugin/blob/master/src/CMakeLists.txt diff --git a/cmake/FindGitVersion.cmake b/cmake/FindGitVersion.cmake index d0bcf494..4e8db794 100644 --- a/cmake/FindGitVersion.cmake +++ b/cmake/FindGitVersion.cmake @@ -1,4 +1,4 @@ - +execute_process( COMMAND git config --global --add safe.directory ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ERROR_QUIET ) execute_process( COMMAND git log -1 --format=%cn-%t/%h-%ct WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_ID ERROR_QUIET ) execute_process( COMMAND sh -c "git branch | grep '^*' | sed 's;^*;;g' " WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE VERSION_ID ERROR_QUIET ) execute_process( COMMAND sh -c "git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_REMOTE_PATH ERROR_QUIET ) diff --git a/debian/distributions b/debian/distributions index 214d10e2..12da7848 100644 --- a/debian/distributions +++ b/debian/distributions @@ -1,11 +1,3 @@ -Origin: Hyperion-Project -Label: apt.hyperion-project.org -Codename: bionic -Architectures: amd64 armhf arm64 -Components: main -Description: Official APT Repository by Hyperion Project -SignWith: yes - Origin: Hyperion-Project Label: apt.hyperion-project.org Codename: focal @@ -32,9 +24,8 @@ SignWith: yes Origin: Hyperion-Project Label: apt.hyperion-project.org -Suite: oldoldstable -Codename: stretch -Architectures: armhf amd64 +Codename: lunar +Architectures: amd64 Components: main Description: Official APT Repository by Hyperion Project SignWith: yes diff --git a/doc/development/CompileHowto.md b/doc/development/CompileHowto.md index 8a2cc7df..f50c1878 100644 --- a/doc/development/CompileHowto.md +++ b/doc/development/CompileHowto.md @@ -1,16 +1,12 @@ # With Docker -If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compiling for Raspberry Pi (Debian Stretch or higher). To compile Hyperion just execute one of the following commands. +If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compiling for Raspberry Pi (Debian Buster or higher). To compile Hyperion just execute one of the following commands. The compiled binaries and packages will be available at the deploy folder next to the script.
Note: call the script with `./docker-compile.sh -h` for more options. ## Cross compilation on x86_64 for: -**x86_64 (Debian Stretch):** -```console -wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i x86_64 -t stretch -``` **x86_64 (Debian Buster):** ```console wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i x86_64 -t buster @@ -23,10 +19,6 @@ wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/ ```console wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i x86_64 -t bookworm ``` -**Raspberry Pi v1 & ZERO (Debian Stretch)** -```console -wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv6l -t stretch -``` **Raspberry Pi v1 & ZERO (Debian Buster)** ```console wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv6l -t buster @@ -39,10 +31,6 @@ wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/ ```console wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv6l -t bookworm ``` -**Raspberry Pi 2/3/4 (Debian Stretch)** -```console -wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv7l -t stretch -``` **Raspberry Pi 2/3/4 (Debian Buster)** ```console wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv7l -t buster @@ -78,7 +66,7 @@ sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev ```console sudo apt-get update -sudo apt-get install git cmake build-essential qt6-base-dev libqt6serialport6-dev libvulkan-dev libgl1-mesa-dev libusb-1.0-0-dev python3-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev pkg-config +sudo apt-get install git cmake build-essential qt6-base-dev libqt6serialport6-dev libxkbcommon-dev libvulkan-dev libgl1-mesa-dev libusb-1.0-0-dev python3-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev pkg-config ``` **For Linux X11/XCB grabber support** diff --git a/doc/development/SupportedPlatforms.md b/doc/development/SupportedPlatforms.md index 2e170c57..39e812c4 100644 --- a/doc/development/SupportedPlatforms.md +++ b/doc/development/SupportedPlatforms.md @@ -7,12 +7,12 @@ In case of problems, it is recommended checking with the wider Hyperion communit | Hardware | OS | Version | Screen-Grabber | Package | Comments | |-----------|-----------------|--------------------|-----------------------------------------|-------------------------------------------------------------------------------|------------------------------------| | X64 | Windows | 10 | QT¹ | [Windows-AMD64.exe](https://github.com/hyperion-project/hyperion.ng/releases) | Direct X9 Grabber via self-compile | -| X64 | Ubuntu | 18.04, 20.04, 22.04² | QT¹
XCB/X11¹ | [Linux-x86_64.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | -| X64 | Debian | 9, 10, 11, 12³| QT¹
XCB/X11¹ | [Linux-x86_64.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | -| RPi 4 | HyperBian | 9, 10, 11, 12³| QT¹
XCB/X11¹
DispmanX | [HyperBian.zip](https://github.com/Hyperion-Project/HyperBian/releases) | | -| RPi 4 | Raspberry Pi OS | 9, 10, 11, 12³| QT¹
XCB/X11¹
DispmanX | [Linux-armv7l.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | -| RPi 3 /3+ | HyperBian | 9, 10, 11, 12³| QT¹
XCB/X11¹
DispmanX | [HyperBian.zip](https://github.com/hyperion-project/hyperion.ng/releases) | | -| RPi 3 /3+ | Raspberry Pi OS | 9, 10, 11, 12³| QT¹
XCB/X11¹
DispmanX | [Linux-armv7l.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | +| X64 | Ubuntu | 20.04, 22.04, 23.04² | QT¹
XCB/X11¹ | [Linux-x86_64.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | +| X64 | Debian | 10, 11, 12³ | QT¹
XCB/X11¹ | [Linux-x86_64.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | +| RPi 4 | HyperBian | 10, 11, 12³ | QT¹
XCB/X11¹
DispmanX | [HyperBian.zip](https://github.com/Hyperion-Project/HyperBian/releases) | | +| RPi 4 | Raspberry Pi OS | 10, 11, 12³ | QT¹
XCB/X11¹
DispmanX | [Linux-armv7l.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | +| RPi 3 /3+ | HyperBian | 10, 11, 12³ | QT¹
XCB/X11¹
DispmanX | [HyperBian.zip](https://github.com/hyperion-project/hyperion.ng/releases) | | +| RPi 3 /3+ | Raspberry Pi OS | 10, 11, 12³ | QT¹
XCB/X11¹
DispmanX | [Linux-armv7l.deb](https://github.com/hyperion-project/hyperion.ng/releases) | | ## Unofficial In case you have an additional working setups you would like to share with the community, please get in touch or issue a PR to have the table updated. @@ -20,13 +20,18 @@ In case you have an additional working setups you would like to share with the c | Hardware | OS | Version | Screen-Grabber | Package | Comments | |---------------|-----------------|----------------|-----------------------------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| | X64 | macOS | 11, 12 | QT
OSX | [macOS-x86_64.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | M1 not tested | -| X64 | Fedora | 35 | QT¹
XCB/X11¹ | [Linux-x86_64.rpm](https://github.com/hyperion-project/hyperion.ng/releases) | | +| X64 | Fedora | 38 | QT¹
XCB/X11¹ | [Linux-x86_64.rpm](https://github.com/hyperion-project/hyperion.ng/releases) | | | X64 | Arch | | QT¹
XCB/X11¹ | [Linux-x86_64.rpm](https://github.com/hyperion-project/hyperion.ng/releases) | | -| RPi 0/ 1 / 2 | Raspberry Pi OS | 9, 10, 11, 12³| QT¹
XCB/X11¹
DispmanX | [Linux-armv6l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | No recommended | +| RPi 0/ 1 / 2 | Raspberry Pi OS | 10, 11, 12³| QT¹
XCB/X11¹
DispmanX | [Linux-armv6l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | No recommended | +| X64 | LibreElec | 11.x (Nexus) | [Kodi add-on](https://github.com/hyperion-project/hyperion.kodi/releases) | [Linux-x86_64.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | +| RPi 4 | LibreElec | 11.x (Nexus) | - | [Linux-armv7l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | | RPi 4 | LibreElec | 10.x (Matrix) | - | [Linux-armv7l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | | RPi 4 | LibreElec | 9.2.x (Leia) | QT¹
DispmanX | [Linux-armv7l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | +| RPi 3 /3+ | LibreElec | 11.x (Nexus) | - | [Linux-armv7l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | | RPi 3 /3+ | LibreElec | 10.x (Matrix) | - | [Linux-armv7l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | | RPi 3 /3+ | LibreElec | 9.2.x (Leia) | QT¹
DispmanX | [Linux-armv7l.tar.gz](https://github.com/hyperion-project/hyperion.ng/releases) | [Install on LibreELEC](https://hyperion-project.org/forum/index.php?thread/10463-install-hyperion-ng-on-libreelec-x86-64-rpi-inoffiziell-unofficially/) | +| Amlogic | CoreElec | 21.x (Omega) | Amlogic | CoreElec Plugin | Supported via CoreElec project | +| Amlogic | CoreElec | 20.x (Nexus) | Amlogic | CoreElec Plugin | Supported via CoreElec project | | Amlogic | CoreElec | 19.x (Matrix) | Amlogic | CoreElec Plugin | Supported via CoreElec project | | Amlogic | CoreElec | 9.2.x (Leia) | Amlogic | CoreElec Plugin | Supported via CoreElec project | | Vero4K | OSMC | | | | [hyperion-vero4k](https://github.com/hissingshark/hyperion-vero4k) | @@ -35,5 +40,5 @@ In case you have an additional working setups you would like to share with the c Legend --- ¹ Requires an environment with `DISPLAY` defined\ -² 18=Bionic Beaver, 20=Focal Fossa, 22=Jammy Jellyfish\ -³ 9=Stretch, 10=Buster, 11=Bullseye, 12=Bookworm +² 20=Focal Fossa, 22=Jammy Jellyfish, 23=Lunar Lobster\ +³ 10=Buster, 11=Bullseye, 12=Bookworm diff --git a/libsrc/cec/CMakeLists.txt b/libsrc/cec/CMakeLists.txt index 00a1497b..dfd80e7d 100644 --- a/libsrc/cec/CMakeLists.txt +++ b/libsrc/cec/CMakeLists.txt @@ -7,6 +7,7 @@ SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/cec) FILE (GLOB CEC_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp") add_library(cechandler ${CEC_SOURCES}) +list(GET CEC_LIBRARIES 0 CEC_LIBRARIES) add_definitions(-DCEC_LIBRARY="${CEC_LIBRARIES}") include_directories(${CEC_INCLUDE_DIRS}) diff --git a/libsrc/hyperion/schema/schema-webConfig.json b/libsrc/hyperion/schema/schema-webConfig.json index 17d9e60d..6101dc76 100644 --- a/libsrc/hyperion/schema/schema-webConfig.json +++ b/libsrc/hyperion/schema/schema-webConfig.json @@ -13,7 +13,7 @@ "port" : { "type" : "integer", - "title" : "edt_conf_general_port_title", + "title" : "edt_conf_webc_port_title", "minimum" : 80, "maximum" : 65535, "default" : 8090, diff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt index bc38505b..35326c22 100644 --- a/src/hyperiond/CMakeLists.txt +++ b/src/hyperiond/CMakeLists.txt @@ -160,7 +160,7 @@ if (APPLE) MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/osxbundle/Info.plist.in MACOSX_BUNDLE_BUNDLE_NAME "Hyperion" MACOSX_BUNDLE_BUNDLE_VERSION ${HYPERION_VERSION} - MACOSX_BUNDLE_COPYRIGHT "Copyright(c) 2014-2022 Hyperion Project" + MACOSX_BUNDLE_COPYRIGHT "Copyright(c) 2014-2023 Hyperion Project" MACOSX_BUNDLE_GUI_IDENTIFIER "com.hyperion-project.${PROJECT_NAME}" MACOSX_BUNDLE_ICON_FILE "Hyperion.icns" MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME} ${HYPERION_VERSION}"