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

Impossible to disable cargo-auditable #5

Closed
alexandrevicenzi opened this issue Aug 24, 2023 · 5 comments
Closed

Impossible to disable cargo-auditable #5

alexandrevicenzi opened this issue Aug 24, 2023 · 5 comments

Comments

@alexandrevicenzi
Copy link

Hi,

There is a known issue with cargo-auditable that affects certain projects.

[  164s] thread 'main' panicked at 'cargo metadata failure: error: Package `wasmtime-wasi v12.0.0 (/home/abuild/rpmbuild/BUILD/wasmtime-12.0.0/crates/wasi)` does not have feature `cap-std`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

There's no workaround for the issue above AFAIK, and it is not possible to disable cargo-auditable if using cargo macros.

Setting RUSTC_WRAPPER to any value causes the build to fail, this is the only variable that enables or disables cargo-auditable.

[    6s] + export RUSTC_WRAPPER=rustc
[    6s] + RUSTC_WRAPPER=rustc
[    6s] + unset LIBSSH2_SYS_USE_PKG_CONFIG
[    6s] + '[' -z rustc ']'
[    6s] + CARGO_FEATURE_VENDORED=1
[    6s] + RUSTFLAGS=' -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2 -C incremental=false'
[    6s] + /usr/bin/cargo build -j16 --offline --release -p wasmtime-c-api
[    6s] error: failed to run `rustc` to learn about target-specific information
[    6s] 
[    6s] Caused by:
[    6s]   process didn't exit successfully: `rustc rustc - --crate-name ___ --print=file-names -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2 -C incremental=false --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)

It would be nice to have a way to disable it, for now, the only solution is to call cargo directly and ignore the macros.

@Firstyear
Copy link
Collaborator

I'm starting to find the rpm macros getting hard to modify/edit, and I can't find any documentation on how to write them at all. There are just no references or supports for this kind of thing. I'm not even sure I can put this kind of logic or work around in the macro, so I don't know how to really fix this ... :(

@alexandrevicenzi
Copy link
Author

It seems that this is the best documentation you can find, but lacks more examples and it is rather basic.

@Firstyear
Copy link
Collaborator

As an alternative, would a second build macro that skips auditable work?

@alexandrevicenzi
Copy link
Author

I found a workaround for the original issue, see this.

Another macro would work also.

@Firstyear
Copy link
Collaborator

I think the workaround you have here is the better option, since that means we still keep cargo-auditable enabled which is important for SUSE product security. So lets close this for now.

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

No branches or pull requests

2 participants