-diff -dur xen-4.2.0.orig/tools/pygrub/src/pygrub xen-4.2.0/tools/pygrub/src/pygrub
---- xen-4.2.0.orig/tools/pygrub/src/pygrub 2012-09-17 12:21:18.000000000 +0200
-+++ xen-4.2.0/tools/pygrub/src/pygrub 2012-10-22 10:57:09.000000000 +0200
-@@ -119,6 +119,7 @@
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/pygrub/src/pygrub xen-4.13.1/tools/pygrub/src/pygrub
+--- xen-4.13.1.org/tools/pygrub/src/pygrub 2021-03-25 22:42:14.797689878 +0100
++++ xen-4.13.1/tools/pygrub/src/pygrub 2021-03-25 22:42:15.517685792 +0100
+@@ -129,6 +129,7 @@ def get_partition_offsets(file):
fd = os.open(file, os.O_RDONLY)
buf = os.read(fd, 512)
os.close(fd)
for poff in (446, 462, 478, 494): # partition offsets
# MBR contains a 16 byte descriptor per partition
-@@ -128,6 +129,7 @@
+@@ -138,6 +139,7 @@ def get_partition_offsets(file):
# offset == 0 implies this partition is not enabled
if offset == 0:
continue
if type == FDISK_PART_SOLARIS or type == FDISK_PART_SOLARIS_OLD:
-@@ -148,6 +150,9 @@
- else:
- part_offs.append(offset)
+@@ -163,6 +165,9 @@ def get_partition_offsets(file):
+ # (e.g. grubs) may contain the same signature.
+ if not part_offs: part_offs = [0]
+ if offzerocount == 4:
+ # Might be a grub boot sector pretending to be an MBR
-diff -urN xen-4.6.5/tools/libxl/libxl_internal.h xen-4.6.5.build/tools/libxl/libxl_internal.h
---- xen-4.6.5/tools/libxl/libxl_internal.h 2017-03-07 17:19:05.000000000 +0100
-+++ xen-4.6.5.build/tools/libxl/libxl_internal.h 2017-04-14 15:05:55.088806418 +0200
-@@ -37,6 +37,7 @@
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/libxl/libxl_internal.h xen-4.13.1/tools/libxl/libxl_internal.h
+--- xen-4.13.1.org/tools/libxl/libxl_internal.h 2020-05-14 14:19:32.000000000 +0200
++++ xen-4.13.1/tools/libxl/libxl_internal.h 2021-03-25 22:42:35.034240136 +0100
+@@ -39,6 +39,7 @@
#include <unistd.h>
#include <ctype.h>
+#include <sys/sysmacros.h>
#include <sys/mman.h>
- #include <sys/poll.h>
+ #include <poll.h>
#include <sys/select.h>
---- xen-4.2.2/tools/qemu-xen/scripts/texi2pod.pl~ 2013-04-06 01:39:54.000000000 +0200
-+++ xen-4.2.2/tools/qemu-xen/scripts/texi2pod.pl 2013-07-22 14:27:37.959914694 +0200
-@@ -339,6 +339,8 @@
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/qemu-xen/scripts/texi2pod.pl xen-4.13.1/tools/qemu-xen/scripts/texi2pod.pl
+--- xen-4.13.1.org/tools/qemu-xen/scripts/texi2pod.pl 2020-04-14 19:38:05.000000000 +0200
++++ xen-4.13.1/tools/qemu-xen/scripts/texi2pod.pl 2021-03-25 22:42:21.257653071 +0100
+@@ -397,6 +397,8 @@ print "=encoding $encoding\n\n" if defin
$sects{NAME} = "$fn \- $tl\n";
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
+print "=encoding utf8\n";
+
for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
- BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
+ BUGS NOTES FOOTNOTES EXAMPLES SEEALSO AUTHOR COPYRIGHT)) {
if(exists $sects{$sect}) {
---- xen-4.2.2/tools/qemu-xen-traditional/texi2pod.pl~ 2013-04-06 01:39:54.000000000 +0200
-+++ xen-4.2.2/tools/qemu-xen-traditional/texi2pod.pl 2013-07-22 14:27:37.959914694 +0200
-@@ -339,6 +339,8 @@
- $sects{NAME} = "$fn \- $tl\n";
- $sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/qemu-xen-traditional/Makefile xen-4.13.1/tools/qemu-xen-traditional/Makefile
+--- xen-4.13.1.org/tools/qemu-xen-traditional/Makefile 2018-10-24 17:18:11.000000000 +0200
++++ xen-4.13.1/tools/qemu-xen-traditional/Makefile 2021-03-25 22:42:21.257653071 +0100
+@@ -275,7 +275,7 @@ cscope:
-+print "=encoding utf8\n";
-+
- for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
- BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
- if(exists $sects{$sect}) {
---- xen-4.2.2/tools/qemu-xen-traditional/configure~ 2013-07-22 14:35:56.118261587 +0200
-+++ xen-4.2.2/tools/qemu-xen-traditional/configure 2013-07-22 14:43:48.376345178 +0200
-@@ -1087,7 +1087,7 @@
+ # documentation
+ %.html: %.texi
+- texi2html -monolithic -number $<
++ texi2any --html --no-split --number-sections $<
+
+ %.info: %.texi
+ makeinfo $< -o $@
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/qemu-xen-traditional/configure xen-4.13.1/tools/qemu-xen-traditional/configure
+--- xen-4.13.1.org/tools/qemu-xen-traditional/configure 2021-03-25 22:42:20.504324047 +0100
++++ xen-4.13.1/tools/qemu-xen-traditional/configure 2021-03-25 22:42:21.257653071 +0100
+@@ -1087,7 +1087,7 @@ EOF
fi
# Check if tools are available to build documentation.
[ -x "`which pod2man 2>/dev/null`" ]; then
build_docs="yes"
fi
---- xen-4.2.2/tools/qemu-xen-traditional/Makefile~ 2013-01-17 17:00:26.000000000 +0100
-+++ xen-4.2.2/tools/qemu-xen-traditional/Makefile 2013-07-22 14:44:29.273423099 +0200
-@@ -275,7 +275,7 @@
-
- # documentation
- %.html: %.texi
-- texi2html -monolithic -number $<
-+ texi2any --html --no-split --number-sections $<
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/qemu-xen-traditional/texi2pod.pl xen-4.13.1/tools/qemu-xen-traditional/texi2pod.pl
+--- xen-4.13.1.org/tools/qemu-xen-traditional/texi2pod.pl 2018-10-24 17:18:11.000000000 +0200
++++ xen-4.13.1/tools/qemu-xen-traditional/texi2pod.pl 2021-03-25 22:42:21.257653071 +0100
+@@ -340,6 +340,8 @@ die "No filename or title\n" unless defi
+ $sects{NAME} = "$fn \- $tl\n";
+ $sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
- %.info: %.texi
- makeinfo $< -o $@
++print "=encoding utf8\n";
++
+ for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
+ BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
+ if(exists $sects{$sect}) {
---- xen-4.9.0/tools/libxc/Makefile.orig 2017-06-27 20:13:19.000000000 +0200
-+++ xen-4.9.0/tools/libxc/Makefile 2017-07-31 17:56:20.268706026 +0200
-@@ -262,7 +262,7 @@
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/libxc/Makefile xen-4.13.1/tools/libxc/Makefile
+--- xen-4.13.1.org/tools/libxc/Makefile 2020-05-14 14:19:32.000000000 +0200
++++ xen-4.13.1/tools/libxc/Makefile 2021-03-25 22:42:13.577696791 +0100
+@@ -274,7 +274,7 @@ xc_dom_bzimageloader.opic: CFLAGS += $(f
libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(filter -l%,$(zlib-options))
libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxencall) $(LDLIBS_libxenforeignmemory) $(LDLIBS_libxentoollog) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
- -include $(DEPS)
+ -include $(DEPS_INCLUDE)
---- xen-4.5.1/tools/Makefile.orig 2015-10-03 17:22:11.716804023 +0200
-+++ xen-4.5.1/tools/Makefile 2015-10-03 19:37:54.219795649 +0200
-@@ -207,7 +207,7 @@
- $$source/configure --enable-xen --target-list=i386-softmmu \
+diff -urNp -x '*.orig' xen-4.13.1.org/tools/Makefile xen-4.13.1/tools/Makefile
+--- xen-4.13.1.org/tools/Makefile 2020-05-14 14:19:32.000000000 +0200
++++ xen-4.13.1/tools/Makefile 2021-03-25 22:42:23.177642067 +0100
+@@ -243,7 +243,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-fi
$(QEMU_XEN_ENABLE_DEBUG) \
+ $$enable_trace_backend \
--prefix=$(LIBEXEC) \
- --libdir=$(LIBEXEC_LIB) \
+ --libdir=$(LIBEXEC_LIB) --libexecdir=$(LIBEXEC_LIB) \
--includedir=$(LIBEXEC_INC) \
- --source-path=$$source \
- --extra-cflags="-I$(XEN_ROOT)/tools/include \
+ --extra-cflags="-DXC_WANT_COMPAT_EVTCHN_API=1 \
+ -DXC_WANT_COMPAT_GNTTAB_API=1 \