mirror of
https://github.com/openwall/lkrg.git
synced 2023-12-13 21:30:29 +01:00
RPM:
- Use weak-modules if available so that on RHEL and its rebuilds the same LKRG package build works across different kABI-compatible kernel revisions/builds - Drop 32-bit x86 from ExclusiveArch since recent RHEL lacks such kernel-devel
This commit is contained in:
parent
ee41d81599
commit
d5077fde52
2 changed files with 20 additions and 6 deletions
4
CHANGES
4
CHANGES
|
@ -1,7 +1,9 @@
|
|||
The following major changes have been made since LKRG 0.9.7:
|
||||
|
||||
*) RPM spec file improvements to make it work or properly fail in a wider set
|
||||
of circumstances
|
||||
of circumstances, and to use the "weak-modules" script if available so that
|
||||
on RHEL and its rebuilds the same LKRG package build works across different
|
||||
kABI-compatible kernel revisions/builds
|
||||
|
||||
|
||||
The following major changes have been made between LKRG 0.9.6 and 0.9.7:
|
||||
|
|
22
lkrg.spec
22
lkrg.spec
|
@ -1,15 +1,15 @@
|
|||
%define kmod_headers_version %(rpm -qa kernel-devel | sed 's/^kernel-devel-//' | sort -r | head -1)
|
||||
%define module_dir /lib/modules/%kmod_headers_version
|
||||
%define module_dir /lib/modules/%kmod_headers_version/extra
|
||||
%global debug_package %nil
|
||||
|
||||
Summary: Linux Kernel Runtime Guard (LKRG)
|
||||
Name: lkrg
|
||||
Version: 0.9.7
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2
|
||||
URL: https://lkrg.org
|
||||
Source: https://lkrg.org/download/%name-%version.tar.gz
|
||||
ExclusiveArch: %ix86 x86_64 %arm32 %arm64
|
||||
ExclusiveArch: x86_64 %arm32 %arm64
|
||||
BuildRequires: make, gcc, elfutils-libelf-devel, kernel, kernel-devel
|
||||
BuildRoot: /override/%name-%version
|
||||
|
||||
|
@ -36,8 +36,12 @@ install -D -p -m 644 lkrg.ko %buildroot%module_dir/lkrg.ko
|
|||
install -D -p -m 644 scripts/bootup/systemd/lkrg.service %buildroot%_unitdir/lkrg.service
|
||||
install -D -p -m 644 scripts/bootup/lkrg.conf %buildroot%_sysconfdir/sysctl.d/01-lkrg.conf
|
||||
|
||||
%post
|
||||
%sbindir/depmod -a
|
||||
%posttrans
|
||||
if [ -e %_sbindir/weak-modules ]; then
|
||||
echo %module_dir/lkrg.ko | %_sbindir/weak-modules --verbose --add-modules --no-initramfs
|
||||
else
|
||||
%sbindir/depmod -a
|
||||
fi
|
||||
echo 'To start LKRG please use: systemctl start lkrg'
|
||||
echo 'To enable LKRG on bootup please use: systemctl enable lkrg'
|
||||
|
||||
|
@ -45,6 +49,9 @@ echo 'To enable LKRG on bootup please use: systemctl enable lkrg'
|
|||
%systemd_preun lkrg.service
|
||||
|
||||
%postun
|
||||
if [ -e %_sbindir/weak-modules ]; then
|
||||
echo %module_dir/lkrg.ko | %_sbindir/weak-modules --verbose --remove-modules --no-initramfs
|
||||
fi
|
||||
%systemd_postun_with_restart lkrg.service
|
||||
|
||||
%files
|
||||
|
@ -55,6 +62,11 @@ echo 'To enable LKRG on bootup please use: systemctl enable lkrg'
|
|||
%_sysconfdir/sysctl.d/*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 24 2023 Solar Designer <solar@openwall.com> 0.9.7-3
|
||||
- Use weak-modules if available so that on RHEL and its rebuilds the same LKRG
|
||||
package build works across different kABI-compatible kernel revisions/builds
|
||||
- Drop 32-bit x86 from ExclusiveArch since recent RHEL lacks such kernel-devel
|
||||
|
||||
* Thu Sep 14 2023 Solar Designer <solar@openwall.com> 0.9.7-2
|
||||
- Use kernel build directory corresponding to the kernel-devel package, not to
|
||||
the currently running kernel
|
||||
|
|
Loading…
Reference in a new issue