[x11trace] Initial commit of x11trace (#1113541)
David Howells
dhowells at fedoraproject.org
Tue Jul 8 15:05:02 UTC 2014
commit 82972fc12e96b14af6b885cf4cff23b5d2a82156
Author: David Howells <dhowells at redhat.com>
Date: Tue Jul 8 15:50:26 2014 +0100
Initial commit of x11trace (#1113541)
Renamed from xtrace (#1067665)
.gitignore | 1 +
sources | 1 +
x11trace-1.3.1-git-HEAD.patch | 494 ++++++++++++++++++++++++++++
x11trace-1.3.1-rename-manpage.patch | 23 ++
x11trace-1.3.1-rename-to-x11trace.patch | 130 ++++++++
x11trace-1.3.1-use-AC_CONFIG_HEADERS.patch | 23 ++
x11trace.spec | 83 +++++
7 files changed, 755 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a734fee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/xtrace_1.3.1.orig.tar.gz
diff --git a/sources b/sources
index e69de29..5741f8c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c87a2d2f63872f2f7530df0ac946058b xtrace_1.3.1.orig.tar.gz
diff --git a/x11trace-1.3.1-git-HEAD.patch b/x11trace-1.3.1-git-HEAD.patch
new file mode 100644
index 0000000..b721175
--- /dev/null
+++ b/x11trace-1.3.1-git-HEAD.patch
@@ -0,0 +1,494 @@
+Bring xtrace-1.3.1 up to git HEAD (commit 3ae9cf2f457b0ddf0ecc6405e7073c966f8fab06).
+---
+ ChangeLog | 8 +++
+ NEWS | 3 +
+ atoms.c | 2
+ configure.ac | 4 +
+ parse.c | 29 ++++++++++++-
+ parse.h | 2
+ requests.proto | 25 ++++++++++-
+ translate.c | 17 ++++++-
+ xinput.proto | 40 +++++++++++++++--
+ xkb.proto | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 10 files changed, 239 insertions(+), 18 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 97a398a..07b4aca 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++2013-05-26
++ * xinput: improve ValuatorClass (previously AxisClass),
++ add ScrollClass, TouchClass
++ * mark some font properties as atoms
++2013-05-21
++ * xkb: add partial support for GetMap, GetNames and GetNamedIndicator
++2013-05-21
++ * Add handling of GetAtomName
+ 2012-06-01
+ * fix parsing of unusual QueryExtension requests
+ 2012-01-09
+diff --git a/NEWS b/NEWS
+index b3c5f92..ae68c6c 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,6 @@
++new after 1.3.1:
++- also remember atoms seen by GetAtomName
++- partial improvements to xkb, xinput, fontprops
+ new after 1.3.0:
+ - fix query extension parsing
+ new after 1.2.0:
+diff --git a/atoms.c b/atoms.c
+index e9b871f..9baf1cc 100644
+--- a/atoms.c
++++ b/atoms.c
+@@ -87,7 +87,6 @@ const char *getAtom(struct connection *c UNUSED, uint32_t atom) {
+ }
+ void internAtom(struct connection *c UNUSED, uint32_t atom, struct atom *data) {
+ struct atom **p;
+- uint32_t lastmask;
+
+ if( atom <= CONSTANT_ATOMS ) {
+ free(data);
+@@ -98,7 +97,6 @@ void internAtom(struct connection *c UNUSED, uint32_t atom, struct atom *data) {
+ data->atom = atom;
+
+ p = &atom_root;
+- lastmask = 0;
+ while( *p != NULL ) {
+ uint32_t k;
+ k = (*p)->atom;
+diff --git a/configure.ac b/configure.ac
+index 4787d59..1c32aa6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,10 +37,12 @@ AC_CACHE_CHECK([Checking for _POSIX_TIMERS and _POSIX_MONOTONIC_CLOCK],[ac_cv_mo
+
+ if test $ac_cv_monotonic_clock = yes ; then
+ AC_DEFINE([HAVE_MONOTONIC_CLOCK], 1, [Define if clock_gettime(CLOCK_MONOTONIC) should work])
++ AC_CHECK_FUNC([clock_gettime],[],[
+ AC_CHECK_LIB(rt, clock_gettime, [], [AC_MSG_ERROR([_POSIX_TIMERS suggests clock_gettime should work but it seems not to work, though])])
++ ])
+ fi
+
+-AC_CHECK_FUNCS([strndup asprintf socket])
++AC_CHECK_FUNCS([strndup asprintf socket tdestroy])
+ if test $ac_cv_func_socket = no; then
+ AC_CHECK_LIB(socket, socket, [AC_DEFINE(HAVE_SOCKET)
+ LIBS="$LIBS -lsocket -lnsl"; break],[AC_MSG_ERROR([Could not find socket library function])])
+diff --git a/parse.c b/parse.c
+index c79e56a..d3125f9 100644
+--- a/parse.c
++++ b/parse.c
+@@ -174,12 +174,14 @@ struct expectedreply {
+ dt_UNKNOWN_EXTENSION, /* uextension used */
+ dt_EXTENSION, /* extension used */
+ dt_ATOM, /* atom used */
++ dt_CARD32, /* card32 used */
+ } data_type;
+ union {
+ void *data;
+ struct atom *atom;
+ const struct extension *extension;
+ struct unknownextension *uextension;
++ uint32_t card32;
+ } data;
+ unsigned long values[];
+ };
+@@ -1505,6 +1507,20 @@ bool requestInternAtom(struct connection *c, bool pre, bool bigrequest UNUSED, s
+ return false;
+ }
+
++bool requestGetAtomName(struct connection *c, bool pre, bool bigrequest UNUSED, struct expectedreply *reply) {
++ uint32_t atom;
++ if( pre )
++ return false;
++ if( reply == NULL)
++ return false;
++ if( c->clientignore < 8 )
++ return false;
++ atom = clientCARD32(4);
++ reply->data_type = dt_CARD32;
++ reply->data.card32 = atom;
++ return false;
++}
++
+ /* Reactions to some replies */
+
+ void replyListFontsWithInfo(struct connection *c, bool *ignore, bool *dontremove, struct expectedreply *dummy UNUSED) {
+@@ -1562,6 +1578,16 @@ void replyInternAtom(struct connection *c, bool *ignore UNUSED, bool *dontremove
+ internAtom(c, atom, d->data.atom);
+ }
+
++void replyGetAtomName(struct connection *c, bool *ignore UNUSED, bool *dontremove UNUSED, struct expectedreply *d) {
++ struct atom *atom;
++ uint16_t len;
++ if( d->data_type != dt_CARD32 || d->data.card32 == 0 )
++ return;
++ len = serverCARD16(8);
++ atom = newAtom((const char *)c->serverbuffer+32, len);
++ internAtom(c, d->data.card32, atom);
++}
++
+ #define ft_COUNT8 ft_STORE8
+ #define ft_COUNT16 ft_STORE16
+ #define ft_COUNT32 ft_STORE32
+@@ -1794,7 +1820,7 @@ static inline void print_server_event(struct connection *c) {
+
+
+ static inline void print_server_reply(struct connection *c) {
+- unsigned int cmd,seq;
++ unsigned int seq;
+ struct expectedreply *replyto,**lastp;
+ size_t len;
+ unsigned long stackvalues[30];
+@@ -1808,7 +1834,6 @@ static inline void print_server_reply(struct connection *c) {
+ if( len > c->servercount )
+ len = c->servercount;
+
+- cmd = serverCARD8(1);
+ seq = serverCARD16(2);
+ for( lastp = &c->expectedreplies ;
+ (replyto=*lastp) != NULL ; lastp=&replyto->next){
+diff --git a/parse.h b/parse.h
+index e7dcdb6..e3c8a88 100644
+--- a/parse.h
++++ b/parse.h
+@@ -167,8 +167,10 @@ extern const struct parameter *setup_parameters;
+ /* special handlers, for the SPECIAL requests/events */
+ extern request_func requestQueryExtension;
+ extern request_func requestInternAtom;
++extern request_func requestGetAtomName;
+ extern reply_func replyListFontsWithInfo;
+ extern reply_func replyQueryExtension;
+ extern reply_func replyInternAtom;
++extern reply_func replyGetAtomName;
+
+ #endif
+diff --git a/requests.proto b/requests.proto
+index dc74386..57466fa 100644
+--- a/requests.proto
++++ b/requests.proto
+@@ -111,7 +111,7 @@ CirculateWindow
+ GetGeometry RESPONDS
+ QueryTree RESPONDS
+ InternAtom RESPONDS SPECIAL
+-GetAtomName RESPONDS
++GetAtomName RESPONDS SPECIAL
+ ChangeProperty
+ DeleteProperty
+ GetProperty RESPONDS /* 20*/
+@@ -1023,6 +1023,29 @@ TYPE 32bits CARD32
+
+ LIST FONTPROP length 8
+ 0 name ATOM
++IF 0 ATOM "FONT"
++4 value ATOM
++ELSEIF 0 ATOM "FAMILY_NAME"
++4 value ATOM
++ELSEIF 0 ATOM "FOUNDRY"
++4 value ATOM
++ELSEIF 0 ATOM "FACE_NAME"
++4 value ATOM
++ELSEIF 0 ATOM "COPYRIGHT"
++4 value ATOM
++ELSEIF 0 ATOM "NOTICE"
++4 value ATOM
++ELSEIF 0 ATOM "CHARSET_REGISTRY"
++4 value ATOM
++ELSEIF 0 ATOM "CHARSET_ENCODING"
++4 value ATOM
++ELSEIF 0 ATOM "FONT_TYPE"
++4 value ATOM
++ELSEIF 0 ATOM "SLANT"
++4 value ATOM
++ELSEIF 0 ATOM "FULL_NAME"
++4 value ATOM
++ELSE
+ 4 value 32bits
+ END
+
+diff --git a/translate.c b/translate.c
+index 134cf40..05dae42 100644
+--- a/translate.c
++++ b/translate.c
+@@ -1141,7 +1141,7 @@ static bool parse_parameters(struct parser *parser, struct variable *variable, b
+ }
+ if( strcmp(position, "SIZE") == 0 ) {
+ const char *v;
+- unsigned long t = 1;
++ //unsigned long t = 1;
+
+ v = get_const_token(parser, false);
+ if( v == NULL )
+@@ -1180,8 +1180,8 @@ static bool parse_parameters(struct parser *parser, struct variable *variable, b
+ }
+ error(parser, "'TIMES' not yet supported!");
+ continue;
+- v = get_const_token(parser, false);
+- t = parse_number(parser, v);
++ //v = get_const_token(parser, false);
++ //t = parse_number(parser, v);
+ }
+ no_more_arguments(parser);
+ state->sizemarker_set = true;
+@@ -2183,11 +2183,13 @@ bool translate(struct parser *parser, const char *name) {
+ return false;
+ }
+
++#ifdef HAVE_TDESTROY
+ static void free_varname(void *nodep) {
+ struct varname *vn = nodep;
+ variable_unref(vn->variable);
+ free(vn);
+ }
++#endif
+
+ bool parser_free(struct parser *parser) {
+ bool success = !parser->error;
+@@ -2198,12 +2200,18 @@ bool parser_free(struct parser *parser) {
+ struct namespace *ns = parser->namespaces;
+ parser->namespaces = ns->next;
+ int i;
++#ifdef HAVE_TDESTROY
+ enum variable_type vt;
++#endif
+
+ assert( ns->refcount == 0 );
++#ifdef HAVE_TDESTROY
+ for( vt = 0 ; vt < vt_COUNT ; vt ++ ) {
+ tdestroy(ns->variables[vt], free_varname);
+ }
++#else
++#warning Not freeing some memory as your libc lacks tdestroy
++#endif
+ free(ns->name);
+ free(ns->extension);
+ for( i = 0 ; i < ns->num_requests ; i++ ) {
+@@ -2456,6 +2464,9 @@ static const struct request *finalize_requests(struct parser *parser, struct nam
+ } else if( strcmp(rs[i].name, "ListFontsWithInfo") == 0 ) {
+ /* this should be changed to a general approach */
+ rs[i].reply_func = replyListFontsWithInfo;
++ } else if( strcmp(rs[i].name, "GetAtomName") == 0) {
++ rs[i].request_func = requestGetAtomName;
++ rs[i].reply_func = replyGetAtomName;
+ } else {
+ fprintf(stderr, "No specials available for '%s::%s'!\n",
+ ns->name, rs[i].name);
+diff --git a/xinput.proto b/xinput.proto
+index 73ddad7..3d9d596 100644
+--- a/xinput.proto
++++ b/xinput.proto
+@@ -1015,9 +1015,27 @@ TYPE SETofBUTTONMASK CARD32
+ CONSTANTS class
+ 0 KeyClass
+ 1 ButtonClass
+-2 AxisClass
++2 ValuatorClass
++3 ScrollClass
++8 TouchClass
+ END
+
++CONSTANTS scrolltype
++1 vertical
++2 horizontal
++END
++TYPE ScrollType ENUM32 scrolltype
++BITMASK scrollflag
++1<<0 NoEmulation
++1<<1 Preferred
++END
++TYPE ScrollFlag BITMASK32 scrollflag
++CONSTANTS touchmode
++1 DirectTouch
++2 DependentTouch
++END
++TYPE TouchMode ENUM8 touchmode
++
+ LIST CLASS variable min-length 8
+ 0 type ENUM16 class
+ 2 length COUNT16
+@@ -1029,15 +1047,25 @@ ELSEIF 0 CARD16 $class:ButtonClass
+ 6 num_buttons COUNT16
+ 8 state SETofBUTTONMASK
+ 12 labels LISTofATOM
+-ELSEIF 0 CARD16 $class:AxisClass
+-6 axisnumber COUNT16
++ELSEIF 0 CARD16 $class:ValuatorClass
++6 number UINT16
+ 8 label ATOM
+-12 min FRACTION32_32
+-20 max FRACTION32_32
+-28 value FRACTION32_32
++12 min FP3232
++20 max FP3232
++28 value FP3232
+ 36 resolution UINT32
+ 40 mode CARD8
+ NEXT 44
++ELSEIF 0 CARD16 $class:ScrollClass
++6 number UINT16
++8 type ScrollType
++12 flags ScrollFlag
++16 increment FP3232
++NEXT 24
++ELSEIF 0 CARD16 $class:TouchClass
++6 mode TouchMode
++7 touch_max UINT8
++NEXT 8
+ ELSE
+ 0 pad LISTofCARD32
+ END
+diff --git a/xkb.proto b/xkb.proto
+index c747133..a88b78a 100644
+--- a/xkb.proto
++++ b/xkb.proto
+@@ -11,16 +11,16 @@ GetState RESPONDS UNSUPPORTED /* 4 */
+ LatchLockState UNSUPPORTED /* 5 */
+ GetControls RESPONDS UNSUPPORTED /* 6 */
+ SetControls UNSUPPORTED /* 7 */
+-GetMap RESPONDS UNSUPPORTED /* 8 */
++GetMap RESPONDS /* 8 */
+ SetMap UNSUPPORTED /* 9 */
+ GetCompatMap RESPONDS UNSUPPORTED /* 10 */
+ SetCompatMap UNSUPPORTED /* 11 */
+ GetIndicatorState RESPONDS UNSUPPORTED /* 12 */
+ GetIndicatorMap RESPONDS UNSUPPORTED /* 13 */
+ SetIndicatorMap UNSUPPORTED /* 14 */
+-GetNamedIndicator RESPONDS UNSUPPORTED /* 15 */
++GetNamedIndicator RESPONDS /* 15 */
+ SetNamedIndicator UNSUPPORTED /* 16 */
+-GetNames RESPONDS UNSUPPORTED /* 17 */
++GetNames RESPONDS /* 17 */
+ SetNames UNSUPPORTED /* 18 */
+ GetGeometry RESPONDS UNSUPPORTED /* 19 */
+ SetGeometry UNSUPPORTED /* 20 */
+@@ -82,6 +82,127 @@ REQUEST Bell
+ 24 window WINDOW
+ END
+
++TYPE KEYCODE UINT8
++
++REQUEST GetMap
++ 4 deviceSpec DEVICESPEC
++ 6 full UINT16
++ 8 partial UINT16
++10 firstType UINT8
++11 nTypes UINT8
++12 firstKeySym KEYCODE
++13 nKeySyms UINT8
++14 firstKeyAct KEYCODE
++15 nKeyActs UINT8
++16 firstKeyBehavior KEYCODE
++17 nKeyBehaviors UINT8
++18 virtualMods UINT16
++END
++
++RESPONSE GetMap
++ 2 deviceID UINT8
++10 minKeyCode KEYCODE
++11 maxKeyCode KEYCODE
++12 present UINT16
++14 firstType UINT8
++15 nTypes UINT8
++16 totalTypes UINT8
++17 firstKeySym KEYCODE
++18 totalSyms UINT16
++20 nKeySyms UINT8
++21 firstKeyAct KEYCODE
++22 totalActs UINT16
++24 nKeyActs UINT8
++25 firstKeyBehavior KEYCODE
++26 nKeyBehaviors UINT8
++27 totalKeyBehaviors UINT8
++28 firstKeyExplicit KEYCODE
++29 nKeyExplicit UINT8
++30 totalKeyExplicit UINT8
++31 firstModMapKey KEYCODE
++32 nModMapKeys UINT8
++33 totalModMapKeys UINT8
++34 firstVModMapKey KEYCODE
++35 nVModMapKeys UINT8
++36 totalVModMapKeys UINT8
++38 virtualMods UINT16
++# TODO
++40 not-yet-supported LISTofCARD8
++END
++
++BITMASK namedetailmask
++ 1 keycodes
++ 2 geometry
++ 4 symbols
++ 8 phys_symbols
++ 16 type
++ 32 compat
++ 64 key_type_names
++ 128 key_type_level_names
++ 256 indicators
++ 512 key_names
++1024 key_aliases
++2048 vmods
++4096 groups
++8192 radio_groups
++END
++
++REQUEST GetNames
++ 4 deviceSpec DEVICESPEC
++ 8 which BITMASK32 namedetailmask
++END
++
++RESPONSE GetNames
++ 1 deviceID UINT8
++ 8 which BITMASK32 namedetailmask
++12 minKeyCode KEYCODE
++13 maxKeyCode KEYCODE
++14 nTypes UINT8
++15 groupNames UINT8
++16 virtualMods UINT16
++18 firstKey KEYCODE
++19 nKeys UINT8
++20 indicators CARD32
++24 nRadioGroups UINT8
++25 nKeyAliases UINT8
++26 nKTLevels UINT16
++# TODO
++32 valueList LISTofCARD8
++END
++
++CONSTANTS LEDCLASSSPEC
++0 KbdFeedbackClass
++4 LedFeedbackClass
++0x0300 DfltXIClass
++0x0500 AllXIClasses
++0xff00 XINone
++END
++
++REQUEST GetNamedIndicator
++ 4 deviceSpec DEVICESPEC
++ 6 ledClass ENUM16 LEDCLASSSPEC
++ 8 ledID IDSPEC
++12 indicator ATOM
++END
++
++RESPONSE GetNamedIndicator
++ 1 deviceID UINT8
++ 8 indicator ATOM
++12 found BOOL
++13 on BOOL
++14 realIndicator BOOL
++15 ndx UINT8
++16 flags CARD8
++17 whichGroups CARD8
++18 groups CARD8
++19 whichMods CARD8
++20 mods CARD8
++21 realMods CARD8
++22 virtualMods CARD16
++24 ctrls CARD32
++28 supported BOOL
++END
++
+ EVENT XkbEvent
+ # all events packaged into one? WTF?
+ 1 type UINT8
diff --git a/x11trace-1.3.1-rename-manpage.patch b/x11trace-1.3.1-rename-manpage.patch
new file mode 100644
index 0000000..3a715fd
--- /dev/null
+++ b/x11trace-1.3.1-rename-manpage.patch
@@ -0,0 +1,23 @@
+commit 826f5c0409f80522d39cb0ef8cd1a480a9ad3206
+Author: David Howells <dhowells at redhat.com>
+Date: Thu Jun 26 11:18:06 2014 +0100
+
+ Rename the manual page to x11trace.1
+
+diff --git a/Makefile.am b/Makefile.am
+index 7d9bb2e..5973dac 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,7 +6,7 @@ x11trace_SOURCES = main.c x11common.c x11client.c x11server.c parse.c copyauth.c
+
+ noinst_HEADERS = xtrace.h parse.h stringlist.h translate.h
+
+-dist_man_MANS = xtrace.1
++dist_man_MANS = x11trace.1
+
+ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/stamp-h.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
+
+diff --git a/xtrace.1 b/x11trace.1
+similarity index 100%
+rename from xtrace.1
+rename to x11trace.1
diff --git a/x11trace-1.3.1-rename-to-x11trace.patch b/x11trace-1.3.1-rename-to-x11trace.patch
new file mode 100644
index 0000000..6691d98
--- /dev/null
+++ b/x11trace-1.3.1-rename-to-x11trace.patch
@@ -0,0 +1,130 @@
+commit be870f2b2dac0c6a13881583034e41b0a22e21b9
+Author: David Howells <dhowells at redhat.com>
+Date: Thu Feb 20 18:25:31 2014 +0000
+
+ Change "xtrace" to "x11trace"
+
+ Change "xtrace" to "x11trace" within the sources without renaming any files to
+ confuse things. That's done in a later commit. Unfortunately, the name
+ "xtrace" conflicts with a utility program provided by glibc.
+
+diff --git a/Makefile.am b/Makefile.am
+index 163f5df..7d9bb2e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,8 @@
+-bin_PROGRAMS = xtrace
++bin_PROGRAMS = x11trace
+
+ AM_CPPFLAGS = -DPKGDATADIR='"$(pkgdatadir)"'
+
+-xtrace_SOURCES = main.c x11common.c x11client.c x11server.c parse.c copyauth.c atoms.c translate.c stringlist.c
++x11trace_SOURCES = main.c x11common.c x11client.c x11server.c parse.c copyauth.c atoms.c translate.c stringlist.c
+
+ noinst_HEADERS = xtrace.h parse.h stringlist.h translate.h
+
+diff --git a/README b/README
+index 3942968..1dc3475 100644
+--- a/README
++++ b/README
+@@ -1,13 +1,13 @@
+- XTRACE 1.1
+- ----------
++ X11TRACE 1.3.1
++ --------------
+
+-What strace is for system calls, xtrace is for X11 connections:
++What strace is for system calls, x11trace is for X11 connections:
+ you hook it between one or more X11 clients and an X server and
+ it prints the requests going from client to server and the replies,
+ events and errors going the other way.
+
+ Short howto:
+-Run xtrace, which defaults to listening at :9 and forwarding to
++Run x11trace, which defaults to listening at :9 and forwarding to
+ your current $DISPLAY.
+
+ Then simply start other clients after setting DISPLAY=:9 or
+diff --git a/configure.ac b/configure.ac
+index 5277115..b0ab0e3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@ dnl
+ dnl Process this file with autoconf to produce a configure script
+ dnl
+
+-AC_INIT(xtrace, 1.3.1, brlink at debian.org)
++AC_INIT(x11trace, 1.3.1, brlink at debian.org)
+ AC_CONFIG_SRCDIR(main.c)
+ AC_CONFIG_AUX_DIR(ac)
+ AC_CONFIG_HEADERS(config.h)
+diff --git a/main.c b/main.c
+index 06cb56e..c203e5e 100644
+--- a/main.c
++++ b/main.c
+@@ -507,7 +507,7 @@ int main(int argc, char *argv[]) {
+ case LO_HELP:
+ printf(
+ "%s: Dump all X protocol data being tunneled from a fake X display to a real one.\n"
+-"usage: xtrace [options] [[--] command args ...]\n"
++"usage: x11trace [options] [[--] command args ...]\n"
+ "--display, -d <display to connect to>\n"
+ "--fakedisplay, -D <display to fake>\n"
+ "--copyauthentication, -c Copy credentials\n"
+diff --git a/xtrace.1 b/xtrace.1
+index 60f75b5..51be998 100644
+--- a/xtrace.1
++++ b/xtrace.1
+@@ -1,19 +1,19 @@
+-.TH XTRACE 1 "26 June 2009" "xtrace" XTRACE
++.TH X11TRACE 1 "26 June 2009" "x11trace" X11TRACE
+ .SH NAME
+-xtrace \- trace communication between X11 client and server
++x11trace \- trace communication between X11 client and server
+ .SH SYNOPSIS
+-.BR xtrace " [ " \fIoptions\fP " ] [ " \-s " | " \-k " ] [ [ " \-W " ] [ " -- " ] " "\fIcommand args ...\fP" " ]"
++.BR x11trace " [ " \fIoptions\fP " ] [ " \-s " | " \-k " ] [ [ " \-W " ] [ " -- " ] " "\fIcommand args ...\fP" " ]"
+ .SH DESCRIPTION
+-Xtrace fakes an X server and forwards all connections to
++x11trace fakes an X server and forwards all connections to
+ a real X server, displaying the communication between clients
+ in (well, theoretically) human readable form.
+ If a command is given,
+-.B xtrace
++.B x11trace
+ executes the named command with
+ .B $DISPLAY
+ set to the faked X server. If that command exits before any connections
+ are made,
+-.B xtrace
++.B x11trace
+ exits immediately unless
+ .B \-W
+ is specified.
+@@ -63,7 +63,7 @@ them.
+ The commands run are roughly equivalent to:
+ \fBxauth add $FAKEDISPLAY . `xauth list $DISPLAY | awk '$2=="MIT-MAGIC-COOKIE-1" {print $3}'`\fP
+
+-Not that only \fBMIT-MAGIC-COOKIE-1\fP tokens are copied as xtrace does not yet
++Not that only \fBMIT-MAGIC-COOKIE-1\fP tokens are copied as x11trace does not yet
+ support to change the authentication tokens so that \fBXDM-AUTHORIZATION-1\fP
+ would be possible.
+ .TP
+@@ -73,7 +73,7 @@ leave that to the user to handle.
+ .TP
+ .B \-e \fR|\fP \-\-denyextensions
+ Modify all server replies to say there are no extensions available.
+-(As xtrace does supports only a small number of extensions
++(As x11trace does supports only a small number of extensions
+ anyway and calls all extended requests "unknown" and all replies to such
+ requests "unexpected").
+ .TP
+@@ -144,7 +144,7 @@ to \fBxauth\fP to get the authentication tokens for this display.)
+ Without \fB\-\-fakedisplay\fP the content of this variable is used to
+ determine how to listen for clients. (And without \fB\-n\fP given
+ to \fBxauth\fP to set the authentication tokens for this display.)
+-If neither is given, \fBxtrace\fP will try \fB:9\fP
++If neither is given, \fBx11trace\fP will try \fB:9\fP
+ .TP
+ .B XAUTHORITY
+ Without \fB-n\fP and without \fB-f\fP or \fB-F\fP your \fBxauth\fP
diff --git a/x11trace-1.3.1-use-AC_CONFIG_HEADERS.patch b/x11trace-1.3.1-use-AC_CONFIG_HEADERS.patch
new file mode 100644
index 0000000..665b3cf
--- /dev/null
+++ b/x11trace-1.3.1-use-AC_CONFIG_HEADERS.patch
@@ -0,0 +1,23 @@
+Use AC_CONFIG_HEADERS() instead of AM_CONFIG_HEADER()
+
+From: David Howells <dhowells at redhat.com>
+
+Use AC_CONFIG_HEADERS() instead of AM_CONFIG_HEADER() as the latter is
+obsolete.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1c32aa6..5277115 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5,7 +5,7 @@ dnl
+ AC_INIT(xtrace, 1.3.1, brlink at debian.org)
+ AC_CONFIG_SRCDIR(main.c)
+ AC_CONFIG_AUX_DIR(ac)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AM_INIT_AUTOMAKE([-Wall -Werror])
+
+ AM_MAINTAINER_MODE
diff --git a/x11trace.spec b/x11trace.spec
new file mode 100644
index 0000000..e883d91
--- /dev/null
+++ b/x11trace.spec
@@ -0,0 +1,83 @@
+Summary: A program for X11 protocol tracing
+Name: x11trace
+Version: 1.3.1
+License: GPLv2
+URL: http://xtrace.alioth.debian.org/
+
+# Please set buildid below when building a private version of this rpm to
+# differentiate it from the stock rpm.
+#
+# % global buildid .local
+
+Release: 7%{?buildid}%{?dist}
+Obsoletes: xtrace < 1.3.1-7
+
+Source0: ftp://ftp.debian.org/debian/pool/main/x/xtrace/xtrace_%{version}.orig.tar.gz
+
+# Bring the sources up to the head of the git master branch.
+Patch1: x11trace-1.3.1-git-HEAD.patch
+
+# AM_CONFIG_HEADER() is obsolete - use AC_CONFIG_HEADERS instead.
+Patch2: x11trace-1.3.1-use-AC_CONFIG_HEADERS.patch
+
+# Rename xtrace to x11trace
+Patch3: x11trace-1.3.1-rename-to-x11trace.patch
+Patch4: x11trace-1.3.1-rename-manpage.patch
+
+BuildRequires: automake autoconf
+BuildRequires: libX11-devel
+BuildRequires: libXext-devel
+BuildRequires: xorg-x11-proto-devel
+
+%description
+What strace is for system calls, x11trace is for X11 connections:
+you hook it between one or more X11 clients and an X server and
+it prints the requests going from client to server and the replies,
+events and errors going the other way.
+
+%prep
+%setup -q -n xtrace-1.3.1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+autoreconf -i
+%configure
+
+%build
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot} INSTALL="install -p"
+
+%files
+%doc AUTHORS COPYING NEWS README
+%{_bindir}/*
+%{_datadir}/x11trace
+%{_mandir}/man1/*
+
+
+%changelog
+* Thu Jun 26 2014 David Howells <dhowells at redhat.com> - 1.3.1-7
+- Fixed up review comments on the specfile.
+
+* Thu Jun 26 2014 David Howells <dhowells at redhat.com> - 1.3.1-6
+- Rename xtrace to x11trace.
+
+* Fri Mar 28 2014 David Howells <dhowells at redhat.com> - 1.3.1-5
+- Use % global rather than % define.
+
+* Wed Mar 26 2014 David Howells <dhowells at redhat.com> - 1.3.1-4
+- AM_CONFIG_HEADER is obsolete - use AC_CONFIG_HEADERS instead.
+
+* Wed Feb 26 2014 David Howells <dhowells at redhat.com> - 1.3.1-3
+- Rename the patch that brings the source up to date with git.
+- Include derivation information in the patch.
+- Fixed up review comments on the specfile.
+
+* Fri Feb 21 2014 David Howells <dhowells at redhat.com> - 1.3.1-2
+- Fixed up review comments on the specfile.
+
+* Thu Feb 20 2014 David Howells <dhowells at redhat.com> - 1.3.1-1
+- Initial packaging.
+- Apply new changes from git as a patch.
More information about the scm-commits
mailing list