-
Notifications
You must be signed in to change notification settings - Fork 117
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
incoherent-version-in-changelog is factoring .%dist in %{release} #856
Comments
It seems strange adding
Well, I can imagine supporting any of the 2 macros in |
To just pick a specfile at random: https://src.fedoraproject.org/rpms/autofs/blob/rawhide/f/autofs.spec#_15 I think you will find that all Fedora, RHEL (and therefore all EL downstreams) and SUSE specfiles do that.
As above? But honestly, I'd rather not use It seems far more useful for |
All right, so then let's allow |
Unfortunately this is a But there is a different kind of consistency issue here. Why do I only see this while parsing a suse RPM and not a, say, EL7 or EL8 RPM? They are all built from the same specfile and therefore all have What is special about the |
Please upload somewhere RPM files so that I can observe the difference. |
Hrm. I don't really have anywhere I can upload them to. If you use mock to build https://github.com/daos-stack/dpdk/blob/1231cac43173877aae6b152ded5523d80809bac9/dpdk.spec on each of opensuse-leap-15.3-x86_64 and rocky+epel-8-x86_64 you will get RPMs you can compare. |
Please zip them and attach them to this Issue. |
@brianjmurrell Do you have a COPR project where this was built? That would also work, since they use the same Mock definitions. |
Can you please attach the problematic RPM file? |
Thanks for the file. So can you please experiment with something like: diff --git a/rpmlint/checks/SpecCheck.py b/rpmlint/checks/SpecCheck.py
index 997d974c..739840be 100644
--- a/rpmlint/checks/SpecCheck.py
+++ b/rpmlint/checks/SpecCheck.py
@@ -436,7 +436,7 @@ class SpecCheck(AbstractCheck):
'%%changelog: %s' % deptoken)
for match in self.macro_regex.findall(line):
res = re.match('%+', match)
- if len(res.group(0)) % 2 and match != '%autochangelog':
+ if len(res.group(0)) % 2 and match not in ('%autochangelog', '%release', '%dist'):
self.output.add_info('W', pkg, 'macro-in-%changelog', match)
else:
if not depscript_override: which should not warn about |
The |
@brianjmurrell In the case of writing out EVRs in the changelog entry, you should omit the Basically, this is not a bug, and this is working as intended. |
@Conan-Kudo Indeed, I completely agree. While it's been a while since I filed this ticket, because I generally agree with you I can only imagine that I tried including Indeed, if you go re-read the original comment here, I do say:
So I acknowledge that I don't really want to do that, The title of this issue even is incoherent-version-in-changelog is factoring .%dist in %{release} which is describing that it's not my attempting to include |
But per @Conan-Kudo (and I agree with him), I shouldn't actually be putting the That said, the work-around does work. It just doesn't seem to be the correct solution where the correct solution, I would think, is to disable the factoring of |
Any further thoughts given the last couple of comments? |
Let's use the workaround for now. The issue is correct, but has very low priority for me, sorry. |
What is the workaround exactly? |
The one mentioned in #856 (comment) ? |
Do you mean using I think I'd sooner add an ignore in the So I guess that is what I will do until this issue is fixed. Thanks for all of the input. |
Yes, that would be the easiest approach. Thanks for the discussion. |
I am getting a
W: incoherent-version-in-changelog 1.15.0~rc3-2 ['1.15.0~rc3-2.suse.lp153', '1.15.0~rc3-2.suse.lp153']
warning.This is due to
Release: 2%{?dist}
in the specfile. But I cannot include either%{dist}
or even%{release}
in the changelog version or else I getW: macro-in-%changelog %{release}
. I certainly cannot hard code a given distro's%{dist}
value either.It seems like
rpmlint/rpmlint/checks/TagsCheck.py
Lines 549 to 562 in b749f3a
.%{?dist}
inRelease:
.The text was updated successfully, but these errors were encountered: