From cad2e3859bf175053a1355c882fe77c58fbdd508 Mon Sep 17 00:00:00 2001 From: John Marino Date: Tue, 3 Nov 2015 12:06:24 +0100 Subject: [PATCH] xz: Upgrade from version 5.0.7 to 5.2.2 See vendor branch commit for the many changes, including parallel compression with multiple threads. --- contrib/xz/README.DELETED | 1 + contrib/xz/README.DRAGONFLY | 10 ++-- lib/liblzma/Makefile | 18 ++++--- lib/liblzma/Symbol.map | 93 +++---------------------------------- lib/liblzma/Versions.def | 5 +- lib/liblzma/config.h | 71 ++++++++++++++++++++++++++-- usr.bin/xz/Makefile | 1 + 7 files changed, 94 insertions(+), 105 deletions(-) diff --git a/contrib/xz/README.DELETED b/contrib/xz/README.DELETED index 224c30c356..b9d7e5defc 100644 --- a/contrib/xz/README.DELETED +++ b/contrib/xz/README.DELETED @@ -38,6 +38,7 @@ src/liblzma/lz/Makefile.inc src/liblzma/lzma/Makefile.inc src/liblzma/rangecoder/Makefile.inc src/liblzma/simple/Makefile.inc +src/liblzma/validate_map.sh src/lzmainfo/Makefile.am src/lzmainfo/Makefile.in src/lzmainfo/lzmainfo_w32res.rc diff --git a/contrib/xz/README.DRAGONFLY b/contrib/xz/README.DRAGONFLY index a50a8acf4d..03f699431f 100644 --- a/contrib/xz/README.DRAGONFLY +++ b/contrib/xz/README.DRAGONFLY @@ -1,13 +1,13 @@ This is XZ Utils imported from: http://tukaani.org/xz/ -file = xz-5.0.7.tar.bz2 -date = 20 September 2014 -size = 1074352 -sha1 = 7458b6492889a218a4a29e2a5b1e2ff7ca65a947 +file = xz-5.2.2.tar.bz2 +date = 29 September 2015 +size = 1192692 +sha1 = 3cbd8d42117b6958a1db72acbed677f9b11d69a6 When upgrading, remember to update config.h in lib/liblzma. -./configure --disable-nls +./configure --disable-nls --enable-symbol-versions --prefix=/usr Used in: lib/liblzma diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile index 3e2821fbd6..bcc6418ee1 100644 --- a/lib/liblzma/Makefile +++ b/lib/liblzma/Makefile @@ -13,7 +13,7 @@ LZMAINCS= base.h \ hardware.h \ index.h \ index_hash.h \ - lzma.h \ + lzma12.h \ stream_flags.h \ version.h \ vli.h @@ -21,7 +21,7 @@ LZMAINCSDIR= ${INCLUDEDIR}/lzma INCSGROUPS= MAININCS LZMAINCS .PATH: ${LZMADIR}/../common -SRCS+= tuklib_physmem.c +SRCS+= tuklib_physmem.c tuklib_cpucores.c .PATH: ${LZMADIR}/common SRCS+= common.c \ @@ -29,6 +29,7 @@ SRCS+= common.c \ easy_preset.c \ filter_common.c \ hardware_physmem.c \ + hardware_cputhreads.c \ index.c \ stream_flags_common.c \ vli_size.c \ @@ -61,18 +62,18 @@ SRCS+= common.c \ stream_buffer_decoder.c \ stream_decoder.c \ stream_flags_decoder.c \ - vli_decoder.c + stream_encoder_mt.c \ + vli_decoder.c \ + outqueue.c .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ crc64_table.c \ sha256.c -.if ${MACHINE_ARCH} == "i386" -SRCS+= crc32_x86.S crc64_x86.S -.else + +# For x86_64 (other arch could have their own versions) SRCS+= crc32_fast.c crc64_fast.c -.endif .PATH: ${LZMADIR}/lz SRCS+= lz_encoder.c \ @@ -125,4 +126,7 @@ CFLAGS+= -DHAVE_CONFIG_H -DTUKLIB_SYMBOL_PREFIX=lzma_ \ VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map +LDADD= -lpthread +DPADD= ${LIBPTHREAD} + .include diff --git a/lib/liblzma/Symbol.map b/lib/liblzma/Symbol.map index 560369e8c3..146c5923bb 100644 --- a/lib/liblzma/Symbol.map +++ b/lib/liblzma/Symbol.map @@ -94,91 +94,10 @@ XZ_5.0.4 { lzma_vli_size; }; -XZprivate_1.0 { - lzma_alloc; - lzma_alone_decoder_init; - lzma_block_decoder_init; - lzma_block_encoder_init; - lzma_bufcpy; - lzma_check_finish; - lzma_check_init; - lzma_check_update; - lzma_delta_coder_init; - lzma_delta_coder_memusage; - lzma_delta_decoder_init; - lzma_delta_encoder_init; - lzma_delta_props_decode; - lzma_delta_props_encode; - lzma_easy_preset; - lzma_free; - lzma_index_encoder_init; - lzma_index_padding_size; - lzma_index_prealloc; - lzma_lz_decoder_init; - lzma_lz_decoder_memusage; - lzma_lz_decoder_uncompressed; - lzma_lz_encoder_init; - lzma_lz_encoder_memusage; - lzma_lzma2_decoder_init; - lzma_lzma2_decoder_memusage; - lzma_lzma2_encoder_init; - lzma_lzma2_encoder_memusage; - lzma_lzma2_props_decode; - lzma_lzma2_props_encode; - lzma_lzma_decoder_create; - lzma_lzma_decoder_init; - lzma_lzma_decoder_memusage; - lzma_lzma_decoder_memusage_nocheck; - lzma_lzma_encode; - lzma_lzma_encoder_create; - lzma_lzma_encoder_init; - lzma_lzma_encoder_memusage; - lzma_lzma_encoder_reset; - lzma_lzma_lclppb_decode; - lzma_lzma_lclppb_encode; - lzma_lzma_optimum_fast; - lzma_lzma_optimum_normal; - lzma_lzma_props_decode; - lzma_lzma_props_encode; - lzma_mf_bt2_find; - lzma_mf_bt2_skip; - lzma_mf_bt3_find; - lzma_mf_bt3_skip; - lzma_mf_bt4_find; - lzma_mf_bt4_skip; - lzma_mf_find; - lzma_mf_hc3_find; - lzma_mf_hc3_skip; - lzma_mf_hc4_find; - lzma_mf_hc4_skip; - lzma_next_end; - lzma_next_filter_init; - lzma_next_filter_update; - lzma_raw_coder_init; - 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; - lzma_simple_armthumb_encoder_init; - lzma_simple_coder_init; - lzma_simple_ia64_decoder_init; - lzma_simple_ia64_encoder_init; - lzma_simple_powerpc_decoder_init; - lzma_simple_powerpc_encoder_init; - lzma_simple_props_decode; - lzma_simple_props_encode; - lzma_simple_props_size; - lzma_simple_sparc_decoder_init; - lzma_simple_sparc_encoder_init; - lzma_simple_x86_decoder_init; - lzma_simple_x86_encoder_init; - lzma_stream_decoder_init; - lzma_stream_encoder_init; - lzma_strm_init; - lzma_tuklib_physmem; +XZ_5.2 { + lzma_block_uncomp_encode; + lzma_cputhreads; + lzma_get_progress; + lzma_stream_encoder_mt; + lzma_stream_encoder_mt_memusage; }; diff --git a/lib/liblzma/Versions.def b/lib/liblzma/Versions.def index 6d424fd03d..57b6e6b49e 100644 --- a/lib/liblzma/Versions.def +++ b/lib/liblzma/Versions.def @@ -1,5 +1,8 @@ XZ_5.0.4 { }; -XZprivate_1.0 { +XZ_5.2 { } XZ_5.0.4; + +XZprivate_1.0 { +} XZ_5.2; diff --git a/lib/liblzma/config.h b/lib/liblzma/config.h index e99fc2e90f..7b24e21bcd 100644 --- a/lib/liblzma/config.h +++ b/lib/liblzma/config.h @@ -23,6 +23,12 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_BYTESWAP_H */ +/* Define to 1 if the system has the type `CC_SHA256_CTX'. */ +/* #undef HAVE_CC_SHA256_CTX */ + +/* Define to 1 if you have the `CC_SHA256_Init' function. */ +/* #undef HAVE_CC_SHA256_INIT */ + /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYCURRENT */ @@ -40,10 +46,20 @@ /* Define to 1 if sha256 integrity check is enabled. */ #define HAVE_CHECK_SHA256 1 +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */ + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ +/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if + you don't. */ +#define HAVE_DECL_CLOCK_MONOTONIC 1 + /* Define to 1 if you have the declaration of `program_invocation_name', and to 0 if you don't. */ #define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 @@ -129,6 +145,9 @@ /* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ +/* Define to 1 if you have the header file. */ +#define HAVE_IMMINTRIN_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 @@ -156,15 +175,39 @@ /* Define to 1 to enable hc4 match finder. */ #define HAVE_MF_HC4 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_SHA2_H */ + /* Define to 1 if getopt.h declares extern int optreset. */ #define HAVE_OPTRESET 1 -/* Define if you have POSIX threads libraries and header files. */ -#define HAVE_PTHREAD 1 +/* Define to 1 if you have the `posix_fadvise' function. */ +/* #undef HAVE_POSIX_FADVISE */ + +/* Define to 1 if you have the `pthread_condattr_setclock' function. */ +#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 /* Have PTHREAD_PRIO_INHERIT. */ #define HAVE_PTHREAD_PRIO_INHERIT 1 +/* Define to 1 if you have the `SHA256Init' function. */ +/* #undef HAVE_SHA256INIT */ + +/* Define to 1 if the system has the type `SHA256_CTX'. */ +/* OVERRIDE #define HAVE_SHA256_CTX 1 */ + +/* Define to 1 if you have the header file. */ +/* OVERRIDE #define HAVE_SHA256_H 1 */ + +/* Define to 1 if you have the `SHA256_Init' function. */ +/* OVERRIDE #define HAVE_SHA256_INIT 1 */ + +/* Define to 1 if the system has the type `SHA2_CTX'. */ +/* #undef HAVE_SHA2_CTX */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SHA2_H */ + /* Define to 1 if optimizing for size. */ /* #undef HAVE_SMALL */ @@ -238,9 +281,23 @@ /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 +/* Define to 1 if _mm_movemask_epi8 is available. */ +#define HAVE__MM_MOVEMASK_EPI8 1 + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" +/* Define to 1 when using POSIX threads (pthreads). */ +#define MYTHREAD_POSIX 1 + +/* Define to 1 when using Windows Vista compatible threads. This uses features + that are not available on Windows XP. */ +/* #undef MYTHREAD_VISTA */ + +/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This + avoids use of features that were added in Windows Vista. */ +/* #undef MYTHREAD_WIN95 */ + /* Define to 1 to disable debugging code. */ #define NDEBUG 1 @@ -254,7 +311,7 @@ #define PACKAGE_NAME "XZ Utils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "XZ Utils 5.0.7" +#define PACKAGE_STRING "XZ Utils 5.2.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "xz" @@ -263,7 +320,7 @@ #define PACKAGE_URL "http://tukaani.org/xz/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "5.0.7" +#define PACKAGE_VERSION "5.2.2" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -275,6 +332,10 @@ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define to 1 if the number of available CPU cores can be detected with + cpuset(2). */ +/* #undef TUKLIB_CPUCORES_CPUSET */ + /* Define to 1 if the number of available CPU cores can be detected with pstat_getdynamic(). */ /* #undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC */ @@ -342,7 +403,7 @@ /* Version number of package */ -#define VERSION "5.0.7" +#define VERSION "5.2.2" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/usr.bin/xz/Makefile b/usr.bin/xz/Makefile index f70535fc28..edfe7fe5c9 100644 --- a/usr.bin/xz/Makefile +++ b/usr.bin/xz/Makefile @@ -22,6 +22,7 @@ SRCS= args.c \ list.c \ main.c \ message.c \ + mytime.c \ options.c \ signals.c \ suffix.c \ -- 2.41.0