archlinux: add an install file specifically for vm-kernel-support
This commit is contained in:
parent
0b35e4d327
commit
66eaa697dd
@ -13,7 +13,6 @@ arch=("x86_64")
|
|||||||
url="http://qubes-os.org/"
|
url="http://qubes-os.org/"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
groups=()
|
groups=()
|
||||||
depends=(qubes-libvchan imagemagick python2-cairo)
|
|
||||||
makedepends=(gcc make pkgconfig 'qubes-libvchan')
|
makedepends=(gcc make pkgconfig 'qubes-libvchan')
|
||||||
checkdepends=()
|
checkdepends=()
|
||||||
optdepends=()
|
optdepends=()
|
||||||
@ -22,7 +21,6 @@ conflicts=()
|
|||||||
replaces=()
|
replaces=()
|
||||||
backup=()
|
backup=()
|
||||||
options=('staticlibs')
|
options=('staticlibs')
|
||||||
install=PKGBUILD-qubes-vm-utils.install
|
|
||||||
changelog=
|
changelog=
|
||||||
|
|
||||||
source=(PKGBUILD-initcpio-hook.sh PKGBUILD-initcpio-install.sh PKGBUILD-qubes-prepare-vm-kernel.sh)
|
source=(PKGBUILD-initcpio-hook.sh PKGBUILD-initcpio-install.sh PKGBUILD-qubes-prepare-vm-kernel.sh)
|
||||||
@ -42,13 +40,16 @@ make all
|
|||||||
}
|
}
|
||||||
|
|
||||||
package_qubes-vm-utils() {
|
package_qubes-vm-utils() {
|
||||||
|
depends=(qubes-libvchan imagemagick python2-cairo)
|
||||||
|
install=PKGBUILD-qubes-vm-utils.install
|
||||||
|
|
||||||
make install DESTDIR=$pkgdir LIBDIR=/usr/lib SYSLIBDIR=/usr/lib SBINDIR=/usr/bin
|
make install DESTDIR=$pkgdir LIBDIR=/usr/lib SYSLIBDIR=/usr/lib SBINDIR=/usr/bin
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package_qubes-vm-kernel-support() {
|
package_qubes-vm-kernel-support() {
|
||||||
depends=(mkinitcpio dkms)
|
depends=(qubes-libvchan mkinitcpio dkms grub)
|
||||||
|
install=PKGBUILD-qubes-vm-kernel-support.install
|
||||||
|
|
||||||
mkdir -p ${pkgdir}/usr/lib/initcpio/install/
|
mkdir -p ${pkgdir}/usr/lib/initcpio/install/
|
||||||
mkdir -p ${pkgdir}/usr/lib/initcpio/hooks/
|
mkdir -p ${pkgdir}/usr/lib/initcpio/hooks/
|
||||||
|
28
archlinux/PKGBUILD-qubes-vm-kernel-support.install
Normal file
28
archlinux/PKGBUILD-qubes-vm-kernel-support.install
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
help() {
|
||||||
|
echo "Before using pvgrub, the kernel you want to use needs to be regenerated with Qubes kernel modules in the TemplateVM:"
|
||||||
|
echo "1/ Ensure that your kernel and kernel sources are installed (ex: pacman -S linux-lts linux-lts-headers)"
|
||||||
|
echo "2/ Ensure that grub config file has been generated for your kernel (ex: grub-mkconfig > /boot/grub/grub.cfg)
|
||||||
|
echo "3/ Run qubes-prepare-vm-kernel helper to compile Qubes-OS kernel modules and rebuild the initcpio"
|
||||||
|
echo " Usage: qubes-prepare-vm-kernel [your kernel version (found in /usr/lib/modules)] [your kernel name (ex: "linux" for vanilla kernel "linux-lts" for long term support kernel)]"
|
||||||
|
echo " Manual generation of initcpio:"
|
||||||
|
echo " dkms install u2mfn/[u2mfn_version (found in /usr/src/)] -k [kernel_version] --no-initrd"
|
||||||
|
echo " mkinitcpio -k [kernel_version] -p [kernel_name]"
|
||||||
|
}
|
||||||
|
|
||||||
|
## arg 1: the new package version
|
||||||
|
post_install() {
|
||||||
|
echo "Adding qubes required hooks to mkinitcpio.conf"
|
||||||
|
sed 's/^HOOKS="base/HOOKS="lvm2 qubes base/' -i /etc/mkinitcpio.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
echo "Adding qubes required hooks to mkinitcpio.conf"
|
||||||
|
sed 's/^HOOKS="base/HOOKS="lvm2 qubes base/' -i /etc/mkinitcpio.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
echo "Removing qubes required hooks to mkinitcpio.conf"
|
||||||
|
sed 's/^HOOKS="lvm2 qubes base/HOOKS="base/' -i /etc/mkinitcpio.conf
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user