qclib/qclib.spec

136 lines
4.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package qclib
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Accepting request 699777 from home:markkp:branches:hardware - Upgraded to version 1.4.1 (jsc#SLE-5908) Version 1.4.1 Bug fixes: * qc_dump: Don't abort the dump in case qc_test fails. * Attributes qc_cp_weight_capping and qc_ifl_weight_capping were set even when initial capping was not set in the LPAR's activation profile. Version 1.4.0 Changes: * Added SMT support by properly differentiating between cores and CPUs. * Added new attributes qc_num_threads_cp and qc_num_threads_ifl to layers CEC, LPAR and ZVM_HYPERVISOR. * Deprecated attribute qc_mobility_eligible (remains valid for now) and replaced with qc_mobility_enabled to match z/VM terminology. Likewise switched QC_LAYER_TYPE_ZVM_CPU_POOL to QC_LAYER_TYPE_ZVM_RESOURCE_POOL. * Moved build customization defines (e.g. CONFIG_V1_COMPATIBILITY) to query_capacity.h. * Don't build with textual hypfs per default anymore due to unrecoverable issues (see section 'Bug fixes'). Bug fixes: * Added an exception to consistency check to ignore inconsistencies between textual hypfs and STHYI for attributes qc_num_cp_total and qc_num_ifl_total in the LPAR layer. Version 1.3.1 Bug fixes: * Security: Fix PATH attack vulnerability when dumping (see QC_DEBUG=2) * STHYI: Add fallback for pre-glibc 2.16 (not using getauxval()) * Handle mismatching STHYI and /proc/sysinfo layer counts * On LPAR, fix incomplete dump of binary hypfs when textual hypfs is mounted - Dropped obsolete qclib-sles15-fix-mismatch-case-with-STHYI.patch. - Updated qclib.makefile.libdir.patch to apply cleanly to the new version. - Made numerous changes to the spec file based on the output from spec-cleaner. - Updated qclib-rpmlintrc file to catch all duplicate file messages - Added qclib-sles15-fix-mismatch-case-with-STHYI.patch (bsc#1071687, bsc#1104304). OBS-URL: https://build.opensuse.org/request/show/699777 OBS-URL: https://build.opensuse.org/package/show/hardware/qclib?expand=0&rev=15
2019-04-30 23:40:06 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: qclib
Version: 2.0.1
Release: 0
Summary: Query Capacity library
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Accepting request 699777 from home:markkp:branches:hardware - Upgraded to version 1.4.1 (jsc#SLE-5908) Version 1.4.1 Bug fixes: * qc_dump: Don't abort the dump in case qc_test fails. * Attributes qc_cp_weight_capping and qc_ifl_weight_capping were set even when initial capping was not set in the LPAR's activation profile. Version 1.4.0 Changes: * Added SMT support by properly differentiating between cores and CPUs. * Added new attributes qc_num_threads_cp and qc_num_threads_ifl to layers CEC, LPAR and ZVM_HYPERVISOR. * Deprecated attribute qc_mobility_eligible (remains valid for now) and replaced with qc_mobility_enabled to match z/VM terminology. Likewise switched QC_LAYER_TYPE_ZVM_CPU_POOL to QC_LAYER_TYPE_ZVM_RESOURCE_POOL. * Moved build customization defines (e.g. CONFIG_V1_COMPATIBILITY) to query_capacity.h. * Don't build with textual hypfs per default anymore due to unrecoverable issues (see section 'Bug fixes'). Bug fixes: * Added an exception to consistency check to ignore inconsistencies between textual hypfs and STHYI for attributes qc_num_cp_total and qc_num_ifl_total in the LPAR layer. Version 1.3.1 Bug fixes: * Security: Fix PATH attack vulnerability when dumping (see QC_DEBUG=2) * STHYI: Add fallback for pre-glibc 2.16 (not using getauxval()) * Handle mismatching STHYI and /proc/sysinfo layer counts * On LPAR, fix incomplete dump of binary hypfs when textual hypfs is mounted - Dropped obsolete qclib-sles15-fix-mismatch-case-with-STHYI.patch. - Updated qclib.makefile.libdir.patch to apply cleanly to the new version. - Made numerous changes to the spec file based on the output from spec-cleaner. - Updated qclib-rpmlintrc file to catch all duplicate file messages - Added qclib-sles15-fix-mismatch-case-with-STHYI.patch (bsc#1071687, bsc#1104304). OBS-URL: https://build.opensuse.org/request/show/699777 OBS-URL: https://build.opensuse.org/package/show/hardware/qclib?expand=0&rev=15
2019-04-30 23:40:06 +02:00
URL: http://www.ibm.com/developerworks/linux/linux390/qclib.html
Source: %{name}-%{version}.tgz
Source1: %{name}-rpmlintrc
Patch1: qclib.makefile.libdir.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
ExclusiveArch: s390 s390x
%if 0%{?suse_version} > 1300
BuildRequires: glibc-devel-static
%else
BuildRequires: glibc-devel
%endif
%description
qclib provides a C API for extraction of system information for Linux on z
Systems.
For instance, it will provide the number of CPUs
* on the machine (CEC, Central Electronic Complex) layer
* on the PR/SM (Processor Resource/Systems Manager) layer, i.e. visible to
LPARs
* in z/VM hosts, guests and CPU pools
* in KVM hosts and guests
This allows calculating the upper limit of CPU resources a highest level guest
can use.
E.g.: If an LPAR on a z13 provides 4 CPUs to a z/VM hypervisor, and the
hypervisor provides 8 virtual CPUs to a guest, qclib can be used to retrieve
all of these numbers, and it can be concluded that not more capacity than 4
CPUs can be used by the software running in the guest.
qclib uses various interfaces and provides this data through a common and
consistent API (Application Programming Interface), using information provided
by:
* STSI (Store System Information) instruction - for more details, refer to
the z/Architecture Principles of Operation (SA22-7832)
* STHYI (Store Hypervisor Information) instruction as provided by a z/VM
hypervisor - for more information, refer to z/VM: V6R3 CP Programming
Service (SC24-6179), chapter 'Store Hypervisor Information (STHYI)
Instruction'.
* hypfs file system - for more information, refer to 'Device Drivers,
Features, and Commands', chapter 'S/390 hypervisor file system'.
%package -n libqc2
Summary: Query Capacity Library shared library
Group: System/Libraries
Obsoletes: libqc1
Provides: libqc1
%description -n libqc2
qclib provides a C API for extraction of system information for Linux on z
Systems.
%package devel
Summary: Development files for Query Capacity library
Group: Development/Libraries/C and C++
Requires: libqc2 = %{version}-%{release}
%description devel
qclib provides a C API for extraction of system information for Linux on z
Systems.
%package devel-static
Summary: Development files for Query Capacity library
Group: Development/Libraries/C and C++
Requires: libqc2 = %{version}-%{release}
Requires: qclib-devel = %{version}-%{release}
%description devel-static
qclib provides a C API for extraction of system information for Linux on z
Systems.
%prep
%autosetup -p 1
%build
MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
make %{?_smp_mflags} all CFLAGS="${MYCFLAGS} %{optflags}" V=1
Accepting request 699777 from home:markkp:branches:hardware - Upgraded to version 1.4.1 (jsc#SLE-5908) Version 1.4.1 Bug fixes: * qc_dump: Don't abort the dump in case qc_test fails. * Attributes qc_cp_weight_capping and qc_ifl_weight_capping were set even when initial capping was not set in the LPAR's activation profile. Version 1.4.0 Changes: * Added SMT support by properly differentiating between cores and CPUs. * Added new attributes qc_num_threads_cp and qc_num_threads_ifl to layers CEC, LPAR and ZVM_HYPERVISOR. * Deprecated attribute qc_mobility_eligible (remains valid for now) and replaced with qc_mobility_enabled to match z/VM terminology. Likewise switched QC_LAYER_TYPE_ZVM_CPU_POOL to QC_LAYER_TYPE_ZVM_RESOURCE_POOL. * Moved build customization defines (e.g. CONFIG_V1_COMPATIBILITY) to query_capacity.h. * Don't build with textual hypfs per default anymore due to unrecoverable issues (see section 'Bug fixes'). Bug fixes: * Added an exception to consistency check to ignore inconsistencies between textual hypfs and STHYI for attributes qc_num_cp_total and qc_num_ifl_total in the LPAR layer. Version 1.3.1 Bug fixes: * Security: Fix PATH attack vulnerability when dumping (see QC_DEBUG=2) * STHYI: Add fallback for pre-glibc 2.16 (not using getauxval()) * Handle mismatching STHYI and /proc/sysinfo layer counts * On LPAR, fix incomplete dump of binary hypfs when textual hypfs is mounted - Dropped obsolete qclib-sles15-fix-mismatch-case-with-STHYI.patch. - Updated qclib.makefile.libdir.patch to apply cleanly to the new version. - Made numerous changes to the spec file based on the output from spec-cleaner. - Updated qclib-rpmlintrc file to catch all duplicate file messages - Added qclib-sles15-fix-mismatch-case-with-STHYI.patch (bsc#1071687, bsc#1104304). OBS-URL: https://build.opensuse.org/request/show/699777 OBS-URL: https://build.opensuse.org/package/show/hardware/qclib?expand=0&rev=15
2019-04-30 23:40:06 +02:00
make %{?_smp_mflags} doc
%check
Accepting request 699777 from home:markkp:branches:hardware - Upgraded to version 1.4.1 (jsc#SLE-5908) Version 1.4.1 Bug fixes: * qc_dump: Don't abort the dump in case qc_test fails. * Attributes qc_cp_weight_capping and qc_ifl_weight_capping were set even when initial capping was not set in the LPAR's activation profile. Version 1.4.0 Changes: * Added SMT support by properly differentiating between cores and CPUs. * Added new attributes qc_num_threads_cp and qc_num_threads_ifl to layers CEC, LPAR and ZVM_HYPERVISOR. * Deprecated attribute qc_mobility_eligible (remains valid for now) and replaced with qc_mobility_enabled to match z/VM terminology. Likewise switched QC_LAYER_TYPE_ZVM_CPU_POOL to QC_LAYER_TYPE_ZVM_RESOURCE_POOL. * Moved build customization defines (e.g. CONFIG_V1_COMPATIBILITY) to query_capacity.h. * Don't build with textual hypfs per default anymore due to unrecoverable issues (see section 'Bug fixes'). Bug fixes: * Added an exception to consistency check to ignore inconsistencies between textual hypfs and STHYI for attributes qc_num_cp_total and qc_num_ifl_total in the LPAR layer. Version 1.3.1 Bug fixes: * Security: Fix PATH attack vulnerability when dumping (see QC_DEBUG=2) * STHYI: Add fallback for pre-glibc 2.16 (not using getauxval()) * Handle mismatching STHYI and /proc/sysinfo layer counts * On LPAR, fix incomplete dump of binary hypfs when textual hypfs is mounted - Dropped obsolete qclib-sles15-fix-mismatch-case-with-STHYI.patch. - Updated qclib.makefile.libdir.patch to apply cleanly to the new version. - Made numerous changes to the spec file based on the output from spec-cleaner. - Updated qclib-rpmlintrc file to catch all duplicate file messages - Added qclib-sles15-fix-mismatch-case-with-STHYI.patch (bsc#1071687, bsc#1104304). OBS-URL: https://build.opensuse.org/request/show/699777 OBS-URL: https://build.opensuse.org/package/show/hardware/qclib?expand=0&rev=15
2019-04-30 23:40:06 +02:00
make %{?_smp_mflags} test
make %{?_smp_mflags} test-sh
%install
%make_install LIBDIR=%{_lib} V=1
make installdoc DESTDIR=%{buildroot} V=1
%post -n libqc2 -p /sbin/ldconfig
%postun -n libqc2 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/*
%files -n libqc2
%defattr(-,root,root)
%{_libdir}/libqc.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/libqc.so
%files devel-static
%defattr(-,root,root)
%{_libdir}/libqc.a
%changelog