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

"make cosign" fails with missing ',' in argument list and malformed module path "embed" #1853

Closed
nealmcb opened this issue May 7, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nealmcb
Copy link
Contributor

nealmcb commented May 7, 2022

Description

Building cosign using the Makefile fails. E.g. following the directions for including piv-tool support, with either go1.17 or go1.18, fails like this. (Using the default make target also fails.)

$ make cosign-pivkey-pkcs11key
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/uuid.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-sockaddr/route_info_android.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-sockaddr/ifaddrs.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
./third_party/VENDOR-LICENSE/github.com/letsencrypt/boulder/core/proto/core.pb.go
./third_party/VENDOR-LICENSE/github.com/letsencrypt/boulder/sa/proto/sa.pb.go
./third_party/VENDOR-LICENSE/github.com/letsencrypt/boulder/sa/proto/sa_grpc.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/uuid.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/vault/sdk/logical/plugin.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/vault/sdk/logical/identity.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing_grpc.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-sockaddr/route_info_android.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-sockaddr/ifaddrs.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/internal/plugin/grpc_broker.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/internal/plugin/grpc_controller.pb.go
./third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/internal/plugin/grpc_stdio.pb.go
./pkg/cosign/git/gitlab/gitlab.go:119:58: missing ',' in argument list
./pkg/cosign/git/github/github.go:131:58: missing ',' in argument list
CGO_ENABLED=1 go build -trimpath -tags=pivkey,pkcs11key -ldflags "-buildid= -X sigs.k8s.io/release-utils/version.gitVersion=v1.8.0-26-g67c2be0-dirty -X sigs.k8s.io/release-utils/version.gitCommit=67c2be01d52e92048674915b30a6b7fb2424995a -X sigs.k8s.io/release-utils/version.gitTreeState="dirty" -X sigs.k8s.io/release-utils/version.buildDate=2022-05-07T00:28:30Z" -o cosign ./cmd/cosign
build github.com/sigstore/cosign/cmd/cosign: cannot load embed: malformed module path "embed": missing dot in first path element
make: *** [Makefile:92: cosign-pivkey-pkcs11key] Error 1

A workaround is the other step documented in TOKENS.md, but it requires a cd command first:

$ cd cmd/cosign
$ go build -tags=pivkey
@nealmcb nealmcb added the bug Something isn't working label May 7, 2022
nealmcb added a commit to nealmcb/cosign that referenced this issue May 7, 2022
[cosign/TOKENS\.md at main · sigstore/cosign](https://github.com/sigstore/cosign/blob/main/TOKENS.md) says:

... *run the* `cosign generate-key` *command* ...

Which yields this error:

```
$ cosign generate-key
Error: unknown command "generate-key" for "cosign"
```

The documentation is simply missing the `piv-tool` sub-command.

Resolves: sigstore#1849

Also fix make target for custom build: was make cosign-pivkey
now make cosign-pivkey-pkcs11key.
Drop old, brittle reference to line in Makefile.

Also note need to `cd cmd/cosign`.

See also: sigstore#1853

Signed-off-by: Neal McBurnett <neal@mcburnett.org>
nealmcb added a commit to nealmcb/cosign that referenced this issue May 7, 2022
[cosign/TOKENS\.md at main · sigstore/cosign](https://github.com/sigstore/cosign/blob/main/TOKENS.md) says:

... *run the* `cosign generate-key` *command* ...

Which yields this error:

```
$ cosign generate-key
Error: unknown command "generate-key" for "cosign"
```

The documentation is simply missing the `piv-tool` sub-command.

Resolves: sigstore#1849

Also fix make target for custom build: was make cosign-pivkey
now make cosign-pivkey-pkcs11key.
Drop old, brittle reference to line in Makefile.

Also make `go build` also work the same way, from the root directory.

See also: sigstore#1853

Signed-off-by: Neal McBurnett <neal@mcburnett.org>
dlorenc pushed a commit that referenced this issue May 7, 2022
[cosign/TOKENS\.md at main · sigstore/cosign](https://github.com/sigstore/cosign/blob/main/TOKENS.md) says:

... *run the* `cosign generate-key` *command* ...

Which yields this error:

```
$ cosign generate-key
Error: unknown command "generate-key" for "cosign"
```

The documentation is simply missing the `piv-tool` sub-command.

Resolves: #1849

Also fix make target for custom build: was make cosign-pivkey
now make cosign-pivkey-pkcs11key.
Drop old, brittle reference to line in Makefile.

Also make `go build` also work the same way, from the root directory.

See also: #1853

Signed-off-by: Neal McBurnett <neal@mcburnett.org>
@dlorenc
Copy link
Member

dlorenc commented May 9, 2022

I think this was fixed in #1850!

@dlorenc dlorenc closed this as completed May 9, 2022
@nealmcb
Copy link
Contributor Author

nealmcb commented May 9, 2022

This was not fixed in #1850 - that only has documentation changes.

We discussed this on slack, and the Makefile still fails for me, but worked for someone else. So I'm not sure what the story is.

pxp928 pushed a commit to pxp928/cosign that referenced this issue May 12, 2022
[cosign/TOKENS\.md at main · sigstore/cosign](https://github.com/sigstore/cosign/blob/main/TOKENS.md) says:

... *run the* `cosign generate-key` *command* ...

Which yields this error:

```
$ cosign generate-key
Error: unknown command "generate-key" for "cosign"
```

The documentation is simply missing the `piv-tool` sub-command.

Resolves: sigstore#1849

Also fix make target for custom build: was make cosign-pivkey
now make cosign-pivkey-pkcs11key.
Drop old, brittle reference to line in Makefile.

Also make `go build` also work the same way, from the root directory.

See also: sigstore#1853

Signed-off-by: Neal McBurnett <neal@mcburnett.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants