summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Orth2019-11-11 12:46:05 +0200
committerAlan Orth2019-11-11 12:46:05 +0200
commitc3e28f0845d3e78c0cbe3dd527a4ae0a6109fce8 (patch)
tree9366577ac8da3a528ffff51a3cef868460323b07
parentf2c999180e7f715f8d03323214b69d232d4384be (diff)
downloadaur-c3e28f0845d3e78c0cbe3dd527a4ae0a6109fce8.tar.gz
Changes for new kmod and mkinitcpio hooks
-rw-r--r--.SRCINFO8
-rw-r--r--60-linux.hook12
-rw-r--r--90-linux.hook11
-rw-r--r--99-linux.hook9
-rw-r--r--PKGBUILD30
-rw-r--r--linux.preset14
6 files changed, 4 insertions, 80 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e324b434291..6a8be745f4c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -20,16 +20,8 @@ pkgbase = linux-clear-bin
options = !strip
source = https://cdn.download.clearlinux.org/update/31530/Manifest.kernel-native
source = https://cdn.download.clearlinux.org/update/31530/pack-kernel-native-from-0.tar
- source = 60-linux.hook
- source = 90-linux.hook
- source = 99-linux.hook
- source = linux.preset
sha256sums = ccc25fa20e68f891149f11747300d74aa7cfdcb69d9e9aea357c533871596941
sha256sums = 74b32f8a9c895b8ff9084c86c7cb41a8519f8fbe267e853436fee707c834339a
- sha256sums = 60b965278d9b0af897b6a54c847a4ea5adfe6116c19191b2b814c6f8bf92521e
- sha256sums = 5a1b61d41b4d194d0ff6e1e13f650ee982db403b008cacdc5564e7bd265a81fc
- sha256sums = a61b3fdc2ef2f1405b3ffe166e9c6d1666289ab427f2348259f04b5e878376a2
- sha256sums = 210e075d642b212df990a2a669e88b81547e6c4e0ed37ef289c0e2987f713c92
pkgname = linux-clear-bin
diff --git a/60-linux.hook b/60-linux.hook
deleted file mode 100644
index 1f972df11ef..00000000000
--- a/60-linux.hook
+++ /dev/null
@@ -1,12 +0,0 @@
-[Trigger]
-Type = File
-Operation = Install
-Operation = Upgrade
-Operation = Remove
-Target = usr/lib/modules/%KERNEL_VERSION%/*
-Target = usr/lib/modules/%EXTRAMODULES%/*
-
-[Action]
-Description = Updating %PKGNAME% module dependencies...
-When = PostTransaction
-Exec = /usr/bin/depmod %KERNEL_VERSION% \ No newline at end of file
diff --git a/90-linux.hook b/90-linux.hook
deleted file mode 100644
index 9627803fc3b..00000000000
--- a/90-linux.hook
+++ /dev/null
@@ -1,11 +0,0 @@
-[Trigger]
-Type = File
-Operation = Install
-Operation = Upgrade
-Target = usr/lib/modules/%KERNEL_VERSION%/vmlinuz
-Target = usr/lib/initcpio/*
-
-[Action]
-Description = Updating %PKGNAME% initcpios...
-When = PostTransaction
-Exec = /usr/bin/mkinitcpio -p %PKGNAME%
diff --git a/99-linux.hook b/99-linux.hook
deleted file mode 100644
index b924133f67e..00000000000
--- a/99-linux.hook
+++ /dev/null
@@ -1,9 +0,0 @@
-[Trigger]
-Type = File
-Operation = Remove
-Target = boot/vmlinuz-%PKGNAME%
-
-[Action]
-Description = Remove %PKGNAME% initramfs files...
-When = PreTransaction
-Exec = /usr/bin/rm -f /boot/initramfs-%PKGNAME%.img /boot/initramfs-%PKGNAME%-fallback.img
diff --git a/PKGBUILD b/PKGBUILD
index a986a719f5f..2b59007d803 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,17 +26,9 @@ _kernel_version="${pkgver}-${pkgrel}.native"
source=("https://cdn.download.clearlinux.org/update/${_clear_version}/Manifest.kernel-native"
"https://cdn.download.clearlinux.org/update/${_clear_version}/pack-kernel-native-from-0.tar"
- "60-linux.hook" # pacman hook for depmod
- "90-linux.hook" # pacman hook for initramfs regeneration
- "99-linux.hook" # pacman hook for remove initramfs
- "linux.preset" # standard config files for mkinitcpio ramdisk)
)
sha256sums=('ccc25fa20e68f891149f11747300d74aa7cfdcb69d9e9aea357c533871596941'
- '74b32f8a9c895b8ff9084c86c7cb41a8519f8fbe267e853436fee707c834339a'
- '60b965278d9b0af897b6a54c847a4ea5adfe6116c19191b2b814c6f8bf92521e'
- '5a1b61d41b4d194d0ff6e1e13f650ee982db403b008cacdc5564e7bd265a81fc'
- 'a61b3fdc2ef2f1405b3ffe166e9c6d1666289ab427f2348259f04b5e878376a2'
- '210e075d642b212df990a2a669e88b81547e6c4e0ed37ef289c0e2987f713c92')
+ '74b32f8a9c895b8ff9084c86c7cb41a8519f8fbe267e853436fee707c834339a')
build() {
# get kernel's filename (hash) from the Manifest, ie:
# 4776962fb058c91e89dcefac4740d7a1af37ea12d217d3f8d0f49797553146e7
@@ -66,12 +58,6 @@ package() {
local modulesdir="$pkgdir/usr/lib/modules/$_kernel_version"
local extradir="$pkgdir/usr/lib/modules/$extramodules"
- local subst="
- s|%PKGNAME%|$pkgname|g
- s|%KERNEL_VERSION%|$_kernel_version|g
- s|%EXTRAMODULES%|$extramodules|g
- "
-
mkdir -p $pkgdir/usr/lib
mkdir -p $extradir
echo $_kernel_version > $extradir/version
@@ -81,22 +67,14 @@ package() {
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 vmlinuz-${pkgname} "$modulesdir/vmlinuz"
- install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase"
install -Dm644 vmlinuz-${pkgname}.cmdline $pkgdir/boot/vmlinuz-${pkgname}.cmdline
+ # Used by mkinitcpio to name the kernel
+ echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
+
msg2 "Installing modules..."
cp -r modules $pkgdir/usr/lib
- msg2 "Installing hooks..."
- sed "$subst" linux.preset | install -Dm644 /dev/stdin \
- "$pkgdir/etc/mkinitcpio.d/${pkgname}.preset"
- sed "$subst" 60-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/60-${pkgname}.hook"
- sed "$subst" 90-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/90-${pkgname}.hook"
- sed "$subst" 99-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/99-${pkgname}.hook"
-
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
diff --git a/linux.preset b/linux.preset
deleted file mode 100644
index 1d1338414dc..00000000000
--- a/linux.preset
+++ /dev/null
@@ -1,14 +0,0 @@
-# mkinitcpio preset file for the '%PKGNAME%' package
-
-ALL_config="/etc/mkinitcpio.conf"
-ALL_kver="/boot/vmlinuz-%PKGNAME%"
-
-PRESETS=('default' 'fallback')
-
-#default_config="/etc/mkinitcpio.conf"
-default_image="/boot/initramfs-%PKGNAME%.img"
-#default_options=""
-
-#fallback_config="/etc/mkinitcpio.conf"
-fallback_image="/boot/initramfs-%PKGNAME%-fallback.img"
-fallback_options="-S autodetect"