From 923b43dc23b518654b328d38a74af7394144979c Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Fri, 3 Nov 2023 03:53:18 +0000 Subject: user/spack: default unprivileged root. fixes #1106. --- user/spack/APKBUILD | 6 ++++-- user/spack/default-config-unprivileged.patch | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 user/spack/default-config-unprivileged.patch diff --git a/user/spack/APKBUILD b/user/spack/APKBUILD index 1ffc6ab79..527429459 100644 --- a/user/spack/APKBUILD +++ b/user/spack/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Zach van Rijn pkgname=spack pkgver=0.20.3_p1 -pkgrel=2 +pkgrel=3 pkgdesc="A flexible package manager for supercomputers." url="https://spack.io/" arch="all" @@ -22,6 +22,7 @@ source="https://git.adelielinux.org/adelie/$pkgname/-/archive/adelie-v$pkgver/$p archspec-fix-cpu-family-detection.patch default-no-buildcache.patch + default-config-unprivileged.patch " install="$pkgname.post-install" builddir="${srcdir}/${pkgname}-adelie-v${pkgver}" @@ -66,4 +67,5 @@ sha512sums="9629ee48d4f93158c4c2d3f14bc8755e33df1a82428337fc27495b7bbfba3f056c19 195d9dd1da12be338169a4a2a0b12fece1fefd4ac6570111913ce0d50a8e007fc3320340573cee760d1eab55dddfcf7eed04221bd686a59d18d0ab2ef46f65a0 40841.patch 30f6d193971bc6f2941141d0da50d339c459f2b9c6157cc2659a589bd2b546fba35d580cad79dd1bc74bcd9de7db31bc937418598d73b68c69876fee6a1c5c73 clingo-explicit-libatomic.patch a6503238d116b74ff9c4ecd08a984df90ce02f95c3e10e907481d99917c73339db1cc49f2b473a37875b92a9a6607cac72057c0a7b3d9a57d44c89ebe0ad3915 archspec-fix-cpu-family-detection.patch -eec3e7dd818c39daea7b8d63b04a6c71d9eb3af32dd899cddc3642152252f4e2eebfd53c3c95365117f9a4826f6f29553f44373948e5c474388021302c8a5ce9 default-no-buildcache.patch" +eec3e7dd818c39daea7b8d63b04a6c71d9eb3af32dd899cddc3642152252f4e2eebfd53c3c95365117f9a4826f6f29553f44373948e5c474388021302c8a5ce9 default-no-buildcache.patch +4d138a4e04ab7367b9c3fe230342f5a1f449509cea26a62ddceb52ac516b1f2c420456e9675df79c6814dbcd423bcae96c8512ecaa795798a21e7b9483624d46 default-config-unprivileged.patch" diff --git a/user/spack/default-config-unprivileged.patch b/user/spack/default-config-unprivileged.patch new file mode 100644 index 000000000..802f98383 --- /dev/null +++ b/user/spack/default-config-unprivileged.patch @@ -0,0 +1,22 @@ +diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml +index b4d81f69da..36ea2b0f23 100644 +--- a/etc/spack/defaults/config.yaml ++++ b/etc/spack/defaults/config.yaml +@@ -17,7 +17,7 @@ config: + # This is the path to the root of the Spack install tree. + # You can use $spack here to refer to the root of the spack instance. + install_tree: +- root: $spack/opt/spack ++ root: $user_cache_path + projections: + all: "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}" + # install_tree can include an optional padded length (int or boolean) +@@ -78,7 +78,7 @@ config: + + # Cache directory for already downloaded source tarballs and archived + # repositories. This can be purged with `spack clean --downloads`. +- source_cache: $spack/var/spack/cache ++ source_cache: $user_cache_path/cache + + + ## Directory where spack managed environments are created and stored -- cgit v1.2.3-70-g09d2