Skip to content

Commit 07dbafc

Browse files
committed
Set is_uek64k flag at build time
This commit detects uek64k at build time and sets the is_uek64k flag, so correct dependencies can be used when installing the binary RPM. RM #4542951 Signed-off-by: Liming Sun <[email protected]>
1 parent bade11c commit 07dbafc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

rshim.spec.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ BuildRequires: gcc, autoconf, automake, pkgconfig, make
1616
BuildRequires: pkgconfig(libpci), pkgconfig(libusb-1.0)
1717

1818
%if (0%{?oraclelinux} >= 9)
19+
%define is_uek64k 0
20+
%{lua:
21+
local handle = io.popen("uname -r")
22+
local kernelver = handle:read("*l")
23+
handle:close()
24+
25+
if kernelver and kernelver:match("64k") then
26+
rpm.define("is_uek64k 1")
27+
end
28+
}
29+
%if (0%{?is_uek64k} == 1)
30+
Requires: kernel-uek64k-core
31+
%else
1932
Requires: kernel-uek-core
33+
%endif
2034
%else
2135
%if (0%{?rhel} >= 8 || 0%{?fedora} > 0) && "0%{?ctyunos}" == "0"
2236
Requires: kernel-modules-extra

0 commit comments

Comments
 (0)