--- kernel.spec | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kernel.spec b/kernel.spec index 6e2df747..377b71a0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -382,6 +382,11 @@ ExclusiveOS: Linux %ifnarch %{nobuildarches} Requires: kernel-core-uname-r = %{KVERREL}%{?variant} Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} +# Enforce kernel-devel varriant >= uname-r,varriant if installed - rhbz#1450577 +# Only needed for fedora kernel +%if 0%{?fedora} +Requires: (kernel-devel-uname-r >= %{KVERREL}%{?variant} if kernel-devel-uname-r) +%endif %endif
On Mon, Jul 24, 2017 at 9:20 AM, Nicolas Chauvet kwizart@gmail.com wrote:
Please add a descriptive changelog to the patch. People shouldn't have to go somewhere else to see why a change is being made. I even read the bug and still don't fully understand what problem you're trying to solve.
kernel.spec | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kernel.spec b/kernel.spec index 6e2df747..377b71a0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -382,6 +382,11 @@ ExclusiveOS: Linux %ifnarch %{nobuildarches} Requires: kernel-core-uname-r = %{KVERREL}%{?variant} Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} +# Enforce kernel-devel varriant >= uname-r,varriant if installed - rhbz#1450577 +# Only needed for fedora kernel +%if 0%{?fedora}
Why is a fedora conditional being added here? This is only built in Fedora already, and the spec file isn't shared with another downstream directly.
+Requires: (kernel-devel-uname-r >= %{KVERREL}%{?variant} if kernel-devel-uname-r)
Adding this seems to now force this installation of a kernel-devel package to every installation of Fedora. That's... bad. The number of people that need to build against a kernel version is small.
NAK.
+%endif %endif
josh
2017-07-24 15:28 GMT+02:00 Josh Boyer jwboyer@fedoraproject.org:
On Mon, Jul 24, 2017 at 9:20 AM, Nicolas Chauvet kwizart@gmail.com wrote:
Please add a descriptive changelog to the patch. People shouldn't have to go somewhere else to see why a change is being made. I even read the bug and still don't fully understand what problem you're trying to solve.
kernel.spec | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kernel.spec b/kernel.spec index 6e2df747..377b71a0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -382,6 +382,11 @@ ExclusiveOS: Linux %ifnarch %{nobuildarches} Requires: kernel-core-uname-r = %{KVERREL}%{?variant} Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} +# Enforce kernel-devel varriant >= uname-r,varriant if installed - rhbz#1450577 +# Only needed for fedora kernel +%if 0%{?fedora}
Why is a fedora conditional being added here? This is only built in Fedora already, and the spec file isn't shared with another downstream directly.
This is true, however I remember centos armhfp altarch often rebase on fedora kernel.
+Requires: (kernel-devel-uname-r >= %{KVERREL}%{?variant} if kernel-devel-uname-r)
Adding this seems to now force this installation of a kernel-devel
Well, this is not the case, as it's a boolean dependency. It will enforce the condition only if there is already a kernel-devel-uname variant.
(fixed the typo variant, btw).
Thx
On Mon, Jul 24, 2017 at 9:40 AM, Nicolas Chauvet kwizart@gmail.com wrote:
2017-07-24 15:28 GMT+02:00 Josh Boyer jwboyer@fedoraproject.org:
On Mon, Jul 24, 2017 at 9:20 AM, Nicolas Chauvet kwizart@gmail.com wrote:
Please add a descriptive changelog to the patch. People shouldn't have to go somewhere else to see why a change is being made. I even read the bug and still don't fully understand what problem you're trying to solve.
kernel.spec | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kernel.spec b/kernel.spec index 6e2df747..377b71a0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -382,6 +382,11 @@ ExclusiveOS: Linux %ifnarch %{nobuildarches} Requires: kernel-core-uname-r = %{KVERREL}%{?variant} Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} +# Enforce kernel-devel varriant >= uname-r,varriant if installed - rhbz#1450577 +# Only needed for fedora kernel +%if 0%{?fedora}
Why is a fedora conditional being added here? This is only built in Fedora already, and the spec file isn't shared with another downstream directly.
This is true, however I remember centos armhfp altarch often rebase on fedora kernel.
I don't think that's a reason to add that.
+Requires: (kernel-devel-uname-r >= %{KVERREL}%{?variant} if kernel-devel-uname-r)
Adding this seems to now force this installation of a kernel-devel
Well, this is not the case, as it's a boolean dependency. It will enforce the condition only if there is already a kernel-devel-uname variant.
From the packaging guidelines: https://fedoraproject.org/wiki/Packaging:Guidelines#Rich.2FBoolean_dependenc...
"Rich/Boolean dependencies Packages MAY make limited use of the rich (or Boolean) dependency feature supported in RPM. They MAY be used in Suggests:, Enhances: and Supplements: dependencies. However, currently they MUST NOT be used in Requires: or Recommends: dependencies as this will cause issues with the package updates process."
So you're adding something that isn't allowed.
And I still don't know what problem you're trying to solve. Still NAK.
josh
On 24.07.2017 15:53, Josh Boyer wrote:
On Mon, Jul 24, 2017 at 9:40 AM, Nicolas Chauvet kwizart@gmail.com wrote:
2017-07-24 15:28 GMT+02:00 Josh Boyer jwboyer@fedoraproject.org:
On Mon, Jul 24, 2017 at 9:20 AM, Nicolas Chauvet kwizart@gmail.com wrote:
And I still don't know what problem you're trying to solve. Still NAK.
I guess the bugzilla number in the subject is meant as an explanation: https://bugzilla.redhat.com/show_bug.cgi?id=1450577
FWIW, I welcome that finally someone is working towards getting this fixed, as it seems users have a hard time understanding and handling kernel-devel packages.
I didn't look to much into this recently, but I think there might be an easier and better solution: Don't provide variant specific kernel-devel package at all (like kernel-PAE-devel), just ship one kernel-devel package that provides the files for all the kernel variants on the architecture in question (IOW: on x86-32 simply ship the files that currently are in kernel-PAE-devel in kernel-devel instead & get rid of kernel-PAE-devel). Sure, kernel-devel gets bigger. But my gut says it's the better solution (but I didn't check and someone should how much it grows if we want to go down that route).
CU, knurd
2017-07-24 16:28 GMT+02:00 Thorsten Leemhuis fedora@leemhuis.info:
On 24.07.2017 15:53, Josh Boyer wrote:
On Mon, Jul 24, 2017 at 9:40 AM, Nicolas Chauvet kwizart@gmail.com wrote:
2017-07-24 15:28 GMT+02:00 Josh Boyer jwboyer@fedoraproject.org:
On Mon, Jul 24, 2017 at 9:20 AM, Nicolas Chauvet kwizart@gmail.com wrote:
And I still don't know what problem you're trying to solve. Still NAK.
I guess the bugzilla number in the subject is meant as an explanation: https://bugzilla.redhat.com/show_bug.cgi?id=1450577
FWIW, I welcome that finally someone is working towards getting this fixed, as it seems users have a hard time understanding and handling kernel-devel packages.
I didn't look to much into this recently, but I think there might be an easier and better solution: Don't provide variant specific kernel-devel package at all (like kernel-PAE-devel), just ship one kernel-devel package that provides the files for all the kernel variants on the architecture in question (IOW: on x86-32 simply ship the files that currently are in kernel-PAE-devel in kernel-devel instead & get rid of kernel-PAE-devel). Sure, kernel-devel gets bigger. But my gut says it's the better solution (but I didn't check and someone should how much it grows if we want to go down that route).
Thx Thorsten.
First, I apologize to have send a patch that rely on boolean dependencies whereas this is not yet allowed as our packaging standard. I thought it was the case, and I will resubmit with an appropriate notice for a preliminary review (until boolean deps are allowed, hopefully in the f27 timeline).
So trying to sum-up. On fedora, kernel-devel installation can be wrong in two ways: - It's not the appropriate variant (PAE,lpae,rt,debug,up,etc) - Both versions mismatch. (one has kernel from fedora-kernel-rawhide-nodebug but kernel-devel from f26-updates (so 4.11.10-300.fc26.x86_64 =/ 4.13.0-0.rc1.git4.1.fc27 mismatch).
This patch and bugreport is only meant to address the latter issue, so that when a user issue the following command, the right kernel-devel comes along: dnf update kernel --enablerepo=updates-testing (this fails to grab the kernel-devel from updates-testing, at least without the patch)
Like you might have noticed, users could have used the following instead: dnf update kernel* --enablerepo=updates-testing (there it works and even without using kernel* at all) But , that's not something one can expect from ours users, (and even from me when distracted). So there is a need to state the appropriate requires (which the patch implements), otherwise the failure is unavoidable.
The former issue can be fixed in tools using kernel-devel (akmods,dkms,systemtap,other ?) by using the boolean dependencies such as Suggests: kernel-lpae-devel if kernel-lpae, etc See https://bugzilla.redhat.com/show_bug.cgi?id=1474423 The same restriction might apply to boolean dependencies here. So the plan is to ask for clarification from releng, and implement in the f27 timeline if allowed.
Thx for the review.
kernel@lists.fedoraproject.org