public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <asharma@fb.com>
To: linux-kbuild@vger.kernel.org
Subject: make rpm-pkg and version mismatch
Date: Tue, 3 May 2011 14:27:06 -0700	[thread overview]
Message-ID: <20110503212706.GA26044@dev1756.snc6.facebook.com> (raw)


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.

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}"
+

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`"

Rinse and repeat in all other places that refer to KERNELRELEASE
but want KERNELVERSION.

Is there a simpler way to do this?

 -Arun

             reply	other threads:[~2011-05-03 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 21:27 Arun Sharma [this message]
2011-05-04 20:23 ` make rpm-pkg and version mismatch Michal Marek
2011-05-04 20:44   ` Arun Sharma
2011-05-04 21:07     ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110503212706.GA26044@dev1756.snc6.facebook.com \
    --to=asharma@fb.com \
    --cc=linux-kbuild@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox