Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jul 2020 03:29:19 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r362918 - in stable/11: . contrib/xz/src/liblzma/check lib/liblzma share/mk
Message-ID:  <202007040329.0643TJE8016090@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Jul  4 03:29:19 2020
New Revision: 362918
URL: https://svnweb.freebsd.org/changeset/base/362918

Log:
  MFC r362452, r362478: liblzma: Make liblzma use libmd implementation of SHA256.

Deleted:
  stable/11/contrib/xz/src/liblzma/check/sha256.c
Modified:
  stable/11/Makefile.inc1
  stable/11/lib/liblzma/Makefile
  stable/11/lib/liblzma/Symbol.map
  stable/11/lib/liblzma/config.h
  stable/11/share/mk/src.libnames.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==============================================================================
--- stable/11/Makefile.inc1	Sat Jul  4 03:28:13 2020	(r362917)
+++ stable/11/Makefile.inc1	Sat Jul  4 03:29:19 2020	(r362918)
@@ -2231,7 +2231,7 @@ _lib_casper=	lib/libcasper
 
 lib/libpjdlog__L: lib/libutil__L
 lib/libcasper__L: lib/libnv__L
-lib/liblzma__L: lib/libthr__L
+lib/liblzma__L: lib/libmd__L lib/libthr__L
 
 _generic_libs=	${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
 .for _DIR in ${LOCAL_LIB_DIRS}

Modified: stable/11/lib/liblzma/Makefile
==============================================================================
--- stable/11/lib/liblzma/Makefile	Sat Jul  4 03:28:13 2020	(r362917)
+++ stable/11/lib/liblzma/Makefile	Sat Jul  4 03:29:19 2020	(r362918)
@@ -78,8 +78,7 @@ SRCS+=	common.c \
 .PATH: ${LZMADIR}/check
 SRCS+=	check.c \
 	crc32_table.c \
-	crc64_table.c \
-	sha256.c
+	crc64_table.c
 .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
 SRCS+=	crc32_x86.S \
 	crc64_x86.S
@@ -125,11 +124,11 @@ SRCS+=	simple_coder.c \
 
 .PATH: ${LZMADIR}
 
-VERSION_MAJOR!=	awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \
+VERSION_MAJOR!=	sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' \
 			${LZMADIR}/api/lzma/version.h
-VERSION_MINOR!=	awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \
+VERSION_MINOR!=	sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' \
 			${LZMADIR}/api/lzma/version.h
-VERSION_PATCH!=	awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \
+VERSION_PATCH!=	sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' \
 			${LZMADIR}/api/lzma/version.h
 
 WARNS?=	3
@@ -147,7 +146,7 @@ CFLAGS+=	-DHAVE_CONFIG_H \
 		-I${LZMADIR}/simple \
 		-I${LZMADIR:H}/common
 
-LIBADD+=	pthread
+LIBADD+=	md pthread
 
 VERSION_DEF=	${.CURDIR}/Versions.def
 SYMBOL_MAPS=	${.CURDIR}/Symbol.map
@@ -160,10 +159,11 @@ FILESDIR=	${LIBDATADIR}/pkgconfig
 
 liblzma.pc: liblzma.pc.in
 	sed -e 's,@prefix@,/usr,g ; \
-		s,@exec_prefix@,/usr,g  ; \
+		s,@exec_prefix@,/usr,g ; \
 		s,@libdir@,/usr/lib,g ; \
 		s,@includedir@,/usr/include,g ; \
-		s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \
+		s,@LIBS@,-pthread -lmd,g ; \
+		s,@PACKAGE_URL@,https://tukaani.org/xz/,g ; \
 		s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \
 		s,@PTHREAD_CFLAGS@,,g ; \
 		s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET}

Modified: stable/11/lib/liblzma/Symbol.map
==============================================================================
--- stable/11/lib/liblzma/Symbol.map	Sat Jul  4 03:28:13 2020	(r362917)
+++ stable/11/lib/liblzma/Symbol.map	Sat Jul  4 03:29:19 2020	(r362918)
@@ -180,9 +180,6 @@ 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: stable/11/lib/liblzma/config.h
==============================================================================
--- stable/11/lib/liblzma/config.h	Sat Jul  4 03:28:13 2020	(r362917)
+++ stable/11/lib/liblzma/config.h	Sat Jul  4 03:29:19 2020	(r362918)
@@ -211,16 +211,13 @@
 /* #undef HAVE_SHA256INIT */
 
 /* Define to 1 if the system has the type `SHA256_CTX'. */
-/* FreeBSD - disabled libmd SHA256 for now */
-/* #undef HAVE_SHA256_CTX */
+#define HAVE_SHA256_CTX 1
 
 /* Define to 1 if you have the <sha256.h> header file. */
-/* FreeBSD - disabled libmd SHA256 for now */
-/* #undef HAVE_SHA256_H */
+#define HAVE_SHA256_H 1
 
 /* Define to 1 if you have the `SHA256_Init' function. */
-/* FreeBSD - disabled libmd SHA256 for now */
-/* #undef HAVE_SHA256_INIT */
+#define HAVE_SHA256_INIT 1
 
 /* Define to 1 if the system has the type `SHA2_CTX'. */
 /* #undef HAVE_SHA2_CTX */

Modified: stable/11/share/mk/src.libnames.mk
==============================================================================
--- stable/11/share/mk/src.libnames.mk	Sat Jul  4 03:28:13 2020	(r362917)
+++ stable/11/share/mk/src.libnames.mk	Sat Jul  4 03:29:19 2020	(r362918)
@@ -302,7 +302,7 @@ _DP_heimipcs=	heimbase roken pthread
 _DP_kafs5=	asn1 krb5 roken
 _DP_krb5+=	asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
 _DP_gssapi_krb5+=	gssapi krb5 crypto roken asn1 com_err
-_DP_lzma=	pthread
+_DP_lzma=	md pthread
 _DP_ucl=	m
 _DP_vmmapi=	util
 _DP_ctf=	z



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