diff --git a/debian/changelog b/debian/changelog index 7d844f1d..f10bba52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ -hts-tvheadend (current) hts; urgency=low +hts-tvheadend (2.1) hts; urgency=low + * Add debconf setup scripts to create a superuser account. + * HTSP server slightly modified. Now also supports the XBMC HTSP client. * tvheadend and showtime went separate ways. @@ -9,9 +11,9 @@ hts-tvheadend (current) hts; urgency=low * tvheadend: Fix characterset translation bug introduced in r1902. - -- Andreas Öman xxx, xx xxx xxxx xx:xx:xx +xxxx + -- Andreas Öman Thu, 28 May 2009 21:07:44 +0200 -hts (2.0) unstable; urgency=low +hts-tvheadend (2.0) unstable; urgency=low * showtime: New fully customable theme markup language. @@ -33,13 +35,13 @@ hts (2.0) unstable; urgency=low -- Andreas Öman Thu, 16 Oct 2008 19:47:23 +0200 -hts (1.4) unstable; urgency=low +hts-tvheadend (1.4) unstable; urgency=low * tvheadend: Add support for DVB-S (still in experimenal state) -- Andreas Öman Sat, 30 Mar 2008 18:00:00 +0100 -hts (1.3) unstable; urgency=low +hts-tvheadend (1.3) unstable; urgency=low * tvheadend: Add support for executing a post processing script after recording is completed. @@ -51,13 +53,13 @@ hts (1.3) unstable; urgency=low -- Andreas Öman Thu, 28 Mar 2008 18:00:00 +0100 -hts (1.2) unstable; urgency=low +hts-tvheadend (1.2) unstable; urgency=low * Tvheadend has been rewritten from scratch -- Andreas Öman Thu, 28 Feb 2008 17:30:00 +0100 -hts (1.1) unstable; urgency=low +hts-tvheadend (1.1) unstable; urgency=low * Bugfix: Tvheadend: Do not crash if event name is NULL @@ -73,7 +75,7 @@ hts (1.1) unstable; urgency=low -- Andreas Öman Sat, 24 Nov 2007 08:11:00 +0100 -hts (1.0) unstable; urgency=low +hts-tvheadend (1.0) unstable; urgency=low * Initial release diff --git a/debian/createcopyright.sh b/debian/copyright similarity index 57% rename from debian/createcopyright.sh rename to debian/copyright index e70edf4b..19466277 100644 --- a/debian/createcopyright.sh +++ b/debian/copyright @@ -1,12 +1,4 @@ -now=`date` -source=`svn info | grep "URL:" | sed "s/URL: //"` -rev=`svn info | grep "Revision:" | sed "s/Revision: //"` -cat <. - - - -The Debian packaging is (C) 2007, Andreas Öman and -is licensed under the GPL, see "/usr/share/common-licenses/GPL". - -EOF \ No newline at end of file diff --git a/debian/hts-tvheadend.config b/debian/hts-tvheadend.config new file mode 100644 index 00000000..cffd8a59 --- /dev/null +++ b/debian/hts-tvheadend.config @@ -0,0 +1,35 @@ +#!/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule +db_version 2.0 + +# This conf script is capable of backing up +db_capb backup + +STATE=1 +while [ "$STATE" != 0 -a "$STATE" != 4 ]; do + case "$STATE" in + 1) + # Ask for username + db_input high hts-tvheadend/admin_username || true + ;; + + 2) + # Ask for password + db_input high hts-tvheadend/admin_password || true + ;; + + 3) + # Display a final note + db_input high hts-tvheadend/webinterface || true + ;; + esac + + if db_go; then + STATE=$(($STATE + 1)) + else + STATE=$(($STATE - 1)) + fi +done + diff --git a/debian/hts-tvheadend.postinst b/debian/hts-tvheadend.postinst index 6324fcc0..168497cc 100644 --- a/debian/hts-tvheadend.postinst +++ b/debian/hts-tvheadend.postinst @@ -1,4 +1,4 @@ -#! /bin/sh -e +#!/bin/sh -e HTS_USER=hts @@ -9,14 +9,31 @@ case "$1" in configure) if ! getent passwd $HTS_USER >/dev/null; then - echo "Creating user: $HTS_USER..." + echo >&2 "Creating user: $HTS_USER..." adduser --quiet --system --group --shell /bin/bash $HTS_USER fi + + HTS_HOME=`getent passwd $HTS_USER | cut -d':' -f6` + + mkdir -p "${HTS_HOME}/.hts/tvheadend" + + HTS_SUPERUSERCONF="${HTS_HOME}/.hts/tvheadend/superuser" + rm -f "${HTS_SUPERUSERCONF}" + touch "${HTS_SUPERUSERCONF}" + chmod 600 "${HTS_SUPERUSERCONF}" + + echo >>"${HTS_SUPERUSERCONF}" "{" + + if db_get hts-tvheadend/admin_username; then + echo >>"${HTS_SUPERUSERCONF}" '"username": "'$RET'",' + fi + + if db_get hts-tvheadend/admin_password; then + echo >>"${HTS_SUPERUSERCONF}" '"password": "'$RET'"' + fi + + echo >>"${HTS_SUPERUSERCONF}" "}" ;; -*) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; esac db_stop diff --git a/debian/hts-tvheadend.templates b/debian/hts-tvheadend.templates new file mode 100644 index 00000000..79ffea26 --- /dev/null +++ b/debian/hts-tvheadend.templates @@ -0,0 +1,17 @@ +Template: hts-tvheadend/admin_username +Type: string +Description: Choose a username for Tvheadend administrator. + Tvheadend is accessed via a world reachable web interface (assuming your + host is reachable from the internet). To protect from malicious use you + must create an initial account to be able to login to Tvheadend. + This account can not be changed nor deleted from within Tvheadend itself. + If you want to change the superuser account you need to reconfigure the + Tvheadend package. + +Template: hts-tvheadend/admin_password +Type: password +Description: Administrator password. + +Template: hts-tvheadend/webinterface +Type: note +Description: After installation Tvheadend can be accessed via HTTP on port 9981. From this machine you can point your web-browser to http://localhost:9981/ diff --git a/debian/rules b/debian/rules index 6588de67..ac4a519a 100755 --- a/debian/rules +++ b/debian/rules @@ -14,7 +14,7 @@ clean: build: config.mak - make + $(MAKE) binary: dh_testdir @@ -25,6 +25,7 @@ binary: dh_installchangelogs dh_installinit --name tvheadend dh_installdocs + dh_installdebconf dh_link dh_strip dh_compress