xtrans: Changes to 'debian-unstable'
ChangeLog | 84 +++++++++++++++++++++
Xtranssock.c | 75 +++++++++----------
Xtransutil.c | 6 +
aclocal.m4 | 4 -
configure | 24 +++---
configure.ac | 2
debian/changelog | 10 ++
debian/xsfbs/xsfbs-autoreconf.mk | 150 ---------------------------------------
debian/xsfbs/xsfbs.mk | 4 -
xtrans.m4 | 18 +++-
10 files changed, 167 insertions(+), 210 deletions(-)
New commits:
commit 5e721e49988b3134ebe723f220c2eba3edd124ca
Author: Julien Cristau <jcristau@debian.org>
Date: Thu May 8 16:56:55 2008 +0200
Update changelogs
diff --git a/ChangeLog b/ChangeLog
index fcadcc0..85d971d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,87 @@
+commit e75b9dad0ae4bc0869af81652d8259675a3c5cac
+Author: Julien Cristau <jcristau@debian.org>
+Date: Thu May 8 16:27:29 2008 +0200
+
+ Bump to 1.2
+
+commit 962ad4d3f8096f5ffa14b32b3ee094f250790c77
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date: Mon Apr 28 23:46:05 2008 +0100
+
+ disable UNIXCONN on MINGW
+
+commit 9e8c0e3356bc6359368b7655d3a717d6c000387e
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date: Sat Apr 26 16:23:19 2008 +0100
+
+ fix build for MAKEWORD
+
+commit 568c5ea02ee1de437833ee0b53a7b3fd7ece084f
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Sat Apr 26 08:53:13 2008 +0100
+
+ Update to winsock2
+
+commit 960902584a3ef125946beb5ebe331b54d697e9d9
+Author: James Cloos <cloos@jhcloos.com>
+Date: Fri Apr 25 15:53:20 2008 -0400
+
+ Fix length calculation for the path for abstract unix domain sockets
+
+ Since the struct has a fixed-lenght char[] its sizeof() contains
+ trailing NUL octets which results in corrupt abstract sockets.
+
+ Instead, take the strlen(3) of the path, plus the single NUL octet
+ (which identifies the path as an abstract path rather than a file-
+ system path) plus the offset from the start of the struct to the
+ start of the char array.
+
+ This fixes:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=15677
+
+commit 3a2a5375b8aab85697b4f2644ab99c3ccf79e658
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date: Wed Apr 23 10:39:30 2008 +0100
+
+ Only call WSAGetLastError() if there has been an
+ error condition.
+
+commit ac13a1a34b61247a21da130f0ba9922f35d3dc3b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Apr 15 12:32:35 2008 -0700
+
+ Sun bug #6688467: _X11TransConvertAddress: Unknown family type on 64-bit SPARC
+
+ Check for socklen_t definition and if found use it instead of size_t or
+ int for the length argument to getpeername/getsockname/etc.
+
+ <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6688467>
+
+commit 556a351de83fc6f401b02213dae95731553c216d
+Author: Loïc Minier <lool@dooz.org>
+Date: Mon Mar 24 15:38:27 2008 -0400
+
+ Bug #10489: Don't retry unix socket connect()s on ENOENT.
+
+ If the socket isn't there, it's not gonna magically appear. Either it's
+ a server socket and you should have just waited for the SIGUSR1 from the
+ server, or it's a stale reference to an ICE socket.
+
+ However, do retry once, so fallback from abstract to filesystem namespace
+ works.
+
+ Originally Debian bug #385976.
+
+commit 3de3e666e0653d4e8ae23fc3e6e31864ddad4059
+Author: Julien Cristau <jcristau@debian.org>
+Date: Sun Mar 23 19:43:32 2008 +0100
+
+ BSD44SOCKETS is the wrong check for SOCK_MAXADDRLEN
+
+ GNU/kFreeBSD defines BSD44SOCKETS, but doesn't have SOCK_MAXADDRLEN.
+ Check for the latter directly.
+
commit 662994b9096181117cec4cae88f24bf6da806159
Author: Adam Jackson <ajax@redhat.com>
Date: Wed Mar 5 21:02:28 2008 -0500
diff --git a/debian/changelog b/debian/changelog
index 550b6b0..6e66372 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+xtrans (1.2-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ + fixes abstract unix domain sockets (closes: #480142)
+ + fixes xserver build on kfreebsd (closes: #472357)
+ + returns failure instead of 'try again' when opening a unix domain socket
+ returns ENOENT (closes: #385976)
+
+ -- Julien Cristau <jcristau@debian.org> Thu, 08 May 2008 16:52:27 +0200
+
xtrans (1.1-1) unstable; urgency=low
* New upstream release.
commit 1388f9ec4bb4086b947ce031a52bcc8c04fc9f20
Author: Julien Cristau <jcristau@debian.org>
Date: Thu May 8 16:52:16 2008 +0200
autoreconf
diff --git a/aclocal.m4 b/aclocal.m4
index 93624fa..eeb82f5 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -65,14 +65,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM],
[Minor version of this package])
- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
diff --git a/configure b/configure
index ca5205a..4d05e6a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for xtrans 1.1.
+# Generated by GNU Autoconf 2.61 for xtrans 1.2.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xtrans'
PACKAGE_TARNAME='xtrans'
-PACKAGE_VERSION='1.1'
-PACKAGE_STRING='xtrans 1.1'
+PACKAGE_VERSION='1.2'
+PACKAGE_STRING='xtrans 1.2'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_subst_vars='SHELL
@@ -1171,7 +1171,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xtrans 1.1 to adapt to many kinds of systems.
+\`configure' configures xtrans 1.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1237,7 +1237,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xtrans 1.1:";;
+ short | recursive ) echo "Configuration of xtrans 1.2:";;
esac
cat <<\_ACEOF
@@ -1328,7 +1328,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xtrans configure 1.1
+xtrans configure 1.2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1342,7 +1342,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xtrans $as_me 1.1, which was
+It was created by xtrans $as_me 1.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2032,7 +2032,7 @@ fi
# Define the identity of the package.
PACKAGE='xtrans'
- VERSION='1.1'
+ VERSION='1.2'
cat >>confdefs.h <<_ACEOF
@@ -3415,7 +3415,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF
- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
@@ -3424,7 +3424,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MINOR $PVM
_ACEOF
- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
@@ -3884,7 +3884,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xtrans $as_me 1.1, which was
+This file was extended by xtrans $as_me 1.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3931,7 +3931,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-xtrans config.status 1.1
+xtrans config.status 1.2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
commit e75b9dad0ae4bc0869af81652d8259675a3c5cac
Author: Julien Cristau <jcristau@debian.org>
Date: Thu May 8 16:27:29 2008 +0200
Bump to 1.2
diff --git a/configure.ac b/configure.ac
index 0846bf1..304fd6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(xtrans, 1.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans)
+AC_INIT(xtrans, 1.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
commit 962ad4d3f8096f5ffa14b32b3ee094f250790c77
Author: Alan Hourihane <alanh@tungstengraphics.com>
Date: Mon Apr 28 23:46:05 2008 +0100
disable UNIXCONN on MINGW
diff --git a/xtrans.m4 b/xtrans.m4
index dfc5dd3..31d456b 100644
--- a/xtrans.m4
+++ b/xtrans.m4
@@ -67,17 +67,21 @@ AC_INCLUDES_DEFAULT
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_TYPE_SIGNAL])
+ [case $host_os in
+ mingw*) unixdef="no" ;;
+ *) unixdef="yes" ;;
+ esac]
AC_ARG_ENABLE(unix-transport,
AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
- [UNIXCONN=$enableval], [UNIXCONN=yes])
- AC_ARG_ENABLE(tcp-transport,
- AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
- [TCPCONN=$enableval], [TCPCONN=yes])
+ [UNIXCONN=$enableval], [UNIXCONN=$unixdef])
AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
if test "$UNIXCONN" = "yes"; then
AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
fi
AC_MSG_RESULT($UNIXCONN)
+ AC_ARG_ENABLE(tcp-transport,
+ AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
+ [TCPCONN=$enableval], [TCPCONN=yes])
AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
AC_MSG_RESULT($TCPCONN)
if test "$TCPCONN" = "yes"; then
commit 9e8c0e3356bc6359368b7655d3a717d6c000387e
Author: Alan Hourihane <alanh@tungstengraphics.com>
Date: Sat Apr 26 16:23:19 2008 +0100
fix build for MAKEWORD
diff --git a/Xtransutil.c b/Xtransutil.c
old mode 100644
new mode 100755
index 9906367..f68b1e7
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -57,6 +57,10 @@ from The Open Group.
#ifdef XTHREADS
#include <X11/Xthreads.h>
#endif
+#ifdef WIN32
+#include <X11/Xlibint.h>
+#include <X11/Xwinsock.h>
+#endif
#ifdef X11_t
commit 568c5ea02ee1de437833ee0b53a7b3fd7ece084f
Author: Colin Harrison <colin.harrison-at-virgin.net>
Date: Sat Apr 26 08:53:13 2008 +0100
Update to winsock2
diff --git a/Xtransutil.c b/Xtransutil.c
index a35c84b..9906367 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -479,7 +479,7 @@ TRANS(WSAStartup) (void)
PRMSG (2,"WSAStartup()\n", 0, 0, 0);
- if (!wsadata.wVersion && WSAStartup(0x0101, &wsadata))
+ if (!wsadata.wVersion && WSAStartup(MAKEWORD(2,2), &wsadata))
return 1;
return 0;
}
commit 960902584a3ef125946beb5ebe331b54d697e9d9
Author: James Cloos <cloos@jhcloos.com>
Date: Fri Apr 25 15:53:20 2008 -0400
Fix length calculation for the path for abstract unix domain sockets
Since the struct has a fixed-lenght char[] its sizeof() contains
trailing NUL octets which results in corrupt abstract sockets.
Instead, take the strlen(3) of the path, plus the single NUL octet
(which identifies the path as an abstract path rather than a file-
system path) plus the offset from the start of the struct to the
start of the char array.
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=15677
diff --git a/Xtranssock.c b/Xtranssock.c
index 8f64429..9be7f5a 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -1180,7 +1180,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port,
if (abstract) {
sockname.sun_path[0] = '\0';
- namelen = sizeof(sockname);
+ namelen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&sockname.sun_path[1]);
}
else
unlink (sockname.sun_path);
commit 3a2a5375b8aab85697b4f2644ab99c3ccf79e658
Author: Colin Harrison <colin.harrison-at-virgin.net>
Date: Wed Apr 23 10:39:30 2008 +0100
Only call WSAGetLastError() if there has been an
error condition.
diff --git a/Xtranssock.c b/Xtranssock.c
index 5ac6a62..8f64429 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -2221,7 +2221,7 @@ TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend)
#ifdef WIN32
{
int ret = ioctlsocket ((SOCKET) ciptr->fd, FIONREAD, (u_long *) pend);
- errno = WSAGetLastError();
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
return ret;
}
#else
@@ -2248,7 +2248,7 @@ TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
{
int ret = recv ((SOCKET)ciptr->fd, buf, size, 0);
#ifdef WIN32
- errno = WSAGetLastError();
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
#endif
return ret;
}
@@ -2268,7 +2268,7 @@ TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size)
{
int ret = send ((SOCKET)ciptr->fd, buf, size, 0);
#ifdef WIN32
- errno = WSAGetLastError();
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
#endif
return ret;
}
@@ -2307,7 +2307,7 @@ TRANS(SocketDisconnect) (XtransConnInfo ciptr)
#ifdef WIN32
{
int ret = shutdown (ciptr->fd, 2);
- errno = WSAGetLastError();
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
return ret;
}
#else
@@ -2326,7 +2326,7 @@ TRANS(SocketINETClose) (XtransConnInfo ciptr)
#ifdef WIN32
{
int ret = close (ciptr->fd);
- errno = WSAGetLastError();
+ if (ret == SOCKET_ERROR) errno = WSAGetLastError();
return ret;
}
#else
commit ac13a1a34b61247a21da130f0ba9922f35d3dc3b
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Tue Apr 15 12:32:35 2008 -0700
Sun bug #6688467: _X11TransConvertAddress: Unknown family type on 64-bit SPARC
Check for socklen_t definition and if found use it instead of size_t or
int for the length argument to getpeername/getsockname/etc.
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6688467>
diff --git a/Xtranssock.c b/Xtranssock.c
index da4afe9..5ac6a62 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -281,6 +281,14 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
#define MAXHOSTNAMELEN 255
#endif
+#if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6))
+# define SOCKLEN_T socklen_t
+#elif defined(SVR4) || defined(__SCO__)
+# define SOCKLEN_T size_t
+#else
+# define SOCKLEN_T int
+#endif
+
/*
* This provides compatibility for apps linked against system libraries
* that don't have IPv6 support.
@@ -330,11 +338,7 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
#endif
struct sockaddr_in socknamev4;
void *socknamePtr;
-#if defined(SVR4) || defined(__SCO__)
- size_t namelen;
-#else
- int namelen;
-#endif
+ SOCKLEN_T namelen;
PRMSG (3,"SocketINETGetAddr(%p)\n", ciptr, 0, 0);
@@ -407,11 +411,7 @@ TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr)
#endif
struct sockaddr_in socknamev4;
void *socknamePtr;
-#if defined(SVR4) || defined(__SCO__)
- size_t namelen;
-#else
- int namelen;
-#endif
+ SOCKLEN_T namelen;
#if defined(IPv6) && defined(AF_INET6)
if (haveIPv6 && ciptr->family == AF_INET6)
@@ -918,7 +918,7 @@ TRANS(SocketCreateListener) (XtransConnInfo ciptr,
int socknamelen, unsigned int flags)
{
- int namelen = socknamelen;
+ SOCKLEN_T namelen = socknamelen;
int fd = ciptr->fd;
int retry;
@@ -998,7 +998,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port, unsigned int
struct sockaddr_in sockname;
#endif
unsigned short sport;
- int namelen = sizeof(sockname);
+ SOCKLEN_T namelen = sizeof(sockname);
int status;
long tmpport;
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
@@ -1315,7 +1315,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
{
XtransConnInfo newciptr;
struct sockaddr_in sockname;
- int namelen = sizeof(sockname);
+ SOCKLEN_T namelen = sizeof(sockname);
PRMSG (2, "SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
@@ -1394,11 +1394,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
{
XtransConnInfo newciptr;
struct sockaddr_un sockname;
-#if defined(SVR4) || defined(__SCO__)
- size_t namelen = sizeof sockname;
-#else
- int namelen = sizeof sockname;
-#endif
+ SOCKLEN_T namelen = sizeof sockname;
PRMSG (2, "SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
@@ -2031,11 +2027,11 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
{
struct sockaddr_un sockname;
- int namelen;
+ SOCKLEN_T namelen;
#if defined(hpux) && defined(X11_t)
struct sockaddr_un old_sockname;
- int old_namelen;
+ SOCKLEN_T old_namelen;
#endif
int abstract = 0;
diff --git a/xtrans.m4 b/xtrans.m4
index 1d80595..dfc5dd3 100644
--- a/xtrans.m4
+++ b/xtrans.m4
@@ -52,6 +52,12 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
#include <sys/socket.h>
#include <netinet/in.h>
])
+
+ # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
+ AC_CHECK_TYPES([socklen_t], [], [], [
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>])
+
]) # XTRANS_TCP_FLAGS
# XTRANS_CONNECTION_FLAGS()
commit c87ea43906787791a87a659c0a9d6312945ffb32
Author: Julien Cristau <jcristau@debian.org>
Date: Sun Apr 13 03:12:18 2008 +0200
Remove xsfbs-autoreconf.mk
It has never been used, and that doesn't look likely to change.
diff --git a/debian/xsfbs/xsfbs-autoreconf.mk b/debian/xsfbs/xsfbs-autoreconf.mk
deleted file mode 100644
index dce8fc8..0000000
--- a/debian/xsfbs/xsfbs-autoreconf.mk
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/usr/bin/make -f
-# $Id$
-
-# Automagical conversion of autoreconf results into quilt patches.
-
-# Copyright 2006 Eugene Konev
-#
-# Licensed under the GNU General Public License, version 2. See the file
-# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
-
-# The idea behind this is storing changes produced by autoreconf as a
-# separate patch on quilt stack (on top of stack actually).
-# The only usable target here is 'autoreconf`. Other targets are not
-# supposed to be called directly. DO NOT invoke them, unless you know what
-# you are doing.
-# The autoreconf target will check if files with names in $(RECONF_CHECKFILES)
-# were changed during patching (from upstream version or from previously
-# autoreconfed version) and call actual autoreconfing if they were.
-# The actual autoreconfing target (doautoreconf) WILL FAIL after
-# calling autoreconf and pushing changes into quilt stack by design. It
-# should never be invoked by automatic build process.
-# The proposed use is adding autoreconf into clean's prerequisites before
-# xsfclean like:
-# - clean: xsfclean
-# + clean: autoreconf xsfclean
-# This will ensure it is called when you build package with dpkg-buildpackage.
-
-# This dir will be used for producing diff of autoreconfed tree
-RECONF_DIR := xsfautoreconf
-
-# This files will be checked for changes
-RECONF_CHECKFILES += configure.ac Makefile.am
-
-# This files will not be hardlinked but copied
-RECONF_NOLINKFILES += aclocal.m4
-
-# This files/dirs will be pruned after autoreconf run
-RECONF_PRUNEFILES += autom4te.cache config.h.in~ aclocal.m4~
-
-# Internal target. Never invoke directly.
-stampdir_target+=check.md5sum
-$(STAMP_DIR)/check.md5sum:
- dh_testdir
- $(MAKE) -f debian/rules prepare
- for F in $(RECONF_CHECKFILES); do \
- find . -wholename ./$(STAMP_DIR) -prune -o -name $$F -print | \
- LC_ALL=C sort | xargs --no-run-if-empty md5sum >>$@; \
- done
-
-# Internal target. Never invoke directly.
-$(STAMP_DIR)/clean.md5sum:
- dh_testdir
- $(MAKE) -f debian/rules unpatch
- rm -f $(STAMP_DIR)/check.md5sum
- $(MAKE) -f debian/rules $(STAMP_DIR)/check.md5sum
- mv $(STAMP_DIR)/check.md5sum $@
-
-# Internal target. Never invoke directly.
-debian/patches/patched.md5sum:
- dh_testdir
- [ -f $(STAMP_DIR)/clean.md5sum ] || \
- $(MAKE) -f debian/rules $(STAMP_DIR)/clean.md5sum
-
- $(MAKE) -f debian/rules patch
- rm -f $(STAMP_DIR)/check.md5sum
- $(MAKE) -f debian/rules $(STAMP_DIR)/check.md5sum
- if ! diff $(STAMP_DIR)/clean.md5sum \
- $(STAMP_DIR)/check.md5sum > /dev/null; then \
- $(MAKE) -f debian/rules doautoreconf; \
- else \
- mv $(STAMP_DIR)/check.md5sum $@; \
- fi
-
-# Internal target. Never invoke directly.
-,PHONY: doautoreconf
-doautoreconf: patch
- quilt push -a >>$(STAMP_DIR)/log/autoreconf 2>&1 || true
- if quilt applied | grep ^autoreconf.diff$$ > /dev/null; then \
- quilt pop -a >>$(STAMP_DIR)/log/autoreconf 2>&1; \
- quilt rename -p autoreconf.diff autoreconf-old.diff \
- >>$(STAMP_DIR)/log/autoreconf 2>&1; \
- quilt delete autoreconf-old.diff >>$(STAMP_DIR)/log/autoreconf 2>&1; \
- quilt push -a >>$(STAMP_DIR)/log/autoreconf 2>&1; \
- fi
-
- if [ -e $(RECONF_DIR) ]; then \
- echo "ERROR: $(RECONF_DIR) already exists. Cleanup by hand"; \
- exit 1; \
- fi
-
- mkdir -p $(RECONF_DIR)/before
- find . -maxdepth 1 -mindepth 1 ! -wholename ./$(RECONF_DIR) \
- -a ! -wholename ./debian -a ! -wholename ./patches \
- -a ! -wholename ./.pc -a ! -wholename ./$(STAMP_DIR) | \
- xargs -i{} cp -al {} $(RECONF_DIR)/before/
-
- for F in $(RECONF_PRUNEFILES); do \
- find $(RECONF_DIR)/before -name $$F -print | \
- xargs --no-run-if-empty rm -r; \
- done
-
- cp -al $(RECONF_DIR)/before $(RECONF_DIR)/after
-
- for F in $(RECONF_NOLINKFILES); do \
- find . -wholename ./$(RECONF_DIR) -prune -o -wholename ./debian \
- -prune -o -wholename ./$(STAMP_DIR) -prune -o -name $$F \
- -print | \
- xargs --no-run-if-empty -i{} cp --remove-destination {} \
- $(RECONF_DIR)/after/{}; \
- done
-
- cd $(RECONF_DIR)/after && autoreconf -v --install && \
- for F in $(RECONF_PRUNEFILES); do \
- find . -name $$F -print | \
- xargs --no-run-if-empty rm -r; \
- done
-
- cd $(RECONF_DIR) && diff -Nru before after > autoreconf.diff || true
-
- quilt import $(RECONF_DIR)/autoreconf.diff \
- >>$(STAMP_DIR)/log/autoreconf 2>&1
-
- mv $(STAMP_DIR)/check.md5sum debian/patches/patched.md5sum
-
- rm -r $(RECONF_DIR) && rm -f patches/autoreconf-old.diff
-
- @echo
- @echo "****************************************************************"
- @echo " This target is made to fail INTENTIONALLY. It should NEVER "
- @echo " be invoked during automatic builds. "
- @echo
- @echo " This target was invoked because you added/removed/changed "
- @echo " patches which modify either configure.ac or Makefile.am and, "
- @echo " thus, require autoreconf run. And all autoreconfing should "
- @echo " happen before uploading. "
- @echo
- @echo " (See also debian/xsfbs/xsfbs-autoreconf.mk) "
- @echo
- @echo " If you see this message, autoreconfing actually SUCCEEDED, "
- @echo " and your build should finish successfully, when rerun. "
- @echo "****************************************************************"
- @echo
- exit 1;
-
-.PHONY: autoreconf
-autoreconf: debian/patches/patched.md5sum patch $(STAMP_DIR)/check.md5sum
- if ! diff $(STAMP_DIR)/check.md5sum \
- debian/patches/patched.md5sum > /dev/null; then \
- $(MAKE) -f debian/rules doautoreconf; \
- fi
diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
index 51fa145..6582a42 100755
--- a/debian/xsfbs/xsfbs.mk
+++ b/debian/xsfbs/xsfbs.mk
@@ -307,6 +307,4 @@ else
echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
endif
-include debian/xsfbs/xsfbs-autoreconf.mk
-
# vim:set noet ai sts=8 sw=8 tw=0:
commit 556a351de83fc6f401b02213dae95731553c216d
Author: Loïc Minier <lool@dooz.org>
Date: Mon Mar 24 15:38:27 2008 -0400
Bug #10489: Don't retry unix socket connect()s on ENOENT.
If the socket isn't there, it's not gonna magically appear. Either it's
a server socket and you should have just waited for the SIGUSR1 from the
server, or it's a stale reference to an ICE socket.
However, do retry once, so fallback from abstract to filesystem namespace
works.
Originally Debian bug #385976.
diff --git a/Xtranssock.c b/Xtranssock.c
index 8a7d2ec..da4afe9 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -2146,8 +2146,13 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
errno = olderrno;
/*
- * If the error was ENOENT, the server may be starting up
- * and we should try again.
+ * If the error was ENOENT, the server may be starting up; we used
+ * to suggest to try again in this case with
+ * TRANS_TRY_CONNECT_AGAIN, but this introduced problems for
+ * processes still referencing stale sockets in their environment.
+ * Hence, we now return a hard error, TRANS_CONNECT_FAILED, and it
+ * is suggested that higher level stacks handle retries on their
+ * level when they face a slow starting server.
*
* If the error was EWOULDBLOCK or EINPROGRESS then the socket
* was non-blocking and we should poll using select
@@ -2161,14 +2166,14 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
else if (olderrno == EINTR)
return TRANS_TRY_CONNECT_AGAIN;
else if (olderrno == ENOENT) {
- /*
- * If opening as abstract socket failed, try again "normally"
- */
- if (abstract)
+ /* If opening as abstract socket failed, try again normally */
+ if (abstract) {
ciptr->transptr->flags &= ~(TRANS_ABSTRACT);
- return TRANS_TRY_CONNECT_AGAIN;
- }
- else {
+ return TRANS_TRY_CONNECT_AGAIN;
+ } else {
+ return TRANS_CONNECT_FAILED;
+ }
+ } else {
PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n",
EGET(),0, 0);
commit 3de3e666e0653d4e8ae23fc3e6e31864ddad4059
Author: Julien Cristau <jcristau@debian.org>
Date: Sun Mar 23 19:43:32 2008 +0100
BSD44SOCKETS is the wrong check for SOCK_MAXADDRLEN
GNU/kFreeBSD defines BSD44SOCKETS, but doesn't have SOCK_MAXADDRLEN.
Check for the latter directly.
diff --git a/Xtranssock.c b/Xtranssock.c
index 94b73e2..8a7d2ec 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -540,7 +540,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port)
}
portlen = strlen(port) + 1; // include space for trailing null
-#ifdef BSD44SOCKETS
+#ifdef SOCK_MAXADDRLEN
if (portlen < 0 || portlen > (SOCK_MAXADDRLEN + 2)) {
PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
return NULL;
@@ -551,7 +551,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port)
PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
return NULL;
}
-#endif /*BSD44SOCKETS*/
+#endif /*SOCK_MAXADDRLEN*/
if ((ciptr = (XtransConnInfo) xcalloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
commit bef8b301bf7649b4156bef2dc26ebf9f7f9244ad
Author: Julien Cristau <jcristau@debian.org>
Date: Fri Mar 21 11:53:16 2008 +0100
xsfbs.mk: make 'serverabi' depend on 'install'
See bug#471193, thanks to Bernhard R. Link <brlink@debian.org>
diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
index 4822173..51fa145 100755
--- a/debian/xsfbs/xsfbs.mk
+++ b/debian/xsfbs/xsfbs.mk
@@ -297,7 +297,7 @@ PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)
endif
.PHONY: serverabi
-serverabi:
+serverabi: install
ifeq ($(SERVERMINVERS),)
@echo error: xserver-xorg-dev needs to be installed
@exit 1
Reply to: