-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpm: dkms: Include other kernel-devel packages for spec requirements #16894
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Nicholas Lim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about the use of "and" in lines 33 and 34? That didn't seem to work for me. I deleted those "ands" and just left one blank space between the "or" boolean statements.... Requires: (x or y or z) (a or b or c)
I didn't test the "Conflicts:" line.
I haven't had time to test the "Conflicts:" line. As I previously mentioned openzfs compiled and installed fine without it on my system. However, I'm wondering if something like this would be better if you wish to include it...
As far as "Conflicts:" goes I don't think we need to get into specific version ranges. |
Conflicts: kernel-devel < @ZFS_META_KVER_MIN@, kernel-devel > @[email protected] | ||
Requires: (kernel-devel >= @ZFS_META_KVER_MIN@ or kernel-longterm-devel >= @ZFS_META_KVER_MIN@ or kernel-16k-devel >= @ZFS_META_KVER_MIN@) and (kernel-devel <= @[email protected] or kernel-longterm-devel <= @[email protected] or kernel-16k-devel <= @[email protected]) | ||
Requires(post): (kernel-devel >= @ZFS_META_KVER_MIN@ or kernel-longterm-devel >= @ZFS_META_KVER_MIN@ or kernel-16k-devel >= @ZFS_META_KVER_MIN@) and (kernel-devel <= @[email protected] or kernel-longterm-devel <= @[email protected] or kernel-16k-devel <= @[email protected]) | ||
Conflicts: (kernel-devel >= @ZFS_META_KVER_MIN@ or kernel-longterm-devel >= @ZFS_META_KVER_MIN@ or kernel-16k-devel >= @ZFS_META_KVER_MIN@) and (kernel-devel <= @[email protected] or kernel-longterm-devel <= @[email protected] or kernel-16k-devel <= @[email protected]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts: (kernel-devel >= @ZFS_META_KVER_MIN@ or kernel-longterm-devel >= @ZFS_META_KVER_MIN@ or kernel-16k-devel >= @ZFS_META_KVER_MIN@) and (kernel-devel <= @[email protected] or kernel-longterm-devel <= @[email protected] or kernel-16k-devel <= @[email protected]) | |
Conflicts: (kernel-devel < @ZFS_META_KVER_MIN@ or kernel-longterm-devel < @ZFS_META_KVER_MIN@ or kernel-16k-devel < @ZFS_META_KVER_MIN@) and (kernel-devel > @[email protected] or kernel-longterm-devel > @[email protected] or kernel-16k-devel > @[email protected]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You created a false conflict logic, which will not allow any valid kernel version.
Maybe that's why you are not able to build the rpm packages.
Of course the versions are needed. You cannot install onto a no longer, or not yet supported kernel version. |
Yes, but don't the "Requires:" and "Requires(post):" take care of that? Like I said before the compile and install worked fine without the conflicts line, and as far as I know with my very limited knowledge openzfs never needed a "Conflicts:" line before in that spec file. I'm new to all this so I could be very wrong, but isn't the "conflict" that we are concerned about at that stage, using two or more of kernel-devel, kernel-longterm-devel, or kernel-16k-devel when one of a different "flavor" is already in use? So like my code suggests we are checking to see if we are using say kernel-16k-devel of ANY version and if so then kernel-devel of ANY version is a conflict. At that stage the version is not an issue. If say ANY kernal-longterm-devel is installed then we don't want to install kernel-devel nor kernel-16k-devel of ANY version.
My code suggestion is very clean and clear... Although it may not be correct. I haven't tested it.
If A and B are both present then the boolean is TRUE and there is a conflict. The versions of A, B, and C do not matter at that stage. There is no version number that makes say having A and B at the same time okay. Version numbers are handled in "Requires:" and "Requires(post):". Making sure we don't have two or more "flavors" of kernel-devel used at the same time seems to be addressed in "Conflicts:". I think you guys are using too many "ands" and "ors." Looking at the rpm manual... My "Requires:" and "Requires:(post) are here. It has no "ands" nor "," it is cleaner, and most importantly it works. |
Motivation and Context
Description
Requires
,Requires(post)
, andConflicts
with boolean operators according to https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.htmlHow Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.