22593018 libarchives b64_encode conflicts with system one on 91
authorMike Sullivan <Mike.Sullivan@Oracle.COM>
Tue, 26 Jan 2016 16:40:09 -0800
changeset 5349 aad9f1baf245
parent 5348 623c86e1e386
child 5350 0bd2e97a57c6
22593018 libarchives b64_encode conflicts with system one on 91
components/libarchive/Makefile
components/libarchive/patches/b64_encode.patch
components/libarchive/test/results-all.master
--- a/components/libarchive/Makefile	Mon Jan 25 17:27:47 2016 -0600
+++ b/components/libarchive/Makefile	Tue Jan 26 16:40:09 2016 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
@@ -58,6 +58,7 @@
 COMPONENT_BUILD_ARGS +=	CFLAGS="$(CFLAGS)"
 COMPONENT_TEST_ARGS +=	COMMON_CFLAGS=''
 COMPONENT_TEST_ARGS +=	CFLAGS="$(CFLAGS)"
+COMPONENT_TEST_ENV +=	TMPDIR="$(COMPONENT_TEST_BUILD_DIR)"
 
 # We need GNU awk for the following to work; hence the PATH tweak.
 # We then convert BSD-style section numbers in the libarchive man pages to
@@ -77,11 +78,16 @@
 
 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
 COMPONENT_TEST_TRANSFORMS += \
-	'-e "s|/tmp/.*_test.*|\\$$(TESTDIR)|g"' \
+	'-e "s|$(COMPONENT_TEST_BUILD_DIR).*$$|build/test|g"' \
 	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|"' \
 	'-e "s/ld: warning: symbol .* has differing sizes:$$/XXX_CC_XXX/"' \
 	'-e "s/.*value=0x[0-9a-f]\+.*$$/XXX_CC_XXX/"' \
 	'-e "s/.* definition taken$$/XXX_CC_XXX/"' \
+	'-e "s|.*Assertions checked:.*$$|XXX_CC_XXX|g" ' \
+	'-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
+	'-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
+	'-e "s|.*recipe for target.*failed$$|XXX_CC_XXX|g" ' \
+	'-e "s|^make.*\*\*\*.*Error.*$$|XXX_CC_XXX|g" ' \
 	'-e "/^XXX_CC_XXX$$/d"'
 
 configure:	$(CONFIGURE_32_and_64)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libarchive/patches/b64_encode.patch	Tue Jan 26 16:40:09 2016 -0800
@@ -0,0 +1,47 @@
+solaris now provides its own b64_encode which
+conflicts with our private one.
+
+--- libarchive-3.1.2/libarchive/archive_write_add_filter_b64encode.c.orig	Sun Jan 24 10:08:09 2016
++++ libarchive-3.1.2/libarchive/archive_write_add_filter_b64encode.c	Sun Jan 24 10:08:54 2016
+@@ -60,7 +60,7 @@
+     const void *, size_t);
+ static int archive_filter_b64encode_close(struct archive_write_filter *);
+ static int archive_filter_b64encode_free(struct archive_write_filter *);
+-static void b64_encode(struct archive_string *, const unsigned char *, size_t);
++static void archive_private_b64_encode(struct archive_string *, const unsigned char *, size_t);
+ static int64_t atol8(const char *, size_t);
+ 
+ static const char base64[] = {
+@@ -180,7 +180,7 @@
+ }
+ 
+ static void
+-b64_encode(struct archive_string *as, const unsigned char *p, size_t len)
++archive_private_b64_encode(struct archive_string *as, const unsigned char *p, size_t len)
+ {
+ 	int c;
+ 
+@@ -234,12 +234,12 @@
+ 		}
+ 		if (state->hold_len < LBYTES)
+ 			return (ret);
+-		b64_encode(&state->encoded_buff, state->hold, LBYTES);
++		archive_private_b64_encode(&state->encoded_buff, state->hold, LBYTES);
+ 		state->hold_len = 0;
+ 	}
+ 
+ 	for (; length >= LBYTES; length -= LBYTES, p += LBYTES)
+-		b64_encode(&state->encoded_buff, p, LBYTES);
++		archive_private_b64_encode(&state->encoded_buff, p, LBYTES);
+ 
+ 	/* Save remaining bytes. */
+ 	if (length > 0) {
+@@ -270,7 +270,7 @@
+ 
+ 	/* Flush remaining bytes. */
+ 	if (state->hold_len != 0)
+-		b64_encode(&state->encoded_buff, state->hold, state->hold_len);
++		archive_private_b64_encode(&state->encoded_buff, state->hold, state->hold_len);
+ 	archive_string_sprintf(&state->encoded_buff, "====\n");
+ 	/* Write the last block */
+ 	archive_write_set_bytes_in_last_block(f->archive, 1);
--- a/components/libarchive/test/results-all.master	Mon Jan 25 17:27:47 2016 -0600
+++ b/components/libarchive/test/results-all.master	Tue Jan 26 16:40:09 2016 -0800
@@ -1,8 +1,5 @@
-make[1]: Entering directory `$(@D)'
 /usr/gnu/bin/make  check-am
-make[2]: Entering directory `$(@D)'
 /usr/gnu/bin/make  libarchive_test bsdtar_test bsdcpio_test
-make[3]: Entering directory `$(@D)'
   CC     libarchive/libarchive_test-archive_acl.o
   CC     libarchive/libarchive_test-archive_check_magic.o
   CC     libarchive/libarchive_test-archive_cmdline.o
@@ -416,12 +413,10 @@
   CC     cpio/test/bsdcpio_test-test_passthrough_dotdot.o
   CC     cpio/test/bsdcpio_test-test_passthrough_reverse.o
   CCLD   bsdcpio_test
-make[3]: Leaving directory `$(@D)'
 /usr/gnu/bin/make  check-TESTS
-make[3]: Entering directory `$(@D)'
 
 If tests fail or crash, details will be in:
-   $(TESTDIR)
+   build/test
 
 Reference files will be read from: $(SOURCE_DIR)/libarchive/test
 Exercising: libarchive 3.1.2
@@ -739,19 +734,18 @@
 Totals:
   Tests run:              310
   Tests failed:             1
-  Assertions checked:20373800
   Assertions failed:        2
-  Skips reported:          66
+  Skips reported:          65
 
 Failing tests:
   85: test_compat_pax_libarchive_2x (2 failures)
 
-Details for failing tests: $(TESTDIR)
+Details for failing tests: build/test
 
 FAIL: libarchive_test
 
 If tests fail or crash, details will be in:
-   $(TESTDIR)
+   build/test
 
 Reference files will be read from: $(SOURCE_DIR)/tar/test
 Running tests on: "$(@D)/bsdtar"
@@ -813,7 +807,6 @@
 Totals:
   Tests run:               52
   Tests failed:             6
-  Assertions checked:    6688
   Assertions failed:      916
   Skips reported:           8
 
@@ -825,12 +818,12 @@
   36: test_option_r (2 failures)
   39: test_option_uid_uname (4 failures)
 
-Details for failing tests: $(TESTDIR)
+Details for failing tests: build/test
 
 FAIL: bsdtar_test
 
 If tests fail or crash, details will be in:
-   $(TESTDIR)
+   build/test
 
 Reference files will be read from: $(SOURCE_DIR)/cpio/test
 Running tests on: "$(@D)/bsdcpio"
@@ -882,7 +875,6 @@
 Totals:
   Tests run:               42
   Tests failed:             2
-  Assertions checked:     932
   Assertions failed:       16
   Skips reported:           6
 
@@ -890,16 +882,10 @@
   1: test_basic (13 failures)
   18: test_option_c (3 failures)
 
-Details for failing tests: $(TESTDIR)
+Details for failing tests: build/test
 
 FAIL: bsdcpio_test
 ====================================================
 3 of 3 tests failed
 Please report to [email protected]
 ====================================================
-make[3]: *** [check-TESTS] Error 1
-make[3]: Leaving directory `$(@D)'
-make[2]: *** [check-am] Error 2
-make[2]: Leaving directory `$(@D)'
-make[1]: *** [check] Error 2
-make[1]: Leaving directory `$(@D)'