From 051da997da6344a33145e7c370e336dfc1e8fb09 Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Mon, 26 Jul 2021 14:36:04 -0400 Subject: CPack/DEB: Add zstd compression for deb packages --- Help/cpack_gen/deb.rst | 21 +++++++++++++++++---- Help/release/dev/cpack-deb-add-zstd-compression.rst | 6 ++++++ Source/CPack/cmCPackDebGenerator.cxx | 3 +++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/cpack-deb-add-zstd-compression.rst diff --git a/Help/cpack_gen/deb.rst b/Help/cpack_gen/deb.rst index d8d53ec..3b341c2 100644 --- a/Help/cpack_gen/deb.rst +++ b/Help/cpack_gen/deb.rst @@ -274,10 +274,23 @@ List of CPack DEB generator specific variables: Possible values are: - - lzma - - xz - - bzip2 - - gzip + ``lzma`` + Lempel–Ziv–Markov chain algorithm + + ``xz`` + XZ Utils compression + + ``bzip2`` + bzip2 Burrows–Wheeler algorithm + + ``gzip`` + GNU Gzip compression + + ``zstd`` + .. versionadded:: 3.22 + + Zstandard compression + .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY CPACK_DEBIAN__PACKAGE_PRIORITY diff --git a/Help/release/dev/cpack-deb-add-zstd-compression.rst b/Help/release/dev/cpack-deb-add-zstd-compression.rst new file mode 100644 index 0000000..a138455 --- /dev/null +++ b/Help/release/dev/cpack-deb-add-zstd-compression.rst @@ -0,0 +1,6 @@ +cpack-deb-add-zstd-compression +------------------------------ + +* The :cpack_gen:`CPack DEB Generator` gained the + option to set :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` to zstd, + which enables Zstandard compression for deb packages. diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 5b03185..5f0f153 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -111,6 +111,9 @@ DebGenerator::DebGenerator( } else if (!std::strcmp(debianCompressionType, "gzip")) { this->CompressionSuffix = ".gz"; this->TarCompressionType = cmArchiveWrite::CompressGZip; + } else if (!std::strcmp(debianCompressionType, "zstd")) { + this->CompressionSuffix = ".zst"; + this->TarCompressionType = cmArchiveWrite::CompressZstd; } else if (!std::strcmp(debianCompressionType, "none")) { this->CompressionSuffix.clear(); this->TarCompressionType = cmArchiveWrite::CompressNone; -- cgit v0.12