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

[Package Issue Report]: kubescape #1495

Open
jrespeto opened this issue Sep 19, 2023 · 1 comment
Open

[Package Issue Report]: kubescape #1495

jrespeto opened this issue Sep 19, 2023 · 1 comment
Assignees

Comments

@jrespeto
Copy link

jrespeto commented Sep 19, 2023

Are you requesting a new package or reporting an issue on an existing one?

Having an issue with existing package.

If reporting an issue on an existing one, what is the name of the package?
https://www.nixhub.io/packages/kubescape

What changes are you requesting?
Summarize your request. If it's for an existing package that is not
working as expected, provide a concise explanation of what is going wrong.

Failing to install.

 > devbox add kubescape 

Installing package: kubescape@latest.

[1/1] kubescape@latest
error: builder for '/nix/store/hfsx31cr3qsnj4d1wgn3jvvdmifrz6vd-kubescape-2.9.1.drv' failed with exit code 1;
       last 9 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/9dyj8qm667hp7h2z4vxyhck97bjrdy4x-source
       > source root is source
       > patching sources
       > configuring
       > building
       > Building subPackage ./.
       > go: finding module for package github.com/microsoft/go-rustaudit
       > vendor/github.com/anchore/syft/syft/pkg/cataloger/rust/package.go:4:2: cannot query module due to -mod=vendor
       For full logs, run 'nix log /nix/store/hfsx31cr3qsnj4d1wgn3jvvdmifrz6vd-kubescape-2.9.1.drv'.
[1/1] kubescape@latest: Fail

Error: There was an error installing nix packages
source: error running "nix profile install": exit status 1

Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/jetpack-io/devbox/issues

Additional context

> nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 22.6.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.17.0`
 - nixpkgs: `/nix/store/lgcjj6s23v2203zyihsd0j26wh1saj0c-source`


> nix path-info --recursive nixpkgs#kubescape
this derivation will be built:
  /nix/store/hfsx31cr3qsnj4d1wgn3jvvdmifrz6vd-kubescape-2.9.1.drv
error: path '/nix/store/pn5a2mjb85f1panlacykna5g7zcy6alr-kubescape-2.9.1' is not valid


> ls /nix/store/pn5a2mjb85f1panlacykna5g7zcy6alr-kubescape-2.9.1
ls: cannot access '/nix/store/pn5a2mjb85f1panlacykna5g7zcy6alr-kubescape-2.9.1': No such file or directory


> nix build --no-link nixpkgs#kubescape
error: builder for '/nix/store/hfsx31cr3qsnj4d1wgn3jvvdmifrz6vd-kubescape-2.9.1.drv' failed with exit code 1;
       last 9 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/9dyj8qm667hp7h2z4vxyhck97bjrdy4x-source
       > source root is source
       > patching sources
       > configuring
       > building
       > Building subPackage ./.
       > go: finding module for package github.com/microsoft/go-rustaudit
       > vendor/github.com/anchore/syft/syft/pkg/cataloger/rust/package.go:4:2: cannot query module due to -mod=vendor
       For full logs, run 'nix log /nix/store/hfsx31cr3qsnj4d1wgn3jvvdmifrz6vd-kubescape-2.9.1.drv'.


> devbox version
0.5.13


> nix eval --impure --expr 'builtins.currentSystem'
"x86_64-darwin"

Not seeing this issue on my linux system.

Had a friend reproduce the same issue on their mac system.

mkdir test
devbox init 
devbox add kubescape 
@Lagoja
Copy link
Contributor

Lagoja commented Sep 25, 2023

Hey @jrespeto, this looks like an upstream issue related to this: anchore/syft#2026.

I think there may be a Linux binary of this package in the Nix cache, which lets Linux avoid this issue. On macOS, it seems to be building the kubescape package from scratch because Nix does not have a binary cached, which triggers this issue

Unfortunately, the solution probably requires a fix in the Nixpkgs repo, or from the Syft team... I'll look into filing an issue on the Nixpkgs repo

@gcurtis to confirm regarding the state of the cache.

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

No branches or pull requests

2 participants