[vdr-plugin-live] 01/01: Imported Debian patch 0.2.0+git20130305-6.1
Tobias Grimm
tiber-guest at alioth.debian.org
Wed Sep 4 11:04:27 UTC 2013
This is an automated email from the git hooks/post-receive script.
tiber-guest pushed a commit to branch master
in repository vdr-plugin-live.
commit 9b8bdbccaf2c122e8e5157f7aac654d36d328cd8
Author: Dmitrijs Ledkovs <dmitrij.ledkov at ubuntu.com>
Date: Tue Aug 20 00:00:32 2013 +0100
Imported Debian patch 0.2.0+git20130305-6.1
---
debian/changelog | 8 +
...r-bug-triggered-by-never-versions-of-cxxt.patch | 110 +++++++
...ompile-and-work-with-Tntnet-and-cxxtools-.patch | 303 ++++++++++++++++++++
...-v2.2-use-also-the-request.getArg-name-fu.patch | 31 ++
debian/patches/series | 3 +
5 files changed, 455 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 7902db4..ca1c1e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+vdr-plugin-live (0.2.0+git20130305-6.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Apply two patches from upstream to fix FTBFS against new tntnet &
+ cxxtools. (Closes: #713568)
+
+ -- Dmitrijs Ledkovs <dmitrij.ledkov at ubuntu.com> Tue, 20 Aug 2013 00:00:32 +0100
+
vdr-plugin-live (0.2.0+git20130305-6) unstable; urgency=low
* Build-depend on vdr-dev (>= 2.0.0)
diff --git a/debian/patches/0001-Fix-listener-bug-triggered-by-never-versions-of-cxxt.patch b/debian/patches/0001-Fix-listener-bug-triggered-by-never-versions-of-cxxt.patch
new file mode 100644
index 0000000..8419023
--- /dev/null
+++ b/debian/patches/0001-Fix-listener-bug-triggered-by-never-versions-of-cxxt.patch
@@ -0,0 +1,110 @@
+From 06d41e3eb782dc9d6d44477be0628bbce0e56297 Mon Sep 17 00:00:00 2001
+From: Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>
+Date: Sun, 24 Feb 2013 00:35:52 +0100
+Subject: [PATCH] Fix listener bug triggered by never versions of cxxtools
+ reported in bug #1066
+
+---
+ Makefile | 3 ++-
+ pages/Makefile | 3 ++-
+ setup.cpp | 13 +++++++++----
+ tntfeatures.h | 2 ++
+ 4 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index af04aa8..ab2f2b5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -47,6 +47,7 @@ TMPDIR ?= /tmp
+ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+ I18NTARG = $(shell if [ `echo $(APIVERSION) | tr [.] [0]` -ge "10507" ]; then echo "i18n"; fi)
+ TNTVERSION = $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
++CXXTOOLVER = $(shell cxxtools-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+ TNTVERS7 = $(shell ver=$(TNTVERSION); if [ $$ver -ge "1606" ]; then echo "yes"; fi)
+
+ CXXFLAGS += $(shell tntnet-config --cxxflags)
+@@ -73,7 +74,7 @@ ifneq ($(TNTVERS7),yes)
+ LIBS += httpd/libhttpd.a
+ endif
+
+-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DTNTVERSION=$(TNTVERSION)
++DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DTNTVERSION=$(TNTVERSION) -DCXXTOOLVER=$(CXXTOOLVER)
+
+ SUBDIRS = pages css javascript
+ ifneq ($(TNTVERS7),yes)
+diff --git a/pages/Makefile b/pages/Makefile
+index 9a1129c..78a4a9c 100644
+--- a/pages/Makefile
++++ b/pages/Makefile
+@@ -5,6 +5,7 @@ PLUGIN = live
+ ### Additional options to silence TNTNET warnings
+ TNTFLAGS ?= -Wno-overloaded-virtual -Wno-unused-variable
+ TNTVERSION ?= $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
++CXXTOOLVER ?= $(shell cxxtools-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+
+ ### The C++ compiler and options:
+
+@@ -13,7 +14,7 @@ AR ?= ar
+ ECPPC ?= ecppc
+
+ CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC
+-DEFINES ?= -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DTNTVERSION=$(TNTVERSION)
++DEFINES ?= -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DTNTVERSION=$(TNTVERSION) -DCXXTOOLVER=$(CXXTOOLVER)
+
+ ### The directory environment:
+
+diff --git a/setup.cpp b/setup.cpp
+index bd72e92..f6bf168 100644
+--- a/setup.cpp
++++ b/setup.cpp
+@@ -189,26 +189,31 @@ namespace {
+ bool Setup::CheckServerIps()
+ {
+ if ( m_serverIps.empty() ) {
++#if TNT_IPV6_V6ONLY
++ m_serverIps.push_back("");
++ return true;
++#else
+ FILE* f = fopen("/proc/sys/net/ipv6/bindv6only", "r");
+ if (f) {
+ bool bindv6only = false;
+ int c = fgetc(f);
+ if (c != EOF) {
+- bindv6only = c - '0';
++ bindv6only = ((c - '0') != 0);
+ }
+ fclose(f);
+ f = NULL;
+ esyslog( "[live] INFO: bindv6only=%d", bindv6only);
+ // add a default IPv6 listener address
+- m_serverIps.push_back( "::" );
+- // skip the default IPv4 listener address if IPv6 one will be binded also to v4
++ m_serverIps.push_back("::");
++ // skip the default IPv4 listener address if the IPv6 one will be bound also to v4
+ if (!bindv6only)
+ return true;
+ }
+ // add a default IPv4 listener address
+- m_serverIps.push_back( "0.0.0.0" );
++ m_serverIps.push_back("0.0.0.0");
+ // we assume these are ok :)
+ return true;
++#endif // TNT_IPV6_V6ONLY
+ }
+
+ IpList::iterator i = partition(m_serverIps.begin(), m_serverIps.end(), IpValidator());
+diff --git a/tntfeatures.h b/tntfeatures.h
+index fb5d9c5..6de1f88 100644
+--- a/tntfeatures.h
++++ b/tntfeatures.h
+@@ -23,5 +23,7 @@
+ // new version of TNTNET allow the request watchdog to be silenced.
+ #define TNT_WATCHDOG_SILENCE (TNTVERSION >= 16900)
+
++// version of TNTNET that binds ipv6 addresses with IPV6_V6ONLY flag set to true
++#define TNT_IPV6_V6ONLY (CXXTOOLVER >= 21000)
+
+ #endif // VDR_LIVE_TNTFEATURES_H
+--
+1.8.3.2
+
diff --git a/debian/patches/0001-Make-LIVE-compile-and-work-with-Tntnet-and-cxxtools-.patch b/debian/patches/0001-Make-LIVE-compile-and-work-with-Tntnet-and-cxxtools-.patch
new file mode 100644
index 0000000..f86faac
--- /dev/null
+++ b/debian/patches/0001-Make-LIVE-compile-and-work-with-Tntnet-and-cxxtools-.patch
@@ -0,0 +1,303 @@
+From 042724e30d5690ab67a6c04aea48a16b9a3b085b Mon Sep 17 00:00:00 2001
+From: Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>
+Date: Fri, 3 May 2013 01:37:41 +0200
+Subject: [PATCH 1/2] =?UTF-8?q?Make=20LIVE=20compile=20and=20work=20with?=
+ =?UTF-8?q?=20Tntnet=20and=20cxxtools=20version=202.2.=20Thanks=20to=20Tom?=
+ =?UTF-8?q?mi=20M=C3=A4kitalo=20for=20his=20help=20on=20resolving=20the=20?=
+ =?UTF-8?q?issues.=20This=20problem=20was=20reported=20by=20Martin=20Ganss?=
+ =?UTF-8?q?er=20and=20by=20the=20user=20'varas'=20in=20the=20bugtracker=20?=
+ =?UTF-8?q?as=20bug=20#1351.=20This=20commit=20fixes=20that=20bug.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ pages/recordings.ecpp | 4 ++
+ tntconfig.cpp | 166 +++++++++++++++++++++++++++++++++-----------------
+ tntfeatures.h | 12 ++++
+ 3 files changed, 127 insertions(+), 55 deletions(-)
+
+diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp
+index 51018bb..80f145b 100644
+--- a/pages/recordings.ecpp
++++ b/pages/recordings.ecpp
+@@ -205,7 +205,11 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) {
+ <& rec_item_dir name=(recItem->Name()) level=(level) &>
+ <%cpp>
+ #if TNT_HAS_QUERYPARAMS
++#if TNT_QUERYPARAMS_NO_BOOL
++ tnt::QueryParams recItemParams(qparam);
++#else
+ tnt::QueryParams recItemParams(qparam, false);
++#endif
+ #else
+ cxxtools::QueryParams recItemParams(qparam, false);
+ #endif
+diff --git a/tntconfig.cpp b/tntconfig.cpp
+index 3a1fd14..3325776 100644
+--- a/tntconfig.cpp
++++ b/tntconfig.cpp
+@@ -3,7 +3,13 @@
+ #include <fstream>
+ #include <sstream>
+ #include <stdexcept>
++#include "tntfeatures.h"
++#if TNT_LOG_SERINFO
++#include <cxxtools/log.h>
++#include <cxxtools/xml/xmldeserializer.h>
++#else
+ #include <cxxtools/loginit.h>
++#endif
+ #include <tnt/sessionscope.h>
+ #include <tnt/httpreply.h>
+ #include <vdr/config.h>
+@@ -181,19 +187,67 @@ namespace vdrlive {
+ #endif
+
+ #if TNT_CONFIG_INTERNAL
++ namespace {
++ std::string GetResourcePath()
++ {
++#if APIVERSNUM > 10729
++ string resourceDir(Plugin::GetResourceDirectory());
++ return resourceDir;
++#else
++ string configDir(Plugin::GetConfigDirectory());
++ return configDir;
++#endif
++ }
++
++ void MapUrl(tnt::Tntnet & app, const char *rule, const char * component, std::string const & instPath, const char * pathInfo, const char * mime_type)
++ {
++#if TNT_MAPURL_NAMED_ARGS
++ tnt::Mapping::args_type argMap;
++ argMap.insert(std::make_pair("mime-type", mime_type));
++#endif
++ app.mapUrl(rule, component)
++ .setPathInfo(instPath + pathInfo)
++#if TNT_MAPURL_NAMED_ARGS
++ .setArgs(argMap);
++#else
++ .pushArg(mime_type);
++#endif
++ }
++ }
++
+ void TntConfig::Configure(tnt::Tntnet& app) const
+ {
+ string const configDir(Plugin::GetConfigDirectory());
+-#if APIVERSNUM > 10729
+- string const resourceDir(Plugin::GetResourceDirectory());
+-#endif
+
++#if TNT_LOG_SERINFO
++ cxxtools::SerializationInfo si;
++ std::istringstream logXmlConf(
++ "<logging>\n"
++ " <rootlogger>" + LiveSetup().GetTntnetLogLevel() + "</rootlogger>\n"
++ " <loggers>\n"
++ " <logger>\n"
++ " <category>cxxtools</category>\n"
++ " <level>" + LiveSetup().GetTntnetLogLevel() + "</level>\n"
++ " </logger>\n"
++ " <logger>\n"
++ " <category>tntnet</category>\n"
++ " <level>" + LiveSetup().GetTntnetLogLevel() + "</level>\n"
++ " </logger>\n"
++ " </loggers>\n"
++ "</logging>\n"
++ );
++ cxxtools::xml::XmlDeserializer d(logXmlConf);
++ d.deserialize(si);
++ log_init(si);
++#else
+ std::istringstream logConf(
+ "rootLogger=" + LiveSetup().GetTntnetLogLevel() + "\n"
+ "logger.tntnet=" + LiveSetup().GetTntnetLogLevel() + "\n"
+ "logger.cxxtools=" + LiveSetup().GetTntnetLogLevel() + "\n"
+ );
++
+ log_init(logConf);
++#endif
+
+ // +++ CAUTION +++ CAUTION +++ CAUTION +++ CAUTION +++ CAUTION +++
+ // ------------------------------------------------------------------------
+@@ -229,13 +283,12 @@ namespace vdrlive {
+
+ // the following selects the theme specific 'theme.css' file
+ // inserted by 'tadi' -- verified with above, but not counterchecked yet!
+- app.mapUrl("^/themes/([^/]*)/css.*/(.+\\.css)", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/themes/$1/css/$2")
+-#else
+- .setPathInfo(configDir + "/themes/$1/css/$2")
+-#endif
+- .pushArg("text/css");
++ MapUrl(app,
++ "^/themes/([^/]*)/css.*/(.+\\.css)",
++ "content",
++ GetResourcePath(),
++ "/themes/$1/css/$2",
++ "text/css");
+
+ // the following rules provide a search scheme for images. The first
+ // rule where a image is found, terminates the search.
+@@ -243,79 +296,82 @@ namespace vdrlive {
+ // 2. /img/<imgname>.<ext>
+ // deprecated: 3. <imgname>.<ext> (builtin images)
+ // inserted by 'tadi' -- verified with above, but not counterchecked yet!
+- app.mapUrl("^/themes/([^/]*)/img.*/(.+)\\.(.+)", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/themes/$1/img/$2.$3")
+-#else
+- .setPathInfo(configDir + "/themes/$1/img/$2.$3")
+-#endif
+- .pushArg("image/$3");
+- app.mapUrl("^/themes/([^/]*)/img.*/(.+)\\.(.+)", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/img/$2.$3")
+-#else
+- .setPathInfo(configDir + "/img/$2.$3")
+-#endif
+- .pushArg("image/$3");
++ MapUrl(app,
++ "^/themes/([^/]*)/img.*/(.+)\\.(.+)",
++ "content",
++ GetResourcePath(),
++ "/themes/$1/img/$2.$3",
++ "image/$3");
++
++ MapUrl(app,
++ "^/themes/([^/]*)/img.*/(.+)\\.(.+)",
++ "content",
++ GetResourcePath(),
++ "/img/$2.$3",
++ "image/$3");
+ // deprecated: file << "MapUrl ^/themes/([^/]*)/img.*/(.+)\\.(.+) $2@" << endl;
+
+ // Epg images
+ string const epgImgPath(LiveSetup().GetEpgImageDir());
+ if (!epgImgPath.empty()) {
+ // inserted by 'tadi' -- verified with above, but not counterchecked yet!
+- app.mapUrl("^/epgimages/([^/]*)\\.([^./]+)", "content")
+- .setPathInfo(epgImgPath + "/$1.$2")
+- .pushArg("image/$2");
++ MapUrl(app,
++ "^/epgimages/([^/]*)\\.([^./]+)",
++ "content",
++ epgImgPath,
++ "/$1.$2",
++ "image/$2");
+ }
+
+ // select additional (not build in) javascript.
+ // WARNING: no path components with '.' in the name are allowed. Only
+ // the basename may contain dots and must end with '.js'
+ // inserted by 'tadi' -- verified with above, but not counterchecked yet!
+- app.mapUrl("^/js(/[^.]*)([^/]*\\.js)", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/js$1$2")
+-#else
+- .setPathInfo(configDir + "/js$1$2")
+-#endif
+- .pushArg("text/javascript");
++ MapUrl(app,
++ "^/js(/[^.]*)([^/]*\\.js)",
++ "content",
++ GetResourcePath(),
++ "/js$1$2",
++ "text/javascript");
+
+ // map to 'css/basename(uri)'
+ // inserted by 'tadi' -- verified with above, but not counterchecked yet!
+- app.mapUrl("^/css.*/(.+)", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/css/$1")
+-#else
+- .setPathInfo(configDir + "/css/$1")
+-#endif
+- .pushArg("text/css");
++ MapUrl(app,
++ "^/css.*/(.+)",
++ "content",
++ GetResourcePath(),
++ "/css/$1",
++ "text/css");
+
+ // map to 'img/basename(uri)'
+ // inserted by 'tadi' -- verified with above, but not counterchecked yet!
+- app.mapUrl("^/img.*/(.+)\\.([^.]+)", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/img/$1.$2")
+-#else
+- .setPathInfo(configDir + "/img/$1.$2")
+-#endif
+- .pushArg("image/$2");
++ MapUrl(app,
++ "^/img.*/(.+)\\.([^.]+)",
++ "content",
++ GetResourcePath(),
++ "/img/$1.$2",
++ "image/$2");
+
+ // Map favicon.ico into img directory
+- app.mapUrl("^/favicon.ico$", "content")
+-#if APIVERSNUM > 10729
+- .setPathInfo(resourceDir + "/img/favicon.ico")
+-#else
+- .setPathInfo(configDir + "/img/favicon.ico")
+-#endif
+- .pushArg("image/x-icon");
++ MapUrl(app,
++ "^/favicon.ico$",
++ "content",
++ GetResourcePath(),
++ "/img/favicon.ico",
++ "image/x-icon");
+
+ // takes first path components without 'extension' when it does not
+ // contain '.'
+ // modified by 'tadi' -- verified with above, but not counterchecked yet!
+ app.mapUrl("^/([^./]+)(.*)?", "$1");
+
++#if TNT_GLOBAL_TNTCONFIG
++ tnt::TntConfig::it().sessionTimeout = 86400;
++ tnt::TntConfig::it().defaultContentType = string("text/html; charset=") + LiveI18n().CharacterEncoding();
++#else
+ tnt::Sessionscope::setDefaultTimeout(86400);
+ tnt::HttpReply::setDefaultContentType(string("text/html; charset=") + LiveI18n().CharacterEncoding());
++#endif
+
+ Setup::IpList const& ips = LiveSetup().GetServerIps();
+ int port = LiveSetup().GetServerPort();
+diff --git a/tntfeatures.h b/tntfeatures.h
+index 6de1f88..76d3757 100644
+--- a/tntfeatures.h
++++ b/tntfeatures.h
+@@ -17,6 +17,9 @@
+ // Query params are now in tntnet and not in cxxtools
+ #define TNT_HAS_QUERYPARAMS (TNTVERSION >= 16060)
+
++// Query params without boolean parameter
++#define TNT_QUERYPARAMS_NO_BOOL (TNTVERSION >= 22000)
++
+ // One can request the host part of the request url
+ #define TNT_HAS_GETHOST (TNTVERSION >= 16060)
+
+@@ -26,4 +29,13 @@
+ // version of TNTNET that binds ipv6 addresses with IPV6_V6ONLY flag set to true
+ #define TNT_IPV6_V6ONLY (CXXTOOLVER >= 21000)
+
++// version of TNTNET with properties deserializer for logger configuration args.
++#define TNT_LOG_SERINFO (CXXTOOLVER >= 22000)
++
++// version of TNTNET wich expects name, value mappings for Url-Mapper arguments.
++#define TNT_MAPURL_NAMED_ARGS (TNTVERSION >= 22000)
++
++// version of TNTNET where configuration is global
++#define TNT_GLOBAL_TNTCONFIG (TNTVERSION >= 22000)
++
+ #endif // VDR_LIVE_TNTFEATURES_H
+--
+1.8.3.2
+
diff --git a/debian/patches/0002-With-tntnet-v2.2-use-also-the-request.getArg-name-fu.patch b/debian/patches/0002-With-tntnet-v2.2-use-also-the-request.getArg-name-fu.patch
new file mode 100644
index 0000000..4818724
--- /dev/null
+++ b/debian/patches/0002-With-tntnet-v2.2-use-also-the-request.getArg-name-fu.patch
@@ -0,0 +1,31 @@
+From 69f84f95fa875c6f562294b1a6a1ea6f584d3f6c Mon Sep 17 00:00:00 2001
+From: Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>
+Date: Sat, 4 May 2013 22:27:09 +0200
+Subject: [PATCH 2/2] With tntnet v2.2 use also the request.getArg(<name>)
+ function. In the previous commit support for tntnet 2.2 was added. The URL
+ mapping changed in that version and allows now named arguments. This change
+ makes uses of this feature now.
+
+---
+ pages/content.ecpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/pages/content.ecpp b/pages/content.ecpp
+index 27d827c..cde092f 100644
+--- a/pages/content.ecpp
++++ b/pages/content.ecpp
+@@ -17,7 +17,11 @@ bool logged_in(false);
+
+ string mime("image/png");
+ if (request.getArgsCount() > 0) {
++#if TNT_MAPURL_NAMED_ARGS
++ mime = request.getArg("mime-type");
++#else
+ mime = request.getArg(0);
++#endif
+ // dsyslog("vdrlive::content found mime arg (%s)", mime.c_str());
+ }
+ reply.setContentType(mime);
+--
+1.8.3.2
+
diff --git a/debian/patches/series b/debian/patches/series
index e48ef09..08cecee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
themes-directory.patch
+0001-Fix-listener-bug-triggered-by-never-versions-of-cxxt.patch
+0001-Make-LIVE-compile-and-work-with-Tntnet-and-cxxtools-.patch
+0002-With-tntnet-v2.2-use-also-the-request.getArg-name-fu.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-live.git
More information about the pkg-vdr-dvb-changes
mailing list