[arch-commits] Commit in kmod/trunk (PKGBUILD depmod.hook depmod.script)
Giancarlo Razzolini
grazzolini at archlinux.org
Tue Oct 29 00:45:52 UTC 2019
Date: Tuesday, October 29, 2019 @ 00:45:52
Author: grazzolini
Revision: 365986
upgpkg: kmod 26-3
Add a new pacman hook that runs depmod for the kernels, instead of having the hooks
on each kernel.
Added:
kmod/trunk/depmod.hook
kmod/trunk/depmod.script
Modified:
kmod/trunk/PKGBUILD
---------------+
PKGBUILD | 11 +++++++++--
depmod.hook | 13 +++++++++++++
depmod.script | 9 +++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-28 21:20:49 UTC (rev 365985)
+++ PKGBUILD 2019-10-29 00:45:52 UTC (rev 365986)
@@ -2,7 +2,7 @@
pkgname=kmod
pkgver=26
-pkgrel=2
+pkgrel=3
pkgdesc="Linux kernel module management tools and library"
arch=('x86_64')
url='https://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary'
@@ -16,11 +16,14 @@
replaces=('module-init-tools')
validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi
source=("https://www.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign}
- "depmod-search.conf"
+ 'depmod-search.conf'
+ 'depmod.hook' 'depmod.script'
'0001-Link-against-libcrypto-not-all-of-openssl.patch')
md5sums=('1129c243199bdd7db01b55a61aa19601'
'SKIP'
'dd62cbf62bd8f212f51ef8c43bec9a77'
+ '72ce5e14ee3ad8bc06945e0ad4c642ce'
+ '18fb3d1f6024a5a84514c8276cb3ebff'
'e918bef174c1057fa13a5ba8c4a30a46')
prepare() {
@@ -75,6 +78,10 @@
# install depmod.d file for search/ dir
install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
+
+ # hook
+ install -Dm644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook"
+ install -Dm755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod"
}
# vim: ft=sh syn=sh et
Added: depmod.hook
===================================================================
--- depmod.hook (rev 0)
+++ depmod.hook 2019-10-29 00:45:52 UTC (rev 365986)
@@ -0,0 +1,13 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/modules/*/
+Target = !usr/lib/modules/*/?*
+
+[Action]
+Description = Updating module dependencies...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/depmod
+NeedsTargets
Added: depmod.script
===================================================================
--- depmod.script (rev 0)
+++ depmod.script 2019-10-29 00:45:52 UTC (rev 365986)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+while read -r f; do
+ if [[ -e ${f}vmlinuz ]]; then
+ depmod $(basename "$f")
+ fi
+done
+
+# vim:set ft=sh sw=2 et:
More information about the arch-commits
mailing list