Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bzip3 for openSUSE:Factory checked in at 2023-08-28 17:16:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bzip3 (Old) and /work/SRC/openSUSE:Factory/.bzip3.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bzip3" Mon Aug 28 17:16:26 2023 rev:4 rq:1106257 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/bzip3/bzip3.changes 2023-06-04 00:12:53.709638971 +0200 +++ /work/SRC/openSUSE:Factory/.bzip3.new.1766/bzip3.changes 2023-08-28 17:16:29.599404571 +0200 @@ -1,0 +2,13 @@ +Tue Aug 22 07:15:29 UTC 2023 - Andrea Manzini <[email protected]> + +- update to 1.3.2: + * Add the `-r` option ("recovery"). If a file fails to decompress fully (e.g. due to a CRC error), ignore it and write the file regardless. + * Add preliminary CMake support. + * Fix the include guard macro name to work with pedantic compilers. + * Fix the shift direction in the crc32 check function. Because of a programming mistake, v1.3.0 and v1.3.1 + introduced a breaking change to the CRC calculation code. The change has been reverted in this release. + While the archives created with these versions of bzip3 will fail to regularly decompress due to a checksum + error, using the recovery option as `bzip3 -rd` to decompress will + restore their original contents. + +------------------------------------------------------------------- Old: ---- bzip3-1.3.1.tar.gz New: ---- bzip3-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bzip3.spec ++++++ --- /var/tmp/diff_new_pack.ZLfuuZ/_old 2023-08-28 17:16:30.847449387 +0200 +++ /var/tmp/diff_new_pack.ZLfuuZ/_new 2023-08-28 17:16:30.851449532 +0200 @@ -18,7 +18,7 @@ %define libname libbzip3-0 Name: bzip3 -Version: 1.3.1 +Version: 1.3.2 Release: 0 Summary: Compressor with BurrowsâWheeler transform and PPM context modeling License: BSD-2-Clause AND LGPL-3.0-or-later ++++++ bzip3-1.3.1.tar.gz -> bzip3-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/.tarball-version new/bzip3-1.3.2/.tarball-version --- old/bzip3-1.3.1/.tarball-version 2023-05-20 13:19:23.000000000 +0200 +++ new/bzip3-1.3.2/.tarball-version 2023-08-06 10:22:36.000000000 +0200 @@ -1 +1 @@ -1.3.1 \ No newline at end of file +1.3.2 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/Makefile.am new/bzip3-1.3.2/Makefile.am --- old/bzip3-1.3.1/Makefile.am 2023-05-20 13:19:13.000000000 +0200 +++ new/bzip3-1.3.2/Makefile.am 2023-08-06 10:22:20.000000000 +0200 @@ -77,3 +77,7 @@ ./$(BZIP3) -v -d $(builddir)/LICENSE.bz3 $(builddir)/LICENSE2 cmp $(srcdir)/LICENSE $(builddir)/LICENSE2 -command -v md5sum >/dev/null 2>&1 && md5sum $(builddir)/LICENSE.bz3 + +.PHONY: test +test: $(BZIP3) + ./$(BZIP3) -d < $(srcdir)/examples/shakespeare.txt.bz3 | cmp - $(srcdir)/examples/shakespeare.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/Makefile.in new/bzip3-1.3.2/Makefile.in --- old/bzip3-1.3.1/Makefile.in 2023-05-20 13:19:18.000000000 +0200 +++ new/bzip3-1.3.2/Makefile.in 2023-08-06 10:22:26.000000000 +0200 @@ -1207,6 +1207,10 @@ cmp $(srcdir)/LICENSE $(builddir)/LICENSE2 -command -v md5sum >/dev/null 2>&1 && md5sum $(builddir)/LICENSE.bz3 +.PHONY: test +test: $(BZIP3) + ./$(BZIP3) -d < $(srcdir)/examples/shakespeare.txt.bz3 | cmp - $(srcdir)/examples/shakespeare.txt + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/NEWS new/bzip3-1.3.2/NEWS --- old/bzip3-1.3.1/NEWS 2023-05-20 13:19:13.000000000 +0200 +++ new/bzip3-1.3.2/NEWS 2023-08-06 10:22:20.000000000 +0200 @@ -86,3 +86,14 @@ * Explicitly disable `-march=native` for releases. * Fix a bug in the tool reported by Adam Borowski regarding -t/-d input buffer checks. * Fix an issue with the current input offset not being taken into account in bz3_compress. + +v1.3.2: +* Add the `-r` option ("recovery"). If a file fails to decompress fully (e.g. due to a CRC error), ignore it and write the + file regardless. +* Add preliminary CMake support. +* Fix the include guard macro name to work with pedantic compilers. +* Fix the shift direction in the crc32 check function. Because of a programming mistake, v1.3.0 and v1.3.1 + introduced a breaking change to the CRC calculation code. The change has been reverted in this release. + While the archives created with these versions of bzip3 will fail to regularly decompress due to a checksum + error, using the recovery option as `bzip3 -rd` to decompress will + restore their original contents. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/bz3grep.1 new/bzip3-1.3.2/bz3grep.1 --- old/bzip3-1.3.1/bz3grep.1 2023-05-20 13:19:22.000000000 +0200 +++ new/bzip3-1.3.2/bz3grep.1 2023-08-06 10:22:35.000000000 +0200 @@ -1,4 +1,4 @@ -.TH bz3grep 1 "20 May 2023" "version v1.3.1" +.TH bz3grep 1 "06 August 2023" "version v1.3.2" . .SH "NAME" \fBbz3grep\fR \- print lines matching a pattern in bzip3\-compressed files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/bz3less.1 new/bzip3-1.3.2/bz3less.1 --- old/bzip3-1.3.1/bz3less.1 2023-05-20 13:19:22.000000000 +0200 +++ new/bzip3-1.3.2/bz3less.1 2023-08-06 10:22:35.000000000 +0200 @@ -1,4 +1,4 @@ -.TH bz3less 1 "20 May 2023" "version v1.3.1" +.TH bz3less 1 "06 August 2023" "version v1.3.2" . .SH "NAME" \fBbz3less\fR \- view bzip3\-compressed files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/bz3more.1 new/bzip3-1.3.2/bz3more.1 --- old/bzip3-1.3.1/bz3more.1 2023-05-20 13:19:22.000000000 +0200 +++ new/bzip3-1.3.2/bz3more.1 2023-08-06 10:22:35.000000000 +0200 @@ -1,4 +1,4 @@ -.TH bz3more 1 "20 May 2023" "version v1.3.1" +.TH bz3more 1 "06 August 2023" "version v1.3.2" . .SH "NAME" \fBbz3more\fR \- view bzip3\-compressed files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/bz3most.1 new/bzip3-1.3.2/bz3most.1 --- old/bzip3-1.3.1/bz3most.1 2023-05-20 13:19:22.000000000 +0200 +++ new/bzip3-1.3.2/bz3most.1 2023-08-06 10:22:35.000000000 +0200 @@ -1,4 +1,4 @@ -.TH bz3most 1 "20 May 2023" "version v1.3.1" +.TH bz3most 1 "06 August 2023" "version v1.3.2" . .SH "NAME" \fBbz3most\fR \- view bzip3\-compressed files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/bzip3.1 new/bzip3-1.3.2/bzip3.1 --- old/bzip3-1.3.1/bzip3.1 2023-05-20 13:19:22.000000000 +0200 +++ new/bzip3-1.3.2/bzip3.1 2023-08-06 10:22:35.000000000 +0200 @@ -1,4 +1,4 @@ -.TH bzip3 1 "20 May 2023" "version v1.3.1" +.TH bzip3 1 "06 August 2023" "version v1.3.2" . .SH NAME bzip3 \- an efficient statistical file compressor and spiritual successor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/configure new/bzip3-1.3.2/configure --- old/bzip3-1.3.1/configure 2023-05-20 13:19:17.000000000 +0200 +++ new/bzip3-1.3.2/configure 2023-08-06 10:22:26.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for bzip3 1.3.1. +# Generated by GNU Autoconf 2.71 for bzip3 1.3.2. # # Report bugs to <https://github.com/kspalaiologos/bzip3>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='bzip3' PACKAGE_TARNAME='bzip3' -PACKAGE_VERSION='1.3.1' -PACKAGE_STRING='bzip3 1.3.1' +PACKAGE_VERSION='1.3.2' +PACKAGE_STRING='bzip3 1.3.2' PACKAGE_BUGREPORT='https://github.com/kspalaiologos/bzip3' PACKAGE_URL='' @@ -1379,7 +1379,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bzip3 1.3.1 to adapt to many kinds of systems. +\`configure' configures bzip3 1.3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1450,7 +1450,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bzip3 1.3.1:";; + short | recursive ) echo "Configuration of bzip3 1.3.2:";; esac cat <<\_ACEOF @@ -1571,7 +1571,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bzip3 configure 1.3.1 +bzip3 configure 1.3.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1827,7 +1827,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bzip3 $as_me 1.3.1, which was +It was created by bzip3 $as_me 1.3.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3097,7 +3097,7 @@ # Define the identity of the package. PACKAGE='bzip3' - VERSION='1.3.1' + VERSION='1.3.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -14614,7 +14614,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bzip3 $as_me 1.3.1, which was +This file was extended by bzip3 $as_me 1.3.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14673,7 +14673,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -bzip3 config.status 1.3.1 +bzip3 config.status 1.3.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/include/common.h new/bzip3-1.3.2/include/common.h --- old/bzip3-1.3.1/include/common.h 2023-05-20 13:19:13.000000000 +0200 +++ new/bzip3-1.3.2/include/common.h 2023-08-06 10:22:20.000000000 +0200 @@ -22,7 +22,7 @@ #define KiB(x) ((x)*1024) #define MiB(x) ((x)*1024 * 1024) -#define BWT_BOUND(x) ((x) + 128) +#define BWT_BOUND(x) (bz3_bound(x) + 128) #include <inttypes.h> #include <stdint.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/include/libbz3.h new/bzip3-1.3.2/include/libbz3.h --- old/bzip3-1.3.1/include/libbz3.h 2023-05-20 13:19:13.000000000 +0200 +++ new/bzip3-1.3.2/include/libbz3.h 2023-08-06 10:22:20.000000000 +0200 @@ -17,8 +17,8 @@ * this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LIBBZ3_H -#define _LIBBZ3_H +#ifndef LIBBZ3_H +#define LIBBZ3_H #include <stddef.h> #include <stdint.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/src/libbz3.c new/bzip3-1.3.2/src/libbz3.c --- old/bzip3-1.3.1/src/libbz3.c 2023-05-20 13:19:13.000000000 +0200 +++ new/bzip3-1.3.2/src/libbz3.c 2023-08-06 10:22:20.000000000 +0200 @@ -61,7 +61,7 @@ }; static u32 crc32sum(u32 crc, u8 * RESTRICT buf, size_t size) { - while (size--) crc = crc32Table[((crc >> 24) ^ *(buf++)) & 0xff] ^ (crc << 8); + while (size--) crc = crc32Table[((u8)crc ^ *(buf++)) & 0xff] ^ (crc >> 8); return crc; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bzip3-1.3.1/src/main.c new/bzip3-1.3.2/src/main.c --- old/bzip3-1.3.1/src/main.c 2023-05-20 13:19:13.000000000 +0200 +++ new/bzip3-1.3.2/src/main.c 2023-08-06 10:22:20.000000000 +0200 @@ -43,6 +43,7 @@ #define MODE_DECODE 0 #define MODE_ENCODE 1 #define MODE_TEST 2 +#define MODE_RECOVER 3 static void version() { fprintf(stdout, "bzip3 " VERSION @@ -58,6 +59,7 @@ "Operations:\n" " -e/-z, --encode compress data (default)\n" " -d, --decode decompress data\n" + " -r, --recover attempt at recovering corrupted data\n" " -t, --test verify validity of compressed data\n" " -h, --help display an usage overview\n" " -f, --force force overwriting output if it already exists\n" @@ -148,7 +150,7 @@ uint64_t bytes_read = 0, bytes_written = 0; if ((mode == MODE_ENCODE && isatty(fileno(output_des))) || - ((mode == MODE_DECODE || mode == MODE_TEST) && isatty(fileno(input_des)))) { + ((mode == MODE_DECODE || mode == MODE_TEST || mode == MODE_RECOVER) && isatty(fileno(input_des)))) { fprintf(stderr, "Refusing to read/write binary data from/to the terminal.\n"); return 1; } @@ -167,6 +169,7 @@ bytes_written += 9; break; + case MODE_RECOVER: case MODE_DECODE: case MODE_TEST: { char signature[5]; @@ -184,7 +187,12 @@ fprintf(stderr, "The input file is corrupted. Reason: Invalid block " "size in the header.\n"); - return 1; + if(mode == MODE_RECOVER) { + fprintf(stderr, "Recovery mode: Proceeding.\n"); + block_size = MiB(511); + } else { + return 1; + } } bytes_read += 9; @@ -258,6 +266,27 @@ bytes_written += old_size; } fflush(output_des); + } else if (mode == MODE_RECOVER) { + s32 new_size, old_size; + while (!feof(input_des)) { + if (!xread_eofcheck(&byteswap_buf, 1, 4, input_des)) continue; + + new_size = read_neutral_s32(byteswap_buf); + xread_noeof(&byteswap_buf, 1, 4, input_des); + old_size = read_neutral_s32(byteswap_buf); + if (old_size > bz3_bound(block_size) || new_size > bz3_bound(block_size)) { + fprintf(stderr, "Failed to decode a block: Inconsistent headers.\n"); + return 1; + } + xread_noeof(buffer, 1, new_size, input_des); + bytes_read += 8 + new_size; + if (bz3_decode_block(state, buffer, new_size, old_size) == -1) { + fprintf(stderr, "Writing invalid block: %s\n", bz3_strerror(state)); + } + xwrite(buffer, old_size, 1, output_des); + bytes_written += old_size; + } + fflush(output_des); } else if (mode == MODE_TEST) { s32 new_size, old_size; while (!feof(input_des)) { @@ -279,7 +308,7 @@ } } - if (bz3_last_error(state) != BZ3_OK) { + if (bz3_last_error(state) != BZ3_OK && mode != MODE_RECOVER) { fprintf(stderr, "Failed to read data: %s\n", bz3_strerror(state)); return 1; } @@ -363,6 +392,33 @@ } } fflush(output_des); + } else if (mode == MODE_RECOVER) { + while (!feof(input_des)) { + s32 i = 0; + for (; i < workers; i++) { + if (!xread_eofcheck(&byteswap_buf, 1, 4, input_des)) break; + sizes[i] = read_neutral_s32(byteswap_buf); + xread_noeof(&byteswap_buf, 1, 4, input_des); + old_sizes[i] = read_neutral_s32(byteswap_buf); + if (old_sizes[i] > bz3_bound(block_size) || sizes[i] > bz3_bound(block_size)) { + fprintf(stderr, "Failed to decode a block: Inconsistent headers.\n"); + return 1; + } + xread_noeof(buffers[i], 1, sizes[i], input_des); + bytes_read += 8 + sizes[i]; + } + bz3_decode_blocks(states, buffers, sizes, old_sizes, i); + for (s32 j = 0; j < i; j++) { + if (bz3_last_error(states[j]) != BZ3_OK) { + fprintf(stderr, "Writing invalid block: %s\n", bz3_strerror(states[j])); + } + } + for (s32 j = 0; j < i; j++) { + xwrite(buffers[j], old_sizes[j], 1, output_des); + bytes_written += old_sizes[j]; + } + } + fflush(output_des); } else if (mode == MODE_TEST) { while (!feof(input_des)) { s32 i = 0; @@ -488,9 +544,9 @@ u32 block_size = MiB(16); #ifdef PTHREAD - const char * short_options = "Bb:cdefhj:ktvVz"; + const char * short_options = "Bb:cdefhj:krtvVz"; #else - const char * short_options = "Bb:cdefhktvVz"; + const char * short_options = "Bb:cdefhkrtvVz"; #endif static struct option long_options[] = { { "encode", no_argument, 0, 'e' }, @@ -498,6 +554,7 @@ { "test", no_argument, 0, 't' }, { "stdout", no_argument, 0, 'c' }, { "force", no_argument, 0, 'f' }, + { "recover", no_argument, 0, 'r' }, { "help", no_argument, 0, 'h' }, { "keep", no_argument, 0, 'k' }, { "version", no_argument, 0, 'V' }, @@ -525,6 +582,9 @@ case 'd': mode = MODE_DECODE; break; + case 'r': + mode = MODE_RECOVER; + break; case 't': mode = MODE_TEST; break; @@ -602,6 +662,7 @@ if (!force_stdstreams) free(output_name); } break; + case MODE_RECOVER: case MODE_DECODE: /* Decode each of the files. */ while (optind < argc) { @@ -686,7 +747,7 @@ input = f1; output = f2; } - } else if (mode == MODE_DECODE) { + } else if (mode == MODE_DECODE || mode == MODE_RECOVER) { if (f2 == NULL) { // decode from f1 to stdout. input = f1; ++++++ no-env.patch ++++++ --- /var/tmp/diff_new_pack.ZLfuuZ/_old 2023-08-28 17:16:31.051456714 +0200 +++ /var/tmp/diff_new_pack.ZLfuuZ/_new 2023-08-28 17:16:31.055456857 +0200 @@ -1,16 +1,16 @@ -Index: bzip3-1.3.0/bz3cat +Index: bzip3-1.3.2/bz3cat =================================================================== ---- bzip3-1.3.0.orig/bz3cat -+++ bzip3-1.3.0/bz3cat +--- bzip3-1.3.2.orig/bz3cat ++++ bzip3-1.3.2/bz3cat @@ -1,3 +1,3 @@ -#!/usr/bin/env sh +#!/bin/sh exec bzip3 -Bcd "$@" -Index: bzip3-1.3.0/bz3grep +Index: bzip3-1.3.2/bz3grep =================================================================== ---- bzip3-1.3.0.orig/bz3grep -+++ bzip3-1.3.0/bz3grep +--- bzip3-1.3.2.orig/bz3grep ++++ bzip3-1.3.2/bz3grep @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh @@ -24,28 +24,28 @@ -exit "${EXIT_CODE}" \ No newline at end of file +exit "${EXIT_CODE}" -Index: bzip3-1.3.0/bz3less +Index: bzip3-1.3.2/bz3less =================================================================== ---- bzip3-1.3.0.orig/bz3less -+++ bzip3-1.3.0/bz3less +--- bzip3-1.3.2.orig/bz3less ++++ bzip3-1.3.2/bz3less @@ -1,2 +1,2 @@ -#!/usr/bin/env sh +#!/bin/sh bz3cat "$@" | less -Index: bzip3-1.3.0/bz3more +Index: bzip3-1.3.2/bz3more =================================================================== ---- bzip3-1.3.0.orig/bz3more -+++ bzip3-1.3.0/bz3more +--- bzip3-1.3.2.orig/bz3more ++++ bzip3-1.3.2/bz3more @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh for FILE do -Index: bzip3-1.3.0/bz3most +Index: bzip3-1.3.2/bz3most =================================================================== ---- bzip3-1.3.0.orig/bz3most -+++ bzip3-1.3.0/bz3most +--- bzip3-1.3.2.orig/bz3most ++++ bzip3-1.3.2/bz3most @@ -1,2 +1,2 @@ -#!/usr/bin/env sh +#!/bin/sh
