From 54c78748bebb8609680b0d364680112584e43a2d88280160abca6b9e5af453d7 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Wed, 27 Sep 2017 07:33:00 +0000 Subject: [PATCH 1/2] - Add %{?hpc_ext} to install path to allow multiple flavor installs OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=5 --- dlinfo.c | 27 ----------------- hpc_elf.attr | 5 --- hpc_elf.pl | 79 ------------------------------------------------ hpc_elflib.attr | 5 --- macros.hpc | 2 +- suse-hpc.changes | 5 +++ suse-hpc.spec | 5 ++- 7 files changed, 8 insertions(+), 120 deletions(-) delete mode 100644 dlinfo.c delete mode 100644 hpc_elf.attr delete mode 100644 hpc_elf.pl delete mode 100644 hpc_elflib.attr diff --git a/dlinfo.c b/dlinfo.c deleted file mode 100644 index cfe3f3e..0000000 --- a/dlinfo.c +++ /dev/null @@ -1,27 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include - -int -main(int argc, char *argv[]) -{ - void *dlh; - struct link_map *linkmap; - - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - exit(EXIT_FAILURE); - } - - if ((dlh = dlopen(argv[1], RTLD_NOW)) == NULL) - exit(EXIT_FAILURE); - - if (dlinfo(dlh, RTLD_DI_LINKMAP, &linkmap) == -1) - exit(EXIT_FAILURE); - - printf("%s\n",linkmap->l_name); - - exit(EXIT_SUCCESS); -} diff --git a/hpc_elf.attr b/hpc_elf.attr deleted file mode 100644 index 699960d..0000000 --- a/hpc_elf.attr +++ /dev/null @@ -1,5 +0,0 @@ -%__hpc_elf_provides %{_rpmconfigdir}/hpc_elf.pl --provides %{?__filter_GLIBC_PRIVATE:--filter-private} %{?hpc_dep_gen_attr} -%__hpc_elf_requires %{_rpmconfigdir}/hpc_elf.pl --requires %{?__filter_GLIBC_PRIVATE:--filter-private} %{?hpc_dep_gen_attr} -%__hpc_elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable -%__hpc_elf_path %hpc_prefix -%__hpc_elf_flags exeonly diff --git a/hpc_elf.pl b/hpc_elf.pl deleted file mode 100644 index 4383c8c..0000000 --- a/hpc_elf.pl +++ /dev/null @@ -1,79 +0,0 @@ -#! /usr/bin/perl - -use Cwd 'abs_path'; -use File::Basename; - -$dir=dirname(abs_path($0)); - - -$command=$dir . "/elfdeps"; -$dlinfo=$dir . "/dlinfo"; -$arglist = ""; - -sub usage { - my $message = <))) { - $line =~ /([^\(]+)(.*)/; - $libs{$1}{$2} = 1; -} - -foreach $lib ( keys %libs ) { - $full=`$dlinfo $lib`; - if (!$full) { - delete $libs{$lib}; - } -} -foreach $lib ( keys %libs ) { - foreach $key ( keys %{ $libs{$lib} } ) { - print "$lib$key\n"; - } -} - diff --git a/hpc_elflib.attr b/hpc_elflib.attr deleted file mode 100644 index 8518a89..0000000 --- a/hpc_elflib.attr +++ /dev/null @@ -1,5 +0,0 @@ -%__hpc_elflib_provides %{_rpmconfigdir}/hpc_elf.pl --provides --assume-exec %{?__filter_GLIBC_PRIVATE:--filter-private} %{?hpc_dep_gen_attr} -%__hpc_elflib_requires %{_rpmconfigdir}/hpc_elf.pl --requires --assume-exec %{?__filter_GLIBC_PRIVATE:--filter-private} %{?hpc_dep_gen_attr} -%__hpc_elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable -%__hpc_elflib_path ^%hpc_prefix -%__hpc_elflib_flags exeonly diff --git a/macros.hpc b/macros.hpc index 5905839..41f8304 100644 --- a/macros.hpc +++ b/macros.hpc @@ -18,7 +18,7 @@ # For mpi libraries %hpc_mpi_install_base %{hpc_base}%{?hpc_cf_dir}mpi/ -%hpc_mpi_install_path_base %{hpc_mpi_install_base}%{hpc_mpi_family}/ +%hpc_mpi_install_path_base %{hpc_mpi_install_base}%{hpc_mpi_family}%{?hpc_ext}/ %hpc_mpi_install_path %{hpc_mpi_install_path_base}%{version} # Different paths - below HPC directory diff --git a/suse-hpc.changes b/suse-hpc.changes index 21f4fe4..91e4ab6 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 21 15:10:29 UTC 2017 - nmoreychaisemartin@suse.com + +- Add %{?hpc_ext} to install path to allow multiple flavor installs + ------------------------------------------------------------------- Wed Sep 13 19:27:49 UTC 2017 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index f23981f..60e29eb 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -1,5 +1,5 @@ # -# spec file for package suse_hpc +# spec file for package suse-hpc # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # @@ -28,7 +28,7 @@ Source2: hpc_elf.pl Source3: hpc_elf.attr Source4: hpc_elflib.attr Source5: LICENSE -Url: http://www.suse.com/hpc +Url: http://www.suse.com/hpc BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -57,5 +57,4 @@ cp %{S:5} . %{_rpmconfigdir}/hpc_elf.pl %{_rpmconfigdir}/fileattrs/* - %changelog From a4fd24f1e1c376ad3081866f963c2e29886e198ae8ef39e284c4ef3a0cd36514 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Wed, 4 Oct 2017 11:09:55 +0000 Subject: [PATCH 2/2] Accepting request 531169 from science:HPC:EnvMod - Add more documentation. - Fix LICENSE and copyright statement in LICENSE. OBS-URL: https://build.opensuse.org/request/show/531169 OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=6 --- LICENSE | 8 +++++--- macros.hpc | 12 ++++++++++++ suse-hpc.changes | 6 ++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index ef7e252..eb89d5a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,5 @@ +Copyright © 2017 openSUSE Project + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,9 +11,9 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of Novell nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/macros.hpc b/macros.hpc index 41f8304..8434843 100644 --- a/macros.hpc +++ b/macros.hpc @@ -416,12 +416,23 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version %_hpc_python_sysconfig_path() %(%1 -c "import sysconfig as s; \\\ print(s.get_paths(%{?3:vars={'platbase':\\"%3\\", 'base' : \\"%3\\"}}).get('%2'));") +# get the python version specific directory for arch specific files in the HPC +# directory structure. %hpc_python_sitearch %{_hpc_python_sysconfig_path %python_flavor platlib %{?hpc_prefix}} %_hpc_python_ver() %(%1 -c "import sys as s;print(s.version[:3]);") +# get the (abbreviated_) pythin version used for package and directory names. %hpc_python_version %{_hpc_python_ver %python_flavor} +# %{hpc_python_master_package [-n ] [-g ] [-l][-L][-a]} +# -n: specify a package name +# -g: specify a group name +# -l: mark the package as library package +# -L: (for environment modules) create a link from the +# `.version.` file to the `.version`-file to +# mark the default version. +# -a: mark package as architecture dependent %hpc_python_master_package(n:g:lLa) \ %{?_python_macro_init} \ %{lua: \ @@ -483,6 +494,7 @@ The package %{n_name}%{_p_ext} provides the dependency to get the latest version # # man pages # +# %{hpc_compress_man } compress man page in %hpc_mandir/man %hpc_compress_man() \ [ -n "%{*}" ] || { echo "no man page list!" >&2 ; exit 1; } \ for j in %{*}; do \ diff --git a/suse-hpc.changes b/suse-hpc.changes index 91e4ab6..6102fc0 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 4 08:15:18 UTC 2017 - eich@suse.com + +- Add more documentation. +- Fix LICENSE and copyright statement in LICENSE. + ------------------------------------------------------------------- Thu Sep 21 15:10:29 UTC 2017 - nmoreychaisemartin@suse.com