Bug 9554 - java-1.7.0-openjdk fails to install
Summary: java-1.7.0-openjdk fails to install
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker major
Target Milestone: ---
Assignee: D Morgan
QA Contact:
URL:
Whiteboard: 3beta4
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2013-03-27 11:59 CET by Glen Ogilvie
Modified: 2013-03-28 22:45 CET (History)
6 users (show)

See Also:
Source RPM: java-1.7.0-openjdk-1.7.0.6-2.3.8.2.mga3
CVE:
Status comment:


Attachments
screenshot (51.14 KB, image/png)
2013-03-27 12:00 CET, Glen Ogilvie
Details
bug report (330.65 KB, application/x-gzip)
2013-03-27 12:03 CET, Glen Ogilvie
Details

Description Glen Ogilvie 2013-03-27 11:59:01 CET
Description of problem:
Installation fails with error: "unpack failed for java-openjdk" 

Version-Release number of selected component (if applicable):
Mageia-3-beta4-x86_64-DVD

How reproducible:
Quite easy.  Happened both times I tested.

Steps to Reproduce:
1. Boot installer
2. Choose NZ language
3. Setup enough disk space (10 GB)
4. Select custom package selection
5. Tick all the checkboxes for the package groups, including KDE, GNOME, development, etc. etc.  (but not, individual package selection)
6. Part way through installation, it will fail.

Screenshot and bug report attached.


Reproducible: 

Steps to Reproduce:
Comment 1 Glen Ogilvie 2013-03-27 12:00:34 CET
Created attachment 3667 [details]
screenshot
Comment 2 Glen Ogilvie 2013-03-27 12:03:00 CET
Created attachment 3668 [details]
bug report
Comment 3 Glen Ogilvie 2013-03-27 12:04:03 CET
release blocker, because it's within the installer, and actually quite easy to trigger.

Priority: Normal => release_blocker
Whiteboard: (none) => 3beta4

Comment 4 Manuel Hiebel 2013-03-27 12:09:53 CET
confirmed in the ml

Assignee: bugsquad => ennael1

Comment 5 Manuel Hiebel 2013-03-27 12:37:12 CET
* urpmi error: ERROR: 'unpack' failed for java-1.7.0-openjdk-1.7.0.6-2.3.8.2.mga3.x86_64: 
* java-1.7.0-openjdk not installed, unpacking of archive failed on file /usr/lib/jvm/jre-1.7.0-openjdk.x86_64: cpio: rename failed - Resource temporarily unavailable

maybe something for thierry or dmorgan too

CC: (none) => dmorganec, thierry.vignaud
Hardware: x86_64 => All

Comment 6 Sandro CAZZANIGA 2013-03-27 15:23:03 CET
I just test an iso that Anne pushed on the server, it worked in a VM. If someone can test in a physical machine, it would be great ! 

Thanks

CC: (none) => cazzaniga.sandro

Comment 7 David Walser 2013-03-27 16:02:33 CET
I think this will be fixed when dmorgan syncs this change from Fedora:
http://pkgs.fedoraproject.org/cgit/java-1.7.0-openjdk.git/commit/?id=b4ca7f6419531b155313ebc75fb159621e88d5aa

CC: (none) => luigiwalser

William Kenney 2013-03-27 20:23:38 CET

CC: (none) => wilcal.int

Comment 8 Thierry Vignaud 2013-03-28 06:57:26 CET
This is obviously _NOT_ an installer bug but a package one!
Stop affecting everything to the installer

And it's easily reproducible with urpmi (both 32 & 64bit):
Preparing...                     #############################################
      1/2: liblcms2_2            #############################################
      2/2: java-1.7.0-openjdk    #############################################
error: unpacking of archive failed on file /usr/lib/jvm/jre-1.7.0-openjdk: cpio: rename failed - Is a directory
ERROR: 'unpack' failed for java-1.7.0-openjdk-1.7.0.6-2.3.8.2.mga3.i586: 
error: java-1.7.0-openjdk-1:1.7.0.6-2.3.8.2.mga3.i586: install failed

file being replaced by a directory or viceversa has always needed special handling in %pre

Component: Installer => RPM Packages
Source RPM: (none) => java-1.7.0-openjdk-1.7.0.6-2.3.8.2.mga3

Comment 9 Thierry Vignaud 2013-03-28 07:13:42 CET
Maybe a bug in %post/%postuninstall that plays with /usr/lib/jvm/jre-1.7.0-openjdk

Why the fsck is it done when that location is already packaged (as a symlink)????

Even on initial install, we can see that it packages some files in a directory and a parent directory as a symlink (worse to a subdirectory!!!):
# ls -o T/usr/lib/jvm
total 8
drwxr-xr-x 3 root 4096 Meu  28 07:04 java-1.7.0-openjdk-1.7.0.6/
drwxr-xr-x 3 root 4096 Meu  28 07:04 jre-1.7.0-openjdk/
lrwxrwxrwx 1 root   30 Meu  28 07:04 jre-1.7.0-openjdk;5153dd56 -> java-1.7.0-openjdk-1.7.0.6/jre/

(jre-1.7.0-openjdk containing an empty lib/i386/server/ subdirectory)

Thus after having installed some files in a directory, rpm is asked to replace this directory by a symlink (which is known to be impossible for as long as mdk/mdv/mga existed)

which is related to:
%global jrelnk          jre-%{javaver}-%{origin}.%{_arch}
%global jredir          %{sdkdir}/jre
(...)
  # Install versionless symlinks.
  pushd $RPM_BUILD_ROOT%{_jvmdir}
    ln -sf %{jredir} %{jrelnk}
    ln -sf %{sdkdir} %{sdklnk}
  popd

  pushd $RPM_BUILD_ROOT%{_jvmjardir}
    ln -sf %{sdkdir} %{jrelnk}
    ln -sf %{sdkdir} %{sdklnk}
  popd

Summary: Installation of packages from DVD fails => java-1.7.0-openjdk fails to install

Comment 10 Manuel Hiebel 2013-03-28 12:01:32 CET
>This is obviously _NOT_ an installer bug but a package one!
>Stop affecting everything to the installer

Well, sorry it's hard to know sometimes (for me at least) if the bug is in rpm/in the rpm/or in the installer.
Thanks anyway.

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

Comment 11 Anne Nicolas 2013-03-28 12:03:13 CET
Please test java package. It should fix this issue. Rebuilding isos at the moment with this package

CC: (none) => ennael1

Comment 12 Glen Ogilvie 2013-03-28 22:45:11 CET
Tested installation,  works as expected now.

All packages installed OK. Plus, tested that after installation, java-1.7.0-openjdk was installed OK.

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


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