diff --git a/sysutils/xen-tools/Makefile b/sysutils/xen-tools/Makefile index f6d8b8f8242b..c35ffd1e2b57 100644 --- a/sysutils/xen-tools/Makefile +++ b/sysutils/xen-tools/Makefile @@ -1,96 +1,97 @@ PORTNAME= xen PKGNAMESUFFIX= -tools PORTVERSION= 4.17.0 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= sysutils emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ MAINTAINER= royger@FreeBSD.org COMMENT= Xen management tools WWW= https://wiki.xen.org/wiki/XL LICENSE= GPLv2 LGPL3 LICENSE_COMB= multi LIB_DEPENDS= libyajl.so:devel/yajl \ liblzo2.so:archivers/lzo2 \ libpixman-1.so:x11/pixman \ libargp.so:devel/argp-standalone \ libxml2.so:textproc/libxml2 BUILD_DEPENDS= seabios>0:misc/seabios \ ${LOCALBASE}/share/edk2-xen/XEN_X64_EFI.fd:sysutils/edk2@xen_x64 \ bash>0:shells/bash RUN_DEPENDS= seabios>0:misc/seabios \ ${LOCALBASE}/share/edk2-xen/XEN_X64_EFI.fd:sysutils/edk2@xen_x64 OPTIONS_DEFINE= DOCS SPICE OPTIONS_DEFAULT= DOCS OPTIONS_SUB= yes SPICE_DESC= Enable SPICE protocol for QEMU SPICE_CONFIGURE_WITH= extra-qemuu-configure-args="--enable-spice" SPICE_BUILD_DEPENDS= spice-protocol>=0.12.10:devel/spice-protocol SPICE_LIB_DEPENDS= libspice-server.so:devel/libspice-server ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than amd64 USES= cpe gettext gmake gnome libtool localbase:ldflags perl5 \ pkgconfig python shebangfix iconv bison ninja:build USE_GNOME= glib20 USE_LDCONFIG= yes USE_PYTHON= py3kplist HAS_CONFIGURE= yes # Set ARCH=x86_64 in order to overwrite the environment ARCH=amd64 MAKE_ARGS= clang=y ARCH=x86_64 BINARY_ALIAS= python3=${PYTHON_CMD} CONFIGURE_ARGS+= --with-system-seabios=${LOCALBASE}/share/seabios/bios.bin \ --with-system-ovmf=${LOCALBASE}/share/edk2-xen/XEN_X64_EFI.fd \ --mandir=${MANPREFIX}/man \ --disable-golang SHEBANG_FILES= tools/misc/xencov_split \ tools/python/scripts/convert-legacy-stream \ tools/python/scripts/verify-stream-v2 \ tools/xenmon/xenmon.py ALL_TARGET= tools DOCS_ALL_TARGET= docs INSTALL_TARGET= install-tools DOCS_INSTALL_TARGET= install-docs # clang build fixes EXTRA_PATCHES+= ${PATCHDIR}/0001-xen-x86-Remove-the-use-of-K-R-functions.patch:-p1 \ - ${PATCHDIR}/0001-tools-Remove-the-use-of-K-R-functions.patch:-p1 + ${PATCHDIR}/0001-tools-Remove-the-use-of-K-R-functions.patch:-p1 \ + ${PATCHDIR}/0001-tools-convert-bitfields-to-unsigned-type.patch:-p1 .include .if ${OPSYS} != FreeBSD IGNORE= only supported on FreeBSD .endif .if ${PORT_OPTIONS:MSPICE} && ${OSVERSION} < 1300008 BROKEN= SPICE support requires FreeBSD version 13.0 or higher .endif post-patch: @for p in `ls ${FILESDIR}/*qemuu*.patch 2>/dev/null`; do \ ${ECHO_CMD} "====> Applying $${p##*/}" ; \ ${PATCH} -s -p1 -i $${p} -d ${WRKSRC}/tools/qemu-xen ; \ done # The ports native 'build' target cannot be used because it sets CFLAGS, and # that breaks the Xen kernel build system that's used by the tools in order to # build the pv-shim. do-build: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} ${MAKE_ARGS} ${ALL_TARGET} do-install: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} ${MAKE_ARGS} ${INSTALL_TARGET} post-install: ${MKDIR} ${STAGEDIR}/var/run/xen .include diff --git a/sysutils/xen-tools/files/0001-tools-convert-bitfields-to-unsigned-type.patch b/sysutils/xen-tools/files/0001-tools-convert-bitfields-to-unsigned-type.patch new file mode 100644 index 000000000000..83b11f35d373 --- /dev/null +++ b/sysutils/xen-tools/files/0001-tools-convert-bitfields-to-unsigned-type.patch @@ -0,0 +1,71 @@ +From 99ab02f63ea813f2e467a39a7736bf460a3f3495 Mon Sep 17 00:00:00 2001 +From: Olaf Hering +Date: Mon, 8 May 2023 16:46:18 +0000 +Subject: [PATCH] tools: convert bitfields to unsigned type + +clang complains about the signed type: + +implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] + +The potential ABI change in libxenvchan is covered by the Xen version based SONAME. + +Signed-off-by: Olaf Hering +Reviewed-by: Juergen Gross +Acked-by: Anthony PERARD +--- + tools/include/libxenvchan.h | 6 +++--- + tools/xentrace/xenalyze.c | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tools/include/libxenvchan.h b/tools/include/libxenvchan.h +index 30cc73cf97e3..3d3b8aa8dd79 100644 +--- a/tools/include/libxenvchan.h ++++ b/tools/include/libxenvchan.h +@@ -79,11 +79,11 @@ struct libxenvchan { + xenevtchn_handle *event; + uint32_t event_port; + /* informative flags: are we acting as server? */ +- int is_server:1; ++ unsigned int is_server:1; + /* true if server remains active when client closes (allows reconnection) */ +- int server_persist:1; ++ unsigned int server_persist:1; + /* true if operations should block instead of returning 0 */ +- int blocking:1; ++ unsigned int blocking:1; + /* communication rings */ + struct libxenvchan_ring read, write; + /** +diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c +index 12dcca964645..a50538e9a8c8 100644 +--- a/tools/xentrace/xenalyze.c ++++ b/tools/xentrace/xenalyze.c +@@ -1377,7 +1377,7 @@ struct hvm_data { + tsc_t exit_tsc, arc_cycles, entry_tsc; + unsigned long long rip; + unsigned exit_reason, event_handler; +- int short_summary_done:1, prealloc_unpin:1, wrmap_bf:1; ++ unsigned int short_summary_done:1, prealloc_unpin:1, wrmap_bf:1; + + /* Immediate processing */ + void *d; +@@ -8235,13 +8235,13 @@ void mem_set_p2m_entry_process(struct pcpu_info *p) + + struct { + uint64_t gfn, mfn; +- int p2mt; +- int d:16,order:16; ++ uint32_t p2mt; ++ uint16_t d, order; + } *r = (typeof(r))ri->d; + + if ( opt.dump_all ) + { +- printf(" %s set_p2m_entry d%d o%d t %d g %llx m %llx\n", ++ printf(" %s set_p2m_entry d%u o%u t %u g %llx m %llx\n", + ri->dump_header, + r->d, r->order, + r->p2mt, +-- +2.41.0 +