Bug 2169684
| Summary: | unpackaged gives false positive about /usr/lib/jvm/java-*-openjdk-*.x86_64/bin/jfr | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Pavel Moravec <pmoravec> |
| Component: | sos | Assignee: | Jose Castillo <jcastillo> |
| Status: | CLOSED ERRATA | QA Contact: | Adriana Jurkechova <ajurkech> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9.2 | CC: | agk, ajurkech, cww, jcastillo, jjansky, mhradile, plambri, sbradley, theute |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-31 18:49:38 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
Pavel Moravec
2023-02-14 10:22:00 UTC
This is not a sos bug(*), this is java bug :)
B'cos what sos does: it traverses $PATH and reports any file not owned by a package as "unpackaged".
Why it reported the /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el9_1.x86_64/bin/jfr file when it is "packaged" / owned by java-11-openjdk ? Esp. if that is not inside any $PATH ?
B'cos it found that /usr/bin/jfr (under a $PATH) is symbolic link to /etc/alternatives/jfr, which is symbolic link to /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el9_1.x86_64/bin/jfr . And /usr/bin/jfr is not owned by any package.
Why the plugin reported just jfr binary but not e.g. javac that has the same chain of symbolic links? B'cos /usr/bin/javac is owned by that package.
So java-11-openjdk should chown /usr/bin/jfr to fix this bug.
Checking spec file of java-11-openjdk, I do see there:
%ghost %{_bindir}/javac
%ghost %{_bindir}/jdb
but not:
%ghost %{_bindir}/jfr
which seems to me as the reason.
(*) but there is a room for improvement of sos. It reports "file XY is not packaged", while it *is* packaged. Just a symlink to it from $PATH is not packaged. We should report rather the symlink than its destination. So I will leave this BZ on sos to implement this improvement, and raise a new BZ against java for the missing "%ghost %{_bindir}/jfr"
(In reply to Pavel Moravec from comment #1) > and raise a new BZ against java for the missing "%ghost %{_bindir}/jfr" https://bugzilla.redhat.com/show_bug.cgi?id=2175760 raised for it. Expected results changed based on Pavel's Comment 1. Switched to Tested. old: === Installed: java-11-openjdk-devel-1:11.0.19.0.7-1.el9_1.x86_64 Complete! [root@ci-vm-10-0-136-155 ~]# sos report -o unpackaged --batch --build sosreport (version 4.5.1) ... [root@ci-vm-10-0-136-155 unpackaged]# cat unpackaged /usr/bin/1minutetip-report /usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.el9_1.x86_64/bin/jfr new: === [root@ci-vm-10-0-139-47 ~]# sos report -o unpackaged --batch --build sosreport (version 4.5.3) ... [root@ci-vm-10-0-139-47 unpackaged]# cat unpackaged /usr/bin/1minutetip-report /usr/bin/jfr -> /etc/alternatives/jfr -> /usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.el9_1.x86_64/bin/jfr Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (sos bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:3414 |