Hello community, here is the log from the commit of package suse-hpc for openSUSE:Factory checked in at 2017-09-15 22:30:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/suse-hpc (Old) and /work/SRC/openSUSE:Factory/.suse-hpc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suse-hpc" Fri Sep 15 22:30:52 2017 rev:2 rq:525949 version:0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/suse-hpc/suse-hpc.changes 2017-09-13 22:36:54.412096076 +0200 +++ /work/SRC/openSUSE:Factory/.suse-hpc.new/suse-hpc.changes 2017-09-15 22:30:52.883099280 +0200 @@ -1,0 +2,11 @@ +Wed Sep 13 19:27:49 UTC 2017 - e...@suse.com + +- Add a dependency generator wrapper for binaries and libraries + to avoid adding standard dependencies for HPC libraries. + +------------------------------------------------------------------- +Tue Sep 12 18:54:22 UTC 2017 - e...@suse.com + +- Removed unneeded BuildRequires: + +------------------------------------------------------------------- New: ---- dlinfo.c hpc_elf.attr hpc_elf.pl hpc_elflib.attr ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suse-hpc.spec ++++++ --- /var/tmp/diff_new_pack.9gDZw4/_old 2017-09-15 22:30:53.379029420 +0200 +++ /var/tmp/diff_new_pack.9gDZw4/_new 2017-09-15 22:30:53.383028857 +0200 @@ -23,28 +23,39 @@ Version: 0.1 Release: 0 Source0: macros.hpc -Source1: LICENSE +Source1: dlinfo.c +Source2: hpc_elf.pl +Source3: hpc_elf.attr +Source4: hpc_elflib.attr +Source5: LICENSE Url: http://www.suse.com/hpc -BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: sed %description Provide rpm macros for building and installing SUSE HPC packages. %prep +cp %{S:1} . %build +gcc -o dlinfo dlinfo.c -ldl %install -mkdir -p %{buildroot}/%{_sysconfdir}/rpm -cp %{S:0} %{buildroot}/%{_sysconfdir}/rpm -%{__cp} %{S:1} . +mkdir -p %{buildroot}%{_sysconfdir}/rpm +install -m 644 %{S:0} %{buildroot}%{_sysconfdir}/rpm +mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 755 %{S:2} dlinfo %{buildroot}%{_rpmconfigdir} +install -m 644 %{S:3} %{S:4} %{buildroot}%{_rpmconfigdir}/fileattrs +cp %{S:5} . %files %defattr(-,root,root,-) %doc LICENSE %config %{_sysconfdir}/rpm/macros.hpc +%{_rpmconfigdir}/dlinfo +%{_rpmconfigdir}/hpc_elf.pl +%{_rpmconfigdir}/fileattrs/* + %changelog ++++++ dlinfo.c ++++++ #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); } ++++++ hpc_elf.attr ++++++ %__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 ++++++ hpc_elf.pl ++++++ #! /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"; } } ++++++ hpc_elflib.attr ++++++ %__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 ++++++ macros.hpc ++++++ --- /var/tmp/diff_new_pack.9gDZw4/_old 2017-09-15 22:30:53.567002942 +0200 +++ /var/tmp/diff_new_pack.9gDZw4/_new 2017-09-15 22:30:53.567002942 +0200 @@ -152,6 +152,7 @@ %global hpc_mpi_dir %{?hpc_mpi_family:%%{hpc_%{hpc_mpi_family}_dir}/} \ %global hpc_mpi_pack_version %{?hpc_mpi_family:%%{hpc_%{hpc_mpi_family}_pack_version}} \ } \ +# Preexpanded macros \ %{expand: %%global hpc_prefix %{-M:%hpc_mpi_install_path}%{-C:%hpc_cf_install_path}%{!-M:%{!-C:%{hpc_install_path}}}} \ %{?_hpc_build_mpi:%global _hpc_build_xx 1} \ %{?_hpc_build_compiler:%global _hpc_build_xx 1} \ @@ -159,6 +160,13 @@ %define _hpc_package_name_compiler %{?hpc_compiler_family:-%{hpc_compiler_family}%{?hpc_cf_pack_version}} \ %define _hpc_package_name_mpi %{?hpc_mpi_family:%{!?_hpc_build_mpi:-%{hpc_mpi_family}%{?hpc_mpi_pack_version}}} \ %global hpc_package_name_end %{_hpc_package_name_compiler}%{_hpc_package_name_mpi}-hpc \ +# Dependency Generator \ + %global tmp %__elf_exclude_path \ + %global __elf_exclude_path (%tmp)|(^%hpc_base) \ + %undefine tmp \ + %global tmp %__elflib_exclude_path \ + %global __elflib_exclude_path (%tmp)|(^%hpc_base) \ + %undefine tmp \ %global _hpc_init_done 1 %hpc_init(Cc:Mm:v:V:e:) %{expand:%%_hpc_init %{**}}