aboutsummaryrefslogtreecommitdiffstats
path: root/main/libvirt
diff options
context:
space:
mode:
Diffstat (limited to 'main/libvirt')
-rw-r--r--main/libvirt/APKBUILD24
-rw-r--r--main/libvirt/nodeinfo-musl.patch144
-rw-r--r--main/libvirt/physmem.patch34
3 files changed, 8 insertions, 194 deletions
diff --git a/main/libvirt/APKBUILD b/main/libvirt/APKBUILD
index 4a85e30ce3..5e31c3ecf5 100644
--- a/main/libvirt/APKBUILD
+++ b/main/libvirt/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=libvirt
-pkgver=1.2.3
+pkgver=1.2.4
_ver="${pkgver/_rc/-rc}"
-pkgrel=3
+pkgrel=0
pkgdesc="A virtualization API for several hypervisor and container systems"
url="http://libvirt.org/"
arch="all"
@@ -25,9 +25,7 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-client $pkgname-daemon
source="http://libvirt.org/sources/$pkgname-$pkgver.tar.gz
libvirt.confd
libvirt.initd
- physmem.patch
musl-fix-includes.patch
- nodeinfo-musl.patch
"
if [ "$CARCH" = "x86_64" ]; then
@@ -168,21 +166,15 @@ _common_drivers() {
"$subpkgdir"/etc/libvirt/
}
-md5sums="ad1602a2fcc3609c83b885a28f3eecbd libvirt-1.2.3.tar.gz
+md5sums="da7a9ca519df45a460659189fe0024e6 libvirt-1.2.4.tar.gz
1c84a7baeafe0a7f4e9d7ae5180311b7 libvirt.confd
d897df38c7e7fa1a297aa551108633c9 libvirt.initd
-2d44db1a1e849decd709ccf07098c475 physmem.patch
-9da7723b114b2d87558e92828366fbcb musl-fix-includes.patch
-b72fb72fdd8727aa0393f8b627bbe57b nodeinfo-musl.patch"
-sha256sums="b489d1a29c6166643d34b72795a89b03c6ac775cdaeadb6aa86fc1a982c02e31 libvirt-1.2.3.tar.gz
+9da7723b114b2d87558e92828366fbcb musl-fix-includes.patch"
+sha256sums="e43ac5f6b2baeafcd01777be03a897e636f8d48c0cdfb4c4cbb80d45faa9e875 libvirt-1.2.4.tar.gz
851ab3f9678f0fa9c3ee03f7fc7bd00c4ee86d5f0777eecf9eb1ffe3243adfd1 libvirt.confd
e9fad203434ffaa6afe524e42a9fb6594edad61cb02b1ca60a68d1a7fe0c31ab libvirt.initd
-316a9783c162757d2b8530a65eccdc0d25975037699844679ffc3c7aee5206a6 physmem.patch
-8dfa9dbe71ee21dc53e44bd7cc0127adde1bf3371d6b393657b386bb83f8139b musl-fix-includes.patch
-cbd60f09a0e666a22ed3f8cfb9670820c46796c56a4254ed1f84b5371c33f501 nodeinfo-musl.patch"
-sha512sums="5ff85a98a0c62229d0ab8125d20fce982f8497d20cb89758bc37f475d7a5d59caa6d962e6c2313e1c494ca1648a836fcad253ceaccc34cc0060135470be3db5b libvirt-1.2.3.tar.gz
+8dfa9dbe71ee21dc53e44bd7cc0127adde1bf3371d6b393657b386bb83f8139b musl-fix-includes.patch"
+sha512sums="49be7fe73cbcdf51e6978740fd3603f21f813c388da89a139a09195d68d3ff445d2c939a1ea212c7498e8c2ace9685a8fb52dfd8ccb88a26ecf9b4228d502616 libvirt-1.2.4.tar.gz
9aba6ab73219a635c64a340ee8887356e644445c9128734cbce73f5d54778378da2f10a190365ad88a7db8bc95b1fb17f0c6ca41fc41bb786c09e1afe84d65dc libvirt.confd
f48c97f93ef4509a86eda6200b3aae5b2c0c6263403bde933b770fd62240dca27bc439bd29b440ea6a47c8337f8b4511230ed915cb5ff54d9a1cf311863f6fa1 libvirt.initd
-4c876a89dee4cc793ce64a0bf43db4f493d1d47409a9fab727b8b0f182e4b25017aa4371afd96ce081dab4aa3e93c6c5ad46e0e6fc2c2076a9da50632ef7f06e physmem.patch
-b6142256bf2700b9e5335c60fe5628e4095a24689c31d54afcab46f46a06b9c0ae676f87f77a487377eafbec11fb7afa9b994aef48a10a39e82f47c45df008ba musl-fix-includes.patch
-e479bf1317fd30136dbc3bb76d6dfb59934a36fa6db67087c8f0898558d797db40e2e963bb990446479f8d4d7ead25e95876a3d43245034376b8418a4805f3e2 nodeinfo-musl.patch"
+b6142256bf2700b9e5335c60fe5628e4095a24689c31d54afcab46f46a06b9c0ae676f87f77a487377eafbec11fb7afa9b994aef48a10a39e82f47c45df008ba musl-fix-includes.patch"
diff --git a/main/libvirt/nodeinfo-musl.patch b/main/libvirt/nodeinfo-musl.patch
deleted file mode 100644
index 85caf31a5b..0000000000
--- a/main/libvirt/nodeinfo-musl.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-diff --git a/src/nodeinfo.c b/src/nodeinfo.c
-index 53ba716..f239d4a 100644
---- a/src/nodeinfo.c
-+++ b/src/nodeinfo.c
-@@ -440,6 +440,7 @@ virNodeParseNode(const char *node,
- int siblings;
- unsigned int cpu;
- int online;
-+ int direrr;
-
- *threads = 0;
- *cores = 0;
-@@ -452,8 +453,7 @@ virNodeParseNode(const char *node,
-
- /* enumerate sockets in the node */
- CPU_ZERO(&sock_map);
-- errno = 0;
-- while ((cpudirent = readdir(cpudir))) {
-+ while ((direrr = virDirRead(cpudir, &cpudirent, node)) == 0) {
- if (sscanf(cpudirent->d_name, "cpu%u", &cpu) != 1)
- continue;
-
-@@ -470,14 +470,10 @@ virNodeParseNode(const char *node,
-
- if (sock > sock_max)
- sock_max = sock;
--
-- errno = 0;
- }
-
-- if (errno) {
-- virReportSystemError(errno, _("problem reading %s"), node);
-+ if (direrr < 0)
- goto cleanup;
-- }
-
- sock_max++;
-
-@@ -490,8 +486,7 @@ virNodeParseNode(const char *node,
-
- /* iterate over all CPU's in the node */
- rewinddir(cpudir);
-- errno = 0;
-- while ((cpudirent = readdir(cpudir))) {
-+ while ((direrr = virDirRead(cpudir, &cpudirent, node)) == 0) {
- if (sscanf(cpudirent->d_name, "cpu%u", &cpu) != 1)
- continue;
-
-@@ -530,14 +525,10 @@ virNodeParseNode(const char *node,
-
- if (siblings > *threads)
- *threads = siblings;
--
-- errno = 0;
- }
-
-- if (errno) {
-- virReportSystemError(errno, _("problem reading %s"), node);
-+ if (direrr < 0)
- goto cleanup;
-- }
-
- /* finalize the returned data */
- *sockets = CPU_COUNT(&sock_map);
-@@ -576,6 +567,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
- int ret = -1;
- char *sysfs_nodedir = NULL;
- char *sysfs_cpudir = NULL;
-+ int direrr;
-
- /* Start with parsing CPU clock speed from /proc/cpuinfo */
- while (fgets(line, sizeof(line), cpuinfo) != NULL) {
-@@ -672,8 +664,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
- goto fallback;
- }
-
-- errno = 0;
-- while ((nodedirent = readdir(nodedir))) {
-+ while ((direrr = virDirRead(nodedir, &nodedirent, sysfs_nodedir)) == 0) {
- if (sscanf(nodedirent->d_name, "node%u", &node) != 1)
- continue;
-
-@@ -699,14 +690,10 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
-
- if (threads > nodeinfo->threads)
- nodeinfo->threads = threads;
--
-- errno = 0;
- }
-
-- if (errno) {
-- virReportSystemError(errno, _("problem reading %s"), sysfs_nodedir);
-+ if (direrr < 0)
- goto cleanup;
-- }
-
- if (nodeinfo->cpus && nodeinfo->nodes)
- goto done;
-diff --git a/src/util/virfile.c b/src/util/virfile.c
-index 3eb2703..b54b9fd 100644
---- a/src/util/virfile.c
-+++ b/src/util/virfile.c
-@@ -2295,6 +2295,20 @@ virDirCreate(const char *path ATTRIBUTE_UNUSED,
- }
- #endif /* WIN32 */
-
-+/* return 0 = success, 1 = end-of-dir and -1 = error */
-+int virDirRead(DIR *dirp, struct dirent **ent, const char *dirname)
-+{
-+ errno = 0;
-+ *ent = readdir(dirp);
-+ if (!*ent && errno) {
-+ if (dirname)
-+ virReportSystemError(errno, _("Unable to read directory '%s'"),
-+ dirname);
-+ return -1;
-+ }
-+ return !*ent;
-+}
-+
- static int
- virFileMakePathHelper(char *path, mode_t mode)
- {
-diff --git a/src/util/virfile.h b/src/util/virfile.h
-index 46ef781..622a81b 100644
---- a/src/util/virfile.h
-+++ b/src/util/virfile.h
-@@ -27,6 +27,7 @@
- # define __VIR_FILE_H_
-
- # include <stdio.h>
-+# include <dirent.h>
-
- # include "internal.h"
- # include "virstoragefile.h"
-@@ -211,6 +212,8 @@ enum {
- };
- int virDirCreate(const char *path, mode_t mode, uid_t uid, gid_t gid,
- unsigned int flags) ATTRIBUTE_RETURN_CHECK;
-+int virDirRead(DIR *dirp, struct dirent **ent, const char *dirname);
-+
- int virFileMakePath(const char *path) ATTRIBUTE_RETURN_CHECK;
- int virFileMakePathWithMode(const char *path,
- mode_t mode) ATTRIBUTE_RETURN_CHECK;
diff --git a/main/libvirt/physmem.patch b/main/libvirt/physmem.patch
deleted file mode 100644
index b4901ad581..0000000000
--- a/main/libvirt/physmem.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/src/nodeinfo.c b/src/nodeinfo.c
-index c88f86c..1fa3e05 100644
---- a/src/nodeinfo.c
-+++ b/src/nodeinfo.c
-@@ -38,6 +38,8 @@
- # include <sys/types.h>
- # include <sys/sysctl.h>
- # include <sys/resource.h>
-+#elif defined(__linux__)
-+# include <sys/sysinfo.h>
- #endif
-
- #include "c-ctype.h"
-@@ -1042,6 +1044,7 @@ int nodeGetInfo(virNodeInfoPtr nodeinfo)
- {
- int ret = -1;
- FILE *cpuinfo = fopen(CPUINFO_PATH, "r");
-+ struct sysinfo si;
- if (!cpuinfo) {
- virReportSystemError(errno,
- _("cannot open %s"), CPUINFO_PATH);
-@@ -1053,7 +1056,11 @@ int nodeGetInfo(virNodeInfoPtr nodeinfo)
- goto cleanup;
-
- /* Convert to KB. */
-- nodeinfo->memory = physmem_total() / 1024;
-+ if (sysinfo(&si) == 0) {
-+ nodeinfo->memory = si.totalram / 1024;
-+ } else {
-+ nodeinfo->memory = physmem_total() / 1024;
-+ }
-
- cleanup:
- VIR_FORCE_FCLOSE(cpuinfo);