commit cbb3bbebfc33f5c034d983fad76d902a9d968a0f Author: tigro Date: Mon Jan 15 21:32:16 2024 +0300 import rust-hickory-proto-0.24.0-1.el9 diff --git a/.rust-hickory-proto.metadata b/.rust-hickory-proto.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/0001-port-to-ring-0.17.patch b/SOURCES/0001-port-to-ring-0.17.patch new file mode 100644 index 0000000..0ca8864 --- /dev/null +++ b/SOURCES/0001-port-to-ring-0.17.patch @@ -0,0 +1,58 @@ +From ee22888d289afda535647081a9836111de997dd7 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 19 Dec 2023 18:09:31 +0100 +Subject: [PATCH] port to ring 0.17 + +--- + src/rr/dnssec/key_format.rs | 5 ++++- + src/rr/dnssec/rdata/tsig.rs | 6 +++--- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/rr/dnssec/key_format.rs b/src/rr/dnssec/key_format.rs +index 6aead61..22a9d85 100644 +--- a/src/rr/dnssec/key_format.rs ++++ b/src/rr/dnssec/key_format.rs +@@ -5,6 +5,8 @@ use openssl::rsa::Rsa; + #[cfg(feature = "openssl")] + use openssl::symm::Cipher; + #[cfg(feature = "ring")] ++use ring::rand::SystemRandom; ++#[cfg(feature = "ring")] + use ring::signature::{ + EcdsaKeyPair, Ed25519KeyPair, ECDSA_P256_SHA256_FIXED_SIGNING, ECDSA_P384_SHA384_FIXED_SIGNING, + }; +@@ -86,12 +88,13 @@ impl KeyFormat { + } + #[cfg(feature = "ring")] + Self::Pkcs8 => { ++ let rng = SystemRandom::new(); + let ring_algorithm = if algorithm == Algorithm::ECDSAP256SHA256 { + &ECDSA_P256_SHA256_FIXED_SIGNING + } else { + &ECDSA_P384_SHA384_FIXED_SIGNING + }; +- let key = EcdsaKeyPair::from_pkcs8(ring_algorithm, bytes)?; ++ let key = EcdsaKeyPair::from_pkcs8(ring_algorithm, bytes, &rng)?; + + Ok(KeyPair::from_ecdsa(key)) + } +diff --git a/src/rr/dnssec/rdata/tsig.rs b/src/rr/dnssec/rdata/tsig.rs +index 1b1ea4d..4c0e3bc 100644 +--- a/src/rr/dnssec/rdata/tsig.rs ++++ b/src/rr/dnssec/rdata/tsig.rs +@@ -635,9 +635,9 @@ impl TsigAlgorithm { + use TsigAlgorithm::*; + + let len = match self { +- HmacSha256 => hmac::HMAC_SHA256.digest_algorithm().output_len, +- HmacSha384 => hmac::HMAC_SHA384.digest_algorithm().output_len, +- HmacSha512 => hmac::HMAC_SHA512.digest_algorithm().output_len, ++ HmacSha256 => hmac::HMAC_SHA256.digest_algorithm().output_len(), ++ HmacSha384 => hmac::HMAC_SHA384.digest_algorithm().output_len(), ++ HmacSha512 => hmac::HMAC_SHA512.digest_algorithm().output_len(), + _ => return Err(ProtoErrorKind::TsigUnsupportedMacAlgorithm(self.clone()).into()), + }; + +-- +2.43.0 + diff --git a/SOURCES/hickory-proto-0.24.0.crate b/SOURCES/hickory-proto-0.24.0.crate new file mode 100644 index 0000000..ef58ade Binary files /dev/null and b/SOURCES/hickory-proto-0.24.0.crate differ diff --git a/SOURCES/hickory-proto-fix-metadata.diff b/SOURCES/hickory-proto-fix-metadata.diff new file mode 100644 index 0000000..4d03b7f --- /dev/null +++ b/SOURCES/hickory-proto-fix-metadata.diff @@ -0,0 +1,34 @@ +--- hickory-proto-0.24.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ hickory-proto-0.24.0/Cargo.toml 2023-12-14T11:35:58.400575+00:00 +@@ -139,7 +139,7 @@ + version = "0.8" + + [dependencies.ring] +-version = "0.16" ++version = "0.17" + features = ["std"] + optional = true + +@@ -222,14 +222,6 @@ + "rt", + "time", + "macros", +-] +- +-[dev-dependencies.tracing-subscriber] +-version = "0.3" +-features = [ +- "std", +- "fmt", +- "env-filter", + ] + + [features] +@@ -295,6 +287,7 @@ + testing = [] + text-parsing = [] + tokio-runtime = [ ++ "tokio/io-util", + "tokio/net", + "tokio/rt", + "tokio/time", diff --git a/SPECS/rust-hickory-proto.spec b/SPECS/rust-hickory-proto.spec new file mode 100644 index 0000000..c0ca463 --- /dev/null +++ b/SPECS/rust-hickory-proto.spec @@ -0,0 +1,524 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + 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 25 +%bcond_without check +%global debug_package %{nil} + +%global crate hickory-proto + +Name: rust-hickory-proto +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-proto +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * bump ring dependency from 0.16 to 0.17 +# * remove unused tracing-subscriber dev-dependency +# * add missing "tokio/io-util" dependency for the "tokio-runtime" feature +Patch: hickory-proto-fix-metadata.diff +# * backported patch to port from ring 0.16 to 0.17: +# https://github.com/hickory-dns/hickory-dns/commit/b0c0566 +Patch: 0001-port-to-ring-0.17.patch + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Hickory DNS is a safe and secure DNS library. This is the foundational +DNS protocol library for all Hickory DNS projects.} + +%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}+backtrace-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+backtrace-devel %{_description} + +This package contains library source intended for building other packages which +use the "backtrace" feature of the "%{crate}" crate. + +%files -n %{name}+backtrace-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+bytes-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bytes-devel %{_description} + +This package contains library source intended for building other packages which +use the "bytes" feature of the "%{crate}" crate. + +%files -n %{name}+bytes-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}+h2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+h2-devel %{_description} + +This package contains library source intended for building other packages which +use the "h2" feature of the "%{crate}" crate. + +%files -n %{name}+h2-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+h3-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+h3-devel %{_description} + +This package contains library source intended for building other packages which +use the "h3" feature of the "%{crate}" crate. + +%files -n %{name}+h3-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+h3-quinn-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+h3-quinn-devel %{_description} + +This package contains library source intended for building other packages which +use the "h3-quinn" feature of the "%{crate}" crate. + +%files -n %{name}+h3-quinn-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+http-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+http-devel %{_description} + +This package contains library source intended for building other packages which +use the "http" feature of the "%{crate}" crate. + +%files -n %{name}+http-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+mdns-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+mdns-devel %{_description} + +This package contains library source intended for building other packages which +use the "mdns" feature of the "%{crate}" crate. + +%files -n %{name}+mdns-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}+native-tls-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+native-tls-devel %{_description} + +This package contains library source intended for building other packages which +use the "native-tls" feature of the "%{crate}" crate. + +%files -n %{name}+native-tls-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+openssl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+openssl-devel %{_description} + +This package contains library source intended for building other packages which +use the "openssl" feature of the "%{crate}" crate. + +%files -n %{name}+openssl-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+quinn-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+quinn-devel %{_description} + +This package contains library source intended for building other packages which +use the "quinn" feature of the "%{crate}" crate. + +%files -n %{name}+quinn-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+ring-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+ring-devel %{_description} + +This package contains library source intended for building other packages which +use the "ring" feature of the "%{crate}" crate. + +%files -n %{name}+ring-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}+rustls-pemfile-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rustls-pemfile-devel %{_description} + +This package contains library source intended for building other packages which +use the "rustls-pemfile" feature of the "%{crate}" crate. + +%files -n %{name}+rustls-pemfile-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}+socket2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+socket2-devel %{_description} + +This package contains library source intended for building other packages which +use the "socket2" feature of the "%{crate}" crate. + +%files -n %{name}+socket2-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}+text-parsing-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+text-parsing-devel %{_description} + +This package contains library source intended for building other packages which +use the "text-parsing" feature of the "%{crate}" crate. + +%files -n %{name}+text-parsing-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 +* Mon Jan 15 2024 Arkady L. Shane - 0.24.0-1 +- Rebuilt for MSVSphere 9.3 + +* Tue Dec 19 2023 Fabio Valentini - 0.24.0-1 +- Initial import (#2254532)