Hello community,

here is the log from the commit of package xlsatoms for openSUSE:Factory 
checked in at 2019-02-24 17:18:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xlsatoms (Old)
 and      /work/SRC/openSUSE:Factory/.xlsatoms.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xlsatoms"

Sun Feb 24 17:18:17 2019 rev:8 rq:677965 version:1.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/xlsatoms/xlsatoms.changes        2015-04-25 
11:26:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xlsatoms.new.28833/xlsatoms.changes     
2019-02-24 17:18:18.736419430 +0100
@@ -1,0 +2,7 @@
+Thu Feb 21 11:09:56 UTC 2019 - [email protected]
+
+-  Update to version 1.1.3
+   * This release fixes issues with listing ranges of atoms, as
+     well as including general janitorial maintenance.
+
+-------------------------------------------------------------------

Old:
----
  xlsatoms-1.1.2.tar.bz2

New:
----
  xlsatoms-1.1.3.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xlsatoms.spec ++++++
--- /var/tmp/diff_new_pack.rgqU7L/_old  2019-02-24 17:18:19.268419336 +0100
+++ /var/tmp/diff_new_pack.rgqU7L/_new  2019-02-24 17:18:19.272419335 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xlsatoms
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           xlsatoms
-Version:        1.1.2
+Version:        1.1.3
 Release:        0
 Summary:        Utility to list interned atoms defined on an X11 server
 License:        X11
@@ -46,7 +46,7 @@
 
 %files
 %defattr(-,root,root)
-%doc ChangeLog COPYING README
+%doc ChangeLog COPYING README.md
 %{_bindir}/xlsatoms
 %{_mandir}/man1/xlsatoms.1%{?ext_man}
 

