Installing a package built on Solaris 5.11 11.4.45.119.2 was uninstallable on Solaris 5.11 11.4.36.101.2 due to bash 5.1.16 being a pkgdepend resolved requirement for bash, while 5.11 11.4.45.119.2 has at max bash 5.1.8 available to it. Recommended practice per this discussion is to either build on the oldest possible operating system that you will support or use transform to remove the version tag from the depend directive in the manifest.
The Problem
Error output example
pkg install: No matching version of developer/versioning/chef can be installed:
Reject: pkg://Omnibus/developer/versioning/chef@18.3.64-1
Reason: No version matching 'require' dependency shell/bash@5.1.16-11.4.45.0.1.119.0 can be installed
----------------------------------------
Reject: pkg://solaris/shell/bash@5.1.16-11.4.45.0.1.119.0
Reason: No version matching 'require' dependency library/ncurses@6.3-11.4.45.0.0.117.0 can be installed
----------------------------------------
Reject: pkg://solaris/library/ncurses@6.3-11.4.45.0.1.119.0
Reason: No version matching 'require' dependency shell/bash@5.1.16-11.4.45.0.0.117.0 can be installed
----------------------------------------
Reject: pkg://solaris/shell/bash@5.1.16-11.4.48.0.1.126.0
Reason: No version matching 'require' dependency system/library@11.4-11.4.48.0.0.124.0 can be installed
----------------------------------------
Reject: pkg://solaris/system/library@11.4-11.4.48.0.1.126.1
Reason: No version matching 'require' dependency system/library/ldap@11.4-11.4.48.0.1.126 can be installed
----------------------------------------
Reject: pkg://solaris/system/library/ldap@11.4-11.4.48.0.1.126.1
Reason: No version matching 'require' dependency system/library/pam-core@11.4-11.4.48.0.1.126 can be installed
----------------------------------------
Reject: pkg://solaris/system/library/pam-core@11.4-11.4.48.0.1.126.1
Reason: No version matching 'require' dependency system/library/libc@11.4-11.4.48.0.1.126 can be installed
Root cause
Root cause for this is error is the pkgdepend resolve -m call in ips.rb#generate_pkg_deps:
Caveat: the above transform risks truncating more than aforementioned depend requirements, but currently the main problem is requirements being too strict, and we do not separately specify the OS packages included.
Additional pkgmogrify step added:
Because pkgdepend resolve is the step added the strict package versions, we need to insert a step to pkgmogrify them out. The prior pkgmogrify step has been left intact since the dir and file transforms are likely important to have happen earlier.
Description
Installing a package built on Solaris 5.11 11.4.45.119.2 was uninstallable on Solaris 5.11 11.4.36.101.2 due to bash 5.1.16 being a
pkgdepend resolve
d requirement for bash, while 5.11 11.4.45.119.2 has at max bash 5.1.8 available to it. Recommended practice per this discussion is to either build on the oldest possible operating system that you will support or usetransform
to remove the version tag from thedepend
directive in the manifest.The Problem
Error output example
Root cause
Root cause for this is error is the
pkgdepend resolve -m
call inips.rb#generate_pkg_deps
:Which generates the following
depend fmri
requirements:The changes
Explanation of strategy
A depend directive appears as the following:
The can be transformed using:
Resulting in the following directive, with the version removed.
Since the attribute matching criteria is a regex, the transforms added can be reduced from:
to:
Caveat: the above transform risks truncating more than aforementioned
depend
requirements, but currently the main problem is requirements being too strict, and we do not separately specify the OS packages included.Additional
pkgmogrify
step added:Because
pkgdepend resolve
is the step added the strict package versions, we need to insert a step topkgmogrify
them out. The priorpkgmogrify
step has been left intact since thedir
andfile
transforms are likely important to have happen earlier.Maintainers
Please ensure that you check for: