initial import
This commit is contained in:
177
xen/PKGBUILD
Normal file
177
xen/PKGBUILD
Normal file
@@ -0,0 +1,177 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
#####
|
||||
# Versions
|
||||
#####
|
||||
|
||||
_xen_version='4.14.6'
|
||||
_xen_major_version='4'
|
||||
_xen_minor_version='14'
|
||||
_debver=4.14.6
|
||||
_debrel=1
|
||||
|
||||
#####
|
||||
# Package metadata
|
||||
#####
|
||||
|
||||
pkgname=xen
|
||||
pkgver="${_xen_version}"
|
||||
pkgrel=4
|
||||
pkgdesc='Virtual Machine Hypervisor & Tools'
|
||||
url='https://www.xenproject.org/'
|
||||
license=('GPL-2')
|
||||
arch=('x86_64')
|
||||
validpgpkeys=('23E3222C145F4475FA8060A783FE14C957E82BD9') # Xen.org Xen tree code signing (signatures on the xen hypervisor and tools) <pgp@xen.org>
|
||||
options=(!buildflags !strip !staticlibs)
|
||||
install="${pkgname}.install"
|
||||
backup=("etc/conf.d/xen"{commons,domains}
|
||||
"etc/${pkgname}/efi-xen.cfg"
|
||||
"etc/${pkgname}/cpupool"
|
||||
"etc/${pkgname}/xl.conf")
|
||||
depends=('ocaml' 'python' 'qemu-headless-legacy' 'yajl' 'man-db')
|
||||
makedepends=('acpica' 'gettext-tiny' 'quilt')
|
||||
optdepends=('iproute2: configure networks'
|
||||
'bridge-utils: share networks via bridge interfaces'
|
||||
'seabios: boot VMs with BIOS'
|
||||
'edk2-ovmf: boot VMs with UEFI')
|
||||
source=(
|
||||
# Sources
|
||||
"https://downloads.xenproject.org/release/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
"https://downloads.xenproject.org/release/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz.sig"
|
||||
# Debian patches
|
||||
"https://deb.debian.org/debian/pool/main/x/xen/xen_$_debver-$_debrel.debian.tar.xz"
|
||||
# Files
|
||||
'efi-xen.cfg'
|
||||
"${pkgname}.conf"
|
||||
# OpenRC init files
|
||||
'xen-watchdog.initd'
|
||||
'xencommons.initd'
|
||||
'xendomains.initd'
|
||||
'xendriverdomain.initd'
|
||||
# runit init files
|
||||
'xen.run'
|
||||
'xenconsoled.run'
|
||||
'xenstored.run'
|
||||
)
|
||||
|
||||
sha512sums=('e0738954af1090d141c56ea0c0900a3cc3ea26778756bf841f908a0ec34adca784dd8cefca5515acf3e6cef63a9832d454a6ce2c04c4c60429907bf49f88648c'
|
||||
'SKIP'
|
||||
'12db9cb0f37050197226b64ab60642f98daaebe60bae8ff8e334f7e561b13b920b838e5617c843fb7427c1568307ff57bb0421edf076f840c2da75a9b5a6cd48'
|
||||
'115b642af1b89c91c3dfa653aa1c7de0df067b1a9a3b52fe568764b7df17a742ed224cac083cf6ab64fab46d5057992679e9dae349922c2795021bdabda4424f'
|
||||
'7e4be0c4eeb19c860cdd83319168e15ae2446627bcfc304ad7e9ee49564b26975daa88ef64ddcfaa47374814dc4e1ad317163598d6abc626adc73cfa4c90f22c'
|
||||
'c61e4a66dda5077cdce91633a9704800306c378e49f538c5c67537380ad93396958669dd406836caf508a002b756d392b58b0af1a959e0385747f963447d8125'
|
||||
'e8550034cbef4ccc2636b03dc91afd837274cd0dfe86e5a56df36e7deb0ba56cacfa54f84be063188f2370a9d5431588d95ee5c442880c0e71e2e3475000be9e'
|
||||
'253c967c59682685e3c1a31d3782b1f50d7d07b6c31edb009b24b3fd33825189b3edb6ee97301de35b4d273ebd5357b9fe9be981034f4598c6085c6cd5385913'
|
||||
'8b05af432f1233f8f2c2ed80ed3a730cb55cadc97cd21349651ef34038acc612e79686118d3a79296cc486668959c931183c10652e9ff755946be8e82f310bd2'
|
||||
'8c42f28c0f6011d11acd4a6a7550e27e323d7fc477d64a0cfef129426c35935b0c4987489c90c2c88937c711b1e4467d256fec92e8b06c59ce7fcb5446a92ffc'
|
||||
'f44bed0e57af5943fa0bb8e8e2b018f44dac8a7bdeb1421b52535ed5ccf031b54e0995649552355d66e1333d3795ec1c5ea4e6e2c209bc30ed55ea06ea50a638'
|
||||
'bede46958348cea92f8d9f8ce03738a369d8391a0a2d8d397deed1136325c611aaf8614c20aeffdb00d1d0a9d17d03314164a0e2cfd2b045a980af014b359749')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
if [[ ${pkgver} = ${_debver} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply and seems unimportant
|
||||
rm -v debian/patches/0001-Delete-config.sub-and-config.guess.patch || true
|
||||
rm -v debian/patches/0003-version.patch || true
|
||||
rm -v debian/patches/0017-Fix-empty-fields-in-first-hypervisor-log-line.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
# Fix Install Paths
|
||||
msg2 'Fixing installation paths...'
|
||||
sed -i 's|\$localstatedir/run/xen|/run/xen|' m4/paths.m4
|
||||
sed -i 's|/var/run|/run|g' tools/hotplug/Linux/locking.sh
|
||||
sed -i 's|/var/run|/run|g' tools/misc/xenpvnetboot
|
||||
sed -i 's|/var/run|/run|g' tools/xenmon/xenbaked.c
|
||||
sed -i 's|/var/run|/run|g' tools/xenmon/xenmon.py
|
||||
sed -i 's|/var/run|/run|g' tools/pygrub/src/pygrub
|
||||
|
||||
# Remove support for hardware based virtualization (multilib required)
|
||||
sed -i '\|SUBDIRS-$(CONFIG_X86) += firmware|d' tools/Makefile
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
#export LD_EFI='/usr/x86_64-w64-mingw32/bin/ld'
|
||||
|
||||
msg2 'Configuring...'
|
||||
./autogen.sh
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--exec_prefix=/usr \
|
||||
--libexecdir=/usr/libexec \
|
||||
--runstatedir=/run \
|
||||
--sharedstatedir=/var/lib \
|
||||
--sysconfdir=/etc \
|
||||
--disable-debug \
|
||||
--disable-ipxe \
|
||||
--disable-ovmf \
|
||||
--disable-qemu-traditional \
|
||||
--disable-rombios \
|
||||
--disable-seabios \
|
||||
--disable-stubdom \
|
||||
--disable-systemd \
|
||||
--disable-ocamltools \
|
||||
--enable-docs \
|
||||
--enable-githttp \
|
||||
--enable-monitors \
|
||||
--enable-tools \
|
||||
--enable-xen \
|
||||
--with-initddir=/etc/init.d \
|
||||
--with-rundir=/run \
|
||||
--with-sysconfig-leaf-dir=conf.d \
|
||||
--with-system-ovmf=/usr/share/edk2-ovmf/x64/OVMF.fd \
|
||||
--with-system-qemu=/usr/bin/qemu-system-x86_64 \
|
||||
--with-system-seabios=/usr/share/qemu/bios-256k.bin \
|
||||
--with-xenstored=xenstored
|
||||
|
||||
make XEN_VENDORVERSION=hyperbola
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
msg2 'Installing Xen...'
|
||||
make DESTDIR="${pkgdir}" EFI_DIR="${pkgdir}/boot" OCAMLDESTDIR="${pkgdir}/usr/lib/ocaml" install
|
||||
|
||||
# License
|
||||
install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
|
||||
cd "${pkgdir}"
|
||||
|
||||
# Install files for Hyperbola
|
||||
msg2 'Installing Hyperbola-specific files...'
|
||||
install -Dm644 "${srcdir}/efi-xen.cfg" etc/xen/efi-xen.cfg
|
||||
|
||||
# Install OpenRC init files
|
||||
msg2 'Installing OpenRC init files...'
|
||||
for f in xen-watchdog xencommons xendomains xendriverdomain; do
|
||||
install -Dm755 "${srcdir}/$f.initd" etc/init.d/$f
|
||||
done
|
||||
|
||||
# Install runit init files
|
||||
msg2 'Installing runit init files...'
|
||||
for f in xen xenconsoled xenstored; do
|
||||
install -Dm755 "${srcdir}/$f.run" etc/sv/$f/run
|
||||
done
|
||||
|
||||
mkdir -p var/log/xen/console
|
||||
|
||||
# Clean up
|
||||
msg2 'Cleaning up...'
|
||||
|
||||
# Hypervisor symlinks
|
||||
rm -f boot/xen{,-${_xen_major_version}{,.${_xen_minor_version}}}.gz
|
||||
|
||||
# Temporary directories
|
||||
rmdir run{/xen{,stored},}
|
||||
}
|
||||
Reference in New Issue
Block a user