steps:
- name: rpmfusion-free
run: |
- dnf install -y "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${{matrix.releasever}}.noarch.rpm"
+ dnf install -y "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${{ matrix.releasever }}.noarch.rpm"
- name: dependencies
run: |
dnf install -y gcc-c++ gcc-c++ which rpm-build rpmdevtools git make cmake gettext-devel dbus-devel avahi-devel openssl-devel zlib-devel libdvbcsa-devel wget bzip2 uriparser-devel pcre2-devel python python-requests ccache systemd-units systemd-devel
dnf install -y openssl-devel-engine || true
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ tags: true
- name: Workaround safe directory
- run: git config --global --add safe.directory /__w/tvheadend/tvheadend
+ run: git config --global --add safe.directory "$(pwd)"
- name: build
run: ./configure --disable-dvbscan --disable-libfdkaac_static --disable-ffmpeg_static --disable-hdhomerun_static --disable-libfdkaac_static --disable-libopus_static --disable-libtheora_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --enable-libfdkaac --enable-hdhomerun_client --enable-libsystemd_daemon --python=/usr/bin/python3 && make -C rpm build -j$(nproc) || (echo "PARALLEL BUILD FAILED, DOING SINGLE THREADED BUILD" && make -C rpm build)
- name: copy-result
if-no-files-found: error
- name: upload-cloudsmith
run: support/cloudsmith.sh -n -f 'tvheadend*.rpm'
+
+ build-el-rpm-native:
+ continue-on-error: true
+ name: Build on native almalinux:${{ matrix.releasever }} ${{ matrix.runner == 'ubuntu-latest' && 'x86_64' || 'aarch64' }}
+ strategy:
+ matrix:
+ releasever: ["9", "10"]
+ runner: ["ubuntu-latest", "ubuntu-24.04-arm"]
+ runs-on: ${{ matrix.runner }}
+ container:
+ image: "almalinux:${{ matrix.releasever }}"
+ steps:
+ - name: rpmfusion-free
+ run: |
+ dnf install -y dnf-plugins-core
+ dnf config-manager --set-enabled crb
+ dnf install -y "https://download1.rpmfusion.org/free/el/rpmfusion-free-release-${{ matrix.releasever }}.noarch.rpm"
+ - name: dependencies
+ run: |
+ dnf install -y gcc-c++ gcc-c++ which rpm-build rpmdevtools git make cmake gettext-devel dbus-devel avahi-devel openssl-devel zlib-devel libdvbcsa-devel wget bzip2 uriparser-devel pcre2-devel python python-requests ccache systemd-units systemd-devel
+ dnf install -y openssl-devel-engine || true
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ tags: true
+ - name: Workaround safe directory
+ run: git config --global --add safe.directory "$(pwd)"
+ - name: build
+ run: ./configure --disable-dvbscan --disable-libfdkaac_static --disable-ffmpeg_static --disable-hdhomerun_static --disable-libfdkaac_static --disable-libopus_static --disable-libtheora_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --enable-libfdkaac --enable-hdhomerun_client --enable-libsystemd_daemon --python=/usr/bin/python3 && make -C rpm build -j$(nproc)
+ - name: copy-result
+ run: cp rpm/RPMS/*/tvheadend*.rpm .
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Tvheadend-el-${{ matrix.releasever }}-${{ matrix.runner == 'ubuntu-latest' && 'x86_64' || 'aarch64' }}
+ path: tvheadend*.rpm
+ if-no-files-found: error
+ - name: upload-cloudsmith
+ run: support/cloudsmith.sh -n -f 'tvheadend*.rpm'
steps:
- name: rpmfusion-free
run: |
- dnf install -y "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${{matrix.releasever}}.noarch.rpm"
+ dnf install -y "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${{ matrix.releasever }}.noarch.rpm"
- name: dependencies
run: |
dnf install -y gcc-c++ gcc-c++ which rpm-build rpmdevtools git make cmake gettext-devel dbus-devel avahi-devel openssl-devel zlib-devel libdvbcsa-devel wget bzip2 uriparser-devel pcre2-devel python python-requests ccache systemd-units systemd-devel
dnf install -y openssl-devel-engine || true
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ tags: true
- name: Workaround safe directory
- run: git config --global --add safe.directory /__w/tvheadend/tvheadend
+ run: git config --global --add safe.directory "$(pwd)"
- name: build
run: ./configure --disable-dvbscan --disable-libfdkaac_static --disable-ffmpeg_static --disable-hdhomerun_static --disable-libfdkaac_static --disable-libopus_static --disable-libtheora_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --enable-libfdkaac --enable-hdhomerun_client --enable-libsystemd_daemon --python=/usr/bin/python3 && make -C rpm build -j$(nproc) || (echo "PARALLEL BUILD FAILED, DOING SINGLE THREADED BUILD" && make -C rpm build)
- name: copy-result
CLOUDSMITH_REPO: ${{ vars.CLOUDSMITH_REPO }}
CLOUDSMITH_OWNER: ${{ secrets.CLOUDSMITH_OWNER }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_KEY }}
+
+ build-el-rpm-native:
+ continue-on-error: true
+ name: Build on native almalinux:${{ matrix.releasever }} ${{ matrix.runner == 'ubuntu-latest' && 'x86_64' || 'aarch64' }}
+ strategy:
+ matrix:
+ releasever: ["9", "10"]
+ runner: ["ubuntu-latest", "ubuntu-24.04-arm"]
+ runs-on: ${{ matrix.runner }}
+ container:
+ image: "almalinux:${{ matrix.releasever }}"
+ steps:
+ - name: rpmfusion-free
+ run: |
+ dnf install -y dnf-plugins-core
+ dnf config-manager --set-enabled crb
+ dnf install -y "https://download1.rpmfusion.org/free/el/rpmfusion-free-release-${{ matrix.releasever }}.noarch.rpm"
+ - name: dependencies
+ run: |
+ dnf install -y gcc-c++ gcc-c++ which rpm-build rpmdevtools git make cmake gettext-devel dbus-devel avahi-devel openssl-devel zlib-devel libdvbcsa-devel wget bzip2 uriparser-devel pcre2-devel python python-requests ccache systemd-units systemd-devel
+ dnf install -y openssl-devel-engine || true
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ tags: true
+ - name: Workaround safe directory
+ run: git config --global --add safe.directory "$(pwd)"
+ - name: build
+ run: ./configure --disable-dvbscan --disable-libfdkaac_static --disable-ffmpeg_static --disable-hdhomerun_static --disable-libfdkaac_static --disable-libopus_static --disable-libtheora_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --enable-libfdkaac --enable-hdhomerun_client --enable-libsystemd_daemon --python=/usr/bin/python3 && make -C rpm build -j$(nproc)
+ - name: copy-result
+ run: cp rpm/RPMS/*/tvheadend*.rpm .
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Tvheadend-el-${{ matrix.releasever }}-${{ matrix.runner == 'ubuntu-latest' && 'x86_64' || 'aarch64' }}
+ path: tvheadend*.rpm
+ if-no-files-found: error
+ - name: upload-cloudsmith
+ run: support/cloudsmith.sh -f 'tvheadend*.rpm'
+ env:
+ CLOUDSMITH_ORG: ${{ vars.CLOUDSMITH_ORG }}
+ CLOUDSMITH_REPO: ${{ vars.CLOUDSMITH_REPO }}
+ CLOUDSMITH_OWNER: ${{ secrets.CLOUDSMITH_OWNER }}
+ CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_KEY }}
if ! [[ -z $ARCHOVR ]]; then
ARCH=$ARCHOVR
fi
- TARGET="$DISTRO-$ARCH"
+ TARGET="$CODENAME-$ARCH"
fi
TARGET=$OSPREFIX$TARGET
if [ "$UNAME" == "linux" ]; then
# If available, use LSB to identify distribution
if [ -x "$(command -v lsb_release)" ]; then
- export DISTRO=$(lsb_release -c | cut -d: -f2 | sed s/'^\t'//)
+ export DISTRO=$(lsb_release -i | cut -d: -f2 | sed 's/^[[:space:]]*//' | tr "[:upper:]" "[:lower:]")
+ export CODENAME=$(lsb_release -c | cut -d: -f2 | sed s/'^\t'//)
echo "OS identified using lsb_release command"
elif [ -f /etc/lsb-release ]; then
- export DISTRO=$(awk -F= '/^DISTRIB_CODENAME/{print $2}' /etc/lsb-release)
+ export DISTRO=$(awk -F= '/^DISTRIB_ID/{print $2}' /etc/lsb-release | tr "[:upper:]" "[:lower:]")
+ export CODENAME=$(awk -F= '/^DISTRIB_CODENAME/{print $2}' /etc/lsb-release)
echo "OS identified using lsb_release file"
# Otherwise, use release info file
elif [ -f /etc/os-release ]; then
- export DISTRO=$(awk -F= '/^VERSION_CODENAME/{print $2}' /etc/os-release)
- # Fedora uses VERSION_ID
- if [ "$DISTRO" == '""' ]; then
- export DISTRO=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release)
+ # Detect EL based
+ ID_LIKE=$(awk -F= '/^ID_LIKE=/{print $2}' /etc/os-release | tr -d '"')
+ if [[ "$ID_LIKE" == *rhel* ]]; then
+ export DISTRO="rhel"
+ else # default to ID
+ export DISTRO=$(awk -F= '/^ID=/{print $2}' /etc/os-release | tr -d '"')
fi
+ export CODENAME=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)
+ export VERSION=$(awk -F= '/^VERSION_ID=/{print $2}' /etc/os-release | tr -d '"')
echo "OS identified using os-release file"
else
export DISTRO=$(ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v "lsb" | cut -d'/' -f3 | cut -d'-' -f1 | cut -d'_' -f1)
%build
echo %{version}-%{release} > %{_builddir}/%{buildsubdir}/rpm/version
-%ifarch %arm
+%ifarch %arm aarch64
%configure --disable-lockowner --disable-ffmpeg_static
%else
%configure --disable-lockowner --enable-ffmpeg_static --enable-libx265 --nowerror
OS=""
FILE=""
DRYRUN="0"
+PKGMGR="apt"
YELLOW='\033[1;33m'
GREEN='\033[1;32m'
if [[ -z $TARGET ]]; then
source Autobuild/identify-os.sh
- TARGET="$DISTRO"
fi
-case $OSPREFIX$TARGET in
- bookworm|bullseye|buster|sid|stretch|jessie|trixie|forky)
- OS="debian";;
- trusty|xenial|bionic|focal|impish|jammy|kinetic|lunar|mantic|noble)
- OS="ubuntu";;
+if [ -n "$OSPREFIX" ]; then
+ DISTRO=$OSPREFIX
+fi
+
+case $DISTRO in
+ debian|raspbian*)
+ case $CODENAME in
+ bookworm|bullseye|buster|sid|stretch|jessie|trixie|forky)
+ OS="debian"
+ TARGET=$CODENAME;;
+ *)
+ echo -e "${RED}Debian release $CODENAME could not be recognized${NC}"
+ exit 1;;
+ esac;;
+ ubuntu)
+ case $CODENAME in
+ trusty|xenial|bionic|focal|impish|jammy|kinetic|lunar|mantic|noble)
+ OS="ubuntu"
+ TARGET=$CODENAME;;
+ *)
+ echo -e "${RED}Ubuntu release $CODENAME could not be recognized${NC}"
+ exit 1;;
+ esac;;
raspios*)
- OS="raspbian";;
- 37|38|39|40|41|42)
- OS="fedora";;
- 43|44)
- echo -e "${YELLOW}Fedora 43 (current rawhide) is not (yet) supported by Cloudsmith${NC}" && exit;;
- *) echo -e "${RED}OS $OSPREFIX$TARGET could not be recognized${NC}" && exit 1;;
+ OS="raspbian"
+ TARGET=$CODENAME;;
+ rhel)
+ PKGMGR="dnf"
+ OS="rhel"
+ TARGET="${VERSION%%.*}";;
+ fedora)
+ case $VERSION in
+ 37|38|39|40|41|42)
+ PKGMGR="dnf"
+ OS="fedora"
+ TARGET=$VERSION;;
+ 43|44)
+ echo -e "${YELLOW}Fedora 43 (current rawhide) is not (yet) supported by Cloudsmith${NC}"
+ exit 0;;
+ *)
+ echo -e "${RED}Fedora release $VERSION could not be recognized${NC}"
+ exit 1;;
+ esac;;
+ *)
+ echo -e "${RED}OS $DISTRO $TARGET could not be recognized${NC}"
+ exit 1;;
esac
+echo "OS Detected as $DISTRO $TARGET"
+
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
-if [ $OS == "fedora" ]; then
- dnf install -y curl
+if ! command -v curl &> /dev/null; then
+ echo "curl not found, installing..."
+ if [ "$PKGMGR" == "dnf" ]; then
+ dnf install -y curl
+ else
+ export DEBIAN_FRONTEND=noninteractive
+ apt update
+ apt install -y curl
+ fi
else
- export DEBIAN_FRONTEND=noninteractive
- apt update
- apt install -y curl
+ echo "curl is already installed."
fi
FILEARRAY=($FILE)