CPack/Deb: Remove paxr as a supported tar format for a .deb

The only format supported from the ones available within cpack is
gnutar, which supports large numbers encoded in base-256, and long
filenames and linknames. PAX is not and has never been a supported
format by dpkg.

Fixes: #18620
This commit is contained in:
Guillem Jover
2018-11-22 03:39:28 +01:00
committed by Brad King
parent 0fc6faf2dd
commit 38e75bb3c6
4 changed files with 20 additions and 10 deletions

View File

@@ -205,18 +205,18 @@ List of CPack DEB generator specific variables:
The archive format used for creating the Debian package.
* Mandatory : YES
* Default : "paxr"
* Default : "gnutar"
Possible values are:
Possible value is:
- paxr
- gnutar
.. note::
Default pax archive format is the most portable format and generates
packages that do not treat sparse files specially.
GNU tar format on the other hand supports longer filenames.
This variable previously defaulted to the ``paxr`` value, but ``dpkg``
has never supported that tar format. For backwards compatibility the
``paxr`` value will be mapped to ``gnutar`` and a deprecation message
will be emitted.
.. variable:: CPACK_DEBIAN_COMPRESSION_TYPE

View File

@@ -0,0 +1,7 @@
cpack-deb-tar-format
--------------------
* The :module:`CPack` module no longer defaults to the ``paxr`` value in the
:variable:`CPACK_DEBIAN_ARCHIVE_TYPE` variable, because ``dpkg`` has
never supported the PAX tar format. The ``paxr`` value will be mapped
to ``gnutar`` and a deprecation message emitted.

View File

@@ -482,13 +482,16 @@ function(cpack_deb_prepare_package_vars)
endif()
if(CPACK_DEBIAN_ARCHIVE_TYPE)
set(archive_types_ "paxr;gnutar")
if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_)
if(CPACK_DEBIAN_ARCHIVE_TYPE STREQUAL "paxr")
message(DEPRECATION "CPACK_DEBIAN_ARCHIVE_TYPE set to old and invalid "
"type 'paxr', mapping to 'gnutar'")
set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
elseif(NOT CPACK_DEBIAN_ARCHIVE_TYPE STREQUAL "gnutar")
message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported"
"type ${CPACK_DEBIAN_ARCHIVE_TYPE}")
endif()
else()
set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr")
set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
endif()
# Compression: (recommended)

View File

@@ -80,7 +80,7 @@ DebGenerator::DebGenerator(
, WorkDir(workDir)
, TopLevelDir(topLevelDir)
, TemporaryDir(temporaryDir)
, DebianArchiveType(debianArchiveType ? debianArchiveType : "paxr")
, DebianArchiveType(debianArchiveType ? debianArchiveType : "gnutar")
, ControlValues(controlValues)
, GenShLibs(genShLibs)
, ShLibsFilename(shLibsFilename)