Message ID | 20110503212706.GA26044@dev1756.snc6.facebook.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Dne 3.5.2011 23:27, Arun Sharma napsal(a): > > make rpm-pkg produces files that look like: kernel-2.6.39rc5-2.x86_64.rpm > However, uname -r produces 2.6.39rc5 (-2 is missing). > > This differs from how some of the distributors are packaging the kernel. > Their setup includes %{release} in uname -r. Distributors have control over the kernel uname -r string. make rpm, on the other hand, needs to work with both the vanilla version strings, as well as any crazy suffixes the user comes up with. Hence it uses the uname -v version number as the rpm release, which is always defined. > > One way to achive that is: > > --- a/scripts/setlocalversion > +++ b/scripts/setlocalversion > @@ -170,4 +170,8 @@ else > fi > fi > > +# Append the RPM release > +release=`. ./scripts/mkversion` > +res="${res}-${release}" > + Please don't do that. make rpm has to work with the version string set by the kernel, not the other way around. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -170,4 +170,8 @@ else fi fi +# Append the RPM release +release=`. ./scripts/mkversion` +res="${res}-${release}" + But then, I have to go back and remove the %{release} in a number of places: --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -24,9 +24,12 @@ fi PROVIDES="$PROVIDES kernel-$KERNELRELEASE" __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` +# Remove the -%{release} from __KERNELRELEASE +__KERNELVERSION=`echo $__KERNELRELEASE | sed -e "s/-[^-]*$//"` + echo "Name: kernel" echo "Summary: The Linux Kernel" -echo "Version: $__KERNELRELEASE" +echo "Version: $__KERNELVERSION" # we need to determine the NEXT version number so that uname and # rpm -q will agree echo "Release: `. $srctree/scripts/mkversion`"