Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenJDK cannot be installed because of strange file collision #1535

Closed
peti opened this issue Jan 17, 2014 · 5 comments
Closed

OpenJDK cannot be installed because of strange file collision #1535

peti opened this issue Jan 17, 2014 · 5 comments
Labels
6.topic: java Including JDK, tooling, other languages, other VMs

Comments

@peti
Copy link
Member

peti commented Jan 17, 2014

I get the following collision:

$ nix-env -p /tmp/test -iA jdk
installing `openjdk-7u40b43'
building path(s) `/nix/store/x0d1s2qa0iy71n3v1l5wllhw27cvdcnz-user-environment'
collision between `/nix/store/n96llzbwnffn7ycwq0brm0kbbg3wjk46-openjdk-7u40b43/bin/java' and `/nix/store/fj90f1gagz2iyipbmzc78rz3aas88zaj-openjdk-7u40b43-jre/bin/java'; use `nix-env --set-flag priority NUMBER PKGNAME' to change the priority of one of the conflicting packages
builder for `/nix/store/lr6rwgsy5pkcl19cx8kw1lk3jz3lckys-user-environment.drv' failed with exit code 2
error: build of `/nix/store/lr6rwgsy5pkcl19cx8kw1lk3jz3lckys-user-environment.drv' failed

What I don't understand is why this collision is happening in the first place? I'm installing this package into an empty profile!

@vcunat
Copy link
Member

vcunat commented Jan 17, 2014

That's a multiple-output problem. The derivation creates two of them, both containing the file. When installing into user profiles, currently the semantics is that all outputs are installed, so this creates the collision.

@bluescreen303
Copy link
Contributor

Vladimír Čunát [email protected] writes:

That's a multiple-output problem. The derivation creates two of them,
both containing the file. When installing into user profiles,
currently the semantics is that all outputs are installed, so this
creates the collision.

What's the reason for these semantics?
I would expect only 'out' to get installed by default.


Reply to this email directly or view it on GitHub:
#1535 (comment)

@vcunat
Copy link
Member

vcunat commented Jan 17, 2014

Well, as for build inputs, we normally want all to be available, because you need include, lib and possibly others. @edolstra should know details. It hasn't been used much yet, so I suppose we still have to figure out how to do these best (and have the most usual setup as the default).

@vcunat
Copy link
Member

vcunat commented Jan 17, 2014

What I haven't figured out in these cases: why installing openjdk.out attempts to install both .out and .jre.

@jonocodes
Copy link

I am getting this same error message. Fresh install of Nix 16. Could it have regressed?

This happens when I run
nix-env -iA nixos.openjdk

but not when I dun
nix-env -iA nixos.jdk

Though those both say they point to openjdk-8

r-ryantm pushed a commit to r-ryantm/nixpkgs that referenced this issue Jul 7, 2018
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/singularity/versions.

<details><summary>Version release notes (from GitHub)</summary>
Greetings Singularity containerizers!

This release contains fixes for a _high severity_ security issue affecting Singularity 2.3.0 through 2.5.1 on kernels that support overlay file systems (CVE-2018-12021). A malicious user with network access to the host system (e.g. ssh) could exploit this vulnerability to access sensitive information on disk and bypass directory image restrictions like those preventing the root file system from being mounted into the container.

Singularity 2.5.2 should be installed immediately, and all previous versions of Singularity should be removed. The vulnerability addressed in this release affects kernels that support overlayfs. If you are unable to upgrade immediately, you should set `enable overlay = no` in `singularity.conf`.

In addition, this release contains a large number of bug fixes.  Details follow:

## [Security related fixes](https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-12021)
 - Removed the option to use overlay images with `singularity mount`.  This
   flaw could allow a malicious user accessing the host system to access
   sensitive information when coupled with persistent ext3 overlay.
 - Fixed a race condition that might allow a malicious user to bypass directory
   image restrictions, like mounting the host root filesystem as a container
   image

## Bug fixes
 - Fix an error in malloc allocation NixOS#1620
 - Honor debug flag when pulling from docker hub NixOS#1556
 - Fix a bug with passwd abort NixOS#1580
 - Allow user to override singularity.conf "mount home = no" with --home option
   NixOS#1496
 - Improve debugging output NixOS#1535
 - Fix some bugs in bind mounting NixOS#1525
 - Define PR_(S|G)ET_NO_NEW_PRIVS in user space so that these features will
   work with kernels that implement them (like Cray systems) NixOS#1506
 - Create /dev/fd and standard streams symlinks in /dev when using minimal dev
   mount or when specifying -c/-C/--contain option NixOS#1420
 - Fixed * expansion during app runscript creation NixOS#1486

As always, please report any bugs to:
https://github.com/singularityware/singularity/issues/new</details>

These checks were done:

- built on NixOS
- /nix/store/3igwiqi311c18w13y5r7zrgpcnzylg9l-singularity-2.5.2/bin/singularity passed the binary check.
- Warning: no invocation of /nix/store/3igwiqi311c18w13y5r7zrgpcnzylg9l-singularity-2.5.2/bin/run-singularity had a zero exit code or showed the expected version
- 1 of 2 passed binary check by having a zero exit code.
- 0 of 2 passed binary check by having the new version present in output.
- found 2.5.2 with grep in /nix/store/3igwiqi311c18w13y5r7zrgpcnzylg9l-singularity-2.5.2
- directory tree listing: https://gist.github.com/ed6db09ad43a19c6abf2d35d15ef489c
- du listing: https://gist.github.com/9bd23f4d6ee86a9eb2ba7ec5c986741d
@tomodachi94 tomodachi94 added the 6.topic: java Including JDK, tooling, other languages, other VMs label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: java Including JDK, tooling, other languages, other VMs
Projects
None yet
Development

No branches or pull requests

5 participants