Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Please unblock package notmuch This release fixes a bug discovered by Rob Browning. The version of notmuch in testing will report an error and exit with status 1 (after generating the correct output) if the input for "notmuch show - --format=raw" is a multiple of 4096 bytes. This seems at least severity important since it breaks people's scripts. There's one line of code change, to notmuch-show.c. There is some new tests, which could be disabled if that seemed safer/better. diff -Nru notmuch-0.28.3/bindings/python/notmuch/version.py notmuch-0.28.4/bindings/python/notmuch/version.py - --- notmuch-0.28.3/bindings/python/notmuch/version.py 2019-03-05 21:46:41.000000000 -0400 +++ notmuch-0.28.4/bindings/python/notmuch/version.py 2019-05-05 08:09:30.000000000 -0300 @@ -1,3 +1,3 @@ # this file should be kept in sync with ../../../version - -__VERSION__ = '0.28.3' +__VERSION__ = '0.28.4' SOVERSION = '5' diff -Nru notmuch-0.28.3/debian/changelog notmuch-0.28.4/debian/changelog - --- notmuch-0.28.3/debian/changelog 2019-03-05 15:39:09.000000000 -0400 +++ notmuch-0.28.4/debian/changelog 2019-05-05 08:08:56.000000000 -0300 @@ -1,3 +1,12 @@ +notmuch (0.28.4-1) unstable; urgency=medium + + * New upstream bugfix release + * Fix for bug in 'notmuch show --raw' that causes spurious errors to be + reported when the mail file is a multiple of the libc buffer size + (e.g. 4096 bytes). + + -- David Bremner <brem...@debian.org> Sun, 05 May 2019 08:08:56 -0300 + notmuch (0.28.3-1) unstable; urgency=medium * New upstream bugfix release. diff -Nru notmuch-0.28.3/NEWS notmuch-0.28.4/NEWS - --- notmuch-0.28.3/NEWS 2019-03-05 21:46:41.000000000 -0400 +++ notmuch-0.28.4/NEWS 2019-05-05 08:09:30.000000000 -0300 @@ -1,3 +1,12 @@ +Notmuch 0.28.4 (2019-05-05) +=========================== + +Command line interface +---------------------- + +Fix a spurious error when using `notmuch show --raw` on messages whose +size is a multiple of the internal buffer size. + Notmuch 0.28.3 (2019-03-05) =========================== diff -Nru notmuch-0.28.3/notmuch-show.c notmuch-0.28.4/notmuch-show.c - --- notmuch-0.28.3/notmuch-show.c 2019-03-05 21:46:41.000000000 -0400 +++ notmuch-0.28.4/notmuch-show.c 2019-05-05 08:09:30.000000000 -0300 @@ -851,7 +851,7 @@ return NOTMUCH_STATUS_FILE_ERROR; } - - if (fwrite (buf, size, 1, stdout) != 1) { + if (size > 0 && fwrite (buf, size, 1, stdout) != 1) { fprintf (stderr, "Error: Write failed\n"); fclose (file); return NOTMUCH_STATUS_FILE_ERROR; diff -Nru notmuch-0.28.3/test/T210-raw.sh notmuch-0.28.4/test/T210-raw.sh - --- notmuch-0.28.3/test/T210-raw.sh 2019-03-05 21:46:41.000000000 -0400 +++ notmuch-0.28.4/test/T210-raw.sh 2019-05-05 08:09:30.000000000 -0300 @@ -30,4 +30,38 @@ This is just a test message (#2)" +test_python <<EOF +from email.message import EmailMessage +for pow in range(10,21): + size = 2 ** pow + msg = EmailMessage() + msg['Subject'] = 'message with {:07d} bytes'.format(size) + msg['From'] = 'Notmuch Test Suite <test_su...@notmuchmail.org>' + msg['To'] = msg['From'] + msg['Message-Id'] = 'size-{:07d}@notmuch-test-suite'.format(size) + content = "" + msg.set_content("") + padding = size - len(bytes(msg)) + lines = [] + while padding > 0: + line = '.' * min(padding, 72) + lines.append(line) + padding = padding - len(line) - 1 + content ='\n'.join(lines) + msg.set_content(content) + with open('mail/size-{:07d}'.format(size), 'wb') as f: + f.write(bytes(msg)) +EOF + +notmuch new --quiet + +for pow in {10..20}; do + printf -v size "%07d" $((2**$pow)) + test_begin_subtest "content, message of size $size" + notmuch show --format=raw subject:$size > OUTPUT + test_expect_equal_file mail/size-$size OUTPUT + test_begin_subtest "return value, message of size $size" + test_expect_success "notmuch show --format=raw subject:$size > /dev/null" +done + test_done diff -Nru notmuch-0.28.3/.travis.yml notmuch-0.28.4/.travis.yml - --- notmuch-0.28.3/.travis.yml 2019-03-05 21:46:41.000000000 -0400 +++ notmuch-0.28.4/.travis.yml 2019-05-05 08:09:30.000000000 -0300 @@ -1,7 +1,6 @@ language: c - -dist: trusty - -sudo: false +dist: xenial addons: apt: diff -Nru notmuch-0.28.3/version notmuch-0.28.4/version - --- notmuch-0.28.3/version 2019-03-05 21:46:41.000000000 -0400 +++ notmuch-0.28.4/version 2019-05-05 08:09:30.000000000 -0300 @@ -1 +1 @@ - -0.28.3 +0.28.4 unblock notmuch/0.28.4-1 - -- System Information: Debian Release: buster/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'testing-proposed-updates-debug'), (500, 'testing-debug'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-4-amd64 (SMP w/8 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlzQCYYACgkQ8gKXHaSn niymjwv+LQUpZ7UW7s09pueMjna9j/RYZTeh6WGu1KR3qGVLb2ysGfKkw0PDl4M4 cal6ccW3IfHVDxU9IOk6n82VaCVxygyDvdVDiqFJyQaUNaCb5lzSAAGsELTTf6ua qFrniACe/uLgZU5AjN5J4I1Ui+8PZLzKMXx/uItFUA+I9gToXp3RQ8aZiqHW3qrv LXWiMSNAWPpjSz/8nlrFPgKgY9zTD1jrqcIGJ0UUscwDwL23CXdKt9OCuvzfVYRB gmfMb5OMjsyv45M2ywv5eEnZX/labtGDgDyE6TBXSqdDl0VGEPGKwqmV8IoAnpHU 6eF1jwKZE5DqzmVqS0ewpjLoqwR7ONQEnlZiccG5Pg0tNYNOr51hp5CThGQUf+r1 6pE4z1hLzjekAsN9YGQPhML/GsBFIVV91w9RhUi6MnAJrOws146NyVKBRosNeleL pd5IAW62K0VkoSujFvEbznq6X+Xsyjf0euex7IA/xPS9GprEXe4SDj+SxEQuEw7b PR/lHorR =Cci6 -----END PGP SIGNATURE-----