[Pkg-freevo-maint] r60 - in packages/freevo/trunk/debian: . patches
mennucc1 at alioth.debian.org
mennucc1 at alioth.debian.org
Sat Jan 19 18:15:38 UTC 2008
Author: mennucc1
Date: 2008-01-19 18:15:38 +0000 (Sat, 19 Jan 2008)
New Revision: 60
Added:
packages/freevo/trunk/debian/patches/config_py.diff
packages/freevo/trunk/debian/patches/freevo_config_py_remarks.diff
packages/freevo/trunk/debian/patches/local_conf_py_example_remarks.diff
packages/freevo/trunk/debian/patches/source_etc_freevo_debconf_py.diff
Modified:
packages/freevo/trunk/debian/control
packages/freevo/trunk/debian/freevo.postinst
packages/freevo/trunk/debian/freevo.postrm
packages/freevo/trunk/debian/freevo.templates
packages/freevo/trunk/debian/patches/series
Log:
All variables that are configured using debconf are stored in /etc/freevo/debconf.py
This file is sourced after freevo_config.py and before local_conf.py ,
so users and sysadmins can (re)configure stuff freely.
This way we do not need to 'sed' into local_conf.py
(and to use ucf).
And, btw, there is no point in asking the title of the recordings dir
in debconf - there is no such variable in freevo_config.py
Modified: packages/freevo/trunk/debian/control
===================================================================
--- packages/freevo/trunk/debian/control 2008-01-19 17:24:37 UTC (rev 59)
+++ packages/freevo/trunk/debian/control 2008-01-19 18:15:38 UTC (rev 60)
@@ -22,7 +22,7 @@
Package: freevo
Architecture: all
XB-Python-Version: ${python:Versions}
-Depends: ${python:Depends}, python-freevo (= ${binary:Version}), freevo-data (= ${binary:Version}), ucf (>= 0.30), mplayer-nogui | mplayer | mplayer-386 | player-586 | mplayer-686 | mplayer-k7 , lsdvd, xmltv-util, libxmltv-perl
+Depends: ${python:Depends}, python-freevo (= ${binary:Version}), freevo-data (= ${binary:Version}), mplayer-nogui | mplayer | mplayer-386 | player-586 | mplayer-686 | mplayer-k7 , lsdvd, xmltv-util, libxmltv-perl
Recommends: lame, cdparanoia, msttcorefonts, xine-ui, fbxine
Suggests: flac, vorbis-tools, fbset, matrox-tools
Description: A Python based PVR/DVR Framework for Music and Movies
Modified: packages/freevo/trunk/debian/freevo.postinst
===================================================================
--- packages/freevo/trunk/debian/freevo.postinst 2008-01-19 17:24:37 UTC (rev 59)
+++ packages/freevo/trunk/debian/freevo.postinst 2008-01-19 18:15:38 UTC (rev 60)
@@ -61,21 +61,21 @@
path_to_image="$RET"
create_dir "$RET" image
- db_get freevo/title_recordings
- title_recordings="$RET"
db_get freevo/path_to_recordings
path_to_recordings="$RET"
create_dir "$RET" recordings
- #FIXME this latter does not work , and ignores path_to_rcordings
- cat $LOCAL_CONF.example | \
- sed -r -e "/^#.*files\/movies\/comedy'\) ]/ a\VIDEO_ITEMS = [ ('$title_video', '$path_to_video') ]" \
- -e "/^#.*fxd\/webradio.fxd' ]/ a\AUDIO_ITEMS = [ ('$title_audio', '$path_to_audio') ]" \
- -e "/^# IMAGE_ITEMS = None/ a\IMAGE_ITEMS = [ ('$title_image', '$path_to_image') ]" \
- > $LOCAL_CONF.temp
- ucf $LOCAL_CONF.temp $LOCAL_CONF
- ucfr freevo $LOCAL_CONF
- rm -f $LOCAL_CONF.temp
+ (
+ exec > /etc/freevo/debconf.py
+ 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/freevo/local_conf.py'
+ echo "VIDEO_ITEMS = [ ('$title_video', '$path_to_video') ]"
+ echo "AUDIO_ITEMS = [ ('$title_audio', '$path_to_audio') ]"
+ echo "IMAGE_ITEMS = [ ('$title_image', '$path_to_image') ]"
+ echo "TV_RECORD_DIR = '$path_to_recordings'"
+ )
+ [ -r $LOCAL_CONF ] || cp $LOCAL_CONF.example $LOCAL_CONF
}
freevo_cache() {
Modified: packages/freevo/trunk/debian/freevo.postrm
===================================================================
--- packages/freevo/trunk/debian/freevo.postrm 2008-01-19 17:24:37 UTC (rev 59)
+++ packages/freevo/trunk/debian/freevo.postrm 2008-01-19 18:15:38 UTC (rev 60)
@@ -11,12 +11,6 @@
if [ -d $FREEVO ] ; then
rm -rf $FREEVO;
fi
- if which ucf >/dev/null; then
- ucf --purge $LOCAL_CONF
- fi
- if which ucfr >/dev/null; then
- ucfr --purge freevo $LOCAL_CONF
- fi
if [ -d $CACHE ] ; then
rm -rf $CACHE;
fi
Modified: packages/freevo/trunk/debian/freevo.templates
===================================================================
--- packages/freevo/trunk/debian/freevo.templates 2008-01-19 17:24:37 UTC (rev 59)
+++ packages/freevo/trunk/debian/freevo.templates 2008-01-19 18:15:38 UTC (rev 60)
@@ -60,12 +60,6 @@
_Description: Path to image folder:
Set the path to the image folder. Note: A absolute path is required.
-Template: freevo/title_recordings
-Type: string
-_Default: Recordings folder
-_Description: Title of recorded video folder:
- Set a title for the recordings folder. This will displayed by freevo in overview.
-
Template: freevo/path_to_recordings
Default: /home/freevo/recordings
Type: string
Added: packages/freevo/trunk/debian/patches/config_py.diff
===================================================================
--- packages/freevo/trunk/debian/patches/config_py.diff (rev 0)
+++ packages/freevo/trunk/debian/patches/config_py.diff 2008-01-19 18:15:38 UTC (rev 60)
@@ -0,0 +1,42 @@
+--- freevo-1.8.0~rc1/src/config.py.orig 2007-12-10 17:33:43.000000000 +0100
++++ freevo-1.8.0~rc1/src/config.py 2008-01-19 18:42:24.000000000 +0100
+@@ -275,10 +275,11 @@
+ print 'about the parameter. Based on the information in that file, Freevo will guess'
+ print 'some settings for your system. This takes place in a file called '
+ print '\'freevo_config.py\'. Since this file may change from time to time, you should'
+- print 'not edit this file. After freevo_config.py is loaded, Freevo will look for a file'
++ print 'not edit this file. After freevo_config.py is loaded, Freevo will '
++ print 'load the Debian specific /etc/freevo/debconf.py, and then it will look for a file'
+ print 'called \'local_conf.py\'. You can overwrite the variables from \'freevo_config.py\''
+ print 'in here. There is an example for \'local_conf.py\' called \'local_conf.py.example\''
+- print 'in the Freevo distribution.'
++ print 'in /etc/freevo '
+ print
+ print 'If you need more help, use the internal webserver to get more information'
+ print 'how to setup Freevo. To do this, you need to set'
+@@ -478,9 +479,9 @@
+ #
+ # Config file handling
+ #
+-cfgfilepath = ['.', os.path.expanduser('~/.freevo'), '/etc/freevo',
+- '/usr/local/etc/freevo']
+-
++# Debian change : '.' may lead to unpredictable behaviours,
++# '/usr/local/etc/freevo' is redundant
++cfgfilepath = [ os.path.expanduser('~/.freevo'), '/etc/freevo']
+
+ #
+ # Default settings
+@@ -608,6 +609,12 @@
+ print
+ sys.exit(1)
+
++#Debian specific /etc/freevo/debconf.py file, to read configurations
++# as entered at install time using the debconf interface
++overridefile = '/etc/freevo/debconf.py'
++if os.path.isfile(overridefile):
++ _debug_('Loading debconf configuration file "%s"' % overridefile, DINFO)
++ execfile(overridefile, globals(), locals())
+
+ #
+ # Search for local_conf.py:
Added: packages/freevo/trunk/debian/patches/freevo_config_py_remarks.diff
===================================================================
--- packages/freevo/trunk/debian/patches/freevo_config_py_remarks.diff (rev 0)
+++ packages/freevo/trunk/debian/patches/freevo_config_py_remarks.diff 2008-01-19 18:15:38 UTC (rev 60)
@@ -0,0 +1,49 @@
+--- freevo/freevo_config.py.orig 2008-01-19 17:52:57.000000000 +0100
++++ freevo/freevo_config.py 2008-01-19 18:06:32.000000000 +0100
+@@ -31,6 +31,13 @@
+ # the format "MAJOR.MINOR", e.g. "2.3". The version number reflects the
+ # config file format, *not* the Freevo version number.
+ #
++
++# Debian specific note:
++# the file /etc/freevo/debconf.py is loaded after freevo_config.py
++# and before local_conf.py . It imports the variables
++# VIDEO_ITEMS AUDIO_ITEMS IMAGE_ITEMS TV_RECORD_DIR
++# overriding the values here (that are 'None')
++
+ # 4) local_conf.py is searched for in ['$cwd/', '~/.freevo',
+ # '/etc/freevo/', $freevo-bindir/]. The first one found is loaded. It is
+ # not a required file. The search is independent of where freevo.conf was
+@@ -1003,6 +1010,7 @@
+ # Directory myserver:/files/server-stuff will show the item for the
+ # directory /files/server-stuff if the computer myserver is alive.
+ #
++# WARNING: see Debian specific note at beginning of this file
+ VIDEO_ITEMS = None
+
+ #
+@@ -1079,6 +1087,7 @@
+ #
+ # To add webradio support, add fxd/webradio.fxd to this list
+ #
++#WARNING: see Debian specific note at beginning of this file
+ AUDIO_ITEMS = None
+
+ #
+@@ -1122,6 +1131,7 @@
+ # This is a list of items (e.g. directories, fxd files). The items itself
+ # can also be a list of (title, file)
+ #
++#WARNING: see Debian specific note at beginning of this file
+ IMAGE_ITEMS = None
+
+ #
+@@ -1629,6 +1639,8 @@
+ # This is where recorded video is written.
+ #
+ # XXX the path doesn't work from the www cgi scripts!
++#
++#WARNING: see Debian specific note at beginning of this file
+ TV_RECORD_DIR = None
+
+ # This will enable duplicate recording detection
Added: packages/freevo/trunk/debian/patches/local_conf_py_example_remarks.diff
===================================================================
--- packages/freevo/trunk/debian/patches/local_conf_py_example_remarks.diff (rev 0)
+++ packages/freevo/trunk/debian/patches/local_conf_py_example_remarks.diff 2008-01-19 18:15:38 UTC (rev 60)
@@ -0,0 +1,56 @@
+--- freevo/local_conf.py.example.orig 2008-01-19 17:58:03.000000000 +0100
++++ freevo/local_conf.py.example 2008-01-19 18:09:27.000000000 +0100
+@@ -10,7 +10,15 @@
+ # freevo_config.py. freevo_config.py, which is usually installed in
+ # /usr/share/freevo, contains all the core settings. To change the settings copy
+ # this file to ~/.freevo/local_conf.py or /etc/freevo/local_conf.py
+-#
++#
++
++# Debian specific note:
++# the file /etc/freevo/debconf.py is loaded after freevo_config.py
++# and before local_conf.py . It imports the variables
++# VIDEO_ITEMS AUDIO_ITEMS IMAGE_ITEMS TV_RECORD_DIR
++# as are set using the debconf.
++# Those variables may then be augmented here, by using the += operator.
++
+ # It does not contain all the possible settings that you can change, see
+ # freevo_config.py for all the possible settings. Also it does not contain
+ # settings for the plug-ins, plug-ins contain their configuration information and
+@@ -627,6 +635,8 @@
+ # This is a list of items (e.g. directories, fxd files). The items themselves
+ # can also be a list of (title, file)
+ #
++# WARNING: see Debian specific note at beginning of this file
++#
+ # VIDEO_ITEMS = [
+ # ('action movies', '/freevo/movies/action'),
+ # ('funny stuff', '/freevo/movies/comedy'),
+@@ -706,6 +716,8 @@
+ # can also be a list of (title, file)
+ #
+ # To add webradio support, add fxd/webradio.fxd to this list
++#
++# WARNING: see Debian specific note at beginning of this file
+ #
+ # AUDIO_ITEMS = [
+ # ('Music Collection', '/freevo/audio/mp3'),
+@@ -753,6 +765,8 @@
+ # This is a list of items (e.g. directories, fxd files). The items itself
+ # can also be a list of (title, file)
+ #
++# WARNING: see Debian specific note at beginning of this file
++#
+ # IMAGE_ITEMS = [
+ # ('My Photos', '/freevo/images'),
+ # ]
+@@ -1189,6 +1203,9 @@
+ # This is where recorded video is written.
+ #
+ # XXX the path doesn't work from the www cgi scripts!
++#
++# WARNING: see Debian specific note at beginning of this file
++#
+ # TV_RECORD_DIR = None
+
+ # This will enable duplicate recording detection
Modified: packages/freevo/trunk/debian/patches/series
===================================================================
--- packages/freevo/trunk/debian/patches/series 2008-01-19 17:24:37 UTC (rev 59)
+++ packages/freevo/trunk/debian/patches/series 2008-01-19 18:15:38 UTC (rev 60)
@@ -1 +1,5 @@
nocheck
+source_etc_freevo_debconf_py.diff
+freevo_config_py_remarks.diff
+config_py.diff
+local_conf_py_example_remarks.diff
Added: packages/freevo/trunk/debian/patches/source_etc_freevo_debconf_py.diff
===================================================================
--- packages/freevo/trunk/debian/patches/source_etc_freevo_debconf_py.diff (rev 0)
+++ packages/freevo/trunk/debian/patches/source_etc_freevo_debconf_py.diff 2008-01-19 18:15:38 UTC (rev 60)
@@ -0,0 +1,15 @@
+--- freevo.orig/src/config.py.orig 2008-01-19 17:46:34.000000000 +0100
++++ freevo/src/config.py 2008-01-19 17:48:40.000000000 +0100
+@@ -608,6 +608,12 @@
+ print
+ sys.exit(1)
+
++#Debian specific /etc/freevo/debconf.py file, to read configurations
++# as entered at install time using the debconf interface
++overridefile = '/etc/freevo/debconf.py'
++if os.path.isfile(overridefile):
++ _debug_('Loading debconf configuration file "%s"' % overridefile, DINFO)
++ execfile(overridefile, globals(), locals())
+
+ #
+ # Search for local_conf.py:
More information about the Pkg-freevo-maint
mailing list