Hide Forgot
Created attachment 1204287 [details] Archive with spec files to reproduce the problem. Description of problem: rpmlint can't handle correct construction "%include %{S:999}", it detects error. Version-Release number of selected component (if applicable): Fedora 24 @ x86_64 rpmlint-1.9-3.fc24.noarch How reproducible: Always Steps to Reproduce: 1. rpmlint dos2unix_with_include.spec Actual results: dos2unix_with_include.spec: E: specfile-error error: query of specfile dos2unix_with_include.spec failed, can't parse 0 packages and 1 specfiles checked; 1 errors, 0 warnings. Expected results: 0 packages and 1 specfiles checked; 0 errors, 0 warnings. Additional info: dos2unix.spec is extracted from dos2unix-7.3.3-1.fc24.src.rpm. It passes rpmlint with no errors and no warnings. dos2unix_with_include.spec is almost the same as dos2unix.spec, two lines added: Source999: include.txt and %include %{S:999} include.txt is an empty file. rpmlint fails to parse modified spec file. dos2unix.spec, include.txt, dos2unix_with_include.spec are in attached archive, just in case.
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
The error comes directly from rpm itself: $ rpm -q --specfile ./dos2unix_with_include.spec error: Unable to open [...]/SOURCES/include.txt: No such file or directory error: query of specfile ./dos2unix_with_include.spec failed, can't parse We could do some tricks in rpmlint to set _sourcedir to get this to work, but there's no good value we could set it to I think, anything we choose might break other scenarios. We could add an option for defining macros on the command line, like rpm itself has -D/--define: $ rpm -q -D "_sourcedir $PWD" --specfile ./dos2unix_with_include.spec dos2unix-7.3.3-1.fc25.x86_64 dos2unix-debuginfo-7.3.3-1.fc25.x86_64 ...but I'm not sure if it's worth it. If you feel otherwise, please file this upstream at https://github.com/rpm-software-management/rpmlint (If one really cares, I suppose it would be possible to set the macro values in a rpmlint config file (untested).)
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
It is still a problem in F26. Patch to fix a bug uploaded to rpmlint github: <https://github.com/rpm-software-management/rpmlint/pull/120>.
Since my patch was accepted upstream, I do not object to close this bug.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.