diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-06 10:17:11 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-06 10:17:41 +0200 |
commit | 6657a503a5104ab1f920546affb5a414cddeca75 (patch) | |
tree | 2ac69fc260ee9a1fd69ec985a4440d9e48a936f8 /main | |
parent | 87c34001006b65b2be65cb87168b498c915390e1 (diff) | |
download | aports-6657a503a5104ab1f920546affb5a414cddeca75.tar.bz2 aports-6657a503a5104ab1f920546affb5a414cddeca75.tar.xz |
main/libvirt: fix hugepage regression in 1.2.7
libvirt-1.2.7 introduced support for hugepages but at the same time they
made it fail with error if it was lacking in kernel.
Diffstat (limited to 'main')
-rw-r--r-- | main/libvirt/APKBUILD | 12 | ||||
-rw-r--r-- | main/libvirt/hugepages.patch | 32 |
2 files changed, 40 insertions, 4 deletions
diff --git a/main/libvirt/APKBUILD b/main/libvirt/APKBUILD index 95fb82ed1..e6e01fbe1 100644 --- a/main/libvirt/APKBUILD +++ b/main/libvirt/APKBUILD @@ -2,7 +2,7 @@ pkgname=libvirt pkgver=1.2.7 _ver="${pkgver/_rc/-rc}" -pkgrel=0 +pkgrel=1 pkgdesc="A virtualization API for several hypervisor and container systems" url="http://libvirt.org/" arch="all" @@ -26,6 +26,7 @@ source="http://libvirt.org/sources/$pkgname-$pkgver.tar.gz libvirt.confd libvirt.initd musl-fix-includes.patch + hugepages.patch " if [ "$CARCH" = "x86_64" ]; then @@ -169,12 +170,15 @@ _common_drivers() { md5sums="d556b3d815a222fd9680f9f3948595cb libvirt-1.2.7.tar.gz 1c84a7baeafe0a7f4e9d7ae5180311b7 libvirt.confd d897df38c7e7fa1a297aa551108633c9 libvirt.initd -9da7723b114b2d87558e92828366fbcb musl-fix-includes.patch" +9da7723b114b2d87558e92828366fbcb musl-fix-includes.patch +599ef898efc6ccd84eea5adb9ff027aa hugepages.patch" sha256sums="3dfb462cba1188d2c9ba700e1927fa0dbd71f20afdf81ab0c43b27b7fe77defc libvirt-1.2.7.tar.gz 851ab3f9678f0fa9c3ee03f7fc7bd00c4ee86d5f0777eecf9eb1ffe3243adfd1 libvirt.confd e9fad203434ffaa6afe524e42a9fb6594edad61cb02b1ca60a68d1a7fe0c31ab libvirt.initd -8dfa9dbe71ee21dc53e44bd7cc0127adde1bf3371d6b393657b386bb83f8139b musl-fix-includes.patch" +8dfa9dbe71ee21dc53e44bd7cc0127adde1bf3371d6b393657b386bb83f8139b musl-fix-includes.patch +39560b4e879422ee1579575246b591d164e4c5a5107a0458e6a67ef049d15138 hugepages.patch" sha512sums="de923e56c1ebd43ff208d219cab1422a5f9bcc0b2c55893bafc23441928af5a530f5abe4cd65893d91e83fa090455ed0e376f41d459caa41b03d1b7210e9d876 libvirt-1.2.7.tar.gz 9aba6ab73219a635c64a340ee8887356e644445c9128734cbce73f5d54778378da2f10a190365ad88a7db8bc95b1fb17f0c6ca41fc41bb786c09e1afe84d65dc libvirt.confd f48c97f93ef4509a86eda6200b3aae5b2c0c6263403bde933b770fd62240dca27bc439bd29b440ea6a47c8337f8b4511230ed915cb5ff54d9a1cf311863f6fa1 libvirt.initd -b6142256bf2700b9e5335c60fe5628e4095a24689c31d54afcab46f46a06b9c0ae676f87f77a487377eafbec11fb7afa9b994aef48a10a39e82f47c45df008ba musl-fix-includes.patch" +b6142256bf2700b9e5335c60fe5628e4095a24689c31d54afcab46f46a06b9c0ae676f87f77a487377eafbec11fb7afa9b994aef48a10a39e82f47c45df008ba musl-fix-includes.patch +cc33cdb7af3b44802c3ecbc24c25ec8cb38c5fed8dd78dd1c0f2091dc73c7ec6e062031aa9b4cd564d70ca02278b53ee2f8d8d580667ee8c11e0c1e692d37d8e hugepages.patch" diff --git a/main/libvirt/hugepages.patch b/main/libvirt/hugepages.patch new file mode 100644 index 000000000..954dce847 --- /dev/null +++ b/main/libvirt/hugepages.patch @@ -0,0 +1,32 @@ +diff --git a/src/util/virfile.c b/src/util/virfile.c +index 9863fd0..7046614 100644 +--- a/src/util/virfile.c ++++ b/src/util/virfile.c +@@ -2953,9 +2953,8 @@ virFileGetDefaultHugepageSize(unsigned long long *size) + goto cleanup; + + if (!(c = strstr(meminfo, HUGEPAGESIZE_STR))) { +- virReportError(VIR_ERR_INTERNAL_ERROR, +- _("Unable to parse %s"), +- PROC_MEMINFO); ++ virReportError(VIR_ERR_NO_SUPPORT, ++ _("Hugepage support not enabled in kernel")); + goto cleanup; + } + c += strlen(HUGEPAGESIZE_STR); +@@ -2993,13 +2992,13 @@ virFileFindHugeTLBFS(virHugeTLBFSPtr *ret_fs, + unsigned long long default_hugepagesz; + + if (virFileGetDefaultHugepageSize(&default_hugepagesz) < 0) +- goto cleanup; ++ return ret; + + if (!(f = setmntent(PROC_MOUNTS, "r"))) { + virReportSystemError(errno, + _("Unable to open %s"), + PROC_MOUNTS); +- goto cleanup; ++ return ret; + } + + while (getmntent_r(f, &mb, mntbuf, sizeof(mntbuf))) { |