Skip to content

Commit

Permalink
update(pkg/driverbuilder): add support for Amazon Linux 2 extra kernels
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Zuccala <[email protected]>
Co-authored-by: Leonardo Di Donato <[email protected]>
  • Loading branch information
2 people authored and poiana committed Mar 22, 2021
1 parent 7571d8c commit 2a7fcc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/driverbuilder/builder/amazonlinux.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ func script(c Config, targetType Type) (string, error) {

var reposByTarget = map[Type][]string{
TargetTypeAmazonLinux2: []string{
"2.0",
"latest",
"core/2.0",
"core/latest",
"extras/kernel-5.4/latest",
},
TargetTypeAmazonLinux: []string{
"latest/updates",
Expand Down Expand Up @@ -170,7 +171,7 @@ func fetchAmazonLinuxPackagesURLs(kv kernelrelease.KernelRelease, arch string, t
case TargetTypeAmazonLinux:
baseURL = fmt.Sprintf("http://repo.us-east-1.amazonaws.com/%s", v)
case TargetTypeAmazonLinux2:
baseURL = fmt.Sprintf("%s/2/core/%s/%s", amazonlinux2baseURL, v, arch)
baseURL = fmt.Sprintf("%s/2/%s/%s", amazonlinux2baseURL, v, arch)
default:
return nil, fmt.Errorf("unsupported target")
}
Expand Down

0 comments on commit 2a7fcc9

Please sign in to comment.