#6 Fix rfpkg build for el7
Opened 2 months ago by sergiomb. Modified 2 months ago
rpms/ sergiomb/kmodtool master  into  master

file modified
+3 -3

@@ -159,7 +159,7 @@ 

  	cat <<EOF


  %if 0%{?rhel}

- %package       -n kmod-${kmodname}

+ %package       -n kmod-${kmodname}-${kernel_uname_r}

  Summary:          ${kmodname} kernel module(s) for ${kernel_uname_r_short}

  Provides:         kernel-modules = ${kernel_uname_r}

  Provides:         ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}

@@ -280,10 +280,10 @@ 

  	cat <<EOF


  %if 0%{?rhel}

- %description   -n kmod-${kmodname}

+ %description   -n kmod-${kmodname}-${kernel_uname_r}

  This package provides the ${kmodname} kernel modules built for the Linux

  kernel ${kernel_uname_r_short} for the %{_target_cpu} family of processors.

- %files         -n kmod-${kmodname}

+ %files         -n kmod-${kmodname}-${kernel_uname_r}


  %dir ${usr_lib_modules}/${kernel_uname_r}/extra


For reason template for epel miss some variables when we have "%define buildforkernels current"
without this patch we can see the error on el7 of kmod-VirtualBox

rfpkg build
error: line 73: %package -n kmod-VirtualBox
package kmod-VirtualBox already exists
error: query of specfile /home/sergio/rpmfusion/new/VirtualBox-kmod/VirtualBox-kmod.spec failed, can't parse "

Could not get n-v-r-e from /home/sergio/rpmfusion/new/VirtualBox-kmod/VirtualBox-kmod.spec
Note: You can skip NVR construction & NVR check with --skip-nvr-check. See help for more info.
Could not execute build: Cannot continue without properly constructed NVR.

Since we have some PR to review, please include this one .