#3 Rebased to version 3.4.2 (#1787791)
Merged 4 years ago by odubaj. Opened 4 years ago by odubaj.
rpms/ odubaj/libarchive master  into  master

@@ -1,114 +0,0 @@ 

- From aaacc8762fd8ced8823350edd8ce2e46b565582b Mon Sep 17 00:00:00 2001

- From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>

- Date: Sun, 1 Sep 2019 02:46:55 -0400

- Subject: [PATCH] test_write_filter_zstd: size @ lvl=20 < default < lvl=1

- 

- Raise compression on the second test to level=20, and perform a

- third at level=1. Expect the output archive sizes to line up

- based on compression level. Reduces test susceptibility to small

- output size variations from different libzstd releases.

- ---

-  libarchive/test/test_write_filter_zstd.c | 66 +++++++++++++++++++++---

-  1 file changed, 60 insertions(+), 6 deletions(-)

- 

- diff --git a/libarchive/test/test_write_filter_zstd.c b/libarchive/test/test_write_filter_zstd.c

- index 9fb01906..13de1344 100644

- --- a/libarchive/test/test_write_filter_zstd.c

- +++ b/libarchive/test/test_write_filter_zstd.c

- @@ -34,7 +34,7 @@ DEFINE_TEST(test_write_filter_zstd)

-  	char *buff, *data;

-  	size_t buffsize, datasize;

-  	char path[16];

- -	size_t used1, used2;

- +	size_t used1, used2, used3;

-  	int i, r;

-  

-  	buffsize = 2000000;

- @@ -125,7 +125,7 @@ DEFINE_TEST(test_write_filter_zstd)

-  	assertEqualIntA(a, ARCHIVE_OK,

-  	    archive_write_set_filter_option(a, NULL, "compression-level", "9"));

-  	assertEqualIntA(a, ARCHIVE_OK,

- -	    archive_write_set_filter_option(a, NULL, "compression-level", "6"));

- +	    archive_write_set_filter_option(a, NULL, "compression-level", "20"));

-  	assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used2));

-  	for (i = 0; i < 100; i++) {

-  		sprintf(path, "file%03d", i);

- @@ -140,10 +140,6 @@ DEFINE_TEST(test_write_filter_zstd)

-  	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));

-  	assertEqualInt(ARCHIVE_OK, archive_write_free(a));

-  

- -	failure("compression-level=6 wrote %d bytes, default wrote %d bytes",

- -	    (int)used2, (int)used1);

- -	assert(used2 < used1);

- -

-  	assert((a = archive_read_new()) != NULL);

-  	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));

-  	r = archive_read_support_filter_zstd(a);

- @@ -167,6 +163,64 @@ DEFINE_TEST(test_write_filter_zstd)

-  	}

-  	assertEqualInt(ARCHIVE_OK, archive_read_free(a));

-  

- +	/*

- +	 * One more time at level 1

- +	 */

- +	assert((a = archive_write_new()) != NULL);

- +	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));

- +	assertEqualIntA(a, ARCHIVE_OK,

- +	    archive_write_set_bytes_per_block(a, 10));

- +	assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_zstd(a));

- +	assertEqualIntA(a, ARCHIVE_OK,

- +	    archive_write_set_filter_option(a, NULL, "compression-level", "1"));

- +	assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used3));

- +	assert((ae = archive_entry_new()) != NULL);

- +	archive_entry_set_filetype(ae, AE_IFREG);

- +	archive_entry_set_size(ae, datasize);

- +	for (i = 0; i < 100; i++) {

- +		sprintf(path, "file%03d", i);

- +		archive_entry_copy_pathname(ae, path);

- +		assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));

- +		assertA(datasize == (size_t)archive_write_data(a, data, datasize));

- +	}

- +	archive_entry_free(ae);

- +	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));

- +	assertEqualInt(ARCHIVE_OK, archive_write_free(a));

- +

- +	assert((a = archive_read_new()) != NULL);

