summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/spack/APKBUILD12
-rw-r--r--user/spack/config.yaml22
-rw-r--r--user/spack/default-adelie-upstream-git.patch27
-rw-r--r--user/spack/default-config-unprivileged.patch22
-rw-r--r--user/spack/spack.post-install2
5 files changed, 59 insertions, 26 deletions
diff --git a/user/spack/APKBUILD b/user/spack/APKBUILD
index 527429459..265d5fb17 100644
--- a/user/spack/APKBUILD
+++ b/user/spack/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=spack
pkgver=0.20.3_p1
-pkgrel=3
+pkgrel=4
pkgdesc="A flexible package manager for supercomputers."
url="https://spack.io/"
arch="all"
@@ -22,7 +22,9 @@ 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
+ default-adelie-upstream-git.patch
+
+ config.yaml
"
install="$pkgname.post-install"
builddir="${srcdir}/${pkgname}-adelie-v${pkgver}"
@@ -61,6 +63,9 @@ package() {
for k in LICENSE-APACHE LICENSE-MIT NOTICE; do
install -Dm644 ${k} "${pkgdir}"/usr/share/licenses/${pkgname}/${k};
done
+
+ # lower precedence than /opt/spack/etc/spack/config.yaml
+ install -D -m644 "${srcdir}"/config.yaml "$pkgdir"/etc/spack/config.yaml;
}
sha512sums="9629ee48d4f93158c4c2d3f14bc8755e33df1a82428337fc27495b7bbfba3f056c193b95bcb9f90025d89c7759fcf2ef09a1f1639880a8db87a786ee1bd138e2 spack-adelie-v0.20.3_p1.tar.bz2
@@ -68,4 +73,5 @@ sha512sums="9629ee48d4f93158c4c2d3f14bc8755e33df1a82428337fc27495b7bbfba3f056c19
30f6d193971bc6f2941141d0da50d339c459f2b9c6157cc2659a589bd2b546fba35d580cad79dd1bc74bcd9de7db31bc937418598d73b68c69876fee6a1c5c73 clingo-explicit-libatomic.patch
a6503238d116b74ff9c4ecd08a984df90ce02f95c3e10e907481d99917c73339db1cc49f2b473a37875b92a9a6607cac72057c0a7b3d9a57d44c89ebe0ad3915 archspec-fix-cpu-family-detection.patch
eec3e7dd818c39daea7b8d63b04a6c71d9eb3af32dd899cddc3642152252f4e2eebfd53c3c95365117f9a4826f6f29553f44373948e5c474388021302c8a5ce9 default-no-buildcache.patch
-4d138a4e04ab7367b9c3fe230342f5a1f449509cea26a62ddceb52ac516b1f2c420456e9675df79c6814dbcd423bcae96c8512ecaa795798a21e7b9483624d46 default-config-unprivileged.patch"
+eb09ce82d2c5c63c2cc63b2f82db2888f15ce82100311614f5a73773be2f605337811c4580e0d4eb2f87b730e7ce4afa6dcdc3f3f52321f63a29a2ad533ea5d4 default-adelie-upstream-git.patch
+864ae8e73cd80560ed9c4ce03bc6ae8f58b928da348a261617e42b6a680f8cf18f48b120401fe7b4a3f3af260675922044dbd9abbc79b1d2e90f821c00569d5e config.yaml"
diff --git a/user/spack/config.yaml b/user/spack/config.yaml
new file mode 100644
index 000000000..c7ffefb41
--- /dev/null
+++ b/user/spack/config.yaml
@@ -0,0 +1,22 @@
+# -------------------------------------------------------------------------
+# This is the Adélie spack configuration file.
+#
+# Settings here are versioned with Adélie and are intended to provide
+# sensible defaults out of the box. Adélie maintainers should edit this
+# file to keep it current.
+#
+# Users can override these settings by editing the following files.
+#
+# Per-spack-instance settings (overrides defaults):
+# /opt/spack/etc/spack/config.yaml
+#
+# Per-user settings (overrides default and site settings):
+# ~/.spack/config.yaml
+# -------------------------------------------------------------------------
+
+config:
+
+ install_tree:
+ root: $user_cache_path
+
+ source_cache: $user_cache_path/cache
diff --git a/user/spack/default-adelie-upstream-git.patch b/user/spack/default-adelie-upstream-git.patch
new file mode 100644
index 000000000..cf8e982dd
--- /dev/null
+++ b/user/spack/default-adelie-upstream-git.patch
@@ -0,0 +1,27 @@
+diff --git a/lib/spack/spack/cmd/clone.py b/lib/spack/spack/cmd/clone.py
+index ade3c2a739..610ef78ea1 100644
+--- a/lib/spack/spack/cmd/clone.py
++++ b/lib/spack/spack/cmd/clone.py
+@@ -12,7 +12,7 @@
+ import spack.util.git
+ from spack.util.executable import ProcessError
+
+-_SPACK_UPSTREAM = "https://github.com/spack/spack"
++_SPACK_UPSTREAM = "https://git.adelielinux.org/adelie/spack.git"
+
+ description = "create a new installation of spack in another prefix"
+ section = "admin"
+@@ -37,10 +37,10 @@ def get_origin_info(remote):
+ try:
+ branch = git("symbolic-ref", "--short", "HEAD", output=str)
+ except ProcessError:
+- branch = "develop"
++ branch = "adelie"
+ tty.warn("No branch found; using default branch: %s" % branch)
+- if remote == "origin" and branch not in ("master", "develop"):
+- branch = "develop"
++ if remote == "origin" and branch not in ("master", "develop", "adelie"):
++ branch = "adelie"
+ tty.warn("Unknown branch found; using default branch: %s" % branch)
+ try:
+ origin_url = git(
diff --git a/user/spack/default-config-unprivileged.patch b/user/spack/default-config-unprivileged.patch
deleted file mode 100644
index 802f98383..000000000
--- a/user/spack/default-config-unprivileged.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
diff --git a/user/spack/spack.post-install b/user/spack/spack.post-install
index 03e76cde4..e627b96da 100644
--- a/user/spack/spack.post-install
+++ b/user/spack/spack.post-install
@@ -19,7 +19,7 @@ cat <<EOF
*
* https://spack.readthedocs.io/
*
-
+*
* Report Adélie-specific Spack issues:
*
* https://git.adelielinux.org/adelie/spack/-/issues