From f0f5561dea6f3667228f30880e0622f418f2618b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 8 Jan 2018 20:32:16 +0100 Subject: [PATCH] Update to 5 Signed-off-by: Igor Gnatenko --- ...r-inject-cargo-dependency-in-runtime.patch | 41 ------------------- ...-rust-packaging-dependency-in-buildt.patch | 28 ------------- 0003-use-cp-instead-of-install.patch | 31 -------------- rust-packaging.spec | 11 +++-- 4 files changed, 5 insertions(+), 106 deletions(-) delete mode 100644 0001-inspector-inject-cargo-dependency-in-runtime.patch delete mode 100644 0002-inspector-inject-rust-packaging-dependency-in-buildt.patch delete mode 100644 0003-use-cp-instead-of-install.patch diff --git a/0001-inspector-inject-cargo-dependency-in-runtime.patch b/0001-inspector-inject-cargo-dependency-in-runtime.patch deleted file mode 100644 index 675f2ca..0000000 --- a/0001-inspector-inject-cargo-dependency-in-runtime.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 9e0a872ece6f5aedf76ffd67044f22c7d0cba8aa Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Fri, 20 Oct 2017 18:04:31 +0200 -Subject: [PATCH 1/3] inspector: inject cargo dependency in runtime - -Fixes: https://pagure.io/fedora-rust/rust2rpm/issue/42 -Signed-off-by: Igor Gnatenko ---- - rust2rpm/__main__.py | 1 + - rust2rpm/inspector.py | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py -index 0121a33..bb92fa3 100644 ---- a/rust2rpm/__main__.py -+++ b/rust2rpm/__main__.py -@@ -91,6 +91,7 @@ Provides: {{ prv }} - {% endfor %} - {% endif %} - {% if include_requires %} -+Requires: cargo - {% if md.requires|length > 0 %} - # [dependencies] - {% for req in md.requires|sort(attribute="name") %} -diff --git a/rust2rpm/inspector.py b/rust2rpm/inspector.py -index d08f1aa..6ccdbc2 100644 ---- a/rust2rpm/inspector.py -+++ b/rust2rpm/inspector.py -@@ -38,6 +38,9 @@ def main(): - print_deps(list(itertools.chain(md.requires, md.build_requires))) - if args.test_requires: - print_deps(md.test_requires) -+ if args.requires: -+ # Someone should own /usr/share/cargo/registry -+ print("cargo") - - if __name__ == "__main__": - main() --- -2.15.0 - diff --git a/0002-inspector-inject-rust-packaging-dependency-in-buildt.patch b/0002-inspector-inject-rust-packaging-dependency-in-buildt.patch deleted file mode 100644 index bfa9764..0000000 --- a/0002-inspector-inject-rust-packaging-dependency-in-buildt.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 45a5caf30060c182fb0ae03a1a7e4e707599aaa3 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sat, 21 Oct 2017 09:45:30 +0200 -Subject: [PATCH 2/3] inspector: inject rust-packaging dependency in buildtime - -For consistency with previous commit. - -Signed-off-by: Igor Gnatenko ---- - rust2rpm/inspector.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/rust2rpm/inspector.py b/rust2rpm/inspector.py -index 6ccdbc2..2d488b2 100644 ---- a/rust2rpm/inspector.py -+++ b/rust2rpm/inspector.py -@@ -41,6 +41,8 @@ def main(): - if args.requires: - # Someone should own /usr/share/cargo/registry - print("cargo") -+ if args.build_requires: -+ print("rust-packaging") - - if __name__ == "__main__": - main() --- -2.15.0 - diff --git a/0003-use-cp-instead-of-install.patch b/0003-use-cp-instead-of-install.patch deleted file mode 100644 index 7c7b726..0000000 --- a/0003-use-cp-instead-of-install.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 59809d4940822edaa361507ecea93b84e3c43ec0 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sat, 4 Nov 2017 15:32:39 +0100 -Subject: [PATCH 3/3] use cp instead of install - -We want to preserve original modes and so on. - -Signed-off-by: Igor Gnatenko ---- - data/macros.cargo | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/data/macros.cargo b/data/macros.cargo -index 09bbcea..e52f87c 100644 ---- a/data/macros.cargo -+++ b/data/macros.cargo -@@ -45,9 +45,9 @@ if %__cargo_is_lib; then \ - CRATE_VERSION=$(%__cargo_inspector --version Cargo.toml) \ - REG_DIR=%{buildroot}%{cargo_registry}/$CRATE_NAME-$CRATE_VERSION \ - %{__mkdir} -p $REG_DIR \ -- %__cargo package -l | xargs cp --parents -p -t $REG_DIR \ -+ %__cargo package -l | xargs %{__cp} --parents -a -t $REG_DIR \ - %if ! %{with check} \ -- %{__install} -p Cargo.toml.orig $REG_DIR/Cargo.toml \ -+ %{__cp} -a Cargo.toml.orig $REG_DIR/Cargo.toml \ - %endif \ - echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \ - fi \ --- -2.15.0 - diff --git a/rust-packaging.spec b/rust-packaging.spec index bbc94f3..651c352 100644 --- a/rust-packaging.spec +++ b/rust-packaging.spec @@ -1,17 +1,13 @@ %bcond_without check Name: rust-packaging -Version: 4 -Release: 7%{?dist} +Version: 5 +Release: 1%{?dist} Summary: RPM macros for building Rust packages on various architectures License: MIT URL: https://pagure.io/fedora-rust/rust2rpm Source0: https://releases.pagure.org/fedora-rust/rust2rpm/rust2rpm-%{version}.tar.xz -# Commits since last release -Patch0001: 0001-inspector-inject-cargo-dependency-in-runtime.patch -Patch0002: 0002-inspector-inject-rust-packaging-dependency-in-buildt.patch -Patch0003: 0003-use-cp-instead-of-install.patch BuildArch: noarch ExclusiveArch: %{rust_arches} noarch @@ -89,6 +85,9 @@ py.test-%{python3_version} -v test.py %{python3_sitelib}/rust2rpm/ %changelog +* Mon Jan 08 2018 Igor Gnatenko - 5-1 +- Update to 5 + * Sat Nov 04 2017 Igor Gnatenko - 4-7 - Add Obsoletes for rust-rpm-macros