++++++ xlsatoms-1.1.2.tar.bz2 -> xlsatoms-1.1.3.tar.bz2 ++++++
++++ 5733 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/ChangeLog new/xlsatoms-1.1.3/ChangeLog
--- old/xlsatoms-1.1.2/ChangeLog        2015-04-17 08:50:01.000000000 +0200
+++ new/xlsatoms-1.1.3/ChangeLog        2019-02-20 00:28:42.000000000 +0100
@@ -1,3 +1,136 @@
+commit 90e2f5a00d304c8b344f42a72b4543f6e4fd4cd6
+Author: Alan Coopersmith <[email protected]>
+Date:   Tue Feb 19 15:27:23 2019 -0800
+
+    xlsatoms 1.1.3
+    
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit d7e52dc1d62164ce5a68c276d46c9f7283b5e040
+Author: Alan Coopersmith <[email protected]>
+Date:   Wed Nov 21 17:13:31 2018 -0800
+
+    Update configure.ac bug URL for gitlab migration
+    
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 4f3b875fad61a3f3457f036412cdf5b0a69fe300
+Author: Alan Coopersmith <[email protected]>
+Date:   Fri Nov 16 22:33:37 2018 -0800
+
+    Update README for gitlab migration
+    
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 1ffbd9c5be8fb61bcbe9bb06d349af54bfbb2f3b
+Author: Tobias Stoeckmann <[email protected]>
+Date:   Wed Jul 4 15:33:18 2018 +0200
+
+    Adjust man page to show default format.
+    
+    The default format is %lu\t%s, not %ld\t%s, i.e. unsigned.
+    
+    Signed-off-by: Tobias Stoeckmann <[email protected]>
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 52a6e57bfd7f273fc754c12a44eb94200f3de0b9
+Author: Tobias Stoeckmann <[email protected]>
+Date:   Wed Jul 4 15:29:58 2018 +0200
+
+    Always use chunks when retrieving atoms.
+    
+    If a low and high range limit has been specified, all atoms are
+    retrieved at once. This is also the reason why malloc() is used:
+    All cookies are stored before collecting the data.
+    
+    By using chunks it is possible to specify a huge range or even
+    all possible atoms without running out of memory.
+    
+    Signed-off-by: Tobias Stoeckmann <[email protected]>
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 3e27b6a63f3baf153bba076e12870f2a88691a13
+Author: Tobias Stoeckmann <[email protected]>
+Date:   Wed Jul 4 15:29:26 2018 +0200
+
+    Actually stop after an invalid atom.
+    
+    The manual page states that if no upper range limit has been specified,
+    no higher atoms will be printed. This is not true for
+    
+    $ xlsatoms -range 0-
+    
+    This prints the first 100 atoms, even though it already encountered an
+    invalid one at 0. The reason is that say_batch works as a batch, i.e.
+    retrieves 100 atoms at a time. If one of them is invalid, the rest is
+    still printed.
+    
+    With this adjustment, xlsatoms behaves as stated in manual page.
+    
+    Signed-off-by: Tobias Stoeckmann <[email protected]>
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 22a8eb00662a926cd5df52ba15851a31104ae41e
+Author: Tobias Stoeckmann <[email protected]>
+Date:   Wed Jul 4 15:28:41 2018 +0200
+
+    Support xcb_atom_t in range specification.
+    
+    The data type xcb_atom_t is an unsigned int (32 bit), but the optional
+    range argument is parsed with atoi(), which returns a signed int.
+    
+    Even though it is possible to reach all values through clever casting,
+    it is more readable by properly using correct data types.
+    
+    This also fixes a segmentation fault on 32 bit systems if a range is
+    supplied which overflows size_t:
+    
+    $ xlsatoms -range 0-1073741824
+    Segmentation fault (core dumped)
+    
+    If an invalid range is supplied, an error message is printed. This is
+    new because previously an invalid range was silently accepted.
+    
+    $ xlsatoms -range 0--1
+    $ _
+    $ xlsatoms-new -range 0--1
+    xlsatoms-new:  invalid range: 0--1
+    
+    Signed-off-by: Tobias Stoeckmann <[email protected]>
+    Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit c0812822f34affaae3c3eced8a625535e515a290
+Author: Mihail Konev <[email protected]>
+Date:   Thu Jan 26 14:00:21 2017 +1000
+
+    autogen: add default patch prefix
+    
+    Signed-off-by: Mihail Konev <[email protected]>
+
+commit ba6492896481220c5a6095fbed1952ca2cecbb8e
+Author: Emil Velikov <[email protected]>
+Date:   Mon Mar 9 12:00:52 2015 +0000
+
+    autogen.sh: use quoted string variables
+    
+    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+    fall-outs, when they contain space.
+    
+    Signed-off-by: Emil Velikov <[email protected]>
+    Reviewed-by: Peter Hutterer <[email protected]>
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 6d0ab94a3822ee6617102cb8b25a1d9dda298fb8
+Author: Peter Hutterer <[email protected]>
+Date:   Tue Jan 24 10:32:07 2017 +1000
+
+    autogen.sh: use exec instead of waiting for configure to finish
+    
+    Syncs the invocation of configure with the one from the server.
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+    Reviewed-by: Emil Velikov <[email protected]>
+
 commit 8b773cc5ccc8568f3b089229b5ae85ebaca94836
 Author: Alan Coopersmith <[email protected]>
 Date:   Thu Apr 16 23:49:40 2015 -0700
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/Makefile.am new/xlsatoms-1.1.3/Makefile.am
--- old/xlsatoms-1.1.2/Makefile.am      2015-04-17 08:49:46.000000000 +0200
+++ new/xlsatoms-1.1.3/Makefile.am      2019-02-20 00:28:33.000000000 +0100
@@ -39,3 +39,5 @@
        $(CHANGELOG_CMD)
 
 dist-hook: ChangeLog INSTALL
