--- /dev/null
+diff -ur xen-4.16.2.orig/xen/common/bunzip2.c xen-4.16.2/xen/common/bunzip2.c
+--- xen-4.16.2.orig/xen/common/bunzip2.c 2022-08-18 13:47:46.000000000 +0200
++++ xen-4.16.2/xen/common/bunzip2.c 2023-07-20 22:01:47.934242320 +0200
+@@ -223,6 +223,7 @@
+ for (j = 0; j < groupCount; j++) {
+ unsigned char length[MAX_SYMBOLS], temp[MAX_HUFCODE_BITS+1];
+ int minLen, maxLen, pp;
++ length[0] = 0;
+ /* Read Huffman code lengths for each symbol. They're
+ stored in a way similar to mtf; record a starting
+ value for the first symbol, and an offset from the
%bcond_without hypervisor # Xen hypervisor build
%bcond_without stubdom # stubdom build
%bcond_without xsm # XSM security module (by default, Flask)
+%bcond_without systemd # systemd
%ifnarch %{x8664} %{arm}
%undefine with_hypervisor
Patch16: ocaml-4.12.patch
Patch17: %{name}-golang-32bit.patch
Patch18: %{name}-gcc12.patch
+Patch19: gcc13.patch
URL: http://www.xen.org/products/xenhyp.html
BuildRequires: autoconf >= 2.67
%ifarch %{ix86} %{x8664}
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: seabios
-BuildRequires: systemd-devel >= 1:209
+%{?with_systemd:BuildRequires: systemd-devel >= 1:209}
BuildRequires: texlive-dvips
BuildRequires: texlive-latex-psnfss
BuildRequires: texlive-xetex
%patch17 -p1
%endif
%patch18 -p1
+%patch19 -p1
# stubdom sources
ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
%else
--with-system-qemu=/usr/bin/qemu-system-i386 \
%endif
+%if %{with systemd}
--with-systemd=%{systemdunitdir}
-
+%else
+ --disable-systemd
+%endif
export EXTRA_CFLAGS_XEN_TOOLS="%{rpmcflags} -I/usr/include/ncurses"
export EXTRA_CFLAGS_QEMU_TRADITIONAL="%{rpmcflags} -I/usr/include/ncurses"
export EXTRA_CFLAGS_QEMU_XEN="%{rpmcflags} -I/usr/include/ncurses"
%attr(754,root,root) /etc/rc.d/init.d/xenstored
%attr(754,root,root) /etc/rc.d/init.d/xendomains
%attr(754,root,root) /etc/rc.d/init.d/xen-qemu-dom0-disk-backend
+%if %{with systemd}
%{_prefix}/lib/modules-load.d/xen.conf
%{systemdunitdir}/proc-xen.mount
%{systemdunitdir}/var-lib-xenstored.mount
%{systemdunitdir}/xendriverdomain.service
%{systemdunitdir}/xendomains.service
%{systemdunitdir}/xen-qemu-dom0-disk-backend.service
+%endif
%dir %{_sysconfdir}/xen
%dir %{_sysconfdir}/xen/auto
%dir %{_sysconfdir}/xen/examples