[Pkg-freevo-maint] r64 - packages/freevo/trunk/debian
mennucc1 at alioth.debian.org
mennucc1 at alioth.debian.org
Sun Jan 20 22:56:13 UTC 2008
Author: mennucc1
Date: 2008-01-20 22:56:12 +0000 (Sun, 20 Jan 2008)
New Revision: 64
Added:
packages/freevo/trunk/debian/freevo.freevo_rssserver.init
packages/freevo/trunk/debian/freevo.template.init
packages/freevo/trunk/debian/freevo.wrapper
Removed:
packages/freevo/trunk/debian/freevo.dirs
Modified:
packages/freevo/trunk/debian/freevo.config
packages/freevo/trunk/debian/freevo.default
packages/freevo/trunk/debian/freevo.freevo_recordserver.init
packages/freevo/trunk/debian/freevo.freevo_webserver.init
packages/freevo/trunk/debian/freevo.freevo_xserver.init
packages/freevo/trunk/debian/freevo.postinst
packages/freevo/trunk/debian/freevo.postrm
packages/freevo/trunk/debian/freevo.templates
packages/freevo/trunk/debian/rules
Log:
Add a debconf question re: the services to start at boot.
Add the rssserver and encodingserver.
Add a template for all services (but xserver, that is somewhat
different).
Save some debconf related shell vars in /etc/freevo/debconf.sh
(in particular those related to (not)starting services)
All stuff in /home/freevo will be writable by group freevo.
Wrap freevo : /usr/bin/freevo is a shell script that
-) if the user is in group freevo, switches to the freevo group
-) otherwise, it may not use the shared cache and logs :
put them in ~/.freevo
Most script unset a family of env variables that freevo may use,
and then import /etc/freevo/debconf.sh and /etc/default/freevo
to import the correct values (if any).
debian/freevo.templates : do not translate choices
Modified: packages/freevo/trunk/debian/freevo.config
===================================================================
--- packages/freevo/trunk/debian/freevo.config 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.config 2008-01-20 22:56:12 UTC (rev 64)
@@ -12,7 +12,9 @@
db_input high freevo/norm || true
db_input high freevo/chanlist || true
;;
- 2) db_input high freevo/start_on_boot || true ;;
+ 2) db_input high freevo/start_on_boot || true
+ db_input high freevo/services || true
+ ;;
3) db_input low freevo/title_video || true
db_input low freevo/path_to_video || true
;;
Modified: packages/freevo/trunk/debian/freevo.default
===================================================================
--- packages/freevo/trunk/debian/freevo.default 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.default 2008-01-20 22:56:12 UTC (rev 64)
@@ -1,12 +1,32 @@
# Defaults for freevo initscript
# sourced by /etc/init.d/freevo
+#######
+# If you change this you should run "dpkg-reconfigure freevo"
+# and know what you are doing
+
+# Cache dir. Warning: it will be 'rm -rf' on package purge
+export FREEVO_CACHEDIR=/home/freevo/cache
+
+export FREEVO_LOGDIR=/home/freevo/log
+
+
+########
+
+# If you set any of the following, it will override /etc/freevo/debconf.sh
+# (in case you do not like debconf....)
+
# Don't use it by default
-START_FREEVO=0
+#START_FREEVO_XSERVER=0
# Set to 1 to start the record server
-START_FREEVO_RECORDSERVER=0
+#START_FREEVO_RECORDSERVER=0
+# Set to 1 to start the encoding server
+#START_FREEVO_ENCODINGSERVER=0
+
# Set to 1 to start the web server throught init
# You may use plugin.activate('www') in local_config.py instead
-START_FREEVO_WEBSERVER=0
+#START_FREEVO_WEBSERVER=0
+
+#START_FREEVO_RSSSERVER=0
Deleted: packages/freevo/trunk/debian/freevo.dirs
===================================================================
--- packages/freevo/trunk/debian/freevo.dirs 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.dirs 2008-01-20 22:56:12 UTC (rev 64)
@@ -1 +0,0 @@
-var/cache/freevo
Modified: packages/freevo/trunk/debian/freevo.freevo_recordserver.init
===================================================================
--- packages/freevo/trunk/debian/freevo.freevo_recordserver.init 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.freevo_recordserver.init 2008-01-20 22:56:12 UTC (rev 64)
@@ -7,27 +7,33 @@
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: Starts the Freevo Home Theatre PC Platform Rercordserver
+# Short-Description: Starts the Freevo Home Theatre PC Platform Recordserver
# Description:
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/bin/freevo
-NAME=freevo-recordserver
+DAEMON=/usr/bin/freevo.real
test -x $DAEMON || exit
if [ `id -u` = 0 ] ; then
#echo switching to freevo user
- exec su -l freevo -c "$0 $@"
+ exec su freevo -c "$0 $@"
fi
. /lib/lsb/init-functions
+#These variables affect how freevo works, if you want to really set
+# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
# Default is to start nothing
START_FREEVO_RECORDSERVER=0
+test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
+
test -r /etc/default/freevo && . /etc/default/freevo
+
test "$START_FREEVO_RECORDSERVER" = 1 || exit 0
test -x $DAEMON || exit 0
@@ -66,8 +72,7 @@
restart_freevo_recordserver
;;
*)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
Added: packages/freevo/trunk/debian/freevo.freevo_rssserver.init
===================================================================
--- packages/freevo/trunk/debian/freevo.freevo_rssserver.init (rev 0)
+++ packages/freevo/trunk/debian/freevo.freevo_rssserver.init 2008-01-20 22:56:12 UTC (rev 64)
@@ -0,0 +1,84 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: freevo-rssserver
+# Required-Start: rmnologin
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts the Freevo Home Theatre PC Platform rssserver
+# Description:
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/freevo.real
+
+test -x $DAEMON || exit
+
+if [ `id -u` = 0 ] ; then
+ #echo switching to freevo user
+ exec su freevo -c "$0 $@"
+fi
+
+. /lib/lsb/init-functions
+
+#These variables affect how freevo works, if you want to really set
+# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
+# Default is to start nothing
+START_FREEVO_RSSSERVER=0
+
+test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
+
+test -r /etc/default/freevo && . /etc/default/freevo
+
+test "$START_FREEVO_RSSSERVER" = 1 || exit 0
+
+test -x $DAEMON || exit 0
+
+test "${NOMOUSE}" = "true" && export SDL_NOMOUSE=true
+
+
+start_freevo_rssserver() {
+ log_action_msg "Starting Freevo Home Theatre PC Platform (rssserver)"
+ $DAEMON rssserver start
+ log_action_end_msg $?
+}
+
+stop_freevo_rssserver() {
+ log_action_msg "Stopping Freevo Home Theatre PC Platform (rssserver)"
+ $DAEMON rssserver stop
+ log_action_end_msg $?
+}
+
+restart_freevo() {
+ log_action_msg "Restarting Freevo Home Theatre PC Platform (rssserver)"
+ $DAEMON rssserver stop
+ sleep 5
+ $DAEMON rssserver start
+ log_action_end_msg $?
+}
+
+
+case "$1" in
+ start)
+ start_freevo_rssserver
+ ;;
+ stop)
+ stop_freevo_rssserver
+ ;;
+ restart|force-reload)
+ restart_freevo_rssserver
+ ;;
+ reload)
+ #FIXME doing nothing
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Modified: packages/freevo/trunk/debian/freevo.freevo_webserver.init
===================================================================
--- packages/freevo/trunk/debian/freevo.freevo_webserver.init 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.freevo_webserver.init 2008-01-20 22:56:12 UTC (rev 64)
@@ -7,27 +7,34 @@
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: Starts the Freevo Home Theatre PC Platform Rercordserver
+# Short-Description: Starts the Freevo Home Theatre PC Platform webserver
# Description:
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/bin/freevo
+DAEMON=/usr/bin/freevo.real
NAME=freevo-webserver
test -x $DAEMON || exit
if [ `id -u` = 0 ] ; then
#echo switching to freevo user
- exec su -l freevo -c "$0 $@"
+ exec su freevo -c "$0 $@"
fi
. /lib/lsb/init-functions
+#These variables affect how freevo works, if you want to really set
+# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
# Default is to start nothing
START_FREEVO_WEBSERVER=0
+test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
+
test -r /etc/default/freevo && . /etc/default/freevo
+
test "$START_FREEVO_WEBSERVER" = 1 || exit 0
test -x $DAEMON || exit 0
@@ -66,8 +73,7 @@
restart_freevo_webserver
;;
*)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
Modified: packages/freevo/trunk/debian/freevo.freevo_xserver.init
===================================================================
--- packages/freevo/trunk/debian/freevo.freevo_xserver.init 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.freevo_xserver.init 2008-01-20 22:56:12 UTC (rev 64)
@@ -13,24 +13,30 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/bin/freevo
-NAME=freevo
+DAEMON=/usr/bin/freevo.real
test -x $DAEMON || exit
if [ `id -u` = 0 ] ; then
#echo switching to freevo user
- exec su -l freevo -c "$0 $@"
+ exec su freevo -c "$0 $@"
fi
. /lib/lsb/init-functions
+#These variables affect how freevo works, if you want to really set
+# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
# Default is to start nothing
-START_FREEVO=0
+START_FREEVO_XSERVER=0
+test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
+
test -r /etc/default/freevo && . /etc/default/freevo
-test "$START_FREEVO" = 1 || exit 0
+test "$START_FREEVO_XSERVER" = 1 || exit 0
+
test -x $DAEMON || exit 0
test "${NOMOUSE}" = "true" && export SDL_NOMOUSE=true
@@ -38,11 +44,13 @@
startx_freevo() {
[ -d $HOME/log ] || mkdir $HOME/log
[ -f $HOME/log/Xfreevo.log ] && mv $HOME/log/Xfreevo.log{,~}
- (
- exec >> $HOME/log/Xfreevo.log
- exec 2>> $HOME/log/Xfreevo.log
+
+ # TODO if I redirect, this process is not attached to the console,
+ # and then X refuses to start (in Debian standard Xorg config)
+ #( exec >> $HOME/log/Xfreevo.log
+ # exec 2>> $HOME/log/Xfreevo.log
startx $DAEMON -- :1 vt9 -quiet
- ) &
+ #) &
}
start_freevo() {
@@ -80,8 +88,7 @@
#FIXME doing nothing
;;
*)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
Modified: packages/freevo/trunk/debian/freevo.postinst
===================================================================
--- packages/freevo/trunk/debian/freevo.postinst 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.postinst 2008-01-20 22:56:12 UTC (rev 64)
@@ -1,10 +1,15 @@
#!/bin/sh -e
+DAEMON=/usr/bin/freevo
+
action="$1"
-FREEVO_CONF=/etc/freevo/freevo.conf
-LOCAL_CONF=/etc/freevo/local_conf.py
-CACHE=/var/cache/freevo
+#These variables affect how freevo works, if you want to really set
+# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
+. /etc/default/freevo
+
. /usr/share/debconf/confmodule
db_version 2.0
@@ -17,7 +22,7 @@
norm="$RET"
db_get freevo/chanlist
chanlist="$RET"
- freevo setup --geometry="$geometry" \
+ $DAEMON.real setup --geometry="$geometry" \
--display="$display" \
--tv="$norm" \
--chanlist="$chanlist" \
@@ -29,20 +34,27 @@
echo "Creating $2 directory $1 for freevo" 1>&2
mkdir --parents "$1"
#these two may fail if the dir is in a VFAT mount
- chown freevo.freevo "$1" || true
- chmod 755 "$1" || true
+ chown freevo:freevo "$1" || true
+ chmod 775 "$1" || true
else
if test ! -d "$1" ; then
echo "WARNING: freevo $2 directory should be $1 , " 1>&2
echo " but this latter exists and is not a directory - freevo will malfunction" 1>&2
else
: #TODO may check permissions and ownership
+ : # maybe using find "$1" -maxdepth 0 -printf '%u' | grep -qx freevo
fi
fi
+ su freevo -c "touch \"$1\"/.placeholder" || {
+ echo "WARNING: 'freevo' user cannot create files in $2 directory $1 , " 1>&2
+ echo " freevo will malfunction " 1>&2 ; }
}
write_local_conf() {
+ create_dir $FREEVO_CACHEDIR cache
+ create_dir $FREEVO_LOGDIR log
+
db_get freevo/title_video
title_video="$RET"
db_get freevo/path_to_video
@@ -67,7 +79,7 @@
uid=`id -u freevo`
gid=`id -g freevo`
- uidgid () { echo "${1}_UID = $uid" ; echo "${1}_GID = $gid" ; }
+ uidgid () { echo "${1}_UID=$uid" ; echo "${1}_GID=$gid" ; }
(
exec > /etc/freevo/debconf.py
echo '#This file is automatically generated by the freevo Debian package'
@@ -86,14 +98,33 @@
uidgid FREEVO
)
+ db_get freevo/services
+ services=",$RET ,"
+
+ (
+ exec > /etc/freevo/debconf.sh
+ echo '#This file is automatically generated by the freevo Debian package'
+ echo '#To change these values, run "dpkg-reconfigure freevo"'
+ echo '#To override or add to these values, edit /etc/default/freevo'
+ uidgid FREEVO
+ for s in xserver recordserver encodingserver webserver rssserver ; do
+ S=`echo $s | tr 'a-z' 'A-Z'`
+ case "$services" in
+ *$s*) echo "START_FREEVO_${S}=1" ;;
+ *) echo "START_FREEVO_${S}=0" ;;
+ esac
+ done
+ )
+
+ LOCAL_CONF=/etc/freevo/local_conf.py
[ -r $LOCAL_CONF ] || cp $LOCAL_CONF.example $LOCAL_CONF
}
freevo_cache() {
- freevo cache
- find $CACHE -type f -print0 | xargs -0 chmod 0666
- find $CACHE -type d -print0 | xargs -0 chmod 0777
+ su freevo -c '$DAEMON.real cache'
+ find $FREEVO_CACHEDIR -type f -print0 | xargs -0 chmod 0664
+ find $FREEVO_CACHEDIR -type d -print0 | xargs -0 chmod 0775
}
case "$1" in
@@ -109,12 +140,13 @@
adduser --ingroup freevo --quiet --home /home/freevo \
--disabled-login --system freevo
fi
+ for a in cdrom audio plugdev ; do
+ adduser --quiet freevo $a
+ done
write_freevo_conf
write_local_conf
- create_dir /var/cache/freevo/vfs
-
;;
abort-upgrade) ;;
*)
Modified: packages/freevo/trunk/debian/freevo.postrm
===================================================================
--- packages/freevo/trunk/debian/freevo.postrm 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.postrm 2008-01-20 22:56:12 UTC (rev 64)
@@ -1,18 +1,16 @@
#!/bin/sh -e
-FREEVO=/etc/freevo
-LOCAL_CONF=/etc/freevo/local_conf.py
-CACHE=/var/cache/freevo
+. /etc/default/freevo
case "$1" in
upgrade|failed-upgrade|abort-upgrade|disappear|remove)
;;
purge|abort-install)
- if [ -d $FREEVO ] ; then
- rm -rf $FREEVO;
+ if [ "$FREEVO_CACHEDIR" -a -d "$FREEVO_CACHEDIR" ] ; then
+ su freevo -c "rm -rf \"$FREEVO_CACHEDIR\""
fi
- if [ -d $CACHE ] ; then
- rm -rf $CACHE;
+ if [ -d /etc/freevo ] ; then
+ rm -rf /etc/freevo
fi
;;
*)
Added: packages/freevo/trunk/debian/freevo.template.init
===================================================================
--- packages/freevo/trunk/debian/freevo.template.init (rev 0)
+++ packages/freevo/trunk/debian/freevo.template.init 2008-01-20 22:56:12 UTC (rev 64)
@@ -0,0 +1,84 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: freevo- at service@
+# Required-Start: rmnologin
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts the Freevo Home Theatre PC Platform @service@
+# Description:
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/freevo.real
+
+test -x $DAEMON || exit
+
+if [ `id -u` = 0 ] ; then
+ #echo switching to freevo user
+ exec su freevo -c "$0 $@"
+fi
+
+. /lib/lsb/init-functions
+
+#These variables affect how freevo works, if you want to really set
+# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
+# Default is to start nothing
+START_FREEVO_ at SERVICE@=0
+
+test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
+
+test -r /etc/default/freevo && . /etc/default/freevo
+
+test "$START_FREEVO_ at SERVICE@" = 1 || exit 0
+
+test -x $DAEMON || exit 0
+
+test "${NOMOUSE}" = "true" && export SDL_NOMOUSE=true
+
+
+start_freevo_ at service@() {
+ log_action_msg "Starting Freevo Home Theatre PC Platform (@service@)"
+ $DAEMON @service@ start
+ log_action_end_msg $?
+}
+
+stop_freevo_ at service@() {
+ log_action_msg "Stopping Freevo Home Theatre PC Platform (@service@)"
+ $DAEMON @service@ stop
+ log_action_end_msg $?
+}
+
+restart_freevo() {
+ log_action_msg "Restarting Freevo Home Theatre PC Platform (@service@)"
+ $DAEMON @service@ stop
+ sleep 5
+ $DAEMON @service@ start
+ log_action_end_msg $?
+}
+
+
+case "$1" in
+ start)
+ start_freevo_ at service@
+ ;;
+ stop)
+ stop_freevo_ at service@
+ ;;
+ restart|force-reload)
+ restart_freevo_ at service@
+ ;;
+ reload)
+ #FIXME doing nothing
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Modified: packages/freevo/trunk/debian/freevo.templates
===================================================================
--- packages/freevo/trunk/debian/freevo.templates 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/freevo.templates 2008-01-20 22:56:12 UTC (rev 64)
@@ -1,25 +1,25 @@
Template: freevo/display
Type: select
-_Choices: x11, fbdev, dxr3, mga, directfb, dfbmga, dga
+Choices: x11, fbdev, dxr3, mga, directfb, dfbmga, dga
_Description: Video output:
Template: freevo/geometry
Type: select
-_Choices: 800x600, 768x576, 640x480
+Choices: 800x600, 768x576, 640x480
_Description: Output resolution:
Choose the resolution to display Freevo at. Most Televisions should be
configured as 768x576 (NTSC or PAL)
Template: freevo/norm
Type: select
-_Choices: ntsc, pal, secam
+Choices: ntsc, pal, secam
_Description: TV Standard:
Please choose your TV standard. North Americans should choose NTSC, most
Europeans will choose PAL.
Template: freevo/chanlist
Type: select
-_Choices: us-bcast, us-cable, us-cable-hrc, japan-bcast, japan-cable, europe-west, europe-east, italy, newzealand, australia, ireland, france, china-bcast, southafrica, argentina
+Choices: us-bcast, us-cable, us-cable-hrc, japan-bcast, japan-cable, europe-west, europe-east, italy, newzealand, australia, ireland, france, china-bcast, southafrica, argentina
_Description: Channel List:
Set the channel list (set of tuning frequencies) that most closely matches
yours.
@@ -69,5 +69,11 @@
Template: freevo/start_on_boot
Type: note
_Description: Start during boot
- Freevo can be started as a daemon using init scripts. Also web and record server can start automatically on bootup.
- If you wish this change the entries into /etc/default/freevo.
+ Freevo can be started automatically at boot time (inside a dedicated xserver). Also web, encoding, rss and record server can be start automatically on bootup.
+
+Template: freevo/services
+Type: multiselect
+Choices: xserver, recordserver, encodingserver, webserver, rssserver
+Default: xserver, recordserver, encodingserver
+_Description: Services to start during boot
+ Choose the services you wish to start on boot.
Added: packages/freevo/trunk/debian/freevo.wrapper
===================================================================
--- packages/freevo/trunk/debian/freevo.wrapper (rev 0)
+++ packages/freevo/trunk/debian/freevo.wrapper 2008-01-20 22:56:12 UTC (rev 64)
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+
+DAEMON=/usr/bin/freevo
+
+U=`id -u`
+G=`id -g`
+
+if test "$G" = 0 -o $U = 0 ; then
+ echo "It is advisable not to start freevo as root, due to security concerns." 1>&2
+fi
+
+unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
+
+test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
+
+test -r /etc/default/freevo && . /etc/default/freevo
+
+if test "$G" = "$FREEVO_GID" -o "$U" = "$FREEVO_UID" ; then
+ exec $DAEMON.real "$@"
+fi
+
+for i in `id -G` ; do
+ if test "$i" = "$FREEVO_GID" ; then
+ #starting with principal group 'freevo'
+ exec sg freevo -c "$DAEMON.real $@"
+ fi
+done
+
+echo "You are not part of the group 'freevo' , this will limit your ability to access some resources" 1>&2
+
+
+export FREEVO_CACHEDIR=$HOME/.freevo/cache
+export FREEVO_LOGDIR=$HOME/.freevo/log
+export FREEVO_STATIC=$HOME/.freevo/static
+
+test -r ~/.freevo/user.rc && . ~/.freevo/user.rc
+
+for d in $FREEVO_LOGDIR $FREEVO_CACHEDIR $FREEVO_STATICDIR ; do
+ [ -d "$d" ] || mkdir -v --parents "$d"
+done
+
+exec $DAEMON.real "$@"
+
Modified: packages/freevo/trunk/debian/rules
===================================================================
--- packages/freevo/trunk/debian/rules 2008-01-20 08:58:57 UTC (rev 63)
+++ packages/freevo/trunk/debian/rules 2008-01-20 22:56:12 UTC (rev 64)
@@ -41,9 +41,14 @@
mv $(CURDIR)/TODO \
$(CURDIR)/debian/freevo-doc/usr/share/doc/freevo
+ mv $(CURDIR)/debian/tmp/usr/bin/freevo $(CURDIR)/debian/tmp/usr/bin/freevo.real
+ install $(CURDIR)/debian/freevo.wrapper $(CURDIR)/debian/tmp/usr/bin/freevo
+
dh_installinit -pfreevo --no-start --name=freevo_xserver
dh_installinit -pfreevo --no-start --name=freevo_recordserver
+ dh_installinit -pfreevo --no-start --name=freevo_encodingserver
dh_installinit -pfreevo --no-start --name=freevo_webserver
+ dh_installinit -pfreevo --no-start --name=freevo_rssserver
$(patsubst %,install/%,$(DEB_PACKAGES)) ::
if [ -e debian/$(cdbs_curpkg).linda-overrides ] ; then \
More information about the Pkg-freevo-maint
mailing list