-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
[2778027179] Upstream Reporter: Pris Nasrat
Upstream description:
- Summary
vendoring breaks with error for docs file `cryptography-44.0.0/cryptography-44.0.0/docs/development/custom-vectors/aes-192-gcm-siv/verify-aes192gcmsiv/Cargo.toml`
```
failed with error: current package believes it's in a workspace when it's not:
```I tried to add a patch that adds exclude to the workspace members but it looks as if the vendor rust behavior of fromager is not aware of workspaces
```
excludes = [
"docs/development/",
]
```
- Analysis
Looking at the source fromager assumes any `Cargo.toml` in the source tree is included and does not honor workspace configuration as it just uses a glob. This seems brittle to projects using workspaces with example code in docs as cryptography have
- Steps to reproduce
Added a branch with the patch and an e2e test demonstrating here
https://github.com/pnasrat/fromager/tree/vendor-cryptography-fails
@dhellmann wondering what the right behavior to do here, I wonder if rust vendoring should be configurable at the top level of fromager maybe via an env variable as different rebuilders may want different behavior from fromager here.
- Logs
<details>
<summary>fromager log</summary>
<br/>```console
cryptography: preparing source for cryptography==44.0.0 from /home/pnasrat/src/fromager/e2e-output/sdists-repo/downloads/cryptography-44.0.0.tar.gz
cryptography: updating vendored rust dependencies in /home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0
['cargo', 'vendor', '--manifest-path=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/docs/development/custom-vectors/aes-192-gcm-siv/verify-aes192gcmsiv/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-cffi/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-keepalive/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-key-parsing/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-openssl/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-x509-verification/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-x509/Cargo.toml', '/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/vendor'] failed with error: current package believes it's in a workspace when it's not:
current: /home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/docs/development/custom-vectors/aes-192-gcm-siv/verify-aes192gcmsiv/Cargo.toml
workspace: /home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/Cargo.tomlthis may be fixable by adding `docs/development/custom-vectors/aes-192-gcm-siv/verify-aes192gcmsiv` to the `workspace.members` array of the manifest located at: /home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.0%| | 0/1 [00:00<?, ?pkg/s]
ERROR: Command '['cargo', 'vendor', '--manifest-path=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/docs/development/custom-vectors/aes-192-gcm-siv/verify-aes192gcmsiv/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-cffi/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-keepalive/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-key-parsing/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-openssl/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-x509-verification/Cargo.toml', '--sync=/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/src/rust/cryptography-x509/Cargo.toml', '/home/pnasrat/src/fromager/e2e-output/work-dir/cryptography-44.0.0/cryptography-44.0.0/vendor']' returned non-zero exit status 101.
+ on_exit
```
</details>
- links to