Hello community, here is the log from the commit of package papi for openSUSE:Factory checked in at 2017-10-18 16:15:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/papi (Old) and /work/SRC/openSUSE:Factory/.papi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "papi" Wed Oct 18 16:15:17 2017 rev:21 rq:534592 version:5.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/papi/papi.changes 2017-09-13 21:36:24.998854144 +0200 +++ /work/SRC/openSUSE:Factory/.papi.new/papi.changes 2017-10-18 16:15:18.796026653 +0200 @@ -1,0 +2,24 @@ +Tue Oct 17 13:31:11 UTC 2017 - [email protected] + +- Add magic to limit the number of flavors built in the + in the OBS ring. + +------------------------------------------------------------------- +Thu Oct 12 05:46:35 UTC 2017 - [email protected] + +- Generate baselib.conf dynamically and only for the non-HPC + build: this avoids issues with the source validator. + +------------------------------------------------------------------- +Wed Oct 11 20:57:40 UTC 2017 - [email protected] + +- Work around openSUSE:Factory spec file validation test. + +------------------------------------------------------------------- +Fri Sep 11 19:00:50 UTC 2017 - [email protected] + +- Converted to multibuild. +- Add HPC build using environment modules + (FATE#321720). + +------------------------------------------------------------------- Old: ---- baselibs.conf New: ---- _multibuild ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ papi.spec ++++++ --- /var/tmp/diff_new_pack.9AchRH/_old 2017-10-18 16:15:19.511993153 +0200 +++ /var/tmp/diff_new_pack.9AchRH/_new 2017-10-18 16:15:19.519992779 +0200 @@ -16,16 +16,64 @@ # -Name: papi -Version: 5.5.1 +%global flavor @BUILD_FLAVOR@%{nil} + +%define pname papi +%define ver 5.5.1 +%define _ver 5_5_1 + +%bcond_with ringdisabled + +%if "%flavor" == "" +ExclusiveArch: do_not_build +%define package_name %pname +%endif + +# Magic for OBS Staging. Only build the flavors required by +# other packages in the ring. +%if %{with ringdisabled} + %if "%flavor" != "standard" +ExclusiveArch: do_not_build + %endif +%endif + +%if "%flavor" == "standard" +%{bcond_with hpc} +%endif + +%if "%flavor" == "hpc" +%{bcond_without hpc} +%endif + +%if %{without hpc} +%define package_name %{pname} +%define libname() lib%{pname}%{?with_mpi:-%{mpi_family}} +%define p_bindir %_bindir +%define p_libdir %_libdir +%define p_datadir %_datadir +%define p_includedir %_includedir +%define p_mandir %_mandir +%else +%{hpc_init %{?ext:-e %{ext}}} + +%define libname() lib%{pname}%{expand:%%{hpc_package_name_tail %{**}}} +%define package_name %{hpc_package_name %_ver} +%define p_bindir %hpc_bindir +%define p_libdir %hpc_libdir +%define p_datadir %hpc_datadir +%define p_includedir %hpc_includedir +%define p_mandir %hpc_mandir +%endif + +Name: %{package_name} +Version: %ver Release: 0 Summary: Performance Application Programming Interface License: BSD-3-Clause Group: Development/Libraries/C and C++ Url: http://icl.cs.utk.edu/papi/index.html -Source: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz -Source1: %{name}-rpmlintrc -Source1000: baselibs.conf +Source: http://icl.cs.utk.edu/projects/papi/downloads/%{pname}-%{version}.tar.gz +Source1: %{pname}-rpmlintrc Patch0: papi-codecleanup.patch #Patches to add support for POWER9 Patch1: papi-power9_event_list_presets.patch @@ -40,6 +88,10 @@ BuildRequires: linux-kernel-headers BuildRequires: ncurses-devel BuildRequires: pkg-config +%if %{with hpc} +BuildRequires: lua-lmod +BuildRequires: suse-hpc +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build #PAPI doesn't support the s390 architecture ExcludeArch: s390 s390x @@ -58,6 +110,9 @@ BuildRequires: glibc-devel-32bit %endif #BuildRequires: libibmad-devel +%if %{with hpc} +Requires: %{libname %_ver} = %version +%endif %description @@ -67,6 +122,8 @@ engineers to see, in near real time, the relation between software performance and processor events. +%{?with_hpc:%{hpc_master_package -L}} + %package devel Summary: Software Development Kit for PAPI Group: Development/Libraries/C and C++ @@ -78,6 +135,8 @@ libraries and interfaces. This is required for rebuilding any program that uses PAPI. +%{?with_hpc:%{hpc_master_package -a devel}} + %package devel-static Summary: Static PAPI libraries Group: Development/Libraries/C and C++ @@ -87,18 +146,28 @@ %description devel-static This package includes the static PAPI libraries. -%package -n libpapi +%package -n %{libname %_ver} Summary: PAPI runtime library Group: System/Libraries -%description -n libpapi +%description -n %{libname %_ver} This package contains the PAPI runtime library. %prep -%setup -q +%setup -q -n %{pname}-%{version} %patch0 %patch1 -p1 +# Create baselib.conf dynamically (non-HPC build only). +%if %{without hpc} +cat > %{_sourcedir}/baselibs.conf <<EOF +%{libname %_ver} +%{name}-devel + requires -%{name}-<targettype> + requires "%{libname %_ver}-<targettype> = <version>" +EOF +%endif + %build #export SUSE_ASNEEDED=0 cd src @@ -106,14 +175,22 @@ for c in lmsensors; do cd components/$c autoconf +%if %{without hpc} %configure \ +%else + %hpc_configure \ +%endif --with-sensors_incdir=%{_includedir}/sensors \ --with-sensors_libdir=%{_libdir} cd - done export CFLAGS="%{optflags} -Wno-unused-parameter" -%configure \ +%if %{without hpc} + %configure \ +%else + %hpc_configure \ +%endif --with-components="appio lmsensors coretemp example net" \ --with-perf-events --with-shared-lib=yes \ --with-shlib --with-pthread-mutexes \ @@ -121,53 +198,109 @@ --with-pfm-libdir=%{_libdir} #DBG workaround to make sure libpfm just uses the normal CFLAGS -DBG="" make DOCDIR=%{_defaultdocdir}/%{name} %{?_smp_mflags} +DBG="" make DOCDIR=%{_defaultdocdir}/%{pname} %{?_smp_mflags} %install cd src -make DESTDIR=%{buildroot} install %{?_smp_mflags} DOCDIR=%{_defaultdocdir}/%{name} LDCONFIG=/bin/true -chrpath --delete %{buildroot}%{_libdir}/*.so* +make DESTDIR=%{buildroot} install %{?_smp_mflags} DOCDIR=%{_defaultdocdir}/%{pname} LDCONFIG=/bin/true +chrpath --delete %{buildroot}%{p_libdir}/*.so* +%if %{with hpc} +%{hpc_compress_man 3} +%hpc_write_modules_files +#%%Module1.0##################################################################### + +proc ModulesHelp { } { + + puts stderr " " + puts stderr "This module loads the %{pname} library" + puts stderr "toolchain." + puts stderr "\nVersion %{version}\n" + +} +module-whatis "Name: %{pname}" +module-whatis "Version: %{version}" +module-whatis "Category: runtime library" +module-whatis "Description: %{summary}" +module-whatis "URL %{url}" + +set version %{version} + +prepend-path PATH %{hpc_bidnir} +prepend-path MANPATH %{hpc_mandir} +prepend-path LD_LIBRARY_PATH %{hpc_libdir} + +setenv %{hpc_upcase %pname}_DIR %{hpc_prefix} +setenv %{hpc_upcase %pname}_BIN %{hpc_bindir} + +if {[file isdirectory %{hpc_includedir}]} { +prepend-path LIBRARY_PATH %{hpc_libdir} +prepend-path CPATH %{hpc_includedir} +prepend-path C_INCLUDE_PATH %{hpc_includedir} +prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir} +prepend-path INCLUDE %{hpc_includedir} +%hpc_modulefile_add_pkgconfig_path + +setenv %{hpc_upcase %pname}_LIB %{hpc_libdir} +setenv %{hpc_upcase %pname}_INC %{hpc_includedir} +} +EOF +%endif -%post -n libpapi -p /sbin/ldconfig +%post -n %{libname %_ver} -p /sbin/ldconfig -%postun -n libpapi -p /sbin/ldconfig +%postun -n %{libname %_ver} +/sbin/ldconfig +%{?with_hpc:%{hpc_module_delete_if_default}} %files %defattr(-,root,root) -%{_bindir}/papi_clockres -%{_bindir}/papi_command_line -%{_bindir}/papi_cost -%{_bindir}/papi_decode -%{_bindir}/papi_event_chooser -%{_bindir}/papi_mem_info -%{_bindir}/papi_native_avail -%{_bindir}/papi_version -%{_bindir}/papi_xml_event_info -%{_bindir}/papi_component_avail -%{_bindir}/papi_error_codes -%{_bindir}/papi_multiplex_cost -%{_datadir}/%{name} -%{_bindir}/papi_avail +%if %{with hpc} +%hpc_dirs +%dir %hpc_datadir +%dir %hpc_bindir +%hpc_modules_files +%endif +%{p_bindir}/papi_clockres +%{p_bindir}/papi_command_line +%{p_bindir}/papi_cost +%{p_bindir}/papi_decode +%{p_bindir}/papi_event_chooser +%{p_bindir}/papi_mem_info +%{p_bindir}/papi_native_avail +%{p_bindir}/papi_version +%{p_bindir}/papi_xml_event_info +%{p_bindir}/papi_component_avail +%{p_bindir}/papi_error_codes +%{p_bindir}/papi_multiplex_cost +%{p_datadir}/%{pname} +%{p_bindir}/papi_avail %doc ChangeLog*.txt LICENSE.txt README RELEASENOTES.txt %files devel %defattr(-,root,root) -%{_includedir}/f77papi.h -%{_includedir}/f90papi.h -%{_includedir}/fpapi.h -%{_includedir}/papi.h -%{_includedir}/papiStdEventDefs.h -%doc %{_mandir}/man3/*.gz -%doc %{_mandir}/man1/* -%{_libdir}/libpapi.so -%{_libdir}/pkgconfig/*.pc +%if %{with hpc} +%dir %hpc_mandir +%dir %hpc_mandir/man1 +%dir %hpc_mandir/man3 +%dir %hpc_includedir +%dir %hpc_pkgconfigdir +%endif +%{p_includedir}/f77papi.h +%{p_includedir}/f90papi.h +%{p_includedir}/fpapi.h +%{p_includedir}/papi.h +%{p_includedir}/papiStdEventDefs.h +%doc %{p_mandir}/man3/*.gz +%doc %{p_mandir}/man1/* +%{p_libdir}/libpapi.so +%{p_libdir}/pkgconfig/*.pc %files devel-static %defattr(-,root,root) -%{_libdir}/lib*.a +%{p_libdir}/lib*.a -%files -n libpapi +%files -n %{libname %_ver} %defattr(-,root,root) -%{_libdir}/libpapi.so.* +%{p_libdir}/libpapi.so.* %changelog ++++++ _multibuild ++++++ <multibuild> <package>standard</package> <package>hpc</package> </multibuild>
