Github messages for voidlinux
 help / color / mirror / Atom feed
From: subnut <subnut@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] dkms: update to 3.0.3 and update other related packages
Date: Sat, 21 May 2022 06:08:40 +0200	[thread overview]
Message-ID: <20220521040840.xP7XR634VvrByVkSU5hcjoXoMhv9peu5qnXsI39waMw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37139@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by subnut against master on the void-packages repository

https://github.com/subnut/void-packages dkms
https://github.com/void-linux/void-packages/pull/37139

dkms: update to 3.0.3 and update other related packages
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37139.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dkms-37139.patch --]
[-- Type: text/x-diff, Size: 11072 bytes --]

From cf3a21f64a3ad99d1fbc2b1a6ee36c0b08024112 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 18 May 2022 09:27:07 +0530
Subject: [PATCH 1/5] dkms: update to 3.0.3

I've also rewritten the kernel pre-remove hook to make it compatible
with POSIX.1-2017.

Note that these dkms.conf directives have been deprecated
- MODULES_CONF
- MODULES_CONF_ALIAS_TYPE
- MODULES_CONF_OBSOLETES
- MODULES_CONF_OBSOLETE_ONLY
- REMAKE_INITRD

Output of `dkms status` was changed in version 2.8.6
old -	zfs, 2.1.4, 5.15.39_1, x86_64: installed
new -	zfs/2.1.4, 5.15.39_1, x86_64: installed

So, to make dkms.prerm compatible with both the older and newer outputs,
I have added this line -

	tr '/'	' '

This will split `zfs/2.1.4` into `zfs 2.1.4`, thereby making it
compatible with the older output (since we ignore the trailing commas).
---
 srcpkgs/dkms/files/kernel.d/dkms.prerm | 27 ++++++++++++++------------
 srcpkgs/dkms/template                  | 15 ++++++++------
 2 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/dkms/files/kernel.d/dkms.prerm b/srcpkgs/dkms/files/kernel.d/dkms.prerm
index 155e9734aee2..4613c83c6142 100644
--- a/srcpkgs/dkms/files/kernel.d/dkms.prerm
+++ b/srcpkgs/dkms/files/kernel.d/dkms.prerm
@@ -1,21 +1,24 @@
-#!/bin/bash
+#!/bin/sh
 
-# We're passed the version of the kernel being installed
+# We're passed the version of the kernel being removed
 PKGNAME="$1"
 VERSION="$2"
 
 if [ -x /usr/bin/dkms ]; then
-while read line; do
-   name=`echo "$line" | awk '{print $1}' | sed 's/,$//'`
-   vers=`echo "$line" | awk '{print $2}' | sed 's/,$//'`
-   arch=`echo "$line" | awk '{print $4}' | sed 's/:$//'`
-   echo "dkms: removing: $name $vers (${PKGNAME}-${VERSION}) ($arch)" >&2
-   /usr/bin/dkms remove -q -m $name -v $vers -k ${VERSION} -a $arch
-done < <(/usr/bin/dkms status -k ${VERSION} 2>/dev/null | grep ": installed")
+    /usr/bin/dkms status -k "$VERSION" 2>/dev/null \
+        | grep -F ': installed' \
+        | sed 's/, / /g' \
+        | tr '/' ' '
+        | while read -r name vers kver arch
+        do
+            arch="${arch%:*}"
+            echo "dkms: removing: $name $vers ($PKGNAME-$VERSION) ($arch)" >&2
+            /usr/bin/dkms remove -q -m "$name" -v "$vers" -k "$VERSION" -a "$arch"
+        done
 fi
 
-rmdir \
-	"/lib/modules/${VERSION}/updates/dkms" \
-	"/lib/modules/${VERSION}/updates" 2>/dev/null
+rmdir 2>/dev/null \
+    "/lib/modules/$VERSION/updates/dkms" \
+    "/lib/modules/$VERSION/updates"
 
 exit 0
diff --git a/srcpkgs/dkms/template b/srcpkgs/dkms/template
index 32b0211981f8..a3d3e48f1e77 100644
--- a/srcpkgs/dkms/template
+++ b/srcpkgs/dkms/template
@@ -1,15 +1,15 @@
 # Template file for 'dkms'
 pkgname=dkms
-version=2.8.4
-revision=2
+version=3.0.3
+revision=1
 conf_files="/etc/dkms/framework.conf"
 depends="bash kmod gcc make coreutils"
-short_desc="Dynamic Kernel Modules System"
+short_desc="Dynamic Kernel Module Support"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://github.com/dell/dkms"
-distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=540912bf0d845ac333f6971a3ccb80911c770a042af1b30ffbb9b420ac979af3
+distfiles="https://github.com/dell/dkms/archive/v${version}.tar.gz"
+checksum=89e57cf90298f020646a5fa61d11983406631486b9f5591bb9da9465ee969f3d
 
 case "$XBPS_TARGET_MACHINE" in
 	# Too many competing kernels for arm* to depend on linux-headers