- +	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));

- +	r = archive_read_support_filter_zstd(a);

- +	if (r == ARCHIVE_WARN) {

- +		skipping("zstd reading not fully supported on this platform");

- +	} else {

- +		assertEqualIntA(a, ARCHIVE_OK,

- +		    archive_read_support_filter_all(a));

- +		assertEqualIntA(a, ARCHIVE_OK,

- +		    archive_read_open_memory(a, buff, used3));

- +		for (i = 0; i < 100; i++) {

- +			sprintf(path, "file%03d", i);

- +			failure("Trying to read %s", path);

- +			if (!assertEqualIntA(a, ARCHIVE_OK,

- +				archive_read_next_header(a, &ae)))

- +				break;

- +			assertEqualString(path, archive_entry_pathname(ae));

- +			assertEqualInt((int)datasize, archive_entry_size(ae));

- +		}

- +		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));

- +	}

- +	assertEqualInt(ARCHIVE_OK, archive_read_free(a));

- +

- +	/*

- +	 * Check output sizes for various compression levels, expectation

- +	 * is that archive size for level=20 < default < level=1

- +	 */

- +	failure("compression-level=20 wrote %d bytes, default wrote %d bytes",

- +	    (int)used2, (int)used1);

- +	assert(used2 < used1);

- +	failure("compression-level=1 wrote %d bytes, default wrote %d bytes",

- +	    (int)used3, (int)used1);

- +	assert(used1 < used3);

- +

-  	/*

-  	 * Test various premature shutdown scenarios to make sure we

-  	 * don't crash or leak memory.

- -- 

- 2.21.0

- 

file modified
+5 -6
@@ -1,18 +1,14 @@ 

  %bcond_without check

  

  Name:           libarchive

- Version:        3.4.0

- Release:        2%{?dist}

+ Version:        3.4.2

+ Release:        1%{?dist}

  Summary:        A library for handling streaming archive formats

  

  License:        BSD

  URL:            https://www.libarchive.org/

  Source0:        https://libarchive.org/downloads/%{name}-%{version}.tar.gz

  

- # Fix zstd test to be less susceptible to small variations in output size

- # Submitted upstream: https://github.com/libarchive/libarchive/pull/1240

- Patch0:         libarchive-fix-zstd-test.patch

- 

  BuildRequires:  automake

  BuildRequires:  bison

  BuildRequires:  bzip2-devel
@@ -214,6 +210,9 @@ 

  

  

  %changelog

+ * Wed Feb 12 2020 Ondrej Dubaj <odubaj@redhat.com> - 3.4.2-1

+ - Rebased to version 3.4.2

+ 

  * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (libarchive-3.4.0.tar.gz) = 2f9e2a551a6bcab56fb1a030b5d656df7299a3d151465aa02f0420d344d2fada49dee4755b3abff9095f62519e14dc9af8afa1695ecc6d5fdb4f0b28e6ede852

+ SHA512 (libarchive-3.4.2.tar.gz) = a8922e54f2e985889d205ee8a0594c1d30dad950438b602a5be6bb1b274a735ad20a48ed484efd458013a0810d26ee4ae76e3a6c820823243d24ea0593ed7021

no initial comment

Just a nitpick - I would not call the patches useless just because they cannot be applied anymore as the new release has them in the tarball already. Maybe do not mention this change in the patch log at all. To me it seems pretty obvious that a removal of a patch during a rebase is for t

Just a nitpick - I would not call the patches useless just because they cannot be applied anymore as the new release has them in the tarball already. Maybe do not mention this change in the patch log at all. To me it seems pretty obvious that a removal of a patch during a rebase is for t

Clicked submit too early and the comment cannot be eddited for some reason. :/ So to finish up my sentence: To me it seems pretty obvious that a removal of a patch during a rebase is for this reason.

rebased onto b557459

4 years ago

Thanks! Lets wait a while for the CI to complete

CI successfull, merging

Pull-Request has been merged by odubaj

4 years ago