Compare commits

..

No commits in common. 'epel9' and 'i10ce' have entirely different histories.
epel9 ... i10ce

18
.gitignore vendored

@ -1,18 +0,0 @@
/cargo-c-0.5.1.crate
/cargo-c-0.5.2.crate
/cargo-c-0.5.3.crate
/cargo-c-0.6.2.crate
/cargo-c-0.6.3.crate
/cargo-c-0.6.4.crate
/cargo-c-0.6.5.crate
/cargo-c-0.6.7.crate
/cargo-c-0.6.8.crate
/cargo-c-0.6.10.crate
/cargo-c-0.6.13.crate
/cargo-c-0.6.18+cargo-0.49.crate
/cargo-c-0.7.3+cargo-0.51.crate
/cargo-c-0.9.2+cargo-0.55.crate
/cargo-c-0.9.7+cargo-0.59.crate
/cargo-c-0.9.12+cargo-0.64.crate
/cargo-c-0.9.19+cargo-0.70.crate
/cargo-c-0.9.27+cargo-0.74.0.crate

@ -1,574 +0,0 @@
From d50a978efb8e538db90dad7128cc74f19ec2bc8d Mon Sep 17 00:00:00 2001
From: kpcyrd <git@rxv.cc>
Date: Sat, 11 Nov 2023 19:45:00 +0100
Subject: [PATCH 1/2] Add version_suffix_components setting
---
README.md | 4 ++
src/build.rs | 102 +++++++++++++++++++++++++++++++++++++++++-
src/install.rs | 25 ++++++-----
src/lib.rs | 15 -------
src/pkg_config_gen.rs | 1 +
src/target.rs | 7 ++-
6 files changed, 122 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index e53231b..5a651d0 100644
--- a/README.md
+++ b/README.md
@@ -135,6 +135,10 @@ version = "1.2.3"
install_subdir = "gstreamer-1.0"
# Used to disable versioning links when installing the dynamic library
versioning = false
+# Instead of using semver, select a fixed number of version components for your SONAME version suffix:
+# Setting this to 1 with a version of 0.0.0 allows a suffix of `.so.0`
+# Setting this to 3 always includes the full version in the SONAME (indicate any update is ABI breaking)
+#version_suffix_components = 2
# Add `-Cpanic=abort` to the RUSTFLAGS automatically, it may be useful in case
# something might panic in the crates used by the library.
rustflags = "-Cpanic=abort"
diff --git a/src/build.rs b/src/build.rs
index 4e8279f..45c4538 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -14,6 +14,7 @@ use cargo::util::command_prelude::{ArgMatches, ArgMatchesExt, CompileMode, Profi
use cargo::util::interning::InternedString;
use cargo::{CliResult, Config};
+use anyhow::Context as _;
use cargo_util::paths::{copy, create, create_dir_all, open, read, read_bytes, write};
use semver::Version;
@@ -406,10 +407,33 @@ pub struct LibraryCApiConfig {
pub version: Version,
pub install_subdir: Option<String>,
pub versioning: bool,
+ pub version_suffix_components: Option<u8>,
pub import_library: bool,
pub rustflags: Vec<String>,
}
+impl LibraryCApiConfig {
+ pub fn sover(&self) -> anyhow::Result<String> {
+ let major = self.version.major;
+ let minor = self.version.minor;
+ let patch = self.version.patch;
+
+ let sover = match self.version_suffix_components {
+ None => match (major, minor, patch) {
+ (0, 0, patch) => format!("0.0.{patch}"),
+ (0, minor, _) => format!("0.{minor}"),
+ (major, _, _) => format!("{major}"),
+ },
+ Some(1) => format!("{major}"),
+ Some(2) => format!("{major}.{minor}"),
+ Some(3) => format!("{major}.{minor}.{patch}"),
+ Some(num) => anyhow::bail!("Unexpected number of suffix components: {num}"),
+ };
+
+ Ok(sover)
+ }
+}
+
#[derive(Debug, Default)]
pub struct InstallCApiConfig {
pub include: Vec<InstallTarget>,
@@ -619,6 +643,7 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
let mut version = pkg.version().clone();
let mut install_subdir = None;
let mut versioning = true;
+ let mut version_suffix_components = None;
let mut import_library = true;
let mut rustflags = Vec::new();
@@ -636,6 +661,17 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
.get("versioning")
.and_then(|v| v.as_bool())
.unwrap_or(true);
+
+ if let Some(value) = library.get("version_suffix_components") {
+ let value = value.as_integer().with_context(|| {
+ format!("Value for `version_suffix_components` is not an integer: {value:?}")
+ })?;
+ let value = value
+ .try_into()
+ .with_context(|| format!("Value is too large: {value:?}"))?;
+ version_suffix_components = Some(value);
+ }
+
import_library = library
.get("import_library")
.and_then(|v| v.as_bool())
@@ -655,6 +691,7 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
version,
install_subdir,
versioning,
+ version_suffix_components,
import_library,
rustflags,
};
@@ -886,7 +923,7 @@ fn compile_with_exec(
let pkg_rustflags = &capi_config.library.rustflags;
let mut leaf_args: Vec<String> = rustc_target
- .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)
+ .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)?
.into_iter()
.flat_map(|l| vec!["-C".to_string(), format!("link-arg={l}")])
.collect();
@@ -1246,3 +1283,66 @@ pub fn ctest(
ops::run_tests(ws, &ops, &test_args)
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use semver::Version;
+
+ fn make_test_library_config(version: &str) -> LibraryCApiConfig {
+ LibraryCApiConfig {
+ name: "example".to_string(),
+ version: Version::parse(version).unwrap(),
+ install_subdir: None,
+ versioning: true,
+ version_suffix_components: None,
+ import_library: true,
+ rustflags: vec![],
+ }
+ }
+
+ #[test]
+ pub fn test_semver_zero_zero_zero() {
+ let library = make_test_library_config("0.0.0");
+ let sover = library.sover().unwrap();
+ assert_eq!(sover, "0.0.0");
+ }
+
+ #[test]
+ pub fn test_semver_zero_one_zero() {
+ let library = make_test_library_config("0.1.0");
+ let sover = library.sover().unwrap();
+ assert_eq!(sover, "0.1");
+ }
+
+ #[test]
+ pub fn test_semver_one_zero_zero() {
+ let library = make_test_library_config("1.0.0");
+ let sover = library.sover().unwrap();
+ assert_eq!(sover, "1");
+ }
+
+ #[test]
+ pub fn text_one_fixed_zero_zero_zero() {
+ let mut library = make_test_library_config("0.0.0");
+ library.version_suffix_components = Some(1);
+ let sover = library.sover().unwrap();
+ assert_eq!(sover, "0");
+ }
+
+ #[test]
+ pub fn text_two_fixed_one_zero_zero() {
+ let mut library = make_test_library_config("1.0.0");
+ library.version_suffix_components = Some(2);
+ let sover = library.sover().unwrap();
+ assert_eq!(sover, "1.0");
+ }
+
+ #[test]
+ pub fn text_three_fixed_one_zero_zero() {
+ let mut library = make_test_library_config("1.0.0");
+ library.version_suffix_components = Some(3);
+ let sover = library.sover().unwrap();
+ assert_eq!(sover, "1.0.0");
+ }
+}
diff --git a/src/install.rs b/src/install.rs
index d0725b9..9ad4104 100644
--- a/src/install.rs
+++ b/src/install.rs
@@ -3,11 +3,9 @@ use std::path::{Component, Path, PathBuf};
use cargo::core::Workspace;
use cargo_util::paths::{copy, create_dir_all};
-use semver::Version;
use crate::build::*;
use crate::build_targets::BuildTargets;
-use crate::VersionExt;
fn append_to_destdir(destdir: Option<&Path>, path: &Path) -> PathBuf {
if let Some(destdir) = destdir {
@@ -107,8 +105,13 @@ pub(crate) struct UnixLibNames {
}
impl UnixLibNames {
- pub(crate) fn new(lib_type: LibType, lib_name: &str, lib_version: &Version) -> Option<Self> {
- let main_version = lib_version.main_version();
+ pub(crate) fn new(
+ lib_type: LibType,
+ library: &LibraryCApiConfig,
+ ) -> anyhow::Result<Option<Self>> {
+ let lib_name = &library.name;
+ let lib_version = &library.version;
+ let main_version = library.sover()?;
match lib_type {
LibType::So => {
@@ -119,11 +122,11 @@ impl UnixLibNames {
);
let lib_with_main_ver = format!("{}.{}", lib, main_version);
- Some(Self {
+ Ok(Some(Self {
canonical: lib,
with_main_ver: lib_with_main_ver,
with_full_ver: lib_with_full_ver,
- })
+ }))
}
LibType::Dylib => {
let lib = format!("lib{lib_name}.dylib");
@@ -133,13 +136,13 @@ impl UnixLibNames {
"lib{}.{}.{}.{}.dylib",
lib_name, lib_version.major, lib_version.minor, lib_version.patch
);
- Some(Self {
+ Ok(Some(Self {
canonical: lib,
with_main_ver: lib_with_main_ver,
with_full_ver: lib_with_full_ver,
- })
+ }))
}
- LibType::Windows => None,
+ LibType::Windows => Ok(None),
}
}
@@ -236,12 +239,10 @@ pub fn cinstall(ws: &Workspace, packages: &[CPackage]) -> anyhow::Result<()> {
if let Some(ref shared_lib) = build_targets.shared_lib {
ws.config().shell().status("Installing", "shared library")?;
- let lib_name = &capi_config.library.name;
let lib_type = LibType::from_build_targets(build_targets);
match lib_type {
LibType::So | LibType::Dylib => {
- let lib = UnixLibNames::new(lib_type, lib_name, &capi_config.library.version)
- .unwrap();
+ let lib = UnixLibNames::new(lib_type, &capi_config.library)?.unwrap();
lib.install(capi_config, shared_lib, &install_path_lib)?;
}
LibType::Windows => {
diff --git a/src/lib.rs b/src/lib.rs
index 66d7b9b..c63a297 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,18 +5,3 @@ pub mod config;
pub mod install;
pub mod pkg_config_gen;
pub mod target;
-
-trait VersionExt {
- /// build the main version string
- fn main_version(&self) -> String;
-}
-
-impl VersionExt for semver::Version {
- fn main_version(&self) -> String {
- match (self.major, self.minor, self.patch) {
- (0, 0, patch) => format!("0.0.{patch}"),
- (0, minor, _) => format!("0.{minor}"),
- (major, _, _) => format!("{major}"),
- }
- }
-}
diff --git a/src/pkg_config_gen.rs b/src/pkg_config_gen.rs
index 91d8b4d..c825d95 100644
--- a/src/pkg_config_gen.rs
+++ b/src/pkg_config_gen.rs
@@ -298,6 +298,7 @@ mod test {
version: Version::parse("0.1.0").unwrap(),
install_subdir: None,
versioning: true,
+ version_suffix_components: None,
import_library: true,
rustflags: Vec::default(),
},
diff --git a/src/target.rs b/src/target.rs
index 136cf54..7ada1be 100644
--- a/src/target.rs
+++ b/src/target.rs
@@ -3,7 +3,6 @@ use std::path::Path;
use anyhow::*;
use crate::build::CApiConfig;
-use crate::VersionExt;
/// Split a target string to its components
///
@@ -57,7 +56,7 @@ impl Target {
capi_config: &CApiConfig,
libdir: &Path,
target_dir: &Path,
- ) -> Vec<String> {
+ ) -> anyhow::Result<Vec<String>> {
let mut lines = Vec::new();
let lib_name = &capi_config.library.name;
@@ -70,7 +69,7 @@ impl Target {
let os = &self.os;
let env = &self.env;
- let sover = version.main_version();
+ let sover = capi_config.library.sover()?;
if os == "android" {
lines.push(format!("-Wl,-soname,lib{lib_name}.so"));
@@ -112,6 +111,6 @@ impl Target {
// See: https://github.com/emscripten-core/emscripten/blob/3.1.39/emcc.py#L92-L94
// else if os == "emscripten"
- lines
+ Ok(lines)
}
}
From 3f9e452500b37204efce3091c9d0fd9366393e5b Mon Sep 17 00:00:00 2001
From: kpcyrd <git@rxv.cc>
Date: Sun, 12 Nov 2023 14:47:40 +0100
Subject: [PATCH 2/2] Refactor to validate version_suffix_components while
parsing
---
src/build.rs | 54 ++++++++++++++++++++++++++++----------------------
src/install.rs | 19 ++++++++----------
src/target.rs | 6 +++---
3 files changed, 41 insertions(+), 38 deletions(-)
diff --git a/src/build.rs b/src/build.rs
index 45c4538..33b77f2 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -401,36 +401,40 @@ pub struct PkgConfigCApiConfig {
pub strip_include_path_components: usize,
}
+#[derive(Debug)]
+pub enum VersionSuffix {
+ Major,
+ MajorMinor,
+ MajorMinorPatch,
+}
+
#[derive(Debug)]
pub struct LibraryCApiConfig {
pub name: String,
pub version: Version,
pub install_subdir: Option<String>,
pub versioning: bool,
- pub version_suffix_components: Option<u8>,
+ pub version_suffix_components: Option<VersionSuffix>,
pub import_library: bool,
pub rustflags: Vec<String>,
}
impl LibraryCApiConfig {
- pub fn sover(&self) -> anyhow::Result<String> {
+ pub fn sover(&self) -> String {
let major = self.version.major;
let minor = self.version.minor;
let patch = self.version.patch;
- let sover = match self.version_suffix_components {
+ match self.version_suffix_components {
None => match (major, minor, patch) {
(0, 0, patch) => format!("0.0.{patch}"),
(0, minor, _) => format!("0.{minor}"),
(major, _, _) => format!("{major}"),
},
- Some(1) => format!("{major}"),
- Some(2) => format!("{major}.{minor}"),
- Some(3) => format!("{major}.{minor}.{patch}"),
- Some(num) => anyhow::bail!("Unexpected number of suffix components: {num}"),
- };
-
- Ok(sover)
+ Some(VersionSuffix::Major) => format!("{major}"),
+ Some(VersionSuffix::MajorMinor) => format!("{major}.{minor}"),
+ Some(VersionSuffix::MajorMinorPatch) => format!("{major}.{minor}.{patch}"),
+ }
}
}
@@ -666,10 +670,12 @@ fn load_manifest_capi_config(pkg: &Package) -> anyhow::Result<CApiConfig> {
let value = value.as_integer().with_context(|| {
format!("Value for `version_suffix_components` is not an integer: {value:?}")
})?;
- let value = value
- .try_into()
- .with_context(|| format!("Value is too large: {value:?}"))?;
- version_suffix_components = Some(value);
+ version_suffix_components = Some(match value {
+ 1 => VersionSuffix::Major,
+ 2 => VersionSuffix::MajorMinor,
+ 3 => VersionSuffix::MajorMinorPatch,
+ _ => anyhow::bail!("Out of range value for version suffix components: {value}"),
+ });
}
import_library = library
@@ -923,7 +929,7 @@ fn compile_with_exec(
let pkg_rustflags = &capi_config.library.rustflags;
let mut leaf_args: Vec<String> = rustc_target
- .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)?
+ .shared_object_link_args(&capi_config, &install_paths.libdir, root_output)
.into_iter()
.flat_map(|l| vec!["-C".to_string(), format!("link-arg={l}")])
.collect();
@@ -1304,45 +1310,45 @@ mod tests {
#[test]
pub fn test_semver_zero_zero_zero() {
let library = make_test_library_config("0.0.0");
- let sover = library.sover().unwrap();
+ let sover = library.sover();
assert_eq!(sover, "0.0.0");
}
#[test]
pub fn test_semver_zero_one_zero() {
let library = make_test_library_config("0.1.0");
- let sover = library.sover().unwrap();
+ let sover = library.sover();
assert_eq!(sover, "0.1");
}
#[test]
pub fn test_semver_one_zero_zero() {
let library = make_test_library_config("1.0.0");
- let sover = library.sover().unwrap();
+ let sover = library.sover();
assert_eq!(sover, "1");
}
#[test]
pub fn text_one_fixed_zero_zero_zero() {
let mut library = make_test_library_config("0.0.0");
- library.version_suffix_components = Some(1);
- let sover = library.sover().unwrap();
+ library.version_suffix_components = Some(VersionSuffix::Major);
+ let sover = library.sover();
assert_eq!(sover, "0");
}
#[test]
pub fn text_two_fixed_one_zero_zero() {
let mut library = make_test_library_config("1.0.0");
- library.version_suffix_components = Some(2);
- let sover = library.sover().unwrap();
+ library.version_suffix_components = Some(VersionSuffix::MajorMinor);
+ let sover = library.sover();
assert_eq!(sover, "1.0");
}
#[test]
pub fn text_three_fixed_one_zero_zero() {
let mut library = make_test_library_config("1.0.0");
- library.version_suffix_components = Some(3);
- let sover = library.sover().unwrap();
+ library.version_suffix_components = Some(VersionSuffix::MajorMinorPatch);
+ let sover = library.sover();
assert_eq!(sover, "1.0.0");
}
}
diff --git a/src/install.rs b/src/install.rs
index 9ad4104..c087e74 100644
--- a/src/install.rs
+++ b/src/install.rs
@@ -105,13 +105,10 @@ pub(crate) struct UnixLibNames {
}
impl UnixLibNames {
- pub(crate) fn new(
- lib_type: LibType,
- library: &LibraryCApiConfig,
- ) -> anyhow::Result<Option<Self>> {
+ pub(crate) fn new(lib_type: LibType, library: &LibraryCApiConfig) -> Option<Self> {
let lib_name = &library.name;
let lib_version = &library.version;
- let main_version = library.sover()?;
+ let main_version = library.sover();
match lib_type {
LibType::So => {
@@ -122,11 +119,11 @@ impl UnixLibNames {
);
let lib_with_main_ver = format!("{}.{}", lib, main_version);
- Ok(Some(Self {
+ Some(Self {
canonical: lib,
with_main_ver: lib_with_main_ver,
with_full_ver: lib_with_full_ver,
- }))
+ })
}
LibType::Dylib => {
let lib = format!("lib{lib_name}.dylib");
@@ -136,13 +133,13 @@ impl UnixLibNames {
"lib{}.{}.{}.{}.dylib",
lib_name, lib_version.major, lib_version.minor, lib_version.patch
);
- Ok(Some(Self {
+ Some(Self {
canonical: lib,
with_main_ver: lib_with_main_ver,
with_full_ver: lib_with_full_ver,
- }))
+ })
}
- LibType::Windows => Ok(None),
+ LibType::Windows => None,
}
}
@@ -242,7 +239,7 @@ pub fn cinstall(ws: &Workspace, packages: &[CPackage]) -> anyhow::Result<()> {
let lib_type = LibType::from_build_targets(build_targets);
match lib_type {
LibType::So | LibType::Dylib => {
- let lib = UnixLibNames::new(lib_type, &capi_config.library)?.unwrap();
+ let lib = UnixLibNames::new(lib_type, &capi_config.library).unwrap();
lib.install(capi_config, shared_lib, &install_path_lib)?;
}
LibType::Windows => {
diff --git a/src/target.rs b/src/target.rs
index 7ada1be..1cbdef4 100644
--- a/src/target.rs
+++ b/src/target.rs
@@ -56,7 +56,7 @@ impl Target {
capi_config: &CApiConfig,
libdir: &Path,
target_dir: &Path,
- ) -> anyhow::Result<Vec<String>> {
+ ) -> Vec<String> {
let mut lines = Vec::new();
let lib_name = &capi_config.library.name;
@@ -69,7 +69,7 @@ impl Target {
let os = &self.os;
let env = &self.env;
- let sover = capi_config.library.sover()?;
+ let sover = capi_config.library.sover();
if os == "android" {
lines.push(format!("-Wl,-soname,lib{lib_name}.so"));
@@ -111,6 +111,6 @@ impl Target {
// See: https://github.com/emscripten-core/emscripten/blob/3.1.39/emcc.py#L92-L94
// else if os == "emscripten"
- Ok(lines)
+ lines
}
}

@ -1,11 +1,11 @@
--- cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 2023-11-11T11:12:03.277637+00:00
--- cargo-c-0.9.32+cargo-0.79.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ cargo-c-0.9.32+cargo-0.79.0/Cargo.toml 2024-09-30T11:53:29.865318+00:00
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.70"
rust-version = "1.76"
name = "cargo-c"
-version = "0.9.27+cargo-0.74.0"
+version = "0.9.27"
-version = "0.9.32+cargo-0.79.0"
+version = "0.9.32"
authors = ["Luca Barbato <lu_zero@gentoo.org>"]
description = "Helper program to build and install c-like libraries"
readme = "README.md"
@ -14,7 +14,7 @@
vendored-openssl = ["cargo/vendored-openssl"]
-[target."cfg(windows)".dependencies.windows-sys]
-version = "0.48"
-version = "0.52"
-features = [
- "Win32_Foundation",
- "Win32_Storage_FileSystem",

@ -0,0 +1,18 @@
--- cargo-c-0.9.32+cargo-0.79.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ cargo-c-0.9.32+cargo-0.79.0/Cargo.toml 2024-09-30T11:53:40.150369+00:00
@@ -76,7 +76,7 @@
version = "0.3"
[dependencies.itertools]
-version = "0.12"
+version = "0.13"
[dependencies.log]
version = "0.4"
@@ -101,6 +101,5 @@
[features]
default = []
-vendored-openssl = ["cargo/vendored-openssl"]

@ -0,0 +1,292 @@
## START: Set by rpmautospec
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 3;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by rust2rpm 26
%bcond_without check
# reduce debuginfo verbosity to work around OOM problems on 32-bit arches
%ifarch %{ix86}
%global rustflags_debuginfo 0
%endif
%global crate cargo-c
%global upstream_version 0.9.32+cargo-0.79.0
Name: rust-cargo-c
Version: 0.9.32
Release: %autorelease
Summary: Helper program to build and install c-like libraries
License: MIT
URL: https://crates.io/crates/cargo-c
Source: %{crates_source %{crate} %{upstream_version}}
Source1: macros.cargo-c
# Automatically generated patch to strip dependencies and normalize metadata
Patch: cargo-c-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * bump itertools dependency from 0.12 to 0.13
# * remove feature for building / statically linking vendored OpenSSL sources
Patch: cargo-c-fix-metadata.diff
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Helper program to build and install c-like libraries.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-3-Clause
# ISC
# MIT
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR BSD-1-Clause
# MIT OR Apache-2.0 OR Zlib
# MIT OR Zlib OR Apache-2.0
# MPL-2.0
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License: MIT AND Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND ISC AND MPL-2.0 AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/cargo-capi
%{_bindir}/cargo-cbuild
%{_bindir}/cargo-cinstall
%{_bindir}/cargo-ctest
%{_rpmmacrodir}/macros.cargo-c
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{upstream_version} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} %{SOURCE1}
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Thu Dec 19 2024 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 0.9.32-3
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Mon Sep 30 2024 Fabio Valentini <decathorpe@gmail.com> - 0.9.32-3
- Bump itertools dependency from 0.12 to 0.13
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.32-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu May 23 2024 Fabio Valentini <decathorpe@gmail.com> - 0.9.32-1
- Update to version 0.9.32+cargo-0.79.0; Fixes RHBZ#2256180
* Mon May 13 2024 Fabio Valentini <decathorpe@gmail.com> - 0.9.31-1
- Update to version cargo-c-0.9.31+cargo-0.78.0
* Tue Feb 13 2024 Fabio Valentini <decathorpe@gmail.com> - 0.9.28-4
- Attempt to work around OOM problems on i686
* Tue Feb 13 2024 Fabio Valentini <decathorpe@gmail.com> - 0.9.28-3
- Rebuild for CVE-2024-24575 and CVE-2024-24577 in libgit2
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.28-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Dec 04 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.28-1
- Update to version 0.9.28+cargo-0.75.0; Fixes RHBZ#2250815
* Sat Nov 11 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.27-1
- Update to version 0.9.27+cargo-0.74.0; Fixes RHBZ#2130183
* Sat Sep 30 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.19-5
- Adapt cargo-c macros to support the same flags as the cargo counterparts
* Tue Aug 22 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.19-4
- Fix license tag for binary subpackage to exclude invalid MPL-2.0+
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.19-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 07 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.19-2
- Add RPM macros for cargo-cbuild and cargo-cinstall
* Fri Jun 16 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.19-1
- Update to version 0.9.19+cargo-0.70
* Wed May 03 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.12-4
- Rebuild for openssl crate >= v0.10.48 (RUSTSEC-2023-{0022,0023,0024})
* Sat Jan 28 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.12-3
- Rebuild for CVE-2022-24765 and CVE-2022-29187 in libgit2
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Aug 25 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.12-1
- Update to version 0.9.12+cargo-0.64; Fixes RHBZ#2058792
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Feb 22 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.7-4
- Use the new way to set debuginfo level during build
* Tue Feb 22 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.7-3
- More workarounds for rust-packaging 21 issues
* Tue Feb 22 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.7-2
- Work around RUSTFLAGS no longer being set in .cargo/config
* Mon Feb 21 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.7-1
- Update to version 0.9.7+cargo-0.59; Fixes RHBZ#2005017
* Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.2-8
- Rebuild with package notes
* Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.2-7
- Rebuild with package notes
* Tue Jan 25 2022 Fabio Valentini <decathorpe@gmail.com> - 0.9.2-6
- Rebuild with thread_local 1.1.4 for RUSTSEC-2022-0006
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Nov 28 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.9.2-4
- Rebuild for libgit2 1.3.x
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.9.2-3
- Rebuilt with OpenSSL 3.0.0
* Thu Aug 26 2021 Fabio Valentini <decathorpe@gmail.com> - 0.9.2-2
- Drop debuginfo verbosity in an attempt to fix armv7hl OOM problems
* Thu Aug 26 2021 Fabio Valentini <decathorpe@gmail.com> - 0.9.2-1
- Update to version 0.9.2+cargo-0.55; Fixes RHBZ#1945899
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Mar 29 2021 Fabio Valentini <decathorpe@gmail.com> - 0.7.3-2
- Update to version 0.7.3+cargo-0.51.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Dec 29 14:21:55 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.18-2
- Rebuild against libgit2 1.1.x
* Sun Nov 29 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.18-1
- Update to version 0.6.18+cargo-0.49.
- Fixes RHBZ#1887871
* Mon Sep 21 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.13-1
- Update to version 0.6.13.
* Sun Aug 23 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.10-2
- Rebuild
* Wed Jul 29 2020 Josh Stone <jistone@redhat.com> - 0.6.10-1
- Update to 0.6.10
* Fri Jul 10 2020 Josh Stone <jistone@redhat.com> - 0.6.8-1
- Update to 0.6.8
* Wed Jun 10 2020 Josh Stone <jistone@redhat.com> - 0.6.7-1
- Update to 0.6.7
* Tue May 05 2020 Josh Stone <jistone@redhat.com> - 0.6.5-1
- Update to 0.6.5
* Fri Apr 24 2020 Josh Stone <jistone@redhat.com> - 0.6.4-1
- Update to 0.6.4
* Thu Apr 23 2020 Josh Stone <jistone@redhat.com> - 0.6.3-2
- Bump to cargo 0.44
* Fri Apr 17 2020 Josh Stone <jistone@redhat.com> - 0.6.3-1
- Update to 0.6.3
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.2-2
- Rebuild for libgit2 1.0.0
* Wed Apr 01 2020 Josh Stone <jistone@redhat.com> - 0.6.2-1
- Update to 0.6.2
* Tue Mar 17 2020 Josh Stone <jistone@redhat.com> - 0.5.3-1
- Update to 0.5.3
* Wed Feb 26 2020 Josh Stone <jistone@redhat.com> - 0.5.2-4
- Update cbindgen to 0.13
* Tue Feb 11 13:41:07 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.5.2-3
- Update pretty_env_logger to 0.4
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 23 2020 Josh Stone <jistone@redhat.com> - 0.5.2-1
- Update to 0.5.2
* Thu Dec 19 19:13:31 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.1-1
- Initial package
## END: Generated by rpmautospec

@ -1,9 +0,0 @@
--- cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ cargo-c-0.9.27+cargo-0.74.0/Cargo.toml 2023-11-11T11:12:10.373660+00:00
@@ -101,6 +101,5 @@
[features]
default = []
-vendored-openssl = ["cargo/vendored-openssl"]

@ -1,66 +0,0 @@
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Mar 29 2021 Fabio Valentini <decathorpe@gmail.com> - 0.7.3-2
- Update to version 0.7.3+cargo-0.51.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Dec 29 14:21:55 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.18-2
- Rebuild against libgit2 1.1.x
* Sun Nov 29 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.18-1
- Update to version 0.6.18+cargo-0.49.
- Fixes RHBZ#1887871
* Mon Sep 21 2020 Fabio Valentini <decathorpe@gmail.com> - 0.6.13-1
- Update to version 0.6.13.
* Sun Aug 23 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.10-2
- Rebuild
* Wed Jul 29 2020 Josh Stone <jistone@redhat.com> - 0.6.10-1
- Update to 0.6.10
* Fri Jul 10 2020 Josh Stone <jistone@redhat.com> - 0.6.8-1
- Update to 0.6.8
* Wed Jun 10 2020 Josh Stone <jistone@redhat.com> - 0.6.7-1
- Update to 0.6.7
* Tue May 05 2020 Josh Stone <jistone@redhat.com> - 0.6.5-1
- Update to 0.6.5
* Fri Apr 24 2020 Josh Stone <jistone@redhat.com> - 0.6.4-1
- Update to 0.6.4
* Thu Apr 23 2020 Josh Stone <jistone@redhat.com> - 0.6.3-2
- Bump to cargo 0.44
* Fri Apr 17 2020 Josh Stone <jistone@redhat.com> - 0.6.3-1
- Update to 0.6.3
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.6.2-2
- Rebuild for libgit2 1.0.0
* Wed Apr 01 2020 Josh Stone <jistone@redhat.com> - 0.6.2-1
- Update to 0.6.2
* Tue Mar 17 2020 Josh Stone <jistone@redhat.com> - 0.5.3-1
- Update to 0.5.3
* Wed Feb 26 2020 Josh Stone <jistone@redhat.com> - 0.5.2-4
- Update cbindgen to 0.13
* Tue Feb 11 13:41:07 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.5.2-3
- Update pretty_env_logger to 0.4
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 23 2020 Josh Stone <jistone@redhat.com> - 0.5.2-1
- Update to 0.5.2
* Thu Dec 19 19:13:31 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.1-1
- Initial package

@ -1,121 +0,0 @@
# Generated by rust2rpm 25
%bcond_without check
# reduce debuginfo verbosity to work around OOM problems on 32-bit arches
%global rustflags_debuginfo 1
%global crate cargo-c
%global upstream_version 0.9.27+cargo-0.74.0
Name: rust-cargo-c
Version: 0.9.27
Release: %autorelease
Summary: Helper program to build and install c-like libraries
License: MIT
URL: https://crates.io/crates/cargo-c
Source0: %{crates_source %{crate} %{upstream_version}}
Source1: macros.cargo-c
# Automatically generated patch to strip dependencies and normalize metadata
Patch: cargo-c-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * drop +cargo version suffix from crate version
# * remove vendored OpenSSL feature
Patch: cargo-c-fix-metadata.diff
# * backport upstream change: Add version_suffix_components setting
# This is required to work around breaking changes in the default
# behaviour of cargo-c v0.9.26 and newer (using "0.<minor>" as the soname
# for versions < 1.0.0 instead of just "0").
Patch: https://github.com/lu-zero/cargo-c/pull/352.patch
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Helper program to build and install c-like libraries.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-3-Clause
# ISC
# MIT
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR BSD-1-Clause
# MIT OR Apache-2.0 OR Zlib
# MIT OR Zlib OR Apache-2.0
# MPL-2.0
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License: MIT AND Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND ISC AND MPL-2.0 AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/cargo-capi
%{_bindir}/cargo-cbuild
%{_bindir}/cargo-cinstall
%{_bindir}/cargo-ctest
%{_rpmmacrodir}/macros.cargo-c
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{upstream_version} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} %{SOURCE1}
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog

@ -1 +0,0 @@
SHA512 (cargo-c-0.9.27+cargo-0.74.0.crate) = 013cbe2161d74c1d2a43f19b8621e9bfb68d8d533b383e98403826df83a15e685f96c28b34eac832295a6800710e54f67d524e2a5eacef56074b5ba0ce8f6f01
Loading…
Cancel
Save