summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7fbe164)
raw | patch | inline | side by side (parent: 7fbe164)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 3 Sep 2010 19:16:21 +0000 (21:16 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 3 Sep 2010 19:16:21 +0000 (21:16 +0200) |
This is an upstream patch fixing a segfault when started in pager mode.
Thanks to Kumar Appaiah for reporting this and pointing out the upstream fix!
Closes: #594549
Also, build-depend on and use dpatch.
Thanks to Kumar Appaiah for reporting this and pointing out the upstream fix!
Closes: #594549
Also, build-depend on and use dpatch.
debian/changelog | patch | blob | history | |
debian/control | patch | blob | history | |
debian/patches/00list | [new file with mode: 0644] | patch | blob |
debian/patches/bts594549-pager-segfault.dpatch | [new file with mode: 0755] | patch | blob |
debian/rules | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index c439c7d32a41ba41acaefde7ff373e16a25cfd0d..2dc7bbd07d7ee8b9bd0e525a3e6e0c17651cd577 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
+tig (0.16-2) unstable; urgency=low
+
+ * debian/patches:
+ - Added bts594549-pager-segfault - upstream patch fixing a segfault when
+ started in pager mode; thanks to Kumar Appaiah for reporting this and
+ pointing out the upstream fix (Closes: #594549).
+ * debian/control, debian/rules:
+ - Build-depend on and use dpatch.
+
+ -- Sebastian Harl <tokkee@debian.org> Fri, 03 Sep 2010 21:15:21 +0200
+
tig (0.16-1) unstable; urgency=low
* New upstream release; thanks to Sedat Dilek for the pointer
diff --git a/debian/control b/debian/control
index e16f07ad4335bad48f4c8eb5e48416fec74b8ce2..76d76c3ff52516777a1a3eb198978e0ded61eabf 100644 (file)
--- a/debian/control
+++ b/debian/control
Section: vcs
Priority: optional
Maintainer: Sebastian Harl <tokkee@debian.org>
-Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.6), libncursesw5-dev, asciidoc (>= 8.4), xmlto, docbook-utils
+Build-Depends: debhelper (>= 5), dpatch, dpkg-dev (>= 1.14.6), libncursesw5-dev, asciidoc (>= 8.4), xmlto, docbook-utils
Standards-Version: 3.8.4
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
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,2 @@
+bts594549-pager-segfault.dpatch
+
diff --git a/debian/patches/bts594549-pager-segfault.dpatch b/debian/patches/bts594549-pager-segfault.dpatch
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bts594549-pager-segfault.dpatch by Jonas Fonseca <fonseca@diku.dk>
+##
+## DP: Fix segfault when starting tig in pager mode.
+## DP:
+## DP: (Upstream commit 5355b6ed446a22714d944c316f3c037348f67d76)
+
+@DPATCH@
+
+diff a/tig.c b/tig.c
+--- a/tig.c
++++ b/tig.c
+@@ -2308,7 +2308,7 @@
+ VIEW_(BLAME, "blame", &blame_ops, TRUE, ref_commit),
+ VIEW_(BRANCH, "branch", &branch_ops, TRUE, ref_head),
+ VIEW_(HELP, "help", &help_ops, FALSE, ""),
+- VIEW_(PAGER, "pager", &pager_ops, FALSE, "stdin"),
++ VIEW_(PAGER, "pager", &pager_ops, FALSE, ""),
+ VIEW_(STATUS, "status", &status_ops, TRUE, ""),
+ VIEW_(STAGE, "stage", &stage_ops, TRUE, ""),
+ };
+@@ -3700,6 +3700,13 @@
+ break;
+
+ case REQ_VIEW_PAGER:
++ if (view == NULL) {
++ if (!io_open(&VIEW(REQ_VIEW_PAGER)->io, ""))
++ die("Failed to open stdin");
++ open_view(view, request, OPEN_PREPARED);
++ break;
++ }
++
+ if (!VIEW(REQ_VIEW_PAGER)->pipe && !VIEW(REQ_VIEW_PAGER)->lines) {
+ report("No pager content, press %s to run command from prompt",
+ get_key(view->keymap, REQ_PROMPT));
+@@ -7729,10 +7736,8 @@
+ const char **filter_argv = NULL;
+ int i;
+
+- if (!isatty(STDIN_FILENO)) {
+- io_open(&VIEW(REQ_VIEW_PAGER)->io, "");
++ if (!isatty(STDIN_FILENO))
+ return REQ_VIEW_PAGER;
+- }
+
+ if (argc <= 1)
+ return REQ_VIEW_MAIN;
diff --git a/debian/rules b/debian/rules
index 9666fa17a574fa9d7d61f43abc33a848cc0e5f53..969f53ddfe8384586bdf58efcdf2e3eab1e0fccd 100755 (executable)
--- a/debian/rules
+++ b/debian/rules
CFLAGS += -O2
endif
-config.status: configure
+include /usr/share/dpatch/dpatch.make
+
+config.status: configure $(DPATCH_STAMPFN)
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp