summaryrefslogtreecommitdiffstats
path: root/system/xen/xen.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/xen/xen.SlackBuild')
-rw-r--r--system/xen/xen.SlackBuild75
1 files changed, 49 insertions, 26 deletions
diff --git a/system/xen/xen.SlackBuild b/system/xen/xen.SlackBuild
index 52bec8230e..5f3f380186 100644
--- a/system/xen/xen.SlackBuild
+++ b/system/xen/xen.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for xen
-# Copyright 2010, 2011, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Mario Preksavec, Zagreb, Croatia
+# Copyright 2010, 2023 Mario Preksavec, Zagreb, Croatia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +22,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=xen
-VERSION=${VERSION:-4.12.1}
+VERSION=${VERSION:-4.18.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
-SEABIOS=${SEABIOS:-1.12.0}
-OVMF=${OVMF:-20180725_ef529e6ab7}
-IPXE=${IPXE:-d2063b7693e0e35db97b2264aa987eb6341ae779}
+SEABIOS=${SEABIOS:-1.16.2}
+OVMF=${OVMF:-20230524_ba91d0292e}
+IPXE=${IPXE:-1d1cf74a5e58811822bee4b3da3cff7282fcdfca}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,17 +42,22 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ cat << EOF
+
+ *** Xen x86/32 target no longer supported!
+
+EOF
+ exit 1
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
@@ -62,7 +70,7 @@ elif [ "$ARCH" = "x86_64" ]; then
# ln -s /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-32.h
EOF
- exit
+ exit 1
fi
else
SLKCFLAGS="-O2"
@@ -90,14 +98,9 @@ EOF
esac
esac
-case "${USE_LIBSSH2:-no}" in
- yes) CONF_QEMUU+=" --enable-libssh2" ;;
- *) CONF_QEMUU+=" --disable-libssh2" ;;
-esac
-
-case "${USE_BLUEZ:-no}" in
- yes) CONF_QEMUU+=" --enable-bluez" ;;
- *) CONF_QEMUU+=" --disable-bluez" ;;
+case "${USE_LIBSSH:-no}" in
+ yes) CONF_QEMUU+=" --enable-libssh" ;;
+ *) CONF_QEMUU+=" --disable-libssh" ;;
esac
case "${USE_GTK:-no}" in
@@ -110,6 +113,12 @@ case "${USE_SPICE:-no}" in
*) CONF_QEMUU+=" --disable-spice" ;;
esac
+case "${USE_AUDIO:-no}" in
+ yes) CONF_QEMUU+="" ;;
+ no) CONF_QEMUU+=" --audio-drv-list=" ;;
+ *) CONF_QEMUU+=" --audio-drv-list=$USE_AUDIO" ;;
+esac
+
set -e
rm -rf $PKG
@@ -142,8 +151,8 @@ cp $CWD/ipxe-git-$IPXE.tar.gz tools/firmware/etherboot/_ipxe.tar.gz
(
# Seabios
cd tools/firmware
- tar -xf $CWD/seabios-$SEABIOS.tar.?z
- mv seabios-$SEABIOS seabios-dir-remote
+ tar -xf $CWD/seabios-$SEABIOS.tar.?z || tar -xf $CWD/seabios-rel-$SEABIOS.tar.?z
+ mv seabios-$SEABIOS seabios-dir-remote || mv seabios-rel-$SEABIOS seabios-dir-remote
ln -s seabios-dir-remote seabios-dir
make -C seabios-dir defconfig
# OVMF
@@ -160,9 +169,20 @@ patch -p1 <$CWD/patches/stubdom_zlib_disable_man_install.diff
# Fix glibc-2.27 build
if [ "$(ldd --version | awk '{print $NF; exit}')" = "2.27" ]; then
- ( cd tools/qemu-xen && patch -p1 <$CWD/patches/glibc-memfd_fix_configure_test.patch )
+ tools/qemu-xen && patch -d tools/qemu-xen -p1 <$CWD/patches/glibc-memfd_fix_configure_test.patch
fi
+# Fix ovmf firmware build
+patch -p1 <$CWD/patches/edk2-ovmf-werror.diff
+
+# Fix binutils-2.36 build
+if [ "$(objcopy --version | awk '{print $NF; exit}' | cut -d- -f1)" = "2.36" ]; then
+ patch -p1 <$CWD/patches/qemu-xen-no-pie.diff
+fi
+
+# Revert QEMU password removal for spice
+patch -d tools/qemu-xen -p1 -R <$CWD/patches/qemu-remove-password-option-for-spice.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -184,6 +204,9 @@ make install-xen \
MANDIR=/usr/man \
DESTDIR=$PKG
+echo CONFIG_GOLANG=n >> xen/.config
+echo CONFIG_GOLANG=n > tools/.config
+
make install-tools \
docdir=/usr/doc/$PRGNAM-$VERSION \
DOCDIR=/usr/doc/$PRGNAM-$VERSION \
@@ -217,7 +240,7 @@ find $PKG/boot/ -type l -a -name "xen-*" -exec rm -f {} \; 2>/dev/null || true
rmdir $PKG/etc/rc.d/init.d/
# Append .new to config files
-for i in $PKG/etc/{default/*,xen/*.conf} ; do mv $i $i.new ; done
+for i in $PKG/etc/{default/*,xen/*.conf,sysconfig/*} ; do [ -f $i ] && mv $i $i.new ; done
# Remove some executable flags
chmod -x $PKG/usr/libexec/xen/boot/*.gz 2>/dev/null || true
@@ -248,4 +271,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE