From 226daffc5a4ec5e5ce39bc95a823f6f5adb25e5e Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 12 Apr 2021 21:45:59 +0200 Subject: [PATCH] initial import (#1948154) --- .gitignore | 4 + README.md | 3 - rust-sequoia-openpgp.spec | 163 ++++++++++++++++++++++++++++++ sequoia-openpgp-fix-metadata.diff | 43 ++++++++ sources | 1 + 5 files changed, 211 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-sequoia-openpgp.spec create mode 100644 sequoia-openpgp-fix-metadata.diff create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..732c2c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/sequoia-openpgp-1.1.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index f6e17a6..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-sequoia-openpgp - -The rust-sequoia-openpgp package diff --git a/rust-sequoia-openpgp.spec b/rust-sequoia-openpgp.spec new file mode 100644 index 0000000..eda5883 --- /dev/null +++ b/rust-sequoia-openpgp.spec @@ -0,0 +1,163 @@ +# Generated by rust2rpm 16 +%bcond_without check +%global debug_package %{nil} + +%global crate sequoia-openpgp + +Name: rust-%{crate} +Version: 1.1.0 +Release: 1%{?dist} +Summary: OpenPGP data types and associated machinery + +# Upstream license specification: GPL-2.0-or-later +# https://gitlab.com/sequoia-pgp/sequoia/-/issues/708 +License: GPLv2+ +URL: https://crates.io/crates/sequoia-openpgp +Source: %{crates_source} +# Initial patched metadata +# * drop Windows-specific features and dependencies +# * drop features for vendoring nettle +Patch0: sequoia-openpgp-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +OpenPGP data types and associated machinery.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%doc README.md NEWS +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+bzip2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bzip2-devel %{_description} + +This package contains library source intended for building other packages +which use "bzip2" feature of "%{crate}" crate. + +%files -n %{name}+bzip2-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+compression-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+compression-devel %{_description} + +This package contains library source intended for building other packages +which use "compression" feature of "%{crate}" crate. + +%files -n %{name}+compression-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+compression-bzip2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+compression-bzip2-devel %{_description} + +This package contains library source intended for building other packages +which use "compression-bzip2" feature of "%{crate}" crate. + +%files -n %{name}+compression-bzip2-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+compression-deflate-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+compression-deflate-devel %{_description} + +This package contains library source intended for building other packages +which use "compression-deflate" feature of "%{crate}" crate. + +%files -n %{name}+compression-deflate-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+crypto-nettle-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crypto-nettle-devel %{_description} + +This package contains library source intended for building other packages +which use "crypto-nettle" feature of "%{crate}" crate. + +%files -n %{name}+crypto-nettle-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+flate2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+flate2-devel %{_description} + +This package contains library source intended for building other packages +which use "flate2" feature of "%{crate}" crate. + +%files -n %{name}+flate2-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+nettle-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+nettle-devel %{_description} + +This package contains library source intended for building other packages +which use "nettle" feature of "%{crate}" crate. + +%files -n %{name}+nettle-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 +* Thu Apr 08 2021 Fabio Valentini - 1.1.0-1 +- Initial package diff --git a/sequoia-openpgp-fix-metadata.diff b/sequoia-openpgp-fix-metadata.diff new file mode 100644 index 0000000..d743fd9 --- /dev/null +++ b/sequoia-openpgp-fix-metadata.diff @@ -0,0 +1,43 @@ +--- sequoia-openpgp-1.1.0/Cargo.toml 2021-03-05T14:30:52+00:00 ++++ sequoia-openpgp-1.1.0/Cargo.toml 2021-03-31T10:13:04.415369+00:00 +@@ -105,39 +105,14 @@ + compression = ["compression-deflate", "compression-bzip2"] + compression-bzip2 = ["bzip2", "buffered-reader/compression-bzip2"] + compression-deflate = ["flate2", "buffered-reader/compression-deflate"] +-crypto-cng = ["winapi", "win-crypto-ng", "ed25519-dalek", "num-bigint-dig"] + crypto-nettle = ["nettle"] + default = ["compression", "crypto-nettle"] +-vendored = ["vendored-nettle"] +-vendored-nettle = ["nettle/vendored"] ++ + [target."cfg(all(target_arch = \"wasm32\", target_os = \"unknown\"))".dependencies.chrono] + version = "0.4.10" + features = ["std"] + default-features = false +-[target."cfg(windows)".dependencies.eax] +-version = "0.3" + +-[target."cfg(windows)".dependencies.ed25519-dalek] +-version = "1" +-features = ["rand", "u64_backend"] +-optional = true +-default-features = false +- +-[target."cfg(windows)".dependencies.num-bigint-dig] +-version = "0.6" +-optional = true +-default-features = false +- +-[target."cfg(windows)".dependencies.win-crypto-ng] +-version = "0.4" +-features = ["rand", "block-cipher"] +-optional = true +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.8" +-features = ["bcrypt"] +-optional = true +-default-features = false + [badges.gitlab] + repository = "sequoia-pgp/sequoia" + diff --git a/sources b/sources new file mode 100644 index 0000000..1a030d4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sequoia-openpgp-1.1.0.crate) = abb7cd0a1602bd059b85e2c873729e51a26d0a4fa117bba5ab7e0e60087aa0bdfb1004c869e03d36d1681afe8384b08fa35da1ee6c9b44b1b24f3c646a0f702f