+
+EXTRA_DIST = README.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/README new/xlsatoms-1.1.3/README
--- old/xlsatoms-1.1.2/README   2015-04-17 08:49:46.000000000 +0200
+++ new/xlsatoms-1.1.3/README   1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-xlsatoms lists the interned atoms defined on an X11 server
-
-Version 1.1 and later of xlsatoms use (and require) libxcb instead
-of libX11, for less latency when communicating with the X server.
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
-        http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-The master development code repository can be found at:
-
-        git://anongit.freedesktop.org/git/xorg/app/xlsatoms
-
-        http://cgit.freedesktop.org/xorg/app/xlsatoms
-
-For patch submission instructions, see:
-
-       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
-        http://wiki.x.org/wiki/GitPage
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/README.md new/xlsatoms-1.1.3/README.md
--- old/xlsatoms-1.1.2/README.md        1970-01-01 01:00:00.000000000 +0100
+++ new/xlsatoms-1.1.3/README.md        2019-02-20 00:28:33.000000000 +0100
@@ -0,0 +1,20 @@
+xlsatoms lists the interned atoms defined on an X11 server
+
+Version 1.1 and later of xlsatoms use (and require) libxcb instead
+of libX11, for less latency when communicating with the X server.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+  https://lists.x.org/mailman/listinfo/xorg
+
+The master development code repository can be found at:
+
+  https://gitlab.freedesktop.org/xorg/app/xlsatoms
+
+Please submit bug reports and requests to merge patches there.
+
+For patch submission instructions, see:
+
+  https://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/configure.ac new/xlsatoms-1.1.3/configure.ac
--- old/xlsatoms-1.1.2/configure.ac     2015-04-17 08:49:46.000000000 +0200
+++ new/xlsatoms-1.1.3/configure.ac     2019-02-20 00:28:33.000000000 +0100
@@ -23,8 +23,8 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT(xlsatoms, [1.1.2],
-       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+AC_INIT(xlsatoms, [1.1.3],
+       [https://gitlab.freedesktop.org/xorg/app/xlsatoms/issues],
        xlsatoms)
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/man/xlsatoms.man new/xlsatoms-1.1.3/man/xlsatoms.man
--- old/xlsatoms-1.1.2/man/xlsatoms.man 2015-04-17 08:49:46.000000000 +0200
+++ new/xlsatoms-1.1.3/man/xlsatoms.man 2019-02-20 00:28:33.000000000 +0100
@@ -44,7 +44,7 @@
 This option specifies a \fIprintf\fP-style string used to list each atom
 \fI<value,name>\fP pair, printed in that order (\fIvalue\fP is an \fIunsigned
 long\fP and \fIname\fP is a \fIchar *\fP).  \fIXlsatoms\fP will supply a
-newline at the end of each line.  The default is \fI%ld\\t%s\fP.
+newline at the end of each line.  The default is \fI%lu\\t%s\fP.
 .TP 8
 .B \-range \fI[low]-[high]\fP
 This option specifies the range of atom values to check.  If \fIlow\fP is not
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xlsatoms-1.1.2/xlsatoms.c new/xlsatoms-1.1.3/xlsatoms.c
--- old/xlsatoms-1.1.2/xlsatoms.c       2015-04-17 08:49:46.000000000 +0200
+++ new/xlsatoms-1.1.3/xlsatoms.c       2019-02-20 00:28:33.000000000 +0100
@@ -31,6 +31,7 @@
 # include "config.h"
 #endif
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -45,10 +46,10 @@
 static const char *DisplayString;
 
 static void do_name ( xcb_connection_t *c, const char *format, char *name );
-static int parse_range ( char *range, long *lowp, long *highp );
+static int parse_range ( char *range, xcb_atom_t *lowp, xcb_atom_t *highp );
 static void do_range ( xcb_connection_t *c, const char *format, char *range );
 static void list_atoms ( xcb_connection_t *c, const char *format, int mask,
-                        long low, long high );
+                        xcb_atom_t low, xcb_atom_t high );
 
 static void 
 usage(const char *errmsg)
@@ -161,8 +162,23 @@
 #define RangeLow (1 << 0)
 #define RangeHigh (1 << 1)
 
+static int
+strtoatom(char *s, xcb_atom_t *atom)
+{
+    long long value;
+    char *end;
+
+    value = strtoll(s, &end, 10);
+    if (s == end || *end != '\0' || value < 0 || value > UINT32_MAX) {
+       return 1;
+    }
+
+    *atom = value;
+    return 0;
+}
+
 static int 
-parse_range(char *range, long *lowp, long *highp)
+parse_range(char *range, xcb_atom_t *lowp, xcb_atom_t *highp)
 {
     char *dash;
     int mask = 0;
@@ -179,35 +195,46 @@
            *lowp = 1;
        } else {                        /* low-[high] */
            *dash = '\0';
-           *lowp = atoi (range);
+           if (strtoatom(range, lowp)) {
+               *dash = '-';
+               goto invalid;
+           }
            *dash = '-';
        }
        mask |= RangeLow;
        dash++;
        if (*dash) {                    /* [low]-high */
-           *highp = atoi (dash);
+           if (strtoatom(dash, highp) || *highp < *lowp) {
+               goto invalid;
+           }
            mask |= RangeHigh;
        }
     } else {                           /* number (low == high) */
-       *lowp = *highp = atoi (range);
+       if (strtoatom(range, lowp)) {
+               goto invalid;
+       }
+       *highp = *lowp;
        mask |= (RangeLow | RangeHigh);
     }
 
     return mask;
