summaryrefslogtreecommitdiff
path: root/kernels/xen/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/xen/PKGBUILD')
-rw-r--r--kernels/xen/PKGBUILD191
1 files changed, 191 insertions, 0 deletions
diff --git a/kernels/xen/PKGBUILD b/kernels/xen/PKGBUILD
new file mode 100644
index 000000000..6ff16c8cd
--- /dev/null
+++ b/kernels/xen/PKGBUILD
@@ -0,0 +1,191 @@
+# Maintainer: David Sutton <kantras - gmail.com>
+# Contributor: Limao Luo
+# Contributor: Luceo
+# Contributor: Revellion
+# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
+
+pkgname=xen
+pkgver=4.3.1
+pkgrel=2
+pkgdesc="Virtual Machine Hypervisor & Tools (Parabola rebranded)"
+arch=(i686 x86_64)
+url="http://www.xenproject.org/"
+license=(GPL2)
+depends=(bin86 bluez bridge-utils curl e2fsprogs gnutls iproute2 libaio libcap-ng libiscsi libjpeg-turbo libpng lzo2 nss pixman pciutils python python2 sdl wget vde2 yajl)
+[[ "$CARCH" == "x86_64" ]] && depends+=(lib32-glibc)
+makedepends=(cmake dev86 git iasl markdown ocaml-findlib)
+optdepends=('xen-docs: Official Xen Documentation' 'openvswitch: Optional Networking support')
+conflicts=(xen-4.2{,-testing-hg} xen-{gdbsx,hg-unstable,rc,git} xen-4.3{,-testing-hg})
+backup=(etc/$pkgname/xend-{config,pci-{permissive,quirks}}.sxp etc/modules-load.d/$pkgname.conf etc/$pkgname/xl.conf etc/conf.d/xen{stored,consoled,domains} etc/default/xencommons etc/$pkgname/grub.conf)
+options=(!buildflags !strip)
+install=$pkgname.install
+changelog=ChangeLog
+source=(http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
+ xen.install
+ 09_xen
+ bios_workaround.patch
+ xendomains.patch
+ TOM-register.patch
+ ati-passthrough.patch
+ IVRS-debug.patch
+ proc-xen.mount
+ var-lib-xenstored.mount
+ xenconsoled.service
+ conf.d-xenconsoled
+ xendomains.service
+ xendomU@.service
+ xenstored.service
+ conf.d-xenstored
+ tmpfiles.d-$pkgname.conf
+ grub.conf
+ xsa73-4.3-unstable.patch
+ xsa75-4.3-unstable.patch
+ xsa78.patch
+ $pkgname.conf)
+sha256sums=('3b5b7cc508b1739753585b5c25635471cdcef680e8770a78bf6ef9333d26a9fd'
+ '0f6ebf3437974d1708c9e74005b976479ab8ff28adec394208153bf404b411f8'
+ '74a957d783458b7481c7a09c3ed94ec2e07ee7943e4b7fa33d3684b8d585139e'
+ '914cc983da1fe89ff125d751c979b4968f8952da21b19b900fcd4e6b33e14552'
+ '1938ca36bfb62c76ad0642147017ecfaa64588abaa2d88e868f501c4ae83bfd9'
+ '0fa9426cc499ea3d6e1aa33a8be0e180aed87936814b9b88bb0ef42f6983654a'
+ 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3'
+ '54883171ff9cf5f342a2be5c944df16902ef06b6f2d015b675fa9bd5ed899c7c'
+ '139eed988bfaf8edc8ccdfd0b668382bd63db48ce17be91776182a7e28e9d88c'
+ 'c19146931c6ab8e53092bd9b2ebbfda5c76fd22ad3b1d42dcda3dd1b61f123ff'
+ 'e4af7891e816b9549ebeff766a78036626c0e278734e5625b8e7d68729530ded'
+ '48d76cc6f25caa79b3f527c96a0883b1decb9012f6616f61336c8d43791bf007'
+ '0bd45d9de6456c4f9adf32e726f2db3a3cd0423c1d161b442e8a1666d2e68e3f'
+ '012cc60ffdcb0e061d04d404eb9232734554aef4dc4b551f66adf82a655e6e41'
+ '8ee5c5a14064fc2bbfd38d0ec8a6001f541bbe56b9fb534733209a8af148b297'
+ '0e1ad0a6a72b0c22025a556c23235a8f663427f1e769c45fe39d1c525bf82eff'
+ '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf'
+ '78398fb27edfedb432b5f4e4bf87b5dbee41f180c623d29f758234a49d8bf4b4'
+ '18f62049d714c3460df1f698663e42d0f8a16b9b4f62e66b40fdea635a348be5'
+ '4bac312d49a4a88633af652c09128ba1bba2ca97e2e56e5fe7da6e4671c56ccb'
+ 'bb13b280bb456c1d7c8f468e23e336e6b2d06eb364c6823f1b426fcfe09f6ed3'
+ '50a9b7fd19e8beb1dea09755f07318f36be0b7ec53d3c9e74f3266a63e682c0c')
+sha512sums=('f5250ad5ad3defc5dc1207eb6208a3928128ef57ac4162018bd92b750dc1df1eaaf37835528aca33a0f9e04c82d5f8c4ba79c03a1780d2b72cbb90cc26f77275'
+ '78bfb62166ffcf136e12985809b3f412e0145a7f17388a559071f644970ccdfd2a02fe9aa4a180069b923c2e4354b061a4057096de856497f10d9cac57eae4b3'
+ '8667a97e10f09c5ce5ba604e38a073b7d7944f4d24c5c78a7235443b65a8cc7b6e7de90e40aa335bb17fda0858d6b517ba1e8b5a0bd6bba4ad75ad44b73f6c9c'
+ '7118bf02ff5338e70b3f27f8ea390cd05ea37a4ceabb4adc9d32fc57329e35e98330f0e865261dd4e670436e1a725832598888d44b1e2b17b351f59318860878'
+ '440b3967bf0f0cecde42111bc602f591edeadfdf7044f1f181029b0ded5fb8fa9d640bc4a4a57daadd350594f86065120ea5e4d833004590a8bfe0ee88b4c316'
+ 'b89f524015c1299c7b19573ae0637f9d33613f3fdbb3d978a07d294ee18a657bd124852f1cbb85e6d1382aca42ed799e8ee245a161340bb4b759eeccce28df7d'
+ 'c30a4cbdc942ae36364830ab604ecb46a68466bfbaaef2740aa805acf9e432a0dd7877593d6211437db4d2e7c2deb15f301d5a5571fd28936f01228f13256d3f'
+ 'e8392dbc66bf83b887de963416b1fe9a4eeccb8faca78c6fc1dd4243544b871625d43423f03d19cf91d80295d43073904c9dbe37241e7432b69566b05b267391'
+ '6afdf16e32bb837faf6333334f86855a746f1f46fee9673a4fddc62eecf41f9856bc34397807203c6f5071f0b1ce74532214084042154585c0d39514450db25c'
+ '00e340f4d3635e3850ca24baea1da08467523c17815feb74161e18397b607fef904db2165fd9bf4632a6e8a6e37aeddad4e56965e1c99b5213c98b3f9afc6aad'
+ '580e0645d7f157928f137f3d8b38d3e2834cb5fa091dbcd28217bbaed494415a35c8973487a1eec726c2f49c8b11d4dd28fdcbe75f14c91a4474cacd8dfb2e99'
+ 'a0bbd9c14ee0f2b9dc9cf304b531aaefde545e56b4ce4847f12faab4952520ce857a92765ae3a1b25ebd2b7511bb24fc820864d7342ac43a311d8c6551958895'
+ 'f00034f8b826b828659a0177f0a6454113c625e69a817dfe32e461767f6643e0288bfc2a22d23358504240df627af6e3b8f5ffa0077e241e590b33d3f252e74c'
+ 'f21cc17009957797630c2e82630b5e93ceac8fdadc5eaa3abf0510ca81a49e5680a80ece63b248354122c5fd5d40c9a495fad15e307a694936fa062e984158c4'
+ '9e95e05ac7cce383530ede0f8f75b4f8990c7d7d55ef59f3e37c64a75ccc012475595bc1123bc4c2072dd2c1c2f4b744f26d6adb799f7a068195aadde383af89'
+ 'c996d48737ad31528b0b2b1379e3ebae948d290de9ddc71f33c7c56f0634466bc7afb2eab847e851c19e3c13bb99468a0778d908606486959a40ff3272189bd3'
+ '53ba61587cc2e84044e935531ed161e22c36d9e90b43cab7b8e63bcc531deeefacca301b5dff39ce89210f06f1d1e4f4f5cf49d658ed5d9038c707e3c95c66ef'
+ '04000a802e96c11929cb94c9a2bcafbb4307620192388441d979ea85836c3395954dea53d449c1cc25c3a0a30c49d318b8de59a053c6254f5a81e87864648a9c'
+ '78c94d3e473abaf857213754c7f0ef1a0dd06354cd137d1567a48d92b4106cbefd112f1dcecc90bc1f8c75d76a0e8a3425408f777044de8ec754bcda32bb7f97'
+ '4fb6f678dccc9f23f2c3b27617718bc6c0a87505f7483f4d07563b7b2cc37d57d3b5ef658ee5867258916c5c2695a5086cc7790196aed85357c6d3168c06749b'
+ 'b55cb25f88acc348e6777063f241269730f06482fe430706ac500cbd7127bc7c70188f84a282dc8a0369cc838999d47a09afc33fc9f24b5c214bdf59352c414c'
+ 'ccaa2ff82e4203b11e5dec9aeccac2e165721d8067e0094603ecaa7a70b78c9eb9e2287a32687883d26b6ceae6f8d2ad7636ddf949eb658637b3ceaa6999711b')
+
+prepare() {
+ cd $pkgname-$pkgver/
+
+ ### Patching
+ patch -Np1 -i ../xendomains.patch
+ patch -Np1 -i ../TOM-register.patch
+
+ # Uncomment line below if you have a bios which is reporting bad IVRS data
+ #patch -Np1 -i ../bios_workaround.patch
+ #patch -Np1 -i ../IVRS-debug.patch
+
+ # Uncomment line below if you want to enable ATI Passthrough support (some reported successes)
+ #patch -Np1 -i ../ati-passthrough.patch
+
+ # Add Security Patches
+ patch -Np1 -i ../xsa73-4.3-unstable.patch
+ patch -Np1 -i ../xsa75-4.3-unstable.patch
+ patch -Np1 -i ../xsa78.patch
+
+ # Fix Install Paths
+ sed -i 's:/sbin:/bin:' config/StdGNU.mk
+
+}
+
+build() {
+ export CFLAGS+='-Wall -Wstrict-prototypes -Wno-unused-local-typedefs -Wno-sizeof-pointer-memaccess'
+ cd $pkgname-$pkgver/
+ ./autogen.sh
+ ./configure PYTHON=/usr/bin/python2 --prefix=/usr --localstatedir=/run
+ unset CFLAGS
+}
+
+package() {
+ cd $pkgname-$pkgver/
+
+ make DESTDIR="$pkgdir" LANG=C PYTHON=python2 install-{xen,tools,stubdom}
+
+ cd ../
+ for f in ${source[@]}; do
+ [[ $f =~ .mount || $f =~ .service ]] && install -Dm644 $f "$pkgdir"/usr/lib/systemd/system/$f
+ done
+ install -Dm644 tmpfiles.d-$pkgname.conf "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
+ install -Dm644 $pkgname.conf "$pkgdir"/etc/modules-load.d/$pkgname.conf
+ install -Dm644 conf.d-xenstored "$pkgdir"/etc/conf.d/xenstored
+ install -Dm644 conf.d-xenconsoled "$pkgdir"/etc/conf.d/xenconsoled
+ install -Dm644 grub.conf "$pkgdir"/etc/xen/grub.conf
+ install -Dm755 09_xen "$pkgdir"/etc/grub.d/09_xen
+
+ cd "$pkgdir"
+
+ # Fix paths in scripts, move to right locations and create missing directories
+ sed -i 's:/var/lock:/run/lock:' etc/init.d/xendomains
+ sed -i 's:/var/lock:/run/lock:' etc/init.d/xend
+ sed -i 's:/var/lock:/run/lock:' etc/xen/scripts/hotplugpath.sh
+ sed -i 's:/var/run:/run:' etc/xen/scripts/hotplugpath.sh
+ mv etc/{init,rc}.d
+ mv etc/rc.d/xendomains etc/xen/scripts/xendomains
+ mv etc/default/xendomains etc/conf.d/xendomains
+ mv var/xen/dump var/lib/xen/
+ mkdir var/log/xen/console
+
+ # Sanitize library path (if lib64 exists)
+ if [[ -d usr/lib64 ]]; then
+ cd usr/
+ cp -r lib64/* lib/
+ rm -rf lib64
+ cd ../
+ fi
+
+ # Compress and move syms file to a different directory
+ if [ "$CARCH" == "x86_64" ]; then
+ gzip boot/$pkgname-syms-$pkgver
+ mv boot/$pkgname-syms-$pkgver.gz usr/share/xen
+ fi
+
+ ##### Kill unwanted stuff #####
+ # hypervisor symlinks
+ rm -f boot/xen{,-4,-4.3}.gz
+
+ # Documentation cleanup ( see xen-docs package )
+ rm -rf usr/share/doc
+ rm -rf usr/share/xen/man
+
+ # Pointless helper cleanup
+ rm -f usr/bin/xen-python-path
+ rm -rf usr/libexec
+
+ # Unnecessary qemu support files
+ rm -rf usr/bin/qemu-*-xen
+ rm usr/share/qemu-xen/qemu/{palcode,openbios}-*
+ rm usr/share/xen/qemu/openbios-*
+
+ # Clean up udev rules naming, remove depreciated xend.rules
+ mv etc/udev/rules.d/xen-backend.rules etc/udev/rules.d/40-xen-backend.rules
+ rm etc/udev/rules.d/xend.rules
+
+ # Clean up left over empty directories
+ rm -rf var/run var/lock var/xen
+
+ # adhere to Static Library Packaging Guidelines
+ rm -rf usr/lib/*.a
+}