https://github.com/gentoo/cargo-ebuild/pull/36 This patch makes cargo-ebuild compatible with current gentoo QA and fixes an outstanding rustsec issue https://rustsec.org/advisories/RUSTSEC-2023-0003 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ dependencies = [ [[package]] name = "cargo-ebuild" -version = "0.5.4" +version = "0.5.4-r1" dependencies = [ "anyhow", "cargo-lock", @@ -462,9 +462,9 @@ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libgit2-sys" -version = "0.14.0+1.5.0" +version = "0.14.2+1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a00859c70c8a4f7218e6d1cc32875c4b55f6799445b842b0d8ed5e4c3d959b" +checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4" dependencies = [ "cc", "libc", --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-ebuild" -version = "0.5.4" +version = "0.5.4-r1" authors = ["Doug Goldstein "] license = "MIT/Apache-2.0" edition = "2018" --- a/src/base.tera +++ b/src/base.tera @@ -19,7 +19,7 @@ DESCRIPTION={%- block description -%}"{{ description | trim }}"{%- endblock %} # Double check the homepage as the cargo_metadata crate # does not provide this value so instead repository is used HOMEPAGE={%- block homepage -%}"{{ homepage }}"{%- endblock %} -SRC_URI={%- block src_uri -%}{% raw -%}"$(cargo_crate_uris)"{%- endraw %}{%- endblock %} +SRC_URI={%- block src_uri -%}{% raw -%}"${CARGO_CRATE_URIS}"{%- endraw %}{%- endblock %} # License set may be more restrictive as OR is not respected # use cargo-license for a more accurate license picture --- a/src/lib.rs +++ b/src/lib.rs @@ -94,7 +94,7 @@ pub fn gen_ebuild_data( manifest_path: Option<&Path> if let Some(src) = &pkg.source { // Check if the crate is available at crates.io if src.is_crates_io() { - crates.push(format!("\t{}-{}\n", pkg.name, pkg.version)); + crates.push(format!("\t{}@{}\n", pkg.name, pkg.version)); } } }