From d39ded298f8b3aba7238d77d8c101f9290a34943 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 13 Dec 2019 22:17:25 +0100 Subject: [PATCH] Fixup generation of files with no-tilde Signed-off-by: Igor Gnatenko --- 0001-Ignore-Cargo.lock.patch | 26 ----------------- ...s-Generate-files-entry-with-no-tilde.patch | 29 +++++++++++++++++++ rust-packaging.spec | 6 +++- 3 files changed, 34 insertions(+), 27 deletions(-) delete mode 100644 0001-Ignore-Cargo.lock.patch create mode 100644 0001-templates-Generate-files-entry-with-no-tilde.patch diff --git a/0001-Ignore-Cargo.lock.patch b/0001-Ignore-Cargo.lock.patch deleted file mode 100644 index 3f719f5..0000000 --- a/0001-Ignore-Cargo.lock.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 308b1b98e5a7724572325293bdc19ac167877544 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sun, 18 Aug 2019 16:39:13 +0200 -Subject: [PATCH] Ignore Cargo.lock - -Signed-off-by: Igor Gnatenko ---- - data/macros.cargo | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/macros.cargo b/data/macros.cargo -index 1182850..5f60111 100644 ---- a/data/macros.cargo -+++ b/data/macros.cargo -@@ -90,7 +90,7 @@ if %__cargo_is_lib; then \ - # so that cargo doesn't fail resolving dependencies: \ - # https://github.com/rust-lang/cargo/pull/6729 \ - %{__awk} -i inplace -v INPLACE_SUFFIX=.deps '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \ -- %{__cargo} package -l | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \ -+ %{__cargo} package -l | grep -w -v Cargo.lock | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \ - %{__mv} Cargo.toml{.deps,} \ - %{__cp} -a Cargo.toml $REG_DIR/Cargo.toml \ - %{__rm} -f $REG_DIR/Cargo.toml.{orig,deps} \ --- -2.23.0.rc2 - diff --git a/0001-templates-Generate-files-entry-with-no-tilde.patch b/0001-templates-Generate-files-entry-with-no-tilde.patch new file mode 100644 index 0000000..30040e9 --- /dev/null +++ b/0001-templates-Generate-files-entry-with-no-tilde.patch @@ -0,0 +1,29 @@ +From 94e3528e8f142e09c476417e43bf2597e029590d Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Fri, 13 Dec 2019 22:05:04 +0100 +Subject: [PATCH] templates: Generate files entry with no-tilde + +Signed-off-by: Igor Gnatenko +--- + rust2rpm/templates/main.spec | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rust2rpm/templates/main.spec b/rust2rpm/templates/main.spec +index 2fb1aff..c5686d3 100644 +--- a/rust2rpm/templates/main.spec ++++ b/rust2rpm/templates/main.spec +@@ -170,9 +170,9 @@ which use {% if feature is not none %}"{{ feature }}" feature of {% endif %}"%{c + {% if md.readme is not none %} + %doc {{ md.readme }} + {% endif %} +-%{cargo_registry}/%{crate}-%{version}/ ++%{cargo_registry}/%{crate}-%{version_no_tilde}/ + {% else %} +-%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml ++%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + {% endif %} + + {% endfor %} +-- +2.24.1 + diff --git a/rust-packaging.spec b/rust-packaging.spec index 9402140..c10be97 100644 --- a/rust-packaging.spec +++ b/rust-packaging.spec @@ -4,12 +4,13 @@ Name: rust-packaging Version: 12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Rust packages on various architectures License: MIT URL: https://pagure.io/fedora-rust/rust2rpm Source: https://releases.pagure.org/fedora-rust/rust2rpm/rust2rpm-%{version}.tar.xz +Patch0001: 0001-templates-Generate-files-entry-with-no-tilde.patch ExclusiveArch: %{rust_arches} @@ -69,6 +70,9 @@ py.test-%{python3_version} -vv test.py %{python3_sitelib}/rust2rpm/ %changelog +* Fri Dec 13 2019 Igor Gnatenko - 12-2 +- Fixup generation of files with no-tilde + * Fri Dec 13 2019 Igor Gnatenko - 12-1 - Update to 12