Hello community,

here is the log from the commit of package redis for openSUSE:Factory checked 
in at 2017-01-24 10:37:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/redis (Old)
 and      /work/SRC/openSUSE:Factory/.redis.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "redis"

Changes:
--------
--- /work/SRC/openSUSE:Factory/redis/redis.changes      2016-10-24 
14:44:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.redis.new/redis.changes 2017-01-24 
10:38:00.279188957 +0100
@@ -1,0 +2,10 @@
+Fri Jan 20 10:29:19 UTC 2017 - rmali...@suse.com
+
+- update to redis 3.2.6
+  * fixes for GEORADIUS, BITFIELD and Redis Cluster minor fixes.
+
+- update 3.2.5
+  * This release only fixes a compilation issue due to the
+    missing -ldl at linking time.
+
+-------------------------------------------------------------------

Old:
----
  redis-3.2.4.tar.gz

New:
----
  redis-3.2.6.tar.gz

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

Other differences:
------------------
++++++ redis.spec ++++++
--- /var/tmp/diff_new_pack.DXiYQp/_old  2017-01-24 10:38:00.839109430 +0100
+++ /var/tmp/diff_new_pack.DXiYQp/_new  2017-01-24 10:38:00.839109430 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package redis
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -25,7 +25,7 @@
 %bcond_with    systemd
 %endif
 Name:           redis
-Version:        3.2.4
+Version:        3.2.6
 Release:        0
 Summary:        Persistent key-value database
 License:        BSD-3-Clause

++++++ redis-3.2.4.tar.gz -> redis-3.2.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/00-RELEASENOTES 
new/redis-3.2.6/00-RELEASENOTES
--- old/redis-3.2.4/00-RELEASENOTES     2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/00-RELEASENOTES     2016-12-06 09:38:33.000000000 +0100
@@ -11,6 +11,65 @@
 
--------------------------------------------------------------------------------
 
 
================================================================================
+Redis 3.2.6     Released Tue Dec 06 09:33:29 CET 2016
+================================================================================
+
+Upgrade urgency MODERATE: GEORADIUS, BITFIELD and Redis Cluster minor fixes.
+
+This release mainly fixes three bugs:
+
+1. A bug with BITFIELD that may cause the bitmap corruption when setting 
offsets
+   larger than the current string size.
+
+2. A GEORADIUS bug that may happen when using very large radius lengths, in
+   the range of 10000km or alike, due to wrong bounding box calculation.
+
+3. A bug with Redis Cluster which crashes when reading a nodes configuration
+   file with zero bytes at the end, which sometimes happens with certain ext4
+   configurations after a system crash.
+
+The following is the list of commits:
+
+antirez in commit f20f3ea:
+ Geo: improve fuzz test.
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+antirez in commit 8c22086:
+ Geo: fix computation of bounding box.
+ 2 files changed, 33 insertions(+), 27 deletions(-)
+
+antirez in commit 92958df:
+ Cluster: handle zero bytes at the end of nodes.conf.
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+antirez in commit 0ee28ae:
+ Test: regression test for #3564 added.
+ 1 file changed, 9 insertions(+)
+
+sunhe in commit 289fadb:
+ bitops.c/bitfieldCommand: update higest_write_offset with check
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+jybaek in commit f4f7d2c:
+ Add missing fclose()
+ 1 file changed, 1 insertion(+)
+
+================================================================================
+Redis 3.2.5     Released Wed Oct 26 09:16:40 CEST 2016
+================================================================================
+
+Upgrade urgency LOW: This release only fixes a compilation issue due to the
+                     missing -ldl at linking time.
+
+zach shipko in commit 4736407:
+ BSDs don't have -ldl
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+antirez in commit 9ada818:
+ Fix modules compilation when libc malloc is used.
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+================================================================================
 Redis 3.2.4     Released Mon Sep 26 08:58:21 CEST 2016
 
================================================================================
 
@@ -26,14 +85,25 @@
 
 Thanks to Cory Duplantis of Cisco Talos for reporting the issue.
 
+IMPACT:
+
 The gist is that using CONFIG SET calls (or by manipulating redis.conf)
 an attacker is able to compromise certain fields of the "server" global
 structure, including the aof filename pointer, that could be made pointing
 to something else. In turn the AOF name is used in different contexts such
 as logging, rename(2) and open(2) syscalls, leading to potential problems.
 
+Please note that since having access to CONFIG SET also means to be able
+to change the AOF filename (and many other things) directly, this issue
+actual real world impact is quite small, so I would not panik: if you
+have CONFIG SET level of access, you can do more and more easily.
+
+AFFECTED VERSIONS:
+
 All Redis 3.2.x versions are affected.
 
+OTHER CHANGES IN THIS RELEASE:
+
 This release also includes other things:
 
 * TCP binding bug fixed when only certain addresses were available for
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/deps/geohash-int/geohash_helper.c 
new/redis-3.2.6/deps/geohash-int/geohash_helper.c
--- old/redis-3.2.4/deps/geohash-int/geohash_helper.c   2016-09-26 
09:10:17.000000000 +0200
+++ new/redis-3.2.6/deps/geohash-int/geohash_helper.c   2016-12-06 
09:38:33.000000000 +0100
@@ -80,35 +80,18 @@
     return step;
 }
 
-int geohashBitsComparator(const GeoHashBits *a, const GeoHashBits *b) {
-    /* If step not equal, compare on step.  Else, compare on bits. */
-    return a->step != b->step ? a->step - b->step : a->bits - b->bits;
-}
-
+/* Return the bounding box of the search area centered at latitude,longitude
+ * having a radius of radius_meter. bounds[0] - bounds[2] is the minimum
+ * and maxium longitude, while bounds[1] - bounds[3] is the minimum and
+ * maximum latitude. */
 int geohashBoundingBox(double longitude, double latitude, double radius_meters,
                        double *bounds) {
     if (!bounds) return 0;
 
-    double lonr, latr;
-    lonr = deg_rad(longitude);
-    latr = deg_rad(latitude);
-
-    if (radius_meters > EARTH_RADIUS_IN_METERS)
-        radius_meters = EARTH_RADIUS_IN_METERS;
-    double distance = radius_meters / EARTH_RADIUS_IN_METERS;
-    double min_latitude = latr - distance;
-    double max_latitude = latr + distance;
-
-    /* Note: we're being lazy and not accounting for coordinates near poles */
-    double min_longitude, max_longitude;
-    double difference_longitude = asin(sin(distance) / cos(latr));
-    min_longitude = lonr - difference_longitude;
-    max_longitude = lonr + difference_longitude;
-
-    bounds[0] = rad_deg(min_longitude);
-    bounds[1] = rad_deg(min_latitude);
-    bounds[2] = rad_deg(max_longitude);
-    bounds[3] = rad_deg(max_latitude);
+    bounds[0] = longitude - 
rad_deg(radius_meters/EARTH_RADIUS_IN_METERS/cos(deg_rad(latitude)));
+    bounds[2] = longitude + 
rad_deg(radius_meters/EARTH_RADIUS_IN_METERS/cos(deg_rad(latitude)));
+    bounds[1] = latitude - rad_deg(radius_meters/EARTH_RADIUS_IN_METERS);
+    bounds[3] = latitude + rad_deg(radius_meters/EARTH_RADIUS_IN_METERS);
     return 1;
 }
 
@@ -161,7 +144,7 @@
             < radius_meters) decrease_step = 1;
     }
 
