Since commit 57eed59f35 (CPack/DEB: Use the same compression type for
control tar, 2025-07-29), control.tar uses CPACK_DEBIAN_COMPRESSION_TYPE.
deb(5) allows lzma and bzip2 only for data.tar, so dpkg rejects packages
built with either type. Fall back to gzip for control.tar in those cases,
as before that commit.
Fixes: #28169
Package Android applications by driving the Android SDK build tools
(aapt2, d8, zipalign and apksigner) and the JDK directly, so that no
Gradle installation is needed. Java code is taken from sources, `.jar`
and `.aar` files. Maven dependencies, such as the AndroidX libraries,
can be listed in `CPACK_APK_MAVEN_DEPENDENCIES` to have them and their
dependencies downloaded at packaging time, resolved like Gradle does
from Gradle module metadata or POMs. Nothing is downloaded otherwise.
Like the Android Gradle plugin, the shared C++ runtime of the NDK is
packaged for the native libraries that `readelf` finds linked to it.
The native libraries of several ABIs are packaged into one APK by a
superbuild that builds each ABI with `ExternalProject` and lists the
build trees in `CPACK_INSTALL_CMAKE_PROJECTS`.
See: https://bugreports.qt.io/browse/QTBUG-106495
Add workflow and per-type defined values to cmake --list-presets.
Each -defined value lists every non-hidden preset of the selected type
and explains why unavailable presets cannot be used. The defined value
is an alias for configure-defined.
Support --list-presets=defined in cmake build and workflow modes,
ctest, and cpack. Propagate configure preset unavailability to
dependent build, test, package, and workflow presets.
Fixes: #28016, #26118
Allow CMake, CTest, and CPack to read presets from a path given by
command-line argument instead of always requiring `CMakePresets.json`
or `CMakeUserPresets.json` in the source tree. This makes the presets
feature more extensible to cases in which the user doesn't have access
to the presets defined in the source tree (e.g., if the source tree is
not writable).
For now, there is no equivalent implementation of such an option in the
`cmake-gui`, nor for the recent presets functionality implemented in
`ctest_configure` and `ctest_build`.
Fixes: #27329
Replace duplicated inline preset lookup/validation logic in cmake.cxx,
cmCTest.cxx, and cpack.cxx with a shared ResolvePreset<T> template
method on cmCMakePresetsGraph.
Use the PresetType::kind() static method introduced in commit
0f3347bb27 (cmCMakePresetsGraph: generalize printing presets of
different types) to derive error message strings, replacing the
runtime presetType string parameter with a template parameter.
Error messages for configure presets now consistently include
"configure" in the preset type (e.g., "No such configure preset")
matching the pattern used by build, test, and package presets.
The Debian `lintian` tool reported the dbgsym package issue as
`md5sums-lists-nonexistent-file`.
The DEB generator writes `md5sums` entries by stripping a top-level prefix
from each packaged file path. That used `CPACK_TEMPORARY_DIRECTORY`, which
works for regular debs but not for dbgsym packages.
Dbgsym package files are collected from `GEN_DBGSYMDIR` and passed to
`DebGenerator` with `WorkDir` rooted there. Because the `md5sums` writer
stripped `TemporaryDir` instead, the prefix did not match and absolute
staging paths leaked into `md5sums`.
Strip `WorkDir` instead. That is the actual root of `PackageFiles` for both
regular deb and dbgsym package generation, so `md5sums` entries stay
relative in both cases.
0c355dfcf7 tar: Use UTF-8 as a default encoding
21eb53e9eb tar: Add option to specify the encoding of archive pathnames
0435b76095 libarchive: Build with iconv to handle entry path encoding
24cb39e081 libarchive: Suppress upstream preference for MacPorts over macOS SDK
e07d0dacc9 cmArchiveWrite: Comment how we pass an entry pathname to libarchive
95040f37ed Tests/RunCMake/CommandLineTar: Improve formatting of error messages
e5c6c121c6 libarchive: Backport "Fix crash on failure to convert WCS/UTF-8 pathname"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11601
Use UTF-8 by default, as this has become common for cross-platform
archive distribution, and our previous default was platform-specific.
Also revert commit f590010167 (libarchive: Restore tolerance of archives
with non-OEM paths on Windows, 2026-01-23, v3.31.11~1^2). Its primary
purpose was to tolerate UTF-8 paths when extracting archives, which we
now handle by default.
Issue: #26903
When there are two files with the same name but different content, an
error is shown, but the error does not include the filename which caused
it. This adds the filename to the error.
Add a new variable `CPACK_DEBIAN_COMPRESSION_LEVEL` to control the compression
level used when generating Debian packages. This complements the existing
`CPACK_DEBIAN_COMPRESSION_TYPE` variable and allows finer control over the
compression performance vs. size trade-off. Supported values correspond to
the compression level accepted by the underlying compressor (e.g. gzip, xz,
zstd, etc.).