Skip to content

Commit

Permalink
RPM: Use kernel build directory corresponding to kernel-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
solardiz committed Sep 14, 2023
1 parent 5dc5cfe commit 91d3da9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +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


The following major changes have been made between LKRG 0.9.6 and 0.9.7:

*) Support new mainline kernels 6.4 to 6.5.x, and hopefully beyond
Expand Down
12 changes: 9 additions & 3 deletions lkrg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
Summary: Linux Kernel Runtime Guard (LKRG)
Name: lkrg
Version: 0.9.7
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
URL: https://lkrg.org
Source: https://lkrg.org/download/%name-%version.tar.gz
ExclusiveArch: %ix86 x86_64 %arm32 %arm64
BuildRequires: make, gcc, kernel-devel
BuildRequires: make, gcc, elfutils-libelf-devel, kernel, kernel-devel
BuildRoot: /override/%name-%version

%description
Expand All @@ -28,7 +28,7 @@ as open a file) based on the unauthorized credentials.
%setup -q

%build
make %{?_smp_mflags}
make %{?_smp_mflags} KERNELRELEASE=%kmod_headers_version

%install
rm -rf %buildroot
Expand All @@ -55,6 +55,12 @@ echo 'To enable LKRG on bootup please use: systemctl enable lkrg'
%_sysconfdir/sysctl.d/*

%changelog
* Thu Sep 14 2023 Solar Designer <[email protected]> 0.9.7-2
- Use kernel build directory corresponding to the kernel-devel package, not to
the currently running kernel
- "BuildRequires: kernel" for the /lib/modules/* directory
- "BuildRequires: elfutils-libelf-devel" to support CONFIG_UNWINDER_ORC=y

* Thu Sep 14 2023 Solar Designer <[email protected]> 0.9.7-1
- Wrote this rough RPM spec file for Red Hat'ish distros, seems to work fine on
RHEL 7, 8, 9 rebuilds, but is only reliable when there's exactly one
Expand Down

0 comments on commit 91d3da9

Please sign in to comment.