rpms/gimp/F-13 gimp-2.6.9-script-fu-ipv6.patch, NONE, 1.1 .cvsignore, 1.55, 1.56 gimp.spec, 1.210, 1.211 sources, 1.55, 1.56
Nils Philippsen
nphilipp at fedoraproject.org
Mon Jun 28 16:05:19 UTC 2010
- Previous message: rpms/gimp/devel gimp-2.6.9-script-fu-ipv6.patch, NONE, 1.1 .cvsignore, 1.57, 1.58 gimp.spec, 1.218, 1.219 sources, 1.59, 1.60
- Next message: rpms/gimp/F-12 gimp-2.6.9-script-fu-ipv6.patch, NONE, 1.1 .cvsignore, 1.55, 1.56 gimp.spec, 1.203, 1.204 sources, 1.55, 1.56
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nphilipp
Update of /cvs/pkgs/rpms/gimp/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4764
Modified Files:
.cvsignore gimp.spec sources
Added Files:
gimp-2.6.9-script-fu-ipv6.patch
Log Message:
script-fu: make logging IPv6-aware (#198367)
gimp-2.6.9-script-fu-ipv6.patch:
configure.in | 8 +++---
plug-ins/script-fu/script-fu-server.c | 41 +++++++++++++++++++++++++++-------
2 files changed, 37 insertions(+), 12 deletions(-)
--- NEW FILE gimp-2.6.9-script-fu-ipv6.patch ---
commit 859c381a9764d9d91e1ed8539a5919afbbbf2dbc
Author: Nils Philippsen <nils at redhat.com>
Date: Mon Jun 28 16:36:44 2010 +0200
patch: script-fu-ipv6
Squashed commit of the following:
commit e567516ade8ebf74598542f8b319f80eee873c65
Author: Nils Philippsen <nils at redhat.com>
Date: Mon Jun 28 16:07:01 2010 +0200
Bug 623045 - script-fu: make logging IPv6-aware
use getnameinfo() instead of inet_ntoa()
diff --git a/configure.in b/configure.in
index 71f031d..a99cbe4 100644
--- a/configure.in
+++ b/configure.in
@@ -602,14 +602,14 @@ AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT, 1,
AC_DEFINE(HAVE_RINT)])])
-######################################################
-# Check for extra libs needed for inet_ntoa and socket
-######################################################
+########################################################
+# Check for extra libs needed for getnameinfo and socket
+########################################################
gimp_save_LIBS=$LIBS
LIBS=""
-AC_CHECK_FUNCS(inet_ntoa, , AC_CHECK_LIB(nsl, inet_ntoa))
+AC_CHECK_FUNCS(getnameinfo, , AC_CHECK_LIB(nsl, getnameinfo))
AC_CHECK_LIB(socket, socket)
SOCKET_LIBS="$LIBS"
diff --git a/plug-ins/script-fu/script-fu-server.c b/plug-ins/script-fu/script-fu-server.c
index db1de13..8fb8a10 100644
--- a/plug-ins/script-fu/script-fu-server.c
+++ b/plug-ins/script-fu/script-fu-server.c
@@ -310,12 +310,16 @@ script_fu_server_listen (gint timeout)
/* Service the server socket if it has input pending. */
if (FD_ISSET (server_sock, &fds))
{
- struct sockaddr_in clientname;
+ struct sockaddr_storage client;
+ struct sockaddr_in *client_in;
+ struct sockaddr_in6 *client_in6;
+ gchar clientname[NI_MAXHOST];
/* Connection request on original socket. */
- guint size = sizeof (clientname);
+ guint size = sizeof (client);
gint new = accept (server_sock,
- (struct sockaddr *) &clientname, &size);
+ (struct sockaddr *) &client, &size);
+ guint portno;
if (new < 0)
{
@@ -324,13 +328,34 @@ script_fu_server_listen (gint timeout)
}
/* Associate the client address with the socket */
- g_hash_table_insert (clients,
- GINT_TO_POINTER (new),
- g_strdup (inet_ntoa (clientname.sin_addr)));
+
+ /* If all else fails ... */
+ strncpy (clientname, "(error during host address lookup)", NI_MAXHOST-1);
+
+ /* Lookup address */
+ (void) getnameinfo ((struct sockaddr *) &client, size, clientname,
+ sizeof (clientname), NULL, 0, NI_NUMERICHOST);
+
+ /* Determine port number */
+ switch (client.ss_family)
+ {
+ case AF_INET:
+ client_in = (struct sockaddr_in *) &client;
+ portno = (guint) g_ntohs (client_in->sin_port);
+ break;
+ case AF_INET6:
+ client_in6 = (struct sockaddr_in6 *) &client;
+ portno = (guint) g_ntohs (client_in6->sin6_port);
+ break;
+ default:
+ portno = 0;
+ }
+
+ g_hash_table_insert (clients, GINT_TO_POINTER (new),
+ g_strdup (clientname));
server_log ("Server: connect from host %s, port %d.\n",
- inet_ntoa (clientname.sin_addr),
- (unsigned int) ntohs (clientname.sin_port));
+ clientname, portno);
}
/* Service the client sockets. */
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gimp/F-13/.cvsignore,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- .cvsignore 24 Jun 2010 09:15:45 -0000 1.55
+++ .cvsignore 28 Jun 2010 16:05:19 -0000 1.56
@@ -1,2 +1,2 @@
-gimp-2.6.9-1-automake.patch.bz2
gimp-2.6.9.tar.bz2
+gimp-2.6.9-3-autoreconf.patch.bz2
Index: gimp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gimp/F-13/gimp.spec,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -p -r1.210 -r1.211
--- gimp.spec 25 Jun 2010 11:59:13 -0000 1.210
+++ gimp.spec 28 Jun 2010 16:05:19 -0000 1.211
@@ -31,7 +31,7 @@ Summary: GNU Image Manipulation P
Name: gimp
Epoch: 2
Version: 2.6.9
-Release: 2%{?dist}
+Release: 3%{?dist}
%define binver 2.6
%define gimp_lang_ver 20
%define interfacever 2.0
@@ -129,8 +129,12 @@ Patch2: gimp-2.6.6-minimize-dial
Patch3: gimp-2.6.8-gold.patch
# backport: GIMP crashes when clicking any scroll bar from combo boxes
Patch4: gimp-2.6.9-combo-popup.patch
-# Makefile.in files generated by Makefile.am changed in patches
-Patch10: gimp-2.6.9-1-automake.patch.bz2
+# https://bugzilla.redhat.com/show_bug.cgi?id=198367
+# https://bugzilla.gnome.org/show_bug.cgi?id=623045
+# make script-fu logging IPv6 aware
+Patch5: gimp-2.6.9-script-fu-ipv6.patch
+# files changed by autoreconf after applying the above
+Patch10: gimp-2.6.9-3-autoreconf.patch
%description
GIMP (GNU Image Manipulation Program) is a powerful image composition and
@@ -214,7 +218,8 @@ EOF
%patch2 -p1 -b .minimize-dialogs
%patch3 -p1 -b .gold
%patch4 -p1 -b .combo-popup
-%patch10 -p1 -b .automake
+%patch5 -p1 -b .script-fu-ipv6
+%patch10 -p1 -b .autoreconf
%build
# Use PIC/PIE because gimp is likely to deal with files coming from untrusted
@@ -476,6 +481,9 @@ fi
%{_libdir}/gimp/%{interfacever}/plug-ins/help-browser
%changelog
+* Mon Jun 28 2010 Nils Philippsen <nils at redhat.com> - 2:2.6.9-3
+- script-fu: make logging IPv6-aware (#198367)
+
* Fri Jun 25 2010 Nils Philippsen <nils at redhat.com> - 2:2.6.9-2
- fix clicking scroll bar buttons from combo boxes
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gimp/F-13/sources,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- sources 24 Jun 2010 09:15:45 -0000 1.55
+++ sources 28 Jun 2010 16:05:19 -0000 1.56
@@ -1,2 +1,2 @@
-8bd70b4fb59eb79d0009e633db9e5098 gimp-2.6.9-1-automake.patch.bz2
e5d0cc6f3ce127e51d7f3d3124b16a99 gimp-2.6.9.tar.bz2
+c9f1878af298871e0b0088583cc4ce13 gimp-2.6.9-3-autoreconf.patch.bz2
- Previous message: rpms/gimp/devel gimp-2.6.9-script-fu-ipv6.patch, NONE, 1.1 .cvsignore, 1.57, 1.58 gimp.spec, 1.218, 1.219 sources, 1.59, 1.60
- Next message: rpms/gimp/F-12 gimp-2.6.9-script-fu-ipv6.patch, NONE, 1.1 .cvsignore, 1.55, 1.56 gimp.spec, 1.203, 1.204 sources, 1.55, 1.56
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list