Accepting request 1057809 from home:eeich:branches:network:cluster

- Fix var_path: this regression was introduced with the update
  to the 0.19.0 release (boo#1207053).
- Move repos to /usr/share/spack: /var is strictly for local data.

OBS-URL: https://build.opensuse.org/request/show/1057809
OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=54
This commit is contained in:
Egbert Eich 2023-01-11 14:53:34 +00:00 committed by Git OBS Bridge
parent 0559024238
commit 7c56f86278
3 changed files with 29 additions and 20 deletions

View File

@ -1,7 +1,9 @@
From e7bbc251529786e68297c8aac700358ab1fb5c14 Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich@suse.com> From: Egbert Eich <eich@suse.com>
Date: Wed, 10 Nov 2021 09:40:07 +0100 Date: Wed Jan 11 14:30:19 2023 +0100
Subject: [PATCH] Make spack paths compliant to distro installation Subject: Make spack paths compliant to distro installation
Patch-mainline: Not yet
Git-commit: c74fb7ed42aa94609c8cc8c005b004357307bb34
References:
Spack is particular about the choice of 'prefix' which will Spack is particular about the choice of 'prefix' which will
replace $spack. 'prefix' is the 4th ancestor of paths.py, so replace $spack. 'prefix' is the 4th ancestor of paths.py, so
@ -9,15 +11,15 @@ it is relative to the spack installation.
This will only change the coded setups of This will only change the coded setups of
var_path -> /var/lib/spack var_path -> /var/lib/spack
opt_path -> /opt/spack opt_path -> /opt/spack
repo_path -> /usr/share/spack/repos
Signed-off-by: Egbert Eich <eich@suse.com> Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Egbert Eich <eich@suse.de>
--- ---
lib/spack/spack/paths.py | 4 ++-- lib/spack/spack/paths.py | 6 +++---
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py
index fc617342e8..c733da2286 100644 index f03f6eb1..914aea93 100644
--- a/lib/spack/spack/paths.py --- a/lib/spack/spack/paths.py
+++ b/lib/spack/spack/paths.py +++ b/lib/spack/spack/paths.py
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
@ -29,15 +31,16 @@ index fc617342e8..c733da2286 100644
share_path = os.path.join(prefix, "share", "spack") share_path = os.path.join(prefix, "share", "spack")
etc_path = os.path.join(prefix, "etc", "spack") etc_path = os.path.join(prefix, "etc", "spack")
@@ -53,7 +53,7 @@ @@ -53,10 +53,10 @@
# #
# Things in $spack/var/spack # Things in $spack/var/spack
# #
-var_path = os.path.join(prefix, "var", "spack") -var_path = os.path.join(prefix, "var", "spack")
+var_path = os.path.join("/", "var", "spack") +var_path = os.path.join("/", "var", "lib", "spack")
# read-only things in $spack/var/spack # read-only things in $spack/var/spack
repos_path = os.path.join(var_path, "repos") -repos_path = os.path.join(var_path, "repos")
-- +repos_path = os.path.join(share_path, "repos")
2.35.3 packages_path = os.path.join(repos_path, "builtin")
mock_packages_path = os.path.join(repos_path, "builtin.mock")

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jan 11 13:04:37 UTC 2023 - Egbert Eich <eich@suse.com>
- Fix var_path: this regression was introduced with the update
to the 0.19.0 release (boo#1207053).
- Move repos to /usr/share/spack: /var is strictly for local data.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 22 11:16:26 UTC 2022 - Christian Goll <cgoll@suse.com> Tue Nov 22 11:16:26 UTC 2022 - Christian Goll <cgoll@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package spack # spec file for package spack
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -256,9 +256,6 @@ find . -type f -name .gitlab-ci.yml -delete
# Fix _spack_root link # Fix _spack_root link
rm -f lib/spack/docs/_spack_root rm -f lib/spack/docs/_spack_root
ln -sf ../.. lib/spack/docs/_spack_root ln -sf ../.. lib/spack/docs/_spack_root
# Do not ship Docker and container building for now - needs fixing
rm -rf share/spack/{templates/container}
rm -rf share/spack/docker/{centos,ubuntu}*.dockerfile
# Do not ship AWS specifics # Do not ship AWS specifics
rm -f share/spack/setup-tutorial-env.sh rm -f share/spack/setup-tutorial-env.sh
# Fix rpmlint warnings # Fix rpmlint warnings
@ -288,6 +285,8 @@ cp -r etc %{buildroot}%{_prefix}
cp -r lib/spack/{env,external,llnl,spack,spack_installable} %{buildroot}%{spack_dir} cp -r lib/spack/{env,external,llnl,spack,spack_installable} %{buildroot}%{spack_dir}
cp -r share/spack/* %{buildroot}%{_datarootdir}/spack cp -r share/spack/* %{buildroot}%{_datarootdir}/spack
cp -r var/spack/* %{buildroot}%{_localstatedir}/lib/spack cp -r var/spack/* %{buildroot}%{_localstatedir}/lib/spack
# No repos in /var
mv %{buildroot}%{_localstatedir}/lib/spack/repos %{buildroot}%{_datarootdir}/spack
cp -r bin/sbang %{buildroot}/%{_bindir} cp -r bin/sbang %{buildroot}/%{_bindir}
cp -r bin/spack* %{buildroot}%{_bindir}/ cp -r bin/spack* %{buildroot}%{_bindir}/
cp etc/spack/defaults/config.yaml %{buildroot}%{_sysconfdir}/skel/.spack/ cp etc/spack/defaults/config.yaml %{buildroot}%{_sysconfdir}/skel/.spack/
@ -407,7 +406,7 @@ rm -f %{buildroot}%{_localstatedir}/lib/spack/cache
ln -sf %{_localstatedir}/cache/spack %{buildroot}%{_localstatedir}/lib/spack/cache ln -sf %{_localstatedir}/cache/spack %{buildroot}%{_localstatedir}/lib/spack/cache
# Remove problematic binaries which are removed upstream with # Remove problematic binaries which are removed upstream with
# 0889be20e0d9dcdf4346cdeaa0647285187375f3 # 0889be20e0d9dcdf4346cdeaa0647285187375f3
rm -r %{buildroot}%{_localstatedir}/lib/spack/repos/builtin/packages/patchelf/test/ rm -r %{buildroot}%{_datarootdir}/spack/repos/builtin/packages/patchelf/test/
echo "g %{name} -" > system-group-%{name}.conf echo "g %{name} -" > system-group-%{name}.conf
%sysusers_generate_pre system-group-%{name}.conf %{name} system-group-%{name}.conf %sysusers_generate_pre system-group-%{name}.conf %{name} system-group-%{name}.conf
@ -477,6 +476,7 @@ chmod 0775 /opt/spack
%{_localstatedir}/cache/spack %{_localstatedir}/cache/spack
%{_localstatedir}/lib/spack %{_localstatedir}/lib/spack
%{_datarootdir}/spack %{_datarootdir}/spack
%exclude %{_datarootdir}/spack/repos
%config %{_sysconfdir}/profile.d/spack.sh %config %{_sysconfdir}/profile.d/spack.sh
%ghost %config %{_sysconfdir}/spack/packages.yaml %ghost %config %{_sysconfdir}/spack/packages.yaml
%config %{_sysconfdir}/profile.d/spack.csh %config %{_sysconfdir}/profile.d/spack.csh
@ -485,12 +485,11 @@ chmod 0775 /opt/spack
%config %{_sysconfdir}/skel/.spack/modules.yaml %config %{_sysconfdir}/skel/.spack/modules.yaml
# repos directory is installed in -recipes # repos directory is installed in -recipes
%{_sysusersdir}/system-group-%{name}.conf %{_sysusersdir}/system-group-%{name}.conf
%exclude %{_localstatedir}/lib/spack/repos
%files recipes %files recipes
%license COPYRIGHT LICENSE-APACHE LICENSE-MIT %license COPYRIGHT LICENSE-APACHE LICENSE-MIT
%doc CHANGELOG.md NOTICE README.md %doc CHANGELOG.md NOTICE README.md
%{_localstatedir}/lib/spack/repos %{_datarootdir}/spack/repos
%else %else