Commit Graph

131 Commits

Author SHA1 Message Date
Jens Carl
e71396c8db CPack/NuGet: Enable the generation of NuGet symbol package(s)
Enable the generation of NuGet symbol package(s) with the new variable
`CPACK_NUGET_SYMBOL_PACKAGE`. CPack generates then normal nuget package
(*.nupkg) and a symbol nuget package (*.snupkg). The new generate
package contains PDB files.

Fixes: #26976
2025-06-05 10:41:22 -04:00
Donald Lee
4244f704b4 CPack/RPM: Fix warn of not relocatable path
The incorrect variable name may fail to warn about not relocatable paths.

Signed-off-by: Donald Lee <donald790411@gmail.com>
2025-05-14 18:52:06 +08:00
Brad King
0af6821799 Merge topic 'cpack-rpm-weak-deps-tags'
14baa13ab8 CPack/RPM: Add support for all weak dependency tags
847f515934 Tests: Simplify RunCMake.CPack_RPM.SUGGESTS expected output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10415
2025-03-04 08:47:25 -05:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Balazs Kosaras
14baa13ab8 CPack/RPM: Add support for all weak dependency tags
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-03 09:09:15 -05:00
Brad King
759ba45bdb Merge topic 'cpack-rpm-weak-deps'
283a48403f CPack/RPM: Fix detection of RPM support for weak dependencies
ab4e74ad0b CPack/RPM: Remove redundant conditions for presence of rpmbuild

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10403
2025-03-03 08:56:55 -05:00
Brad King
283a48403f CPack/RPM: Fix detection of RPM support for weak dependencies
Add a missing `find_program` call to populate `RPM_EXECUTABLE`.
This was left out of two previous changes that intended to query
the `rpm` executable:

* In commit 9b53eca317 (CPack/RPM: Fix weak dep support, 2021-06-29,
  v3.21.0-rc2~4^2), without `RPM_EXECUTABLE` the query always failed,
  so we were concluding that weak dependencies are not supported even
  when they are.

* In commit 488de6294a (CPack: correctly perform querytags on old
  versions of RPM, 2025-01-09, v4.0.0-rc1~182^2~3), without
  `RPM_EXECUTABLE` the query always failed.  This change has not
  yet been in a release anyway.

Also fix the test case for the "suggests" field to verify this.

Issue: #22350
Reported-by: Balazs Kosaras <balazskosaras@gmail.com>
2025-02-28 17:24:44 -05:00
Brad King
ab4e74ad0b CPack/RPM: Remove redundant conditions for presence of rpmbuild
If `rpmbuild` is missing, error out early.

While at it, drop unfinished `alien` support.
2025-02-28 17:06:47 -05:00
Nikita Nemkin
33e85acff7 CPack/NSIS: Use the installed display name in uninstall prompt
When a new installation prompts to uninstall the old version,
use the display name of the old version from the registry.

This only affects packages that change their CPACK_NSIS_DISPLAY_NAME.

Patch-by: David Golub <golubdr@gmail.com>
Fixes: #14112
2025-02-20 13:12:11 +05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
makise-homura
488de6294a CPack: correctly perform querytags on old versions of RPM
In some versions of RPM, e.g. 4.0.4, rpmbuild does not understand
--querytags parameter, but rpm does. Such behavior was found on
Alt Linux P10 and Alt Linux Sisyphus (e2k).
2025-01-17 07:37:22 +03:00
Alex Turbov
bc8621d999 Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Alex Turbov
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
Mark files that must use TABs to indent in the `.gitattributes`.
Use space instead of TABs in sources and some data/test files.
2025-01-12 18:49:25 +04:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Edoardo Bortolozzo
443a06807c CPackDeb: always treat PACKAGE_DEPENDS as a list
Remove some edge cases where if CPACK_DEBIAN_PACKAGE_DEPENDS is a list
it would not be expanded on all components leaving some with ';'(s) in
the Depends field of the control file.
Same goes for using CPACK_DEBIAN_PACKAGE_SHLIBDEPS.
2024-10-03 08:52:14 -04:00
Brad King
4aca6d8327 Merge topic 'cpack-nuget-native'
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9829
2024-09-20 10:05:53 -04:00
Diego Dassie
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups
Add the `native0.0` framework to the list of allowed frameworks allowing
native (C/C++) NuGet packages. This extends commit 0f4d3664a9
(CPack/NuGet: Build dependencies in groups, 2024-06-01, v3.30.0-rc1~18^2).

Fixes: #26305
2024-09-19 08:21:38 +02:00
raspopov
e8b9eebd63 CPack/InnoSetup: Template file in UTF-8 BOM to support Unicode 2024-08-15 20:05:21 +03:00
Joel Johnson
fab5c030ad CPack/RPM: Add zstd compression support
Fixes: #26088
2024-07-01 12:17:24 -04:00
Joel Johnson
a25be17bc4 CPack/RPM: emit error on invalid CPACK_RPM_COMPRESSION_TYPE 2024-07-01 12:16:44 -04:00
Joel Johnson
7e21412f47 CPack/RPM: fix whitespace alignment prior to editing 2024-07-01 12:16:35 -04:00
Brad King
a20377e41a Merge topic 'cpack-debian-multiarch'
71c631c435 CPack/DEB: Add Multi-Arch support
55524c48a4 CPack/DEB: Add Multi-Arch support
a022705a2e Tests/RunCMake/CPack: Improve README

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9609
2024-06-26 08:44:02 -04:00
Robert Schuster
55524c48a4 CPack/DEB: Add Multi-Arch support
Add support for Multi-Arch in control files of Debian packages.
Valid values: same, foreign, allowed

Fixes: #21445
2024-06-21 12:27:50 -04:00
Adrian DC
f73ad97220 CPack/RPM: Fix debuginfo permissions check
Replace non-existent 'USER_EXECUTE' with intended 'OWNER_EXECUTE'.

Signed-off-by: Adrian DC <radian.dc@gmail.com>
2024-06-17 11:54:16 -04:00
Brad King
614100dbf6 CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower
In commit 60661f6770 (CPack/WiX: Make InstallScope configurable,
2023-11-07, v3.29.0-rc1~413^2) the `CPACK_WIX_INSTALL_SCOPE` default was
set to `perMachine`.  While installers created with `perMachine` have
better behavior on their own than installers created without any
`InstallScope`, they do not cleanly convert existing installations on
updates.

Fixes: #26029
2024-06-05 14:01:14 -04:00
Brad King
57c6dd277e Merge topic 'cpack-nuget-dependency-groups'
0f4d3664a9 CPack/NuGet: Build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9544
2024-06-04 08:59:28 -04:00
Alex Opie
0f4d3664a9 CPack/NuGet: Build dependencies in groups
This allows particular frameworks to be targeted by
particular dependencies, and for empty dependency
groups to satisfy NuGet's framework-matching
requirements.
2024-06-03 11:28:49 -04:00
Deniz Bahadir
27d161eac3 CPackDeb: dpkg-shlibdeps shall consider dependency components, too
When using `dpkg-shlibdeps` to automatically determine package
dependencies it considers the RUNPATH/RPATH of executables in order to
find all required shared libraries of such executables.

If the RUNPATH/RPATH contains a verbatim `$ORIGIN` (respective
`${ORIGIN}`), it will now be substituted by the packaging-paths of other
components that are marked as dependency and those paths will then be
used as additional search directories for `dpkg-shlibdeps`.

Associated tests were added as well.

Fixes: #21838
2024-05-30 16:13:46 +02:00
Deniz Bahadir
a1af593291 CPack: Support arbitrary component name when packaging
CPack no longer blindly tries to create temporary packaging
(sub)directories that contain the verbatim name of a component, which
might contain characters that are not supported on the platform /
filesystem.
Instead, if the component's name contains a (possibly) problematic
character its MD5 hash will be used for that temporary packaging
(sub)directory.

Likewise, if the component's name resembles a reserved device name (e.g.
"COM1" on Windows) then the temporary packaging (sub)directory will get
this name prefixed with an underscore.
Similar, if it ends in a dot (on Windows) then the temporary packaging
(sub)directory will get this name suffixed with an underscore.

Fixes: #23612
2024-05-01 19:20:32 +02:00
Deniz Bahadir
208b3f63ac CPackDeb.cmake: Fix debug message 2024-04-30 18:36:26 +02:00
Brad King
03884f4f32 CPack/WIX: Add support for WiX Toolset v4
Add a `CPACK_WIX_VERSION` option to specify version WiX for
which the project is configured.

Fixes: #23910
2024-03-24 15:26:39 -04:00
Brad King
ac25c645a7 CPack/WIX: Improve formatting of CPACK_WIX_CUSTOM_XMLNS expansion 2024-03-22 09:58:42 -04:00
Brad King
d2f4836f8e CPack/WIX: Prepare to provide version-specific WiX templates
Move our template for WiX Toolset v3 to a versioned location.
2024-03-22 09:51:06 -04:00
Craig Scott
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs 2024-03-19 21:47:21 +11:00
Brad King
3ed275bbb6 CPack/WiX: Fix installer status text
Previously, installers displayed extra text on some Windows versions:

    File: [1], Directory: [9], Size [6]

Add an option to our WiX templates to suppress that.

