mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

cargo deb command ends up with unknown cargo-deb: Str error log #96

Closed abeydemir23 closed 5 years ago

abeydemir23 commented 5 years ago

Hi, i got some issue with the latest version on Debian 9.9 machine, when i compiled my project with

--release

option then trying to run cargo deb command afterwards it ends up with meaningless error log "cargo-deb: Str" my toml file is like below

[package] name = "test" version = "0.0.2" build = "scripts/build.rs" edition = "2018"

[dependencies] toml = "=0.4.6" serde = "=1.0.70" serde_json = "=1.0" serde_derive ="=1.0.70" log = "=0.4.3" log4rs = "=0.8.1" chrono = "=0.4.5" websocket = "=0.22.0" native-tls = "=0.2" tokio-core = "=0.1" tokio-codec = "=0.1" tokio-io = "=0.1.12" tokio-tls = "=0.2" futures = "=0.1.25" reqwest = "=0.9.1" getset = "=0.0.6" failure = "=0.1.5" bytes = "=0.4.10" crossbeam = "=0.4.1" rusoto_s3 = {version = "=0.35.0"} rusoto_core = {version = "=0.35.0", default-features=false} rusoto_credential ="=0.14.0" http = "=0.1.13" uuid = { version = "=0.7.1", features = ["v4", "serde"]} regex = "=1.0.5" queue = "=0.3.0" protobuf = "=2.0.2" metrics = "=0.2.3" lazy_static = "=1.2.0" tokio = "=0.1.19" hyper = "=0.12.16" hyper-proxy = "=0.5.0" scheduled-executor = "=0.4.0" rand = "=0.6.4" url = "=1.7.2" parking_lot = "=0.7.1" byteorder = "=1.3.1" webbrowser = "=0.5.1"

[build-dependencies] fs_extra = "=1.1.0"

[profile.release] opt-level = "z" debug = false rpath = false lto = true debug-assertions = false codegen-units = 16 panic = 'unwind' incremental = false overflow-checks = false

abeydemir23 commented 5 years ago

I've resolved this issue by adding authors information into package section.

kornelski commented 5 years ago

With your Cargo.toml, I'm getting:

cargo deb
warning: description field is missing in Cargo.toml
warning: license field is missing in Cargo.toml
cargo-deb: Package must have a copyright or authors

The Str is from CargoDebError::Str(message) enum, but it shouldn't get printed like that. I've added custom display impl for it just in case. Try the latest version.

abeydemir23 commented 5 years ago

But I tried with the version 1.17.0 and printing is same.

kornelski commented 5 years ago

I can't reproduce it by replacing Cargo.toml with the one you provided in cargo-deb's example dir.

Can you provide a ZIP with the project and exact commands you're running?

abeydemir23 commented 5 years ago

image

kornelski commented 5 years ago
can't reproduce
abeydemir23 commented 5 years ago

Ok it seems we have got this fixed in 1.18.0 but note that this version is not released 1A777DDD-BAC0-4E11-AB2D-44598D07832C

kornelski commented 5 years ago

I need to update tags manually, so I sometimes forget. Check crates.io or https://lib.rs/crates/cargo-deb for the latest release.