@@ -21,11 +21,14 @@ if [ "$CROSS_BUILD" ]; then
 	depends+=" openssl-devel gmp-devel libada-devel libmpc-devel flex"
 fi
 
+do_build() {
+	make dkms dkms.8
+}
+
 do_install() {
 	# We are only interested in the bare minimum.
 	vbin dkms
 	vman dkms.8
-	vinstall dkms_dbversion 644 var/lib/dkms
 	vcompletion dkms.bash-completion bash dkms
 	vinstall dkms_framework.conf 644 etc/dkms framework.conf
 	# Kernel hooks.

From 6be8b329e5da2bda5b8e7e526243b8cd73774ce8 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sun, 15 May 2022 12:17:19 +0530
Subject: [PATCH 2/5] broadcom-wl-dkms: remove deprecated dkms directive

---
 srcpkgs/broadcom-wl-dkms/files/dkms.conf | 1 -
 srcpkgs/broadcom-wl-dkms/template        | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/broadcom-wl-dkms/files/dkms.conf b/srcpkgs/broadcom-wl-dkms/files/dkms.conf
index a6219f4c89b8..96acd0dc2092 100644
--- a/srcpkgs/broadcom-wl-dkms/files/dkms.conf
+++ b/srcpkgs/broadcom-wl-dkms/files/dkms.conf
@@ -3,4 +3,3 @@ PACKAGE_VERSION="@VERSION@"
 BUILT_MODULE_NAME[0]="wl"
 DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
 AUTOINSTALL="yes"
-REMAKE_INITRD="yes"
diff --git a/srcpkgs/broadcom-wl-dkms/template b/srcpkgs/broadcom-wl-dkms/template
index 55bc9c0e1d36..686f11a6d6dd 100644
--- a/srcpkgs/broadcom-wl-dkms/template
+++ b/srcpkgs/broadcom-wl-dkms/template
@@ -2,7 +2,7 @@
 
 pkgname=broadcom-wl-dkms
 version=6.30.223.271
-revision=11
+revision=12
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="custom:Proprietary Broadcom license"
 homepage="http://broadcom.com"

From c27cee63a3da54fb7b964364c503d4f64c2d002d Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sun, 15 May 2022 12:18:55 +0530
Subject: [PATCH 3/5] rtl8822bu-dkms: remove deprecated dkms directive

---
 srcpkgs/rtl8822bu-dkms/files/dkms.conf | 1 -
 srcpkgs/rtl8822bu-dkms/template        | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/rtl8822bu-dkms/files/dkms.conf b/srcpkgs/rtl8822bu-dkms/files/dkms.conf
index 3156be8132bc..243a32dbebca 100644
--- a/srcpkgs/rtl8822bu-dkms/files/dkms.conf
+++ b/srcpkgs/rtl8822bu-dkms/files/dkms.conf
@@ -8,4 +8,3 @@ KSRC=/lib/modules/${kernelver}/build"
 CLEAN="make clean"
 DEST_MODULE_LOCATION="/kernel/drivers/net/wireless"
 AUTOINSTALL="yes"
-REMAKE_INITRD=no
diff --git a/srcpkgs/rtl8822bu-dkms/template b/srcpkgs/rtl8822bu-dkms/template
index 548d0b6299cd..61b92f58464d 100644
--- a/srcpkgs/rtl8822bu-dkms/template
+++ b/srcpkgs/rtl8822bu-dkms/template
@@ -1,7 +1,7 @@
 # Template file for 'rtl8822bu-dkms'
 pkgname=rtl8822bu-dkms
 version=20201222
-revision=1
+revision=2
 _gitrev=fcfd4ecca1512d4cd2db4aa91679576d2a5ab8eb
 wrksrc="rtl8822bu-${_gitrev}"
 depends="dkms"

From 73c8d7b263c64d7807f5048511b28f07f6b3b187 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sun, 15 May 2022 12:22:10 +0530
Subject: [PATCH 4/5] zfs: remove deprecated dkms directive

---
 .../zfs/patches/0001-only-build-the-module-in-dkms.conf.patch | 4 ++--
 srcpkgs/zfs/template                                          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/zfs/patches/0001-only-build-the-module-in-dkms.conf.patch b/srcpkgs/zfs/patches/0001-only-build-the-module-in-dkms.conf.patch
index cd9e890ab76e..63b8421c3551 100644
--- a/srcpkgs/zfs/patches/0001-only-build-the-module-in-dkms.conf.patch
+++ b/srcpkgs/zfs/patches/0001-only-build-the-module-in-dkms.conf.patch
@@ -29,10 +29,10 @@ index 88c289383..5a859a0e0 100755
    --with-linux-obj="\${kernel_source_dir}"
    \$(
      [[ -n \"\${ICP_ROOT}\" ]] && \\
-@@ -69,7 +54,7 @@ POST_BUILD="scripts/dkms.postbuild
+@@ -69,7 +54,6 @@ POST_BUILD="scripts/dkms.postbuild
  "
  AUTOINSTALL="yes"
- REMAKE_INITRD="no"
+-REMAKE_INITRD="no"
 -MAKE[0]="make"
 +MAKE[0]="make -C module/"
  STRIP[0]="\$(
diff --git a/srcpkgs/zfs/template b/srcpkgs/zfs/template
index 6c7b69345fd3..f820f1384625 100644
--- a/srcpkgs/zfs/template
+++ b/srcpkgs/zfs/template
@@ -1,7 +1,7 @@
 # Template file for 'zfs'
 pkgname=zfs
 version=2.1.4
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-config=user --with-mounthelperdir=/usr/bin
  --with-udevdir=/usr/lib/udev --with-udevruledir=/usr/lib/udev/rules.d

From 472de9b3a6b7dec78133dca0cf1305eff2f25ccf Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 18 May 2022 09:46:58 +0530
Subject: [PATCH 5/5] xbps-triggers: dkms trigger updated and bugfixed

The output format of `dkms status` has changed in v2.8.6
old -	zfs, 2.1.4, 5.15.39_1, x86_64: installed
new -	zfs/2.1.4, 5.15.39_1, x86_64: installed
So, I've re-worked the _modver and _kver detection logic.

NOTE: The detection logic should ideally be identical to the detection
logic in srcpkgs/dkms/files/kernel.d/dkms.prerm

Also, there was a bug. If a package tried to install a dkms module that
failed to build for *all* of the installed kernels, then the output of
dkms status for that module would be -

	module-name, x.y.z: added

Which would cause the dkms trigger to set _kver to "added", and then the
following call to `dkms remove` would set the flag `-k $_kver`, and poor
dkms would get confused trying to find a kernel of version "added".
---
 srcpkgs/xbps-triggers/files/dkms | 25 ++++++++++++++++---------
 srcpkgs/xbps-triggers/template   |  2 +-
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/xbps-triggers/files/dkms b/srcpkgs/xbps-triggers/files/dkms
index fcd64efd0301..7427a3c27cf4 100755
--- a/srcpkgs/xbps-triggers/files/dkms
+++ b/srcpkgs/xbps-triggers/files/dkms
@@ -2,7 +2,7 @@
 #
 # DKMS trigger. Used to add/build/install or remove the specified modules
 # from all kernels.
-# 
+#
 # Modules can be specified like:
 #  dkms_modules="<modulename> <version> ..."
 #
@@ -21,19 +21,26 @@ UPDATE="$5"
 export PATH="usr/bin:usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
 
 remove_modules() {
-	local _modver _kver
+	local modname modver kver arch status _
 
 	# Remove the specified modules from all kernels.
 	set -- ${dkms_modules}
 	while [ $# -gt 0 ]; do
-		$DKMS status -m "$1" | while read line; do
-			if $(echo "$line" | egrep -vq '(added|built|installed)'); then
-				shift 2; continue
+		$DKMS status -m "$1" \
+			| tr '/' ' ' \
+			| sed 's/[,:] / /g' \
+			| while read -r modname modver kver arch status _; do
+			if [ "$kver" = added ]; then
+				# The module wasn't built successfully for any kernel version
+				printf %s "Cleaning up DKMS module '$modname-$modver'... "
+				$DKMS remove -m "$modname" -v "$modver" >/dev/null 2>&1
+			elif [ "$status" = installed ] || [ "$status" = built ]; then
+				printf %s "Removing DKMS module '$modname-$modver' for kernel-$kver... "
+				$DKMS remove -m "$modname" -v "$modver" -k "$kver" >/dev/null 2>&1
+			else
+				# Invalid output
+				continue
 			fi
-			_modver=$(echo "$line"|sed "s/$1,[[:blank:]]\([^,]*\)[,:].*/\1/;t;d")
-			_kver=$(echo "$line"|awk '{print $3}'|sed "s/\(.*\),$/\1/")
-			echo -n "Removing DKMS module '${1}-${_modver}' for kernel-${_kver}... "
-			$DKMS remove -m "$1" -v "${_modver}" -k "${_kver}" >/dev/null 2>&1
 			if [ $? -eq 0 ]; then
 				echo "done."
 			else
diff --git a/srcpkgs/xbps-triggers/template b/srcpkgs/xbps-triggers/template
index b1e4f34a4dde..f0249f6f9964 100644
--- a/srcpkgs/xbps-triggers/template
+++ b/srcpkgs/xbps-triggers/template
@@ -1,6 +1,6 @@
 # Template file for 'xbps-triggers'
 pkgname=xbps-triggers
-version=0.122
+version=0.123
 revision=1
 bootstrap=yes
 short_desc="XBPS triggers for Void Linux"

  parent reply	other threads:[~2022-05-21  4:08 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15  7:57 [PR PATCH] " subnut
2022-05-15  8:24 ` [PR PATCH] [Updated] " subnut
2022-05-15  8:35 ` [PR REVIEW] " subnut
2022-05-15  8:37 ` [PR PATCH] [Updated] " subnut
2022-05-15  9:07 ` [PR REVIEW] " subnut
2022-05-15 11:37 ` subnut
2022-05-15 11:40 ` subnut
2022-05-15 11:41 ` subnut
2022-05-15 11:41 ` subnut
2022-05-16  5:02 ` [PR PATCH] [Updated] " subnut
2022-05-17 12:39 ` [PR REVIEW] " ahesford
2022-05-17 12:39 ` ahesford
2022-05-17 12:39 ` ahesford
2022-05-18  2:48 ` subnut
2022-05-18  2:48 ` [PR PATCH] [Updated] " subnut
2022-05-18  4:04 ` [PR REVIEW] " subnut
2022-05-18  4:04 ` [PR PATCH] [Updated] " subnut
2022-05-18  4:16 ` [PR REVIEW] " subnut
2022-05-18  4:17 ` [PR PATCH] [Updated] " subnut
2022-05-18  4:18 ` subnut
2022-05-18  5:04 ` subnut
2022-05-18  5:05 ` [PR REVIEW] " subnut
2022-05-18  5:10 ` subnut
2022-05-18  5:14 ` [PR PATCH] [Updated] " subnut
2022-05-18 12:40 ` [PR REVIEW] " ahesford
2022-05-18 12:40 ` ahesford
2022-05-18 14:39 ` subnut
2022-05-18 14:54 ` subnut
2022-05-18 14:54 ` subnut
2022-05-18 15:18 ` ahesford
2022-05-18 15:30 ` [PR PATCH] [Updated] " subnut
2022-05-18 16:48 ` subnut
2022-05-18 17:36 ` subnut
2022-05-18 17:37 ` subnut
2022-05-21  1:51 ` [PR REVIEW] " ahesford
2022-05-21  1:51 ` ahesford
2022-05-21  4:08 ` subnut [this message]
2022-05-21  4:09 ` subnut
2022-05-21  4:16 ` [PR PATCH] [Updated] " subnut
2022-05-21  4:17 ` [PR REVIEW] " subnut
2022-05-24  2:19 ` [PR PATCH] [Updated] " subnut
2022-05-24  2:19 ` subnut
2022-05-24  2:25 ` subnut
2022-05-24 13:34 ` ahesford
2022-06-22  7:04 ` [PR PATCH] [Updated] " subnut
2022-06-22  7:10 ` [PR REVIEW] " subnut
2022-06-22  7:32 ` subnut
2022-06-22  8:04 ` [PR PATCH] [Updated] " subnut
2022-06-22  8:05 ` subnut
2022-06-22  8:07 ` subnut
2022-06-22  8:16 ` dkms: update to 3.0.4 " subnut
2022-06-22  8:18 ` subnut
2022-06-22  8:20 ` subnut
2022-06-22 12:29 ` [PR REVIEW] " ahesford
2022-06-22 12:29 ` ahesford
2022-06-22 14:57 ` subnut
2022-06-22 14:58 ` subnut
2022-06-22 14:58 ` subnut
2022-06-22 15:00 ` subnut
2022-06-22 15:25 ` ahesford
2022-06-22 15:48 ` [PR PATCH] [Updated] " subnut
2022-06-22 16:34 ` [PR REVIEW] " subnut
2022-06-22 16:35 ` subnut
2022-07-20 12:15 ` [PR PATCH] [Updated] " subnut
2022-07-20 12:17 ` subnut
2022-07-20 12:19 ` dkms: update to 3.0.6 " subnut
2022-07-21 14:31 ` [PR REVIEW] " ahesford
2022-07-21 16:23 ` ahesford
2022-07-21 16:23 ` ahesford
2022-07-31 18:27 ` [PR PATCH] [Updated] " subnut
2022-07-31 18:28 ` [PR REVIEW] " subnut
2022-07-31 18:32 ` [PR PATCH] [Updated] " subnut
2022-07-31 18:37 ` subnut
2022-07-31 18:41 ` subnut
2022-07-31 18:59 ` subnut
2022-07-31 19:00 ` subnut
2022-08-23 11:18 ` dataCobra
2022-08-29 20:25 ` [PR PATCH] [Closed]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220521040840.xP7XR634VvrByVkSU5hcjoXoMhv9peu5qnXsI39waMw@z \
    --to=subnut@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).