[arch-commits] Commit in dkms/trunk (3 files)

Sébastien Luttringer seblu at archlinux.org
Fri Oct 26 13:41:35 UTC 2018


    Date: Friday, October 26, 2018 @ 13:41:34
  Author: seblu
Revision: 337323

Work on 2.6

Added:
  dkms/trunk/0002-Revert-Fix-to-run-under-BusyBox-shell.patch
  dkms/trunk/0003-Fix-version-check-when-installing-modules.patch
  dkms/trunk/PKGBUILD.26

------------------------------------------------------+
 0002-Revert-Fix-to-run-under-BusyBox-shell.patch     |   35 ++++++++
 0003-Fix-version-check-when-installing-modules.patch |   31 +++++++
 PKGBUILD.26                                          |   69 +++++++++++++++++
 3 files changed, 135 insertions(+)

Added: 0002-Revert-Fix-to-run-under-BusyBox-shell.patch
===================================================================
--- 0002-Revert-Fix-to-run-under-BusyBox-shell.patch	                        (rev 0)
+++ 0002-Revert-Fix-to-run-under-BusyBox-shell.patch	2018-10-26 13:41:34 UTC (rev 337323)
@@ -0,0 +1,35 @@
+From ba9057a93a47d1107836a920ed158422e9fdf9d0 Mon Sep 17 00:00:00 2001
+From: Michael Niewoehner <foss at mniewoehner.de>
+Date: Mon, 1 Oct 2018 16:51:27 +0200
+Subject: [PATCH 2/3] Revert "Fix to run under BusyBox shell"
+To: dkms-devel at dell.com
+
+This reverts commit 5da213828e2a208216f51d9ae82867bae5c040f7.
+
+Looks like m-emelchenkov wanted to fix the missing rmdir option
+ignore-fail-on-non-empty (issue #43) but that commit made it even worse:
+1. errors about deleting non-empty directories (issue #57)
+2. the directories contents get deleted by "rm -rf" in any case
+
+This option is now implemented so revert the commit to fix the newly
+introduced problems.
+---
+ dkms | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dkms b/dkms
+index be00118..f1c1498 100644
+--- a/dkms
++++ b/dkms
+@@ -1756,7 +1756,7 @@ do_uninstall()
+         while [ "${dir_to_remove}" != "${dir_to_remove#/}" ]; do
+             dir_to_remove="${dir_to_remove#/}"
+         done
+-        (cd "$install_tree/$1" && rm -rf "${dir_to_remove}/*" && rmdir -p "${dir_to_remove}" || true)
++        (cd "$install_tree/$1" && rmdir --parents --ignore-fail-on-non-empty "${dir_to_remove}" || true)
+         echo $" - Original module"
+         local origmod=$(compressed_or_uncompressed "$dkms_tree/$module/original_module/$1/$2" "${dest_module_name[$count]}")
+         if [[ -n "$origmod" ]]; then
+-- 
+Sébastien "Seblu" Luttringer
+

Added: 0003-Fix-version-check-when-installing-modules.patch
===================================================================
--- 0003-Fix-version-check-when-installing-modules.patch	                        (rev 0)
+++ 0003-Fix-version-check-when-installing-modules.patch	2018-10-26 13:41:34 UTC (rev 337323)
@@ -0,0 +1,31 @@
+From ffc0feec3da1c914b3c5bd72dea53d19c3beefe5 Mon Sep 17 00:00:00 2001
+From: Tony Hutter <hutter2 at llnl.gov>
+Date: Mon, 17 Sep 2018 11:39:26 -0700
+Subject: [PATCH 1/3] Fix version check when installing modules
+To: dkms-devel at dell.com
+
+DKMS wasn't checking the module version when installing newer
+kernel modules.  This fixes the issue.
+
+Fixes: #14
+---
+ dkms | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dkms b/dkms
+index be00118..fa1ed1c 100644
+--- a/dkms
++++ b/dkms
+@@ -822,7 +822,8 @@ check_version_sanity()
+         kernels_info[1]=${kernels_info[2]}
+     fi
+ 
+-    if [[ ${kernels_info[1]} && ${dkms_info[1]} && ${kernels_info[1]} = ${dkms_info[1]} && ! $force ]]; then
++    if [[ ${kernels_info[1]} && ${dkms_info[1]} && ${kernels_info[1]} = ${dkms_info[1]} &&
++	  -n "${kernels_info[0]}" && -n "${dkms_info[0]}" && ${kernels_info[0]} = ${dkms_info[0]} && ! $force ]]; then
+         echo $"" >&2
+         echo $"Good news! Module version $dkms_info for ${4}$module_suffix" >&2
+         echo $"exactly matches what is already found in kernel $1." >&2
+-- 
+Sébastien "Seblu" Luttringer
+

Added: PKGBUILD.26
===================================================================
--- PKGBUILD.26	                        (rev 0)
+++ PKGBUILD.26	2018-10-26 13:41:34 UTC (rev 337323)
@@ -0,0 +1,69 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
+
+pkgname=dkms
+pkgver=2.6.1
+pkgrel=1
+pkgdesc='Dynamic Kernel Modules System'
+arch=('any')
+url='https://github.com/dell/dkms'
+license=('GPL2')
+depends=('bash' 'kmod' 'gcc' 'make' 'patch')
+makedepends=('git')
+optdepends=('linux-headers: build modules against the Arch kernel'
+            'linux-lts-headers: build modules against the LTS kernel'
+            'linux-zen-headers: build modules against the ZEN kernel'
+            'linux-hardened-headers: build modules against the HARDENED kernel')
+backup=('etc/dkms/framework.conf')
+install=$pkgname.install
+source=("git+https://github.com/dell/dkms.git#tag=v$pkgver"
+        'hook.install'
+        'hook.remove'
+        'hook.sh'
+        '0001-Revert-Make-newly-installed-modules-available-immedi.patch'
+        '0002-Revert-Fix-to-run-under-BusyBox-shell.patch'
+        '0003-Fix-version-check-when-installing-modules.patch')
+md5sums=('SKIP'
+         '90f1486e0af9aab85e8c60d456802c63'
+         '2e8ffd0c2ddec02872d0234befd129fd'
+         '80632f6a454b35bcade2bed287f13c7b'
+         'd3b91ef709f567a375f4bbdbd3291d2b'
+         '4342b5e9020a52a73a63e7897ead5405'
+         '00813655321b8fc256eda737ca0622ef')
+
+prepare() {
+  cd dkms
+
+  # apply patch from the source array (should be a pacman feature)
+  local filename
+  for filename in "${source[@]}"; do
+    if [[ "$filename" =~ \.patch$ ]]; then
+      msg2 "Applying patch ${filename##*/}"
+      patch -p1 -N -i "$srcdir/${filename##*/}"
+    fi
+  done
+
+  # /usr move
+  msg2 '/usr move patching'
+  for i in dkms{,_framework.conf,.bash-completion,.8,_common.postinst}; do
+    sed -ri 's,/lib/modules,/usr/lib/modules,g' "$i"
+  done
+}
+
+package() {
+  # alpm hook
+  install -D -m 644 hook.install "$pkgdir/usr/share/libalpm/hooks/70-dkms-install.hook"
+  install -D -m 644 hook.remove "$pkgdir/usr/share/libalpm/hooks/70-dkms-remove.hook"
+  install -D -m 755 hook.sh "$pkgdir/usr/lib/dkms/alpm-hook"
+  # upstream installer
+  cd dkms
+  # we don't need kconf files, so we install them outside $pkgdir
+  make \
+    DESTDIR="$pkgdir" \
+    SBIN="$pkgdir/usr/bin" \
+    BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
+    KCONF="$srcdir"/kconf \
+    install
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list