diff -Nru dpkg-1.18.4ubuntu1.6/config.h.in dpkg-1.18.4ubuntu1.7/config.h.in --- dpkg-1.18.4ubuntu1.6/config.h.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/config.h.in 2021-04-12 15:41:27.000000000 +0000 @@ -351,6 +351,9 @@ /* Define to 1 to use liblzma rather than console tool */ #undef WITH_LIBLZMA +/* Define to 1 to use libzstd rather than console tool */ +#undef WITH_LIBZSTD + /* Define to 1 to compile in SELinux support */ #undef WITH_SELINUX diff -Nru dpkg-1.18.4ubuntu1.6/configure dpkg-1.18.4ubuntu1.7/configure --- dpkg-1.18.4ubuntu1.6/configure 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/configure 2021-04-12 15:41:27.000000000 +0000 @@ -676,6 +676,7 @@ PKG_CONFIG LIBLZMA_LIBS BZ2_LIBS +LIBZSTD_LIBS ZLIB_LIBS HAVE_LIBMD_MD5_FALSE HAVE_LIBMD_MD5_TRUE @@ -880,6 +881,7 @@ enable_coverage enable_largefile with_zlib +with_libzstd with_bz2 with_liblzma with_selinux @@ -907,6 +909,7 @@ PERL_LIBDIR MD_LIBS ZLIB_LIBS +LIBZSTD_LIBS BZ2_LIBS LIBLZMA_LIBS PKG_CONFIG @@ -1594,6 +1597,8 @@ --with-dpkg-deb-compressor=COMP change default dpkg-deb build compressor --with-zlib use zlib library for compression and decompression + --with-libzstd use libzstd library for compression and + decompression --with-bz2 use bz2 library for compression and decompression --with-liblzma use liblzma library for compression and decompression @@ -1616,6 +1621,8 @@ PERL_LIBDIR Perl library directory MD_LIBS linker flags for md library ZLIB_LIBS linker flags for zlib library + LIBZSTD_LIBS + linker flags for libzstd library BZ2_LIBS linker flags for bz2 library LIBLZMA_LIBS linker flags for liblzma library @@ -20289,6 +20296,98 @@ See \`config.log' for more details" "$LINENO" 5; } fi +fi + + + fi + + + + + + + + + +# Check whether --with-libzstd was given. +if test "${with_libzstd+set}" = set; then : + withval=$with_libzstd; +fi + + if test "x$with_libzstd" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_decompressStream in -lzstd" >&5 +$as_echo_n "checking for ZSTD_decompressStream in -lzstd... " >&6; } +if ${ac_cv_lib_zstd_ZSTD_decompressStream+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lzstd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ZSTD_decompressStream (); +int +main () +{ +return ZSTD_decompressStream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_zstd_ZSTD_decompressStream=yes +else + ac_cv_lib_zstd_ZSTD_decompressStream=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_decompressStream" >&5 +$as_echo "$ac_cv_lib_zstd_ZSTD_decompressStream" >&6; } +if test "x$ac_cv_lib_zstd_ZSTD_decompressStream" = xyes; then : + + +$as_echo "#define WITH_LIBZSTD 1" >>confdefs.h + + if test "x$with_libzstd" = "xstatic"; then + dpkg_libzstd_libs="-Wl,-Bstatic -lzstd -Wl,-Bdynamic" + else + dpkg_libzstd_libs="-lzstd" + fi + LIBZSTD_LIBS="${LIBZSTD_LIBS:+$LIBZSTD_LIBS }$dpkg_libzstd_libs" + with_libzstd="yes" + +else + + if test -n "$with_libzstd"; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libzstd library not found +See \`config.log' for more details" "$LINENO" 5; } + fi + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default" +if test "x$ac_cv_header_zstd_h" = xyes; then : + +else + + if test -n "$with_libzstd"; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libzstd header not found +See \`config.log' for more details" "$LINENO" 5; } + fi + fi diff -Nru dpkg-1.18.4ubuntu1.6/configure.ac dpkg-1.18.4ubuntu1.7/configure.ac --- dpkg-1.18.4ubuntu1.6/configure.ac 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/configure.ac 2021-04-12 15:41:27.000000000 +0000 @@ -76,6 +76,7 @@ # Checks for libraries. DPKG_LIB_MD DPKG_LIB_ZLIB +DPKG_LIB_ZSTD DPKG_LIB_BZ2 DPKG_LIB_LZMA DPKG_LIB_SELINUX diff -Nru dpkg-1.18.4ubuntu1.6/debian/changelog dpkg-1.18.4ubuntu1.7/debian/changelog --- dpkg-1.18.4ubuntu1.6/debian/changelog 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/debian/changelog 2021-04-12 15:41:27.000000000 +0000 @@ -1,3 +1,14 @@ +dpkg (1.18.4ubuntu1.7) xenial; urgency=medium + + * Add Zstandard (zstd) decompression support for binary packages + (LP: #1764220) + - The changes to ./configure and *.in files were cherry-picked from a + manual autoreconf run because the package build does not run + autoreconf automatically and the full delta from autoreconf + was very big. + + -- Balint Reczey Mon, 12 Apr 2021 17:41:27 +0200 + dpkg (1.18.4ubuntu1.6) xenial; urgency=medium * Cherry-pick upstream fixes for trigger loops (LP: #1828639) diff -Nru dpkg-1.18.4ubuntu1.6/debian/control dpkg-1.18.4ubuntu1.7/debian/control --- dpkg-1.18.4ubuntu1.6/debian/control 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/debian/control 2021-04-12 15:41:27.000000000 +0000 @@ -14,6 +14,7 @@ pkg-config, flex, gettext (>= 0.19), po4a (>= 0.41), zlib1g-dev, libbz2-dev, liblzma-dev, + libzstd1-dev, libselinux1-dev (>= 1.28-4) [linux-any], libkvm-dev [kfreebsd-any], libncursesw5-dev, @@ -24,7 +25,7 @@ Priority: optional Architecture: any Multi-Arch: same -Depends: zlib1g-dev, liblzma-dev, libbz2-dev, ${misc:Depends} +Depends: zlib1g-dev, libzstd1-dev, liblzma-dev, libbz2-dev, ${misc:Depends} Description: Debian package management static library This package provides the header files and static library necessary to develop software using libdpkg, the same library used internally by dpkg. diff -Nru dpkg-1.18.4ubuntu1.6/debian/rules dpkg-1.18.4ubuntu1.7/debian/rules --- dpkg-1.18.4ubuntu1.6/debian/rules 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/debian/rules 2021-04-12 15:41:27.000000000 +0000 @@ -60,6 +60,7 @@ --localstatedir=/var \ --with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --with-zlib \ + --with-libzstd \ --with-liblzma \ --with-bz2 diff -Nru dpkg-1.18.4ubuntu1.6/dpkg-deb/extract.c dpkg-1.18.4ubuntu1.7/dpkg-deb/extract.c --- dpkg-1.18.4ubuntu1.6/dpkg-deb/extract.c 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dpkg-deb/extract.c 2021-04-12 15:41:27.000000000 +0000 @@ -187,6 +187,7 @@ decompressor = compressor_find_by_extension(extension); if (decompressor != COMPRESSOR_TYPE_NONE && decompressor != COMPRESSOR_TYPE_GZIP && + decompressor != COMPRESSOR_TYPE_ZSTD && decompressor != COMPRESSOR_TYPE_XZ) ohshit(_("archive '%s' uses unknown compression for member '%.*s', " "giving up"), diff -Nru dpkg-1.18.4ubuntu1.6/dpkg-deb/main.c dpkg-1.18.4ubuntu1.7/dpkg-deb/main.c --- dpkg-1.18.4ubuntu1.6/dpkg-deb/main.c 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dpkg-deb/main.c 2021-04-12 15:41:27.000000000 +0000 @@ -210,6 +210,10 @@ set_compress_type(const struct cmdinfo *cip, const char *value) { compress_params.type = compressor_find_by_name(value); + if (compress_params.type == COMPRESSOR_TYPE_ZSTD) { + compress_params.type = COMPRESSOR_TYPE_UNKNOWN; + badusage(_("only decompression is supported for '%s'!"), value); + } if (compress_params.type == COMPRESSOR_TYPE_UNKNOWN) badusage(_("unknown compression type '%s'!"), value); if (compress_params.type == COMPRESSOR_TYPE_LZMA) diff -Nru dpkg-1.18.4ubuntu1.6/dpkg-deb/Makefile.am dpkg-1.18.4ubuntu1.7/dpkg-deb/Makefile.am --- dpkg-1.18.4ubuntu1.6/dpkg-deb/Makefile.am 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dpkg-deb/Makefile.am 2021-04-12 15:41:27.000000000 +0000 @@ -21,5 +21,6 @@ ../lib/dpkg/libdpkg.la \ $(LIBINTL) \ $(ZLIB_LIBS) \ + $(LIBZSTD_LIBS) \ $(LIBLZMA_LIBS) \ $(BZ2_LIBS) diff -Nru dpkg-1.18.4ubuntu1.6/dpkg-deb/Makefile.in dpkg-1.18.4ubuntu1.7/dpkg-deb/Makefile.in --- dpkg-1.18.4ubuntu1.6/dpkg-deb/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dpkg-deb/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -247,6 +247,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ @@ -375,6 +376,7 @@ ../lib/dpkg/libdpkg.la \ $(LIBINTL) \ $(ZLIB_LIBS) \ + $(LIBZSTD_LIBS) \ $(LIBLZMA_LIBS) \ $(BZ2_LIBS) diff -Nru dpkg-1.18.4ubuntu1.6/dpkg-split/Makefile.in dpkg-1.18.4ubuntu1.7/dpkg-split/Makefile.in --- dpkg-1.18.4ubuntu1.6/dpkg-split/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dpkg-split/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -245,6 +245,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/dselect/Makefile.in dpkg-1.18.4ubuntu1.7/dselect/Makefile.in --- dpkg-1.18.4ubuntu1.6/dselect/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dselect/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -311,6 +311,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/dselect/methods/Makefile.in dpkg-1.18.4ubuntu1.7/dselect/methods/Makefile.in --- dpkg-1.18.4ubuntu1.6/dselect/methods/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/dselect/methods/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -226,6 +226,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/lib/compat/Makefile.in dpkg-1.18.4ubuntu1.7/lib/compat/Makefile.in --- dpkg-1.18.4ubuntu1.6/lib/compat/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/lib/compat/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -296,6 +296,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/lib/dpkg/compress.c dpkg-1.18.4ubuntu1.7/lib/dpkg/compress.c --- dpkg-1.18.4ubuntu1.6/lib/dpkg/compress.c 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/lib/dpkg/compress.c 2021-04-12 15:41:27.000000000 +0000 @@ -32,6 +32,9 @@ #ifdef WITH_ZLIB #include #endif +#ifdef WITH_LIBZSTD +#include +#endif #ifdef WITH_LIBLZMA #include #endif @@ -47,7 +50,7 @@ #include #include #include -#if !defined(WITH_ZLIB) || !defined(WITH_LIBLZMA) || !defined(WITH_BZ2) +#if !defined(WITH_ZLIB) || !defined(WITH_LIBZSTD) || !defined(WITH_LIBLZMA) || !defined(WITH_BZ2) #include static void DPKG_ATTR_SENTINEL @@ -726,6 +729,87 @@ }; /* + * Zstd compressor. + */ + +#define ZSTD "zstd" + +#ifdef WITH_LIBZSTD + +static void +decompress_zstd(int fd_in, int fd_out, const char *desc) +{ + size_t const buf_in_size = ZSTD_DStreamInSize(); + void* const buf_in = m_malloc(buf_in_size); + size_t const buf_out_size = ZSTD_DStreamOutSize(); + void* const buf_out = m_malloc(buf_out_size); + size_t init_result, just_read, to_read; + ZSTD_DStream* const dstream = ZSTD_createDStream(); + if (dstream == NULL) { + ohshit(_("ZSTD_createDStream error creating stream")); + } + + init_result = ZSTD_initDStream(dstream); + if (ZSTD_isError(init_result)) { + ohshit(_("ZSTD_initDStream error : %s"), ZSTD_getErrorName(init_result)); + } + to_read = init_result; + while ((just_read = fd_read(fd_in, buf_in, to_read))) { + ZSTD_inBuffer input = { buf_in, just_read, 0 }; + while (input.pos < input.size) { + ssize_t actualwrite; + ZSTD_outBuffer output = { buf_out, buf_out_size, 0 }; + to_read = ZSTD_decompressStream(dstream, &output , &input); + if (ZSTD_isError(to_read)) { + ohshit(_("ZSTD_decompressStream error : %s \n"), + ZSTD_getErrorName(to_read)); + } + actualwrite = fd_write(fd_out, output.dst, output.pos); + if (actualwrite != output.pos) { + const char *errmsg = strerror(errno); + ohshite(_("%s: internal zstd write error: '%s'"), desc, errmsg); + } + /* possible next frame */ + if (to_read == 0) { + init_result = ZSTD_initDStream(dstream); + if (ZSTD_isError(init_result)) { + ohshit(_("ZSTD_initDStream error : %s"), ZSTD_getErrorName(init_result)); + } + to_read = init_result; + } + } + } + + ZSTD_freeDStream(dstream); + free(buf_in); + free(buf_out); + if (close(fd_out)) + ohshite(_("%s: internal zstd write error"), desc); +} + +#else +static const char *env_zstd[] = {}; + +static void +decompress_zstd(int fd_in, int fd_out, const char *desc) +{ + fd_fd_filter(fd_in, fd_out, desc, env_zstd, ZSTD, "-dcq", NULL); +} + +#endif + +static const struct compressor compressor_zstd = { + .name = "zstd", + .extension = ".zst", + /* zstd commands's default is 3 but the aim is to be closer to xz's + * default compression efficiency */ + .default_level = 19, + .fixup_params = fixup_none_params, + .compress = NULL, + .decompress = decompress_zstd, +}; + +/* * Generic compressor filter. */ @@ -735,6 +819,7 @@ [COMPRESSOR_TYPE_XZ] = &compressor_xz, [COMPRESSOR_TYPE_BZIP2] = &compressor_bzip2, [COMPRESSOR_TYPE_LZMA] = &compressor_lzma, + [COMPRESSOR_TYPE_ZSTD] = &compressor_zstd, }; static const struct compressor * diff -Nru dpkg-1.18.4ubuntu1.6/lib/dpkg/compress.h dpkg-1.18.4ubuntu1.7/lib/dpkg/compress.h --- dpkg-1.18.4ubuntu1.6/lib/dpkg/compress.h 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/lib/dpkg/compress.h 2021-04-12 15:41:27.000000000 +0000 @@ -42,6 +42,7 @@ COMPRESSOR_TYPE_XZ, COMPRESSOR_TYPE_BZIP2, COMPRESSOR_TYPE_LZMA, + COMPRESSOR_TYPE_ZSTD, }; enum compressor_strategy { diff -Nru dpkg-1.18.4ubuntu1.6/lib/dpkg/Makefile.in dpkg-1.18.4ubuntu1.7/lib/dpkg/Makefile.in --- dpkg-1.18.4ubuntu1.6/lib/dpkg/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/lib/dpkg/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -352,6 +352,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/lib/dpkg/t/Makefile.in dpkg-1.18.4ubuntu1.7/lib/dpkg/t/Makefile.in --- dpkg-1.18.4ubuntu1.6/lib/dpkg/t/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/lib/dpkg/t/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -373,6 +373,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/lib/Makefile.in dpkg-1.18.4ubuntu1.7/lib/Makefile.in --- dpkg-1.18.4ubuntu1.6/lib/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/lib/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -251,6 +251,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/m4/dpkg-libs.m4 dpkg-1.18.4ubuntu1.7/m4/dpkg-libs.m4 --- dpkg-1.18.4ubuntu1.6/m4/dpkg-libs.m4 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/m4/dpkg-libs.m4 2021-04-12 15:41:27.000000000 +0000 @@ -56,6 +56,13 @@ DPKG_WITH_COMPRESS_LIB([zlib], [zlib.h], [gzdopen], [z]) ])# DPKG_LIB_ZLIB +# DPKG_LIB_ZSTD +# ------------- +# Check for zstd library. +AC_DEFUN([DPKG_LIB_ZSTD], [ + DPKG_WITH_COMPRESS_LIB([libzstd], [zstd.h], [ZSTD_decompressStream], [zstd]) +])# DPKG_LIB_ZSTD + # DPKG_LIB_LZMA # ------------- # Check for lzma library. diff -Nru dpkg-1.18.4ubuntu1.6/Makefile.in dpkg-1.18.4ubuntu1.7/Makefile.in --- dpkg-1.18.4ubuntu1.6/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -325,6 +325,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/man/deb.5 dpkg-1.18.4ubuntu1.7/man/deb.5 --- dpkg-1.18.4ubuntu1.6/man/deb.5 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/man/deb.5 2021-04-12 15:41:27.000000000 +0000 @@ -69,8 +69,9 @@ .BR control.tar . It is a tar archive containing the package control information, either not compressed (supported since dpkg 1.17.6), or compressed with -gzip (with \fB.gz\fP extension) or -xz (with \fB.xz\fP extension, supported since 1.17.6), +gzip (with \fB.gz\fP extension), +xz (with \fB.xz\fP extension, supported since 1.17.6) or +zstd (with \fB.zst\fP extension, supported since 1.18.4ubuntu1.7), as a series of plain files, of which the file .B control is mandatory and contains the core control information. The control @@ -84,6 +85,7 @@ not compressed (supported since dpkg 1.10.24), or compressed with gzip (with \fB.gz\fP extension), xz (with \fB.xz\fP extension, supported since dpkg 1.15.6), +zstd (with \fB.zst\fP extension, supported since 1.18.4ubuntu1.7), bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24) or lzma (with \fB.lzma\fP extension, supported since dpkg 1.13.25). .PP diff -Nru dpkg-1.18.4ubuntu1.6/man/Makefile.in dpkg-1.18.4ubuntu1.7/man/Makefile.in --- dpkg-1.18.4ubuntu1.6/man/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/man/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -235,6 +235,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/README dpkg-1.18.4ubuntu1.7/README --- dpkg-1.18.4ubuntu1.6/README 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/README 2021-04-12 15:41:27.000000000 +0000 @@ -70,6 +70,7 @@ zlib (used instead of gzip command-line tool) xz's liblzma (used instead of xz command-line tool) + libzstd (from libzstd, used instead of zstd command-line tool) libbzip2 (used instead of bzip2 command-line tool) libselinux curses compatible library (needed on --enable-dselect) diff -Nru dpkg-1.18.4ubuntu1.6/scripts/Makefile.in dpkg-1.18.4ubuntu1.7/scripts/Makefile.in --- dpkg-1.18.4ubuntu1.6/scripts/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/scripts/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -298,6 +298,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/scripts/mk/Makefile.in dpkg-1.18.4ubuntu1.7/scripts/mk/Makefile.in --- dpkg-1.18.4ubuntu1.6/scripts/mk/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/scripts/mk/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -222,6 +222,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/src/Makefile.in dpkg-1.18.4ubuntu1.7/src/Makefile.in --- dpkg-1.18.4ubuntu1.6/src/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/src/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -293,6 +293,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ diff -Nru dpkg-1.18.4ubuntu1.6/utils/Makefile.in dpkg-1.18.4ubuntu1.7/utils/Makefile.in --- dpkg-1.18.4ubuntu1.6/utils/Makefile.in 2019-07-16 12:57:11.000000000 +0000 +++ dpkg-1.18.4ubuntu1.7/utils/Makefile.in 2021-04-12 15:41:27.000000000 +0000 @@ -270,6 +270,7 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBZSTD_LIBS = @LIBZSTD_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@