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

packages: add sources for kubernetes-1.31 and ecr-credential-provider-1.31 #117

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/ecr-credential-provider-1.31/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ package-name = "ecr-credential-provider-1.31"
releases-url = "https://github.com/kubernetes/cloud-provider-aws/releases"

[[package.metadata.build-package.external-files]]
url = "https://codeload.github.com/kubernetes/cloud-provider-aws/tar.gz/v1.30.3"
path = "cloud-provider-aws-1.30.3.tar.gz"
sha512 = "aa351cd531e452dd4ccead4a591a9161a25737ada93a7317c5c181c3d4fe55b279e94b686d8c03665ebee01191129a52b01c9dabfba7075c5e9bde52e6a341c8"
url = "https://codeload.github.com/kubernetes/cloud-provider-aws/tar.gz/v1.31.0"
path = "cloud-provider-aws-1.31.0.tar.gz"
sha512 = "962973013984a802853311182e1cfd1eabb1bcdf164000f607aeb2631ac98a0b4fd5ba1f7aff08491040979bd2321bcd5debd567c9aa74889b09d7599bc4dcfd"
bundle-modules = [ "go" ]

[build-dependencies]
Expand Down
7 changes: 5 additions & 2 deletions packages/ecr-credential-provider-1.31/clarify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[clarify."sigs.k8s.io/yaml"]
expression = "MIT AND BSD-3-Clause"
expression = "MIT AND BSD-3-Clause AND Apache-2.0"
license-files = [
{ path = "LICENSE", hash = 0xcdf3ae00 },
{ path = "LICENSE", hash = 0x617d80bc },
Copy link
Contributor

Choose a reason for hiding this comment

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

The license expression looks wrong, since this license indicates Apache-2.0.

I'd expect this clarify.toml entry to match the one under k8s-1.31. Are they using different versions of the module?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both kubernetes-1.31 and cloud-provider-aws upgrade https://github.com/kubernetes-sigs/yaml from 1.3 to 1.4:

kubernetes-sigs/yaml v1.4 adds goyaml.v2 and goyaml.v3 subdirectories, which is the cause for this license change.

The license expression looks wrong, since this license indicates Apache-2.0.

Good catch, looks like they switched to MIT and Apache-2.0 from just MIT between the 1.3 and 1.4 releases

I'd expect this clarify.toml entry to match the one under k8s-1.31.

I made these changes mostly to appease build failures, and making that change caused failures, which I concluded were due to different usages of the underlying library. Would the correct approach here to be include all these licenses in %files ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as

Are they using different versions of the module?

I see in go.mod for both projects, they're using both goyaml.v2 and goyaml.v3

(the sigs yaml package forks gopkg.in/goyaml v2 and v3 to the goyaml.v2 and goyaml.v3 subdirectories, respectively)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kubernetes has sigs.k8s.io/yaml vendored, which IIUC is how bottlerocket-license-tool picks up its forks of gopkg.in/goyaml

For cloud-provider-aws, go mod vendor results in no goyaml.v3 vendored:

$ ls vendor/sigs.k8s.io/yaml
code-of-conduct.md  CONTRIBUTING.md  fields.go  goyaml.v2  LICENSE  OWNERS  README.md  RELEASE.md  SECURITY_CONTACTS  yaml.go  yaml_go110.go

So it must not be using it

{ path = "goyaml.v2/LICENSE", hash = 0xe569d630 },
{ path = "goyaml.v2/LICENSE.libyaml", hash = 0xa2e4ce3 },
{ path = "goyaml.v2/NOTICE", hash = 0x49bceeb9 },
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%global gorepo cloud-provider-aws
%global goimport %{goproject}/%{gorepo}

%global gover 1.30.3
%global gover 1.31.0
%global rpmver %{gover}

%global _dwz_low_mem_die_limit 0
Expand Down
4 changes: 2 additions & 2 deletions packages/kubernetes-1.31/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ path = "../packages.rs"
package-name = "kubernetes-1.31"

[[package.metadata.build-package.external-files]]
url = "https://distro.eks.amazonaws.com/kubernetes-1-30/releases/9/artifacts/kubernetes/v1.30.1/kubernetes-src.tar.gz"
sha512 = "314c4cdc3705fa6ded932bb2780e63b78040e75fe7e284aa2cbff93eac177d40eae5dfbe90b7482b682ed97b9d4723b55e4a1d598ec6424df77543e00e7fd6a2"
url = "https://distro.eks.amazonaws.com/kubernetes-1-31/releases/2/artifacts/kubernetes/v1.31.0/kubernetes-src.tar.gz"
sha512 = "d27f975200294a24b902ed7bf64fb3cb93d67ed5edb03e47929fe08cb851d90404102d369671f7be268212978f78d317d6954c4938603993d464182ebcf1891c"

# RPM BuildRequires
[build-dependencies]
Expand Down
9 changes: 7 additions & 2 deletions packages/kubernetes-1.31/clarify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ license-files = [
]

[clarify."sigs.k8s.io/yaml"]
expression = "MIT AND BSD-3-Clause"
expression = "MIT AND BSD-3-Clause AND Apache-2.0"
license-files = [
{ path = "LICENSE", hash = 0xcdf3ae00 },
{ path = "LICENSE", hash = 0x617d80bc },
{ path = "goyaml.v2/LICENSE", hash = 0xe569d630 },
{ path = "goyaml.v2/LICENSE.libyaml", hash = 0xa2e4ce3 },
{ path = "goyaml.v2/NOTICE", hash = 0x49bceeb9 },
{ path = "goyaml.v3/LICENSE", hash = 0x176b1f44 },
{ path = "goyaml.v3/NOTICE", hash = 0x49bceeb9 },
]

[clarify."honnef.co/go/tools"]
Expand Down
2 changes: 1 addition & 1 deletion packages/kubernetes-1.31/kubernetes-1.31.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%global gorepo kubernetes
%global goimport %{goproject}/%{gorepo}

%global gover 1.30.1
%global gover 1.31.0
%global rpmver %{gover}

%global _dwz_low_mem_die_limit 0
Expand Down