Accepting request 879453 from network:cluster

OBS-URL: https://build.opensuse.org/request/show/879453
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/spack?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2021-03-17 19:16:03 +00:00 committed by Git OBS Bridge
commit b7033b694e
5 changed files with 108 additions and 22 deletions

View File

@ -0,0 +1,65 @@
From 03bf4e89802b626278a4b14b4349ee94aa722965 Mon Sep 17 00:00:00 2001
From: Christian Goll <cgoll@suse.de>
Date: Fri, 26 Feb 2021 14:21:04 +0100
Subject: [PATCH] basic exclude pattern for external find
---
lib/spack/spack/cmd/external.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py
index 52af72ed8f..ff583d9e87 100644
--- a/lib/spack/spack/cmd/external.py
+++ b/lib/spack/spack/cmd/external.py
@@ -42,6 +42,9 @@ def setup_parser(subparser):
'--scope', choices=scopes, metavar=scopes_metavar,
default=spack.config.default_modify_scope('packages'),
help="configuration scope to modify")
+ find_parser.add_argument(
+ '--exclude',
+ help="do not call binaries with this regular pattern for the search")
find_parser.add_argument('packages', nargs=argparse.REMAINDER)
sp.add_parser(
@@ -153,7 +156,7 @@ def external_find(args):
else:
packages_to_check = spack.repo.path.all_packages()
- pkg_to_entries = _get_external_packages(packages_to_check)
+ pkg_to_entries = _get_external_packages(packages_to_check,args.exclude)
new_entries = _update_pkg_config(
args.scope, pkg_to_entries, args.not_buildable
)
@@ -236,7 +239,7 @@ def _update_pkg_config(scope, pkg_to_entries, not_buildable):
return all_new_specs
-def _get_external_packages(packages_to_check, system_path_to_exe=None):
+def _get_external_packages(packages_to_check,exclude_binaries=None, system_path_to_exe=None):
if not system_path_to_exe:
system_path_to_exe = _get_system_executables()
@@ -247,12 +250,17 @@ def _get_external_packages(packages_to_check, system_path_to_exe=None):
exe_pattern_to_pkgs[exe].append(pkg)
pkg_to_found_exes = defaultdict(set)
+ if exclude_binaries:
+ compiled_exclude = re.compile(exclude_binaries)
+ else:
+ compiled_exclude = None
for exe_pattern, pkgs in exe_pattern_to_pkgs.items():
compiled_re = re.compile(exe_pattern)
for path, exe in system_path_to_exe.items():
- if compiled_re.search(exe):
- for pkg in pkgs:
- pkg_to_found_exes[pkg].add(path)
+ if not compiled_exclude or not compiled_exclude.search(exe):
+ if compiled_re.search(exe):
+ for pkg in pkgs:
+ pkg_to_found_exes[pkg].add(path)
pkg_to_entries = defaultdict(list)
resolved_specs = {} # spec -> exe found for the spec
--
2.26.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:064b2532c70916c7684d4c7c973416ac32dd2ea15f5c392654c75258bfc8c6c2
size 5512800

3
spack-0.16.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d893036b24d9ee0feee41ac33dd66e4fc68d392918f346f8a7a36a69c567567
size 5528986

View File

@ -4,6 +4,28 @@ Fri Feb 26 22:06:36 UTC 2021 - Egbert Eich <eich@suse.com>
- Remove BuildRequires for patterns-base-basesystem and - Remove BuildRequires for patterns-base-basesystem and
distribution-release. distribution-release.
-------------------------------------------------------------------
Fri Feb 26 10:40:00 UTC 2021 - Christian Goll <cgoll@suse.com>
- update to version 0.16.1
* intel-oneapi support through new packages
* HIP/ROCm support (#19715, #20095)
* concretization enhancements
* environment install reporting fix (#20004)
* avoid import in ABI compatibility info (#20236)
* restore ability of dev-build to skip patches (#20351)
* spack find -d spec grouping (#20028)
* spack smoke test support (#19987, #20298)
* abstract spec comparisons (#20341)
* performance improvements for binary relocation (#19690, #20768)
* additional sanity checks for variants in builtin packages (#20373)
* do not pollute auto-generated configuration files with empty lists or
dicts
- added file: basic-exclude-pattern-for-external-find.patch
* adds the functionality to exclude binaries for external search
so that the call 'installdbgsymbols' can be prohibited as this
leads to an endless loop when drkonqui is installed
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 4 06:54:13 UTC 2021 - Egbert Eich <eich@suse.com> Thu Feb 4 06:54:13 UTC 2021 - Egbert Eich <eich@suse.com>

View File

@ -36,7 +36,7 @@ ExclusiveArch: do_not_build
# non oss packages # non oss packages
%define spack_trigger_external cuda-nvcc %define spack_trigger_external cuda-nvcc
Name: spack Name: spack
Version: 0.16.0 Version: 0.16.1
Release: 0 Release: 0
Summary: Package manager for HPC systems Summary: Package manager for HPC systems
License: Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause License: Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause
@ -51,6 +51,7 @@ Patch3: added-dockerfile-for-opensuse-leap-15.patch
Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch
Patch5: Fix-documentation-so-that-parser-doesn-t-stumble.patch Patch5: Fix-documentation-so-that-parser-doesn-t-stumble.patch
Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.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 # upstream patch removes also problemtatic binaries
#Patch4: spack-test-15702.patch #Patch4: spack-test-15702.patch
%if %{without doc} %if %{without doc}
@ -68,8 +69,8 @@ Requires: lua-lmod
Requires: polkit Requires: polkit
Requires: spack-recipes Requires: spack-recipes
Requires: xz Requires: xz
Recommends: spack-recipes = %version
Recommends: %spack_trigger_recommended Recommends: %spack_trigger_recommended
Recommends: spack-recipes = %version
%else %else
BuildRequires: %{python_module Sphinx >= 1.8} BuildRequires: %{python_module Sphinx >= 1.8}
BuildRequires: %{python_module sphinxcontrib-programoutput} BuildRequires: %{python_module sphinxcontrib-programoutput}
@ -100,7 +101,6 @@ using different compilers, options, and MPI implementations.
This package provides a module file that must be loaded to use spack. This package provides a module file that must be loaded to use spack.
%package recipes %package recipes
Summary: Spack built-in package recipes Summary: Spack built-in package recipes
Requires: %{name} >= %version Requires: %{name} >= %version
@ -146,7 +146,6 @@ using different compilers, options, and MPI implementations.
This package contains the info page. This package contains the info page.
%prep %prep
%setup -q %setup -q
%autopatch -p1 %autopatch -p1
@ -381,15 +380,15 @@ if [ -e /etc/os-release ] ; then
fi fi
sed -i "s@HOSTTYPE@$HOSTTYPE@" %{spack_dir}/etc/spack/compilers.yaml sed -i "s@HOSTTYPE@$HOSTTYPE@" %{spack_dir}/etc/spack/compilers.yaml
# find installed programms # find installed programms
test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system --exclude 'installdbgsymbols'
%triggerin -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external} %triggerin -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external}
test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system --exclude 'installdbgsymbols'
test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install" test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install"
%triggerpostun -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external} %triggerpostun -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external}
test -e %{_sysconfdir}/spack/no_rpm_trigger || rm /etc/spack/packages.yaml test -e %{_sysconfdir}/spack/no_rpm_trigger || rm /etc/spack/packages.yaml
test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system --exclude 'installdbgsymbols'
test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install" test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install"
%if %{without doc} %if %{without doc}