diff --git a/Make-spack-paths-compliant-to-distro-installation.patch b/Make-spack-paths-compliant-to-distro-installation.patch index 81fc2f3..ca53956 100644 --- a/Make-spack-paths-compliant-to-distro-installation.patch +++ b/Make-spack-paths-compliant-to-distro-installation.patch @@ -1,7 +1,9 @@ -From e7bbc251529786e68297c8aac700358ab1fb5c14 Mon Sep 17 00:00:00 2001 From: Egbert Eich -Date: Wed, 10 Nov 2021 09:40:07 +0100 -Subject: [PATCH] Make spack paths compliant to distro installation +Date: Wed Jan 11 14:30:19 2023 +0100 +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 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 var_path -> /var/lib/spack opt_path -> /opt/spack +repo_path -> /usr/share/spack/repos Signed-off-by: Egbert Eich Signed-off-by: Egbert Eich --- - lib/spack/spack/paths.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - + lib/spack/spack/paths.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) 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 +++ b/lib/spack/spack/paths.py @@ -41,7 +41,7 @@ @@ -29,15 +31,16 @@ index fc617342e8..c733da2286 100644 share_path = os.path.join(prefix, "share", "spack") etc_path = os.path.join(prefix, "etc", "spack") -@@ -53,7 +53,7 @@ +@@ -53,10 +53,10 @@ # # Things in $spack/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 - repos_path = os.path.join(var_path, "repos") --- -2.35.3 - +-repos_path = os.path.join(var_path, "repos") ++repos_path = os.path.join(share_path, "repos") + packages_path = os.path.join(repos_path, "builtin") + mock_packages_path = os.path.join(repos_path, "builtin.mock") + diff --git a/spack.changes b/spack.changes index 09ab9d6..f2da53b 100644 --- a/spack.changes +++ b/spack.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 11 13:04:37 UTC 2023 - Egbert Eich + +- 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 diff --git a/spack.spec b/spack.spec index 1f530e3..1e6a8b3 100644 --- a/spack.spec +++ b/spack.spec @@ -1,7 +1,7 @@ # # 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 # 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 rm -f 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 rm -f share/spack/setup-tutorial-env.sh # 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 share/spack/* %{buildroot}%{_datarootdir}/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/spack* %{buildroot}%{_bindir}/ 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 # Remove problematic binaries which are removed upstream with # 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 %sysusers_generate_pre system-group-%{name}.conf %{name} system-group-%{name}.conf @@ -477,6 +476,7 @@ chmod 0775 /opt/spack %{_localstatedir}/cache/spack %{_localstatedir}/lib/spack %{_datarootdir}/spack +%exclude %{_datarootdir}/spack/repos %config %{_sysconfdir}/profile.d/spack.sh %ghost %config %{_sysconfdir}/spack/packages.yaml %config %{_sysconfdir}/profile.d/spack.csh @@ -485,12 +485,11 @@ chmod 0775 /opt/spack %config %{_sysconfdir}/skel/.spack/modules.yaml # repos directory is installed in -recipes %{_sysusersdir}/system-group-%{name}.conf -%exclude %{_localstatedir}/lib/spack/repos %files recipes %license COPYRIGHT LICENSE-APACHE LICENSE-MIT %doc CHANGELOG.md NOTICE README.md -%{_localstatedir}/lib/spack/repos +%{_datarootdir}/spack/repos %else