Bug 1312593

Summary: Upgrades leave behind excess java.security.rpm* files
Product: [Fedora] Fedora Reporter: Scott Schmit <i.grok>
Component: java-1.8.0-openjdkAssignee: Deepak Bhole <dbhole>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: ahughes, dbhole, jerboaa, jvanek, msrb, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-29 08:49:01 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 Scott Schmit 2016-02-27 17:16:59 UTC
Description of problem:
Even though I have never modified this file, it would appear that I have a bunch of java.security.rpm{save,new} files left behind from upgrades over time:
$ find /usr/lib/jvm -name '*.rpm???*'
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre/lib/security/java.security.rpmnew
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre/lib/security/java.security.rpmsave
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.72-1.b15.fc22.x86_64/jre/lib/security/java.security.rpmnew
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/security/java.security.rpmnew
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/security/java.security.rpmsave
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-14.b17.fc22.x86_64/jre/lib/security/java.security.rpmnew
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-14.b17.fc22.x86_64/jre/lib/security/java.security.rpmsave
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-15.b17.fc22.x86_64/jre/lib/security/java.security.rpmnew
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-15.b17.fc22.x86_64/jre/lib/security/java.security.rpmsave
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc22.x86_64/jre/lib/security/java.security.rpmnew
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc22.x86_64/jre/lib/security/java.security.rpmsave

Version-Release number of selected component (if applicable):
java-1.8.0-openjdk-1:1.8.0.71-1.b15.fc22.x86_64 ->
java-1.8.0-openjdk-1:1.8.0.72-1.b15.fc22.x86_64

But based on the symlinks still used, I suspect this is still an issue.

How reproducible:
100%?

Steps to Reproduce:
1. Upgrade java-1.8.0-openjdk from one version to another

Actual results:
See results of find above, as well as this output:
warning: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre/lib/security/java.security saved as /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre/lib/security/java.security.rpmsave

Expected results:
No extra files littered about in multiple version-specific directories.

Additional info:

Comment 1 jiri vanek 2016-02-29 08:49:01 UTC
Hello. AFAIK this is caused by legacy behaviour, when you had custom modified/or by accident buggy from package (it happened in past)  java.security file. IN such an case the java.security.rpmsave was created, and as untracked file carried over updates. And always left behind (as  it is correct behaviour for *.rpmnew files)

If you delete *latest*  rpmnew  file, it should be not recreated in next update.

Ofocurse feel free to remove al legacy /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.*-*.b*.fc*.x86_64

I'm closinig now as this was intentionally fixed longer ago. 

If you remove latest jre/lib/security/java.security.rpmsave and in next udpate this file will be again recreated, please reopen. (in that case I wil lneed content and md5sum of all java.security* files)

(hm.. I'm hoping all the rpmnew/old fixes went to  f22 too, but should)