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

oraclejdk: 8.191 -> 8.201; no longer depend on requireFile #54044

Merged
merged 1 commit into from Jan 17, 2019

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Jan 16, 2019

Motivation for this change

No longer use requireFile and accept the license via nixpkgs option

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member Author

Mic92 commented Jan 16, 2019

cc @flokli

}.${stdenv.hostPlatform.system};
};

architecture = architectures.${stdenv.hostPlatform.system};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do admit architecture is a bad name, but adding architectures too makes this more confusing. maybe something like architecturesMap, if we really need it (see below)?

@@ -67,19 +77,23 @@ let

in

assert architectures ? ${stdenv.hostPlatform.system};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just check whether ${stdenv.hostPlatform.system} appears in sha256, instead of also introducing architectures?

url = downloadUrl;
sha256 = sha256.${stdenv.hostPlatform.system};
in fetchurl {
url = "http://download.oracle.com/otn-pub/java/jdk/${productVersion}u${patchVersion}-b${buildVersion}/${releaseToken}/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some documentation explaining what oracle means for all these variables, maybe somewhere on their website?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except releaseToken this is pretty standard. I could have called the latter one also magic string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the urls breaks that would not be much worse then the current state with requireFile. One can still provide a working source in an overlay.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What use case do you have in mind with this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Got it. I am not sure if the release token can different between cpu and psu releases. I am also don't know, where I can even get either of these releases. That's why I put this into an external variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to send a PR afterwards. I am going to merge this as is for now.

@flokli
Copy link
Contributor

flokli commented Jan 16, 2019

Didn't knew you can pass this cookie to download without manually having to click. Can you check whether this also applies to other oracle software, like sqldeveloper and oracle-instantclient?

@Mic92
Copy link
Member Author

Mic92 commented Jan 16, 2019

I got the idea from here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=jdk#n31

also no longer use requireFile and accept the license via nixpkgs option
@Mic92 Mic92 merged commit d3d25f5 into NixOS:master Jan 17, 2019
@Mic92 Mic92 deleted the oraclejdk branch January 17, 2019 07:26
@Mic92
Copy link
Member Author

Mic92 commented Jan 17, 2019

backport:

[detached HEAD 5907c17] oraclejdk: 8.191 -> 8.201
Date: Wed Jan 16 10:36:51 2019 +0000
4 files changed, 62 insertions(+), 40 deletions(-)
rewrite pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix (77%)
rewrite pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix (77%)
Press Enter to continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants