Skip to content

Commit

Permalink
Merge branch 'master' into chroot-no-proc
Browse files Browse the repository at this point in the history
  • Loading branch information
akorn authored Feb 4, 2025
2 parents 5f9f3c0 + 5d05111 commit 8de6873
Show file tree
Hide file tree
Showing 10 changed files with 1,066 additions and 543 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,45 +54,47 @@ jobs:
if: matrix.distro.name == 'almalinux' || contains(matrix.distro.name, 'centos') || contains(matrix.distro.name, 'fedora')
run: |
yum install -y diffutils elfutils-libelf gcc kernel kernel-devel make openssl patch
make install-redhat
- name: Install Alpine dependencies
if: matrix.distro.name == 'alpine'
run: |
apk --no-cache --update add bash gcc linux${{ matrix.distro.variant }} linux${{ matrix.distro.variant }}-dev make openssl coreutils patch
make install
- name: Install Arch Linux dependencies
if: matrix.distro.name == 'archlinux'
run: |
pacman -Syu --noconfirm diffutils gcc make linux${{ matrix.distro.variant }} linux${{ matrix.distro.variant }}-headers openssl patch
make install
- name: Install Debian dependencies
if: matrix.distro.name == 'debian'
run: |
apt-get update -q
apt-get install -qy make linux-headers-amd64 linux-image-amd64 openssl xz-utils patch
make install-debian
- name: Install Gentoo Linux dependencies
if: matrix.distro.name == 'gentoo/stage3'
run: |
echo -e "MAKEOPTS=\"-j$(nproc) -l$(nproc)\"\nACCEPT_LICENSE=\"*\"" >> /etc/portage/make.conf
wget --progress=dot:mega -O - https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz | tar -xz && mv gentoo-master /var/db/repos/gentoo
FEATURES="getbinpkg binpkg-ignore-signature parallel-fetch parallel-install pkgdir-index-trusted" USE="-initramfs" emerge --quiet --noreplace -j$(nproc) -l$(nproc) --autounmask-continue --with-bdeps=n '>=sys-kernel/gentoo-kernel-bin-6.6.0'
make install
- name: Install openSUSE leap dependencies
if: contains(matrix.distro.name, 'opensuse')
run: |
zypper --non-interactive install diffutils elfutils gcc kernel${{ matrix.distro.variant }} kernel${{ matrix.distro.variant }}-devel make openssl patch
make install
- name: Install Ubuntu dependencies
if: matrix.distro.name == 'ubuntu'
run: |
apt-get update -q
apt-get install -qy gcc make linux-headers-generic linux-image-generic openssl shim-signed patch
- name: Install dkms
run: |
sed -i -e '/echo -en "."/d' dkms.in
make install
make install-debian
- name: Run tests
run: |
Expand Down
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
/dist
dkms
dkms.8
dkms.bash-completion
dkms.zsh-completion
dkms_framework.conf
dkms_autoinstaller
dkms.service
kernel_install.d_dkms
kernel_postinst.d_dkms
dkms_common.postinst
debian_kernel_install.d
debian_kernel_postinst.d
debian_kernel_preinst.d
debian_kernel_prerm.d
redhat_kernel_install.d

test_cmd_expected_output.log
test_cmd_output.log
23 changes: 8 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RELEASE_DATE := "19 December 2024"
RELEASE_DATE := "30 January 2025"
RELEASE_MAJOR := 3
RELEASE_MINOR := 1
RELEASE_MICRO := 4
RELEASE_MICRO := 5
RELEASE_NAME := dkms
RELEASE_VERSION := $(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_MICRO)
RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_VERSION)
Expand Down Expand Up @@ -29,7 +29,7 @@ SED_SUBSTITUTIONS = \
%: %.in
$(SED) $(SED_SUBSTITUTIONS) $< > $@

all: \
GENERATED= \
dkms \
dkms.8 \
dkms_autoinstaller \
Expand All @@ -40,23 +40,15 @@ all: \
dkms.service \
debian_kernel_install.d \
debian_kernel_postinst.d \
debian_kernel_preinst.d \
debian_kernel_prerm.d \
redhat_kernel_install.d

all: $(GENERATED)

clean:
-rm -rf dist/
-rm -f dkms
-rm -f dkms.8
-rm -f dkms_autoinstaller
-rm -f dkms.bash-completion
-rm -f dkms.zsh-completion
-rm -f dkms_common.postinst
-rm -f dkms_framework.conf
-rm -f dkms.service
-rm -f debian_kernel_install.d
-rm -f debian_kernel_postinst.d
-rm -f debian_kernel_prerm.d
-rm -f redhat_kernel_install.d
$(RM) $(GENERATED)

install: all
$(if $(strip $(VAR)),$(error Setting VAR is not supported))
Expand Down Expand Up @@ -91,6 +83,7 @@ install-debian: install
install -D -m 0755 debian_kernel_install.d $(DESTDIR)$(KINSTALL)/40-dkms.install
install -D -m 0755 debian_kernel_postinst.d $(DESTDIR)$(KCONF)/postinst.d/dkms
install -D -m 0755 debian_kernel_postinst.d $(DESTDIR)$(KCONF)/header_postinst.d/dkms
install -D -m 0755 debian_kernel_preinst.d $(DESTDIR)$(KCONF)/preinst.d/dkms
install -D -m 0755 debian_kernel_prerm.d $(DESTDIR)$(KCONF)/prerm.d/dkms

install-doc:
Expand Down
11 changes: 11 additions & 0 deletions debian_kernel_preinst.d.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# This script is triggered when the kernel (linux-image) package is being
# installed/upgraded. We're passed the version of the kernel being installed.
inst_kern=$1

if command -v dkms > /dev/null; then
dkms kernel_preinst -k "$inst_kern"
fi

exit 0
6 changes: 2 additions & 4 deletions dkms.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,9 @@ module. If unset, it is assumed to be "make clean".
.B NO_WEAK_MODULES=
The
.B NO_WEAK_MODULES
parameter prevents dkms from creating a symlink into the weak-updates directory, which is the
default on Red Hat derivatives. The weak modules facility was designed to eliminate the need to
rebuild kernel modules when kernel upgrades occur and relies on the symbols within the kABI.
parameter prevents dkms from creating a symlink into the weak-updates directory. The weak modules facility was designed to eliminate the need to rebuild kernel modules when kernel upgrades occur and relies on the symbols within the kABI.

Fedora does not guaranteed a stable kABI so it should be disabled in the specific module override by setting it to "yes". For example, for an Nvidia DKMS module you would set the following in /etc/dkms/nvidia.conf:
The kABI kernel module interface is currently supported on Red Hat Enterprise Linux (and derivatives), SUSE Linux Enterprise Server and openSUSE Leap.

NO_WEAK_MODULES="yes"
.TP
Expand Down
Loading

0 comments on commit 8de6873

Please sign in to comment.