Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
The creation of the file classes.jsa has been added to the %post phase of the rpm (for its purpose see bug 513605 and bug 878181).
But the file is kept when the package itself is removed (as it is not owned by any package) and thus blocks the deletion of the directory tree.
IMHO the deletion should be managed by %postun (for the case of package removal).
During the package update the file is regenerated, so no harm is done.
Version-Release number of selected component (if applicable):
java-1.7.0-openjdk-1.7.0.9-2.3.7.1.el6_3.x86_64
How reproducible:
always
Steps to Reproduce:
1. rpm -e java-1.7.0-openjdk
2. ls /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/server/classes.jsa
3.
Actual results:
The file and its directory tree is left after the removal.
Expected results:
No leftovers
Additional info:
damn. Yes this file have to be removed in postun, but only for removing of package, not for update. Because it is not "just regenerated" in post, but better "enriched" during post. So the fix in postun will be:
%ifarch %{jit_arches}
if [ $1 -eq 0 ]
then
#see https://bugzilla.redhat.com/show_bug.cgi?id=918172
f="%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/classes.jsa"
if [ -f "$f" ]
rm -rf "$f"
fi
fi
%endif
Missing then. Otherwise QA is ok with this approach.
%ifarch %{jit_arches}
if [ $1 -eq 0 ]
then
#see https://bugzilla.redhat.com/show_bug.cgi?id=918172
f="%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/classes.jsa"
if [ -f "$f" ]
then
rm -rf "$f"
fi
fi
%endif
Ok one more update:
%ifarch %{jit_arches}
if [ $1 -eq 0 ]
then
#see https://bugzilla.redhat.com/show_bug.cgi?id=918172
f="%{_jvmdir}/%{jrelnk}/lib/%{archinstall}/server/classes.jsa"
if [ -f "$f" ]
then
rm -rf "$f"
fi
fi
%endif
the usage of jrelnk instead of jredir is important to prevent inconsistency between update with/without changed buildversion (as release is not projected into final directory name)
Have the same problem in Fedora: After the update *today* (two weeks after the above comment) to java-1.7.0-openjdk-1.7.0.17-2.3.8.3.fc18.x86_64 I'm still left with the unowned file:
-r--r--r--. 1 root root 25M Mar 18 09:14 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/server/classes.jsa
Yes. They are left. It was my error, and I'm deeply sorry.
those:
java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/server/classes.jsa *will* left.
But all *next* eg:
java-1.7.0-openjdk-1.7.0.17.x86_64/jre/lib/amd64/server/classes.jsa will not left enymore.
I do not want to add possibly unsafe scriplet which will remove old (== already not owned) file.