commit 4a0cfcfff17a8944e0362a47d1635f3dc495d3f1
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Sun Jul 11 12:57:08 2021 +0200
Update to latest snapshot
.gitignore | 1 +
sources | 2 +-
tvheadend-4.2.1-hdhomerun.patch | 24 ---
tvheadend-4.2.8-gcc10.patch | 64 --------
tvheadend-4.2.8-gcc9.patch | 36 -----
tvheadend-4.2.8-hdhomerun20190621.patch | 12 --
...es.patch => tvheadend-4.3-crypto_policies.patch | 6 +-
...es.patch => tvheadend-4.3-dtv_scan_tables.patch | 6 +-
tvheadend-4.3-hdhomerun.patch | 36 +++++
....7-python3.patch => tvheadend-4.3-python3.patch | 11 +-
....7-service.patch => tvheadend-4.3-service.patch | 6 +-
...e.patch => tvheadend-4.3-use_system_queue.patch | 4 +-
tvheadend.spec | 163 ++++++++-------------
tvheadend.sysusers | 1 +
14 files changed, 115 insertions(+), 257 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dc6a0f4..ed0984a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/tvheadend-4.2.6.tar.gz
/tvheadend-4.2.7.tar.gz
/tvheadend-4.2.8.tar.gz
+/tvheadend-eb59284.tar.gz
diff --git a/sources b/sources
index 8bca8cd..face364 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tvheadend-4.2.8.tar.gz) =
e629ffe1802e76b5121d5c22d11be86640f17816a5e902ed4842b2fd21df506d00d9caebafd931d71995e9d9049cb675c032478c9bed4f1ce82fc3f255f6166f
+SHA512 (tvheadend-eb59284.tar.gz) =
5637e16ffd21785a2fe531a1beb615200d95d0361684a559708030dcd830e7d7ae1d39dae93374def1d8cdabb32e16d1184b21c9b24aa5ed6499fdf32a7a6240
diff --git a/tvheadend-4.2.1-crypto_policies.patch b/tvheadend-4.3-crypto_policies.patch
similarity index 72%
rename from tvheadend-4.2.1-crypto_policies.patch
rename to tvheadend-4.3-crypto_policies.patch
index 5c30151..122c9f7 100644
--- a/tvheadend-4.2.1-crypto_policies.patch
+++ b/tvheadend-4.3-crypto_policies.patch
@@ -1,7 +1,7 @@
diff -up ./src/httpc.c.orig ./src/httpc.c
---- ./src/httpc.c.orig 2017-04-21 10:32:22.000000000 +0200
-+++ ./src/httpc.c 2017-04-23 13:29:02.612596380 +0200
-@@ -1509,7 +1509,7 @@ http_client_reconnect
+--- ./src/httpc.c.orig 2021-06-12 15:56:23.000000000 +0200
++++ ./src/httpc.c 2021-07-09 16:37:32.466273140 +0200
+@@ -1528,7 +1528,7 @@ http_client_reconnect
/* do not use SSLv2 */
SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_COMPRESSION);
/* adjust cipher list */
diff --git a/tvheadend-4.2.2-dtv_scan_tables.patch b/tvheadend-4.3-dtv_scan_tables.patch
similarity index 59%
rename from tvheadend-4.2.2-dtv_scan_tables.patch
rename to tvheadend-4.3-dtv_scan_tables.patch
index 5131026..2bb5f54 100644
--- a/tvheadend-4.2.2-dtv_scan_tables.patch
+++ b/tvheadend-4.3-dtv_scan_tables.patch
@@ -1,7 +1,7 @@
diff -up ./src/input/mpegts/scanfile.c.orig ./src/input/mpegts/scanfile.c
---- ./src/input/mpegts/scanfile.c.orig 2017-05-16 13:15:24.000000000 +0200
-+++ ./src/input/mpegts/scanfile.c 2017-06-01 22:30:29.150834135 +0200
-@@ -903,7 +903,7 @@ scanfile_init ( const char *muxconf_path
+--- ./src/input/mpegts/scanfile.c.orig 2021-06-12 15:56:23.000000000 +0200
++++ ./src/input/mpegts/scanfile.c 2021-07-09 16:25:21.695025654 +0200
+@@ -921,7 +921,7 @@ scanfile_init ( const char *muxconf_path
#elif defined(PLATFORM_FREEBSD)
path = "/usr/local/share/dtv-scan-tables";
#else
diff --git a/tvheadend-4.3-hdhomerun.patch b/tvheadend-4.3-hdhomerun.patch
new file mode 100644
index 0000000..bac98a2
--- /dev/null
+++ b/tvheadend-4.3-hdhomerun.patch
@@ -0,0 +1,36 @@
+diff -up ./configure.orig ./configure
+--- ./configure.orig 2021-06-12 15:56:23.000000000 +0200
++++ ./configure 2021-07-09 15:38:00.582174018 +0200
+@@ -419,7 +419,7 @@ if enabled hdhomerun_static; then
+ else
+
+ if enabled_or_auto hdhomerun_client; then
+- if check_cc_header 'libhdhomerun/hdhomerun' libhdhomerun; then
++ if check_cc_header 'hdhomerun/hdhomerun' libhdhomerun; then
+ enable hdhomerun_client
+ LDFLAGS="$LDFLAGS -lhdhomerun"
+ fi
+diff -up ./src/input/mpegts/tvhdhomerun/tvhdhomerun.c.orig
./src/input/mpegts/tvhdhomerun/tvhdhomerun.c
+--- ./src/input/mpegts/tvhdhomerun/tvhdhomerun.c.orig 2021-06-12 15:56:23.000000000
+0200
++++ ./src/input/mpegts/tvhdhomerun/tvhdhomerun.c 2021-07-09 15:36:03.911371146 +0200
+@@ -17,7 +17,7 @@
+ * along with this program. If not, see <
http://www.gnu.org/licenses/>.
+ */
+
+-#include "libhdhomerun/hdhomerun.h"
++#include <hdhomerun/hdhomerun.h>
+
+ #include "tvheadend.h"
+ #include "input.h"
+diff -up ./src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c.orig
./src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c
+--- ./src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c.orig 2021-06-12
15:56:23.000000000 +0200
++++ ./src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c 2021-07-09 15:39:29.431546982
+0200
+@@ -17,7 +17,7 @@
+ * along with this program. If not, see <
http://www.gnu.org/licenses/>.
+ */
+
+-#include "libhdhomerun/hdhomerun.h"
++#include <hdhomerun/hdhomerun.h>
+
+ #include <fcntl.h>
+ #include "tvheadend.h"
diff --git a/tvheadend-4.2.7-python3.patch b/tvheadend-4.3-python3.patch
similarity index 91%
rename from tvheadend-4.2.7-python3.patch
rename to tvheadend-4.3-python3.patch
index 752b17b..355c296 100644
--- a/tvheadend-4.2.7-python3.patch
+++ b/tvheadend-4.3-python3.patch
@@ -1,6 +1,6 @@
diff -up ./lib/py/tvh/tsreader.py.orig ./lib/py/tvh/tsreader.py
---- ./lib/py/tvh/tsreader.py.orig 2018-10-08 14:37:05.000000000 +0200
-+++ ./lib/py/tvh/tsreader.py 2018-10-15 11:53:53.766850060 +0200
+--- ./lib/py/tvh/tsreader.py.orig 2021-06-12 15:56:23.000000000 +0200
++++ ./lib/py/tvh/tsreader.py 2021-07-09 15:57:46.003481983 +0200
@@ -31,7 +31,7 @@ def encode_utf8(c):
def conv_8859(tnum, data):
@@ -71,7 +71,7 @@ diff -up ./lib/py/tvh/tsreader.py.orig ./lib/py/tvh/tsreader.py
dllen = dllen - dlen
data = data[dlen:]
-@@ -216,7 +216,7 @@ if __name__ == '__main__':
+@@ -216,15 +216,15 @@ if __name__ == '__main__':
# Complete?
if cur:
if len(cur.data) >= cur.len:
@@ -80,8 +80,9 @@ diff -up ./lib/py/tvh/tsreader.py.orig ./lib/py/tvh/tsreader.py
# try:
cur.process()
# except: pass
-@@ -224,7 +224,7 @@ if __name__ == '__main__':
- print
+ cur = None
+- print
++ print()
sys.exit(0)
else:
- print 'waiting for %d bytes' % (cur.len - len(cur.data))
diff --git a/tvheadend-4.2.7-service.patch b/tvheadend-4.3-service.patch
similarity index 66%
rename from tvheadend-4.2.7-service.patch
rename to tvheadend-4.3-service.patch
index c5b9669..7ba0932 100644
--- a/tvheadend-4.2.7-service.patch
+++ b/tvheadend-4.3-service.patch
@@ -1,9 +1,9 @@
diff -up ./rpm/tvheadend.sysconfig.orig ./rpm/tvheadend.sysconfig
---- ./rpm/tvheadend.sysconfig.orig 2018-10-08 14:37:05.000000000 +0200
-+++ ./rpm/tvheadend.sysconfig 2018-10-09 12:21:53.932489202 +0200
+--- ./rpm/tvheadend.sysconfig.orig 2021-06-12 15:56:23.000000000 +0200
++++ ./rpm/tvheadend.sysconfig 2021-07-09 15:59:43.911304216 +0200
@@ -1,4 +1,4 @@
# Configuration file for the tvheadend service.
MALLOC_ARENA_MAX=4
-OPTIONS="-c /var/lib/tvheadend/config -u tvheadend -g tvheadend -6 --http_port 9981
--htsp_port 9982"
-+OPTIONS="-c /var/lib/tvheadend/config -u tvheadend -g video -6 -C --http_port 9981
--htsp_port 9982"
++OPTIONS="-c /var/lib/tvheadend/config -u tvheadend -g video -6 --http_port 9981
--htsp_port 9982 -C"
diff --git a/tvheadend-4.0.9-use_system_queue.patch
b/tvheadend-4.3-use_system_queue.patch
similarity index 61%
rename from tvheadend-4.0.9-use_system_queue.patch
rename to tvheadend-4.3-use_system_queue.patch
index 13ac357..2e9a564 100644
--- a/tvheadend-4.0.9-use_system_queue.patch
+++ b/tvheadend-4.3-use_system_queue.patch
@@ -1,6 +1,6 @@
diff -up ./src/queue.h.orig ./src/queue.h
---- ./src/queue.h.orig 2016-03-14 10:10:57.000000000 +0100
-+++ ./src/queue.h 2016-07-04 17:47:22.480252171 +0200
+--- ./src/queue.h.orig 2021-06-12 15:56:23.000000000 +0200
++++ ./src/queue.h 2021-07-09 15:32:32.716107613 +0200
@@ -5,7 +5,7 @@
#ifndef HTSQ_H
#define HTSQ_H
diff --git a/tvheadend.spec b/tvheadend.spec
index 504fef2..03164d8 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -1,60 +1,46 @@
-%global tvheadend_user %{name}
-%global tvheadend_group video
-
-%if 0%{?fedora} || 0%{?rhel} > 7
-%global _with_python3 1
-%global __python %{__python3}
-%global python_sitearch %{python3_sitearch}
-%else
-%global __python %{__python2}
-%global python_sitearch %{python2_sitearch}
-%endif
-
-%if 0%{?fedora} && 0%{?fedora} < 30
-%global _with_python2 1
-%endif
-
-%if 0%{?rhel} && 0%{?rhel} < 8
-%global _with_python2 1
-%endif
+%global commit eb59284b8527e3c51eadfeca94ec1e9174cdbdb0
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global commitdate 20210612
+
+#
https://tvheadend.org/issues/6026
+%global _lto_cflags %nil
Name: tvheadend
-Version: 4.2.8
-Release: 15%{?dist}
+Version: 4.3
+Release: 1.%{commitdate}git%{shortcommit}%{?dist}
Summary: TV streaming server and digital video recorder
-License: GPLv3+
+# - Source code is GPLv3+
+# - Silk icons in vendor/famfamsilk/ are CC-BY
+# - Noto icons in vendor/noto/ are ASL
+License: GPLv3+ and CC-BY and ASL 2.0
URL:
https://tvheadend.org/
-Source0:
https://github.com/tvheadend/%{name}/archive/v%{version}/%{name}-%{versio...
+Source0:
https://github.com/tvheadend/%{name}/archive/%{shortcommit}/%{name}-%{sho...
+Source1: %{name}.sysusers
+# Use system queue.h header
+Patch0: %{name}-4.3-use_system_queue.patch
# Fix build with hdhomerun
-Patch0: %{name}-4.2.1-hdhomerun.patch
+Patch1: %{name}-4.3-hdhomerun.patch
+# Python 3 fixes for Python bindings
+Patch2: %{name}-4.3-python3.patch
# Fix systemd service and configuration:
# - Fix daemon group (use video to access DVB devices)
# - Add -C option to allow UI access without login at first run
-Patch1: %{name}-4.2.7-service.patch
-# Use system queue.h header
-Patch2: %{name}-4.0.9-use_system_queue.patch
+Patch3: %{name}-4.3-service.patch
# Fix system DTV scan tables path
-Patch3: %{name}-4.2.2-dtv_scan_tables.patch
+Patch4: %{name}-4.3-dtv_scan_tables.patch
# Enforcing system crypto policies, see
#
https://fedoraproject.org/wiki/Packaging:CryptoPolicies
-Patch4: %{name}-4.2.1-crypto_policies.patch
-# Python 3 fixes for Python bindings
-Patch5: %{name}-4.2.7-python3.patch
-# Fix build with GCC 9
-Patch6: %{name}-4.2.8-gcc9.patch
-# Fix build with hdhomerun >= 20190621
-Patch7: %{name}-4.2.8-hdhomerun20190621.patch
-# Fix build with GCC 10 (see also
-#
https://github.com/tvheadend/tvheadend/pull/1342.patch)
-Patch8: %{name}-4.2.8-gcc10.patch
+Patch5: %{name}-4.3-crypto_policies.patch
+BuildRequires: /usr/bin/pathfix.py
BuildRequires: bzip2
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: gzip
BuildRequires: hdhomerun-devel
BuildRequires: libdvbcsa-devel
+BuildRequires: make
BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libavcodec)
@@ -62,31 +48,27 @@ BuildRequires: pkgconfig(libavfilter)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavresample)
BuildRequires: pkgconfig(libavutil)
+BuildRequires: pkgconfig(libpcre2-8)
BuildRequires: pkgconfig(libswresample)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(liburiparser)
+BuildRequires: pkgconfig(libva)
+BuildRequires: pkgconfig(libva-drm)
BuildRequires: pkgconfig(openssl)
+BuildRequires: pkgconfig(opus)
+BuildRequires: pkgconfig(vpx)
+BuildRequires: pkgconfig(x264)
+BuildRequires: pkgconfig(x265)
BuildRequires: pkgconfig(zlib)
-%if 0%{?_with_python3}
BuildRequires: python3-devel
-BuildRequires: python3-rcssmin
-BuildRequires: python3-rjsmin
-%else
-# Needed on EL7 (python2-only)
-BuildRequires: python2-rcssmin
-BuildRequires: python2-rjsmin
-%endif
-%if 0%{?_with_python2}
-# Needed everwhere but in f30+
-BuildRequires: python2-devel
-%endif
-BuildRequires: systemd
+BuildRequires: %{py3_dist rcssmin}
+BuildRequires: %{py3_dist rjsmin}
+BuildRequires: systemd-rpm-macros
Requires: bzip2
-%if 0%{?fedora}
-Requires: dtv-scan-tables
-%endif
Requires: tar
+Requires: %{py3_dist requests}
+Requires: dtv-scan-tables
%{?systemd_requires}
Provides: bundled(extjs) = 3.4.1.1
@@ -105,102 +87,77 @@ version, the pipe:// source (in IPTV network) might be used to
obtain the
MPEG-TS stream generated by ffmpeg/libav from a V4L device.
-%if 0%{?_with_python2}
-%package -n python2-tvh
-Summary: HTSP client for Python
-BuildArch: noarch
-%{?python_provide:%python_provide python2-tvh}
-
-%description -n python2-tvh
-%{summary}.
-%endif
-
-
-%if 0%{?_with_python3}
%package -n python3-tvh
Summary: HTSP client for Python
BuildArch: noarch
-%{?python_provide:%python_provide python3-tvh}
+%py_provides python3-tvh
%description -n python3-tvh
%{summary}.
-%endif
%prep
-%autosetup -p0
+%autosetup -n %{name}-%{commit} -p0
# Delete bundled system headers and tools
rm -r vendor/{dvb-api,include,rcssmin-*,rjsmin-*}/
# Remove shebang
for i in lib/py/tvh/*.py; do
- sed '1{\@^#!/usr/bin/env python@d}' $i >$i.new && \
+ [[ $i =~ /tv_meta_ ]] && continue
+ sed '1{\@^#!\s*/usr/bin/env\s\+python@d}' $i >$i.new && \
touch -r $i $i.new && \
mv $i.new $i
done
%build
-# Enable errors on detected implicit function declarations
-# (-Werror=implicit-function-declaration) to force the build system to use
-# internal implementations of strlcat()/strlcpy()
-export CFLAGS="$RPM_OPT_FLAGS -Wno-attributes -Wno-error=stringop-truncation
-Werror=implicit-function-declaration"
echo "%{version}-%{release}" >rpm/version
-# Note: --disable-lib* correspond to options to build bundled FFmpeg
%configure \
--disable-dvbscan \
--disable-ffmpeg_static \
--disable-hdhomerun_static \
- --disable-libfdkaac \
--disable-libfdkaac_static \
- --disable-libtheora \
+ --disable-libopus_static \
--disable-libtheora_static \
- --disable-libvorbis \
--disable-libvorbis_static \
- --disable-libvpx \
--disable-libvpx_static \
- --disable-libx264 \
--disable-libx264_static \
- --disable-libx265 \
--disable-libx265_static \
- --enable-dvbcsa \
--enable-hdhomerun_client \
--enable-libsystemd_daemon \
- --python=%{__python}
+ --python=%{__python3}
%make_build \
V=1 \
- RUN_CSS="%{__python} %{python_sitearch}/rcssmin.py" \
- RUN_JS="%{__python} %{python_sitearch}/rjsmin.py"
+ RUN_CSS="%{__python3} %{python3_sitearch}/rcssmin.py" \
+ RUN_JS="%{__python3} %{python3_sitearch}/rjsmin.py"
%install
%make_install
+install -Dpm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysusersdir}/%{name}.conf
+
+pathfix.py -pni "%{__python3} %{py3_shbang_opts}"
$RPM_BUILD_ROOT%{_bindir}/{*.py,tvhmeta}
+chmod 0755 $RPM_BUILD_ROOT%{_bindir}/{*.py,tvhmeta}
+
install -Dpm 0644 rpm/%{name}.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
install -Dpm 0644 rpm/%{name}.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
install -dm 0755 $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/
# Install Python bindings
-%if 0%{?_with_python2}
-install -dm 0755 $RPM_BUILD_ROOT%{python2_sitelib}/
-cp -a lib/py/tvh/ $RPM_BUILD_ROOT%{python2_sitelib}/
-%endif
-%if 0%{?_with_python3}
install -dm 0755 $RPM_BUILD_ROOT%{python3_sitelib}/
cp -a lib/py/tvh/ $RPM_BUILD_ROOT%{python3_sitelib}/
-%endif
+rm $RPM_BUILD_ROOT%{python3_sitelib}/tvh/tv_meta_*.py
# Fix permissions
chmod 0644 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
%pre
-getent passwd %{tvheadend_user} >/dev/null || \
- useradd -r -g %{tvheadend_group} -d %{_sharedstatedir}/%{name}/ -s /sbin/nologin -c
"%{name} daemon account" %{name}
-exit 0
+%sysusers_create_compat %{SOURCE1}
%post
@@ -219,28 +176,26 @@ exit 0
%doc CONTRIBUTING.md README.md
%license LICENSE.md licenses/gpl-3.0.txt
%{_bindir}/%{name}
+%{_bindir}/tv_meta_tmdb.py
+%{_bindir}/tv_meta_tvdb.py
+%{_bindir}/tvhmeta
%{_datadir}/%{name}/
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
-%attr(-,%{tvheadend_user},%{tvheadend_group}) %dir %{_sharedstatedir}/%{tvheadend_user}/
+%attr(-,%{name},video) %dir %{_sharedstatedir}/%{name}/
+%{_sysusersdir}/%{name}.conf
%{_mandir}/man1/*.1.*
-%if 0%{?_with_python2}
-%files -n python2-tvh
-%license LICENSE.md licenses/gpl-3.0.txt
-%{python2_sitelib}/tvh/
-%endif
-
-
-%if 0%{?_with_python3}
%files -n python3-tvh
%license LICENSE.md licenses/gpl-3.0.txt
%{python3_sitelib}/tvh/
-%endif
%changelog
+* Sat Jul 10 2021 Mohamed El Morabity <melmorabity(a)fedoraproject.org> -
4.3-1.20210612giteb59284
+- Update to latest snapshot
+
* Tue Jun 15 2021 Leigh Scott <leigh123linux(a)gmail.com> - 4.2.8-15
- Rebuild for python-3.10
diff --git a/tvheadend.sysusers b/tvheadend.sysusers
new file mode 100644
index 0000000..9a34f38
--- /dev/null
+++ b/tvheadend.sysusers
@@ -0,0 +1 @@
+u tvheadend - "Tvheadend daemon account" /var/lib/tvheadend /sbin/nologin
\ No newline at end of file