Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2015 17:21:48 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281372 - head/lib/liblzma
Message-ID:  <201504101721.t3AHLmNN013440@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Fri Apr 10 17:21:47 2015
New Revision: 281372
URL: https://svnweb.freebsd.org/changeset/base/281372

Log:
  For reasons that I am not understand yet, using the libmd version of
  SHA256 would make libarchive based application to give:
  
  	archive_read_extract(): Lzma library error: Corrupted input data
  
  (Internally this is LZMA_DATA_ERR)
  
  However, the libmd version of SHA256 is supposed to give same result
  as the bundled version do, and xz(1) is not affected.
  
  As a precaution, revert the SHA256 portion of r281316 for now until
  we figure out why it breaks libarchive interoperability as we can't
  yet rule out this change have introduced an ABI breakage.

Modified:
  head/lib/liblzma/Makefile
  head/lib/liblzma/Symbol.map
  head/lib/liblzma/config.h

Modified: head/lib/liblzma/Makefile
==============================================================================
--- head/lib/liblzma/Makefile	Fri Apr 10 13:50:57 2015	(r281371)
+++ head/lib/liblzma/Makefile	Fri Apr 10 17:21:47 2015	(r281372)
@@ -77,7 +77,8 @@ SRCS+=	common.c \
 .PATH: ${LZMADIR}/check
 SRCS+=	check.c \
 	crc32_table.c \
-	crc64_table.c
+	crc64_table.c \
+	sha256.c
 .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
 SRCS+=	crc32_x86.S \
 	crc64_x86.S
@@ -145,7 +146,7 @@ CFLAGS+=	-DHAVE_CONFIG_H \
 		-I${LZMADIR}/simple \
 		-I${LZMADIR}/../common
 
-LIBADD+=	md pthread
+LIBADD+=	pthread
 
 VERSION_DEF=	${.CURDIR}/Versions.def
 SYMBOL_MAPS=	${.CURDIR}/Symbol.map

Modified: head/lib/liblzma/Symbol.map
==============================================================================
--- head/lib/liblzma/Symbol.map	Fri Apr 10 13:50:57 2015	(r281371)
+++ head/lib/liblzma/Symbol.map	Fri Apr 10 17:21:47 2015	(r281372)
@@ -180,6 +180,9 @@ XZprivate_1.0 {
 	lzma_raw_coder_memusage;
 	lzma_raw_decoder_init;
 	lzma_raw_encoder_init;
+	lzma_sha256_finish;
+	lzma_sha256_init;
+	lzma_sha256_update;
 	lzma_simple_arm_decoder_init;
 	lzma_simple_arm_encoder_init;
 	lzma_simple_armthumb_decoder_init;

Modified: head/lib/liblzma/config.h
==============================================================================
--- head/lib/liblzma/config.h	Fri Apr 10 13:50:57 2015	(r281371)
+++ head/lib/liblzma/config.h	Fri Apr 10 17:21:47 2015	(r281372)
@@ -203,13 +203,16 @@
 /* #undef HAVE_SHA256INIT */
 
 /* Define to 1 if the system has the type `SHA256_CTX'. */
-#define HAVE_SHA256_CTX 1
+/* FreeBSD - disabled libmd SHA256 for now */
+/* #undef HAVE_SHA256_CTX */
 
 /* Define to 1 if you have the <sha256.h> header file. */
-#define HAVE_SHA256_H 1
+/* FreeBSD - disabled libmd SHA256 for now */
+/* #undef HAVE_SHA256_H */
 
 /* Define to 1 if you have the `SHA256_Init' function. */
-#define HAVE_SHA256_INIT 1
+/* FreeBSD - disabled libmd SHA256 for now */
+/* #undef HAVE_SHA256_INIT */
 
 /* Define to 1 if the system has the type `SHA2_CTX'. */
 /* #undef HAVE_SHA2_CTX */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504101721.t3AHLmNN013440>