Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate tvheadend to python310 #4965

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cross/libimagequant/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = libimagequant
PKG_VERS = 2.12.6
PKG_VERS = 2.17.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/ImageOptim/$(PKG_NAME)/archive
Expand Down
6 changes: 3 additions & 3 deletions cross/libimagequant/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libimagequant-2.12.6.tar.gz SHA1 950dd2cc5b7f611f365caa072601da1f0379d6c6
libimagequant-2.12.6.tar.gz SHA256 b34964512c0dbe550c5f1b394c246c42a988cd73b71a76c5838aa2b4a96e43a0
libimagequant-2.12.6.tar.gz MD5 ea4574e797ac8a28e21c0c61a100bb4f
libimagequant-2.17.0.tar.gz SHA1 8ccb742e817e9d50317685af529410d7d7e3b0c8
libimagequant-2.17.0.tar.gz SHA256 9f6cc50182be4d2ece75118aa0b0fd3e9bbad06e94fd6b9eb3a4c08129c2dd26
libimagequant-2.17.0.tar.gz MD5 0447f0de4c68aef5f342ddec58a46e7c
2 changes: 1 addition & 1 deletion cross/pngquant/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = pngquant
PKG_VERS = 2.12.5
PKG_VERS = 2.17.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-src.$(PKG_EXT)
PKG_DIST_SITE = https://pngquant.org
Expand Down
6 changes: 3 additions & 3 deletions cross/pngquant/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pngquant-2.12.5-src.tar.gz SHA1 7e1398e54bb0ecb831a3a2eaaede99ebbcddbb61
pngquant-2.12.5-src.tar.gz SHA256 3638936cf6270eeeaabcee42e10768d78e4dc07cac9310307835c1f58b140808
pngquant-2.12.5-src.tar.gz MD5 e2a02de064d6887d563fa12ceb1eb775
pngquant-2.17.0-src.tar.gz SHA1 886af39c9b7c2f55f4835cced7fb56f1371c9967
pngquant-2.17.0-src.tar.gz SHA256 a27cf0e64db499ccb3ddae9b36036e881f78293e46ec27a9e7a86a3802fcda66
pngquant-2.17.0-src.tar.gz MD5 e18dd9cc2114c28f85b04b376512c267
2 changes: 1 addition & 1 deletion cross/readline/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = readline
PKG_VERS = 7.0
PKG_VERS = 8.1
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/$(PKG_NAME)
Expand Down
8 changes: 4 additions & 4 deletions cross/readline/PLIST
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lnk:lib/libhistory.so
lnk:lib/libhistory.so.7
lib:lib/libhistory.so.7.0
lnk:lib/libhistory.so.8
lib:lib/libhistory.so.8.1
lnk:lib/libreadline.so
lnk:lib/libreadline.so.7
lib:lib/libreadline.so.7.0
lnk:lib/libreadline.so.8
lib:lib/libreadline.so.8.1
6 changes: 3 additions & 3 deletions cross/readline/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
readline-7.0.tar.gz SHA1 d9095fa14a812495052357e1d678b3f2ac635463
readline-7.0.tar.gz SHA256 750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334
readline-7.0.tar.gz MD5 205b03a87fc83dab653b628c59b9fc91
readline-8.1.tar.gz SHA1 48c5e0c3a212449e206e21ba82856accac842c6f
readline-8.1.tar.gz SHA256 f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02
readline-8.1.tar.gz MD5 e9557dd5b1409f5d7b37ef717c64518e
4 changes: 2 additions & 2 deletions cross/tvheadend/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PKG_NAME = tvheadend
PKG_VERS = 4.3
PKG_EXT = tar.gz
# git hash from October 20th 2021
PKG_GIT_HASH = c6bb43d8554643a772aa40c5e56904717b55a95f
# git hash from November 21th 2021
PKG_GIT_HASH = b8710206eb073c72b142bce95846b77a0ffa34a6
PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/tvheadend/tvheadend/archive
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
Expand Down
6 changes: 3 additions & 3 deletions cross/tvheadend/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tvheadend-gitc6bb43d8554643a772aa40c5e56904717b55a95f.tar.gz SHA1 2ab69e7cb5624659e3d2a42c6d9fcf5e9e69e253
tvheadend-gitc6bb43d8554643a772aa40c5e56904717b55a95f.tar.gz SHA256 9074d6a352f4475e5e0ad313d6e78187730f2139a778cb4c67586e74f0b9ba40
tvheadend-gitc6bb43d8554643a772aa40c5e56904717b55a95f.tar.gz MD5 9630d640835e8792d45a8aca6ba80aae
tvheadend-gitb8710206eb073c72b142bce95846b77a0ffa34a6.tar.gz SHA1 f58618e9ea72a5070774f12cf3279cee9843e83b
tvheadend-gitb8710206eb073c72b142bce95846b77a0ffa34a6.tar.gz SHA256 11eeca461e74fbe8306916933cab96d35a99fa89d81e26126e194875c41b6fad
tvheadend-gitb8710206eb073c72b142bce95846b77a0ffa34a6.tar.gz MD5 dd24e856544656b84482b2886254f1f1
12 changes: 6 additions & 6 deletions spk/tvheadend/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -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<br/>2. Update openssl to 1.1<br/>3. Updated to use FFMPEG 4.3.3<br/>4. Updated libhdhomerun to version 20210624"
CHANGELOG = "1. Update to latest git version b871020 as of November 21th 2021<br/>2. Update openssl to 1.1l<br/>3. Updated to use FFMPEG 4.3.3<br/>4. Updated libhdhomerun to version 20210624<br/>5. Update to Python 3.10<br/>6. Update pngquant to version 2.17.0<br/>7. Update readline to version 8.1"
HOMEPAGE = https://tvheadend.org/
LICENSE = GPL v3

Expand Down
Original file line number Diff line number Diff line change
@@ -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
27 changes: 10 additions & 17 deletions spk/tvheadend/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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 ()
Expand Down