Fixup generation of files with no-tilde

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 5 years ago
parent 225b735a83
commit d39ded298f
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -1,26 +0,0 @@
From 308b1b98e5a7724572325293bdc19ac167877544 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date: Sun, 18 Aug 2019 16:39:13 +0200
Subject: [PATCH] Ignore Cargo.lock
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
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

@ -0,0 +1,29 @@
From 94e3528e8f142e09c476417e43bf2597e029590d Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date: Fri, 13 Dec 2019 22:05:04 +0100
Subject: [PATCH] templates: Generate files entry with no-tilde
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
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

@ -4,12 +4,13 @@
Name: rust-packaging Name: rust-packaging
Version: 12 Version: 12
Release: 1%{?dist} Release: 2%{?dist}
Summary: RPM macros for building Rust packages on various architectures Summary: RPM macros for building Rust packages on various architectures
License: MIT License: MIT
URL: https://pagure.io/fedora-rust/rust2rpm URL: https://pagure.io/fedora-rust/rust2rpm
Source: https://releases.pagure.org/fedora-rust/rust2rpm/rust2rpm-%{version}.tar.xz 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} ExclusiveArch: %{rust_arches}
@ -69,6 +70,9 @@ py.test-%{python3_version} -vv test.py
%{python3_sitelib}/rust2rpm/ %{python3_sitelib}/rust2rpm/
%changelog %changelog
* Fri Dec 13 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 12-2
- Fixup generation of files with no-tilde
* Fri Dec 13 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 12-1 * Fri Dec 13 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 12-1
- Update to 12 - Update to 12

Loading…
Cancel
Save