- 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
This commit is contained in:
parent
41ac4d7eb4
commit
54c78748be
27
dlinfo.c
27
dlinfo.c
@ -1,27 +0,0 @@
|
|||||||
#define _GNU_SOURCE
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#include <link.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
void *dlh;
|
|
||||||
struct link_map *linkmap;
|
|
||||||
|
|
||||||
if (argc != 2) {
|
|
||||||
fprintf(stderr, "Usage: %s <library>\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);
|
|
||||||
}
|
|
@ -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
|
|
79
hpc_elf.pl
79
hpc_elf.pl
@ -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 = <<EOF;
|
|
||||||
Usage: $0 [-?] [-P|--provides] [-R|--requires] [--filter-private]
|
|
||||||
[--soname-only] [--no-fake-soname] [--assume-exec] [-?|--help]
|
|
||||||
[--usage]
|
|
||||||
EOF
|
|
||||||
print $message;
|
|
||||||
exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub help {
|
|
||||||
my $message = <<EOF;
|
|
||||||
Usage: $0 [OPTION...]
|
|
||||||
-P, --provides
|
|
||||||
-R, --requires
|
|
||||||
--filter-private
|
|
||||||
--soname-only
|
|
||||||
--no-fake-soname
|
|
||||||
--assume-exec
|
|
||||||
|
|
||||||
Help options:
|
|
||||||
-?, --help Show this help message
|
|
||||||
--usage Display brief usage message
|
|
||||||
EOF
|
|
||||||
print $message;
|
|
||||||
exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
while ( $a = shift @ARGV ) {
|
|
||||||
if ( $a =~ /--assume-exec/ ||
|
|
||||||
$a =~ /--provides/ ||
|
|
||||||
$a =~ /-P/ ||
|
|
||||||
$a =~ /--requires/ ||
|
|
||||||
$a =~ /-R/ ||
|
|
||||||
$a =~ /--filter-private/ ||
|
|
||||||
$a =~ /--soname-only/ ||
|
|
||||||
$a =~ /--no-fake-soname/ ||
|
|
||||||
$a =~ /--filter-private/ ) {
|
|
||||||
$arglist .= " " . $a;
|
|
||||||
} elsif ( $a =~ /--help/ || $a =~ /-?/ ) {
|
|
||||||
help;
|
|
||||||
} elsif ( $a =~ /--usage/ ) {
|
|
||||||
usage;
|
|
||||||
# } elsif ( $a = ~ / / ) {
|
|
||||||
# } else {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
open HANDLE, "$command $arglist |";
|
|
||||||
|
|
||||||
while ((chop($line = <HANDLE>))) {
|
|
||||||
$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";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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
|
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
# For mpi libraries
|
# For mpi libraries
|
||||||
%hpc_mpi_install_base %{hpc_base}%{?hpc_cf_dir}mpi/
|
%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}
|
%hpc_mpi_install_path %{hpc_mpi_install_path_base}%{version}
|
||||||
|
|
||||||
# Different paths - below HPC directory
|
# Different paths - below HPC directory
|
||||||
|
@ -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
|
Wed Sep 13 19:27:49 UTC 2017 - eich@suse.com
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package suse_hpc
|
# spec file for package suse-hpc
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -28,7 +28,7 @@ Source2: hpc_elf.pl
|
|||||||
Source3: hpc_elf.attr
|
Source3: hpc_elf.attr
|
||||||
Source4: hpc_elflib.attr
|
Source4: hpc_elflib.attr
|
||||||
Source5: LICENSE
|
Source5: LICENSE
|
||||||
Url: http://www.suse.com/hpc
|
Url: http://www.suse.com/hpc
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -57,5 +57,4 @@ cp %{S:5} .
|
|||||||
%{_rpmconfigdir}/hpc_elf.pl
|
%{_rpmconfigdir}/hpc_elf.pl
|
||||||
%{_rpmconfigdir}/fileattrs/*
|
%{_rpmconfigdir}/fileattrs/*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user