diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c9e0d31 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/hickory-resolver-0.24.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index fcb61ff..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-hickory-resolver - -The rust-hickory-resolver package diff --git a/hickory-resolver-fix-metadata-auto.diff b/hickory-resolver-fix-metadata-auto.diff new file mode 100644 index 0000000..360b733 --- /dev/null +++ b/hickory-resolver-fix-metadata-auto.diff @@ -0,0 +1,26 @@ +--- hickory-resolver-0.24.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ hickory-resolver-0.24.0/Cargo.toml 2023-12-14T11:33:00.958950+00:00 +@@ -219,7 +219,6 @@ + "hickory-proto/serde-config", + ] + system-config = [ +- "ipconfig", + "resolv-conf", + ] + testing = [] +@@ -232,10 +231,6 @@ + "hickory-proto/webpki-roots", + ] + +-[target."cfg(windows)".dependencies.ipconfig] +-version = "0.3.0" +-optional = true +- + [badges.codecov] + branch = "main" + repository = "hickory-dns/hickory-dns" +@@ -243,3 +238,4 @@ + + [badges.maintenance] + status = "actively-developed" ++ diff --git a/hickory-resolver-fix-metadata.diff b/hickory-resolver-fix-metadata.diff new file mode 100644 index 0000000..19e8875 --- /dev/null +++ b/hickory-resolver-fix-metadata.diff @@ -0,0 +1,17 @@ +--- hickory-resolver-0.24.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ hickory-resolver-0.24.0/Cargo.toml 2023-12-14T11:34:01.921165+00:00 +@@ -156,14 +156,6 @@ + "test-util", + ] + +-[dev-dependencies.tracing-subscriber] +-version = "0.3" +-features = [ +- "std", +- "fmt", +- "env-filter", +-] +- + [features] + default = [ + "system-config", diff --git a/rust-hickory-resolver.spec b/rust-hickory-resolver.spec new file mode 100644 index 0000000..c022ba7 --- /dev/null +++ b/rust-hickory-resolver.spec @@ -0,0 +1,368 @@ +# Generated by rust2rpm 25 +# * /etc/hosts and /etc/resolv.conf are not available in mock +# * no internet connectivity in mock +%bcond_with check +%global debug_package %{nil} + +%global crate hickory-resolver + +Name: rust-hickory-resolver +Version: 0.24.0 +Release: %autorelease +Summary: Hickory DNS is a safe and secure DNS library + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/hickory-resolver +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: hickory-resolver-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * remove unused tracing-subscriber dev-dependency +Patch: hickory-resolver-fix-metadata.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Hickory DNS is a safe and secure DNS library. This Resolver library +uses the Client library to perform all DNS queries. The Resolver is +intended to be a high-level library for any DNS record resolution see +Resolver and AsyncResolver for supported resolution types. The Client +can be used for other queries.} + +%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-APACHE +%license %{crate_instdir}/LICENSE-MIT +%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}+dns-over-h3-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-h3-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-h3" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-h3-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-https-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-https-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-https" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-https-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-https-rustls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-https-rustls-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-https-rustls" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-https-rustls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-native-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-native-tls-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-native-tls" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-native-tls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-openssl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-openssl-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-openssl" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-openssl-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-quic-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-quic-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-quic" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-quic-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-rustls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-rustls-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-rustls" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-rustls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dns-over-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dns-over-tls-devel %{_description} + +This package contains library source intended for building other packages which +use the "dns-over-tls" feature of the "%{crate}" crate. + +%files -n %{name}+dns-over-tls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dnssec-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dnssec-devel %{_description} + +This package contains library source intended for building other packages which +use the "dnssec" feature of the "%{crate}" crate. + +%files -n %{name}+dnssec-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dnssec-openssl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dnssec-openssl-devel %{_description} + +This package contains library source intended for building other packages which +use the "dnssec-openssl" feature of the "%{crate}" crate. + +%files -n %{name}+dnssec-openssl-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dnssec-ring-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dnssec-ring-devel %{_description} + +This package contains library source intended for building other packages which +use the "dnssec-ring" feature of the "%{crate}" crate. + +%files -n %{name}+dnssec-ring-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+native-certs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+native-certs-devel %{_description} + +This package contains library source intended for building other packages which +use the "native-certs" feature of the "%{crate}" crate. + +%files -n %{name}+native-certs-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+resolv-conf-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+resolv-conf-devel %{_description} + +This package contains library source intended for building other packages which +use the "resolv-conf" feature of the "%{crate}" crate. + +%files -n %{name}+resolv-conf-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+rustls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rustls-devel %{_description} + +This package contains library source intended for building other packages which +use the "rustls" feature of the "%{crate}" crate. + +%files -n %{name}+rustls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde-config-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-config-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde-config" feature of the "%{crate}" crate. + +%files -n %{name}+serde-config-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+system-config-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+system-config-devel %{_description} + +This package contains library source intended for building other packages which +use the "system-config" feature of the "%{crate}" crate. + +%files -n %{name}+system-config-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+testing-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+testing-devel %{_description} + +This package contains library source intended for building other packages which +use the "testing" feature of the "%{crate}" crate. + +%files -n %{name}+testing-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tokio-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-devel %{_description} + +This package contains library source intended for building other packages which +use the "tokio" feature of the "%{crate}" crate. + +%files -n %{name}+tokio-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tokio-native-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-native-tls-devel %{_description} + +This package contains library source intended for building other packages which +use the "tokio-native-tls" feature of the "%{crate}" crate. + +%files -n %{name}+tokio-native-tls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tokio-openssl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-openssl-devel %{_description} + +This package contains library source intended for building other packages which +use the "tokio-openssl" feature of the "%{crate}" crate. + +%files -n %{name}+tokio-openssl-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tokio-runtime-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-runtime-devel %{_description} + +This package contains library source intended for building other packages which +use the "tokio-runtime" feature of the "%{crate}" crate. + +%files -n %{name}+tokio-runtime-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tokio-rustls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-rustls-devel %{_description} + +This package contains library source intended for building other packages which +use the "tokio-rustls" feature of the "%{crate}" crate. + +%files -n %{name}+tokio-rustls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+webpki-roots-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+webpki-roots-devel %{_description} + +This package contains library source intended for building other packages which +use the "webpki-roots" feature of the "%{crate}" crate. + +%files -n %{name}+webpki-roots-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -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/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..c244da2 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,7 @@ +[tests] +run = ["none"] +comments = [ + "/etc/hosts and /etc/resolv.conf are not available in mock", + "no internet connectivity in mock", +] + diff --git a/sources b/sources new file mode 100644 index 0000000..8c0d818 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (hickory-resolver-0.24.0.crate) = b3bbbb193d4c4e2e32f7a5d59f0c63bd808c31b840b814f771e483613feb70dd31aee17391206e99f6156431b64085edf6cf6d7d7f8bff5b931589ee2ad78c27