[arch-commits] Commit in linux-zen/trunk (4 files)

Jan Steffens heftig at archlinux.org
Sat Nov 18 23:10:31 UTC 2017


    Date: Saturday, November 18, 2017 @ 23:10:30
  Author: heftig
Revision: 310408

4.14-2

Added:
  linux-zen/trunk/60-linux.hook
Modified:
  linux-zen/trunk/90-linux.hook
  linux-zen/trunk/PKGBUILD
  linux-zen/trunk/linux.install

---------------+
 60-linux.hook |   12 +++++++++++
 90-linux.hook |    2 -
 PKGBUILD      |   59 +++++++++++++++++++++++++++++++++-----------------------
 linux.install |   17 ----------------
 4 files changed, 48 insertions(+), 42 deletions(-)

Added: 60-linux.hook
===================================================================
--- 60-linux.hook	                        (rev 0)
+++ 60-linux.hook	2017-11-18 23:10:30 UTC (rev 310408)
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/modules/%KERNVER%/*
+Target = usr/lib/modules/%EXTRAMODULES%/*
+
+[Action]
+Description = Updating %PKGBASE% module dependencies...
+When = PostTransaction
+Exec = /usr/bin/depmod %KERNVER%

Modified: 90-linux.hook
===================================================================
--- 90-linux.hook	2017-11-18 23:04:40 UTC (rev 310407)
+++ 90-linux.hook	2017-11-18 23:10:30 UTC (rev 310408)
@@ -6,6 +6,6 @@
 Target = usr/lib/initcpio/*
 
 [Action]
-Description = Updating %PKGBASE% initcpios
+Description = Updating %PKGBASE% initcpios...
 When = PostTransaction
 Exec = /usr/bin/mkinitcpio -p %PKGBASE%

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-18 23:04:40 UTC (rev 310407)
+++ PKGBUILD	2017-11-18 23:10:30 UTC (rev 310408)
@@ -8,7 +8,7 @@
 _srcname=linux-4.14
 _zenpatch=zen-4.14-d58cde75041b98ecc3c75e866aa97df58098ef8c.diff
 pkgver=4.14
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 url="https://github.com/zen-kernel/zen-kernel"
 license=('GPL2')
@@ -22,6 +22,7 @@
   "https://pkgbuild.com/~heftig/zen-patches/${_zenpatch}.xz"
   "https://pkgbuild.com/~heftig/zen-patches/${_zenpatch}.sign"
   'config'         # the main kernel config file
+  '60-linux.hook'  # pacman hook for depmod
   '90-linux.hook'  # pacman hook for initramfs regeneration
   'linux.preset'   # standard config files for mkinitcpio ramdisk
 )
@@ -35,7 +36,8 @@
             '5a10dd38ada48d64265638c7939eaffd6f637507a60b777b18855189b8d608b2'
             'SKIP'
             '70b96391a0ccdbb3a5fe917bd9d870159001a664da6a27ae44fbc826d2869818'
-            '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
+            'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
+            '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
             'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
 
 _kernelname=${pkgbase#linux}
@@ -103,23 +105,18 @@
   _basekernel=${_kernver%%-*}
   _basekernel=${_basekernel%.*}
 
-  mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
+  mkdir -p "${pkgdir}"/{boot,lib/{modules,firmware},usr}
   make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
   cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
 
-  # set correct depmod command for install
-  sed -e "s|%PKGBASE%|${pkgbase}|g;s|%KERNVER%|${_kernver}|g" \
-    "${startdir}/${install}" > "${startdir}/${install}.pkg"
-  true && install=${install}.pkg
+  # make room for external modules
+  local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
+  ln -s "../${_extramodules}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
 
-  # install mkinitcpio preset file for kernel
-  sed "s|%PKGBASE%|${pkgbase}|g" ../linux.preset |
-    install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+  # add real version for building modules and running depmod from hook
+  echo "${_kernver}" |
+    install -Dm644 /dev/stdin "${pkgdir}/lib/modules/${_extramodules}/version"
 
-  # install pacman hook for initramfs regeneration
-  sed "s|%PKGBASE%|${pkgbase}|g" ../90-linux.hook |
-    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
-
   # remove build and source links
   rm "${pkgdir}"/lib/modules/${_kernver}/{source,build}
 
@@ -126,21 +123,35 @@
   # remove the firmware
   rm -r "${pkgdir}/lib/firmware"
 
-  # make room for external modules
-  ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+  # now we call depmod...
+  depmod -b "${pkgdir}" -F System.map "${_kernver}"
 
-  # add real version for building modules and running depmod from post_install/upgrade
-  echo "${_kernver}" |
-    install -Dm644 /dev/stdin "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
+  # add vmlinux
+  install -Dt "${pkgdir}/lib/modules/${_kernver}/build" -m644 vmlinux
 
-  # Now we call depmod...
-  depmod -b "${pkgdir}" -F System.map "${_kernver}"
-
   # move module tree /lib -> /usr/lib
   mv -t "${pkgdir}/usr" "${pkgdir}/lib"
 
-  # add vmlinux
-  install -Dm644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
+  # sed expression for following substitutions
+  local _subst="
+    s|%PKGBASE%|${pkgbase}|g
+    s|%KERNVER%|${_kernver}|g
+    s|%EXTRAMODULES%|${_extramodules}|g
+  "
+
+  # hack to allow specifying an initially nonexisting install file
+  sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
+  true && install=${install}.pkg
+
+  # install mkinitcpio preset file
+  sed "${_subst}" ../linux.preset |
+    install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+
+  # install pacman hooks
+  sed "${_subst}" ../60-linux.hook |
+    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
+  sed "${_subst}" ../90-linux.hook |
+    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
 }
 
 _package-headers() {

Modified: linux.install
===================================================================
--- linux.install	2017-11-18 23:04:40 UTC (rev 310407)
+++ linux.install	2017-11-18 23:10:30 UTC (rev 310408)
@@ -1,27 +1,10 @@
-post_install () {
-  # updating module dependencies
-  echo ">>> Updating module dependencies. Please wait ..."
-  depmod %KERNVER%
-}
-
 post_upgrade() {
   if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
     echo "WARNING: /boot appears to be a separate partition but is not mounted."
   fi
-
-  # updating module dependencies
-  echo ">>> Updating module dependencies. Please wait ..."
-  depmod %KERNVER%
-
-  if [ $(vercmp $2 3.13) -lt 0 ]; then
-    echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
-    echo ">>>          In order to use your keyboard during early init, you MUST"
-    echo ">>>          include the 'keyboard' hook in your mkinitcpio.conf."
-  fi
 }
 
 post_remove() {
-  # also remove the compat symlinks
   rm -f boot/initramfs-%PKGBASE%.img
   rm -f boot/initramfs-%PKGBASE%-fallback.img
 }



More information about the arch-commits mailing list