diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..257fe29 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/tracing-log-0.1.3.crate diff --git a/README.md b/README.md deleted file mode 100644 index ed1e958..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-tracing-log - -The rust-tracing-log package diff --git a/rust-tracing-log.spec b/rust-tracing-log.spec new file mode 100644 index 0000000..8a64699 --- /dev/null +++ b/rust-tracing-log.spec @@ -0,0 +1,124 @@ +# Generated by rust2rpm 21 +%bcond_without check +%global debug_package %{nil} + +%global crate tracing-log + +Name: rust-%{crate} +Version: 0.1.3 +Release: %autorelease +Summary: Provides compatibility between tracing and the log crate + +# Upstream license specification: MIT +License: MIT +URL: https://crates.io/crates/tracing-log +Source: %{crates_source} +# Initial patched metadata +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +# * drop optional interest-cache feature (lru is not packaged yet) +Patch0: tracing-log-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Provides compatibility between `tracing` and the `log` crate.} + +%description %{_description} + +%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}/CHANGELOG.md +%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 + +%package -n %{name}+env_logger-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+env_logger-devel %{_description} + +This package contains library source intended for building other packages which +use the "env_logger" feature of the "%{crate}" crate. + +%files -n %{name}+env_logger-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+log-tracer-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+log-tracer-devel %{_description} + +This package contains library source intended for building other packages which +use the "log-tracer" feature of the "%{crate}" crate. + +%files -n %{name}+log-tracer-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+trace-logger-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+trace-logger-devel %{_description} + +This package contains library source intended for building other packages which +use the "trace-logger" feature of the "%{crate}" crate. + +%files -n %{name}+trace-logger-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..c6b7370 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (tracing-log-0.1.3.crate) = 440cb8ddd5823cd0d86b68bbbf29f6886d5800f95d0aaa9477f98f188013fd009c2b9bc982b17efd08abd071bc70ca511f988b9db8c21d8e3d323fb67614d289 diff --git a/tracing-log-fix-metadata.diff b/tracing-log-fix-metadata.diff new file mode 100644 index 0000000..baddc1c --- /dev/null +++ b/tracing-log-fix-metadata.diff @@ -0,0 +1,41 @@ +--- tracing-log-0.1.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ tracing-log-0.1.3/Cargo.toml 2022-05-04T11:20:37.327869+00:00 +@@ -43,10 +43,6 @@ + name = "logging" + harness = false + +-[dependencies.ahash] +-version = "0.7.4" +-optional = true +- + [dependencies.env_logger] + version = "0.7" + optional = true +@@ -57,16 +53,8 @@ + [dependencies.log] + version = "0.4" + +-[dependencies.lru] +-version = "0.7.0" +-optional = true +- + [dependencies.tracing-core] + version = "0.1.17" +- +-[dev-dependencies.criterion] +-version = "0.3" +-default_features = false + + [dev-dependencies.tracing] + version = "0.1" +@@ -77,10 +65,6 @@ + "trace-logger", + "std", + ] +-interest-cache = [ +- "lru", +- "ahash", +-] + log-tracer = [] + std = ["log/std"] + trace-logger = []