The package rpms/device-mapper-persistent-data.git has added or updated architecture
specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/device-mapper-persistent-data.git....
Change:
+%ifarch %{rust_arches}
Thanks.
Full change:
============
commit 17d784aa7f2421481f493b0dc88f4155167ad1bb
Author: Marian Csontos <mcsontos(a)redhat.com>
Date: Thu Sep 17 17:21:56 2020 +0200
Update to ustrream release 0.9.0
diff --git a/.gitignore b/.gitignore
index 15172ca..a2c13b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,4 @@
/v0.9.0-rc2.tar.gz
/device-mapper-persistent-data-0.9.0-rc2-vendor.tar.gz
/v0.9.0.tar.gz
+/dmpd090-vendor.tar.gz
diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec
index 2878e32..4eb06e1 100644
--- a/device-mapper-persistent-data.spec
+++ b/device-mapper-persistent-data.spec
@@ -3,18 +3,19 @@
#
#%%global version_suffix -rc2
-%global release_suffix .test2
+#%%global release_suffix .test3
Summary: Device-mapper Persistent Data Tools
Name: device-mapper-persistent-data
Version: 0.9.0
-Release: 0.2%{?dist}%{?release_suffix}
+Release: 1%{?dist}%{?release_suffix}
License: GPLv3+
URL:
https://github.com/jthornber/thin-provisioning-tools
#Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisi...
-Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}%...
+Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}%...
+Source1: dmpd090-vendor.tar.gz
Patch0: device-mapper-persistent-data-avoid-strip.patch
-Patch1: 0001-Update-dependencies.patch
+#Patch1: 0001-Update-dependencies.patch
BuildRequires: autoconf, expat-devel, libaio-devel, libstdc++-devel, boost-devel,
gcc-c++
Requires: expat
@@ -33,16 +34,26 @@ are included and era check, dump, restore and invalidate to manage
snapshot eras
%prep
-%setup -q -n thin-provisioning-tools-%{version}%{version_suffix}
+%setup -q -n thin-provisioning-tools-%{version}%{?version_suffix}
%ifarch %{rust_arches}
-%cargo_prep
+#%%patch1 -p1 -b .toml_update
+#%%cargo_prep
+#%%cargo_generate_buildrequires
+tar xf %{SOURCE1}
+mkdir -p .cargo
+cat > .cargo/config <<END
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "vendor"
+
+END
%endif
%patch0 -p1 -b .avoid_strip
-%patch1 -p1 -b .toml_update
echo %{version}-%{release} > VERSION
%generate_buildrequires
-%cargo_generate_buildrequires
%build
autoconf
@@ -112,7 +123,7 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install-rust-tools
#% {_sbindir}/thin_show_duplicates
%changelog
-* Tue Sep 01 2020 Marian Csontos <mcsontos(a)redhat.com> - 0.9.0-0.2
+* Thu Sep 17 2020 Marian Csontos <mcsontos(a)redhat.com> - 0.9.0-1
- Update to latest upstream version
- New tools thin_metadata_pack and thin_metadata_unpack
diff --git a/sources b/sources
index 1219fce..f0a209b 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
SHA512 (v0.9.0.tar.gz) =
e1796fb3948847d72ca8247cae58017507c0a847a00201b93668eeb8fbfea4107c4c2affa5c211c149798a89b10474e83d2bd61a5545a668299be97aed591e0f
+SHA512 (dmpd090-vendor.tar.gz) =
fb455511b9a7cba22029f968e9caac14cb0c94f899fea7cb96b973f8abf9cfc26f9706f0b18e4750edda063d7014c485583f559f127f1296ecd3b0b9f5d912e3
commit 00ee8c1bd221db95ca1455abba90727e9d6f6445
Author: Marian Csontos <mcsontos(a)redhat.com>
Date: Tue Sep 1 15:02:56 2020 +0200
Update to upstream release 0.9.0
diff --git a/.gitignore b/.gitignore
index 18aaa44..15172ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,6 @@
/v0.8.0.tar.gz
/v0.8.1.tar.gz
/v0.8.5.tar.gz
+/v0.9.0-rc2.tar.gz
+/device-mapper-persistent-data-0.9.0-rc2-vendor.tar.gz
+/v0.9.0.tar.gz
diff --git a/0001-Update-dependencies.patch b/0001-Update-dependencies.patch
new file mode 100644
index 0000000..aaca7ac
--- /dev/null
+++ b/0001-Update-dependencies.patch
@@ -0,0 +1,25 @@
+From 4a45e1d7eafb83ec9c76f0b3278f4bc7efbdde9d Mon Sep 17 00:00:00 2001
+From: Marian Csontos <mcsontos(a)redhat.com>
+Date: Tue, 1 Sep 2020 14:55:48 +0200
+Subject: [PATCH] Update dependencies
+
+---
+ Cargo.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 892ea4c..93fc807 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -9,7 +9,7 @@ license = "GPL3"
+ anyhow = "1.0"
+ byteorder = "1.3"
+ clap = "2.33"
+-crc32c = "0.4"
++crc32c = "0.5"
+ flate2 = "1.0"
+ fixedbitset = "0.3"
+ libc = "0.2.71"
+--
+1.8.3.1
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4c77f74
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+# Packaging dmpd
+
+This is mostly regular package except recent addition of rust to used languages.
+
+## rust-tools
+
+To build the rust-tools (`make rust-tools`) one needs:
+
+- rust >= 1.35
+- cargo with vendor subcommand (now upstream, included in latest Fedora and RHEL8)
+
+### cargo vendpr
+
+- run `cargo vendor` in the disrectory with sources
+- run `tar czf device-mapper-persistent-data-vendor-$VERSION.tar.gz ./vendor`
+- copy the file (if version changed) and run the *fedpkg new-sources* command:
+ - `fedpkg new-sources v$VERSION.tar.gz
device-mapper-persistent-data-vendor-$VERSION.tar.gz`
+
+## TODO/NOTES
+
+Some of the dependencies may be already packaged by Fedora. Can we instruct *cargo
vendor* to include only those which are not provided by Fedora?
+
+*%cargo_install* installs by defualt in */usr/bin* but the package expects */usr/sbin*.
For now I run *make install-rust-tools*.
+
diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec
index 2496c15..2878e32 100644
--- a/device-mapper-persistent-data.spec
+++ b/device-mapper-persistent-data.spec
@@ -2,18 +2,27 @@
# Copyright (C) 2011-2017 Red Hat, Inc
#
+#%%global version_suffix -rc2
+%global release_suffix .test2
+
Summary: Device-mapper Persistent Data Tools
Name: device-mapper-persistent-data
-Version: 0.8.5
-Release: 4%{?dist}
+Version: 0.9.0
+Release: 0.2%{?dist}%{?release_suffix}
License: GPLv3+
URL:
https://github.com/jthornber/thin-provisioning-tools
-#Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisi...
{version}.tar.gz
-Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}....
+#Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisi...
+Source0:
https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}%...
Patch0: device-mapper-persistent-data-avoid-strip.patch
+Patch1: 0001-Update-dependencies.patch
BuildRequires: autoconf, expat-devel, libaio-devel, libstdc++-devel, boost-devel,
gcc-c++
Requires: expat
+%ifarch %{rust_arches}
+BuildRequires: rust-packaging
+BuildRequires: rust >= 1.35
+BuildRequires: cargo
+%endif
%description
thin-provisioning-tools contains check,dump,restore,repair,rmap
@@ -24,17 +33,32 @@ are included and era check, dump, restore and invalidate to manage
snapshot eras
%prep
-%setup -q -n thin-provisioning-tools-%{version}
+%setup -q -n thin-provisioning-tools-%{version}%{version_suffix}
+%ifarch %{rust_arches}
+%cargo_prep
+%endif
%patch0 -p1 -b .avoid_strip
+%patch1 -p1 -b .toml_update
echo %{version}-%{release} > VERSION
+%generate_buildrequires
+%cargo_generate_buildrequires
+
%build
autoconf
%configure --with-optimisation=
make %{?_smp_mflags} V=
+%ifarch %{rust_arches}
+%cargo_build
+%endif
%install
make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
+%ifarch %{rust_arches}
+make DESTDIR=%{buildroot} MANDIR=%{_mandir} install-rust-tools
+# cargo_install installs into /usr/bin
+#%%cargo_install
+%endif
%files
%doc COPYING README.md
@@ -57,6 +81,10 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
%{_mandir}/man8/thin_restore.8.gz
%{_mandir}/man8/thin_rmap.8.gz
%{_mandir}/man8/thin_trim.8.gz
+%ifarch %{rust_arches}
+%{_mandir}/man8/thin_metadata_pack.8.gz
+%{_mandir}/man8/thin_metadata_unpack.8.gz
+%endif
%{_sbindir}/pdata_tools
%{_sbindir}/cache_check
%{_sbindir}/cache_dump
@@ -77,9 +105,17 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
%{_sbindir}/thin_restore
%{_sbindir}/thin_rmap
%{_sbindir}/thin_trim
+%ifarch %{rust_arches}
+%{_sbindir}/thin_metadata_pack
+%{_sbindir}/thin_metadata_unpack
+%endif
#% {_sbindir}/thin_show_duplicates
%changelog
+* Tue Sep 01 2020 Marian Csontos <mcsontos(a)redhat.com> - 0.9.0-0.2
+- Update to latest upstream version
+- New tools thin_metadata_pack and thin_metadata_unpack
+
* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.8.5-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
diff --git a/sources b/sources
index db03cfa..1219fce 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (v0.8.5.tar.gz) =
11e8f6bccaa1d5ccc622a356995f60afa45bba5f4dd80e2fbd7e980963d856a15a32d7b3305e445291936d5207af72fac85d9956680ed7c651383cc57a945451
+SHA512 (v0.9.0.tar.gz) =
e1796fb3948847d72ca8247cae58017507c0a847a00201b93668eeb8fbfea4107c4c2affa5c211c149798a89b10474e83d2bd61a5545a668299be97aed591e0f