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: Mon, 16 May 2022 07:02:30 +0200	[thread overview]
Message-ID: <20220516050230.0G-uAJXfHXcXjgB_Je494qludq6AvCxNzJZ5DefiNUs@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: 10233 bytes --]

From 4e1cf3a29d6cdaadd81c7a1a5d591a337e8b4f58 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sun, 15 May 2022 11:50:41 +0530
Subject: [PATCH 1/5] dkms: update to 3.0.3

The following dkms.conf directives have been deprecated
- MODULES_CONF
- MODULES_CONF_ALIAS_TYPE
- MODULES_CONF_OBSOLETES
- MODULES_CONF_OBSOLETE_ONLY
- REMAKE_INITRD
---
 srcpkgs/dkms/files/kernel.d/dkms.prerm | 21 ---------------------
 srcpkgs/dkms/template                  | 19 ++++++++++++-------
 2 files changed, 12 insertions(+), 28 deletions(-)
 delete mode 100644 srcpkgs/dkms/files/kernel.d/dkms.prerm

diff --git a/srcpkgs/dkms/files/kernel.d/dkms.prerm b/srcpkgs/dkms/files/kernel.d/dkms.prerm
deleted file mode 100644
index 155e9734aee2..000000000000
--- a/srcpkgs/dkms/files/kernel.d/dkms.prerm
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# We're passed the version of the kernel being installed
-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")
-fi
-
-rmdir \
-	"/lib/modules/${VERSION}/updates/dkms" \
-	"/lib/modules/${VERSION}/updates" 2>/dev/null
-
-exit 0
diff --git a/srcpkgs/dkms/template b/srcpkgs/dkms/template
index 32b0211981f8..35387b743c57 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,14 +21,19 @@ if [ "$CROSS_BUILD" ]; then
 	depends+=" openssl-devel gmp-devel libada-devel libmpc-devel flex"
 fi
 
+do_build() {
+	make dkms dkms.8
+	vsed -i kernel_prerm.d_dkms \
+		-e 's-/usr/sbin-/usr/bin-g; s/^inst_kern=.*$/inst_kern="$2"/'
+}
+
 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
+	vinstall kernel_prerm.d_dkms 754 etc/kernel.d/pre-remove 10-dkms
 	# Kernel hooks.
 	vinstall ${FILESDIR}/kernel.d/dkms.postinst 754 etc/kernel.d/post-install 10-dkms
-	vinstall ${FILESDIR}/kernel.d/dkms.prerm 754 etc/kernel.d/pre-remove 10-dkms
 }

From c2ea42dc1f147306e0c72cf5dd62a8f6e05724ba 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        | 3 ++-
 2 files changed, 2 insertions(+), 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..f6ddd376f36b 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"
@@ -14,6 +14,7 @@ create_wrksrc=yes
 short_desc="Broadcom proprietary wireless drivers for Linux - DKMS kernel module"
 dkms_modules="wl ${version}"
 depends="dkms"
+triggers="dkms initramfs-regenerate"
 
 case "$XBPS_TARGET_MACHINE" in
 i686*)

From 72ef73234d0cfca1791bdd9557ed45c7da913eae 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 c7436c562edaca64cbafcb8c3e3d85b52713cff2 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 91e9b4804e9be9e37c913e0f555a025dd6a6bb70 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sun, 15 May 2022 12:38:06 +0530
Subject: [PATCH 5/5] xbps-triggers: adapt to new `dkms status` format

The output format of `dkms status` has changed.
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.
---
 srcpkgs/xbps-triggers/files/dkms | 31 ++++++++++++++++++++-----------
 srcpkgs/xbps-triggers/template   |  2 +-
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/xbps-triggers/files/dkms b/srcpkgs/xbps-triggers/files/dkms
index fcd64efd0301..b4ee34dd099e 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,23 +21,32 @@ UPDATE="$5"
 export PATH="usr/bin:usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
 
 remove_modules() {
-	local _modver _kver
+	local _modver _kver _line
 
 	# 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
+		$DKMS status -m "$1" | while IFS=' ' read _modver _kver _line; do
+			if echo "$_modver $_kver $_line" | grep -Evq '(added|built|installed)'; then
 				shift 2; 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."
+			_modver=${_modver##*/}; _modver=${_modver%?}; _kver=${_kver%,}
+			if [ "$_kver" = added ] && [ -d "/var/lib/dkms/${1}/${_modver}/build" ]; then
+				echo -n "Cleaning up unbuilt DKMS module '${1}-${_modver}'... "
+				rm -rf "/var/lib/dkms/${1}/${_modver}"
+				if [ $? -eq 0 ]; then
+					echo "done."
+				else
+					echo "FAILED!"
+				fi
 			else
-				echo "FAILED!"
+				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
+					echo "FAILED!"
+				fi
 			fi
 		done
 		shift 2
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-16  5:02 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 ` subnut [this message]
2022-05-17 12:39 ` 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 ` [PR PATCH] [Updated] " subnut
2022-05-21  4:09 ` [PR REVIEW] " 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=20220516050230.0G-uAJXfHXcXjgB_Je494qludq6AvCxNzJZ5DefiNUs@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).