Skip to content

cargo publish fails with an error #139

Open
@dupgit

Description

Problem description

Hi,

I have two small projects [1] [2] using bash-builtins crate and can not publish them to crates.io as cargo publish command used along with the alias alias cargo="cargo auditable" does throw the following error:

->  cargo publish
    Updating crates.io index
   Packaging createdir-bash-builtin v0.1.0 (/home/dup/Dossiers_Perso/projets/rust-projects/createdir-bash-builtin)
   Verifying createdir-bash-builtin v0.1.0 (/home/dup/Dossiers_Perso/projets/rust-projects/createdir-bash-builtin)
    Updating crates.io index
   Compiling proc-macro2 v1.0.79
…
    Finished dev [unoptimized + debuginfo] target(s) in 4.97s
error: failed to verify package tarball

Caused by:
  Source directory was modified by build.rs during cargo publish. Build scripts should not modify anything outside of OUT_DIR.
  Added: /home/dup/Dossiers_Perso/projets/rust-projects/createdir-bash-builtin/target/package/createdir-bash-builtin-0.1.0/Cargo.lock

  To proceed despite this, pass the `--no-verify` flag.

Thanks to Ed Page remarks in cargo issue 13642 I managed to figure out that running without auditable (\cargo publish) just gets the job done.

[1] cpubind-bash-builtin
[2] createdir

I do not know how to go further to provide more trace or logs or anything that could help. Please let me know how I can help more here (and also if my explanations need more precision)

Versions

-> cargo version -v
cargo 1.77.0 (3fe68eabf 2024-02-29)
release: 1.77.0
commit-hash: 3fe68eabf93cbf3772bbcad09a9206c783e2de3f
commit-date: 2024-02-29
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.5.0-DEV (sys:0.4.70+curl-8.5.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Debian 12 (bookworm) [64-bit]
->  cat ~/.cargo/.crates2.json | jq .installs | grep auditable
  "cargo-auditable 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)": {
      "cargo-auditable"

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions