Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mbuffer for openSUSE:Factory checked in at 2026-06-30 15:13:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mbuffer (Old) and /work/SRC/openSUSE:Factory/.mbuffer.new.11887 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mbuffer" Tue Jun 30 15:13:51 2026 rev:31 rq:1362595 version:20260511 Changes: -------- --- /work/SRC/openSUSE:Factory/mbuffer/mbuffer.changes 2026-04-22 16:57:00.557576867 +0200 +++ /work/SRC/openSUSE:Factory/.mbuffer.new.11887/mbuffer.changes 2026-06-30 15:14:08.817491015 +0200 @@ -1,0 +2,9 @@ +Mon Jun 29 12:16:14 UTC 2026 - Dirk Müller <[email protected]> + +- update to 20260511: + * fix data corruption occuring at the end of a tape, when the + * transfer block size is not a multiple of the native block + * size of the tape device (fix by Daniel Collins) + * restore terminal attributes on exit + +------------------------------------------------------------------- Old: ---- mbuffer-20260301.tgz New: ---- mbuffer-20260511.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mbuffer.spec ++++++ --- /var/tmp/diff_new_pack.EWUKZt/_old 2026-06-30 15:14:09.505514313 +0200 +++ /var/tmp/diff_new_pack.EWUKZt/_new 2026-06-30 15:14:09.505514313 +0200 @@ -18,7 +18,7 @@ Name: mbuffer -Version: 20260301 +Version: 20260511 Release: 0 Summary: Replacement for "buffer" with many more Features License: GPL-3.0-or-later ++++++ mbuffer-20260301.tgz -> mbuffer-20260511.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20260301/.hg_archival.txt new/mbuffer-20260511/.hg_archival.txt --- old/mbuffer-20260301/.hg_archival.txt 2026-03-01 16:47:32.000000000 +0100 +++ new/mbuffer-20260511/.hg_archival.txt 2026-05-11 22:19:26.000000000 +0200 @@ -1,4 +1,4 @@ repo: 6e3b485d74645931e2408ed1f57e659029b5639a -node: 3f8b8febe218721e3fcd1097b64d2d4324b156f5 +node: 4dcf374b06f6de89d204fa0ff932a126ccc3c9e2 branch: default -tag: R20260301 +tag: R20260511 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20260301/ChangeLog new/mbuffer-20260511/ChangeLog --- old/mbuffer-20260301/ChangeLog 2026-03-01 16:47:32.000000000 +0100 +++ new/mbuffer-20260511/ChangeLog 2026-05-11 22:19:26.000000000 +0200 @@ -1,7 +1,8 @@ -20260301: -- drop speed limitations at the start and end of transfer -- fix input stalling unintential in -M/-R mode -- fix: do not close an already closed file +20260511: +- fix data corruption occuring at the end of a tape, when the + transfer block size is not a multiple of the native block + size of the tape device (fix by Daniel Collins) +- restore terminal attributes on exit 20260221: - added dynamic speed adjustment with low speed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20260301/input.c new/mbuffer-20260511/input.c --- old/mbuffer-20260301/input.c 2026-03-01 16:47:32.000000000 +0100 +++ new/mbuffer-20260511/input.c 2026-05-11 22:19:26.000000000 +0200 @@ -218,12 +218,11 @@ } -static int devread(unsigned at) +static int devread(unsigned at, int num) { static char *DevBuf = 0; static size_t IFill = 0, Off = 0; static int hadzero = 0; - int num = 0; do { if (IFill) { size_t s = IFill; @@ -291,7 +290,7 @@ do { ssize_t in; if (IDevBSize) - in = devread(at); + in = devread(at,num); else if (InSocket) in = recv(In,Buffer[at] + num,Blocksize - num,MSG_WAITALL); else @@ -362,7 +361,7 @@ for (;;) { int err; - if ((startread < 1) && (MinSpeed == 0)) { + if (startread < 1) { err = pthread_mutex_lock(&LowMut); assert(err == 0); counter_getvalue(&FullBlocks,&fill); @@ -381,7 +380,7 @@ } if (Terminate) { /* for async termination requests */ debugmsg("inputThread: terminating early upon request...\n"); - if ((-1 != In) && (-1 == close(In))) + if (-1 == close(In)) errormsg("error closing input: %s\n",strerror(errno)); if (Status) pthread_exit((void *)1); @@ -392,9 +391,9 @@ debugmsg("inputThread: no more blocks\n"); return 0; } - if ((0 != MaxReadSpeed) && (0 != Numout)) { + if (MaxReadSpeed) { unsigned long long speedlimit = MaxReadSpeed; - if (MinSpeed != 0) { + if (MinSpeed) { counter_getvalue(&FullBlocks,&fill); double frac = (double)fill/(double)Numblocks; if (frac >= StartWrite) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20260301/mbuffer.c new/mbuffer-20260511/mbuffer.c --- old/mbuffer-20260301/mbuffer.c 2026-03-01 16:47:32.000000000 +0100 +++ new/mbuffer-20260511/mbuffer.c 2026-05-11 22:19:26.000000000 +0200 @@ -84,6 +84,7 @@ static const char Stdout[] = "<stdout>"; +static struct termios TAttr; static int kb2str(char *s, double v) @@ -189,7 +190,6 @@ ErrorOccurred = 1; Terminate = 1; (void) close(In); - In = -1; if (TermQ[1] != -1) if (-1 == write(TermQ[1],"0",1)) {} if (StartWrite > 0) @@ -616,8 +616,7 @@ out = open(outfile,mode,0666); if (-1 == out) errormsg("error reopening output file: %s\n",strerror(errno)); - else - enable_directio(out,outfile); + enable_directio(out,outfile); } while (-1 == out); (void) clock_gettime(ClockSrc,&volstart); diff = volstart.tv_sec - now.tv_sec + (double) (volstart.tv_nsec - now.tv_nsec) * 1E-9; @@ -857,7 +856,7 @@ if (multipleSenders == 0) { counter_post(&FreeBlocks); } - if ((0 != MaxWriteSpeed) && (-1 == Finish)) { + if (MaxWriteSpeed) { unsigned long long speedlimit = MaxWriteSpeed; if (MinSpeed) { counter_getvalue(&FullBlocks,&fill); @@ -1290,6 +1289,12 @@ } +void restoreTermAttr() +{ + (void) tcsetattr(STDERR_FILENO,TCSANOW,&TAttr); +} + + int main(int argc, const char **argv) { int c, fl, err; @@ -1377,15 +1382,18 @@ err = fcntl(STDERR_FILENO,F_SETFL,fl); assert(err == 0); if ((Terminal == 1) && (NumVolumes != 1)) { - struct termios tset; - if (-1 == tcgetattr(STDERR_FILENO,&tset)) { + if (-1 == tcgetattr(STDERR_FILENO,&TAttr)) { warningmsg("unable to get terminal attributes: %s\n",strerror(errno)); } else { - tset.c_lflag &= (~ICANON) & (~ECHO); - tset.c_cc[VTIME] = 0; - tset.c_cc[VMIN] = 1; - if (-1 == tcsetattr(STDERR_FILENO,TCSANOW,&tset)) + struct termios tio = TAttr; + tio.c_lflag &= (~ICANON) & (~ECHO); + tio.c_cc[VTIME] = 0; + tio.c_cc[VMIN] = 1; + if (-1 == tcsetattr(STDERR_FILENO,TCSANOW,&tio)) { warningmsg("unable to set terminal attributes: %s\n",strerror(errno)); + } else { + atexit(restoreTermAttr); + } } }
