Bug 1121987 - lost of custom config files on removal (and maybe also downgrade)
Summary: lost of custom config files on removal (and maybe also downgrade)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.7.0-openjdk
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: jiri vanek
QA Contact: Lukas Zachar
URL:
Whiteboard:
Depends On:
Blocks: 1297579 1313485
TreeView+ depends on / blocked
 
Reported: 2014-07-22 09:39 UTC by jiri vanek
Modified: 2016-06-06 14:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-06 14:08:04 UTC


Attachments (Terms of Use)

Description jiri vanek 2014-07-22 09:39:04 UTC
As RPMS do have LUA to copy config files, they have also rm -rf in post
http://pkgs.fedoraproject.org/cgit/java-1.7.0-openjdk.git/tree/java-1.7.0-openjdk.spec?h=f20#n1229

This can be really inconvenient, if there are already some rpmnew/rpmsave files. If those are in this directory, the rm -rf should not be called. 

Originally reported here:
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2014-July/028631.html

The original reporter is requesting also enlarging of the list of config files and is also complaining about downgrade. However downgrade seems to work ...

Comment 2 Severin Gehwolf 2014-07-22 11:12:57 UTC
Also consider the following:

$ rpm -qa | grep java-1.7.0-openjdk
java-1.7.0-openjdk-headless-1:1.7.0.65-2.5.1.2.fc20.x86_64
java-1.7.0-openjdk-devel-1:1.7.0.65-2.5.1.2.fc20.x86_64

$ sudo rpm -e -vvv --nodeps java-1.7.0-openjdk-headless
[...]
D: %postun(java-1.7.0-openjdk-headless-1:1.7.0.65-2.5.1.2.fc20.x86_64): execv(/bin/sh) pid 17074
+ alternatives --remove java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.x86_64/jre/bin/java
+ alternatives --remove jre_openjdk /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.x86_64/jre
+ alternatives --remove jre_1.7.0 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.x86_64/jre
+ alternatives --remove jre_1.7.0_openjdk /usr/lib/jvm/jre-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.x86_64
+ '[' -e /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.x86_64 ']'
+ rm -rf /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.x86_64
+ exit 0
[...]

$ rpm -V java-1.7.0-openjdk-devel
<all-devel-owned-files-missing>

I'm aware that the --nodeps option is fairly dangerous, but it's still somewhat unexpected behavour to do in a package's %postun

Comment 4 jiri vanek 2016-01-13 13:10:25 UTC
As openjdk7 is already using the luascripts, and rm -rf is already removed from 7.3 specfiles, then  ACK as we already have openjdk7 erratum.

Comment 6 jiri vanek 2016-06-06 14:08:04 UTC
This bug should be indirectly fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1296442. If it will persists in 7.3 with all components properly updated, please reposrt new bug.


Note You need to log in before you can comment on or make changes to this bug.