All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bug in scripts/package/mkspec?
@ 2010-11-18 18:13 Patrick LeBoutillier
  2010-12-02 15:25 ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick LeBoutillier @ 2010-11-18 18:13 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I've been building RPMs for the Linux kernel for a while now and only
recently noticed that the RPM Release field is always set to 1.
After a bit of searching I found the offending line in
scripts/package/mkspec. Here is a patch that worked for me, but
perhaps this
could be fixed in better way by someone knowledgeable of the kernel
build process...:


--- ./mkspec.next       2010-11-18 13:08:56.000000000 -0500
+++ mkspec      2010-11-18 13:10:13.000000000 -0500
@@ -29,7 +29,7 @@
 echo "Version: $__KERNELRELEASE"
 # we need to determine the NEXT version number so that uname and
 # rpm -q will agree
-echo "Release: `. $srctree/scripts/mkversion`"
+echo "Release: `cd $srctree && ./scripts/mkversion`"
 echo "License: GPL"
 echo "Group: System Environment/Kernel"
 echo "Vendor: The Linux Community"


Note: Please cc: me on replies as I'm not subscribed to the list.


Thanks,

Patrick

-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Bug in scripts/package/mkspec?
  2010-11-18 18:13 [PATCH] Bug in scripts/package/mkspec? Patrick LeBoutillier
@ 2010-12-02 15:25 ` Michal Marek
  2010-12-02 21:15   ` Patrick LeBoutillier
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2010-12-02 15:25 UTC (permalink / raw)
  To: Patrick LeBoutillier; +Cc: linux-kernel

On 18.11.2010 19:13, Patrick LeBoutillier wrote:
> Hi all,
> 
> I've been building RPMs for the Linux kernel for a while now and only
> recently noticed that the RPM Release field is always set to 1.
> After a bit of searching I found the offending line in
> scripts/package/mkspec. Here is a patch that worked for me, but
> perhaps this
> could be fixed in better way by someone knowledgeable of the kernel
> build process...:
> 
> 
> --- ./mkspec.next       2010-11-18 13:08:56.000000000 -0500
> +++ mkspec      2010-11-18 13:10:13.000000000 -0500
> @@ -29,7 +29,7 @@
>  echo "Version: $__KERNELRELEASE"
>  # we need to determine the NEXT version number so that uname and
>  # rpm -q will agree
> -echo "Release: `. $srctree/scripts/mkversion`"
> +echo "Release: `cd $srctree && ./scripts/mkversion`"

This doesn't look correct to me, the script reads the .version file
which is in the build directory, not in the source dir. Can you post a
step-by-step reproducer for your bug?

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Bug in scripts/package/mkspec?
  2010-12-02 15:25 ` Michal Marek
@ 2010-12-02 21:15   ` Patrick LeBoutillier
  2011-01-06 12:54     ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick LeBoutillier @ 2010-12-02 21:15 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel

Hi Michal,

Sorry for the bad patch. Here is basically what I do:

$ make menuconfig
$ make rpm
...
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.36.1-1.x86_64.rpm
...
$ make menuconfig # tweak some configs
$ make rpm
...
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.36.1-1.x86_64.rpm
...


My expectation (and perhaps it is incorrect) is that subsequent "make
rpm"s on the same build tree
yield rpms with increasing release numbers (2.6.36.1-1, 2.6.36.1-2,
...). Is this how it's supposed
to work?

If that's the case, I think there needs to be a dependency between the
kernel.spec file and the .version file.
I think my (bad) patch worked once because it touched the mkspec
script, thereby causing the kernel.spec
file to be regenerated at the next "make rpm".


Patrick


On Thu, Dec 2, 2010 at 10:25 AM, Michal Marek <mmarek@suse.cz> wrote:
> On 18.11.2010 19:13, Patrick LeBoutillier wrote:
>> Hi all,
>>
>> I've been building RPMs for the Linux kernel for a while now and only
>> recently noticed that the RPM Release field is always set to 1.
>> After a bit of searching I found the offending line in
>> scripts/package/mkspec. Here is a patch that worked for me, but
>> perhaps this
>> could be fixed in better way by someone knowledgeable of the kernel
>> build process...:
>>
>>
>> --- ./mkspec.next       2010-11-18 13:08:56.000000000 -0500
>> +++ mkspec      2010-11-18 13:10:13.000000000 -0500
>> @@ -29,7 +29,7 @@
>>  echo "Version: $__KERNELRELEASE"
>>  # we need to determine the NEXT version number so that uname and
>>  # rpm -q will agree
>> -echo "Release: `. $srctree/scripts/mkversion`"
>> +echo "Release: `cd $srctree && ./scripts/mkversion`"
>
> This doesn't look correct to me, the script reads the .version file
> which is in the build directory, not in the source dir. Can you post a
> step-by-step reproducer for your bug?
>
> Thanks,
> Michal
>



