From 58b0f1d66dc301ba5bae1c14c34b3087511ee382719a9c7a3625e701d9133aea Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Tue, 6 Jul 2021 14:49:33 +0000 Subject: [PATCH 1/3] Accepting request 904401 from home:mslacken:sp - removed Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch as this fixes bsc#1188040 >>>>>>> ./spack.changes.r935baeb217850b583c41a8f55bbd82e3 OBS-URL: https://build.opensuse.org/request/show/904401 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=25 --- ...ld-due-to-recursive-module-inclusion.patch | 40 ------------------- spack.changes | 8 ++++ spack.spec | 4 -- 3 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch diff --git a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch deleted file mode 100644 index 7cb9f6c..0000000 --- a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Egbert Eich -Date: Thu Feb 4 09:17:55 2021 +0100 -Subject: Fix error during documentation build due to recursive module inclusion -Patch-mainline: Not yet -Git-commit: 7102b892cfc6e0697b658f35b7774a03bd1c42e9 -References: - -Signed-off-by: Egbert Eich ---- - lib/spack/spack/user_environment.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py -index f08f21e..0da6c43 100644 ---- a/lib/spack/spack/user_environment.py -+++ b/lib/spack/spack/user_environment.py -@@ -8,7 +8,7 @@ - import spack.config - import spack.util.prefix as prefix - import spack.util.environment as environment --import spack.build_environment as build_env -+import spack.build_environment - - #: Environment variable name Spack uses to track individually loaded packages - spack_loaded_hashes_var = 'SPACK_LOADED_HASHES' -@@ -85,13 +85,13 @@ def environment_modifications_for_spec(spec, view=None): - # Let the extendee/dependency modify their extensions/dependents - # before asking for package-specific modifications - env.extend( -- build_env.modifications_from_dependencies( -+ build_environment.modifications_from_dependencies( - spec, context='run' - ) - ) - - # Package specific modifications -- build_env.set_module_variables_for_package(spec.package) -+ build_environment.set_module_variables_for_package(spec.package) - spec.package.setup_run_environment(env) - - return env diff --git a/spack.changes b/spack.changes index 7176ce7..8769ae5 100644 --- a/spack.changes +++ b/spack.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jul 6 14:32:07 UTC 2021 - Christian Goll + +- removed + Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + as this fixes bsc#1188040 + ------------------------------------------------------------------- Wed Jun 2 14:04:26 UTC 2021 - Antoine Ginies @@ -34,6 +41,7 @@ Mon May 3 06:34:46 UTC 2021 - Egbert Eich - Add alternative c++ & fortran compilers to the triggers list. ------------------------------------------------------------------- +>>>>>>> ./spack.changes.r935baeb217850b583c41a8f55bbd82e3 Tue Mar 30 14:31:26 UTC 2021 - Christian Goll - added run-find-external.sh which calls the command in post diff --git a/spack.spec b/spack.spec index 033695c..27d0005 100644 --- a/spack.spec +++ b/spack.spec @@ -51,7 +51,6 @@ Patch2: Adapt-shell-scripts-that-set-up-the-environment-for-different-sh Patch3: added-dockerfile-for-opensuse-leap-15.patch Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch Patch5: Fix-documentation-so-that-parser-doesn-t-stumble.patch -Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch Patch7: basic-exclude-pattern-for-external-find.patch # upstream patch removes also problemtatic binaries #Patch4: spack-test-15702.patch @@ -252,9 +251,6 @@ sed -i 's@\(\ssource_cache:\).*@\1 /var/tmp/$user/spack-cache@' %{buildroot}%{_s sed -i 's@\(\stcl:\).*@\1 ~/spack/modules@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml sed -i 's@\(\slmod:\).*@\1 ~/spack/lmod@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml cat >> %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml < Date: Tue, 6 Jul 2021 21:48:15 +0000 Subject: [PATCH 2/3] - Fix patch Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch to actually work correctly. - Remove duplicates in spec file. OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=26 --- ...ld-due-to-recursive-module-inclusion.patch | 40 +++++++++++++++++++ spack.changes | 10 ++--- spack.spec | 1 - 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch diff --git a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch new file mode 100644 index 0000000..95e0bfe --- /dev/null +++ b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch @@ -0,0 +1,40 @@ +From: Egbert Eich +Date: Thu Feb 4 09:17:55 2021 +0100 +Subject: Fix error during documentation build due to recursive module inclusion +Patch-mainline: Not yet +Git-commit: 7102b892cfc6e0697b658f35b7774a03bd1c42e9 +References: + +Signed-off-by: Egbert Eich +--- + lib/spack/spack/user_environment.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) +diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py +index f08f21e..0da6c43 100644 +--- a/lib/spack/spack/user_environment.py ++++ b/lib/spack/spack/user_environment.py +@@ -8,7 +8,7 @@ + import spack.config + import spack.util.prefix as prefix + import spack.util.environment as environment +-import spack.build_environment as build_env ++import spack.build_environment + + #: Environment variable name Spack uses to track individually loaded packages + spack_loaded_hashes_var = 'SPACK_LOADED_HASHES' +@@ -85,13 +85,13 @@ def environment_modifications_for_spec(spec, view=None): + # Let the extendee/dependency modify their extensions/dependents + # before asking for package-specific modifications + env.extend( +- build_env.modifications_from_dependencies( ++ spack.build_environment.modifications_from_dependencies( + spec, context='run' + ) + ) + + # Package specific modifications +- build_env.set_module_variables_for_package(spec.package) ++ spack.build_environment.set_module_variables_for_package(spec.package) + spec.package.setup_run_environment(env) + + return env diff --git a/spack.changes b/spack.changes index 8769ae5..b432cf3 100644 --- a/spack.changes +++ b/spack.changes @@ -1,9 +1,10 @@ ------------------------------------------------------------------- -Tue Jul 6 14:32:07 UTC 2021 - Christian Goll +Tue Jul 6 21:45:21 UTC 2021 - Egbert Eich -- removed - Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch - as this fixes bsc#1188040 +- Fix patch + Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + to actually work correctly. +- Remove duplicates in spec file. ------------------------------------------------------------------- Wed Jun 2 14:04:26 UTC 2021 - Antoine Ginies @@ -41,7 +42,6 @@ Mon May 3 06:34:46 UTC 2021 - Egbert Eich - Add alternative c++ & fortran compilers to the triggers list. ------------------------------------------------------------------- ->>>>>>> ./spack.changes.r935baeb217850b583c41a8f55bbd82e3 Tue Mar 30 14:31:26 UTC 2021 - Christian Goll - added run-find-external.sh which calls the command in post diff --git a/spack.spec b/spack.spec index 27d0005..fd6bd1c 100644 --- a/spack.spec +++ b/spack.spec @@ -71,7 +71,6 @@ Requires: libbz2-devel Requires: lua-lmod Requires: patch Requires: polkit -Requires: spack-recipes Requires: sudo Requires: xz Recommends: %spack_trigger_recommended From a5033cf7d12166d842a148ede6d79f1a91b99c6292522085423a6c90d795622f Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 7 Jul 2021 16:05:08 +0000 Subject: [PATCH 3/3] Accepting request 904602 from home:eeich:branches:network:cluster The updated version makes sure modules are not called recursively even if modules are loaded in an out-of-order fashion from python-Sphinx. OBS-URL: https://build.opensuse.org/request/show/904602 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=27 --- ...ld-due-to-recursive-module-inclusion.patch | 74 +++++++++++++------ spack.changes | 2 + spack.spec | 1 + 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch index 95e0bfe..c98abf0 100644 --- a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch +++ b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch @@ -2,39 +2,69 @@ From: Egbert Eich Date: Thu Feb 4 09:17:55 2021 +0100 Subject: Fix error during documentation build due to recursive module inclusion Patch-mainline: Not yet -Git-commit: 7102b892cfc6e0697b658f35b7774a03bd1c42e9 +Git-commit: 0239763866f506f34357b30e9d882d1e8a87211e References: Signed-off-by: Egbert Eich --- - lib/spack/spack/user_environment.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + lib/spack/spack/build_environment.py | 3 ++- + lib/spack/spack/environment.py | 3 ++- + lib/spack/spack/main.py | 3 ++- + lib/spack/spack/user_environment.py | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) +diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py +index 3cf02dc..afd34c0 100644 +--- a/lib/spack/spack/build_environment.py ++++ b/lib/spack/spack/build_environment.py +@@ -51,7 +51,8 @@ + import spack.build_systems.cmake + import spack.build_systems.meson + import spack.config +-import spack.main ++if not ( "spack.main" in sys.modules ): ++ import spack.main + import spack.paths + import spack.package + import spack.repo +diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py +index 7f7625f..e48929e 100644 +--- a/lib/spack/spack/environment.py ++++ b/lib/spack/spack/environment.py +@@ -30,7 +30,8 @@ + import spack.util.spack_json as sjson + import spack.util.spack_yaml as syaml + import spack.config +-import spack.user_environment as uenv ++if not ( "spack.user_environment" in sys.modules ): ++ import spack.user_environment as uenv + from spack.filesystem_view import YamlFilesystemView + import spack.util.environment + import spack.architecture as architecture +diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py +index f4265a5..494a9ce 100644 +--- a/lib/spack/spack/main.py ++++ b/lib/spack/spack/main.py +@@ -31,7 +31,8 @@ + import spack.architecture + import spack.config + import spack.cmd +-import spack.environment as ev ++if not ( "spack.environment" in sys.modules ): ++ import spack.environment as ev + import spack.paths + import spack.repo + import spack.store diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py -index f08f21e..0da6c43 100644 +index f08f21e..8925246 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py -@@ -8,7 +8,7 @@ +@@ -8,7 +8,8 @@ import spack.config import spack.util.prefix as prefix import spack.util.environment as environment -import spack.build_environment as build_env -+import spack.build_environment ++if not ( "spack.build_environment" in sys.modules ): ++ import spack.build_environment as build_env #: Environment variable name Spack uses to track individually loaded packages spack_loaded_hashes_var = 'SPACK_LOADED_HASHES' -@@ -85,13 +85,13 @@ def environment_modifications_for_spec(spec, view=None): - # Let the extendee/dependency modify their extensions/dependents - # before asking for package-specific modifications - env.extend( -- build_env.modifications_from_dependencies( -+ spack.build_environment.modifications_from_dependencies( - spec, context='run' - ) - ) - - # Package specific modifications -- build_env.set_module_variables_for_package(spec.package) -+ spack.build_environment.set_module_variables_for_package(spec.package) - spec.package.setup_run_environment(env) - - return env diff --git a/spack.changes b/spack.changes index b432cf3..af6d299 100644 --- a/spack.changes +++ b/spack.changes @@ -4,6 +4,8 @@ Tue Jul 6 21:45:21 UTC 2021 - Egbert Eich - Fix patch Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch to actually work correctly. + The updated version makes sure modules are not called recursively even + if modules are loaded in an out-of-order fashion from python-Sphinx. - Remove duplicates in spec file. ------------------------------------------------------------------- diff --git a/spack.spec b/spack.spec index fd6bd1c..939d404 100644 --- a/spack.spec +++ b/spack.spec @@ -51,6 +51,7 @@ Patch2: Adapt-shell-scripts-that-set-up-the-environment-for-different-sh Patch3: added-dockerfile-for-opensuse-leap-15.patch Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch Patch5: Fix-documentation-so-that-parser-doesn-t-stumble.patch +Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch Patch7: basic-exclude-pattern-for-external-find.patch # upstream patch removes also problemtatic binaries #Patch4: spack-test-15702.patch