Debian Codegraph @

debian/patches/tar-1.35-revert-fix-savannah-bug-633567.patch

raw
1 From d437ecf75de2d6fdeb2aed6f45c4b3b16373389b Mon Sep 17 00:00:00 2001
2 From: Sergey Poznyakoff <[email protected]>
3 Date: Fri, 11 Aug 2023 21:35:30 +0300
4 Subject: [PATCH] Revert "Fix savannah bug #63567"
5 Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2230127
6 Bug-Debian: https://bugs.debian.org/748244
7
8 Commit e89c7a45eb broke deletion from archives. The reported number
9 of bytes read is rounded to the nearest record anyway, revert the
10 commit and document the fact.
11
12 Reported by Ed Santiago. See
13 https://bugzilla.redhat.com/show_bug.cgi?id=2230127
14
15 * doc/tar.texi: Document the fact that --totals rounds up the
16 number of bytes reads to the nearest record.
17 * src/buffer.c: Revert changes.
18 * tests/delete06.at: Fix expected status code and stderr.
19 ---
20 doc/tar.texi | 5 +++++
21 src/buffer.c | 3 +--
22 tests/delete06.at | 7 +++++--
23 3 files changed, 11 insertions(+), 4 deletions(-)
24
25 Index: tar/src/buffer.c
26 ===================================================================
27 --- tar.orig/src/buffer.c
28 +++ tar/src/buffer.c
29 @@ -987,8 +987,7 @@ short_read (size_t status)
30 }
31
32 record_end = record_start + (record_size - left) / BLOCKSIZE;
33 - if (left == 0)
34 - records_read++;
35 + records_read++;
36 }
37
38 /* Flush the current buffer to/from the archive. */
39 Index: tar/tests/delete06.at
40 ===================================================================
41 --- tar.orig/tests/delete06.at
42 +++ tar/tests/delete06.at
43 @@ -36,7 +36,10 @@ esac
44 dd if=archive.tar of=trunc.tar bs=$size count=1 2>/dev/null
45 tar --delete 'b/' -f trunc.tar
46 ],
47 -[0],
48 -[],[],[],[],[gnu, pax])
49 +[2],
50 +[],
51 +[tar: lseek: trunc.tar: Value too large for defined data type
52 +tar: Exiting with failure status due to previous errors
53 +],[],[],[gnu, pax])
54
55 AT_CLEANUP