* [RFC PATCH 0/1] kernel.bbclass: add non-santized kernel provides
@ 2012-07-06 15:52 Bruce Ashfield
2012-07-06 15:52 ` [PATCH] " Bruce Ashfield
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2012-07-06 15:52 UTC (permalink / raw)
To: richard.purdie; +Cc: openembedded-core, saul.wold
Richard/Saul,
I'm sending this out as a RFC, since I'm far from a packaging
expert. I've got all the details in the patch, but I ran into
a situation where the version string in utsrelease.h was being
santized for the kernel provides, and not in the kernel module
requires.
I tried several solutions:
- Changing the kernel module requires (more complex, more
code involved)
- Adding an extra provides in the kernel recipe with the
version string (only fixes my problem and doens't help
others)
- Changing the string to something that doesn't change
(aka run and hide)
- Adding a secondary provides in the kernel RPM so both
the sanitized and raw package name are present. This
was a small fix, works for my nasty version string, and
for the normal strings that I have elsewhere. It also
keeps existing provides intact in case something else I
can't see depends on the behaviour.
If the change seems reasonable, I can send a pull request
(or merge it directly if you want :) .. but I'm definitely open
to hearing about better solutions as well.
Cheers,
Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] kernel.bbclass: add non-santized kernel provides
2012-07-06 15:52 [RFC PATCH 0/1] kernel.bbclass: add non-santized kernel provides Bruce Ashfield
@ 2012-07-06 15:52 ` Bruce Ashfield
2012-07-09 16:54 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2012-07-06 15:52 UTC (permalink / raw)
To: richard.purdie; +Cc: openembedded-core, saul.wold
If the kernel version string uses characters or symbols that
need to be santized for the package name, we can end up with a
mismatch between module requirements and what the kernel
provides.
The kernel version is pulled from utsrelease.h, which contains
the exact string that was passed to the kernel build, not
one that is santized, this can result in:
echo "CONFIG_LOCALVERSION="\"MYVER+snapshot_standard\" >> ${B}/.config
<build>
% rpm -qp kernel-module-uvesafb-3.4-r0.qemux86.rpm --requires
update-modules
kernel-3.4.3-MYVER+snapshot_standard
% rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides
kernel-3.4.3-myver+snapshot-standard = 3.4-r0
At rootfs assembly time, we'll have a dependency issue with the kernel
providing the santizied string and the modules requiring the utsrelease.h
string.
To not break existing use cases, we can add a second provides to the
kernel packaging with the unsantized version string, and allowing the
kernel module packaging to be unchanged.
RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
% rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides
kernel-3.4.3-MYVER+snapshot_standard
kernel-3.4.3-myver+snapshot-standard = 3.4-r0
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
meta/classes/kernel.bbclass | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 44461bc..81c334b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -257,6 +257,7 @@ RDEPENDS_kernel = "kernel-base"
RDEPENDS_kernel-base ?= "kernel-image"
PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
ALLOW_EMPTY_kernel = "1"
ALLOW_EMPTY_kernel-base = "1"
ALLOW_EMPTY_kernel-image = "1"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] kernel.bbclass: add non-santized kernel provides
2012-07-06 15:52 ` [PATCH] " Bruce Ashfield
@ 2012-07-09 16:54 ` Saul Wold
0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-07-09 16:54 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 07/06/2012 08:52 AM, Bruce Ashfield wrote:
> If the kernel version string uses characters or symbols that
> need to be santized for the package name, we can end up with a
> mismatch between module requirements and what the kernel
> provides.
>
> The kernel version is pulled from utsrelease.h, which contains
> the exact string that was passed to the kernel build, not
> one that is santized, this can result in:
>
> echo "CONFIG_LOCALVERSION="\"MYVER+snapshot_standard\" >> ${B}/.config
>
> <build>
>
> % rpm -qp kernel-module-uvesafb-3.4-r0.qemux86.rpm --requires
> update-modules
> kernel-3.4.3-MYVER+snapshot_standard
> % rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides
> kernel-3.4.3-myver+snapshot-standard = 3.4-r0
>
> At rootfs assembly time, we'll have a dependency issue with the kernel
> providing the santizied string and the modules requiring the utsrelease.h
> string.
>
> To not break existing use cases, we can add a second provides to the
> kernel packaging with the unsantized version string, and allowing the
> kernel module packaging to be unchanged.
>
> RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
>
> % rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides
> kernel-3.4.3-MYVER+snapshot_standard
> kernel-3.4.3-myver+snapshot-standard = 3.4-r0
>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
> meta/classes/kernel.bbclass | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 44461bc..81c334b 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -257,6 +257,7 @@ RDEPENDS_kernel = "kernel-base"
> RDEPENDS_kernel-base ?= "kernel-image"
> PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
> PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
> +RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
> ALLOW_EMPTY_kernel = "1"
> ALLOW_EMPTY_kernel-base = "1"
> ALLOW_EMPTY_kernel-image = "1"
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-09 17:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 15:52 [RFC PATCH 0/1] kernel.bbclass: add non-santized kernel provides Bruce Ashfield
2012-07-06 15:52 ` [PATCH] " Bruce Ashfield
2012-07-09 16:54 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox