r7050 - in /vdr/vdr/trunk/debian: .vdr-patches README.Debian abi-version.txt changelog config-loader.sh control dependencies.sh patchcheck.py patchlevel.sh plugin-loader.sh plugin-template/rules rules vdr-dev.install

tiber-guest at users.alioth.debian.org tiber-guest at users.alioth.debian.org
Thu Jul 10 01:08:49 UTC 2008


Author: tiber-guest
Date: Thu Jul 10 01:08:49 2008
New Revision: 7050

URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/?sc=1&rev=7050
Log:
Using "Provides: vdr-abi-1.6.0-debian" now, which plugin packages can depend
on. This way only plugins compiled for the specified ABI version can be
installed, allowing us to remove the runtime patch level test.
(Closes: #489914)

Added:
    vdr/vdr/trunk/debian/.vdr-patches
    vdr/vdr/trunk/debian/abi-version.txt
    vdr/vdr/trunk/debian/patchcheck.py
Removed:
    vdr/vdr/trunk/debian/patchlevel.sh
Modified:
    vdr/vdr/trunk/debian/README.Debian
    vdr/vdr/trunk/debian/changelog
    vdr/vdr/trunk/debian/config-loader.sh
    vdr/vdr/trunk/debian/control
    vdr/vdr/trunk/debian/dependencies.sh
    vdr/vdr/trunk/debian/plugin-loader.sh
    vdr/vdr/trunk/debian/plugin-template/rules
    vdr/vdr/trunk/debian/rules
    vdr/vdr/trunk/debian/vdr-dev.install

Added: vdr/vdr/trunk/debian/.vdr-patches
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/.vdr-patches?rev=7050&op=file
==============================================================================
--- vdr/vdr/trunk/debian/.vdr-patches (added)
+++ vdr/vdr/trunk/debian/.vdr-patches Thu Jul 10 01:08:49 2008
@@ -1,0 +1,14 @@
+debian/patches/81_Make_config.dpatch:dcff6a00ef9474bca19d955d19574009
+debian/patches/12_osdbase-maxitems.dpatch:e45d1b62f7d66c3e5d279e3561034107
+debian/patches/10_dd-record-option.dpatch:56f2327b5930da8d40873b0140f5e051
+debian/patches/11_sortrecordings.dpatch:9ed4cd1e144ee59dab34d4df4aa9af51
+debian/patches/04_newplugin.dpatch:e99f8d21734a19b3eb93d9e3f11b680a
+debian/patches/14_cap-memsize.dpatch:7beb9bcecb1bdce4a03c1729acfbbdb3
+debian/patches/16_channels.conf.terr-fix.dpatch:72595733d0b46aa4093a640708d19226
+debian/patches/06_default_svdrp_port_0.dpatch:b49237a9ee246acfa01ee7ec92ad0a52
+debian/patches/17_vdr-maintenance-1.6.0-1.dpatch:3a2ff2c6d3b13489c19eda4e32f2537c
+debian/patches/03_cmdsubmenu.dpatch:abff754a3d760764796f06cdf1cf5105
+debian/patches/09_sort_options.dpatch:3b561fcd7645b216b4dab989d7786fda
+debian/patches/99_ncursesw-include.dpatch:7b5ffe19bfc180049cb32b434b666587
+debian/patches/82_valgrind.dpatch:ebcc8c81559eeea1dc856e472e1f7b56
+debian/patches/15_dvbplayer.dpatch:d1f31f0687c917dea48bc0ba26b7f3bb

Modified: vdr/vdr/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/README.Debian?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/README.Debian (original)
+++ vdr/vdr/trunk/debian/README.Debian Thu Jul 10 01:08:49 2008
@@ -41,17 +41,6 @@
     Set this to 1, to make VDR switch to the console specified in KEYB_TTY
     on startup.
 
-PLUGIN_CHECK_PATCHLEVEL="<yes|no>"
-
-    Default: "no"
-
-    Set this to "yes" to force VDR to load only plugins with a matching patch
-    level. This is especially useful, if you run patched VDR versions from third
-    party repositories like the ctvdr distribution.
-    If this option is set to "yes", then only plugins are loaded, which were
-    installed by a Debian package. In order to load plugins that you have
-    manually copied to /usr/lib/vdr/plugins, this option must be set to "no".
-
 PLUGIN_CHECK_STARTABLE="<yes|no>"
 
     Default: "yes"
@@ -292,17 +281,6 @@
 opt-<nn>-x_<patch name> do not affect the plugin interfaces and can therefore 
 be enabled or disabled without the need to recompile the plugins.
 
-If you decide to compile your own patched vdr packages, you should set
-PLUGIN_CHECK_PATCHLEVEL="yes" in /etc/default/vdr. With this enabled, vdr
-will only load plugins, that have been compiled with the correct vdr patch. This
-checking is done by using a custom control field called "VDR-Patchlevel". When
-compiling vdr with some optional patches enabled, these patches will be listed
-in this control field and added to vdr-dev as /usr/include/vdr/patchlevel.
-When compiling a plugin, this patchlevel file is added as the "VDR-Patchlevel"
-control field to the plugins binary package. By comparing the "VDR-Patchlevel"
-field of vdr and the plugin packages, the vdr package can decide whether to
-load a plugin or not.
-
 Keep in mind, that if you enable any optional patches, you can't use apt-get
 anymore on the official Debian repositories to update existing vdr or plugin
 packages or install additional plugins. You always have to compile the plugins

Added: vdr/vdr/trunk/debian/abi-version.txt
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/abi-version.txt?rev=7050&op=file
==============================================================================
--- vdr/vdr/trunk/debian/abi-version.txt (added)
+++ vdr/vdr/trunk/debian/abi-version.txt Thu Jul 10 01:08:49 2008
@@ -1,0 +1,1 @@
+vdr-abi-1.6.0-debian

Modified: vdr/vdr/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/changelog?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/changelog (original)
+++ vdr/vdr/trunk/debian/changelog Thu Jul 10 01:08:49 2008
@@ -1,8 +1,15 @@
 vdr (1.6.0-5) UNRELEASED; urgency=low
 
+  [ Thomas Schmidt ]
   * Bumped Standards-Version to 3.8.0
 
- -- Thomas Schmidt <tschmidt at debian.org>  Thu, 03 Jul 2008 10:47:29 +0200
+  [ Tobias Grimm ]
+  * Using "Provides: vdr-abi-1.6.0-debian" now, which plugin packages can depend
+    on. This way only plugins compiled for the specified ABI version can be
+    installed, allowing us to remove the runtime patch level test.
+    (Closes: #489914)
+
+ -- Tobias Grimm <tg at e-tobi.net>  Thu, 10 Jul 2008 03:08:07 +0200
 
 vdr (1.6.0-4) unstable; urgency=high
 

Modified: vdr/vdr/trunk/debian/config-loader.sh
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/config-loader.sh?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/config-loader.sh (original)
+++ vdr/vdr/trunk/debian/config-loader.sh Thu Jul 10 01:08:49 2008
@@ -48,9 +48,6 @@
 # Video-Directory
 VIDEO_DIR="/var/lib/video.00"
 
-# Set this to load only plugins with the correct patch level
-PLUGIN_CHECK_PATCHLEVEL="no"
-
 # Set this to load only startable plugins (check with "vdr -V -P plugin")
 PLUGIN_CHECK_STARTABLE="yes"
 

Modified: vdr/vdr/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/control?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/control (original)
+++ vdr/vdr/trunk/debian/control Thu Jul 10 01:08:49 2008
@@ -5,7 +5,7 @@
 Uploaders: Thomas Schmidt <tschmidt at debian.org>, Tobias Grimm <tg at e-tobi.net>, Thomas Günther <tom at toms-cafe.de>
 Build-Depends: debhelper (>= 5), dpatch, libjpeg62-dev, libcap-dev,
   libncursesw5-dev, libfreetype6-dev, libfontconfig-dev, gettext,
-  txt2man
+  txt2man, python
 Standards-Version: 3.8.0
 Vcs-Svn: svn://svn.debian.org/pkg-vdr-dvb/vdr/vdr/trunk/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/
@@ -15,7 +15,7 @@
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, psmisc
 Recommends: lirc, ttf-bitstream-vera | ttf-freefont
-Provides: vdr-daemon, vdr-kbd, vdr-lirc, vdr-rcu
+Provides: vdr-daemon, vdr-kbd, vdr-lirc, vdr-rcu, ${vdr:Provides}
 Conflicts: vdr-daemon, vdr-kbd, vdr-lirc, vdr-rcu, vdradmin (<< 3.4.3)
 Replaces: vdr-daemon, vdr-kbd, vdr-lirc, vdr-rcu
 Description: Video Disk Recorder for DVB cards
@@ -31,7 +31,6 @@
  programs. Also the standard VDR (without special plugins) requires 
  a DVB-Card with an integrated mpeg-decoder, a so called 
  Full-Featured Card.
-XB-VDR-Patchlevel: ${vdr:Patchlevel}
 
 Package: vdr-dev
 Architecture: all
@@ -45,7 +44,6 @@
  .
  This package contains the header files of VDR.
  You need this package to be able to build vdr-plugins!
-XB-VDR-Patchlevel: ${vdr:Patchlevel}
 
 Package: vdr-dbg
 Architecture: any 
@@ -54,7 +52,6 @@
 Description: Debuggable version of the VDR Video Disk Recorder
  This package installs an unoptimized vdr binary with debugging symbols as well
  as some helper scripts to debug VDR and its plugins.
-XB-VDR-Patchlevel: ${vdr:Patchlevel}
 
 Package: vdr-plugin-sky
 Architecture: any 
@@ -68,7 +65,6 @@
  the analog a/v output of a Sky Digibox to VDR, so that you can 
  enjoy the full recording flexibility of VDR with your Sky 
  subscription. 
-XB-VDR-Patchlevel: ${vdr:Patchlevel}
 
 Package: vdr-plugin-examples
 Architecture: any 
@@ -82,4 +78,3 @@
  svcsvr, skincurses, status and svdrpdemo from the vdr-source. 
  These plugins do not have useful features, they only demonstrate 
  how vdr-plugins work and what is possible to do with them.
-XB-VDR-Patchlevel: ${vdr:Patchlevel}

Modified: vdr/vdr/trunk/debian/dependencies.sh
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/dependencies.sh?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/dependencies.sh (original)
+++ vdr/vdr/trunk/debian/dependencies.sh Thu Jul 10 01:08:49 2008
@@ -13,9 +13,9 @@
 
 set -e
 
-FIRST_VERSION=$(dpkg -s vdr-dev | awk '/Version/ { print $2 }')
+ABI_VERSION=`cat /usr/share/vdr-dev/abi-version.txt`
 
-# Set conflicts with previous vdr version in control
+# A plugin requires exactly the VDR ABI version it was compiled for
 for p in $(dh_listpackages); do
-    echo "vdr:Depends=vdr (>= $FIRST_VERSION)" >> debian/$p.substvars
+    echo "vdr:Depends=$ABI_VERSION" >> debian/$p.substvars
 done

Added: vdr/vdr/trunk/debian/patchcheck.py
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patchcheck.py?rev=7050&op=file
==============================================================================
--- vdr/vdr/trunk/debian/patchcheck.py (added)
+++ vdr/vdr/trunk/debian/patchcheck.py Thu Jul 10 01:08:49 2008
@@ -1,0 +1,78 @@
+#!/usr/bin/python
+
+import re
+import md5
+import os
+from optparse import OptionParser
+
+PATCHES_FILE = 'debian/.vdr-patches'
+
+def get_active_patches():
+    active_patches = {}
+    for line in open("debian/patches/00list", "r"):
+        match = re.match('^([^#]+)', line.rstrip())
+        if match:
+            patchFileName = "debian/patches/" + match.group(1)
+            if not os.path.exists(patchFileName):
+                patchFileName += ".dpatch"
+            if os.path.exists(patchFileName):
+                active_patches[patchFileName] = md5.new(open(patchFileName).read()).hexdigest()
+    return active_patches
+
+def get_last_patches():
+    lastPatches = {}
+    for line in open(PATCHES_FILE, "r"):
+        match = re.match('(.+):(.+)', line.rstrip())
+        if match:
+            lastPatches[match.group(1)] = match.group(2)
+    return lastPatches
+        
+def update_patchlist():
+    patchListFile = open(PATCHES_FILE, "w")
+    patches = get_active_patches()
+    for fileName in patches:
+        patchListFile.write(fileName + ":" + patches[fileName] + "\n")
+                    
+def report_patches(patches, reportText):
+    if len(patches) > 0:
+        print reportText
+        for p in patches:
+            print "    " + p
+        print
+
+def check_patches():
+    active_patches = get_active_patches()
+    last_patches = get_last_patches()    
+
+    new_patches = [p for p in active_patches if last_patches.keys().count(p) == 0]
+    removed_patches = [p for p in last_patches if active_patches.keys().count(p) == 0]
+    changed_patches = [p for p in last_patches if p in active_patches and active_patches[p] != last_patches[p]]
+        
+    report_patches(new_patches, "The following patches are new:")
+    report_patches(removed_patches, "The following patches have been disabled:") 
+    report_patches(changed_patches, "The following patches have been modified:")
+    
+    if len(new_patches) + len(removed_patches) + len(changed_patches) > 0:
+        print "Please check, if any of the above changes affects VDR's ABI!"
+        print "If this is the case, then update abi-version.txt and run"
+        print "'python debian/patchcheck.py -u' to update the snapshot of"
+        print "the current patch level."
+        exit(1)
+
+#
+# main()
+#
+
+parser = OptionParser()
+
+parser.add_option("-u", "--update", action="store_true", dest="doUpdate", help="updated the list of accepted patches")
+parser.add_option("-c", "--check", action="store_true", dest="doCheck", help="check patches")
+
+(options, args) = parser.parse_args()
+
+if options.doCheck:
+    check_patches()
+elif options.doUpdate:
+    update_patchlist()
+else:
+    parser.print_help()

Modified: vdr/vdr/trunk/debian/plugin-loader.sh
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/plugin-loader.sh?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/plugin-loader.sh (original)
+++ vdr/vdr/trunk/debian/plugin-loader.sh Thu Jul 10 01:08:49 2008
@@ -12,7 +12,6 @@
     local arguments
     local plugins
     local packages
-    local patchlevels
     local leftout
     local leftout2
     local vdrcmd
@@ -55,25 +54,6 @@
     fi
     installed_plugins=(`echo ${plugins[@]} | sed 's/[^ ]*://g'`)
     packages=(   vdr   `echo ${plugins[@]} | sed 's/:[^ ]*//g'`)
-
-    if [ "$PLUGIN_CHECK_PATCHLEVEL" = "yes" ]; then
-        # extract patchlevel info
-        eval "patchlevels=($(LANG=C;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 ; i<${#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[@]}" )
-    fi
 
     if [ "$PLUGIN_CHECK_STARTABLE" = "yes" ]; then
 

Modified: vdr/vdr/trunk/debian/plugin-template/rules
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/plugin-template/rules?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/plugin-template/rules (original)
+++ vdr/vdr/trunk/debian/plugin-template/rules Thu Jul 10 01:08:49 2008
@@ -16,5 +16,4 @@
 	rm -f libvdr-*.so.*
 
 common-binary-predeb-arch::
-	sh /usr/share/vdr-dev/patchlevel.sh subst
 	sh /usr/share/vdr-dev/dependencies.sh

Modified: vdr/vdr/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/rules?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/rules (original)
+++ vdr/vdr/trunk/debian/rules Thu Jul 10 01:08:49 2008
@@ -67,8 +67,8 @@
 
 	touch build-stamp
 
-patchlevel:
-	sh debian/patchlevel.sh make
+patchinfo:
+	python debian/patchcheck.py -c
 	sh debian/extract-patchinfo >debian/patchinfo
 
 clean: clean-patched unpatch
@@ -83,12 +83,11 @@
 	rm -rf PLUGINS/lib
 	rm -f vdr-newplugin
 	rm -f debian/vdr-shutdown.wrapper
-	sh debian/patchlevel.sh clean
 	rm -f debian/patchinfo
 	rm -f $(MANPAGES)
 	dh_clean
 
-install: build patchlevel
+install: patchinfo build
 	dh_testdir
 	dh_testroot
 	dh_clean -k
@@ -98,6 +97,9 @@
 	for example in hello osddemo pictures servicedemo skincurses status svdrpdemo; do \
 	    install -D PLUGINS/src/$$example/README $(CURDIR)/debian/vdr-plugin-examples/usr/share/doc/vdr-plugin-examples/README.$$example; \
 	done
+	echo -n "vdr:Provides=" >> debian/vdr.substvars
+	cat debian/abi-version.txt >> debian/vdr.substvars
+
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -125,7 +127,6 @@
 	dh_installdeb -i
 	dh_perl -i
 	dh_shlibdeps -i
-	sh debian/patchlevel.sh subst
 	dh_gencontrol -i
 	dh_md5sums -i
 	dh_builddeb -i
@@ -158,7 +159,6 @@
 	dh_installdeb -a
 	dh_perl -a
 	dh_shlibdeps -a
-	sh debian/patchlevel.sh subst
 	dh_gencontrol -a
 	dh_md5sums -a
 	dh_builddeb -a

Modified: vdr/vdr/trunk/debian/vdr-dev.install
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/vdr-dev.install?rev=7050&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/vdr-dev.install (original)
+++ vdr/vdr/trunk/debian/vdr-dev.install Thu Jul 10 01:08:49 2008
@@ -9,13 +9,10 @@
 
 debian/lintian/vdr-dev          usr/share/lintian/overrides/
 
-debian/patchlevel.sh            usr/share/vdr-dev/
-
-patchlevel                      usr/include/vdr/
-
 debian/dependencies.sh          usr/share/vdr-dev/
 
 debian/vdrdbg-buildpackage      usr/bin/
 Make.config                     usr/include/vdr/
 
 debian/make-special-vdr.sh      usr/share/vdr-dev/
+debian/abi-version.txt          usr/share/vdr-dev/




More information about the pkg-vdr-dvb-changes mailing list