CPack/productbuild: remove auth attribute
This addresses #23030 (closed).
Summary
According to the documentation for the Distribution.xml
file, the auth
attribute in the pkg-ref
element is deprecated. Instead, the domains
element is the preferred way to determine the required authorization level needed for the install. Removing auth="Admin"
allows package developers to create installers that do not require root privileges when installing to the user's home directory.
Testing
Prior to this change:
- Create custom
Cpack.distribution.dist.in
- Specify
<domains enable_currentUserHome="true" enable_localSystem="false"/>
- Build and run the pkg
- Observe the pkg requires root privileges to install to user's home directory
After this change:
- Repeat (1) through (3) above
- Observe the pkg does not require root privileges to install to user's home directory
Notes
In the case that the domains
element is not specified, the documentation states the following:
If this element is not present, enable_anywhere is true, enable_currentUserHome is false, and enable_localSystem is true.
So any project that currently uses the default CPack.distribution.dist.in
will still require root privileges.