Hello community,

here is the log from the commit of package qclib for openSUSE:Factory checked 
in at 2020-09-24 16:13:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qclib (Old)
 and      /work/SRC/openSUSE:Factory/.qclib.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qclib"

Thu Sep 24 16:13:40 2020 rev:10 rq:836410 version:2.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/qclib/qclib.changes      2020-04-29 
20:43:13.843775357 +0200
+++ /work/SRC/openSUSE:Factory/.qclib.new.4249/qclib.changes    2020-09-24 
16:14:14.564898541 +0200
@@ -1,0 +2,18 @@
+Wed Sep 16 18:27:21 UTC 2020 - Mark Post <[email protected]>
+
+- Upgraded to version 2.2.0 (jsc#SLE-13711)
+  Changes:
+  - Add new tools zname and zhypinfo
+  Bug fixes:
+  - KVM hosts in mixed mode LPARs indicated both, CPs and IFLs, while only
+    CPs are actually used
+- Updated qclib.makefile.libdir.patch to apply against the current
+  version, and to make sure the two new man pages go to the right
+  directory.
+- Added qclib.fix.missing.makefile.if.statement.patch to correct a
+  problem in the Makefile.
+- Changed spec file from "make" to "%make_build" per spec-cleaner.
+- Updated the URL in the spec file to point to current location of
+  the package.
+
+-------------------------------------------------------------------

Old:
----
  qclib-2.1.0.tgz

New:
----
  qclib-2.2.0.tgz
  qclib.fix.missing.makefile.if.statement.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qclib.spec ++++++
--- /var/tmp/diff_new_pack.JHk5CR/_old  2020-09-24 16:14:15.432899409 +0200
+++ /var/tmp/diff_new_pack.JHk5CR/_new  2020-09-24 16:14:15.436899413 +0200
@@ -17,15 +17,16 @@
 
 
 Name:           qclib
-Version:        2.1.0
+Version:        2.2.0
 Release:        0
 Summary:        Query Capacity library
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
-URL:            http://www.ibm.com/developerworks/linux/linux390/qclib.html
+URL:            
https://public.dhe.ibm.com/software/dw/linux390/ht_src/%{name}-%{version}.tgz
 Source:         %{name}-%{version}.tgz
 Source1:        %{name}-rpmlintrc
-Patch1:         qclib.makefile.libdir.patch
+Patch1:         qclib.fix.missing.makefile.if.statement.patch
+Patch99:        qclib.makefile.libdir.patch
 BuildRequires:  doxygen
 BuildRequires:  gcc-c++
 ExclusiveArch:  s390 s390x
@@ -99,15 +100,16 @@
 
 %build
 MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
-make %{?_smp_mflags} all CFLAGS="${MYCFLAGS} %{optflags}" V=1
-make %{?_smp_mflags} doc
+%make_build all CFLAGS="${MYCFLAGS} %{optflags}"
+%make_build doc
 
 %check
-make %{?_smp_mflags} test
-make %{?_smp_mflags} test-sh
+%make_build doc test
+%make_build doc test-sh
 
 %install
 %make_install LIBDIR=%{_lib} V=1
+gzip -9 %{buildroot}/%{_mandir}/man8/*
 make installdoc DESTDIR=%{buildroot} V=1
 
 %post -n libqc2 -p /sbin/ldconfig
@@ -117,7 +119,11 @@
 %files
 %defattr(-,root,root)
 %dir %{_docdir}/%{name}
+%{_bindir}/zname
+%{_bindir}/zhypinfo
 %{_docdir}/%{name}/*
+%{_mandir}/man8/zname.8%{?ext_man}
+%{_mandir}/man8/zhypinfo.8%{?ext_man}
 
 %files -n libqc2
 %defattr(-,root,root)

++++++ qclib-2.1.0.tgz -> qclib-2.2.0.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/Makefile new/qclib-2.2.0/Makefile
--- old/qclib-2.1.0/Makefile    2020-04-20 12:58:24.000000000 +0200
+++ new/qclib-2.2.0/Makefile    2020-09-11 15:22:30.000000000 +0200
@@ -4,16 +4,15 @@
 #     major : Backwards compatible changes to the API
 #     minor : Additions leaving the API unmodified
 #     bugfix: Bugfixes only
-VERSION = 2.1.0
-VERM    = $(shell echo $(VERSION) | cut -d '.' -f 1)
-CFLAGS ?= -g -Wall -O2
+VERSION  = 2.2.0
+VERM     = $(shell echo $(VERSION) | cut -d '.' -f 1)
+CFLAGS  ?= -g -Wall -O2
+LDFLAGS ?=
 CFILES  = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c \
           query_capacity_sysfs.c query_capacity_hypfs.c query_capacity_sthyi.c
 OBJECTS = $(patsubst %.c,%.o,$(CFILES))
 .SUFFIXES: .o .c
-
-LEVEL := $(shell git log --pretty=format:'%h' -n 1)
-DATE  := $(shell git log --pretty=format:'%ai' -n 1)
+DOCDIR ?= /usr/share/doc/packages/
 
 ifneq ("${V}","1")
         MAKEFLAGS += --quiet
@@ -28,7 +27,11 @@
 TAR    = $(call cmd,"  TAR   ",$@)tar
 GEN    = $(call cmd,"  GEN   ",$@)grep
 
-all: libqc.a libqc.so.$(VERSION) qc_test qc_test-sh
+INSTALL_FLAGS_BIN = -g $(GROUP) -o $(OWNER) -m755
+INSTALL_FLAGS_MAN = -g $(GROUP) -o $(OWNER) -m644
+INSTALL_FLAGS_LIB = -g $(GROUP) -o $(OWNER) -m755
+
+all: libqc.a libqc.so.$(VERSION) qc_test qc_test-sh zname zhypinfo
 
 hcpinfbk_qclib.h: hcpinfbk.h
        $(GEN) -ve "^#pragma " $< > $@  # strip off z/VM specific pragmas
@@ -40,10 +43,16 @@
        $(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)
 
+zname: zname.c zhypinfo.h libqc.so.$(VERSION)
+       $(CC) $(CFLAGS) -L. $< -o $@ libqc.so.$(VERSION)
+
+zhypinfo: zhypinfo.c zhypinfo.h libqc.so.$(VERSION)
+       $(CC) $(CFLAGS) -L. $< -o $@ libqc.so.$(VERSION)
+
 qc_test: qc_test.c libqc.a
        $(CC) $(CFLAGS) -static $< -L. -lqc -o $@
 
@@ -65,25 +74,74 @@
                echo "Error: 'doxygen' not installed"; \
        fi
 
+               cppcheck query_capacity*.[ch] 2>&1 | sed 's/^/   /'; \
+       else \
+               echo "cppcheck not available"; \
+       fi
+       @echo;
+       -@if which smatch >/dev/null 2>&1; then \
+               echo "Running smatch"; \
+               smatch query_capacity*.[ch] 2>&1 | sed 's/^/   /'; \
+       else \
+               echo "smatch not available"; \
+       fi
+       @echo;
+       -@if which sparse >/dev/null 2>&1; then \
+               echo "Running sparse"; \
+               sparse -Wsparse-all query_capacity*.[ch] 2>&1 | sed 's/^/   /'; 
\
+       else \
+               echo "sparse not available"; \
+       fi
+       @echo;
+       -@if which valgrind >/dev/null 2>&1; then \
+               echo "Running valgrind: qc_test"; \
+               LD_LIBRARY_PATH=. valgrind --leak-check=full 
--show-leak-kinds=all ./qc_test-sh `find regtest_data -maxdepth 1 -mindepth 1 
-type d | \
+                       grep -ve "^regtest_data/extras_" | sort` 2>&1 | grep -A 
100 "HEAP SUMMARY:" | sed 's/^/   /'; \
+               echo; \
+               echo "zname: Running valgrind: zname -a"; \
+               QC_USE_DUMP=regtest_data/dump_r3545038 LD_LIBRARY_PATH=. 
valgrind --leak-check=full --show-leak-kinds=all ./zname -a | \
+                       grep -A 100 "HEAP SUMMARY:" | sed 's/^/   /'; \
+               echo; \
+               echo "zname: Running valgrind: zhypinfo"; \
+               QC_USE_DUMP=regtest_data/dump_r3545038 LD_LIBRARY_PATH=. 
valgrind --leak-check=full --show-leak-kinds=all ./zhypinfo | \
+                       grep -A 100 "HEAP SUMMARY:" | sed 's/^/   /'; \
+               echo; \
+               echo "zname: Running valgrind: zhypinfo -L"; \
+               QC_USE_DUMP=regtest_data/dump_r3545038 LD_LIBRARY_PATH=. 
valgrind --leak-check=full --show-leak-kinds=all ./zhypinfo -L | \
+                       grep -A 100 "HEAP SUMMARY:" | sed 's/^/   /'; \
+               echo; \
+               echo "Running callgrind: qctest"; \
+               LD_LIBRARY_PATH=. valgrind --callgrind-out-file=/dev/null 
--tool=callgrind ./zhypinfo -l `find regtest_data -maxdepth 1 -mindepth 1 -type 
d | \
+                       grep -ve "^regtest_data/extras_" | sort` 2>&1 | grep 
"refs:" | sed 's/^/   /'; \
+       else \
+               echo "valgrind not available"; \
+       fi
+       @echo;
+
 install: libqc.a libqc.so.$(VERSION)
        echo "  INSTALL"
        install -Dm 644 libqc.a $(DESTDIR)/usr/lib64/libqc.a
        install -Dm 755 libqc.so.$(VERSION) 
$(DESTDIR)/usr/lib64/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 755 zname $(DESTDIR)/usr/bin/zname
+       install -Dm 755 zhypinfo $(DESTDIR)/usr/bin/zhypinfo
+       install -Dm 644 zname.8 $(DESTDIR)/usr/share/man8/zname.8
+       install -Dm 644 zhypinfo.8 $(DESTDIR)/usr/share/man8/zhypinfo.8
        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"
        rm -f $(OBJECTS) libqc.a libqc.so.$(VERSION) qc_test qc_test-sh 
hcpinfbk_qclib.h
        rm -rf html libqc.so.$(VERM)
+       rm -rf zname zhypinfo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/README new/qclib-2.2.0/README
--- old/qclib-2.1.0/README      2020-04-20 12:58:24.000000000 +0200
+++ new/qclib-2.2.0/README      2020-09-11 15:22:30.000000000 +0200
@@ -93,6 +93,14 @@
 Release History:
 ================
 
+2.2.0 (2020-09-09)
+    Changes:
+    - Add new tools zname and zhypinfo
+
+    Bug fixes:
+    - KVM hosts in mixed mode LPARs indicated both, CPs and IFLs, while only
+      CPs are actually used
+
 2.1.0 (2020-04-20)
     Changes:
     - New attributes in support of secure boot in all final layers:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/qc_test.c new/qclib-2.2.0/qc_test.c
--- old/qclib-2.1.0/qc_test.c   2020-04-20 12:58:24.000000000 +0200
+++ new/qclib-2.2.0/qc_test.c   2020-09-11 15:22:30.000000000 +0200
@@ -872,17 +872,17 @@
        *hdl = qc_open(&rc);
        if (rc < 0) {
                if (!quiet)
-                       printf("Error: Could not open configuration, rc=%d\n", 
rc);
+                       printf("Error: Could not open capacity data, rc=%d\n", 
rc);
                return 1;
        }
        if (rc > 0) {
                if (!quiet)
-                       printf("Warning: Configuration could not be opened 
completely, rc=%d\n", rc);
+                       printf("Warning: Capacity data inconsistent, try again 
later (rc=%d)\n", rc);
                return 2;
        }
        if (!*hdl) {
                if (!quiet)
-                       printf("Error: Could not open configuration\n");
+                       printf("Error: Capacity data returned invalid handle, 
rc=%d\n", rc);
                return 3;
        }
        *layers = qc_get_num_layers(*hdl, &rc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/query_capacity.c 
new/qclib-2.2.0/query_capacity.c
--- old/qclib-2.1.0/query_capacity.c    2020-04-20 12:58:24.000000000 +0200
+++ new/qclib-2.2.0/query_capacity.c    2020-09-11 15:22:30.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright IBM Corp. 2013, 2019 */
+/* Copyright IBM Corp. 2013, 2020 */
 
 #define _GNU_SOURCE
 
@@ -111,7 +111,7 @@
                                goto out_err;
                        }
                }
-               qc_debug(NULL, "This is qclib v2.1.0, level 3877f257, date 
2020-04-15 22:20:26 +0200\n");
+               qc_debug(NULL, "This is qclib v2.2.0, level 33725a4f, date 
2020-09-09 17:55:45 +0200\n");
        }
 
        return 0;
@@ -629,7 +629,7 @@
 
 static int qc_post_process_KVM_host(struct qc_handle *hdl) {
        struct qc_handle *parent = qc_get_prev_handle(hdl);
-       int *num_conf, rc;
+       int *num_conf, rc, *cps, *ifls;
 
        qc_debug(hdl, "Fill KVM host layer\n");
        qc_debug_indent_inc();
@@ -647,13 +647,25 @@
        num_conf = qc_get_attr_value_int(parent, qc_num_core_configured);
        if (!num_conf)
                num_conf = qc_get_attr_value_int(parent, qc_num_cpu_configured);
-       rc |= !num_conf ||
-             qc_set_attr_int(hdl, qc_num_core_total, *num_conf, 
ATTR_SRC_POSTPROC) ||
-             qc_copy_attr_value_rename(hdl, qc_num_core_dedicated, parent, 
qc_num_cpu_dedicated) ||
-             qc_copy_attr_value_rename(hdl, qc_num_core_shared, parent, 
qc_num_cpu_shared) ||
-             qc_copy_attr_value(hdl, parent, qc_num_ifl_total) ||
-             qc_copy_attr_value(hdl, parent, qc_num_ifl_dedicated) ||
-             qc_copy_attr_value(hdl, parent, qc_num_ifl_shared);
+       if (!num_conf)
+               rc = 1;
+       if (!rc) {
+               rc |= qc_set_attr_int(hdl, qc_num_core_total, *num_conf, 
ATTR_SRC_POSTPROC) ||
+                     qc_copy_attr_value_rename(hdl, qc_num_core_dedicated, 
parent, qc_num_cpu_dedicated) ||
+                     qc_copy_attr_value_rename(hdl, qc_num_core_shared, 
parent, qc_num_cpu_shared);
+               cps = qc_get_attr_value_int(parent, qc_num_cp_total);
+               ifls = qc_get_attr_value_int(parent, qc_num_cp_total);
+               if (cps && ifls && *cps && *ifls) {
+                       // mixed-mode LPARs use CPs only!
+                       rc |= qc_set_attr_int(hdl, qc_num_ifl_total, 0, 
ATTR_SRC_POSTPROC) ||
+                             qc_set_attr_int(hdl, qc_num_ifl_dedicated, 0, 
ATTR_SRC_POSTPROC) ||
+                             qc_set_attr_int(hdl, qc_num_ifl_shared, 0, 
ATTR_SRC_POSTPROC);
+               } else {
+                       rc |= qc_copy_attr_value(hdl, parent, qc_num_ifl_total) 
||
+                             qc_copy_attr_value(hdl, parent, 
qc_num_ifl_dedicated) ||
+                             qc_copy_attr_value(hdl, parent, 
qc_num_ifl_shared);
+               }
+       }
 
        qc_debug_indent_dec();
 
@@ -1032,3 +1044,33 @@
 
        return rc;
 }
+
+static void qc_start_object(int *jindent, int layer) {
+       printf("%*s\"Layer %d\": {\n", *jindent, "", layer);
+       *jindent += 2;
+}
+static void qc_end_object(int *jindent, int final) {
+       *jindent -= 2;
+       printf("%*s}%s\n", *jindent, "", (final ? "" : ","));
+}
+
+void qc_export_json(void *cfg) {
+       struct qc_handle *hdl = (struct qc_handle *)cfg;
+       int jindent = 0;        // indent for json output
+       int i;
+
+       if (!hdl)
+               return;
+
+       printf("{\n");
+       jindent += 2;
+       for (hdl = hdl->root, i = 0; hdl != NULL; hdl = hdl->next, i++) {
+               qc_start_object(&jindent, i);
+               qc_print_attrs_json(hdl, jindent);
+               qc_end_object(&jindent, hdl->next == NULL);
+       }
+
+       printf("}\n");
+
+       return;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/query_capacity.h 
new/qclib-2.2.0/query_capacity.h
--- old/qclib-2.1.0/query_capacity.h    2020-04-20 12:58:24.000000000 +0200
+++ new/qclib-2.2.0/query_capacity.h    2020-09-11 15:22:30.000000000 +0200
@@ -717,7 +717,7 @@
  * - 1: LPAR layer information, etc.
  * @param value Return parameter returning the string attribute's value or NULL
  * in case of an error.
- @return Indicating validity of the queried attribute as follows:
+ * @return Indicating validity of the queried attribute as follows:
  * - >0  attribute is valid
  * -  0  attribute exists but is not set
  * - <0  an error occurred retrieving the attribute
@@ -739,7 +739,7 @@
  * - 1: LPAR layer information, etc.
  * @param value Return parameter returning the string attribute's value or 
undefined
  * in case of an error.
- @return Indicating validity of the queried attribute as follows:
+ * @return Indicating validity of the queried attribute as follows:
  * - >0  attribute is valid
  * -  0  attribute exists but is not set
  * - <0  an error occurred retrieving the attribute
@@ -762,11 +762,17 @@
  * - 1: LPAR layer information, etc.
  * @param value Return parameter returning the float attribute's value or 
undefined
  * in case of an error.indicating validity as follows:
- @return Indicating validity of the queried attribute as follows:
+ * @return Indicating validity of the queried attribute as follows:
  * - >0  attribute is valid
  * -  0  attribute exists but is not set
  * - <0  an error occurred retrieving the attribute
  */
 int qc_get_attribute_float(void *hdl, enum qc_attr_id id, int layer, float 
*value);
 
+/**
+ * Prints the internal data in JSON format to stdout.
+ * @param hdl Handle of the configuration to use.
+ */
+void qc_export_json(void *hdl);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/query_capacity_data.c 
new/qclib-2.2.0/query_capacity_data.c
--- old/qclib-2.1.0/query_capacity_data.c       2020-04-20 12:58:24.000000000 
+0200
+++ new/qclib-2.2.0/query_capacity_data.c       2020-09-11 15:22:30.000000000 
+0200
@@ -1,4 +1,4 @@
-/* Copyright IBM Corp. 2013, 2019 */
+/* Copyright IBM Corp. 2013, 2020 */
 
 #include "query_capacity_data.h"
 
@@ -122,8 +122,8 @@
        char layer_extended_name[QC_LEN_LAYER_EXTENDED_NAME];
        char layer_uuid[QC_LEN_LAYER_UUID];
        int adjustment;
-        int has_secure;
-        int secure;
+       int has_secure;
+       int secure;
        int num_core_total;
        int num_core_configured;
        int num_core_standby;
@@ -714,17 +714,17 @@
        case qc_num_core_reserved: return "num_core_reserved";
        case qc_num_core_dedicated: return "num_core_dedicated";
        case qc_num_core_shared: return "num_core_shared";
-       case qc_ziip_absolute_capping: return "qc_ziip_absolute_capping";
-       case qc_ziip_capacity_cap: return "qc_ziip_capacity_cap";
-       case qc_ziip_capped_capacity: return "qc_ziip_capped_capacity";
-       case qc_ziip_dispatch_limithard: return "qc_ziip_dispatch_limithard";
-       case qc_ziip_dispatch_type: return "qc_ziip_dispatch_type";
-       case qc_ziip_limithard_cap: return "qc_ziip_limithard_cap";
-       case qc_ziip_weight_capping: return "qc_ziip_weight_capping";
-       case qc_num_ziip_dedicated: return "qc_num_ziip_dedicated";
-       case qc_num_ziip_shared: return "qc_num_ziip_shared";
-       case qc_num_ziip_total: return "qc_num_ziip_total";
-       case qc_num_ziip_threads: return "qc_num_ziip_threads";
+       case qc_ziip_absolute_capping: return "ziip_absolute_capping";
+       case qc_ziip_capacity_cap: return "ziip_capacity_cap";
+       case qc_ziip_capped_capacity: return "ziip_capped_capacity";
+       case qc_ziip_dispatch_limithard: return "ziip_dispatch_limithard";
+       case qc_ziip_dispatch_type: return "ziip_dispatch_type";
+       case qc_ziip_limithard_cap: return "ziip_limithard_cap";
+       case qc_ziip_weight_capping: return "ziip_weight_capping";
+       case qc_num_ziip_dedicated: return "num_ziip_dedicated";
+       case qc_num_ziip_shared: return "num_ziip_shared";
+       case qc_num_ziip_total: return "num_ziip_total";
+       case qc_num_ziip_threads: return "num_ziip_threads";
        default: break;
        }
        qc_debug(hdl, "Error: Cannot convert unknown attribute '%d' to 
char*\n", id);
@@ -1168,3 +1168,27 @@
 char qc_get_attr_value_src_string(struct qc_handle *hdl, enum qc_attr_id id) {
        return qc_get_attr_value_src(hdl, id, string);
 }
+
+void qc_print_attrs_json(struct qc_handle *hdl, int indent) {
+        struct qc_attr *attr;
+        void *val;
+
+        for (attr = hdl->attr_list; attr->offset >= 0; attr++) {
+                if ((val = qc_get_attr_value(hdl, attr->id, attr->type)) == 
NULL)
+                        printf("%*s\"%s\": null", indent, "", 
qc_attr_id_to_char(hdl, attr->id));
+                else {
+                        switch (attr->type) {
+                        case integer:
+                                printf("%*s\"%s\": \"%d\"", indent, "", 
qc_attr_id_to_char(hdl, attr->id), *(int*)val);
+                                break;
+                        case floatingpoint:
+                                printf("%*s\"%s\": \"%f\"", indent, "", 
qc_attr_id_to_char(hdl, attr->id), *(float*)val);
+                                break;
+                        case string:
+                                printf("%*s\"%s\": \"%s\"", indent, "", 
qc_attr_id_to_char(hdl, attr->id), (char*)val);
+                                break;
+                        }
+                }
+                printf("%s\n", (attr + 1)->offset >= 0 ? "," : "");
+        }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/query_capacity_data.h 
new/qclib-2.2.0/query_capacity_data.h
--- old/qclib-2.1.0/query_capacity_data.h       2020-04-20 12:58:24.000000000 
+0200
+++ new/qclib-2.2.0/query_capacity_data.h       2020-09-11 15:22:30.000000000 
+0200
@@ -26,4 +26,7 @@
 char qc_get_attr_value_src_int(struct qc_handle *hdl, enum qc_attr_id id);
 char qc_get_attr_value_src_float(struct qc_handle *hdl, enum qc_attr_id id);
 char qc_get_attr_value_src_string(struct qc_handle *hdl, enum qc_attr_id id);
+
+// print all attributes in the list in json format
+void qc_print_attrs_json(struct qc_handle *hdl, int indent);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/query_capacity_int.h 
new/qclib-2.2.0/query_capacity_int.h
--- old/qclib-2.1.0/query_capacity_int.h        2020-04-20 12:58:24.000000000 
+0200
+++ new/qclib-2.2.0/query_capacity_int.h        2020-09-11 15:22:30.000000000 
+0200
@@ -89,17 +89,17 @@
 
 
 #ifdef CONFIG_DEBUG_TIMESTAMPS
-#define qc_debug(hdl, arg, ...)        if (qc_dbg_level > 0) { \
+#define qc_debug(hdl, arg, ...)        do {if (qc_dbg_level > 0) { \
                                        time_t t; \
                                        struct tm *tm; \
                                        time(&t); \
                                        tm = localtime(&t); \
                                        fprintf(qc_dbg_file, 
"%02d/%02d,%02d:%02d:%02d,%-10p: %*s" arg, \
                                        tm->tm_mon + 1, tm->tm_mday, 
tm->tm_hour, tm->tm_min, tm->tm_sec, qc_get_root_handle(hdl), qc_dbg_indent, 
"", ##__VA_ARGS__); \
-                               }
+                               } }while(0);
 #else
-#define qc_debug(hdl, arg, ...)        if (qc_dbg_level > 0) { \
+#define qc_debug(hdl, arg, ...)        do {if (qc_dbg_level > 0) { \
                                        fprintf(qc_dbg_file, "%-10p: %*s" arg, 
qc_get_root_handle(hdl), qc_dbg_indent, "", ##__VA_ARGS__); \
-                               }
+                               } } while(0);
 #endif
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/zhypinfo.8 new/qclib-2.2.0/zhypinfo.8
--- old/qclib-2.1.0/zhypinfo.8  1970-01-01 01:00:00.000000000 +0100
+++ new/qclib-2.2.0/zhypinfo.8  2020-09-11 15:22:30.000000000 +0200
@@ -0,0 +1,70 @@
+.\" Copyright IBM Corp. 2020
+.\" ----------------------------------------------------------------------
+
+.TH ZHYPINFO 8 "September 2020" "qclib" "System Administration Commands"
+
+.SH NAME
+zhypinfo \- Print information about virtualization layers on IBM Z.
+
+.SH SYNOPSIS
+
+.B zhypinfo [OPTION]
+
+.SH Description
+.B zhypinfo
+prints information about virtualization layers on IBM Z in a
+tabular format.
+.P
+.B Notes
+.IP \[bu] 2
+Not all information might be available, and unavailable
+data is indicated by a dash '-'.
+.IP \[bu]
+Some environments might map certain CPU types to CPUs of other
+types, including specialty engines.
+.IP \[bu]
+CPU Pools can define fractions of logical CPUs.
+
+
+.SH OUTPUT
+.SS "#"
+Index number of the respective layer.
+.SS "Layer_Type"
+Type of virtualization layer.
+.SS "Lvl"
+Virtualization level, where each layer of category 'HOST' constitutes a
+new level.
+.SS "Categ"
+Cathegory the virtualization layer belongs to.
+.SS "Name"
+Name of the respective entity.
+.SS "IFLs"
+Number of logical IFLs defined for the layer.
+.SS "CPs"
+Number of logical CPs defined for the layer.
+.SS "Total"
+Sum of logical CPUs in the layer.
+
+
+.SH OPTIONS
+.TP
+.BR "\-h, \-\-help"
+Print usage information and exit.
+.TP
+.BR "\-j, \-\-json"
+Dump all available data in JSON format. Known limitation: No character set
+conversion or proper escaping is performed.
+.TP
+.BR "\-l, \-\-layers"
+Print number of layers.
+.TP
+.BR "\-L, \-\-levels"
+Print number of virtualization levels.
+
+.SH RETURN CODES
+Successful \fBzhypinfo\fR commands return 0.
+If an error occurs, \fBzhypinfo\fR writes a message to stderr and
+completes with a return code other than 0.
+.P
+.SH SEE ALSO
+.BR zname (8)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/zhypinfo.c new/qclib-2.2.0/zhypinfo.c
--- old/qclib-2.1.0/zhypinfo.c  1970-01-01 01:00:00.000000000 +0100
+++ new/qclib-2.2.0/zhypinfo.c  2020-09-11 15:22:30.000000000 +0200
@@ -0,0 +1,218 @@
+/* Copyright IBM Corp. 2020 */
+
+#include "zhypinfo.h"
+
+static int get_max_level(void *hdl, int layers) {
+       int lvl = 0, cat;
+
+       for (; layers >= 0; layers--) {
+               if (qc_get_attribute_int(hdl, qc_layer_category_num, layers, 
&cat) < 0)
+                       return -1;
+               if (cat == QC_LAYER_CAT_HOST)
+                       lvl++;
+       }
+
+       return --lvl;
+}
+
+static void print_CPU(int count) {
+       if (count < 0)
+               printf("      -");
+       else
+               printf("  %5d", count);
+}
+
+static void print_pool_CPU(float count) {
+       if (count < 0)
+               printf("      -");
+       else
+               printf("  %5.1f", count / 65536.);
+}
+
+/** Calculate the total from two values that might include invalids (indicated 
by <0) */
+static int get_total_from(int a, int b) {
+       if (a >= 0) {
+               if (b >= 0)
+                       return a + b;
+               else
+                       return a;
+       } else
+               return b;
+}
+
+static void print_pool_cpu_counts(void *hdl, int layer, int id_cp, int id_ifl) 
{
+       int cp, ifl, total;
+
+       if (qc_get_attribute_int(hdl, id_ifl, layer, &ifl) <= 0)
+               ifl = -1;
+       if (qc_get_attribute_int(hdl, id_cp, layer, &cp) <= 0)
+               cp = -1;
+       total = get_total_from(ifl, cp);
+       print_pool_CPU(ifl);
+       print_pool_CPU(cp);
+       print_pool_CPU(total);
+}
+
+static void print_cpu_counts(void *hdl, int layer, int id_ifl, int id_cp, int 
id_total) {
+       int ifl, cp, total;
+
+       if (qc_get_attribute_int(hdl, id_ifl, layer, &ifl) <= 0)
+               ifl = -1;
+       if (qc_get_attribute_int(hdl, id_cp, layer, &cp) <= 0)
+               cp = -1;
+       if (id_total >= 0) {
+               if (qc_get_attribute_int(hdl, id_total, layer, &total) <= 0)
+                       total = -1;
+       } else
+               total = get_total_from(ifl, cp);
+       print_CPU(ifl);
+       print_CPU(cp);
+       print_CPU(total);
+}
+
+static int print_layers(void *hdl, int print_lvls, int print_lays) {
+       int rc, layer, lvl, ifl, cp, type_num, total, cat;
+       const char *layer_type, *name, *type;
+
+       layer = qc_get_num_layers(hdl, &rc) - 1;
+       if (rc)
+               return rc;
+       lvl = get_max_level(hdl, layer);
+       if (lvl < 0)
+               return -1;
+       if (print_lays) {
+               printf("%d\n", layer + 1);
+               return 0;
+       }
+       if (print_lvls) {
+               printf("%d\n", lvl + 1);
+               return 0;
+       }
+       printf("  #  Layer_Type                  Lvl  Categ  Name       IFLs    
CPs  Total\n");
+       
printf("--------------------------------------------------------------------------\n");
+       for (; layer >= 0; layer--) {
+               if (qc_get_attribute_string(hdl, qc_layer_type, layer, 
&layer_type) < 0 ||
+                   qc_get_attribute_string(hdl, qc_layer_category, layer, 
&type) < 0 ||
+                   qc_get_attribute_string(hdl, qc_layer_name, layer, &name) < 
0 ||
+                   qc_get_attribute_int(hdl, qc_layer_category_num, layer, 
&cat) < 0 ||
+                   qc_get_attribute_int(hdl, qc_layer_type_num, layer, 
&type_num) < 0)
+                       return -1;
+
+               printf("%3d  %-26s  %3d  %-5s  %-8s", layer, layer_type, lvl, 
type, name ? name : "   -");
+               // some layers don't have all CPU types or are very special
+               switch (type_num) {
+                       case QC_LAYER_TYPE_LPAR_GROUP:
+                               print_pool_cpu_counts(hdl, layer, 
qc_cp_absolute_capping, qc_ifl_absolute_capping);
+                               break;
+                       case QC_LAYER_TYPE_ZOS_TENANT_RESOURCE_GROUP:
+                               print_pool_cpu_counts(hdl, layer, 
qc_cp_capped_capacity, qc_ziip_capped_capacity);
+                               break;
+                       case QC_LAYER_TYPE_ZVM_RESOURCE_POOL:
+                               print_pool_cpu_counts(hdl, layer, 
qc_cp_capped_capacity, qc_ifl_capped_capacity);
+                               break;
+                       case QC_LAYER_TYPE_CEC:
+                               // Getting the total is a bit more complicated
+                               total = -1;
+                               if (qc_get_attribute_int(hdl, 
qc_num_core_dedicated, layer, &ifl) > 0 &&
+                                   qc_get_attribute_int(hdl, 
qc_num_core_shared, layer, &cp) > 0)
+                                       total = ifl + cp;
+                               if (qc_get_attribute_int(hdl, qc_num_ifl_total, 
layer, &ifl) <= 0)
+                                       ifl = -1;
+                               if (qc_get_attribute_int(hdl, qc_num_cp_total, 
layer, &cp) <= 0)
+                                       cp = -1;
+                               print_CPU(ifl);
+                               print_CPU(cp);
+                               print_CPU(total);
+                               break;
+                       case QC_LAYER_TYPE_LPAR:
+                               print_cpu_counts(hdl, layer, qc_num_ifl_total, 
qc_num_cp_total, -1);
+                               break;
+                       case QC_LAYER_TYPE_ZVM_HYPERVISOR:
+                       case QC_LAYER_TYPE_KVM_HYPERVISOR:
+                               print_cpu_counts(hdl, layer, qc_num_ifl_total, 
qc_num_cp_total, qc_num_core_total);
+                               break;
+                       case QC_LAYER_TYPE_KVM_GUEST:
+                               if (qc_get_attribute_int(hdl, qc_num_ifl_total, 
layer, &ifl) <= 0)
+                                       ifl = -1;
+                               print_CPU(ifl);
+                               print_CPU(0);
+                               print_CPU(ifl);
+                               break;
+                       case QC_LAYER_TYPE_ZOS_HYPERVISOR:
+                               // we map zIIPs to IFLs for z/OS
+                               print_cpu_counts(hdl, layer, qc_num_ziip_total, 
qc_num_cp_total, -1);
+                               break;
+                       case QC_LAYER_TYPE_ZOS_ZCX_SERVER:
+                               // we map zIIPs to IFLs for z/OS
+                               print_cpu_counts(hdl, layer, qc_num_ziip_total, 
qc_num_cp_total, -1);
+                               break;
+                       default:
+                               print_cpu_counts(hdl, layer, qc_num_ifl_total, 
qc_num_cp_total, qc_num_cpu_total);
+                               break;
+               }
+               printf("\n");
+
+               if (cat == QC_LAYER_CAT_HOST)
+                       lvl--;
+       }
+
+       return 0;
+}
+
+static void print_help() {
+       printf("\n");
+       printf("Usage: zhypinfo [OPTION]\n");
+       printf("\n");
+       printf("Print information about virtualization layers on IBM Z.\n");
+       printf("\n");
+       printf("  -h, --help           Print usage information and exit\n");
+       printf("  -j, --json           Dump all available data in JSON 
format\n");
+       printf("  -l, --layers         Print number of layers\n");
+       printf("  -L, --levels         Print number of virtualization 
levels\n");
+       printf("\n");
+}
+
+int main(int argc, char **argv) {
+       static struct option long_options[] = {
+               { "help",               no_argument, NULL, 'h'},
+               { "json",               no_argument, NULL, 'j'},
+               { "layers",             no_argument, NULL, 'l'},
+               { "levels",             no_argument, NULL, 'L'},
+               { 0,                    0,           0,    0  }
+       };
+       int layers, rc = 0, json = 0, lvls = 0, lays = 0;
+       void *hdl = NULL;
+       int c;
+
+       while ((c = getopt_long(argc, argv, "hjlL", long_options, NULL)) != 
EOF) {
+               switch (c) {
+               case 'h': print_help();
+                         return 0;
+               case 'j': json = 1;
+                         break;
+               case 'l': lays = 1;
+                         break;
+               case 'L': lvls = 1;
+                         break;
+               default:  print_help();
+                         return 1;
+               }
+       }
+
+       if ((rc = get_handle(&hdl, &layers)) != 0)
+               goto out;
+       if (json + lays + lvls > 1) {
+               fprintf(stderr, "Error: Only one of options --json, --layers 
and --levels is allowed\n");
+               return 2;
+       }
+       if (json) {
+               qc_export_json(hdl);
+               return 0;
+       }
+       rc = print_layers(hdl, lvls, lays);
+
+out:
+       qc_close(hdl);
+
+       return rc;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/zhypinfo.h new/qclib-2.2.0/zhypinfo.h
--- old/qclib-2.1.0/zhypinfo.h  1970-01-01 01:00:00.000000000 +0100
+++ new/qclib-2.2.0/zhypinfo.h  2020-09-11 15:22:30.000000000 +0200
@@ -0,0 +1,38 @@
+/* Copyright IBM Corp. 2020 */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <getopt.h>
+
+#include "query_capacity.h"
+
+
+int get_handle(void **hdl, int *layers) {
+       int rc;
+
+       *hdl = qc_open(&rc);
+       if (rc < 0) {
+               fprintf(stderr, "Error: Could not open capacity data, rc=%d\n", 
rc);
+               return rc;
+       }
+       if (rc > 0) {
+               fprintf(stderr, "Warning: Capacity data inconsistent, try again 
later (rc=%d)\n", rc);
+               return rc;
+       }
+       if (!*hdl) {
+               fprintf(stderr, "Error: Capacity data returned invalid handle, 
rc=%d\n", rc);
+               return rc;
+       }
+       *layers = qc_get_num_layers(*hdl, &rc);
+       if (rc != 0) {
+               fprintf(stderr, "Error: Could not retrieve number of layers, 
rc=%d\n", rc);
+               return rc;
+       }
+       if (*layers < 1) {
+               fprintf(stderr, "Error: Invalid number of layers: %d\n", 
*layers);
+               return 1;
+       }
+
+       return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/zname.8 new/qclib-2.2.0/zname.8
--- old/qclib-2.1.0/zname.8     1970-01-01 01:00:00.000000000 +0100
+++ new/qclib-2.2.0/zname.8     2020-09-11 15:22:30.000000000 +0200
@@ -0,0 +1,49 @@
+.\" Copyright IBM Corp. 2020
+.\" ----------------------------------------------------------------------
+
+.TH ZNAME 8 "September 2020" "qclib" "System Administration Commands"
+
+.SH NAME
+zname \- Print information about the IBM Z hardware.
+
+.SH SYNOPSIS
+
+.B zname [OPTIONS]
+
+
+
+
+.SH OPTIONS
+By default,
+.B zname
+shows the model name. If any information is not available, '<unavailable>'
+is returned instead.
+.TP
+.BR "\-a, \-\-all"
+Print all available information.
+.TP
+.BR "\-c, \-\-capacity"
+Print capacity information.
+.TP
+.BR "\-i, \-\-cpuid"
+Print the CPU identifier.
+.TP
+.BR "\-h, \-\-help"
+Print usage information and exit.
+.TP
+.BR "\-m, \-\-model"
+Print model information.
+.TP
+.BR "\-n, \-\-name"
+Print the model name (default).
+.TP
+.BR "\-u, \-\-manufacturer"
+Print manufacturer information.
+
+.SH RETURN CODES
+Successful \fBzname\fR commands return 0.
+If an error occurs, \fBzname\fR writes a message to stderr and
+completes with a return code other than 0.
+.P
+.SH SEE ALSO
+.BR zhypinfo (8)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qclib-2.1.0/zname.c new/qclib-2.2.0/zname.c
--- old/qclib-2.1.0/zname.c     1970-01-01 01:00:00.000000000 +0100
+++ new/qclib-2.2.0/zname.c     2020-09-11 15:22:30.000000000 +0200
@@ -0,0 +1,120 @@
+/* Copyright IBM Corp. 2019, 2020 */
+
+#include "zhypinfo.h"
+
+#define OPTS_ALL               (1<<0)
+#define OPTS_CAPACITY          (1<<1)
+#define OPTS_CPUID             (1<<2)
+#define OPTS_MODEL             (1<<3)
+#define OPTS_MANUFACTURER      (1<<4)
+#define OPTS_NAME              (1<<5)
+
+
+int print_model_info(void *hdl, int layer, int opts) {
+       const char *mdl_name, *cpu_id, *manufacturer, *capacity, *model;
+
+       if (qc_get_attribute_string(hdl, qc_type_name, layer, &mdl_name) < 0
+           || qc_get_attribute_string(hdl, qc_type, layer, &cpu_id) < 0
+           || qc_get_attribute_string(hdl, qc_manufacturer, layer, 
&manufacturer) < 0
+           || qc_get_attribute_string(hdl, qc_model_capacity, layer, 
&capacity) < 0
+           || qc_get_attribute_string(hdl, qc_model, layer, &model) < 0)
+               return 1;
+
+       if (opts & OPTS_ALL) {
+               printf("%s %s %s %s %s\n", (mdl_name ? mdl_name : 
"<unavailable>"),
+                                          (model ? model : "<unavailable>"),
+                                          (capacity ? capacity : 
"<unavailable>"),
+                                          (cpu_id ? cpu_id : "<unavailable>"),
+                                          (manufacturer ? manufacturer : 
"<unavailable>"));
+       } else {
+               if (opts & OPTS_NAME)
+                       printf("%s ", (mdl_name ? mdl_name : "<unavailable>"));
+               if (opts & OPTS_MODEL)
+                       printf("%s ", (model ? model : "<unavailable>"));
+               if (opts & OPTS_CAPACITY)
+                       printf("%s ", (capacity ? capacity : "<unavailable>"));
+               if (opts & OPTS_CPUID)
+                       printf("%s ", (cpu_id ? cpu_id : "<unavailable>"));
+               if (opts & OPTS_MANUFACTURER)
+                       printf("%s ", (manufacturer ? manufacturer : 
"<unavailable>"));
+               printf("\n");
+       }
+
+       return 0;
+}
+
+static void print_help() {
+       printf("\n");
+       printf("Usage: zname [OPTIONS]\n");
+       printf("\n");
+       printf("Print information about IBM Z hardware.\n");
+       printf("\n");
+       printf("  -a, --all            Print all available information\n");
+       printf("  -c, --capacity       Print capacity information\n");
+       printf("  -h, --help           Print usage information and exit\n");
+       printf("  -i, --cpuid          Print the CPU identifier\n");
+       printf("  -m, --model          Print model information\n");
+       printf("  -n, --name           Print the model name (default)\n");
+       printf("  -u, --manufacturer   Print manufacturer information\n");
+       printf("\n");
+}
+
+int main(int argc, char **argv) {
+       static struct option long_options[] = {
+               { "all",                no_argument, NULL, 'a'},
+               { "capacity",           no_argument, NULL, 'c'},
+               { "cpuid",              no_argument, NULL, 'i'},
+               { "help",               no_argument, NULL, 'h'},
+               { "manufacturer",       no_argument, NULL, 'u'},
+               { "model",              no_argument, NULL, 'm'},
+               { "name",               no_argument, NULL, 'n'},
+               { 0,                    0,           0,    0  }
+       };
+       int layers, i, type, opts = 0, rc = 0;
+       void *hdl = NULL;
+       int c;
+
+       while ((c = getopt_long(argc, argv, "acihumn", long_options, NULL)) != 
EOF) {
+               switch (c) {
+               case 'a': opts |= OPTS_ALL;
+                         break;
+               case 'c': opts |= OPTS_CAPACITY;
+                         break;
+               case 'h': print_help();
+                         return 0;
+               case 'i': opts |= OPTS_CPUID;
+                         break;
+               case 'm': opts |= OPTS_MODEL;
+                         break;
+               case 'n': opts |= OPTS_NAME;
+                         break;
+               case 'u': opts |= OPTS_MANUFACTURER;
+                         break;
+               default:  print_help();
+                         return 1;
+               }
+       }
+       if (!opts)
+               opts = OPTS_NAME;
+
+       if ((rc = get_handle(&hdl, &layers)) != 0)
+               goto out;
+
+       for (i = 0; i < layers; i++) {
+               if (qc_get_attribute_int(hdl, qc_layer_type_num, i, &type) <= 
0) {
+                       fprintf(stderr, "Error: Failed to retrieve layer type 
information\n");
+                       rc = 1;
+                       goto out;
+               }
+               if (type == QC_LAYER_TYPE_CEC) {
+                       rc = print_model_info(hdl, i, opts);
+                       goto out;
+               }
+       }
+       fprintf(stderr, "Error: Could not retrieve CEC information\n");
+
+out:
+       qc_close(hdl);
+
+       return rc;
+}

++++++ qclib.fix.missing.makefile.if.statement.patch ++++++
--- qclib-2.2.0/Makefile        2020-09-19 00:27:40.249451093 +0200
+++ qclib-2.2.99/Makefile       2020-09-19 00:21:59.292489845 +0200
@@ -74,50 +75,6 @@ html: $(CFILES) query_capacity.h query_c
                echo "Error: 'doxygen' not installed"; \
        fi
 
-               cppcheck query_capacity*.[ch] 2>&1 | sed 's/^/   /'; \
-       else \
-               echo "cppcheck not available"; \
-       fi
-       @echo;
-       -@if which smatch >/dev/null 2>&1; then \
-               echo "Running smatch"; \
-               smatch query_capacity*.[ch] 2>&1 | sed 's/^/   /'; \
-       else \
-               echo "smatch not available"; \
-       fi
-       @echo;
-       -@if which sparse >/dev/null 2>&1; then \
-               echo "Running sparse"; \
-               sparse -Wsparse-all query_capacity*.[ch] 2>&1 | sed 's/^/   /'; 
\
-       else \
-               echo "sparse not available"; \
-       fi
-       @echo;
-       -@if which valgrind >/dev/null 2>&1; then \
-               echo "Running valgrind: qc_test"; \
-               LD_LIBRARY_PATH=. valgrind --leak-check=full 
--show-leak-kinds=all ./qc_test-sh `find regtest_data -maxdepth 1 -mindepth 1 
-type d | \
-                       grep -ve "^regtest_data/extras_" | sort` 2>&1 | grep -A 
100 "HEAP SUMMARY:" | sed 's/^/   /'; \
-               echo; \
-               echo "zname: Running valgrind: zname -a"; \
-               QC_USE_DUMP=regtest_data/dump_r3545038 LD_LIBRARY_PATH=. 
valgrind --leak-check=full --show-leak-kinds=all ./zname -a | \
-                       grep -A 100 "HEAP SUMMARY:" | sed 's/^/   /'; \
-               echo; \
-               echo "zname: Running valgrind: zhypinfo"; \
-               QC_USE_DUMP=regtest_data/dump_r3545038 LD_LIBRARY_PATH=. 
valgrind --leak-check=full --show-leak-kinds=all ./zhypinfo | \
-                       grep -A 100 "HEAP SUMMARY:" | sed 's/^/   /'; \
-               echo; \
-               echo "zname: Running valgrind: zhypinfo -L"; \
-               QC_USE_DUMP=regtest_data/dump_r3545038 LD_LIBRARY_PATH=. 
valgrind --leak-check=full --show-leak-kinds=all ./zhypinfo -L | \
-                       grep -A 100 "HEAP SUMMARY:" | sed 's/^/   /'; \
-               echo; \
-               echo "Running callgrind: qctest"; \
-               LD_LIBRARY_PATH=. valgrind --callgrind-out-file=/dev/null 
--tool=callgrind ./zhypinfo -l `find regtest_data -maxdepth 1 -mindepth 1 -type 
d | \
-                       grep -ve "^regtest_data/extras_" | sort` 2>&1 | grep 
"refs:" | sed 's/^/   /'; \
-       else \
-               echo "valgrind not available"; \
-       fi
-       @echo;
-
 install: libqc.a libqc.so.$(VERSION)
        echo "  INSTALL"
        install -Dm 644 libqc.a $(DESTDIR)/usr/lib64/libqc.a
++++++ qclib.makefile.libdir.patch ++++++
--- /var/tmp/diff_new_pack.JHk5CR/_old  2020-09-24 16:14:15.552899529 +0200
+++ /var/tmp/diff_new_pack.JHk5CR/_new  2020-09-24 16:14:15.556899533 +0200
@@ -1,6 +1,14 @@
---- qclib-1.0.0/Makefile       2015-10-26 07:46:09.000000000 +0100
-+++ qclib-1.0.0/Makefile       2015-10-26 07:50:21.000000000 +0100
-@@ -64,10 +64,10 @@
+--- qclib-2.2.0/Makefile       2015-10-26 07:46:09.000000000 +0100
++++ qclib-2.2.0/Makefile       2015-10-26 07:50:21.000000000 +0100
+@@ -13,6 +13,7 @@
+ OBJECTS = $(patsubst %.c,%.o,$(CFILES))
+ .SUFFIXES: .o .c
+ DOCDIR        ?= /usr/share/doc/packages/
++MANDIR        ?= $(INSTALLDIR)/usr/share/man
+ 
+ ifneq ("${V}","1")
+         MAKEFLAGS += --quiet
+@@ -76,14 +77,14 @@
  
  install: libqc.a libqc.so.$(VERSION)
        echo "  INSTALL"
@@ -12,6 +20,12 @@
 +      install -Dm 755 libqc.so.$(VERSION) 
$(DESTDIR)/usr/$(LIBDIR)/libqc.so.$(VERSION)
 +      ln -sr $(DESTDIR)/usr/$(LIBDIR)/libqc.so.$(VERSION) 
$(DESTDIR)/usr/$(LIBDIR)/libqc.so.$(VERM)
 +      ln -sr $(DESTDIR)/usr/$(LIBDIR)/libqc.so.$(VERSION) 
$(DESTDIR)/usr/$(LIBDIR)/libqc.so
+       install -Dm 755 zname $(DESTDIR)/usr/bin/zname
+       install -Dm 755 zhypinfo $(DESTDIR)/usr/bin/zhypinfo
+-      install -Dm 644 zname.8 $(DESTDIR)/usr/share/man8/zname.8
+-      install -Dm 644 zhypinfo.8 $(DESTDIR)/usr/share/man8/zhypinfo.8
++      install -Dm 644 zname.8 $(DESTDIR)$(MANDIR)/man8/zname.8
++      install -Dm 644 zhypinfo.8 $(DESTDIR)$(MANDIR)/man8/zhypinfo.8
        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


Reply via email to