From fafff0c6c0142e62e0f6b65b1d53ea58feb7fc7a Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Thu, 12 Nov 2020 16:08:55 -0800 Subject: move sbang to unpadded install tree root (#19640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since #11598 sbang has been installed within the install_tree. This doesn’t play nicely with install_tree padding, since sbang can’t do its job if it is installed in a long path (this is the whole point of sbang). This PR changes the padding specification. Instead of $padding inside paths, we now have a separate `padding:` field in the `install_tree` configuration. Previously, the `install_tree` looked like this: ``` /path/to/opt/spack_padding_padding_padding_padding_padding/ bin/ sbang .spack-db/ ... linux-rhel7-x86_64/ ... ``` ``` This PR updates things to look like this: /path/to/opt/ bin/ sbang spack_padding_padding_padding_padding_padding/ .spack-db/ ... linux-rhel7-x86_64/ ... So padding is added at the start of all install prefixes *within* the unpadded root. The database and all installations still go under the padded root. This ensures that `sbang` is in the shorted possible path while also allowing us to make long paths for relocatable binaries. --- etc/spack/defaults/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'etc') diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml index aa4ee2bbc6..6c5e8697b1 100644 --- a/etc/spack/defaults/config.yaml +++ b/etc/spack/defaults/config.yaml @@ -20,6 +20,13 @@ config: root: $spack/opt/spack projections: all: "${ARCHITECTURE}/${COMPILERNAME}-${COMPILERVER}/${PACKAGE}-${VERSION}-${HASH}" + # install_tree can include an optional padded length (int or boolean) + # default is False (do not pad) + # if padded_length is True, Spack will pad as close to the system max path + # length as possible + # if padded_length is an integer, Spack will pad to that many characters, + # assuming it is higher than the length of the install_tree root. + # padded_length: 128 # Locations where templates should be found -- cgit v1.2.3-60-g2f50