Hi, Please let tig and collectd migrate to Etch. They fix one RC (#403565) and two quite nasty bugs (#404018 and #401075) while introducing a very short diff (if you ignore the changes in the files generated by the autotools) to the current version in Etch (attached to this email). Thanks. Cheers, Sebastian PS: Please CC me in any replies - I'm not subscribed to this list. -- Sebastian "tokkee" Harl GnuPG-ID: 0x8501C7FC http://tokkee.org/
diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/ChangeLog /tmp/31Qldau1Le/collectd-3.10.4/ChangeLog --- /tmp/GaOYOj9OLv/collectd-3.10.3/ChangeLog 2006-11-04 12:52:31.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/ChangeLog 2006-12-21 19:56:53.000000000 +0000 @@ -1,3 +1,8 @@ +2006-12-21, Version 3.10.4 + * Max Kellermann has identified a bug in the server routine: When + opening a socket fails the daemon will (re)try opening the socket in + an endless loop, ultimately leading to a `EMFILE' error. + 2006-11-04, Version 3.10.3 * Lubos Stanek has identified a bug in the ntpd-plugin: When the ntpd's reply was sent in more than one packet, the buffer size was diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/configure.in /tmp/31Qldau1Le/collectd-3.10.4/configure.in --- /tmp/GaOYOj9OLv/collectd-3.10.3/configure.in 2006-11-04 12:52:30.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/configure.in 2006-12-21 19:56:53.000000000 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(collectd, 3.10.3) +AC_INIT(collectd, 3.10.4) AC_CONFIG_SRCDIR(src/collectd.c) AC_CONFIG_HEADERS(src/config.h) AM_INIT_AUTOMAKE(dist-bzip2) diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/debian/README.Debian /tmp/31Qldau1Le/collectd-3.10.4/debian/README.Debian --- /tmp/GaOYOj9OLv/collectd-3.10.3/debian/README.Debian 2006-12-25 19:54:13.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/debian/README.Debian 2006-12-25 19:54:13.000000000 +0000 @@ -30,7 +30,7 @@ The resulting file can be compiled as follows: - gcc -shared -o myplugin.so myplugin.c + gcc -shared -fPIC -o myplugin.so myplugin.c Copy myplugin.so to /usr/lib/collectd and add the following line to your collectd config file: diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/debian/changelog /tmp/31Qldau1Le/collectd-3.10.4/debian/changelog --- /tmp/GaOYOj9OLv/collectd-3.10.3/debian/changelog 2006-12-25 19:54:13.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/debian/changelog 2006-12-25 19:54:13.000000000 +0000 @@ -1,3 +1,13 @@ +collectd (3.10.4-1) unstable; urgency=low + + * New upstream release. + - Fix an infinite loop in server mode if binding to a socket fails and + close the socket descriptor (Closes: #404018). + * examples/myplugin.c: Include system headers before collectd headers to + make it compile without any autoconf defines set (Closes: #401075). + + -- Sebastian Harl <sh@tokkee.org> Fri, 22 Dec 2006 00:33:30 +0000 + collectd (3.10.3-1) unstable; urgency=low * New upstream release. diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/debian/control /tmp/31Qldau1Le/collectd-3.10.4/debian/control --- /tmp/GaOYOj9OLv/collectd-3.10.3/debian/control 2006-12-25 19:54:13.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/debian/control 2006-12-25 19:54:13.000000000 +0000 @@ -2,9 +2,7 @@ Section: utils Priority: optional Maintainer: Sebastian Harl <sh@tokkee.org> -Build-Depends: debhelper (>= 5), autotools-dev, libcurl3-gnutls-dev, - libmysqlclient15-dev | libmysqlclient14-dev, librrd2-dev | librrd0-dev, - libsensors-dev, liboping-dev (>= 0.3.3) +Build-Depends: debhelper (>= 5), autotools-dev, libcurl3-gnutls-dev, libmysqlclient15-dev | libmysqlclient14-dev, librrd2-dev | librrd0-dev, libsensors-dev, liboping-dev (>= 0.3.3) Standards-Version: 3.7.2 Package: collectd diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/debian/examples/myplugin.c /tmp/31Qldau1Le/collectd-3.10.4/debian/examples/myplugin.c --- /tmp/GaOYOj9OLv/collectd-3.10.3/debian/examples/myplugin.c 2006-12-25 19:54:13.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/debian/examples/myplugin.c 2006-12-25 19:54:13.000000000 +0000 @@ -11,12 +11,12 @@ * option) any later version. */ -#include <collectd/common.h> /* rrd_update_file */ -#include <collectd/plugin.h> /* plugin_* */ - #include <stdio.h> #include <stdlib.h> +#include <collectd/common.h> /* rrd_update_file */ +#include <collectd/plugin.h> /* plugin_* */ + /* Optional config file support */ /* #include <collectd/configfile.h> */ diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/src/collectd.1 /tmp/31Qldau1Le/collectd-3.10.4/src/collectd.1 --- /tmp/GaOYOj9OLv/collectd-3.10.3/src/collectd.1 2006-11-04 12:52:34.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/src/collectd.1 2006-12-21 19:56:55.000000000 +0000 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "COLLECTD 1" -.TH COLLECTD 1 "2006-11-04" "3.10.3" "collectd" +.TH COLLECTD 1 "2006-12-21" "3.10.4" "collectd" .SH "NAME" collectd \- System statistics collection daemon .SH "SYNOPSIS" diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/src/collectd.c /tmp/31Qldau1Le/collectd-3.10.4/src/collectd.c --- /tmp/GaOYOj9OLv/collectd-3.10.3/src/collectd.c 2006-11-04 12:52:35.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/src/collectd.c 2006-12-21 19:56:55.000000000 +0000 @@ -221,16 +221,27 @@ #if HAVE_LIBRRD static int start_server (void) { - /* FIXME use stack here! */ char *host; char *type; char *instance; char *values; - while (loop == 0) + int error_counter = 0; + int status; + + while ((loop == 0) && (error_counter < 3)) { - if (network_receive (&host, &type, &instance, &values) == 0) - plugin_write (host, type, instance, values); + status = network_receive (&host, &type, &instance, &values); + + if (status != 0) + { + if (status < 0) + error_counter++; + continue; + } + error_counter = 0; + + plugin_write (host, type, instance, values); if (host != NULL) free (host); host = NULL; if (type != NULL) free (type); type = NULL; diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/src/collectd.conf.5 /tmp/31Qldau1Le/collectd-3.10.4/src/collectd.conf.5 --- /tmp/GaOYOj9OLv/collectd-3.10.3/src/collectd.conf.5 2006-11-04 12:52:34.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/src/collectd.conf.5 2006-12-21 19:56:55.000000000 +0000 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "COLLECTD.CONF 5" -.TH COLLECTD.CONF 5 "2006-11-04" "3.10.3" "collectd" +.TH COLLECTD.CONF 5 "2006-12-21" "3.10.4" "collectd" .SH "NAME" collectd.conf \- Configuration for the system statistics collection daemon \fBcollectd\fR .SH "SYNOPSIS" diff -Nru /tmp/GaOYOj9OLv/collectd-3.10.3/src/network.c /tmp/31Qldau1Le/collectd-3.10.4/src/network.c --- /tmp/GaOYOj9OLv/collectd-3.10.3/src/network.c 2006-11-04 12:52:35.000000000 +0000 +++ /tmp/31Qldau1Le/collectd-3.10.4/src/network.c 2006-12-21 19:56:55.000000000 +0000 @@ -284,6 +284,7 @@ { if (network_bind_socket (se, ai_ptr) != 0) { + close (se->fd); free (se->addr); free (se); continue; @@ -451,7 +452,7 @@ { syslog (LOG_WARNING, "Invalid message from `%s'", *host); free (*host); *host = NULL; - return (-1); + return (1); } if ((*type = strdup (fields[0])) == NULL)
diff -u tig-0.5/debian/changelog tig-0.5/debian/changelog --- tig-0.5/debian/changelog +++ tig-0.5/debian/changelog @@ -1,3 +1,12 @@ +tig (0.5-2) unstable; urgency=medium + + * Added two upstream patches by Jonas Fonseca <fonseca@diku.dk>: + - Fix a segfault when navigating in tree mode (Closes: #403565). + - Fix an infinite loop. + * Put the sample manpage in /usr/share/doc/tig/examples/. + + -- Sebastian Harl <sh@tokkee.org> Fri, 22 Dec 2006 09:08:57 +0000 + tig (0.5-1) unstable; urgency=low * Initial release (Closes: #389926). diff -u tig-0.5/debian/control tig-0.5/debian/control --- tig-0.5/debian/control +++ tig-0.5/debian/control @@ -2,8 +2,7 @@ Section: utils Priority: optional Maintainer: Sebastian Harl <sh@tokkee.org> -Build-Depends: debhelper (>= 5), libncurses5-dev, asciidoc, xmlto, - docbook-utils +Build-Depends: debhelper (>= 5), libncurses5-dev, asciidoc (>= 7), xmlto, docbook-utils, dpatch Standards-Version: 3.7.2 Package: tig diff -u tig-0.5/debian/rules tig-0.5/debian/rules --- tig-0.5/debian/rules +++ tig-0.5/debian/rules @@ -14,16 +14,18 @@ CFLAGS += -O2 endif +include /usr/share/dpatch/dpatch.make + build: build-stamp -build-stamp: +build-stamp: patch dh_testdir CFLAGS="$(FLAGS)" $(MAKE) all doc touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp @@ -49,9 +51,10 @@ dh_testroot dh_installchangelogs dh_installdocs BUGS TODO manual.pdf + dh_installexamples tigrc dh_link dh_strip - dh_compress + dh_compress -X.pdf dh_fixperms dh_installdeb dh_shlibdeps @@ -62,3 +65,3 @@ binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary-arch binary install patch unpatch only in patch2: unchanged: --- tig-0.5.orig/debian/patches/splitview.dpatch +++ tig-0.5/debian/patches/splitview.dpatch @@ -0,0 +1,40 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## splitview.dpatch by Jonas Fonseca <fonseca@diku.dk> +## +## DP: Never split the tree view when opening another tree view. +## DP: +## DP: The resulting bogus display[] state ment that the blob view was not +## DP: initialized causing segmentation faults in the redrawing code. +## DP: +## DP: Reported by Alexey Tourbin <at@altlinux.ru>, Josh Triplett +## DP: <josh@freedesktop.org> and Jamey Sharp <sharpone@debian.org> + +@DPATCH@ + +diff --git a/tig.c b/tig.c +index fcfbc43..3b320e6 100644 +--- a/tig.c ++++ b/tig.c +@@ -2580,7 +2580,7 @@ tree_read(struct view *view, char *text) + static bool + tree_enter(struct view *view, struct line *line) + { +- enum open_flags flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT; ++ enum open_flags flags; + enum request request; + + switch (line->type) { +@@ -2610,11 +2610,12 @@ tree_enter(struct view *view, struct lin + + /* Trees and subtrees share the same ID, so they are not not + * unique like blobs. */ +- flags |= OPEN_RELOAD; ++ flags = OPEN_RELOAD; + request = REQ_VIEW_TREE; + break; + + case LINE_TREE_FILE: ++ flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT; + request = REQ_VIEW_BLOB; + break; + only in patch2: unchanged: --- tig-0.5.orig/debian/patches/infiniteloop.dpatch +++ tig-0.5/debian/patches/infiniteloop.dpatch @@ -0,0 +1,36 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## infiniteloop.dpatch by Jonas Fonseca <fonseca@diku.dk> +## +## DP: add_keybinding: always allocate the new keybinding +## DP: +## DP: Fixes infinite loop repoted by Miciah. Also simply continue when wgetch +## DP: returns ERR (-1) instead of calling get_keybinding() etc. + +@DPATCH@ + +diff --git a/tig.c b/tig.c +index aac7c4e..6c2b7d0 100644 +--- a/tig.c ++++ b/tig.c +@@ -767,10 +767,9 @@ static struct keybinding *keybindings[AR + static void + add_keybinding(enum keymap keymap, enum request request, int key) + { +- struct keybinding *keybinding = keybindings[keymap]; ++ struct keybinding *keybinding; + +- if (!keybinding) +- keybinding = calloc(1, sizeof(*keybinding)); ++ keybinding = calloc(1, sizeof(*keybinding)); + if (!keybinding) + die("Failed to allocate keybinding"); + +@@ -3532,6 +3531,8 @@ main(int argc, char *argv[]) + + /* Refresh, accept single keystroke of input */ + key = wgetch(status_win); ++ if (key == ERR) ++ continue; + + request = get_keybinding(display[current_view]->keymap, key); + only in patch2: unchanged: --- tig-0.5.orig/debian/patches/00list +++ tig-0.5/debian/patches/00list @@ -0,0 +1,3 @@ +infiniteloop.dpatch +splitview.dpatch +
Attachment:
signature.asc
Description: Digital signature