[arch-commits] Commit in kmod/repos (5 files)

Christian Hesse eworm at gemini.archlinux.org
Mon Apr 4 11:34:55 UTC 2022


    Date: Monday, April 4, 2022 @ 11:34:55
  Author: eworm
Revision: 441512

archrelease: copy trunk to testing-x86_64

Added:
  kmod/repos/testing-x86_64/
  kmod/repos/testing-x86_64/PKGBUILD
    (from rev 441511, kmod/trunk/PKGBUILD)
  kmod/repos/testing-x86_64/depmod-search.conf
    (from rev 441511, kmod/trunk/depmod-search.conf)
  kmod/repos/testing-x86_64/depmod.hook
    (from rev 441511, kmod/trunk/depmod.hook)
  kmod/repos/testing-x86_64/depmod.script
    (from rev 441511, kmod/trunk/depmod.script)

--------------------+
 PKGBUILD           |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 depmod-search.conf |    5 +++
 depmod.hook        |   13 ++++++++
 depmod.script      |   13 ++++++++
 4 files changed, 112 insertions(+)

Copied: kmod/repos/testing-x86_64/PKGBUILD (from rev 441511, kmod/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2022-04-04 11:34:55 UTC (rev 441512)
@@ -0,0 +1,81 @@
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+
+pkgname=kmod
+pkgver=29
+pkgrel=3
+pkgdesc="Linux kernel module management tools and library"
+arch=('x86_64')
+url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'
+license=('GPL2')
+depends=('glibc' 'zlib' 'openssl' 'xz' 'zstd')
+checkdepends=('linux-headers' 'libelf')
+options=('strip' 'debug')
+provides=('module-init-tools=3.16' 'libkmod.so')
+conflicts=('module-init-tools')
+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.hook' 'depmod.script')
+md5sums=('e81e63acd80697d001c8d85c1acb38a0'
+         'SKIP'
+         'dd62cbf62bd8f212f51ef8c43bec9a77'
+         'e179ace75721e92b04b2e145b69dab29'
+         'b00253ca0d4ebfb2414e4596597bdebd')
+sha256sums=('0b80eea7aa184ac6fd20cafa2a1fdf290ffecc70869a797079e2cc5c6225a52a'
+            'SKIP'
+            '1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8'
+            'c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1'
+            'd2cd04a09feba30e1376144a8110ec7521892acb0940c3c4ba459aeecf0452ed')
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  ./configure \
+    --sysconfdir=/etc \
+    --with-xz \
+    --with-zlib \
+    --with-zstd \
+    --with-openssl
+
+  make
+}
+
+check() {
+  # As of kmod v20, the test suite needs to build some kernel modules, and thus
+  # needs headers available in order to run. We depend on linux-headers, but
+  # this is really only to try and make sure that *some* useable tree of kernel
+  # headers exist. The first useable tree we find is good enough, as these
+  # modules will never be loaded by tests.
+
+  local kdirs=(/usr/lib/modules/*/build/Makefile)
+  if [[ ! -f ${kdirs[0]} ]]; then
+    printf '==> Unable to find kernel headers to build modules for tests\n' >&2
+    return 1
+  fi
+
+  local kver kdir=${kdirs[0]%/Makefile}
+  IFS=/ read _ _ _ kver _ <<<"$kdir"
+
+  make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver"
+}
+
+package() {
+  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+  # extra directories
+  install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d
+
+  for tool in {ins,ls,rm,dep}mod mod{probe,info}; do
+    ln -s kmod "$pkgdir/usr/bin/$tool"
+  done
+
+  # 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

Copied: kmod/repos/testing-x86_64/depmod-search.conf (from rev 441511, kmod/trunk/depmod-search.conf)
===================================================================
--- testing-x86_64/depmod-search.conf	                        (rev 0)
+++ testing-x86_64/depmod-search.conf	2022-04-04 11:34:55 UTC (rev 441512)
@@ -0,0 +1,5 @@
+#
+# /usr/lib/depmod.d/search.conf
+#
+
+search updates extramodules built-in

Copied: kmod/repos/testing-x86_64/depmod.hook (from rev 441511, kmod/trunk/depmod.hook)
===================================================================
--- testing-x86_64/depmod.hook	                        (rev 0)
+++ testing-x86_64/depmod.hook	2022-04-04 11:34:55 UTC (rev 441512)
@@ -0,0 +1,13 @@
+[Trigger]
+Type = Path
+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

Copied: kmod/repos/testing-x86_64/depmod.script (from rev 441511, kmod/trunk/depmod.script)
===================================================================
--- testing-x86_64/depmod.script	                        (rev 0)
+++ testing-x86_64/depmod.script	2022-04-04 11:34:55 UTC (rev 441512)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+while read -r f; do
+  if [[ -e ${f}modules.order ]]; then
+    depmod $(basename "$f")
+  elif [[ -d $f ]]; then
+    rm -f "${f}"modules.{alias,alias.bin,builtin.alias.bin,builtin.bin} \
+          "${f}"modules.{dep,dep.bin,devname,softdep,symbols,symbols.bin}
+    rmdir --ignore-fail-on-non-empty "$f"
+  fi
+done
+
+# vim:set ft=sh sw=2 et:



More information about the arch-commits mailing list