Overview
Request 460674 superseded
- replace original (but long-time broken) package with the working one
living in PackMan build service (and adopt their changelog)
- keep tvheadend-fix-daemon-user-group.patch
- Add tvheadend-fix-misleading-indent.patch: Fix warning/error
produced with gcc-6.
- Update to version 4.0.9:
+ https://github.com/tvheadend/tvheadend/compare/v4.0.8...v4.0.9.
- Disable hdhomerun client and static build.
old: multimedia:apps/tvheadend
new: home:sleep_walker:branches:multimedia:apps/tvheadend rev None
Index: tvheadend.changes
===================================================================
--- tvheadend.changes (revision 4)
+++ tvheadend.changes (revision 2)
@@ -1,18 +1,76 @@
-------------------------------------------------------------------
-Wed Jan 6 17:41:30 UTC 2016 - p.drouand@gmail.com
+Tue Feb 14 12:44:57 UTC 2017 - sleep_walker@opensuse.org
-- Update to version 4.0.8
- * No changelog available
-- Add libhdhomerun-devel and ccache build dependencies
+- replace original (but long-time broken) package with the working one
+ living in PackMan build service (and adopt their changelog)
+- keep tvheadend-fix-daemon-user-group.patch
-------------------------------------------------------------------
-Wed Dec 9 16:33:11 UTC 2015 - p.drouand@gmail.com
+Mon Sep 26 21:55:00 UTC 2016 - malcolmlewis@opensuse.org
-- Remove prefixed UID
+- Add tvheadend-fix-misleading-indent.patch: Fix warning/error
+ produced with gcc-6.
-------------------------------------------------------------------
-Sun Dec 6 12:44:48 UTC 2015 - p.drouand@gmail.com
+Sat Apr 9 14:06:31 UTC 2016 - malcolmlewis@opensuse.org
-- Initial release (version 4.0.7)
-- Add tvheadend-fix-daemon-user-group.patch
+- Update to version 4.0.9:
+ + https://github.com/tvheadend/tvheadend/compare/v4.0.8...v4.0.9.
+- Disable hdhomerun client and static build.
+
+-------------------------------------------------------------------
+Sun Feb 7 21:56:31 UTC 2016 - malcolmlewis@opensuse.org
+
+- Update to version 4.0.8:
+ + Changelog on
+ https://github.com/tvheadend/tvheadend/compare/v4.0.7...v4.0.8.
+- Fix incorrect sed command in spec file to add user hts and video
+ group to /etc/sysconfig/tvheadend file.
+- Add %%doc files.
+- Delete source file not bzipped from rpmlintrc file.
+- Add helper script to add/update superuser file.
+- Update post install message to include post install steps.
+
+-------------------------------------------------------------------
+Tue Oct 27 21:58:38 UTC 2015 - malcolmlewis@opensuse.org
+
+- Update to version 4.0.7:
+ + Changelog on
+ https://tvheadend.org/projects/tvheadend/wiki/Tvheadend-40.
+
+-------------------------------------------------------------------
+Fri Jun 26 17:40:22 UTC 2015 - aloisio@gmx.com
+
+- Update to version 4.0.5
+ * changelog on https://tvheadend.org/projects/tvheadend/wiki/Tvheadend-40
+- Added init support for 11.4/SLE_11
+- spec cleanup
+
+-------------------------------------------------------------------
+Sat Jun 8 14:11:55 UTC 2013 - p.drouand@gmail.com
+
+- Update to version 3.4
+- Clean and rebase specfile
+- Add systemd service file to start automatically tvheadend daemon
+ and add tvheadend to video group to get it usable by user
+- Remove dvb-scan tables archive and pass --disable-dvbscan;
+ It doesn't work correctly and is actually obsolete
+- Remove tvheadend-3.2.18-dvbscan_data.patch; it's not needed anymore
+- Fix executable manpage
+
+-------------------------------------------------------------------
+Sat Feb 2 13:31:36 UTC 2013 - hvogel@opensuse.org
+
+- Update to version 3.2.18
+
+-------------------------------------------------------------------
+Tue Mar 27 17:20:28 UTC 2012 - hvogel@opensuse.org
+
+- Don't build with Werror
+- Add summary/description
+
+-------------------------------------------------------------------
+Fri Apr 22 09:03:35 UTC 2011 - hvogel@opensuse.org
+
+- Initial package, version 2.12
Index: tvheadend.spec
===================================================================
--- tvheadend.spec (revision 4)
+++ tvheadend.spec (revision 2)
@@ -1,7 +1,7 @@
#
# spec file for package tvheadend
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 Packman Team
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,37 +12,53 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.links2linux.org/
#
%define htsgroup video
%define htsuser hts
+%if 0%{?suse_version} > 1210
+%bcond_without systemd
+%else
+%bcond_with systemd
+%endif
Name: tvheadend
-Version: 4.0.8
+Version: 4.0.9
Release: 0
Summary: A TV Streaming Server
License: GPL-3.0
Group: Productivity/Multimedia/Other
Url: https://tvheadend.org/
Source0: http://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-Patch: tvheadend-fix-daemon-user-group.patch
-BuildRequires: ccache
+Source1: %{name}.init
+Source2: %{name}.rpmlintrc
+Source3: %{name}_super
+# PATCH-FIX-OPENSUSE tvheadend-4.0_no-werror.patch -- Do not treat warnings as errors.
+Patch0: %{name}-4.0_no-werror.patch
+# PATCH-FIX-OPENSUSE tvheadend-fix-misleading-indent.patch malcolmlewis@opensuse.org -- Fix warning/error produced with gcc-6.
+Patch1: %{name}-fix-misleading-indent.patch
BuildRequires: fdupes
-BuildRequires: libhdhomerun-devel
BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(dbus-1)
-BuildRequires: pkgconfig(libavcodec)
-BuildRequires: pkgconfig(libavformat)
-BuildRequires: pkgconfig(libavresample)
-BuildRequires: pkgconfig(libavutil)
+BuildRequires: pkgconfig(libavcodec) = 56.60.100
+BuildRequires: pkgconfig(libavformat) = 56.40.101
+BuildRequires: pkgconfig(libavresample) = 2.1.0
+BuildRequires: pkgconfig(libavutil) = 54.31.100
BuildRequires: pkgconfig(libssl)
-BuildRequires: pkgconfig(libswscale)
-BuildRequires: pkgconfig(liburiparser)
+BuildRequires: pkgconfig(libswscale) = 3.1.101
BuildRequires: pkgconfig(zlib)
BuildRequires: pkg-config
BuildRequires: python-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if %{with systemd}
%{?systemd_requires}
+%endif
+%if 0%{?suse_version} > 1140
+%if 0%{?suse_version} != 1315
+BuildRequires: pkgconfig(liburiparser)
+%endif
+%endif
%description
A TV streaming server supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV,
@@ -54,54 +70,97 @@
%prep
%setup -q
-%patch -p1
+%if 0%{?suse_version} <= 1140
+%patch0
+%endif
+%if 0%{?suse_version} >= 1320
+%patch1 -p1
+%endif
+
+sed -e "s/-u \([^ ]*\) -g \([^ ]*\)/-u %{htsuser} -g %{htsgroup}/" -i rpm/%{name}.sysconfig
sed -e '/^TVH_ARGS/cTVH_ARGS="-C"' -i debian/%{name}.default
echo %{version} > rpm/version
%build
-%configure --disable-dvbscan --disable-libffmpeg_static --disable-libffmpeg_static_x264
+%configure --disable-dvbscan \
+ --disable-libffmpeg_static \
+ --disable-libffmpeg_static_x264 \
+ --disable-hdhomerun_static
make V=1 %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/
mkdir -p %{buildroot}%{_sbindir}
+%if %{with systemd}
install -D -m 644 rpm/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
install -m 644 rpm/%{name}.sysconfig %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
+%else
+install -D -m 744 %{SOURCE1} %{buildroot}%{_initddir}/%{name}
+install -m 644 debian/%{name}.default %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
+ln -s %{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
+%endif
+# Install superuser helper script
+install -Dm0755 %{S:3} %{buildroot}%{_sbindir}/%{name}_super
%fdupes -s %{buildroot}%{_datadir}
chmod -x %{buildroot}%{_mandir}/man1/tvheadend.1
%post
+%if %{with systemd}
%fillup_only %{name}
%service_add_post %{name}.service
+%else
+%fillup_and_insserv %{name}
+%endif
cat << 'EOM'
- ==> All configuration is maintained through the web interface:
+ ==> IMPORTANT: Post configuration tasks;
+ ==> 1. Start the tvheadend service (to create home directory).
+ ==> 2. Run tvheadend_super to set default username and password.
+ ==> 3. Restart tvheadend service.
+ ==>
+ ==>
+ ==> All further configuration is maintained through the web interface:
==>
==> http://localhost:9981/
==>
- ==> Default login without username/password.
EOM
%pre
+%if %{with systemd}
%service_add_pre %{name}.service
-%{_sbindir}/useradd -g %{htsgroup} -m -s /bin/false %{htsuser} -c "Tvheadend TV server" &> /dev/null || :
+%endif
+%{_sbindir}/useradd -u 1337 -g %{htsgroup} -m -s /bin/false %{htsuser} -c "Tvheadend TV server" &> /dev/null || :
%{_sbindir}/passwd -l %{htsuser} &> /dev/null || :
%preun
+%if %{with systemd}
%service_del_preun %{name}.service
+%else
+%stop_on_removal %{name}
+%endif
%postun
+%if %{with systemd}
%service_del_postun %{name}.service
+%else
+%restart_on_update %{name}
+%insserv_cleanup
+%endif
%files
%defattr(-,root,root)
+%doc CONTRIBUTING.md LICENSE.md
%{_bindir}/tvheadend
%{_datadir}/tvheadend
-%{_mandir}/man1/tvheadend.1.gz
+%{_mandir}/man1/tvheadend.1%{?ext_man}
+%if %{with systemd}
%{_unitdir}/%{name}.service
+%else
+%{_initddir}/%{name}
+%endif
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
+%{_sbindir}/%{name}_super
%{_sbindir}/rc%{name}
%changelog
-
Index: tvheadend-4.0.9.tar.gz
===================================================================
Binary file tvheadend-4.0.9.tar.gz (revision 2) added
Index: tvheadend-4.0_no-werror.patch
===================================================================
--- tvheadend-4.0_no-werror.patch (added)
+++ tvheadend-4.0_no-werror.patch (revision 2)
@@ -0,0 +1,13 @@
+--- Makefile.orig 2015-06-27 14:15:57.523222561 +0200
++++ Makefile 2015-06-27 14:16:38.689192884 +0200
+@@ -27,8 +27,8 @@ PROG := $(BUILDDIR)/tvheadend
+ # Common compiler flags
+ #
+
+-CFLAGS += -g -O2 -Wunused-result
+-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
++CFLAGS += -g -O2
++CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations
+ CFLAGS += -Wmissing-prototypes
+ CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing
+ CFLAGS += -D_FILE_OFFSET_BITS=64
Index: tvheadend-fix-misleading-indent.patch
===================================================================
--- tvheadend-fix-misleading-indent.patch (added)
+++ tvheadend-fix-misleading-indent.patch (revision 2)
@@ -0,0 +1,21 @@
+diff -Naur a/src/htsmsg.c b/src/htsmsg.c
+--- a/src/htsmsg.c 2016-03-14 04:10:57.000000000 -0500
++++ b/src/htsmsg.c 2016-09-26 16:51:51.367645274 -0500
+@@ -760,13 +760,15 @@
+ case HMF_MAP:
+ printf("MAP) = {\n");
+ htsmsg_print0(&f->hmf_msg, indent + 1);
+- for(i = 0; i < indent; i++) printf("\t"); printf("}\n");
++ for(i = 0; i < indent; i++) printf("\t");
++ printf("}\n");
+ break;
+
+ case HMF_LIST:
+ printf("LIST) = {\n");
+ htsmsg_print0(&f->hmf_msg, indent + 1);
+- for(i = 0; i < indent; i++) printf("\t"); printf("}\n");
++ for(i = 0; i < indent; i++) printf("\t");
++ printf("}\n");
+ break;
+
+ case HMF_STR:
Index: tvheadend.init
===================================================================
--- tvheadend.init (added)
+++ tvheadend.init (revision 2)
@@ -0,0 +1,136 @@
+#! /bin/sh
+# Copyright (c) 2015 Packman Team
+# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 1995-2004 SuSE Linux AG, Nuernberg, Germany.
+#
+#
+# Please submit bugfixes or comments via http://bugs.links2linux.org/
+#
+# init.d/tvheadend
+#
+# and symbolic its link
+#
+# /usr/sbin/rctvheadend
+#
+# System startup script for the tvheadend daemon
+#
+### BEGIN INIT INFO
+# Provides: tvheadend
+# Required-Start: $local_fs $remote_fs boot.udev
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start tvheadend daemon
+# Description: Start tvheadend daemon
+### END INIT INFO
+
+# Source SuSE config
+. /etc/rc.status
+
+TVHEADEND_PIDFILE=/var/run/tvheadend.pid
+
+TVHEADEND_BIN=/usr/bin/tvheadend
+test -x $TVHEADEND_BIN || { echo "$TVHEADEND_BIN not installed";
+ if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; }
+
+TVHEADEND_SYSCONFIG=/etc/sysconfig/tvheadend
+test -r $TVHEADEND_SYSCONFIG || { echo "$TVHEADEND_SYSCONFIG not existing";
+ if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; }
+. $TVHEADEND_SYSCONFIG
+
+# Configure command line options
+[ "$TVH_ENABLED" = "1" ] || exit 0
+
+TVHEADEND_ARGS="-f"
+[ -z "$TVH_USER" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -u $TVH_USER"
+[ -z "$TVH_GROUP" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -g $TVH_GROUP"
+[ -z "$TVH_CONF_DIR" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -c $TVH_CONF_DIR"
+[ -z "$TVH_ADAPTERS" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -a $TVH_ADAPTERS"
+[ "$TVH_IPV6" = "1" ] && TVHEADEND_ARGS="$TVHEADEND_ARGS -6"
+[ -z "$TVH_HTTP_PORT" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS --http_port $TVH_HTTP_PORT"
+[ -z "$TVH_HTTP_ROOT" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS --http_root $TVH_HTTP_ROOT"
+[ -z "$TVH_HTSP_PORT" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS --htsp_port $TVH_HTSP_PORT"
+[ -z "$TVH_ARGS" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS $TVH_ARGS"
+[ "$TVH_DEBUG" = "1" ] && TVHEADEND_ARGS="$TVHEADEND_ARGS -s"
+
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v ditto but be verbose in local rc status
+# rc_status -v -r ditto and clear the local rc status
+# rc_failed set local and overall rc status to failed
+# rc_reset clear local rc status (overall remains)
+# rc_exit exit appropriate to overall rc status
+
+# First reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0 - success
+# 1 - misc error
+# 2 - invalid or excess args
+# 3 - unimplemented feature (e.g. reload)
+# 4 - insufficient privilege
+# 5 - program not installed
+# 6 - program not configured
+#
+
+case "$1" in
+ start)
+ echo -n "Starting tvheadend daemon"
+ udevadm settle
+ /sbin/startproc -p $TVHEADEND_PIDFILE $TVHEADEND_BIN $TVHEADEND_ARGS
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down tvheadend daemon"
+ /sbin/killproc -p $TVHEADEND_PIDFILE -TERM $TVHEADEND_BIN
+ rm -f $TVHEADEND_PIDFILE
+ rc_status -v
+ ;;
+ try-restart|condrestart)
+ ## RH has a similar command named condrestart.
+ if test "$1" = "condrestart"; then
+ echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+ fi
+ $0 status
+ if test $? = 0; then
+ $0 restart
+ else
+ rc_reset # Not running is not a failure.
+ fi
+ rc_status
+ ;;
+ restart)
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ force-reload)
+ echo "Reload tvheadend daemon"
+ $0 try-restart
+ rc_status
+ ;;
+ reload)
+ # tvheadend does not support SIGHUP, so fail.
+ echo -n "Reload tvheadend daemon"
+ rc_failed 3
+ rc_status -v
+ ;;
+ status)
+ echo -n "Checking for tvheadend daemon: "
+ /sbin/checkproc -p $TVHEADEND_PIDFILE $TVHEADEND_BIN
+ rc_status -v
+ ;;
+ probe)
+ test $TVHEADEND_SYSCONFIG -nt $TVHEADEND_PIDFILE && echo restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ exit 1
+ ;;
+esac
+rc_exit
Index: tvheadend.rpmlintrc
===================================================================
--- tvheadend.rpmlintrc (added)
+++ tvheadend.rpmlintrc (revision 2)
@@ -0,0 +1,2 @@
+# this file is supposed to be empty
+addFilter("W: zero-length .*empty.css")
Index: tvheadend_super
===================================================================
--- tvheadend_super (added)
+++ tvheadend_super (revision 2)
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3.0 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# Copyright (C) 2016 Malcolm Lewis
+
+
+echo "Superuser setup for tvheadend"
+
+# Make sure only root can run
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root, exiting..." 1>&2
+ exit 1
+fi
+
+if (( $# != 2 )); then
+ echo "Usage: $0 " >&2
+ exit 1
+fi
+
+# The superuser file location and name
+SUPERUSER_FILE_LOCATION="/home/tvheadend/config"
+
+# Test to see if file exists and if exists ask to overwrite
+[ -f $SUPERUSER_FILE_LOCATION/superuser ] && { echo "Superuser file exists at '$SUPERUSER_FILE_LOCATION'.";
+read -p "Overwrite existing superuser file [yes]/[no]? "
+if [ "$REPLY" != "yes" ]; then
+ echo "Exiting, superuser file unchanged"
+ exit 1
+ else
+ echo "Updating superuser file"
+fi
+}
+
+# If new file, advise user it's being created
+[ ! -f $SUPERUSER_FILE_LOCATION/superuser ] && { echo "Creating new superuser file at '$SUPERUSER_FILE_LOCATION'."; }
+
+# Read in the username and password for superuser file
+TVHEADEND_SUPERUSER_NAME="$1"
+TVHEADEND_SUPERUSER_PASS="$2"
+
+# Create directory if it doesn't exist
+mkdir -p $SUPERUSER_FILE_LOCATION
+
+# Create superuser file with username and password
+cat << EOF > $SUPERUSER_FILE_LOCATION/superuser
+{
+"username": "$TVHEADEND_SUPERUSER_NAME",
+"password": "$TVHEADEND_SUPERUSER_PASS"
+}
+EOF
+
+#Set permissions and ownership
+chmod 0600 $SUPERUSER_FILE_LOCATION/superuser
+chown hts:video $SUPERUSER_FILE_LOCATION/superuser
+
+echo "Finished, superuser file updated, please logout of the"
+echo "Web UI and restart tvheadend service to apply changes!"
Index: tvheadend-4.0.8.tar.gz
===================================================================
Binary file tvheadend-4.0.8.tar.gz (revision 4) deleted
- Created by sleep_walker
- In state superseded
- Package maintainers: posophe and sleep_walker
- Superseded by 460707
Request History
sleep_walker created request
- replace original (but long-time broken) package with the working one
living in PackMan build service (and adopt their changelog)
- keep tvheadend-fix-daemon-user-group.patch
- Add tvheadend-fix-misleading-indent.patch: Fix warning/error
produced with gcc-6.
- Update to version 4.0.9:
+ https://github.com/tvheadend/tvheadend/compare/v4.0.8...v4.0.9.
- Disable hdhomerun client and static build.
old: multimedia:apps/tvheadend
new: home:sleep_walker:branches:multimedia:apps/tvheadend rev None
Index: tvheadend.changes
===================================================================
--- tvheadend.changes (revision 4)
+++ tvheadend.changes (revision 2)
@@ -1,18 +1,76 @@
-------------------------------------------------------------------
-Wed Jan 6 17:41:30 UTC 2016 - p.drouand@gmail.com
+Tue Feb 14 12:44:57 UTC 2017 - sleep_walker@opensuse.org
-- Update to version 4.0.8
- * No changelog available
-- Add libhdhomerun-devel and ccache build dependencies
+- replace original (but long-time broken) package with the working one
+ living in PackMan build service (and adopt their changelog)
+- keep tvheadend-fix-daemon-user-group.patch
-------------------------------------------------------------------
-Wed Dec 9 16:33:11 UTC 2015 - p.drouand@gmail.com
+Mon Sep 26 21:55:00 UTC 2016 - malcolmlewis@opensuse.org
-- Remove prefixed UID
+- Add tvheadend-fix-misleading-indent.patch: Fix warning/error
+ produced with gcc-6.
-------------------------------------------------------------------
-Sun Dec 6 12:44:48 UTC 2015 - p.drouand@gmail.com
+Sat Apr 9 14:06:31 UTC 2016 - malcolmlewis@opensuse.org
-- Initial release (version 4.0.7)
-- Add tvheadend-fix-daemon-user-group.patch
+- Update to version 4.0.9:
+ + https://github.com/tvheadend/tvheadend/compare/v4.0.8...v4.0.9.
+- Disable hdhomerun client and static build.
+
+-------------------------------------------------------------------
+Sun Feb 7 21:56:31 UTC 2016 - malcolmlewis@opensuse.org
+
+- Update to version 4.0.8:
+ + Changelog on
+ https://github.com/tvheadend/tvheadend/compare/v4.0.7...v4.0.8.
+- Fix incorrect sed command in spec file to add user hts and video
+ group to /etc/sysconfig/tvheadend file.
+- Add %%doc files.
+- Delete source file not bzipped from rpmlintrc file.
+- Add helper script to add/update superuser file.
+- Update post install message to include post install steps.
+
+-------------------------------------------------------------------
+Tue Oct 27 21:58:38 UTC 2015 - malcolmlewis@opensuse.org
+
+- Update to version 4.0.7:
+ + Changelog on
+ https://tvheadend.org/projects/tvheadend/wiki/Tvheadend-40.
+
+-------------------------------------------------------------------
+Fri Jun 26 17:40:22 UTC 2015 - aloisio@gmx.com
+
+- Update to version 4.0.5
+ * changelog on https://tvheadend.org/projects/tvheadend/wiki/Tvheadend-40
+- Added init support for 11.4/SLE_11
+- spec cleanup
+
+-------------------------------------------------------------------
+Sat Jun 8 14:11:55 UTC 2013 - p.drouand@gmail.com
+
+- Update to version 3.4
+- Clean and rebase specfile
+- Add systemd service file to start automatically tvheadend daemon
+ and add tvheadend to video group to get it usable by user
+- Remove dvb-scan tables archive and pass --disable-dvbscan;
+ It doesn't work correctly and is actually obsolete
+- Remove tvheadend-3.2.18-dvbscan_data.patch; it's not needed anymore
+- Fix executable manpage
+
+-------------------------------------------------------------------
+Sat Feb 2 13:31:36 UTC 2013 - hvogel@opensuse.org
+
+- Update to version 3.2.18
+
+-------------------------------------------------------------------
+Tue Mar 27 17:20:28 UTC 2012 - hvogel@opensuse.org
+
+- Don't build with Werror
+- Add summary/description
+
+-------------------------------------------------------------------
+Fri Apr 22 09:03:35 UTC 2011 - hvogel@opensuse.org
+
+- Initial package, version 2.12
Index: tvheadend.spec
===================================================================
--- tvheadend.spec (revision 4)
+++ tvheadend.spec (revision 2)
@@ -1,7 +1,7 @@
#
# spec file for package tvheadend
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 Packman Team
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,37 +12,53 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.links2linux.org/
#
%define htsgroup video
%define htsuser hts
+%if 0%{?suse_version} > 1210
+%bcond_without systemd
+%else
+%bcond_with systemd
+%endif
Name: tvheadend
-Version: 4.0.8
+Version: 4.0.9
Release: 0
Summary: A TV Streaming Server
License: GPL-3.0
Group: Productivity/Multimedia/Other
Url: https://tvheadend.org/
Source0: http://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-Patch: tvheadend-fix-daemon-user-group.patch
-BuildRequires: ccache
+Source1: %{name}.init
+Source2: %{name}.rpmlintrc
+Source3: %{name}_super
+# PATCH-FIX-OPENSUSE tvheadend-4.0_no-werror.patch -- Do not treat warnings as errors.
+Patch0: %{name}-4.0_no-werror.patch
+# PATCH-FIX-OPENSUSE tvheadend-fix-misleading-indent.patch malcolmlewis@opensuse.org -- Fix warning/error produced with gcc-6.
+Patch1: %{name}-fix-misleading-indent.patch
BuildRequires: fdupes
-BuildRequires: libhdhomerun-devel
BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(dbus-1)
-BuildRequires: pkgconfig(libavcodec)
-BuildRequires: pkgconfig(libavformat)
-BuildRequires: pkgconfig(libavresample)
-BuildRequires: pkgconfig(libavutil)
+BuildRequires: pkgconfig(libavcodec) = 56.60.100
+BuildRequires: pkgconfig(libavformat) = 56.40.101
+BuildRequires: pkgconfig(libavresample) = 2.1.0
+BuildRequires: pkgconfig(libavutil) = 54.31.100
BuildRequires: pkgconfig(libssl)
-BuildRequires: pkgconfig(libswscale)
-BuildRequires: pkgconfig(liburiparser)
+BuildRequires: pkgconfig(libswscale) = 3.1.101
BuildRequires: pkgconfig(zlib)
BuildRequires: pkg-config
BuildRequires: python-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if %{with systemd}
%{?systemd_requires}
+%endif
+%if 0%{?suse_version} > 1140
+%if 0%{?suse_version} != 1315
+BuildRequires: pkgconfig(liburiparser)
+%endif
+%endif
%description
A TV streaming server supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV,
@@ -54,54 +70,97 @@
%prep
%setup -q
-%patch -p1
+%if 0%{?suse_version} <= 1140
+%patch0
+%endif
+%if 0%{?suse_version} >= 1320
+%patch1 -p1
+%endif
+
+sed -e "s/-u \([^ ]*\) -g \([^ ]*\)/-u %{htsuser} -g %{htsgroup}/" -i rpm/%{name}.sysconfig
sed -e '/^TVH_ARGS/cTVH_ARGS="-C"' -i debian/%{name}.default
echo %{version} > rpm/version
%build
-%configure --disable-dvbscan --disable-libffmpeg_static --disable-libffmpeg_static_x264
+%configure --disable-dvbscan \
+ --disable-libffmpeg_static \
+ --disable-libffmpeg_static_x264 \
+ --disable-hdhomerun_static
make V=1 %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/
mkdir -p %{buildroot}%{_sbindir}
+%if %{with systemd}
install -D -m 644 rpm/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
install -m 644 rpm/%{name}.sysconfig %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
+%else
+install -D -m 744 %{SOURCE1} %{buildroot}%{_initddir}/%{name}
+install -m 644 debian/%{name}.default %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
+ln -s %{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
+%endif
+# Install superuser helper script
+install -Dm0755 %{S:3} %{buildroot}%{_sbindir}/%{name}_super
%fdupes -s %{buildroot}%{_datadir}
chmod -x %{buildroot}%{_mandir}/man1/tvheadend.1
%post
+%if %{with systemd}
%fillup_only %{name}
%service_add_post %{name}.service
+%else
+%fillup_and_insserv %{name}
+%endif
cat << 'EOM'
- ==> All configuration is maintained through the web interface:
+ ==> IMPORTANT: Post configuration tasks;
+ ==> 1. Start the tvheadend service (to create home directory).
+ ==> 2. Run tvheadend_super to set default username and password.
+ ==> 3. Restart tvheadend service.
+ ==>
+ ==>
+ ==> All further configuration is maintained through the web interface:
==>
==> http://localhost:9981/
==>
- ==> Default login without username/password.
EOM
%pre
+%if %{with systemd}
%service_add_pre %{name}.service
-%{_sbindir}/useradd -g %{htsgroup} -m -s /bin/false %{htsuser} -c "Tvheadend TV server" &> /dev/null || :
+%endif
+%{_sbindir}/useradd -u 1337 -g %{htsgroup} -m -s /bin/false %{htsuser} -c "Tvheadend TV server" &> /dev/null || :
%{_sbindir}/passwd -l %{htsuser} &> /dev/null || :
%preun
+%if %{with systemd}
%service_del_preun %{name}.service
+%else
+%stop_on_removal %{name}
+%endif
%postun
+%if %{with systemd}
%service_del_postun %{name}.service
+%else
+%restart_on_update %{name}
+%insserv_cleanup
+%endif
%files
%defattr(-,root,root)
+%doc CONTRIBUTING.md LICENSE.md
%{_bindir}/tvheadend
%{_datadir}/tvheadend
-%{_mandir}/man1/tvheadend.1.gz
+%{_mandir}/man1/tvheadend.1%{?ext_man}
+%if %{with systemd}
%{_unitdir}/%{name}.service
+%else
+%{_initddir}/%{name}
+%endif
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
+%{_sbindir}/%{name}_super
%{_sbindir}/rc%{name}
%changelog
-
Index: tvheadend-4.0.9.tar.gz
===================================================================
Binary file tvheadend-4.0.9.tar.gz (revision 2) added
Index: tvheadend-4.0_no-werror.patch
===================================================================
--- tvheadend-4.0_no-werror.patch (added)
+++ tvheadend-4.0_no-werror.patch (revision 2)
@@ -0,0 +1,13 @@
+--- Makefile.orig 2015-06-27 14:15:57.523222561 +0200
++++ Makefile 2015-06-27 14:16:38.689192884 +0200
+@@ -27,8 +27,8 @@ PROG := $(BUILDDIR)/tvheadend
+ # Common compiler flags
+ #
+
+-CFLAGS += -g -O2 -Wunused-result
+-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
++CFLAGS += -g -O2
++CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations
+ CFLAGS += -Wmissing-prototypes
+ CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing
+ CFLAGS += -D_FILE_OFFSET_BITS=64
Index: tvheadend-fix-misleading-indent.patch
===================================================================
--- tvheadend-fix-misleading-indent.patch (added)
+++ tvheadend-fix-misleading-indent.patch (revision 2)
@@ -0,0 +1,21 @@
+diff -Naur a/src/htsmsg.c b/src/htsmsg.c
+--- a/src/htsmsg.c 2016-03-14 04:10:57.000000000 -0500
++++ b/src/htsmsg.c 2016-09-26 16:51:51.367645274 -0500
+@@ -760,13 +760,15 @@
+ case HMF_MAP:
+ printf("MAP) = {\n");
+ htsmsg_print0(&f->hmf_msg, indent + 1);
+- for(i = 0; i < indent; i++) printf("\t"); printf("}\n");
++ for(i = 0; i < indent; i++) printf("\t");
++ printf("}\n");
+ break;
+
+ case HMF_LIST:
+ printf("LIST) = {\n");
+ htsmsg_print0(&f->hmf_msg, indent + 1);
+- for(i = 0; i < indent; i++) printf("\t"); printf("}\n");
++ for(i = 0; i < indent; i++) printf("\t");
++ printf("}\n");
+ break;
+
+ case HMF_STR:
Index: tvheadend.init
===================================================================
--- tvheadend.init (added)
+++ tvheadend.init (revision 2)
@@ -0,0 +1,136 @@
+#! /bin/sh
+# Copyright (c) 2015 Packman Team
+# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 1995-2004 SuSE Linux AG, Nuernberg, Germany.
+#
+#
+# Please submit bugfixes or comments via http://bugs.links2linux.org/
+#
+# init.d/tvheadend
+#
+# and symbolic its link
+#
+# /usr/sbin/rctvheadend
+#
+# System startup script for the tvheadend daemon
+#
+### BEGIN INIT INFO
+# Provides: tvheadend
+# Required-Start: $local_fs $remote_fs boot.udev
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start tvheadend daemon
+# Description: Start tvheadend daemon
+### END INIT INFO
+
+# Source SuSE config
+. /etc/rc.status
+
+TVHEADEND_PIDFILE=/var/run/tvheadend.pid
+
+TVHEADEND_BIN=/usr/bin/tvheadend
+test -x $TVHEADEND_BIN || { echo "$TVHEADEND_BIN not installed";
+ if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; }
+
+TVHEADEND_SYSCONFIG=/etc/sysconfig/tvheadend
+test -r $TVHEADEND_SYSCONFIG || { echo "$TVHEADEND_SYSCONFIG not existing";
+ if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; }
+. $TVHEADEND_SYSCONFIG
+
+# Configure command line options
+[ "$TVH_ENABLED" = "1" ] || exit 0
+
+TVHEADEND_ARGS="-f"
+[ -z "$TVH_USER" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -u $TVH_USER"
+[ -z "$TVH_GROUP" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -g $TVH_GROUP"
+[ -z "$TVH_CONF_DIR" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -c $TVH_CONF_DIR"
+[ -z "$TVH_ADAPTERS" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS -a $TVH_ADAPTERS"
+[ "$TVH_IPV6" = "1" ] && TVHEADEND_ARGS="$TVHEADEND_ARGS -6"
+[ -z "$TVH_HTTP_PORT" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS --http_port $TVH_HTTP_PORT"
+[ -z "$TVH_HTTP_ROOT" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS --http_root $TVH_HTTP_ROOT"
+[ -z "$TVH_HTSP_PORT" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS --htsp_port $TVH_HTSP_PORT"
+[ -z "$TVH_ARGS" ] || TVHEADEND_ARGS="$TVHEADEND_ARGS $TVH_ARGS"
+[ "$TVH_DEBUG" = "1" ] && TVHEADEND_ARGS="$TVHEADEND_ARGS -s"
+
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v ditto but be verbose in local rc status
+# rc_status -v -r ditto and clear the local rc status
+# rc_failed set local and overall rc status to failed
+# rc_reset clear local rc status (overall remains)
+# rc_exit exit appropriate to overall rc status
+
+# First reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0 - success
+# 1 - misc error
+# 2 - invalid or excess args
+# 3 - unimplemented feature (e.g. reload)
+# 4 - insufficient privilege
+# 5 - program not installed
+# 6 - program not configured
+#
+
+case "$1" in
+ start)
+ echo -n "Starting tvheadend daemon"
+ udevadm settle
+ /sbin/startproc -p $TVHEADEND_PIDFILE $TVHEADEND_BIN $TVHEADEND_ARGS
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down tvheadend daemon"
+ /sbin/killproc -p $TVHEADEND_PIDFILE -TERM $TVHEADEND_BIN
+ rm -f $TVHEADEND_PIDFILE
+ rc_status -v
+ ;;
+ try-restart|condrestart)
+ ## RH has a similar command named condrestart.
+ if test "$1" = "condrestart"; then
+ echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+ fi
+ $0 status
+ if test $? = 0; then
+ $0 restart
+ else
+ rc_reset # Not running is not a failure.
+ fi
+ rc_status
+ ;;
+ restart)
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ force-reload)
+ echo "Reload tvheadend daemon"
+ $0 try-restart
+ rc_status
+ ;;
+ reload)
+ # tvheadend does not support SIGHUP, so fail.
+ echo -n "Reload tvheadend daemon"
+ rc_failed 3
+ rc_status -v
+ ;;
+ status)
+ echo -n "Checking for tvheadend daemon: "
+ /sbin/checkproc -p $TVHEADEND_PIDFILE $TVHEADEND_BIN
+ rc_status -v
+ ;;
+ probe)
+ test $TVHEADEND_SYSCONFIG -nt $TVHEADEND_PIDFILE && echo restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ exit 1
+ ;;
+esac
+rc_exit
Index: tvheadend.rpmlintrc
===================================================================
--- tvheadend.rpmlintrc (added)
+++ tvheadend.rpmlintrc (revision 2)
@@ -0,0 +1,2 @@
+# this file is supposed to be empty
+addFilter("W: zero-length .*empty.css")
Index: tvheadend_super
===================================================================
--- tvheadend_super (added)
+++ tvheadend_super (revision 2)
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3.0 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# Copyright (C) 2016 Malcolm Lewis
+
+
+echo "Superuser setup for tvheadend"
+
+# Make sure only root can run
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root, exiting..." 1>&2
+ exit 1
+fi
+
+if (( $# != 2 )); then
+ echo "Usage: $0 " >&2
+ exit 1
+fi
+
+# The superuser file location and name
+SUPERUSER_FILE_LOCATION="/home/tvheadend/config"
+
+# Test to see if file exists and if exists ask to overwrite
+[ -f $SUPERUSER_FILE_LOCATION/superuser ] && { echo "Superuser file exists at '$SUPERUSER_FILE_LOCATION'.";
+read -p "Overwrite existing superuser file [yes]/[no]? "
+if [ "$REPLY" != "yes" ]; then
+ echo "Exiting, superuser file unchanged"
+ exit 1
+ else
+ echo "Updating superuser file"
+fi
+}
+
+# If new file, advise user it's being created
+[ ! -f $SUPERUSER_FILE_LOCATION/superuser ] && { echo "Creating new superuser file at '$SUPERUSER_FILE_LOCATION'."; }
+
+# Read in the username and password for superuser file
+TVHEADEND_SUPERUSER_NAME="$1"
+TVHEADEND_SUPERUSER_PASS="$2"
+
+# Create directory if it doesn't exist
+mkdir -p $SUPERUSER_FILE_LOCATION
+
+# Create superuser file with username and password
+cat << EOF > $SUPERUSER_FILE_LOCATION/superuser
+{
+"username": "$TVHEADEND_SUPERUSER_NAME",
+"password": "$TVHEADEND_SUPERUSER_PASS"
+}
+EOF
+
+#Set permissions and ownership
+chmod 0600 $SUPERUSER_FILE_LOCATION/superuser
+chown hts:video $SUPERUSER_FILE_LOCATION/superuser
+
+echo "Finished, superuser file updated, please logout of the"
+echo "Web UI and restart tvheadend service to apply changes!"
Index: tvheadend-4.0.8.tar.gz
===================================================================
Binary file tvheadend-4.0.8.tar.gz (revision 4) deleted
sleep_walker superseded request
superseded by 460707
Since we are not building anymore against <13.10 you could probably drop those conditionals and initscript...
good point
I agree. Also, did upstream change the headers of their web interface ? Otherwise, it's (unfortunately) still not suitable for Factory :(
for me multimedia:apps is good enough for now... what is the problem with headers?
Out of curiosity what did they put in the header?