vdr/vdr/debian README.Debian changelog control plugin-loader.sh rules
Tobias Grimm
pkg-vdr-dvb-changes@lists.alioth.debian.org
Thu, 15 Jul 2004 21:28:52 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv15500/debian
Modified Files:
README.Debian changelog control plugin-loader.sh rules
Log Message:
introduction of optional patches and patch level mechanism
Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/rules,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- rules 3 Jun 2004 17:55:14 -0000 1.30
+++ rules 15 Jul 2004 21:28:50 -0000 1.31
@@ -60,6 +60,13 @@
touch build-stamp
+patchlevel:
+ @echo -n "Patches: "
+ @for i in `grep -e "^opt-[0-9][0-9]_.*" debian/patches/00list | cut -d"_" -f2-` ; do\
+ echo -n "$$i "; PATCHES="$$PATCHES $$i";\
+ done ; [ -z $$PATCHES ] || echo "patchlevel=$$PATCHES" > debian/patchlevel
+ @echo ""
+
clean: clean-patched unpatch
clean-patched:
@@ -73,10 +80,11 @@
rm -f vdr-kbd vdr-daemon vdr-lirc vdr-rcu
rm -rf PLUGINS/lib
+ rm -f debian/patchlevel
dh_clean
-install: build
+install: build patchlevel
dh_testdir
dh_testroot
dh_clean -k
@@ -85,9 +93,12 @@
# Add here commands to install the package into debian/vdr.
dh_installman $(CURDIR)/vdr.1 -p vdr
- # lintian override
+ # lintian override
cp $(CURDIR)/debian/vdr.override $(CURDIR)/debian/vdr/usr/share/lintian/overrides/vdr
+ # patchlevel file:
+ install -D -m644 debian/patchlevel debian/vdr-dev/usr/include/vdr/patchlevel || true
+
# All other files will be installed using dh_install.
# Build architecture-independent files here.
@@ -109,7 +120,15 @@
dh_compress -i
dh_fixperms -i
dh_installdeb -i
- dh_shlibdeps -i
+
+# VDR can be customized with quite a lot of different patches, which can make
+# the plugins binary incompatible.
+# Although Debian will not provide different binary packages for VDR, we
+# will include a patchlevel info, which is created at compile time and can
+# be checked before a plugin is loaded.
+# [ -r debian/patchlevel ] || echo 'patchlevel=' >> debian/vdr.substvars
+ [ ! -r debian/patchlevel ] || cat debian/patchlevel >> debian/vdr.substvars
+
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
Index: plugin-loader.sh
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/plugin-loader.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plugin-loader.sh 9 May 2004 15:09:13 -0000 1.3
+++ plugin-loader.sh 15 Jul 2004 21:28:50 -0000 1.4
@@ -14,12 +14,30 @@
local plugin
local i
local arguments
+ local packages
+ local patchelvels
+ local leftout
echo -ne "\nSearching for plugins:"
# find installed plugins
installed_plugins=( `find $PLUGIN_DIR -maxdepth 1 -name "$PLUGIN_PREFIX*.so.$VERSION" -printf "%f " | sed "s/$PLUGIN_PREFIX\([^\.]\+\)\.so\.$VERSION/\1/g"` )
+
+ # extract patchlevel info
+ packages=( "vdr" "${installed_plugins[@]/#/vdr-plugin-}" )
+ patchlevels=( "`LANG=en;dpkg -s ${packages[@]} 2>&1 | awk -F ':' '/^Package: / {p=$2} /^Package.*is not installed/ {print "\"\""} (/[pP]atchlevel:/ || /^$/) && p!="" {print "\""$2"\"";p=""}'`" )
+
+ # move plugins with incompatible patchlevel to $leftout
+ for (( i=1 ; line<${#patchlevels[@]} ; i++ )); do
+ if [ "${patchlevels[0]}" != "${patchlevels[$i]}" ]; then
+ leftout="${leftout} ${installed_plugins[$((i-1))]}"
+ unset installed_plugins[$((i-1))]
+ fi
+ done
+
+ # cleanup the installed_plugins array
+ installed_plugins=( "${installed_plugins[@]}" )
if [ -r $PLUGIN_ORDER_FILE ]; then
# load plugin order
@@ -56,4 +74,11 @@
PLUGINS="$PLUGINS -P $plugin"
fi
done
+
+ # warn about incompatible plugins
+ if [ "$leftout" != "" ]; then
+ echo "WARNING: The following plugins have been left out due to "\
+ "possible binary incompatibility:"
+ echo $leftout
+ fi
}
Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- changelog 10 Jul 2004 18:46:08 -0000 1.30
+++ changelog 15 Jul 2004 21:28:50 -0000 1.31
@@ -2,6 +2,13 @@
* Tobias Grimm <tg@e-tobi.net>
- fixed Bug in vdr-shutdown script - osd messages have to be send detached
+ - added patchlevel check in vdr.init - only plugins that have been compiled
+ with the same patch levels will be loaded, to avoid conflicts due to
+ binary incompatibility.
+ - removed dh_shlibdeps and $shlibs:Depends from binary independent target
+ - extracted common patch code from dpatch files
+ - added patchlevel generation
+ - added ElchiAio4d as inactive patch (see README.Debian)
* Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
- It is not possible anymore to start more than one instance of vdr
with the init-script
Index: README.Debian
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/README.Debian,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- README.Debian 3 Jun 2004 00:21:36 -0000 1.7
+++ README.Debian 15 Jul 2004 21:28:49 -0000 1.8
@@ -148,4 +148,10 @@
SHUTDOWNCMD=<new shutdown command>
+
+Optional Patches
+----------------
+
+TODO !!!!
+
-- Tobias Grimm <tg@e-tobi.net>, Thu, 3 Jun 2004 02:20:00 +0100
Index: control
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/control,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- control 22 May 2004 22:06:53 -0000 1.6
+++ control 15 Jul 2004 21:28:50 -0000 1.7
@@ -8,7 +8,7 @@
Package: vdr
Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, vdr-kbd | vdr-lirc | vdr-rcu | vdr-daemon, makedev (>=2.3.1-66)
+Depends: ${misc:Depends}, vdr-kbd | vdr-lirc | vdr-rcu | vdr-daemon, makedev (>=2.3.1-66)
Description: Video Disk Recorder for DVB cards
Video Disk Recorder (VDR) is a digital sat-receiver program using
Linux and DVB technologies. It allows one to record MPEG2 streams,
@@ -19,6 +19,7 @@
frontends.
NOTE: You should install compatible DVB drivers before using these
programs.
+XB-VDR-Patchlevel: ${patchlevel}
Package: vdr-dev
Architecture: all