summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Stefani2019-09-22 15:23:25 +0200
committerLuca Stefani2019-09-22 15:23:25 +0200
commitfc73117c77d33d4c605cb6ff946fb33fe840b6d1 (patch)
treeab7d6cbe5e875620a983b54e54865b82c3b9ae85
downloadaur-fc73117c77d33d4c605cb6ff946fb33fe840b6d1.tar.gz
Initial commit
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD14
-rw-r--r--systemd-efi.hook9
3 files changed, 36 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..409d01b7353e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = systemd-efi-pacman-hook
+ pkgdesc = Pacman hook to upgrade Linux EFI after systemd upgrade and Linux.
+ pkgver = 1
+ pkgrel = 1
+ arch = any
+ license = GPL
+ depends = systemd
+ depends = linux
+ source = systemd-efi.hook
+ md5sums = 3dc361232f8ff15126172486e557acb9
+
+pkgname = systemd-efi-pacman-hook
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ee1fe5df759b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,14 @@
+pkgname=systemd-efi-pacman-hook
+pkgver=1
+pkgrel=1
+pkgdesc="Pacman hook to upgrade Linux EFI after systemd upgrade and Linux."
+arch=("any")
+license=("GPL")
+depends=('systemd' 'linux')
+source=(systemd-efi.hook)
+md5sums=('3dc361232f8ff15126172486e557acb9')
+
+package() {
+ install -m755 -d "${pkgdir}/usr/share/libalpm/hooks"
+ install -m644 "${srcdir}/systemd-efi.hook" "${pkgdir}/usr/share/libalpm/hooks/systemd-efi.hook"
+}
diff --git a/systemd-efi.hook b/systemd-efi.hook
new file mode 100644
index 000000000000..457803978199
--- /dev/null
+++ b/systemd-efi.hook
@@ -0,0 +1,9 @@
+[Trigger]
+Type = Package
+Operation = Upgrade
+Target = linux
+
+[Action]
+Description = Generating linux.efi...
+When = PostTransaction
+Exec = /bin/sh -c '/usr/bin/mkdir -p "/boot/EFI/Linux"; /usr/bin/objcopy --add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 --add-section .cmdline="/boot/kernel-command-line" --change-section-vma .cmdline=0x30000 --add-section .linux="/boot/vmlinuz-linux" --change-section-vma .linux=0x40000 --add-section .initrd="/boot/initramfs-linux.img" --change-section-vma .initrd=0x3000000 "/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "/boot/EFI/Linux/linux.efi"'