-
Notifications
You must be signed in to change notification settings - Fork 7
Use the RPM built-in sysusers feature #171
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
Conversation
# `mock.conf` file in a package payload is sufficient to leverage this feature. | ||
# However, for older distributions that lack this capability, we still define | ||
# the %%pre scriptlet. | ||
%if (0%{?rhel} && 0%{?rhel} < 10) || (0%{?mageia} && 0%{?mageia} < 10) || (0%{?suse_version} && 0%{?suse_version} < 1660) |
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.
Too bad there is no macro with RPM version because this is getting out of hand.
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.
Yeah. I just c&p'ed this from a place where people cared (mock), but I think we are just fine to support RHEL8+ and Fedora (if you think this is too ugly).
I think the problem is how to compare %rpmversion, without lua/bash heavy lifting...
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.
This is cool thing, btw.
$ rpm --eval '%[v"4.20.0" > v"4.19.0"]'
1
But this is RHEL9+ only: rpm-software-management/rpm@145b5f8
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.
%if (0%{?rhel} && 0%{?rhel} < 10) || (0%{?mageia} && 0%{?mageia} < 10) || (0%{?suse_version} && 0%{?suse_version} < 1660) | |
%if %{?rpmversion:v"%{rpmversion}" >= v"4.19"}%{!?rpmversion:0} |
If the RPM version is too old for the comparison and this feature, it does not have the macro defined.
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.
Oh, my condition is reversed. But you get the idea.
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.
And I already merged the PR. But good suggestion. Thank you.
The CI fails only for EPEL7 which we can IMHO disable now. But the error looks fixable
|
I disabled EPEL 7 builds. CI is green now. |
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.
+1
Built on top of:
https://src.fedoraproject.org/rpms/resalloc/pull-request/3
rpm-software-management/mock#1498