Bug 13854 - java-1.7.0-openjdk-headless updates removes /usr/bin/java and doesn't reinstall it
Summary: java-1.7.0-openjdk-headless updates removes /usr/bin/java and doesn't reinsta...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: D Morgan
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2014-08-04 09:42 CEST by Luca Olivetti
Modified: 2015-09-21 15:51 CEST (History)
4 users (show)

See Also:
Source RPM: java-1.7.0-openjdk-1.7.0.65-2.5.1.1.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Luca Olivetti 2014-08-04 09:42:46 CEST
After a recent update my service depending on java didn't start. In fact, after the update, there was no /usr/bin/java.
I looked at the rpm and I see that it has a postuninstall scriptlet that removes the alternatives (as did the previous, upgraded, one)

# rpm -q --scripts java-1.7.0-openjdk-headless
postuninstall scriptlet (using /bin/sh):
  alternatives --remove java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.1.mga4.x86_64/jre/bin/java
  alternatives --remove jre_openjdk /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.1.mga4.x86_64/jre
  alternatives --remove jre_1.7.0 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.1.mga4.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.1.mga4.x86_64

exit 0


but there's no corresponging postinstall scriptlet to install the alternative.
Now, I also checked the package in release (http://ftp.sunet.se/pub/Linux/distributions/mageia/distrib/4/x86_64/media/core/release/java-1.7.0-openjdk-headless-1.7.0.60-2.4.4.2.mga4.x86_64.rpm) and it also is missing the 'alternatives --install', so it's probable that I manually installed the alternative and forgot about it.
The problem is that the update broke what I (probably) did.

Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2014-08-21 11:12:57 CEST

Keywords: (none) => Triaged
Assignee: bugsquad => dmorganec

Comment 1 Luca Olivetti 2014-10-27 09:03:38 CET
Another update, another breakage...
java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.mga4
Comment 2 Luca Olivetti 2015-04-16 09:12:02 CEST
And here it goes another one....
java-1.7.0-openjdk-headless-1.7.0.79-2.5.5.1.mga4.x86_64.rpm
Comment 3 Samuel Verschelde 2015-04-16 15:34:25 CEST
I had the same problem on a server of mine, /usr/bin/java suddenly disappeared after an update.

CC: (none) => stormi
Severity: normal => critical

Samuel Verschelde 2015-04-16 15:36:07 CEST

Summary: java-1.7.0-openjdk-headless doesn't install (alternatives) /usr/bin/java => java-1.7.0-openjdk-headless updates removes /usr/bin/java and doesn't reinstall it

Marja Van Waes 2015-04-16 16:16:51 CEST

CC: (none) => luigiwalser, marja11, oe

Comment 4 David Walser 2015-04-16 16:19:39 CEST
Please report this in RedHat's bugzilla if you haven't yet.
Comment 5 Luca Olivetti 2015-04-16 20:06:57 CEST
I'm using mageia, not redhat?
Comment 6 David Walser 2015-04-17 02:28:50 CEST
We have neither the expertise nor the resources to maintain this package ourselves, so we use Fedora's package for this.  The Mageia 4 one is from Fedora 20 and the Mageia 5 one is from Fedora 22.
Comment 7 Samuel Verschelde 2015-09-21 13:20:29 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Comment 8 David Walser 2015-09-21 15:51:46 CEST
%post headless in Mageia 5 does have an alternatives --install for %{_bindir}/java.  This is OLD.

Status: NEW => RESOLVED
Resolution: (none) => OLD


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