From a1cb41f6c88721326037602348acb00a399db643 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 3 Feb 2009 10:34:52 +0100 Subject: [PATCH] debian/patches: Added non-utf8-fix.dpatch Upstream patch fixing a regression in the handling of non-UTF-8 locales. --- debian/changelog | 5 ++++- debian/control | 2 +- debian/patches/00list | 2 ++ debian/patches/non-utf8-fix.dpatch | 26 ++++++++++++++++++++++++++ debian/rules | 6 ++++-- 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 debian/patches/00list create mode 100755 debian/patches/non-utf8-fix.dpatch diff --git a/debian/changelog b/debian/changelog index 98fc8e5..a4d4ea0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,11 @@ tig (0.13-1) experimental; urgency=low * New upstream release (Closes: #513727). * debian/copyright: Use © instead of (C) to make lintian happy. + * debian/patches: + - Added non-utf8-fix.dpatch - upstream patch fixing a regression in the + handling of non-UTF-8 locales. - -- Sebastian Harl Mon, 02 Feb 2009 12:21:46 +0100 + -- Sebastian Harl Tue, 03 Feb 2009 10:33:22 +0100 tig (0.12.1-1) experimental; urgency=low diff --git a/debian/control b/debian/control index fc15c5b..d186b6e 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: tig Section: utils Priority: optional Maintainer: Sebastian Harl -Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.6), git-core, libncursesw5-dev, asciidoc (>= 7), xmlto, docbook-utils +Build-Depends: debhelper (>= 5), dpatch, dpkg-dev (>= 1.14.6), git-core, libncursesw5-dev, asciidoc (>= 7), xmlto, docbook-utils Standards-Version: 3.8.0 Homepage: http://jonas.nitro.dk/tig/ Vcs-Git: git://git.tokkee.org/pkg-tig.git diff --git a/debian/patches/00list b/debian/patches/00list new file mode 100644 index 0000000..0c853cf --- /dev/null +++ b/debian/patches/00list @@ -0,0 +1,2 @@ +non-utf8-fix.dpatch + diff --git a/debian/patches/non-utf8-fix.dpatch b/debian/patches/non-utf8-fix.dpatch new file mode 100755 index 0000000..5a01ff7 --- /dev/null +++ b/debian/patches/non-utf8-fix.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## non-utf8-fix.dpatch by Jonas Fonseca +## +## DP: Fix regression in handling of data for non-UTF-8 locales +## DP: +## DP: The bug was introduced in 65498141015b6070cf5c9b5704039389dba76e90 where +## DP: the the IO API was changed from using stdio to 'raw' file descriptors. +## DP: Part of the change removed the need for cutting the ending newline from +## DP: the input line in update_view(). This caused the resulting iconv output +## DP: buffer to not be NUL terminated since the input string no longer +## DP: contained an ending NULL byte. +## DP: +## DP: Reported by Pavel Roskin. + +diff a/tig.c b/tig.c +--- a/tig.c ++++ b/tig.c +@@ -2707,7 +2707,7 @@ update_view(struct view *view) + + if (opt_iconv != ICONV_NONE) { + ICONV_CONST char *inbuf = line; +- size_t inlen = linelen; ++ size_t inlen = linelen + 1; + + char *outbuf = out_buffer; + size_t outlen = sizeof(out_buffer); diff --git a/debian/rules b/debian/rules index 92ff929..a2784d2 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,8 @@ else CFLAGS += -O2 endif +include /usr/share/dpatch/dpatch.make + config.status: configure dh_testdir ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ @@ -27,14 +29,14 @@ config.status: configure build: build-stamp -build-stamp: config.status +build-stamp: config.status $(DPATCH_STAMPFN) dh_testdir $(MAKE) all doc touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp -- 2.30.2