Mailinglist Archive: opensuse-kernel (63 mails)

< Previous Next >
Re: [opensuse-kernel] mkspec
  • From: Michal Marek <mmarek@xxxxxxx>
  • Date: Mon, 27 Apr 2009 10:49:07 +0200
  • Message-id: <20090427084907.GA27573@xxxxxxxxxxxxx>
On Mon, Apr 27, 2009 at 10:14:33AM +0200, Jan Blunck wrote:
On Mon, Apr 27, Michal Marek wrote:
Jan Blunck napsal(a):
Besides that mkspec is broken and can't build the Kernel:Vanilla projects
anymore since it doesn't honor EXTRAVERSION properly.

You mean that it doesn't paste the -rcX string to the rpm release
numbers? That didn't really work anyway. Or what specifically are you
missing?

Exactly: -rcX , -g$SHA1, -next-$TIMESTAMP and so on. There are numerous
examples. None of my none-standard Kernel: repositories is building anymore.
If you are reimplementing something you can at least make sure that you don't
break something useful. And that is totally separate issue from the
what-language-I-dont-like discussion.

Can you try this one? Note that compute-PATCHVERSION.sh only reads the
Makefile, no localversion* files (but it should be easy to extend it).

From: Michal Marek <mmarek@xxxxxxx>
Date: Mon, 27 Apr 2009 10:42:32 +0200
Subject: [PATCH] - rpm/kernel-binary.spec.in, rpm/kernel-source.spec.in,
rpm/kernel-syms.spec.in, rpm/mkspec: prepend the EXTRAVERSION to
the rpm release string (note that this won't have any effect in
the openSUSE:* projects).

---
kernel-source.changes | 8 ++++++++
rpm/kernel-binary.spec.in | 4 ++++
rpm/kernel-source.spec.in | 6 +++++-
rpm/kernel-syms.spec.in | 2 +-
rpm/mkspec | 6 +++---
5 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/kernel-source.changes b/kernel-source.changes
index 499736d..60bf440 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Mon Apr 27 10:41:20 CEST 2009 - mmarek@xxxxxxx
+
+- rpm/kernel-binary.spec.in, rpm/kernel-source.spec.in,
+ rpm/kernel-syms.spec.in, rpm/mkspec: prepend the EXTRAVERSION to
+ the rpm release string (note that this won't have any effect in
+ the openSUSE:* projects).
+
+-------------------------------------------------------------------
Thu Apr 23 23:31:39 CEST 2009 - jeffm@xxxxxxx

- Temporarily disabled patches.suse/acpi-dsdt-initrd-v0.9a-2.6.25.patch
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index 1a8f76b..c4ff1af 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -64,7 +64,11 @@
Name: kernel-@FLAVOR@
Summary: @SUMMARY@
Version: @RPMVERSION@
+%if %using_buildservice
+Release: @RELEASE@<RELEASE>
+%else
Release: @RELEASE@
+%endif
License: GPL
Group: System/Kernel
Url: http://www.kernel.org/
diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in
index d5dd953..28b7c3e 100644
--- a/rpm/kernel-source.spec.in
+++ b/rpm/kernel-source.spec.in
@@ -41,7 +41,11 @@
Name: kernel-source@VARIANT@
Summary: The Linux Kernel Sources
Version: @RPMVERSION@
-Release: @RELEASE@
+%if %using_buildservice
+Release: @RELEASE@<RELEASE>
+%else
+Release: @RELEASE@
+%endif
License: GPL
Group: Development/Sources
AutoReqProv: off
diff --git a/rpm/kernel-syms.spec.in b/rpm/kernel-syms.spec.in
index 52aebdc..16bccb9 100644
--- a/rpm/kernel-syms.spec.in
+++ b/rpm/kernel-syms.spec.in
@@ -31,7 +31,7 @@ Name: kernel-syms@VARIANT@
Summary: Kernel Symbol Versions (modversions)
Version: @RPMVERSION@
%if %using_buildservice
-Release: @RELEASE@
+Release: @RELEASE@<RELEASE>
%else
%define kernel_source_release %(LC_ALL=C rpm -q kernel-source%variant-%version
--qf "%{RELEASE}" | grep -v 'not installed' || echo 0)
Release: %kernel_source_release
diff --git a/rpm/mkspec b/rpm/mkspec
index 5e51229..511c905 100755
--- a/rpm/mkspec
+++ b/rpm/mkspec
@@ -26,15 +26,15 @@ my %binary_descriptions = parse_descriptions();

my $patchversion = `$dir/compute-PATCHVERSION.sh`;
chomp $patchversion;
-my $rpmversion = $patchversion;
-$rpmversion =~ s/-.*//g;
+my ($rpmversion, $rpmrelease) = split(/-/, $patchversion, 2);
+$rpmrelease =~ s/-/_/g;

my %macros = (
VARIANT => $variant,
SRCVERSION => $srcversion,
PATCHVERSION => $patchversion,
RPMVERSION => $rpmversion,
- RELEASE => 0,
+ RELEASE => $rpmrelease,
);

# binary spec files
--
1.6.0.2
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kernel+help@xxxxxxxxxxxx

< Previous Next >