From f6bfbc0bdf81edc4394b0a21e2c2da28c9db46c4 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 7 Dec 2021 12:19:02 +0000 Subject: [PATCH] tvheadend: Migrate to python310 --- spk/tvheadend/Makefile | 12 +++++------ spk/tvheadend/src/requirements-pure.txt | 2 +- spk/tvheadend/src/service-setup.sh | 27 +++++++++---------------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/spk/tvheadend/Makefile b/spk/tvheadend/Makefile index 56633b3f18f..605ba1f4aac 100644 --- a/spk/tvheadend/Makefile +++ b/spk/tvheadend/Makefile @@ -1,10 +1,10 @@ SPK_NAME = tvheadend SPK_SHORT_VERS = 4.3 -SPK_GIT_HASH = c6bb43d -SPK_GIT_DATE = 20211020 +SPK_GIT_HASH = b871020 +SPK_GIT_DATE = 20211121 SPK_VERS = $(SPK_SHORT_VERS).$(SPK_GIT_DATE) TVH_VERS = $(SPK_SHORT_VERS)~$(SPK_GIT_HASH) -SPK_REV = 30 +SPK_REV = 31 SPK_ICON = src/tvheadend.png DSM_UI_DIR = app @@ -13,8 +13,8 @@ DSM_UI_DIR = app # 000-fix-version.patch from cross/tvheadend export TVH_VERS -SPK_DEPENDS = "python38" -WHEELS = src/requirements.txt +SPK_DEPENDS = "python310" +WHEELS = src/requirements-pure.txt DEPENDS = cross/$(SPK_NAME) cross/zap2epg cross/dtv-scan-tables @@ -24,7 +24,7 @@ DESCRIPTION_FRE = Tvheadend est un serveur de streaming et enregistreur TV pour RELOAD_UI = yes DISPLAY_NAME = Tvheadend STARTABLE = yes -CHANGELOG = "1. Update to latest git version c6bb43d as of June 20th 2021
2. Update openssl to 1.1
3. Updated to use FFMPEG 4.3.3
4. Updated libhdhomerun to version 20210624" +CHANGELOG = "1. Update to latest git version b871020 as of November 21th 2021
2. Update openssl to 1.1l
3. Updated to use FFMPEG 4.3.3
4. Updated libhdhomerun to version 20210624
5. Update to Python 3.10
6. Update pngquant to version 2.17.0
7. Update readline to version 8.1" HOMEPAGE = https://tvheadend.org/ LICENSE = GPL v3 diff --git a/spk/tvheadend/src/requirements-pure.txt b/spk/tvheadend/src/requirements-pure.txt index 84b557c9ea3..f5203c74f01 100644 --- a/spk/tvheadend/src/requirements-pure.txt +++ b/spk/tvheadend/src/requirements-pure.txt @@ -1,4 +1,4 @@ -certifi==2021.5.30 +#certifi==2021.5.30 ==> python310 chardet==4.0.0 requests==2.25.1 urllib3==1.26.5 diff --git a/spk/tvheadend/src/service-setup.sh b/spk/tvheadend/src/service-setup.sh index 78989220419..42a3da5f016 100644 --- a/spk/tvheadend/src/service-setup.sh +++ b/spk/tvheadend/src/service-setup.sh @@ -1,13 +1,9 @@ -# Package specific behaviors -# Sourced script by generic installer and start-stop-status scripts - -# Add ffmpeg and ifself to path -PYTHON_DIR="/var/packages/python38/target" -PYTHONENV="${SYNOPKG_PKGDEST}/env" -VIRTUALENV="${PYTHON_DIR}/bin/virtualenv" -WHEELHOUSE=${SYNOPKG_PKGDEST}/share/wheelhouse -FFMPEG_DIR="/var/packages/ffmpeg/target" -PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${FFMPEG_DIR}/bin:${PYTHON_DIR}/bin:${PATH}" +# Define python310 binary path +PYTHON_DIR="/var/packages/python310/target/bin" +# Define ffmpeg binary path +FFMPEG_DIR="/var/packages/ffmpeg/target/bin" +# Add local bin, virtualenv along with ffmpeg and python310 to the default PATH +PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${FFMPEG_DIR}:${PATH}" # Service configuration. Change http and htsp ports here and in conf/tvheadend.sc for non-standard ports HTTP=9981 @@ -16,7 +12,7 @@ HTSP=9982 # Replace generic service startup, run service in background GRPN=$(id -gn ${EFF_USER}) UPGRADE_CFG_DIR="${SYNOPKG_PKGVAR}/dvr/config" -SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/tvheadend -f -C -u ${EFF_USER} -g ${GRPN} --http_port ${HTTP} --htsp_port ${HTSP} -c ${SYNOPKG_PKGVAR} -p ${PID_FILE} -l ${LOG_FILE} --debug \"\"" +SERVICE_COMMAND="tvheadend -f -C -u ${EFF_USER} -g ${GRPN} --http_port ${HTTP} --htsp_port ${HTSP} -c ${SYNOPKG_PKGVAR} -p ${PID_FILE} -l ${LOG_FILE} --debug \"\"" SVC_BACKGROUND=yes # Group configuration to manage permissions of recording folders @@ -25,13 +21,10 @@ GROUP=sc-media service_postinst () { # EPG Grabber (zap2epg) - Create a Python virtualenv - ${VIRTUALENV} --system-site-packages ${PYTHONENV} + install_python_virtualenv - # EPG Grabber (zap2epg) - Install the wheels/requirements - ${SYNOPKG_PKGDEST}/env/bin/pip install \ - --no-deps --no-index --no-input --upgrade \ - --force-reinstall --find-links \ - ${WHEELHOUSE} ${WHEELHOUSE}/*.whl + # EPG Grabber (zap2epg) - Install the Python wheels + install_python_wheels } service_postupgrade ()