-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Bug in scripts/package/mkspec?
  2010-12-02 21:15   ` Patrick LeBoutillier
@ 2011-01-06 12:54     ` Michal Marek
  2011-01-06 14:28       ` Patrick LeBoutillier
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2011-01-06 12:54 UTC (permalink / raw)
  To: Patrick LeBoutillier; +Cc: linux-kernel

On Thu, Dec 02, 2010 at 04:15:20PM -0500, Patrick LeBoutillier wrote:
> Hi Michal,
> 
> Sorry for the bad patch. Here is basically what I do:
> 
> $ make menuconfig
> $ make rpm
> ...
> Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.36.1-1.x86_64.rpm
> ...
> $ make menuconfig # tweak some configs
> $ make rpm
> ...
> Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.36.1-1.x86_64.rpm
> ...
> 
> 
> My expectation (and perhaps it is incorrect) is that subsequent "make
> rpm"s on the same build tree
> yield rpms with increasing release numbers (2.6.36.1-1, 2.6.36.1-2,
> ...). Is this how it's supposed
> to work?

I see the problem now, unfortunatelly I haven't yet found a fix. The
problem is that the .version file is updated during build, but rpm needs
to know the release number in advance. The fact that there are about
four places that deal with the .version file is also not helping :-(.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Bug in scripts/package/mkspec?
  2011-01-06 12:54     ` Michal Marek
@ 2011-01-06 14:28       ` Patrick LeBoutillier
  2011-01-06 15:53         ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick LeBoutillier @ 2011-01-06 14:28 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel

Michal,

Maybe the easiest way is just to rebuild the spec file everytime we do
"make rpm".
I'll try it and see how it does.

Do you know of the .version file is used for anything outside of the
"make rpm" process?

Patrick


On Thu, Jan 6, 2011 at 7:54 AM, Michal Marek <mmarek@suse.cz> wrote:
> On Thu, Dec 02, 2010 at 04:15:20PM -0500, Patrick LeBoutillier wrote:
>> Hi Michal,
>>
>> Sorry for the bad patch. Here is basically what I do:
>>
>> $ make menuconfig
>> $ make rpm
>> ...
>> Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.36.1-1.x86_64.rpm
>> ...
>> $ make menuconfig # tweak some configs
>> $ make rpm
>> ...
>> Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.36.1-1.x86_64.rpm
>> ...
>>
>>
>> My expectation (and perhaps it is incorrect) is that subsequent "make
>> rpm"s on the same build tree
>> yield rpms with increasing release numbers (2.6.36.1-1, 2.6.36.1-2,
>> ...). Is this how it's supposed
>> to work?
>
> I see the problem now, unfortunatelly I haven't yet found a fix. The
> problem is that the .version file is updated during build, but rpm needs
> to know the release number in advance. The fact that there are about
> four places that deal with the .version file is also not helping :-(.
>
> Michal
>



-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Bug in scripts/package/mkspec?
  2011-01-06 14:28       ` Patrick LeBoutillier
@ 2011-01-06 15:53         ` Michal Marek
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Marek @ 2011-01-06 15:53 UTC (permalink / raw)
  To: Patrick LeBoutillier; +Cc: linux-kernel

On 6.1.2011 15:28, Patrick LeBoutillier wrote:
> Michal,
> 
> Maybe the easiest way is just to rebuild the spec file everytime we do
> "make rpm".
> I'll try it and see how it does.
> 
> Do you know of the .version file is used for anything outside of the
> "make rpm" process?

It is used to build the UTS_VERSION string, aka uname -v. It's the
number after the hash sign.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-06 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 18:13 [PATCH] Bug in scripts/package/mkspec? Patrick LeBoutillier
2010-12-02 15:25 ` Michal Marek
2010-12-02 21:15   ` Patrick LeBoutillier
2011-01-06 12:54     ` Michal Marek
2011-01-06 14:28       ` Patrick LeBoutillier
2011-01-06 15:53         ` Michal Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.