commit b11723befb1046778ad5aff1145437cb6254f52b Author: CentOS Sources Date: Thu Apr 23 22:57:11 2020 +0000 import qclib-2.0.1-1.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e34c40e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/qclib-2.0.1.tgz diff --git a/.qclib.metadata b/.qclib.metadata new file mode 100644 index 0000000..fbd5a6e --- /dev/null +++ b/.qclib.metadata @@ -0,0 +1 @@ +fba3cf3becbf609d08bc5245412fe875c626e826 SOURCES/qclib-2.0.1.tgz diff --git a/SOURCES/qclib-1.3.1-ldflags.patch b/SOURCES/qclib-1.3.1-ldflags.patch new file mode 100644 index 0000000..a47fd79 --- /dev/null +++ b/SOURCES/qclib-1.3.1-ldflags.patch @@ -0,0 +1,20 @@ +diff -up qclib-1.3.1/Makefile.ldflags qclib-1.3.1/Makefile +--- qclib-1.3.1/Makefile.ldflags 2018-03-12 10:36:52.428425169 +0100 ++++ qclib-1.3.1/Makefile 2018-03-12 10:37:27.328425169 +0100 +@@ -8,6 +8,7 @@ VERSION = 1.3.1 + VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) + DOCDIR ?= /usr/share/doc/packages/ + CFLAGS ?= -g -Wall -O2 ++LDFLAGS ?= + CFILES = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c query_capacity_ocf.c \ + query_capacity_hypfs.c query_capacity_sthyi.c + OBJECTS = $(patsubst %.c,%.o,$(CFILES)) +@@ -38,7 +39,7 @@ libqc.a: $(OBJECTS) + $(AR) rcs $@ $^ + + libqc.so.$(VERSION): $(OBJECTS) +- $(LINK) -Wl,-soname,libqc.so.$(VERM) -shared $^ -o $@ ++ $(LINK) $(LDFLAGS) -Wl,-soname,libqc.so.$(VERM) -shared $^ -o $@ + -rm libqc.so.$(VERM) 2>/dev/null + ln -s libqc.so.$(VERSION) libqc.so.$(VERM) + diff --git a/SOURCES/qclib-2.0.0-docdir.patch b/SOURCES/qclib-2.0.0-docdir.patch new file mode 100644 index 0000000..b0fee96 --- /dev/null +++ b/SOURCES/qclib-2.0.0-docdir.patch @@ -0,0 +1,35 @@ +diff -up qclib-1.3.1/Makefile.docdir qclib-1.3.1/Makefile +--- qclib-1.3.1/Makefile.docdir 2017-10-24 07:02:42.000000000 +0200 ++++ qclib-1.3.1/Makefile 2017-12-04 14:15:08.000000000 +0100 +@@ -6,6 +6,7 @@ + # bugfix: Bugfixes only + VERSION = 2.0.1 + VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) ++DOCDIR ?= /usr/share/doc/packages/ + CFLAGS ?= -g -Wall -O2 + CFILES = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c query_capacity_ocf.c \ + query_capacity_hypfs.c query_capacity_sthyi.c +@@ -69,16 +70,16 @@ install: libqc.a libqc.so.$(VERSION) + ln -sr $(DESTDIR)/usr/lib64/libqc.so.$(VERSION) $(DESTDIR)/usr/lib64/libqc.so.$(VERM) + ln -sr $(DESTDIR)/usr/lib64/libqc.so.$(VERSION) $(DESTDIR)/usr/lib64/libqc.so + install -Dm 644 query_capacity.h $(DESTDIR)/usr/include/query_capacity.h +- install -Dm 644 README $(DESTDIR)/usr/share/doc/packages/qclib/README +- install -Dm 644 LICENSE $(DESTDIR)/usr/share/doc/packages/qclib/LICENSE ++ install -Dm 644 README $(DESTDIR)/$(DOCDIR)/qclib/README ++ install -Dm 644 LICENSE $(DESTDIR)/$(DOCDIR)/qclib/LICENSE + + installdoc: doc + echo " INSTALLDOC" +- install -dm 755 $(DESTDIR)/usr/share/doc/packages/qclib/html +- cp -r html/* $(DESTDIR)/usr/share/doc/packages/qclib/html +- chmod 644 $(DESTDIR)/usr/share/doc/packages/qclib/html/search/* +- chmod 644 $(DESTDIR)/usr/share/doc/packages/qclib/html/* +- chmod 755 $(DESTDIR)/usr/share/doc/packages/qclib/html/search ++ install -dm 755 $(DESTDIR)/$(DOCDIR)/qclib/html ++ cp -r html/* $(DESTDIR)/$(DOCDIR)/qclib/html ++ chmod 644 $(DESTDIR)/$(DOCDIR)/qclib/html/search/* ++ chmod 644 $(DESTDIR)/$(DOCDIR)/qclib/html/* ++ chmod 755 $(DESTDIR)/$(DOCDIR)/qclib/html/search + + clean: + echo " CLEAN" diff --git a/SPECS/qclib.spec b/SPECS/qclib.spec new file mode 100644 index 0000000..cbeef36 --- /dev/null +++ b/SPECS/qclib.spec @@ -0,0 +1,122 @@ +Name: qclib +Version: 2.0.1 +Release: 1%{?dist} +Summary: Library for extraction of system information for Linux on z Systems +License: BSD +URL: http://www.ibm.com/developerworks/linux/linux390/qclib.html +Source0: http://public.dhe.ibm.com/software/dw/linux390/ht_src/%{name}-%{version}.tgz +# https://bugzilla.redhat.com/show_bug.cgi?id=1306280 +Patch0: %{name}-2.0.0-docdir.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1552658 +Patch1: %{name}-1.3.1-ldflags.patch +ExclusiveArch: s390 s390x +BuildRequires: gcc +BuildRequires: glibc-static +BuildRequires: doxygen + +%description +%{summary}. + +%package devel +Summary: Development library and headers for qclib +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +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, including LPAR groups 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. For example: If an LPAR on a z13 provides 4 CPUs to a z/VM hyper-visor, +and the hyper-visor 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. + +This package provides the development libraries and headers for qclib. + +%package static +Summary: Static library for qclib +Requires: %{name}-devel = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} + +%description static +%{summary}. This package provides static libraries for qclib. + + +%prep +%autosetup + + +%build +make V=1 CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" %{?_smp_mflags} all doc + + +%install +%make_install DOCDIR=%{_docdir} +make DESTDIR=%{buildroot} DOCDIR=%{_docdir} installdoc + + +%check +make test-sh test + + +%files +%dir %{_docdir}/%{name} +%license %{_docdir}/%{name}/LICENSE +%doc %{_docdir}/%{name}/README +%{_libdir}/libqc.so.* + +%files devel +%doc %{_docdir}/%{name}/html/ +%{_libdir}/libqc*.so +%{_includedir}/query_capacity.h + +%files static +%{_libdir}/libqc*.a + + +%changelog +* Mon Jan 13 2020 Dan Horák - 2.0.1-1 +- updated to 2.0.1 (#1790369) +- Resolves: #1790369 + +* Mon Nov 25 2019 Dan Horák - 2.0.0-1 +- updated to 2.0.0 (#1726247) +- Resolves: #1726247 + +* Wed Jul 25 2018 Dan Horák - 1.4.1-1 +- updated to 1.4.1 + +* Sat Jul 14 2018 Fedora Release Engineering - 1.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Apr 19 2018 Dan Horák - 1.4.0-1 +- updated to 1.4.0 + +* Mon Mar 12 2018 Dan Horák - 1.3.1-3 +- fix LDFLAGS injection (#1552658) + +* Fri Feb 09 2018 Fedora Release Engineering - 1.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 31 2018 Dan Horák - 1.3.1-1 +- updated to 1.3.1 + +* Mon Dec 04 2017 Dan Horák - 1.3.0-1 +- updated to 1.3.0 + +* Thu Aug 03 2017 Fedora Release Engineering - 1.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Oct 31 2016 Rafael dos Santos 1.2.0-1 +- Initial packaging