-
Notifications
You must be signed in to change notification settings - Fork 252
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
[corretto8] - Change download source #3461
Closed
MindNumbing
wants to merge
12
commits into
habitat-sh:master
from
MindNumbing:change_corretto8_source
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f61c874
[corretto8] - Change download source
46ffcac
[corretto8] - Update pkg source
40857e8
[corretto8] - Revert ps1 source change
7970aec
[corretto8] - Change test version
d7f5d9e
[corretto8] - Correct syntax error
5e93fa1
[corretto8] - Change to github source
7b50ebe
[corretto8] - Update windows test
9b88ddf
[corretto8] - Change checksum
b600af8
[corretto8] - Returning to original source change
f27c242
[corretto8] - Change checksum
b0bf6e9
Change testing to use pester
a3c683c
Merge branch 'change_corretto8_source' of https://github.com/MindNumb…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ pkg_description=('Corretto is a build of the Open Java Development Kit (OpenJDK) | |
pkg_license=("GPL-2.0-only") | ||
pkg_upstream_url=https://aws.amazon.com/corretto/ | ||
pkg_maintainer="The Habitat Maintainers <[email protected]>" | ||
pkg_source="https://d2znqt9b1bc64u.cloudfront.net/amazon-corretto-${pkg_version}-linux-x64.tar.gz" | ||
pkg_source="https://d3pxv6yz143wms.cloudfront.net/${pkg_version}/amazon-corretto-${pkg_version}-linux-x64.tar.gz" | ||
pkg_shasum=c19a928687479e1036ff1d6e023975402d2f027d9b3e4d64cfaf0c9f35bf9669 | ||
pkg_filename="corretto-${pkg_version}_linux-x64_bin.tar.gz" | ||
pkg_dirname="amazon-corretto-${pkg_version}-linux-x64" | ||
|
@@ -35,11 +35,11 @@ do_install() { | |
build_line "Setting rpath for all libraries to '${LD_RUN_PATH}'" | ||
|
||
find "${pkg_prefix}"/bin -type f -executable \ | ||
-exec sh -c 'file -i "$1" | grep -q "x-executable; charset=binary"' _ {} \; \ | ||
-exec sh -c 'file -i "$1" | grep -q "-executable; charset=binary"' _ {} \; \ | ||
-exec patchelf --set-interpreter "$(pkg_path_for glibc)/lib/ld-linux-x86-64.so.2" --set-rpath "${LD_RUN_PATH}" {} \; | ||
|
||
find "${pkg_prefix}"/jre/bin -type f -executable \ | ||
-exec sh -c 'file -i "$1" | grep -q "x-executable; charset=binary"' _ {} \; \ | ||
-exec sh -c 'file -i "$1" | grep -q "-executable; charset=binary"' _ {} \; \ | ||
-exec patchelf --set-interpreter "$(pkg_path_for glibc)/lib/ld-linux-x86-64.so.2" --set-rpath "${LD_RUN_PATH}" {} \; | ||
|
||
find "${pkg_prefix}/lib" -type f -name "*.so" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
param ( | ||
[Parameter()] | ||
[string]$PackageIdentifier = $(throw "Fully qualified package identifier must be given as a parameter.") | ||
) | ||
|
||
Describe "The java bin" { | ||
Context "java invoked without options" { | ||
It "Runs and exits successfully" { | ||
hab pkg exec $PackageIdentifier java -version | ||
$? | Should be $true | ||
} | ||
It "Mentions the expected version number on stdout" { | ||
$expected_version = $PackageIdentifier.split("/")[2] | ||
$output = hab pkg exec $PackageIdentifier java -version 2>&1 | ||
$output | Out-String | Should -Match "${expected_version}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Ensure package ident has been passed | ||
param ( | ||
[Parameter()] | ||
[string]$PackageIdentifier = $(throw "Usage: test.ps1 [test_pgk_ident] e.g. test.ps1 core/corretto8/8.212.04.2/20190513101258") | ||
) | ||
|
||
# Ensure Pester is installed | ||
if (-Not (Get-Module -ListAvailable -Name Pester)) { | ||
hab pkg install core/pester | ||
Import-Module "$(hab pkg path core/pester)\module\pester.psd1" | ||
} | ||
|
||
# Install the package | ||
hab pkg install $PackageIdentifier | ||
|
||
# Test the package | ||
$__dir=(Get-Item $PSScriptRoot) | ||
$test_result = Invoke-Pester -PassThru -Script @{ | ||
Path = "$__dir/test.pester.ps1"; | ||
Parameters = @{PackageIdentifier =$PackageIdentifier} | ||
} | ||
Exit $test_result.FailedCount |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there not a non-cloudfront URL we can use? Perhaps one of these?
https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
If not, I think a comment on why we use this cloudfront URL directly might be good.