Hello community,

here is the log from the commit of package mbuffer for openSUSE:Factory checked 
in at 2013-04-17 07:24:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mbuffer (Old)
 and      /work/SRC/openSUSE:Factory/.mbuffer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mbuffer", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/mbuffer/mbuffer.changes  2012-11-26 
18:59:49.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mbuffer.new/mbuffer.changes     2013-04-17 
07:24:43.000000000 +0200
@@ -1,0 +2,17 @@
+Mon Apr  8 21:22:36 UTC 2013 - [email protected]
+
+- update to 20132020:
+  * reverted incorrect fix for -P 100, which may lead to data corruption
+  * reenable hash libraries (no correlation with data corruption)
+  * bail out if any output fails to initialize
+  * refixed hang on -P 100
+  * reduced sending overhead
+  * fixed handling of option -f
+
+- changes from 20130209:
+  * hash names should be compared case insensitive for convenience
+  * safeguard against missing argument to option --hash
+  * support for hash calculation withdrawn, due to potential data corruption,
+    when the buffer runs full
+
+-------------------------------------------------------------------

Old:
----
  mbuffer-20121111.tgz

New:
----
  mbuffer-20130220.tgz

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

Other differences:
------------------
++++++ mbuffer.spec ++++++
--- /var/tmp/diff_new_pack.8QrprH/_old  2013-04-17 07:24:44.000000000 +0200
+++ /var/tmp/diff_new_pack.8QrprH/_new  2013-04-17 07:24:44.000000000 +0200
@@ -14,12 +14,12 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 
 Name:           mbuffer
-Version:        20121111
+Version:        20130220
 Release:        0
 Summary:        Replacement for "buffer" with many more Features
 Source:         
http://www.maier-komor.de/software/mbuffer/mbuffer-%{version}.tgz
 Patch1:         mbuffer-fix_pointer_cast.patch
-URL:            http://www.maier-komor.de/software/mbuffer/
+URL:            http://www.maier-komor.de/mbuffer.html
 Group:          Productivity/Text/Utilities
 License:        GPL-3.0+
 BuildRoot:      %{_tmppath}/build-%{name}-%{version}

++++++ mbuffer-20121111.tgz -> mbuffer-20130220.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mbuffer-20121111/.hg_archival.txt 
new/mbuffer-20130220/.hg_archival.txt
--- old/mbuffer-20121111/.hg_archival.txt       2012-11-16 11:17:11.000000000 
+0100
+++ new/mbuffer-20130220/.hg_archival.txt       2013-02-20 23:37:08.000000000 
+0100
@@ -1,5 +1,5 @@
 repo: 6e3b485d74645931e2408ed1f57e659029b5639a
-node: 4a89ab956ab1590b4b3b7be2343e6d2eedc29e5b
+node: 32d9cfa57a3c816cc7fa6dfef775615e53c20c0c
 branch: default
-latesttag: 20121111
+latesttag: 20130220
 latesttagdistance: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mbuffer-20121111/.hgtags new/mbuffer-20130220/.hgtags
--- old/mbuffer-20121111/.hgtags        2012-11-16 11:17:11.000000000 +0100
+++ new/mbuffer-20130220/.hgtags        2013-02-20 23:37:08.000000000 +0100
@@ -79,3 +79,6 @@
 2b559c9d44c3ecab08b7c17a79358668e300e8de 20110724
 1dd2c4da5bc9b4a206088bba779e5ade04ba38fe 20120505
 68aef5382cb71cd986b7fead24efe0d6f6a90396 20121111
+8ae0ca3fcabebb985e84f3306f312892e350a0b5 20130209
+6c60e788eb7a6bd22822dfc36e0f73369c4298be 20130210
+35bfc3c313d416df09cfabca9ca691b60f7816b6 20130220
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mbuffer-20121111/ChangeLog 
new/mbuffer-20130220/ChangeLog
--- old/mbuffer-20121111/ChangeLog      2012-11-16 11:17:11.000000000 +0100
+++ new/mbuffer-20130220/ChangeLog      2013-02-20 23:37:08.000000000 +0100
@@ -1,3 +1,17 @@
+20130220:
+- reverted incorrect fix for -P 100, which may lead to data corruption
+- reenable hash libraries (no correlation with data corruption)
+- bail out if any output fails to initialize
+- refixed hang on -P 100
+- reduced sending overhead
+- fixed handling of option -f
+
+20130209:
+- hash names should be compared case insensitive for convenience
+- safeguard against missing argument to option --hash
+- support for hash calculation withdrawn, due to potential data
+corruption, when the buffer runs full
+
 20121111:
 - build fix for some platforms
 - several minor code cleanups (removed some warnings)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mbuffer-20121111/configure 
new/mbuffer-20130220/configure
--- old/mbuffer-20121111/configure      2012-11-16 11:17:11.000000000 +0100
+++ new/mbuffer-20130220/configure      2013-02-20 23:37:08.000000000 +0100
@@ -2372,7 +2372,7 @@
 
 
 PACKAGE=mbuffer
-VERSION=20121111
+VERSION=20130220
 
 if test "${LD_LIBRARY_PATH}" != "" ; then
        echo ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mbuffer-20121111/configure.in 
new/mbuffer-20130220/configure.in
--- old/mbuffer-20121111/configure.in   2012-11-16 11:17:11.000000000 +0100
+++ new/mbuffer-20130220/configure.in   2013-02-20 23:37:08.000000000 +0100
@@ -5,7 +5,7 @@
 AC_EXEEXT
 
 PACKAGE=mbuffer
-VERSION=20121111
+VERSION=20130220
 
 if test "${LD_LIBRARY_PATH}" != "" ; then
        echo ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mbuffer-20121111/mbuffer.c 
new/mbuffer-20130220/mbuffer.c
--- old/mbuffer-20121111/mbuffer.c      2012-11-16 11:17:11.000000000 +0100
+++ new/mbuffer-20130220/mbuffer.c      2013-02-20 23:37:08.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2000-2012, Thomas Maier-Komor
+ *  Copyright (C) 2000-2013, Thomas Maier-Komor
  *
  *  This is the source code of mbuffer.
  *
@@ -133,7 +133,7 @@
        Reader, Watchdog;
 static long
        Tmp = -1, Pause = 0, Memmap = 0,
-       Status = 1, Nooverwrite = O_EXCL, Outblocksize = 0,
+       Status = 1, Outblocksize = 0,
        Autoload_time = 0, OptSync = 0;
 static unsigned long
        Outsize = 10240;
@@ -782,7 +782,7 @@
 
 static inline int syncSenders(char *b, int s)
 {
-       static volatile int size = 0;
+       static volatile int size = 0, skipped = 0;
        static char *volatile buf = 0;
        int err;
 
@@ -808,10 +808,16 @@
                SendAt = buf;
                SendSize = size;
                buf = 0;
+               if (skipped) {
+                       // after the first time, always give a buffer free 
after sync
+                       err = sem_post(&Dev2Buf);
+                       assert(err == 0);
+               } else {
+                       // the first time no buffer has been given free
+                       skipped = 1;
+               }
                err = pthread_mutex_unlock(&SendMut);
                assert(err == 0);
-               err = sem_post(&Dev2Buf);
-               assert(err == 0);
                debugiomsg("syncSenders(): send %d@%p, 
BROADCAST\n",SendSize,SendAt);
                err = pthread_cond_broadcast(&SendCond);
                assert(err == 0);
@@ -905,8 +911,9 @@
 #ifdef HAVE_SENDFILE
                        if (sendout) {
                                off_t baddr = (off_t) (SendAt+num);
-                               ret = sendfile(out,SFV_FD_SELF,&baddr,rest > 
outsize ? outsize : rest);
-                               debugiomsg("sender(%s): sendfile(%d, 
SFV_FD_SELF, &%p, %llu) = %d\n", dest->arg, dest->fd, (void*)baddr, (unsigned 
long long) (rest > outsize ? outsize : rest), ret);
+                               unsigned long long n = SetOutsize ? (rest > 
Outsize ? (rest/Outsize)*Outsize : rest) : rest;
+                               ret = sendfile(out,SFV_FD_SELF,&baddr,n);
+                               debugiomsg("sender(%s): sendfile(%d, 
SFV_FD_SELF, &%p, %llu) = %d\n", dest->arg, dest->fd, (void*)baddr, n, ret);
                                if ((ret == -1) && ((errno == EINVAL) || (errno 
== EOPNOTSUPP))) {
                                        sendout = 0;
                                        debugmsg("sender(%s): sendfile 
unsupported - falling back to write\n", dest->arg);
@@ -1078,7 +1085,7 @@
                }
                mode = O_WRONLY|O_TRUNC|OptSync|LARGEFILE|Direct;
                if (strncmp(outfile,"/dev/",5))
-                       mode |= Nooverwrite|O_CREAT;
+                       mode |= O_CREAT;
                out = open(outfile,mode,0666);
                if (-1 == out)
                        errormsg("error reopening output file: 
%s\n",strerror(errno));
@@ -1280,8 +1287,9 @@
 #ifdef HAVE_SENDFILE
                        if (sendout) {
                                off_t baddr = (off_t) (Buffer[at] + blocksize - 
rest);
-                               num = 
sendfile(out,SFV_FD_SELF,&baddr,(size_t)(rest > Outsize ? Outsize : rest));
-                               debugiomsg("outputThread: sendfile(%d, 
SFV_FD_SELF, &(Buffer[%d] + %llu), %llu) = %d\n", out, at, blocksize - rest, 
rest > Outsize ? Outsize : rest, num);
+                               unsigned long long n = SetOutsize ? (rest > 
Outsize ? (rest/Outsize)*Outsize : rest) : rest;
+                               num = sendfile(out,SFV_FD_SELF,&baddr,n);
+                               debugiomsg("outputThread: sendfile(%d, 
SFV_FD_SELF, &(Buffer[%d] + %llu), %llu) = %d\n", out, at, blocksize - rest, n, 
num);
                                if ((num == -1) && ((errno == EOPNOTSUPP) || 
(errno == EINVAL))) {
                                        infomsg("sendfile not supported - 
falling back to write...\n");
                                        sendout = 0;
@@ -1528,17 +1536,17 @@
 
        while (algo <= numalgo) {
                algoname = (const char *) mhash_get_hash_name_static(algo);
-               if (algoname && (strcmp(algoname,name) == 0))
+               if (algoname && (strcasecmp(algoname,name) == 0))
                        break;
                ++algo;
        }
 #else
        algoname = "MD5";
 #endif
-       if (strcmp(algoname,name) == 0) {
+       if (strcasecmp(algoname,name) == 0) {
                dest_t *dest = malloc(sizeof(dest_t));
                bzero(dest,sizeof(dest_t));
-               dest->name = name;
+               dest->name = algoname;
                dest->fd = algo;
                if (Dest) {
                        dest->next = Dest->next;
@@ -1557,6 +1565,7 @@
 
 static void openDestinationFiles(dest_t *d)
 {
+       unsigned errs = ErrorOccurred;
        while (d) {
                if (d->fd == -1) {
                        if (0 == strncmp(d->arg,"/dev/",5))
@@ -1591,6 +1600,8 @@
 #endif
                d = d->next;
        }
+       if (ErrorOccurred != errs)
+               fatal("unable to open all outputs\n");
 }
 
 int main(int argc, const char **argv)
@@ -1645,10 +1656,10 @@
                        if (Blocksize < 100)
                                fatal("cannot set blocksize as percentage of 
total physical memory\n");
                } else if (!strcmp("--append",argv[c])) {
-                       optMode = O_APPEND;
+                       optMode |= O_APPEND;
                        debugmsg("append to next file\n");
                } else if (!strcmp("--truncate",argv[c])) {
-                       optMode = O_TRUNC;
+                       optMode |= O_TRUNC;
                        debugmsg("truncate next file\n");
                } else if (!argcheck("-m",argv,&c,argc)) {
                        totalmem = calcint(argv,c,totalmem);
@@ -1744,7 +1755,7 @@
                                dest->name = "<stdout>";
                                dest->mode = 0;
                        }
-                       optMode = Nooverwrite;
+                       optMode = O_EXCL;
                        dest->port = 0;
                        dest->result = 0;
                        bzero(&dest->thread,sizeof(dest->thread));
@@ -1792,8 +1803,8 @@
                        }
                        debugmsg("logFile set to %s\n",argv[c]);
                } else if (!strcmp("-f",argv[c])) {
-                       Nooverwrite = 0;
-                       debugmsg("Nooverwrite = 0\n");
+                       optMode &= ~O_EXCL;
+                       debugmsg("overwrite = 1\n");
                } else if (!strcmp("-q",argv[c])) {
                        debugmsg("disabling display of status\n");
                        Status = 0;
@@ -1865,6 +1876,8 @@
 #endif
                } else if (!strcmp("--hash",argv[c])) {
                        ++c;
+                       if (c == argc)
+                               fatal("missing argument to option --hash\n");
 #if HAVE_LIBMHASH
                        if (!strcmp(argv[c],"list")) {
                                (void) fprintf(stderr,"valid hash functions 
are:\n");
@@ -1880,7 +1893,7 @@
 #elif defined HAVE_MD5
                        if (!strcmp(argv[c],"list")) {
                                (void) fprintf(stderr,"valid hash functions 
are:\n");
-                               (void) fprintf(stderr,"\tmd5\n");
+                               (void) fprintf(stderr,"\tMD5\n");
                                exit(EXIT_SUCCESS);
                        }
 #else
@@ -1957,6 +1970,8 @@
                warningmsg("unable to determine maximum value of semaphores\n");
 #endif
        }
+       if (Numblocks < 5)
+               fatal("Minimum block count is 5.\n");
        if (Numblocks > mxnrsem) {
                fatal("cannot allocate more than %d blocks.\nThis is a system 
dependent limit, depending on the maximum semaphore value.\nPlease choose a 
bigger block size.\n",mxnrsem);
        }
@@ -2033,7 +2048,7 @@
        debugmsg("creating semaphores...\n");
        if (0 != sem_init(&Buf2Dev,0,0))
                fatal("Error creating semaphore Buf2Dev: %s\n",strerror(errno));
-       if (0 != sem_init(&Dev2Buf,0, Numblocks))
+       if (0 != sem_init(&Dev2Buf,0,Numblocks))
                fatal("Error creating semaphore Dev2Buf: %s\n",strerror(errno));
 
        debugmsg("opening input...\n");

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to