Fixes: #25634
2024-01-24 15:28:13 -05:00
Elijah Zarezky
453742ae88 CPack/RPM: Enable rpm threads during package generation
Previously, `w7.xzdio` only used a single CPU core.
Honor `CPACK_THREADS`: `w7T${CPACK_THREADS}.xzdio` uses the specified
number of threads. `w7T.xzdio` uses all available CPU cores.

Fixes: #25615
2024-01-23 12:10:35 -05:00
Alex Turbov
ccde6f8048 CPack/NuGet: Add support for repository tag
Fixes: #23703
2024-01-08 11:01:29 -05:00
Alex Turbov
2c616e85cf CPack/NuGet: Add support for readme tag
Fixes: #25542
2024-01-08 11:01:06 -05:00
Brad King
a1dcc36f65 Merge topic 'rpm-quoting'
5123e9e160 ci: unmask RPM tests on Fedora 39
bf22ac5263 CPack/RPM: Quote paths in rpm spec only if they have whitespace
75ea6207b7 CPack/RPM: Factor out helper to quote paths in generated rpm spec

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9005
2023-11-30 09:05:54 -05:00
Brad King
bf22ac5263 CPack/RPM: Quote paths in rpm spec only if they have whitespace
RPM supports either whitespace with quoting or globbing without quoting.
Prior to RPM 4.19 it accepted globbing in quotes, but it only globbed
correctly without whitespace, where quoting was not necessary anyway.
Starting in RPM 4.19, glob characters in quotes are considered literal.

Fixes: #25421
Inspired-by: Ben Boeckel <ben.boeckel@kitware.com>
See: d44114f007
2023-11-29 12:47:20 -05:00
Brad King
75ea6207b7 CPack/RPM: Factor out helper to quote paths in generated rpm spec 2023-11-29 12:27:31 -05:00
Brad King
c40e242be3 Merge topic 'cpack-auto-suffixes'
53991e62da CPack/RPM: Append .rpm to CPACK_RPM_FILE_NAME if missing
f2a6d423da CPack/DEB: Append .deb to CPACK_DEBIAN_FILE_NAME if missing
907d4db558 Help: Format allowed CPACK_{DEB,RPM}_FILE_NAME values as definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8880
2023-11-28 09:45:53 -05:00
Alex Neundorf
53991e62da CPack/RPM: Append .rpm to CPACK_RPM_FILE_NAME if missing
Previously we issued an error when the `.rpm` suffix is missing.
Instead, append the suffix automatically.  This matches the behavior of
`CPACK_ARCHIVE_FILE_NAME`, to which the archive format suffix is
automatically appended.  With this change, developers can simply do

    set(CPACK_RPM_comp_FILE_NAME "${CPACK_ARCHIVE_comp_FILE_NAME}")
2023-11-27 10:26:37 -05:00
Alex Neundorf
f2a6d423da CPack/DEB: Append .deb to CPACK_DEBIAN_FILE_NAME if missing
Previously we issued an error when the `.deb` or `.ipk` suffix
is missing. Instead, append the suffix `.deb` automatically.
This matches the behavior of `CPACK_ARCHIVE_FILE_NAME`, to
which the archive format suffix is automatically appended.
2023-11-27 10:25:43 -05:00
Brad King
4c1a6f2e23 Merge topic 'ci-fedora-39'
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39
9283b20659 ci: Suppress CPack/RPM tests pending fix for Fedora 39
18145e8745 ci: Update FindMPI test environment for mpich on Fedora 39
a8be80ccf2 ci: Drop now-unnecessary Clang rules for CXXModules tests
99238b23e9 ci: use Fedora 39 images and environments
57eadec617 ci: update Linux image to Fedora 39
653262162c clang-tidy module: Update to build against LLVM/Clang 17
2cf9a65835 clang-tidy: ignore warnings new in version 17
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8983
2023-11-20 08:10:37 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Max Gaukler
60661f6770 CPack/WiX: Make InstallScope configurable
Add a new `CPACK_WIX_INSTALL_SCOPE` variable to set the `InstallScope`
when using the default WiX template.  Set the default to the bug-free
value `perMachine`.

Fixes: #20962
2023-11-16 14:15:38 -05:00
Sprite
d3bfe0ea44 CPack/NSIS: Fix incorrect jump for standard user
Revert an incorrect change from commit c4a0bcea77 (CPack: Fix NSIS
handling of privileged users, 2012-02-01, v2.8.8~230^2).

Fixes: #13939
2023-09-05 13:39:00 -04:00
Brad King
04b0d5c862 codespell: Fix typos 2023-05-22 16:51:15 -04:00
Jannik Alber
1d6db66179 CPack: Add Inno Setup generator 2023-04-28 09:33:28 -04:00