From 899c86cf60d6bd0a0d8a8044a4e25abd8c394660 Mon Sep 17 00:00:00 2001 From: Nick Owens Date: Tue, 29 Nov 2016 13:18:52 -0800 Subject: [PATCH] app-emulation/qemu: apply patch for vpc creation fix --- ...ix-vpc-max_table_entries-computation.patch | 25 +++++++++++++++++++ ...u-2.7.0-r7.ebuild => qemu-2.7.0-r8.ebuild} | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/files/0001-block-fix-vpc-max_table_entries-computation.patch rename sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/{qemu-2.7.0-r7.ebuild => qemu-2.7.0-r8.ebuild} (99%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/files/0001-block-fix-vpc-max_table_entries-computation.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/files/0001-block-fix-vpc-max_table_entries-computation.patch new file mode 100644 index 0000000000..b8b2bd8803 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/files/0001-block-fix-vpc-max_table_entries-computation.patch @@ -0,0 +1,25 @@ +From b737484f814da16b8e9d405219cc1c2e81321d6b Mon Sep 17 00:00:00 2001 +From: Nick Owens +Date: Mon, 28 Nov 2016 13:28:58 -0800 +Subject: [PATCH] block: fix vpc max_table_entries computation + +--- + block/vpc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/block/vpc.c b/block/vpc.c +index 43707ed22c..beca222b98 100644 +--- a/block/vpc.c ++++ b/block/vpc.c +@@ -787,7 +787,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf, + + /* Write the footer (twice: at the beginning and at the end) */ + block_size = 0x200000; +- num_bat_entries = (total_sectors + block_size / 512) / (block_size / 512); ++ num_bat_entries = total_sectors / (block_size / 512); + + ret = blk_pwrite(blk, offset, buf, HEADER_SIZE, 0); + if (ret < 0) { +-- +2.11.0.rc2 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/qemu-2.7.0-r7.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/qemu-2.7.0-r8.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/qemu-2.7.0-r7.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/qemu-2.7.0-r8.ebuild index 28a608304a..4db6990ad9 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/qemu-2.7.0-r7.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/qemu/qemu-2.7.0-r8.ebuild @@ -364,6 +364,9 @@ src_prepare() { epatch "${FILESDIR}"/${P}-CVE-2016-9105.patch # bug 598328 epatch "${FILESDIR}"/${P}-CVE-2016-9106.patch # bug 598772 + # fix for vpc creation in qemu-img + epatch "${FILESDIR}"/0001-block-fix-vpc-max_table_entries-computation.patch + # Fix ld and objcopy being called directly tc-export AR LD OBJCOPY