-    if (decrease_step) {
+    if (steps > 1 && decrease_step) {
         steps--;
         geohashEncode(&long_range,&lat_range,longitude,latitude,steps,&hash);
         geohashNeighbors(&hash,&neighbors);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/src/Makefile new/redis-3.2.6/src/Makefile
--- old/redis-3.2.4/src/Makefile        2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/src/Makefile        2016-12-06 09:38:33.000000000 +0100
@@ -65,17 +65,27 @@
        FINAL_LIBS+= -ldl -lnsl -lsocket -lresolv -lpthread -lrt
 else
 ifeq ($(uname_S),Darwin)
-       # Darwin (nothing to do)
+       # Darwin
+       FINAL_LIBS+= -ldl
 else
 ifeq ($(uname_S),AIX)
         # AIX
         FINAL_LDFLAGS+= -Wl,-bexpall
-        FINAL_LIBS+= -pthread -lcrypt -lbsd
-
+        FINAL_LIBS+=-ldl -pthread -lcrypt -lbsd
+else
+ifeq ($(uname_S),OpenBSD)
+       # OpenBSD
+       FINAL_LIBS+= -lpthread
+else
+ifeq ($(uname_S),FreeBSD)
+       # FreeBSD
+       FINAL_LIBS+= -lpthread
 else
        # All the other OSes (notably Linux)
        FINAL_LDFLAGS+= -rdynamic
-       FINAL_LIBS+= -pthread
+       FINAL_LIBS+=-ldl -pthread
+endif
+endif
 endif
 endif
 endif
@@ -95,7 +105,7 @@
 ifeq ($(MALLOC),jemalloc)
        DEPENDENCY_TARGETS+= jemalloc
        FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
-       FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
+       FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a
 endif
 
 REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/src/bitops.c new/redis-3.2.6/src/bitops.c
--- old/redis-3.2.4/src/bitops.c        2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/src/bitops.c        2016-12-06 09:38:33.000000000 +0100
@@ -907,7 +907,7 @@
     struct bitfieldOp *ops = NULL; /* Array of ops to execute at end. */
     int owtype = BFOVERFLOW_WRAP; /* Overflow type. */
     int readonly = 1;
-    long higest_write_offset = 0;
+    size_t higest_write_offset = 0;
 
     for (j = 2; j < c->argc; j++) {
         int remargs = c->argc-j-1; /* Remaining args other than current. */
@@ -957,7 +957,8 @@
 
         if (opcode != BITFIELDOP_GET) {
             readonly = 0;
-            higest_write_offset = bitoffset + bits - 1;
+            if (higest_write_offset < bitoffset + bits - 1)
+                higest_write_offset = bitoffset + bits - 1;
             /* INCRBY and SET require another argument. */
             if (getLongLongFromObjectOrReply(c,c->argv[j+3],&i64,NULL) != 
C_OK){
                 zfree(ops);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/src/cluster.c 
new/redis-3.2.6/src/cluster.c
--- old/redis-3.2.4/src/cluster.c       2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/src/cluster.c       2016-12-06 09:38:33.000000000 +0100
@@ -129,7 +129,7 @@
         /* Skip blank lines, they can be created either by users manually
          * editing nodes.conf or by the config writing process if stopped
          * before the truncate() call. */
-        if (line[0] == '\n') continue;
+        if (line[0] == '\n' || line[0] == '\0') continue;
 
         /* Split the line into arguments for processing. */
         argv = sdssplitargs(line,&argc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/src/geo.c new/redis-3.2.6/src/geo.c
--- old/redis-3.2.4/src/geo.c   2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/src/geo.c   2016-12-06 09:38:33.000000000 +0100
@@ -328,6 +328,7 @@
 int membersOfAllNeighbors(robj *zobj, GeoHashRadius n, double lon, double lat, 
double radius, geoArray *ga) {
     GeoHashBits neighbors[9];
     unsigned int i, count = 0, last_processed = 0;
+    int debugmsg = 0;
 
     neighbors[0] = n.hash;
     neighbors[1] = n.neighbors.north;
@@ -342,8 +343,26 @@
     /* For each neighbor (*and* our own hashbox), get all the matching
      * members and add them to the potential result list. */
     for (i = 0; i < sizeof(neighbors) / sizeof(*neighbors); i++) {
-        if (HASHISZERO(neighbors[i]))
+        if (HASHISZERO(neighbors[i])) {
+            if (debugmsg) D("neighbors[%d] is zero",i);
             continue;
+        }
+
+        /* Debugging info. */
+        if (debugmsg) {
+            GeoHashRange long_range, lat_range;
+            geohashGetCoordRange(&long_range,&lat_range);
+            GeoHashArea myarea = {{0}};
+            geohashDecode(long_range, lat_range, neighbors[i], &myarea);
+
+            /* Dump center square. */
+            D("neighbors[%d]:\n",i);
+            D("area.longitude.min: %f\n", myarea.longitude.min);
+            D("area.longitude.max: %f\n", myarea.longitude.max);
+            D("area.latitude.min: %f\n", myarea.latitude.min);
+            D("area.latitude.max: %f\n", myarea.latitude.max);
+            D("\n");
+        }
 
         /* When a huge Radius (in the 5000 km range or more) is used,
          * adjacent neighbors can be the same, leading to duplicated
@@ -352,7 +371,11 @@
         if (last_processed &&
             neighbors[i].bits == neighbors[last_processed].bits &&
             neighbors[i].step == neighbors[last_processed].step)
+        {
+            if (debugmsg)
+                D("Skipping processing of %d, same as previous\n",i);
             continue;
+        }
         count += membersOfGeoHashBox(zobj, neighbors[i], ga, lon, lat, radius);
         last_processed = i;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/src/redis-cli.c 
new/redis-3.2.6/src/redis-cli.c
--- old/redis-3.2.4/src/redis-cli.c     2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/src/redis-cli.c     2016-12-06 09:38:33.000000000 +0100
@@ -1255,6 +1255,7 @@
             if (argc > 0) cliSetPreferences(argv,argc,0);
             sdsfreesplitres(argv,argc);
         }
+        fclose(fp);
     }
     sdsfree(rcfile);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/src/version.h 
new/redis-3.2.6/src/version.h
--- old/redis-3.2.4/src/version.h       2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/src/version.h       2016-12-06 09:38:33.000000000 +0100
@@ -1 +1 @@
-#define REDIS_VERSION "3.2.4"
+#define REDIS_VERSION "3.2.6"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/tests/unit/bitfield.tcl 
new/redis-3.2.6/tests/unit/bitfield.tcl
--- old/redis-3.2.4/tests/unit/bitfield.tcl     2016-09-26 09:10:17.000000000 
+0200
+++ new/redis-3.2.6/tests/unit/bitfield.tcl     2016-12-06 09:38:33.000000000 
+0100
@@ -189,4 +189,13 @@
         r set bits 1
         r bitfield bits get u1 0
     } {0}
+
+    test {BITFIELD regression for #3564} {
+        for {set j 0} {$j < 10} {incr j} {
+            r del mystring
+            set res [r BITFIELD mystring SET i8 0 10 SET i8 64 10 INCRBY i8 10 
99900]
+            assert {$res eq {0 0 60}}
+        }
+        r del mystring
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/redis-3.2.4/tests/unit/geo.tcl 
new/redis-3.2.6/tests/unit/geo.tcl
--- old/redis-3.2.4/tests/unit/geo.tcl  2016-09-26 09:10:17.000000000 +0200
+++ new/redis-3.2.6/tests/unit/geo.tcl  2016-12-06 09:38:33.000000000 +0100
@@ -221,18 +221,26 @@
     }
 
     test {GEOADD + GEORANGE randomized test} {
-        set attempt 20
+        set attempt 30
         while {[incr attempt -1]} {
             set rv [lindex $regression_vectors $rv_idx]
             incr rv_idx
 
             unset -nocomplain debuginfo
-            set srand_seed [randomInt 1000000]
+            set srand_seed [clock milliseconds]
             if {$rv ne {}} {set srand_seed [lindex $rv 0]}
             lappend debuginfo "srand_seed is $srand_seed"
             expr {srand($srand_seed)} ; # If you need a reproducible run
             r del mypoints
-            set radius_km [expr {[randomInt 200]+10}]
+
+            if {[randomInt 10] == 0} {
+                # From time to time use very big radiuses
+                set radius_km [expr {[randomInt 50000]+10}]
+            } else {
+                # Normally use a few - ~200km radiuses to stress
+                # test the code the most in edge cases.
+                set radius_km [expr {[randomInt 200]+10}]
+            }
             if {$rv ne {}} {set radius_km [lindex $rv 1]}
             set radius_m [expr {$radius_km*1000}]
             geo_random_point search_lon search_lat


Reply via email to