From c05f69363fce8955e8732c3b4a7f17c54df2f77c7dffe6ce98af6d95b1724c18 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Tue, 7 Apr 2015 15:28:04 +0000 Subject: [PATCH 1/3] Merge with SR#290432 and xentop fixes OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=355 --- ...51ac326-xentop-add-support-for-qdisk.patch | 176 +++++++++++++++--- ipxe-no-error-logical-not-parentheses.patch | 21 +++ xen-c99-fix.patch | 15 ++ xen.changes | 23 +++ xen.spec | 8 +- 5 files changed, 210 insertions(+), 33 deletions(-) rename xentop-add-support-for-qdisk.patch => 551ac326-xentop-add-support-for-qdisk.patch (70%) create mode 100644 ipxe-no-error-logical-not-parentheses.patch create mode 100644 xen-c99-fix.patch diff --git a/xentop-add-support-for-qdisk.patch b/551ac326-xentop-add-support-for-qdisk.patch similarity index 70% rename from xentop-add-support-for-qdisk.patch rename to 551ac326-xentop-add-support-for-qdisk.patch index 6e59d31..84e1c1e 100644 --- a/xentop-add-support-for-qdisk.patch +++ b/551ac326-xentop-add-support-for-qdisk.patch @@ -1,3 +1,41 @@ +Index: xen-4.5.0-testing/tools/libxl/libxl_dm.c +=================================================================== +--- xen-4.5.0-testing.orig/tools/libxl/libxl_dm.c ++++ xen-4.5.0-testing/tools/libxl/libxl_dm.c +@@ -440,6 +440,15 @@ static char ** libxl__build_device_model + flexarray_append(dm_args, "-mon"); + flexarray_append(dm_args, "chardev=libxl-cmd,mode=control"); + ++ flexarray_append(dm_args, "-chardev"); ++ flexarray_append(dm_args, ++ libxl__sprintf(gc, "socket,id=libxenstat-cmd," ++ "path=%s/qmp-libxenstat-%d,server,nowait", ++ libxl__run_dir_path(), guest_domid)); ++ ++ flexarray_append(dm_args, "-mon"); ++ flexarray_append(dm_args, "chardev=libxenstat-cmd,mode=control"); ++ + for (i = 0; i < guest_config->num_channels; i++) { + connection = guest_config->channels[i].connection; + devid = guest_config->channels[i].devid; +Index: xen-4.5.0-testing/tools/libxl/libxl_qmp.c +=================================================================== +--- xen-4.5.0-testing.orig/tools/libxl/libxl_qmp.c ++++ xen-4.5.0-testing/tools/libxl/libxl_qmp.c +@@ -723,6 +723,13 @@ void libxl__qmp_cleanup(libxl__gc *gc, u + LOGE(ERROR, "Failed to remove QMP socket file %s", qmp_socket); + } + } ++ ++ qmp_socket = GCSPRINTF("%s/qmp-libxenstat-%d", libxl__run_dir_path(), domid); ++ if (unlink(qmp_socket) == -1) { ++ if (errno != ENOENT) { ++ LOGE(ERROR, "Failed to remove QMP socket file %s", qmp_socket); ++ } ++ } + } + + int libxl__qmp_query_serial(libxl__qmp_handler *qmp) Index: xen-4.5.0-testing/tools/xenstat/libxenstat/Makefile =================================================================== --- xen-4.5.0-testing.orig/tools/xenstat/libxenstat/Makefile @@ -11,6 +49,15 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/Makefile OBJECTS-$(CONFIG_Linux) += src/xenstat_linux.o OBJECTS-$(CONFIG_SunOS) += src/xenstat_solaris.o OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o +@@ -32,7 +32,7 @@ OBJECTS-$(CONFIG_FreeBSD) += src/xenstat + SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR) + + CFLAGS+=-fPIC +-CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) ++CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -include $(XEN_ROOT)/tools/config.h + + LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) + LDLIBS-$(CONFIG_SunOS) += -lkstat Index: xen-4.5.0-testing/tools/xenstat/xentop/Makefile =================================================================== --- xen-4.5.0-testing.orig/tools/xenstat/xentop/Makefile @@ -40,24 +87,27 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat.c =================================================================== --- xen-4.5.0-testing.orig/tools/xenstat/libxenstat/src/xenstat.c +++ xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat.c -@@ -657,6 +657,24 @@ static void xenstat_uninit_xen_version(x +@@ -657,6 +657,27 @@ static void xenstat_uninit_xen_version(x * VBD functions */ +/* Save VBD information */ +xenstat_vbd *xenstat_save_vbd(xenstat_domain *domain, xenstat_vbd *vbd) +{ ++ xenstat_vbd *vbds = domain->vbds; ++ ++ domain->num_vbds++; ++ domain->vbds = realloc(domain->vbds, ++ domain->num_vbds * ++ sizeof(xenstat_vbd)); ++ + if (domain->vbds == NULL) { -+ domain->num_vbds = 1; -+ domain->vbds = malloc(sizeof(xenstat_vbd)); -+ } else { -+ domain->num_vbds++; -+ domain->vbds = realloc(domain->vbds, -+ domain->num_vbds * -+ sizeof(xenstat_vbd)); ++ domain->num_vbds = 0; ++ free(vbds); + } -+ if (domain->vbds != NULL) ++ else { + domain->vbds[domain->num_vbds - 1] = *vbd; ++ } + + return domain->vbds; +} @@ -105,7 +155,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c =================================================================== --- /dev/null +++ xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c -@@ -0,0 +1,387 @@ +@@ -0,0 +1,451 @@ +/* libxenstat: statistics-collection library for Xen + * + * This library is free software; you can redistribute it and/or @@ -127,12 +177,24 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c +#include +#include +#include -+#include "yajl/yajl_tree.h" + +#include + +#include "xenstat_priv.h" + ++#ifdef HAVE_YAJL_YAJL_VERSION_H ++# include ++#endif ++ ++/* YAJL version check */ ++#if defined(YAJL_MAJOR) && (YAJL_MAJOR > 1) ++# define HAVE_YAJL_V2 1 ++#endif ++ ++#ifdef HAVE_YAJL_V2 ++ ++#include ++ +static unsigned char *qmp_query(int, char *); + +enum query_blockstats { @@ -153,10 +215,28 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c +}; + + -+/* Given the qmp device name, get the image filename associated with it */ ++/* Given the qmp device name, get the image filename associated with it ++ QMP Syntax for querying block infomation: ++ In: { "execute": "query-block" } ++ Out: {"return": [{ ++ "device": 'str, "locked": 'bool', "removable": bool, ++ "inserted": { ++ "iops_rd": 'int', ++ "image": { ++ "virtual-size": 'int', "filename": 'str', "cluster-size": 'int', ++ "format": 'str', "actual-size": 'int', "dirty-flag": 'bool' ++ }, ++ "iops_wr": 'int', "ro": 'bool', "backing_file_depth": 'int', ++ "drv": 'str', "iops": 'int', "bps_wr": 'int', "encrypted": 'bool', ++ "bps": 'int', "bps_rd": 'int', ++ "file": 'str', "encryption_key_missing": 'bool' ++ }, ++ "type": 'str' ++ }]} ++*/ +static char *qmp_get_block_image(xenstat_node *node, char *qmp_devname, int qfd) +{ -+ char errbuf[1024], *tmp, *file = NULL; ++ char *tmp, *file = NULL; + char *query_block_cmd = "{ \"execute\": \"query-block\" }"; + static const char *const qblock[] = { + [ QMP_BLOCK_RETURN ] = "return", @@ -172,8 +252,8 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + if ((qmp_stats = qmp_query(qfd, query_block_cmd)) == NULL) + return NULL; + -+ /* Use libyajl version 2.1.x or newer for the tree parser feature with bug fixes */ -+ if ((info = yajl_tree_parse((char *)qmp_stats, errbuf, sizeof(errbuf))) == NULL) { ++ /* Use libyajl version 2.0.3 or newer for the tree parser feature with bug fixes */ ++ if ((info = yajl_tree_parse((char *)qmp_stats, NULL, 0)) == NULL) { + free(qmp_stats); + return NULL; + } @@ -214,9 +294,9 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c +} + + -+/* Given a QMP device name, find the associated xenstore qdisk device id */ -+static void get_xs_devid_from_qmp_devname(xenstat_node * node, unsigned int domid, char *qmp_devname, -+ unsigned int *dev, unsigned int *sector_size, int qfd) ++/* Given a QMP device name, lookup the associated xenstore qdisk device id */ ++static void lookup_xenstore_devid(xenstat_node * node, unsigned int domid, char *qmp_devname, ++ int qfd, unsigned int *dev, unsigned int *sector_size) +{ + char **dev_ids, *tmp, *ptr, *image, path[80]; + unsigned int num_dev_ids; @@ -269,7 +349,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c +/* Parse the stats buffer which contains I/O data for all the disks belonging to domid */ +static void qmp_parse_stats(xenstat_node *node, unsigned int domid, unsigned char *stats_buf, int qfd) +{ -+ char *qmp_devname, errbuf[1024]; ++ char *qmp_devname; + static const char *const qstats[] = { + [ QMP_STATS_RETURN ] = "return", + [ QMP_STATS_DEVICE ] = "device", @@ -287,7 +367,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + int i, j; + + /* Use libyajl version 2.0.3 or newer for the tree parser feature */ -+ if ((info = yajl_tree_parse((char *)stats_buf, errbuf, sizeof(errbuf))) == NULL) ++ if ((info = yajl_tree_parse((char *)stats_buf, NULL, 0)) == NULL) + return; + + ptr[0] = qstats[QMP_STATS_RETURN]; /* "return" */ @@ -329,7 +409,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + } + /* With the QMP device name, lookup the xenstore qdisk device ID and set vdb.dev */ + if (qmp_devname) -+ get_xs_devid_from_qmp_devname(node, domid, qmp_devname, &vbd.dev, §or_size, qfd); ++ lookup_xenstore_devid(node, domid, qmp_devname, qfd, &vbd.dev, §or_size); + if ((domain = xenstat_node_domain(node, domid)) == NULL) + continue; + if ((xenstat_save_vbd(domain, &vbd)) == NULL) @@ -340,7 +420,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + yajl_tree_free(info); +} + -+/* Write a command via the QMP */ ++/* Write a command via the QMP. Returns number of bytes written */ +static size_t qmp_write(int qfd, char *cmd, size_t cmd_len) +{ + size_t pos = 0; @@ -366,23 +446,24 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c +/* Read the data sent in response to a QMP execute query. Returns 1 for success */ +static int qmp_read(int qfd, unsigned char **qstats) +{ -+ unsigned char buf[1024], *ptr = NULL; ++ unsigned char buf[1024], *ptr; + struct pollfd pfd[2]; + int n, qsize = 0; + ++ *qstats = NULL; + pfd[0].fd = qfd; + pfd[0].events = POLLIN; + while ((n = poll(pfd, POLLIN, 10)) > 0) { + if (pfd[0].revents & POLLIN) { + if ((n = read(qfd, buf, sizeof(buf))) < 0) { ++ free(*qstats); + return 0; + } -+ if (ptr == NULL) -+ ptr = malloc(n+1); -+ else -+ ptr = realloc(ptr, qsize+n+1); -+ if (ptr == NULL) ++ ptr = realloc(*qstats, qsize+n+1); ++ if (ptr == NULL) { ++ free(*qstats); + return 0; ++ } + memcpy(&ptr[qsize], buf, n); + qsize += n; + ptr[qsize] = 0; @@ -433,7 +514,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + return s; +} + -+/* Get all the active domains */ ++/* Get up to 1024 active domains */ +static xc_domaininfo_t *get_domain_ids(int *num_doms) +{ + xc_domaininfo_t *dominfo; @@ -448,7 +529,32 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + return dominfo; +} + -+/* Gather the qdisk statistics by querying QMP */ ++/* Gather the qdisk statistics by querying QMP ++ Resources: http://wiki.qemu.org/QMP and qmp-commands.hx from the qemu code ++ QMP Syntax for entering command mode. This command must be issued before ++ issuing any other command: ++ In: {"execute": "qmp_capabilities"} ++ Out: {"return": {}} ++ QMP Syntax for querying block statistics: ++ In: { "execute": "query-blockstats" } ++ Out: {"return": [{ ++ "device": 'str', ++ "parent": { ++ "stats": { ++ "flush_total_time_ns": 'int', "wr_highest_offset": 'int', ++ "wr_total_time_ns": 'int', "wr_bytes": 'int', ++ "rd_total_time_ns": 'int', "flush_operations": 'int', ++ "wr_operations": 'int', "rd_bytes": 'int', "rd_operations": 'int' ++ } ++ }, ++ "stats": { ++ "flush_total_time_ns": 'int', "wr_highest_offset": 'int', ++ "wr_total_time_ns": 'int', "wr_bytes": 'int', ++ "rd_total_time_ns": 'int', "flush_operations": 'int', ++ "wr_operations": 'int', "rd_bytes": 'int', "rd_operations": 'int' ++ } ++ }]} ++*/ +void read_attributes_qdisk(xenstat_node * node) +{ + char *cmd_mode = "{ \"execute\": \"qmp_capabilities\" }"; @@ -473,7 +579,7 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + free(val); + + /* Connect to this VMs QMP socket */ -+ snprintf(path, sizeof(path), "/var/run/xen/qmp-libxl-%i", dominfo[i].domain); ++ snprintf(path, sizeof(path), "/var/run/xen/qmp-libxenstat-%i", dominfo[i].domain); + if ((qfd = qmp_connect(path)) < 0) { + continue; + } @@ -493,3 +599,11 @@ Index: xen-4.5.0-testing/tools/xenstat/libxenstat/src/xenstat_qmp.c + free(dominfo); +} + ++#else /* !HAVE_YAJL_V2 */ ++ ++/* Statistics gathering for qdisks requires at least yajl v2 */ ++void read_attributes_qdisk(xenstat_node * node) ++{ ++} ++ ++#endif /* !HAVE_YAJL_V2 */ diff --git a/ipxe-no-error-logical-not-parentheses.patch b/ipxe-no-error-logical-not-parentheses.patch new file mode 100644 index 0000000..41062e2 --- /dev/null +++ b/ipxe-no-error-logical-not-parentheses.patch @@ -0,0 +1,21 @@ +--- /dev/null 2015-03-12 10:40:51.327307686 +0000 ++++ xen-4.5.0-testing/tools/firmware/etherboot/patches/ipxe-no-error-logical-not-parentheses.patch 2015-03-12 12:21:37.394804667 +0000 +@@ -0,0 +1,11 @@ ++--- ipxe/src/Makefile.housekeeping.orig 2015-03-12 12:15:50.054891858 +0000 +++++ ipxe/src/Makefile.housekeeping 2015-03-12 12:16:05.978071221 +0000 ++@@ -415,7 +415,7 @@ ++ # Inhibit -Werror if NO_WERROR is specified on make command line ++ # ++ ifneq ($(NO_WERROR),1) ++-CFLAGS += -Werror +++CFLAGS += -Werror -Wno-logical-not-parentheses ++ ASFLAGS += --fatal-warnings ++ endif ++ +--- xen-4.5.0-testing/tools/firmware/etherboot/patches/series.orig 2015-03-12 12:24:54.895029501 +0000 ++++ xen-4.5.0-testing/tools/firmware/etherboot/patches/series 2015-03-12 12:25:42.367564285 +0000 +@@ -3,3 +3,4 @@ + build_fix_2.patch + build_fix_3.patch + build-compare.patch ++ipxe-no-error-logical-not-parentheses.patch diff --git a/xen-c99-fix.patch b/xen-c99-fix.patch new file mode 100644 index 0000000..69a00cc --- /dev/null +++ b/xen-c99-fix.patch @@ -0,0 +1,15 @@ +--- xen-4.5.0-testing/tools/firmware/seabios-dir-remote/src/hw/usb-hid.h.orig 2015-03-12 10:49:39.606373644 +0000 ++++ xen-4.5.0-testing/tools/firmware/seabios-dir-remote/src/hw/usb-hid.h 2015-03-12 10:49:55.481555672 +0000 +@@ -4,10 +4,10 @@ + // usb-hid.c + struct usbdevice_s; + int usb_hid_setup(struct usbdevice_s *usbdev); +-inline int usb_kbd_active(void); +-inline int usb_kbd_command(int command, u8 *param); +-inline int usb_mouse_active(void); +-inline int usb_mouse_command(int command, u8 *param); ++int usb_kbd_active(void); ++int usb_kbd_command(int command, u8 *param); ++int usb_mouse_active(void); ++int usb_mouse_command(int command, u8 *param); + void usb_check_event(void); diff --git a/xen.changes b/xen.changes index 3520c10..b09b4e3 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Apr 3 10:54:05 MDT 2015 - carnold@suse.com + +- xentop: Fix memory leak on read failure + 551ac326-xentop-add-support-for-qdisk.patch + +------------------------------------------------------------------- +Tue Mar 31 16:03:54 MDT 2015 - carnold@suse.com + +- Dropped xentop-add-support-for-qdisk.patch in favor of upstream + version + 551ac326-xentop-add-support-for-qdisk.patch + ------------------------------------------------------------------- Mon Mar 16 10:14:15 MDT 2015 - carnold@suse.com @@ -5,6 +18,16 @@ Mon Mar 16 10:14:15 MDT 2015 - carnold@suse.com 5124efbe-add-qxl-support.patch qemu-xen-enable-spice-support.patch +------------------------------------------------------------------- +Thu Mar 12 12:33:45 UTC 2015 - rguenther@suse.com + +- Add xen-c99-fix.patch to remove pointless inline specifier on + function declarations which break build with a C99 compiler which + GCC 5 is by default. +- Add ipxe-no-error-logical-not-parentheses.patch to supply + -Wno-logical-not-parentheses to the ipxe build to fix + breakage with GCC 5. + ------------------------------------------------------------------- Wed Mar 11 13:15:07 MDT 2015 - carnold@suse.com diff --git a/xen.spec b/xen.spec index 30b73ba..01edc89 100644 --- a/xen.spec +++ b/xen.spec @@ -1,7 +1,7 @@ # # spec file for package xen # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -201,6 +201,7 @@ Source99: baselibs.conf Source20000: xenalyze.hg.tar.bz2 # Upstream patches Patch1: 5124efbe-add-qxl-support.patch +Patch2: 551ac326-xentop-add-support-for-qdisk.patch # Upstream qemu Patch250: VNC-Support-for-ExtendedKeyEvent-client-message.patch Patch251: 0001-net-move-the-tap-buffer-into-TAPState.patch @@ -222,7 +223,7 @@ Patch311: xl-coredump-file-location.patch Patch330: suspend_evtchn_lock.patch Patch331: xenpaging.doc.patch Patch332: local_attach_support_for_phy.patch -Patch333: xentop-add-support-for-qdisk.patch +Patch333: xen-c99-fix.patch # Qemu traditional Patch350: blktap.patch Patch351: cdrom-removable.patch @@ -291,6 +292,7 @@ Patch604: xen.build-compare.ipxe.patch Patch605: xen.build-compare.vgabios.patch Patch606: xen.build-compare.seabios.patch Patch607: xen.build-compare.man.patch +Patch608: ipxe-no-error-logical-not-parentheses.patch # Build patches Patch99996: xen.stubdom.newlib.patch Patch99998: tmp_build.patch @@ -498,6 +500,7 @@ Authors: %setup -q -n %xen_build_dir -a 1 -a 2 -a 3 -a 4 -a 5 -a 57 -a 20000 # Upstream patches %patch1 -p1 +%patch2 -p1 # Upstream qemu patches %patch250 -p1 %patch251 -p1 @@ -587,6 +590,7 @@ Authors: %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch608 -p1 # Build patches %patch99996 -p1 %patch99998 -p1 From f2549d444b9f0da052a3b4aaeab4c66f310376f0378d0c1bd2014580dbf526d6 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Tue, 7 Apr 2015 16:57:44 +0000 Subject: [PATCH 2/3] GCC 5 is by default. (bsc#921994) breakage with GCC 5. (bsc#921994) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=356 --- xen.changes | 4 ++-- xen.spec | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/xen.changes b/xen.changes index b09b4e3..24a2e2a 100644 --- a/xen.changes +++ b/xen.changes @@ -23,10 +23,10 @@ Thu Mar 12 12:33:45 UTC 2015 - rguenther@suse.com - Add xen-c99-fix.patch to remove pointless inline specifier on function declarations which break build with a C99 compiler which - GCC 5 is by default. + GCC 5 is by default. (bsc#921994) - Add ipxe-no-error-logical-not-parentheses.patch to supply -Wno-logical-not-parentheses to the ipxe build to fix - breakage with GCC 5. + breakage with GCC 5. (bsc#921994) ------------------------------------------------------------------- Wed Mar 11 13:15:07 MDT 2015 - carnold@suse.com diff --git a/xen.spec b/xen.spec index 01edc89..86fde61 100644 --- a/xen.spec +++ b/xen.spec @@ -1,7 +1,7 @@ # # spec file for package xen # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - # needssslcertforbuild Name: xen From b6d9f3c1732d204c9491fb09acb2e4a8f0a0b544168ec27deb6e19097d93a0a2 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Wed, 8 Apr 2015 14:03:12 +0000 Subject: [PATCH 3/3] Accepting request 294943 from home:rguenther:branches:Virtualization - Add xen-no-array-bounds.patch and blktap-no-uninit.patch to selectively turn errors back to warnings to fix build with GCC 5. - Amend xen.stubdom.newlib.patch to pull in declaration of strcmp to avoid implicit-fortify-decl rpmlint error. - Fix quoting of __SMBIOS_DATE__ in xen.build-compare.smbiosdate.patch. OBS-URL: https://build.opensuse.org/request/show/294943 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=357 --- blktap-no-uninit.patch | 20 ++++++++++++++++++++ xen-no-array-bounds.patch | 7 +++++++ xen.build-compare.smbiosdate.patch | 2 +- xen.changes | 9 +++++++++ xen.spec | 7 ++++++- xen.stubdom.newlib.patch | 17 ++++++++++++++++- 6 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 blktap-no-uninit.patch create mode 100644 xen-no-array-bounds.patch diff --git a/blktap-no-uninit.patch b/blktap-no-uninit.patch new file mode 100644 index 0000000..b219ba2 --- /dev/null +++ b/blktap-no-uninit.patch @@ -0,0 +1,20 @@ +--- xen-4.5.0-testing/tools/blktap/drivers/Makefile.orig 2015-04-08 09:20:08.817373085 +0000 ++++ xen-4.5.0-testing/tools/blktap/drivers/Makefile 2015-04-08 09:20:55.738897365 +0000 +@@ -6,6 +6,7 @@ + + CFLAGS += -Werror + CFLAGS += -Wno-unused ++CFLAGS += -Wno-error=maybe-uninitialized + CFLAGS += -I../lib + CFLAGS += $(CFLAGS_libxenctrl) + CFLAGS += $(CFLAGS_libxenstore) +--- xen-4.5.0-testing/tools/blktap2/drivers/Makefile.orig 2015-04-08 11:25:54.974241326 +0200 ++++ xen-4.5.0-testing/tools/blktap2/drivers/Makefile 2015-04-08 11:26:10.150411238 +0200 +@@ -11,6 +11,7 @@ + + CFLAGS += -Werror + CFLAGS += -Wno-unused ++CFLAGS += -Wno-error=array-bounds + CFLAGS += -fno-strict-aliasing + CFLAGS += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers + CFLAGS += $(CFLAGS_libxenctrl) diff --git a/xen-no-array-bounds.patch b/xen-no-array-bounds.patch new file mode 100644 index 0000000..576dd33 --- /dev/null +++ b/xen-no-array-bounds.patch @@ -0,0 +1,7 @@ +--- xen-4.5.0-testing/xen/common/Makefile.orig 2015-04-08 11:36:59.384672098 +0200 ++++ xen-4.5.0-testing/xen/common/Makefile 2015-04-08 11:39:09.969133272 +0200 +@@ -1,3 +1,4 @@ ++CFLAGS += -Wno-error=array-bounds + obj-y += bitmap.o + obj-y += core_parking.o + obj-y += cpu.o diff --git a/xen.build-compare.smbiosdate.patch b/xen.build-compare.smbiosdate.patch index 94c4dbc..cc2de1e 100644 --- a/xen.build-compare.smbiosdate.patch +++ b/xen.build-compare.smbiosdate.patch @@ -20,7 +20,7 @@ Index: xen-4.5.0-testing/tools/firmware/hvmloader/Makefile ovmf.o rombios.o seabios.o hvmloader.o: roms.inc -smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\"" -+smbios.o: CFLAGS += -D__SMBIOS_DATE__="$(SMBIOS_DATE)" ++smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_DATE)\"" hvmloader: $(OBJS) acpi/acpi.a $(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) -o hvmloader.tmp $^ diff --git a/xen.changes b/xen.changes index 24a2e2a..38955c7 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Apr 8 10:17:41 UTC 2015 - rguenther@suse.com + +- Add xen-no-array-bounds.patch and blktap-no-uninit.patch to selectively + turn errors back to warnings to fix build with GCC 5. +- Amend xen.stubdom.newlib.patch to pull in declaration of strcmp to + avoid implicit-fortify-decl rpmlint error. +- Fix quoting of __SMBIOS_DATE__ in xen.build-compare.smbiosdate.patch. + ------------------------------------------------------------------- Fri Apr 3 10:54:05 MDT 2015 - carnold@suse.com diff --git a/xen.spec b/xen.spec index 86fde61..20de1aa 100644 --- a/xen.spec +++ b/xen.spec @@ -1,7 +1,7 @@ # # spec file for package xen # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + # needssslcertforbuild Name: xen @@ -261,6 +262,7 @@ Patch385: xen_pvonhvm.xen_emul_unplug.patch Patch387: libxl.set-migration-constraints-from-cmdline.patch Patch389: qemu-xen-upstream-megasas-buildtime.patch Patch390: libxl.pvscsi.patch +Patch391: blktap-no-uninit.patch # Other bug fixes or features Patch451: xenconsole-no-multiple-connections.patch Patch452: hibernate.patch @@ -295,6 +297,7 @@ Patch608: ipxe-no-error-logical-not-parentheses.patch # Build patches Patch99996: xen.stubdom.newlib.patch Patch99998: tmp_build.patch +Patch99999: xen-no-array-bounds.patch Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %define pyver %(python -c "import sys; print sys.version[:3]") @@ -559,6 +562,7 @@ Authors: %patch387 -p1 %patch389 -p1 %patch390 -p1 +%patch391 -p1 # Other bug fixes or features %patch451 -p1 %patch452 -p1 @@ -593,6 +597,7 @@ Authors: # Build patches %patch99996 -p1 %patch99998 -p1 +%patch99999 -p1 %build # we control the version info of this package diff --git a/xen.stubdom.newlib.patch b/xen.stubdom.newlib.patch index 717b956..46b3029 100644 --- a/xen.stubdom.newlib.patch +++ b/xen.stubdom.newlib.patch @@ -28,11 +28,12 @@ Index: xen-4.5.0-testing/stubdom/Makefile =================================================================== --- xen-4.5.0-testing.orig/stubdom/Makefile +++ xen-4.5.0-testing/stubdom/Makefile -@@ -72,6 +72,7 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLI +@@ -72,6 +72,8 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLI patch -d $@ -p0 < newlib.patch patch -d $@ -p0 < newlib-chk.patch patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch + patch -d $@ -p1 < newlib-cygmon-gmon.patch ++ patch -d $@ -p1 < newlib-makedoc.patch find $@ -type f | xargs perl -i.bak \ -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g' touch $@ @@ -101,3 +102,17 @@ Index: xen-4.5.0-testing/stubdom/newlib-cygmon-gmon.patch + moncontrol(mode) + int mode; + { + +--- /dev/null 2014-11-27 12:21:54.951999741 +0100 ++++ xen-4.5.0-testing/stubdom/newlib-makedoc.patch 2015-04-08 12:03:51.286029882 +0200 +@@ -0,0 +1,10 @@ ++--- newlib-1.16.0/newlib/doc/makedoc.c.orig 2015-04-08 11:56:39.283090914 +0200 +++++ newlib-1.16.0/newlib/doc/makedoc.c 2015-04-08 11:56:51.245227742 +0200 ++@@ -39,6 +39,7 @@ ++ #include ++ #include ++ #include +++#include ++ ++ #define DEF_SIZE 5000 ++ #define STACK 50