Bug 1160693
| Summary: | rpmdiff may ignore empty lines and comments | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | jiri vanek <jvanek> |
| Component: | rpmlint | Assignee: | Tom "spot" Callaway <tcallawa> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 22 | CC: | jzeleny, kevin, manuel.wolfshant, merlin, novyjindrich, packaging-team-maint, rvokal, tcallawa, tmz, twoerner, ville.skytta |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-19 20:52:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
jiri vanek
2014-11-05 12:54:15 UTC
There have been at least 3-4 different things called rpmdiff over the years and I dont know which of them is now getting run at end of rawhide builds, but at least rpmlint *has* such a command whereas rpm does not. According to:
def rpmdiff(basepath, rpmlist):
"Diff the first rpm in the list against the rest of the rpms."
if len(rpmlist) < 2:
return
first_rpm = rpmlist[0]
for other_rpm in rpmlist[1:]:
# ignore differences in file size, md5sum, and mtime
# (files may have been generated at build time and contain
# embedded dates or other insignificant differences)
args = ['/usr/libexec/koji-hub/rpmdiff',
'--ignore', 'S', '--ignore', '5',
'--ignore', 'T',
os.path.join(basepath, first_rpm),
os.path.join(basepath, other_rpm)]
proc = subprocess.Popen(args,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
close_fds=True)
output = proc.communicate()[0]
status = proc.wait()
if os.WIFSIGNALED(status) or \
(os.WEXITSTATUS(status) != 0):
raise koji.BuildError, 'mismatch when analyzing %s, rpmdiff output was:\n%s' % \
(os.path.basename(first_rpm), output)
exctract of koji, and according to output of lcally run rpmdiff, I believe it is normal rpmdiff, which goes out with :
[jvanek@jvanek 2014-11-05]$ which rpmdiff
/usr/bin/rpmdiff
[jvanek@jvanek 2014-11-05]$ rpm -qf /usr/bin/rpmdiff
rpmlint-1.6-1.fc20.noarch
...
So if rpmlint have this feature, then maybe reassign to koji to use it?
rpmdiff from rpmlint does not compare scriptlet contents at all so the culprit is something else and should be reported against that. It does not seem correct to me: [jvanek@jvanek result]$ which rpmdiff /usr/bin/rpmdiff [jvanek@jvanek result]$ rpm -qf /usr/bin/rpmdiff rpmlint-1.6-1.fc20.noarch [jvanek@jvanek result]$ rpmdiff java-1.8.0-openjdk-javadoc-1.8.0.40-15.b02.fc22.noarch.rpm java-1.8.0-openjdk-javadoc-debug-1.8.0.40-15.b02.fc22.noarch.rpm | more S.5..... NAME S.5..... SUMMARY S.5..... DESCRIPTION S.5..... POSTIN S.5..... POSTUN removed PROVIDES java-1.8.0-javadoc = 1:1.8.0.40-15.b02.fc22 removed PROVIDES java-javadoc = 1:1.8.0.40-15.b02.fc22 added PROVIDES java-1.8.0-javadoc-debug = 1:1.8.0.40-15.b02.fc22 added PROVIDES java-javadoc-debug = 1:1.8.0.40-15.b02.fc22 removed OBSOLETES java-1.7.0-openjdk-javadoc added OBSOLETES java-1.7.0-openjdk-javadoc-debug removed /usr/share/doc/java-1.8.0-openjdk-javadoc added /usr/share/doc/java-1.8.0-openjdk-javadoc-debug added /usr/share/doc/java-1.8.0-openjdk-javadoc-debug/LICENSE removed /usr/share/doc/java-1.8.0-openjdk-javadoc/LICENSE removed /usr/share/javadoc/java-1.8.0-openjdk-1.8.0.40-15.b02.fc22 added /usr/share/javadoc/java-1.8.0-openjdk-1.8.0.40-15.b02.fc22-debug added /usr/share/javadoc/java-1.8.0-openjdk-1.8.0.40-15.b02.fc22-debug/api added /usr/share/javadoc/java-1.8.0-openjdk-1.8.0.40-15.b02.fc22-debug/api/allclasses-frame.html added /usr/share/javadoc/java-1.8.0-openjdk-1.8.0.40-15.b02.fc22-debug/api/allclasses-noframe.html (Hi, I was helping Jiri out with this issue on IRC) The issue with the original build is down to Koji's handling of noarch subpackages of arch-ful builds. Each arch's openjdk build outputs a noarch subpackage, java-1.8.0-openjdk-javadoc. Because noarch packages are the same across all arches in the Fedora repos, Koji enforces a rule that the build fails if the noarch RPMs differ between the different arch builds. After all Koji buildArch subtask completes, Koji compares these three should-be-identical java-1.8.0-openjdk-javadoc.noarch RPMs using its own local copy of rpmdiff (https://git.fedorahosted.org/cgit/koji/tree/hub/rpmdiff). What's happening is that three noarch RPMs _aren't_ identical. The ARM arch RPM has a difference in one of its scriptlets, due to a conditional in the spec file moving a comment around in the scripts. The spec file is: http://pkgs.fedoraproject.org/cgit/java-1.8.0-openjdk.git/tree/java-1.8.0-openjdk.spec?id=73bf527b6e73798108011f6eb9a90dedd209f1df On i386 and x86_64, %{include_debug_build} is true, so the comment on line 1634 is part of the postun script for javadoc-debug. On ARM, the conditional is false, so the comment is tacked onto the end of the postun for javadoc instead. At the end of the day, it all stems from the fact that rpmbuild is considering everything between the start of one script (either the javadoc postun or the javadoc-debug postun, depending on the arch), and the start of the next script or RPM section (in this case, one of the %files blocks), as the contents of the script. RPM thinks that the comment is part of the script, _not_ a spec file comment. RPM doesn't exactly do spec file comments. Kind of. Depending where you are in a spec file (Panu can no doubt explain this better than I). Hope that was clear, just say if it wasn't :) This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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. |