diff --git a/.gitignore b/.gitignore index cd17452..7256461 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /rust2rpm-v17.tar.gz /rust2rpm-v18.tar.gz /rust2rpm-v19.tar.gz +/rust2rpm-v20.tar.gz diff --git a/0001-Always-require-upper-bound-dependency-with-sign.patch b/0001-Always-require-upper-bound-dependency-with-sign.patch deleted file mode 100644 index 51ae3b9..0000000 --- a/0001-Always-require-upper-bound-dependency-with-sign.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 617d4b9140b35f4f74def98b87a69a84943a33de Mon Sep 17 00:00:00 2001 -From: Igor Raits -Date: Mon, 28 Dec 2020 12:44:52 +0100 -Subject: [PATCH] Always require upper-bound dependency with ~ sign - -Proper fix is quite complex and given we do not package pre-release -versions very often (and esp. not multiple versions of them), this is -good enough (not nice though). - -References: https://pagure.io/fedora-rust/rust2rpm/issue/70 -Signed-off-by: Igor Raits ---- - rust2rpm/metadata.py | 2 +- - test.py | 40 ++++++++++++++++++++-------------------- - 2 files changed, 21 insertions(+), 21 deletions(-) - -diff --git a/rust2rpm/metadata.py b/rust2rpm/metadata.py -index b29e7b5..4636cc5 100644 ---- a/rust2rpm/metadata.py -+++ b/rust2rpm/metadata.py -@@ -197,7 +197,7 @@ class Dependency: - if not reqs: - return cap - deps = ' with '.join( -- f'{cap} {op} {CargoSemVer.unparse_version(version, sep="~")}' -+ f'{cap} {op} {CargoSemVer.unparse_version(version, sep="~")}{"~" if op == CargoSemVer.KIND_LT else ""}' - for op, version in reqs) - if len(reqs) > 1: - return f"({deps})" -diff --git a/test.py b/test.py -index ccda3b5..7623be0 100644 ---- a/test.py -+++ b/test.py -@@ -6,53 +6,53 @@ from rust2rpm.metadata import Version - - @pytest.mark.parametrize("req, rpmdep", [ - ("^1.2.3", -- "(crate(test) >= 1.2.3 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.2.3 with crate(test) < 2.0.0~)"), - ("^1.2", -- "(crate(test) >= 1.2.0 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.2.0 with crate(test) < 2.0.0~)"), - ("^1", -- "(crate(test) >= 1.0.0 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.0.0 with crate(test) < 2.0.0~)"), - ("^0.2.3", -- "(crate(test) >= 0.2.3 with crate(test) < 0.3.0)"), -+ "(crate(test) >= 0.2.3 with crate(test) < 0.3.0~)"), - ("^0.2", -- "(crate(test) >= 0.2.0 with crate(test) < 0.3.0)"), -+ "(crate(test) >= 0.2.0 with crate(test) < 0.3.0~)"), - ("^0.0.3", -- "(crate(test) >= 0.0.3 with crate(test) < 0.0.4)"), -+ "(crate(test) >= 0.0.3 with crate(test) < 0.0.4~)"), - ("^0.0", -- "(crate(test) >= 0.0.0 with crate(test) < 0.1.0)"), -+ "(crate(test) >= 0.0.0 with crate(test) < 0.1.0~)"), - ("^0", -- "(crate(test) >= 0.0.0 with crate(test) < 1.0.0)"), -+ "(crate(test) >= 0.0.0 with crate(test) < 1.0.0~)"), - ("~1.2.3", -- "(crate(test) >= 1.2.3 with crate(test) < 1.3.0)"), -+ "(crate(test) >= 1.2.3 with crate(test) < 1.3.0~)"), - ("~1.2", -- "(crate(test) >= 1.2.0 with crate(test) < 1.3.0)"), -+ "(crate(test) >= 1.2.0 with crate(test) < 1.3.0~)"), - ("~1", -- "(crate(test) >= 1.0.0 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.0.0 with crate(test) < 2.0.0~)"), - ("*", - "crate(test) >= 0.0.0"), - ("1.*", -- "(crate(test) >= 1.0.0 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.0.0 with crate(test) < 2.0.0~)"), - ("1.2.*", -- "(crate(test) >= 1.2.0 with crate(test) < 1.3.0)"), -+ "(crate(test) >= 1.2.0 with crate(test) < 1.3.0~)"), - ("1.*.*", -- "(crate(test) >= 1.0.0 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.0.0 with crate(test) < 2.0.0~)"), - (">= 1.2.0", - "crate(test) >= 1.2.0"), - ("> 1", - "crate(test) > 1.0.0"), - ("< 2", -- "crate(test) < 2.0.0"), -+ "crate(test) < 2.0.0~"), - ("= 1.2.3", - "crate(test) = 1.2.3"), - (">= 1.2, < 1.5", -- "(crate(test) >= 1.2.0 with crate(test) < 1.5.0)"), -+ "(crate(test) >= 1.2.0 with crate(test) < 1.5.0~)"), - ("^1.0.0-alpha.6", -- "(crate(test) >= 1.0.0~alpha.6 with crate(test) < 2.0.0)"), -+ "(crate(test) >= 1.0.0~alpha.6 with crate(test) < 2.0.0~)"), - ("^0.1.0-alpha.6", -- "(crate(test) >= 0.1.0~alpha.6 with crate(test) < 0.2.0)"), -+ "(crate(test) >= 0.1.0~alpha.6 with crate(test) < 0.2.0~)"), - ("^0.0.1-alpha.6", -- "(crate(test) >= 0.0.1~alpha.6 with crate(test) < 0.0.2)"), -+ "(crate(test) >= 0.0.1~alpha.6 with crate(test) < 0.0.2~)"), - ("^0.0.0-alpha.6", -- "(crate(test) >= 0.0.0~alpha.6 with crate(test) < 0.0.1)"), -+ "(crate(test) >= 0.0.0~alpha.6 with crate(test) < 0.0.1~)"), - ]) - def test_dependency(req, rpmdep): - dep = rust2rpm.Dependency("test", req) --- -2.30.0.rc2 - diff --git a/rust-packaging.spec b/rust-packaging.spec index c955804..d15feb6 100644 --- a/rust-packaging.spec +++ b/rust-packaging.spec @@ -3,15 +3,13 @@ %global debug_package %{nil} Name: rust-packaging -Version: 19 +Version: 20 Release: %autorelease Summary: RPM macros for building Rust packages on various architectures License: MIT URL: https://pagure.io/fedora-rust/rust2rpm Source: https://pagure.io/fedora-rust/rust2rpm/archive/v%{version}/rust2rpm-v%{version}.tar.gz -# https://pagure.io/fedora-rust/rust2rpm/issue/70 -Patch0001: 0001-Always-require-upper-bound-dependency-with-sign.patch ExclusiveArch: %{rust_arches} diff --git a/sources b/sources index 9f4cdf4..3c96919 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rust2rpm-v19.tar.gz) = a75a7994a1e2760c9db2c94c67863e5a03336223963f70d2253b814c247cf547152f0ed7939b0a0ba529b5e8e255ef064bc4d57a0e9d0d539a79d695bf0a6851 +SHA512 (rust2rpm-v20.tar.gz) = f29a443b61690c71b023ce9d9536ca05099fdd9c51ccca921dd75fc578d6213b095b5becdeb85040fb073f9a59610553091345c34ce2bde4514689b303c951b1