summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortleydxdy2021-08-20 10:14:34 -0400
committertleydxdy2021-08-20 10:14:34 -0400
commit9f9c5103f03ab34c0dd9941df2b9df58b1bec982 (patch)
treea67f72d906ddcb66975b83536d4c6c6ce318e5c7
parentb0d15746b64270c890aab394768b46aafa4f5946 (diff)
downloadaur-9f9c5103f03ab34c0dd9941df2b9df58b1bec982.tar.gz
move stuff around for dracut
-rw-r--r--.SRCINFO8
-rw-r--r--90-dracut-install.hook7
-rw-r--r--99-secureboot.conf6
-rw-r--r--PKGBUILD12
-rwxr-xr-xdracut-install2
-rwxr-xr-xefi-key2
-rw-r--r--efi-key.conf9
7 files changed, 26 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 95bd9f4cf0bf..d3b3133307f8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = dracut-sb
pkgdesc = dracut secure boot setup using efistub
- pkgver = 1.0.0
- pkgrel = 3
- arch = any
+ pkgver = 1.0.1
+ pkgrel = 1
+ arch = x86_64
depends = dracut
depends = efitools
depends = efibootmgr
depends = sbsigntools
- backup = etc/pacman.d/hooks/efi-key.conf
+ backup = etc/dracut-sb/efi-key.conf
source = 55-efi-key.hook
source = 60-dracut-remove.hook
source = 90-dracut-install.hook
diff --git a/90-dracut-install.hook b/90-dracut-install.hook
index 46daea1d7c47..962cca24467f 100644
--- a/90-dracut-install.hook
+++ b/90-dracut-install.hook
@@ -5,6 +5,13 @@ Operation = Upgrade
Target = usr/lib/modules/*/pkgbase
Target = usr/lib/dracut/*
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = dracut-sb
+
[Action]
Description = Updating dracut modules...
When = PostTransaction
diff --git a/99-secureboot.conf b/99-secureboot.conf
index a94be6b9ff14..a8e76a35813f 100644
--- a/99-secureboot.conf
+++ b/99-secureboot.conf
@@ -1,2 +1,4 @@
-uefi_secureboot_cert="/dev/shm/efikeys/db.crt"
-uefi_secureboot_key="/dev/shm/efikeys/db.key"
+. /etc/dracut-sb/efi-key.conf
+uefi_stub="/etc/dracut-sb/linuxx64.efi.stub"
+uefi_secureboot_cert="${efikey_dir}/db.crt"
+uefi_secureboot_key="${efikey_dir}/db.key"
diff --git a/PKGBUILD b/PKGBUILD
index e1a436601d20..3d474cb343af 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
# Maintainer: tleydxdy <shironeko(at)waifu(dot)club>
pkgname=dracut-sb
-pkgver=1.0.0
-pkgrel=3
+pkgver=1.0.1
+pkgrel=1
pkgdesc='dracut secure boot setup using efistub'
-arch=('any')
+arch=('x86_64')
depends=('dracut' 'efitools' 'efibootmgr' 'sbsigntools')
-backup=('etc/pacman.d/hooks/efi-key.conf')
+backup=('etc/dracut-sb/efi-key.conf')
source=('55-efi-key.hook'
'60-dracut-remove.hook'
'90-dracut-install.hook'
@@ -37,7 +37,7 @@ package() {
install -Dm755 "${srcdir}"/dracut-remove "${pkgdir}"/usr/local/share/libalpm/scripts/dracut-remove
install -Dm755 "${srcdir}"/efi-key "${pkgdir}"/usr/local/share/libalpm/scripts/efi-key
- install -Dm644 "${srcdir}"/efi-key.conf "${pkgdir}"/etc/pacman.d/hooks/efi-key.conf
+ install -Dm644 "${srcdir}"/efi-key.conf "${pkgdir}"/etc/dracut-sb/efi-key.conf
- install -Dm755 "${srcdir}"/linuxx64.efi.stub "${pkgdir}"/usr/lib/gummiboot/linuxx64.efi.stub
+ install -Dm755 "${srcdir}"/linuxx64.efi.stub "${pkgdir}"/etc/dracut-sb/linuxx64.efi.stub
}
diff --git a/dracut-install b/dracut-install
index 6ac373480300..0652eecc5eff 100755
--- a/dracut-install
+++ b/dracut-install
@@ -1,6 +1,6 @@
#!/bin/bash -e
-. /etc/pacman.d/hooks/efi-key.conf
+. /etc/dracut-sb/efi-key.conf
kernels=()
dracut_update=0
diff --git a/efi-key b/efi-key
index 3a19e025b8cf..7c329b05350d 100755
--- a/efi-key
+++ b/efi-key
@@ -1,6 +1,6 @@
#!/bin/bash -e
-. /etc/pacman.d/hooks/efi-key.conf
+. /etc/dracut-sb/efi-key.conf
mkdir -p "${efikey_dir}"
echo "To skip signing run \"touch ${skip_file}\""
diff --git a/efi-key.conf b/efi-key.conf
index 366f275451c9..ff2d4627acec 100644
--- a/efi-key.conf
+++ b/efi-key.conf
@@ -1,7 +1,4 @@
-#efikey=/dev/disk/by-uuid/11111111-2222-3333-4444-555555555555
-if [ -z "${efikey}" ]; then
- echo "please configure the efikey in $( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" && exit 1
-fi
+#efikey="/dev/disk/by-uuid/11111111-2222-3333-4444-555555555555"
efikey_opt="-o subvol=efikeys"
-efikey_dir=/dev/shm/efikeys
-skip_file=${efikey_dir}/skip-boot-signing
+efikey_dir="/dev/shm/efikeys"
+skip_file="${efikey_dir}/skip-boot-signing"