+invalid:
+    fprintf(stderr, "%s:  invalid range: %s\n", ProgramName, range);
+    exit(1);
 }
 
 static void
 do_range(xcb_connection_t *c, const char *format, char *range)
 {
     int mask;
-    long low, high;
+    xcb_atom_t low, high;
 
     mask = parse_range (range, &low, &high);
     list_atoms (c, format, mask, low, high);
 }
 
 static int
-say_batch(xcb_connection_t *c, const char *format, xcb_get_atom_name_cookie_t 
*cookie, long low, long count)
+say_batch(xcb_connection_t *c, const char *format, xcb_get_atom_name_cookie_t 
*cookie, xcb_atom_t low, long count, int stop_error)
 {
     xcb_generic_error_t *e;
     char atom_name[1024];
@@ -221,13 +248,15 @@
        xcb_get_atom_name_reply_t *r;
        r = xcb_get_atom_name_reply(c, cookie[i], &e);
        if (r) {
-           /* We could just use %.*s in 'format', but we want to be compatible
-              with legacy command line usage */
-           snprintf(atom_name, sizeof(atom_name), "%.*s",
-               r->name_len, xcb_get_atom_name_name(r));
+           if (!done || !stop_error) {
+               /* We could just use %.*s in 'format', but we want to be 
compatible
+                  with legacy command line usage */
+               snprintf(atom_name, sizeof(atom_name), "%.*s",
+                   r->name_len, xcb_get_atom_name_name(r));
 
-           printf (format, i + low, atom_name);
-           putchar ('\n');
+               printf (format, i + low, atom_name);
+               putchar ('\n');
+           }
            free(r);
        }
        if (e) {
@@ -236,46 +265,27 @@
        }
     }
 
-    return done;
+    return done && stop_error;
 }
 
 static void
-list_atoms(xcb_connection_t *c, const char *format, int mask, long low, long 
high)
+list_atoms(xcb_connection_t *c, const char *format, int mask, xcb_atom_t low, 
xcb_atom_t high)
 {
-    xcb_get_atom_name_cookie_t *cookie_jar;
+    xcb_get_atom_name_cookie_t cookie_jar[ATOMS_PER_BATCH];
     int done = 0;
+    long count;
 
-    switch (mask) {
-      case RangeHigh:
+    if ((mask & RangeLow) == 0)
        low = 1;
-       /* fall through */
-      case (RangeLow | RangeHigh):
-       cookie_jar = malloc((high - low + 1) * 
sizeof(xcb_get_atom_name_cookie_t));
-        if (!cookie_jar) {
-           fprintf(stderr, "Out of memory allocating space for %ld atom 
requests\n", high - low);
-           return;
-       }
+    if ((mask & RangeHigh) == 0)
+       high = UINT32_MAX;
 
-       say_batch(c, format, cookie_jar, low, high - low + 1);
-       free(cookie_jar);
-       break;
-
-      default:
-       low = 1;
-       /* fall through */
-      case RangeLow:
-       cookie_jar = malloc(ATOMS_PER_BATCH * 
sizeof(xcb_get_atom_name_cookie_t));
-        if (!cookie_jar) {
-           fprintf(stderr, "Out of memory allocating space for %ld atom 
requests\n", (long) ATOMS_PER_BATCH);
-           return;
-       }
-       while (!done) {
-           done = say_batch(c, format, cookie_jar, low, ATOMS_PER_BATCH);
-           low += ATOMS_PER_BATCH;
+    while (!done) {
+       count = high - low < ATOMS_PER_BATCH - 1 ? high - low + 1 : 
ATOMS_PER_BATCH;
+       done = say_batch(c, format, cookie_jar, low, count, (mask & RangeHigh) 
== 0);
+       if (high - low < UINT32_MAX && low == high - count + 1) {
+           done = 1;
        }
-       free(cookie_jar);
-       break;
+       low += count;
     }
-
-    return;
 }


Reply via email to