Hello community, here is the log from the commit of package sluice for openSUSE:Factory checked in at 2017-05-18 20:49:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sluice (Old) and /work/SRC/openSUSE:Factory/.sluice.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sluice" Thu May 18 20:49:33 2017 rev:2 rq:495691 version:0.02.06 Changes: -------- --- /work/SRC/openSUSE:Factory/sluice/sluice.changes 2016-09-21 18:46:42.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.sluice.new/sluice.changes 2017-05-18 20:49:47.970733824 +0200 @@ -1,0 +2,15 @@ +Wed May 10 15:40:38 UTC 2017 - mar...@gmx.de + +- update to version 0.02.06 + * Makefile: bump minor version + * Fix incorrect position of \ escape in -s option man page + +- update to version 0.02.05 + * Add build hardening flags + * Makefile: bump version + * Use build-in popcount to count bits + * Allow float comparisons a little bit of slop + * Make get_pagesize helper static + * Makefile: add PEDANTIC flags + +------------------------------------------------------------------- Old: ---- sluice-0.02.04.tar.gz New: ---- sluice-0.02.06.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sluice.spec ++++++ --- /var/tmp/diff_new_pack.BKWn4F/_old 2017-05-18 20:49:49.610502409 +0200 +++ /var/tmp/diff_new_pack.BKWn4F/_new 2017-05-18 20:49:49.614501844 +0200 @@ -1,7 +1,8 @@ # # spec file for package sluice # -# Copyright (c) 2016, Martin Hauke <mar...@gmx.de> +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017, Martin Hauke <mar...@gmx.de> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +18,7 @@ Name: sluice -Version: 0.02.04 +Version: 0.02.06 Release: 0 Summary: Rate limiting data piping tool License: GPL-2.0+ @@ -45,6 +46,6 @@ %defattr(-,root,root) %doc COPYING %{_bindir}/sluice -%{_mandir}/man1/* +%{_mandir}/man1/sluice.1%{ext_man} %changelog ++++++ sluice-0.02.04.tar.gz -> sluice-0.02.06.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sluice-0.02.04/Makefile new/sluice-0.02.06/Makefile --- old/sluice-0.02.04/Makefile 2016-05-05 14:44:33.000000000 +0200 +++ new/sluice-0.02.06/Makefile 2016-12-19 16:01:17.000000000 +0100 @@ -15,10 +15,20 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.02.04 +VERSION=0.02.06 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 +# +# Pedantic flags +# +ifeq ($(PEDANTIC),1) +CFLAGS += -Wabi -Wcast-qual -Wfloat-equal -Wmissing-declarations \ + -Wmissing-format-attribute -Wno-long-long -Wpacked \ + -Wredundant-decls -Wshadow -Wno-missing-field-initializers \ + -Wno-missing-braces -Wno-sign-compare -Wno-multichar +endif + BINDIR=/usr/bin MANDIR=/usr/share/man/man1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sluice-0.02.04/sluice.1 new/sluice-0.02.06/sluice.1 --- old/sluice-0.02.04/sluice.1 2016-05-05 14:44:33.000000000 +0200 +++ new/sluice-0.02.06/sluice.1 2016-12-19 16:01:17.000000000 +0100 @@ -115,7 +115,7 @@ do not read from stdin, instead read random data from /dev/urandom. .TP .B \-s shift -modify the rate adjustment shift. This is a data rate tuning scaling factor used by the \-r, \-c, \-o and -\u options. +modify the rate adjustment shift. This is a data rate tuning scaling factor used by the \-r, \-c, \-o and \-u options. .br For the \-r option, the delay between each write is controlled by modifying the previous delay by adding or subtracting the previous delay right shifted by this shift value. The larger the shift value the longer it takes to adjust up/down to the specified rate. The smaller the shift value the quicker it takes to reach the optimal delay, however, this can result in a highly fluctuating rates at the the beginning because the delay varies by a large amount causing large overruns and underruns. A shift value of 3 works well for most fast rates. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sluice-0.02.04/sluice.c new/sluice-0.02.06/sluice.c --- old/sluice-0.02.04/sluice.c 2016-05-05 14:44:33.000000000 +0200 +++ new/sluice-0.02.06/sluice.c 2016-12-19 16:01:17.000000000 +0100 @@ -126,6 +126,9 @@ #define DELAY_SET_ACTION(a1, a2, a3) ((a1 << 0) | (a2 << 1) | (a3 << 2)) #define DELAY_GET_ACTION(n, action) ((1 << n) & action) +#define FLOAT_TINY (0.0000001) +#define FLOAT_CMP(a, b) (fabs((a) - (b)) < FLOAT_TINY) + typedef struct { double divisor; /* delay divisor */ uint8_t mode; /* User specified mode */ @@ -217,11 +220,15 @@ */ static inline unsigned int count_bits(const unsigned int val) { +#if defined(__GNUC__) + return __builtin_popcount(val); +#else register unsigned int c, n = val; for (c = 0; n; c++) n &= n - 1; return c; +#endif } /* @@ -289,7 +296,7 @@ * get_pagesize() * get pagesize */ -size_t get_pagesize(void) +static size_t get_pagesize(void) { #ifdef _SC_PAGESIZE long sz; @@ -527,9 +534,11 @@ double total = stats->underruns + stats->overruns + stats->perfect; - fprintf(stderr, "Overruns: %6.2f%%\n", total ? + fprintf(stderr, "Overruns: %6.2f%%\n", + FLOAT_CMP(total, 0.0) ? 100.0 * (double)stats->underruns / total : 0.0); - fprintf(stderr, "Underruns: %6.2f%%\n", total ? + fprintf(stderr, "Underruns: %6.2f%%\n", + FLOAT_CMP(total, 0.0) ? 100.0 * (double)stats->overruns / total : 0.0); fprintf(stderr, "\nDrift from target rate: (%%)\n");