[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#928502: marked as done (unblock: notmuch/0.28.4-1)



Your message dated Mon, 06 May 2019 20:03:00 +0000
with message-id <94d23c96-d9f3-a730-bd87-97f4ac8c08e8@thykier.net>
and subject line Re: Bug#928502: unblock: notmuch/0.28.4-1
has caused the Debian Bug report #928502,
regarding unblock: notmuch/0.28.4-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
928502: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=928502
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@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 <bremner@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_suite@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-----

--- End Message ---
--- Begin Message ---
David Bremner:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> 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.
> 
> [...]
> 
> 
> unblock notmuch/0.28.4-1
> 
> > [...]
Unblocked, thanks.
~Niels

--- End Message ---

Reply to: