<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 16, 2015 at 7:22 AM, Nux! <span dir="ltr">&lt;<a href="mailto:nux@li.nux.ro" target="_blank">nux@li.nux.ro</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":t2" class="" style="overflow:hidden">Any elegant way out of this?<br></div></blockquote></div><br>This is in no way elegant, but I have made a different kmod spec file dynamically generate the kversion definition in the mock session by first trying to run:</div><div class="gmail_extra"><br></div><div class="gmail_extra">/usr/bin/rpm -q --qf &#39;%%define kversion %{version}-%{release}\n&#39; kernel-headers</div><div class="gmail_extra">(this is run by a shell script that uses the RPM function %{expand:%(sh %{SOURCE13})}. )<br><br>and if RPM fails to execute (because the build OS doesn&#39;t like the rpm DB installed), then I parse /usr/include/linux/version.h and build a kversion from the data there.  Its very inelegant.</div><div class="gmail_extra"><div><br></div>-- <br><div class="gmail_signature">Jonathan Billings &lt;<a href="mailto:jsbillin@umich.edu" target="_blank">jsbillin@umich.edu</a>&gt;<br>College of Engineering - CAEN - Unix and Linux Support<br><br></div>
</div></div>