Hello community,
here is the log from the commit of package multitail for openSUSE:Factory checked in at 2012-01-04 07:25:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/multitail (Old)
and /work/SRC/openSUSE:Factory/.multitail.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "multitail", Maintainer is "mmj@suse.de"
Changes:
--------
--- /work/SRC/openSUSE:Factory/multitail/multitail.changes 2011-09-23 02:13:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.multitail.new/multitail.changes 2012-01-04 07:25:18.000000000 +0100
@@ -1,0 +2,16 @@
+Sun Jan 1 12:21:35 UTC 2012 - pascal.bleser@opensuse.org
+
+- add IPv6 support for sending to a syslog server and receiving syslog events
+
+- update to 5.2.9:
+ * fixes a segfault which happened when searching for strings with printf
+ escapes in them (e.g., %n)
+
+-------------------------------------------------------------------
+Fri Apr 15 20:34:12 UTC 2011 - pascal.bleser@opensuse.org
+
+- update to 5.2.8:
+ * handle sources that disappear before reading more gracefully
+ * no longer segfault when a file is truncated
+
+-------------------------------------------------------------------
Old:
----
multitail-5.2.7.tar.bz2
New:
----
multitail-5.2.9.tgz
multitail-getaddrinfo.patch
multitail-remove_date.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ multitail.spec ++++++
--- /var/tmp/diff_new_pack.F4icHc/_old 2012-01-04 07:25:18.000000000 +0100
+++ /var/tmp/diff_new_pack.F4icHc/_new 2012-01-04 07:25:18.000000000 +0100
@@ -1,35 +1,22 @@
-#
-# spec file for package multitail
-#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# vim: set ts=4 sw=4 et:
# Copyright (c) 2004-2010 oc2pus, pbleser
-#
-# All modifications and additions to the file contributed by third parties
-# remain the property of their copyright owners, unless otherwise agreed
-# upon. The license for this file, and modifications and additions to the
-# file, is the same license as for the pristine package itself (unless the
-# license for the pristine package is not an Open Source License, in which
-# case the license is the MIT License). An "Open Source License" is a
-# license that conforms to the Open Source Definition (Version 1.9)
-# published by the Open Source Initiative.
-
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
-
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
Name: multitail
Summary: Tail Multiple Files
-Version: 5.2.7
-Release: 1
+Version: 5.2.9
+Release: 0
Group: System/X11/Terminals
License: GNU General Public License version 2 or later (GPLv2 or later)
-Url: http://www.vanheusden.com/multitail/
-# http://www.vanheusden.com/multitail/multitail-%{version}.tgz
-Source: multitail-%{version}.tar.bz2
-Patch: %{name}-bufferoverflowstrncat.patch
+URL: http://www.vanheusden.com/multitail/
+Source: http://www.vanheusden.com/multitail/multitail-%{version}.tgz
+Patch1: multitail-bufferoverflowstrncat.patch
+Patch2: multitail-remove_date.patch
+# PATCH-FIX-UPSTREAM multitail-getadddrinfo.patch - pascal.bleser@opensuse.org -- replaces IPv4 socket code with getaddrinfo which is more flexible, safe and supports IPv6, for sending to a syslog server and receiving syslog events in multitail
+Patch3: multitail-getaddrinfo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ncurses-devel
+BuildRequires: ncurses-devel make gcc
%description
MultiTail lets you view one or multiple files like the original
@@ -47,16 +34,11 @@
viewing the output of external software, MultiTail can mimic the
functionality of tools like 'watch' and such.
-
-
-
-Authors:
---------
- Folkert van Heusden
-
%prep
%setup -q
-%patch -p1
+%patch1 -p1
+%patch2
+%patch3
%__sed -i 's/\r//g' manual.html
%__chmod 644 manual.html
@@ -65,7 +47,7 @@
%build
export CFLAGS="%{optflags} -I%{_includedir}/ncurses"
-%__make %{?jobs:-j%{jobs}} DEBUG=""
+%__make %{?_smp_mflags} DEBUG=""
%install
%__install -dm 755 %{buildroot}%{_sysconfdir}
++++++ multitail-getaddrinfo.patch ++++++
--- cmdline.c.orig 2012-01-01 12:48:44.644473139 +0100
+++ cmdline.c 2012-01-01 13:17:50.776411019 +0100
@@ -182,11 +182,16 @@
void add_redir_to_socket(char filtered, char *prio, char *fac, char *address, redirect_t **predir, int *n_redirect)
{
- struct hostent *hp;
char *local_address = mystrdup(address, __FILE__, __PRETTY_FUNCTION__, __LINE__);
char *colon = strchr(local_address, ':');
int prio_nr = -1, fac_nr = -1;
int loop;
+ char* node;
+ char* service;
+ struct addrinfo hints;
+ struct addrinfo* result;
+ struct addrinfo* rp;
+ int s, sfd;
*predir = (redirect_t *)myrealloc(*predir, (*n_redirect) * sizeof(redirect_t), __FILE__, __PRETTY_FUNCTION__, __LINE__);
@@ -199,21 +204,44 @@
(*predir)[*n_redirect].redirect = mystrdup(address, __FILE__, __PRETTY_FUNCTION__, __LINE__);
- (*predir)[*n_redirect].fd = socket(AF_INET, SOCK_DGRAM, 0);
- if ((*predir)[*n_redirect].fd == -1)
- error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Cannot create socket for redirecting via syslog protocol.\n");
-
- memset(&(*predir)[*n_redirect].sai, 0x00, sizeof((*predir)[*n_redirect].sai));
- (*predir)[*n_redirect].sai.sin_family = AF_INET;
if (colon)
{
*colon = 0x00;
- (*predir)[*n_redirect].sai.sin_port = atoi(colon + 1);
+ node = local_address;
+ service = colon + 1;
}
else
- (*predir)[*n_redirect].sai.sin_port = 514;
- hp = gethostbyname(local_address);
- memcpy(&(*predir)[*n_redirect].sai.sin_addr.s_addr, hp -> h_addr, hp -> h_length);
+ {
+ node = local_address;
+ service = "syslog";
+ }
+
+ memset(&hints, 0x00, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_flags = 0;
+ hints.ai_protocol = 0;
+
+ s = getaddrinfo(node, service, &hints, &result);
+ if (s != 0)
+ error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Cannot create socket for redirecting via syslog protocol: %s.\n", gai_strerror(s));
+
+ for (rp = result; rp != NULL; rp = rp -> ai_next)
+ {
+ sfd = socket(rp -> ai_family, rp -> ai_socktype, rp -> ai_protocol);
+ if (sfd == -1)
+ continue;
+ if (connect(sfd, rp -> ai_addr, rp -> ai_addrlen) != -1)
+ break;
+ close(sfd);
+ }
+
+ freeaddrinfo(result);
+
+ if (rp == NULL)
+ error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Cannot create socket for redirecting via syslog protocol.\n");
+
+ (*predir)[*n_redirect].fd = sfd;
for(loop=0; loop<8; loop++)
{
--- mt.c.orig 2012-01-01 13:07:22.315433377 +0100
+++ mt.c 2012-01-01 13:17:29.752411767 +0100
@@ -2295,31 +2295,54 @@
{
char *dummy = mystrdup(cur -> filename, __FILE__, __PRETTY_FUNCTION__, __LINE__);
char *colon = strchr(dummy, ':');
- struct sockaddr_in sa;
- socklen_t ssai_len = sizeof(sa);
- char *host = "0.0.0.0";
- int port = 514;
+ struct addrinfo hints;
+ struct addrinfo* result;
+ struct addrinfo* rp;
+ int sfd, s;
- cur -> wfd = cur -> fd = socket(AF_INET, SOCK_DGRAM, 0);
- if (cur -> fd == -1)
- error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Failed to create socket for receiving syslog data.\n");
+ char *host = NULL;
+ char *service = "syslog";
if (colon)
{
- port = atoi(colon + 1);
- if (port <= 0)
- error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "--[Ll]isten requires a >= 0 portnumber.\n");
+ service = colon + 1;
*colon = 0x00;
if (colon > dummy)
host = dummy;
}
- memset(&sa, 0x00, ssai_len);
- sa.sin_family = AF_INET;
- sa.sin_port = htons(port);
- sa.sin_addr.s_addr = inet_addr(host);
- if (bind(cur -> fd, (struct sockaddr *)&sa, ssai_len) == -1)
- error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Failed to bind socket to %s.\n", cur -> filename);
+ memset(&hints, 0x00, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_flags = AI_PASSIVE;
+ hints.ai_protocol = 0;
+ hints.ai_canonname = NULL;
+ hints.ai_addr = NULL;
+ hints.ai_next = NULL;
+
+ s = getaddrinfo(host, service, &hints, &result);
+ if (s != 0)
+ error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Failed to create socket for receiving syslog data on %s: %s.\n", cur -> filename, gai_strerror(s));
+
+ for (rp = result; rp != NULL; rp = rp -> ai_next)
+ {
+ sfd = socket(rp -> ai_family, rp -> ai_socktype, rp -> ai_protocol);
+ if (sfd == -1)
+ continue;
+ if (bind(sfd, rp -> ai_addr, rp -> ai_addrlen) == 0)
+ break;
+ close(sfd);
+ }
+
+ freeaddrinfo(result);
+
+ if (rp == NULL)
+ error_exit(__FILE__, __PRETTY_FUNCTION__, __LINE__, "Failed to create socket for receiving syslog data on %s.\n", cur -> filename);
+
+ cur -> wfd = cur -> fd = sfd;
+
+ cur -> wfd = cur -> fd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (cur -> fd == -1)
myfree(dummy);
++++++ multitail-remove_date.patch ++++++
--- error.c.orig 2011-01-20 07:22:09.000000000 +0100
+++ error.c 2011-01-20 07:22:18.000000000 +0100
@@ -33,7 +33,6 @@
va_end(ap);
if (errno) fprintf(stderr, "\nerrno variable (if applicable): %d which means %s\n\n", errno, strerror(errno));
- fprintf(stderr, "\nBinary build at %s %s\n", __DATE__, __TIME__);
dump_mem(SIGHUP);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org