Compare commits
49 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
010e823bf0 | ||
|
|
af8fbf5a50 | ||
|
|
6e75527416 | ||
|
|
f5a75df400 | ||
|
|
f8b6ae0ff5 | ||
|
|
6eaa83f886 | ||
|
|
afa261551b | ||
|
|
cfc9435230 | ||
|
|
42f0442c76 | ||
|
|
a540c7b432 | ||
|
|
4bace50fd1 | ||
|
|
d830fc9808 | ||
|
|
226ede080b | ||
|
|
e10017f376 | ||
|
|
7ccc70d06b | ||
|
|
36f16d6703 | ||
|
|
e9706a7124 | ||
|
|
32537c977f | ||
|
|
c1fa90d775 | ||
|
|
62ab60b959 | ||
|
|
8f47f1dde7 | ||
|
|
fc4e1a8529 | ||
|
|
0ee1026718 | ||
|
|
d37efc8796 | ||
|
|
e3c64593c6 | ||
|
|
b76b7df037 | ||
|
|
c950fe5f28 | ||
|
|
a6ab2577d8 | ||
|
|
80bd16a715 | ||
|
|
74d27c1f25 | ||
|
|
9ca4681979 | ||
|
|
e1a1e8841f | ||
|
|
ee730faf27 | ||
|
|
db577ef350 | ||
|
|
8d2c47ae1c | ||
|
|
804560ae46 |
||
|
|
eb7bb8b343 | ||
|
|
20de387ada | ||
|
|
99369c4f67 | ||
|
|
126554fe2a | ||
|
|
60cbba5ee8 | ||
|
|
c6ef39964e | ||
|
|
266ea5b3cf | ||
|
|
c8a7f0ad3e | ||
|
|
04960e2a1e | ||
|
|
d369cfa3c5 | ||
|
|
9537e3e84a | ||
|
|
17d784aa7f | ||
|
|
00ee8c1bd2 |
8 changed files with 312 additions and 64 deletions
28
.gitignore
vendored
28
.gitignore
vendored
|
|
@ -33,3 +33,31 @@
|
||||||
/v0.8.0.tar.gz
|
/v0.8.0.tar.gz
|
||||||
/v0.8.1.tar.gz
|
/v0.8.1.tar.gz
|
||||||
/v0.8.5.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
|
||||||
|
/dmpd090-vendor.tar.gz
|
||||||
|
/dmpd090-vendor2.tar.gz
|
||||||
|
/dmpd090-vendor3.tar.gz
|
||||||
|
/v1.0.2.tar.gz
|
||||||
|
/dmpd102-vendor.tar.gz
|
||||||
|
/v1.0.4.tar.gz
|
||||||
|
/dmpd104-vendor.tar.gz
|
||||||
|
/v1.0.5.tar.gz
|
||||||
|
/dmpd105-vendor.tar.gz
|
||||||
|
/v1.0.6.tar.gz
|
||||||
|
/dmpd106-vendor.tar.gz
|
||||||
|
/v1.0.9.tar.gz
|
||||||
|
/dmpd109-vendor.tar.gz
|
||||||
|
/v1.0.11.tar.gz
|
||||||
|
/dmpd1011-vendor.tar.gz
|
||||||
|
/v1.0.12.tar.gz
|
||||||
|
/dmpd1012-vendor.tar.gz
|
||||||
|
/v1.1.0.tar.gz
|
||||||
|
/dmpd110-vendor.tar.gz
|
||||||
|
/v1.2.1.tar.gz
|
||||||
|
/dmpd121-vendor.tar.gz
|
||||||
|
/v1.3.0.tar.gz
|
||||||
|
/dmpd130-vendor.tar.gz
|
||||||
|
/v1.3.1.tar.gz
|
||||||
|
/dmpd131-vendor.tar.gz
|
||||||
|
|
|
||||||
54
README.md
Normal file
54
README.md
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
# Packaging device-mapper-persitent-data (AKA dmpd)
|
||||||
|
|
||||||
|
This is rust package using *vendor* file for dependencies. (Vendor file is an archive of dependencies' sources.)
|
||||||
|
|
||||||
|
For most of simple fixes, there is nothing special,
|
||||||
|
to add a patches simply add them to dist-git,
|
||||||
|
add a corresponding `PatchN: 000N-...` lines,
|
||||||
|
increase `Release:` or `release_suffix` for Z-stream (or for test build use suffix like `.bzNNNNNN`),
|
||||||
|
add to `%changelog`,
|
||||||
|
commit,
|
||||||
|
push,
|
||||||
|
and build the package using `fedpkg build`.
|
||||||
|
|
||||||
|
Alternatively before committing anything use `fedpkg srpm` and `fedpkg scratch-build --srpm $SRPM [--arches x86_64]` to create a scratch build.
|
||||||
|
|
||||||
|
However when building a new version of dmpd or when updating a dependency is
|
||||||
|
needed (e.g. because of CVE in the dependency) vendor file
|
||||||
|
has to be regenerated.
|
||||||
|
|
||||||
|
## Updating vendor file
|
||||||
|
|
||||||
|
To build a new version of the package following tooling is needed:
|
||||||
|
|
||||||
|
- `rust >= 1.35`
|
||||||
|
- `cargo` providing vendor subcommand (now upstream, included in latest Fedora and RHEL8+)
|
||||||
|
|
||||||
|
To create the vendor file:
|
||||||
|
|
||||||
|
In the upstream directory:
|
||||||
|
|
||||||
|
1. Run `cargo vendor` in the directory with upstream sources to create *vendor*
|
||||||
|
directory with sources.
|
||||||
|
- TODO: There is a *cargo-vendor-filterer* project used by *stratisd* to
|
||||||
|
filter out unnecessary dependencies for other operating systems.
|
||||||
|
2. Run `tar czf device-mapper-persistent-data-vendor-$VERSION.tar.gz ./vendor` to create a tarball.
|
||||||
|
3. Copy the vendor file to dist git directory.
|
||||||
|
|
||||||
|
In the dist-git directory:
|
||||||
|
|
||||||
|
1. Get the upstream tarball `wget https://github.com/jthornber/thin-provisioning-tools/archive/v$VERSION.tar.gz`
|
||||||
|
- NOTE: Migration to `https://github.com/device-mapper-utils/thin-provisioning-tools` is coming.
|
||||||
|
2. Update *Source0* and *Source1* to correct values.
|
||||||
|
3. Add the tarballs to koji/brew lookaside:
|
||||||
|
- `fedpkg new-sources v$VERSION.tar.gz device-mapper-persistent-data-vendor-$VERSION.tar.gz`
|
||||||
|
|
||||||
|
## TODO/NOTES
|
||||||
|
|
||||||
|
Some of the dependencies are already packaged by Fedora. Can we instruct *cargo vendor* to include only those which are not provided by Fedora?
|
||||||
|
It would be possible to include these as submodules, and the rest could be used from Fedora.
|
||||||
|
For RHEL and CentOS Stream using vendor file is the recommended way.
|
||||||
|
|
||||||
|
*%cargo_install* installs by default in */usr/bin* but the package expects */usr/sbin*. For now I run *make install-rust-tools*.
|
||||||
|
Now Fedora unified the */usr/sbin* and */usr/bin* directories, to this can be "fixed" in Fedora and later in CentOS Stream.
|
||||||
|
|
||||||
|
|
@ -1,19 +1,38 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-2017 Red Hat, Inc
|
# Copyright (C) 2011-2017 Red Hat, Inc
|
||||||
#
|
#
|
||||||
|
%bcond_without check
|
||||||
|
#%%global debug_package %%{nil}
|
||||||
|
|
||||||
|
#%%global version_suffix -rc2
|
||||||
|
#%%global release_suffix .test3
|
||||||
|
|
||||||
Summary: Device-mapper Persistent Data Tools
|
Summary: Device-mapper Persistent Data Tools
|
||||||
Name: device-mapper-persistent-data
|
Name: device-mapper-persistent-data
|
||||||
Version: 0.8.5
|
Version: 1.3.1
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}%{?release_suffix}
|
||||||
License: GPLv3+
|
License: GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
|
||||||
URL: https://github.com/jthornber/thin-provisioning-tools
|
|
||||||
#Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-% {version}.tar.gz
|
|
||||||
Source0: https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}.tar.gz
|
|
||||||
Patch0: device-mapper-persistent-data-avoid-strip.patch
|
|
||||||
|
|
||||||
BuildRequires: autoconf, expat-devel, libaio-devel, libstdc++-devel, boost-devel, gcc-c++
|
#ExcludeArch: %%{ix86}
|
||||||
Requires: expat
|
URL: https://github.com/jthornber/thin-provisioning-tools
|
||||||
|
#Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-%%{version}.tar.gz
|
||||||
|
Source0: https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}%{?version_suffix}.tar.gz
|
||||||
|
Source1: dmpd131-vendor.tar.gz
|
||||||
|
|
||||||
|
%if %{defined rhel}
|
||||||
|
BuildRequires: rust-toolset
|
||||||
|
%else
|
||||||
|
BuildRequires: rust-packaging
|
||||||
|
BuildRequires: rust >= 1.35
|
||||||
|
BuildRequires: cargo
|
||||||
|
%endif
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: systemd-devel
|
||||||
|
BuildRequires: clang-libs
|
||||||
|
BuildRequires: glibc-static
|
||||||
|
BuildRequires: device-mapper-devel
|
||||||
|
BuildRequires: clang
|
||||||
|
#BuildRequires: gcc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
thin-provisioning-tools contains check,dump,restore,repair,rmap
|
thin-provisioning-tools contains check,dump,restore,repair,rmap
|
||||||
|
|
@ -24,20 +43,46 @@ are included and era check, dump, restore and invalidate to manage
|
||||||
snapshot eras
|
snapshot eras
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n thin-provisioning-tools-%{version}
|
%autosetup -p1 -n thin-provisioning-tools-%{version}%{?version_suffix} -a1
|
||||||
%patch0 -p1 -b .avoid_strip
|
%cargo_prep -v vendor
|
||||||
|
|
||||||
|
# NOTE: Following could replace Cargo.toml patching, but some macros are not working well with it
|
||||||
|
# Notably at least one of cargo_license_summary, cargo_license_summary, or cargo_vendor_manifest
|
||||||
|
#cat >> .cargo/config.toml << EOF
|
||||||
|
#
|
||||||
|
#[source."git+https://github.com/jthornber/rio?branch=master"]
|
||||||
|
#git = "https://github.com/jthornber/rio"
|
||||||
|
#branch = "master"
|
||||||
|
#replace-with = "vendored-sources"
|
||||||
|
#
|
||||||
|
#EOF
|
||||||
|
|
||||||
echo %{version}-%{release} > VERSION
|
echo %{version}-%{release} > VERSION
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoconf
|
#make %{?_smp_mflags} V=
|
||||||
%configure --with-optimisation=
|
%cargo_build
|
||||||
make %{?_smp_mflags} V=
|
%cargo_license_summary
|
||||||
|
%{cargo_license} > LICENSE.dependencies
|
||||||
|
%cargo_vendor_manifest
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
|
# TODO: Check that MANDIR is unused and remove
|
||||||
|
%make_install STRIP=true MANDIR=%{_mandir} BINDIR=%{buildroot}%{_sbindir}
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%cargo_test
|
||||||
|
#cargo test --test thin_shrink -- --nocapture --test-threads=1
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING README.md
|
%doc README.md
|
||||||
|
%license COPYING
|
||||||
|
%license LICENSE.dependencies
|
||||||
|
%license cargo-vendor.txt
|
||||||
%{_mandir}/man8/cache_check.8.gz
|
%{_mandir}/man8/cache_check.8.gz
|
||||||
%{_mandir}/man8/cache_dump.8.gz
|
%{_mandir}/man8/cache_dump.8.gz
|
||||||
%{_mandir}/man8/cache_metadata_size.8.gz
|
%{_mandir}/man8/cache_metadata_size.8.gz
|
||||||
|
|
@ -53,10 +98,13 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
|
||||||
%{_mandir}/man8/thin_dump.8.gz
|
%{_mandir}/man8/thin_dump.8.gz
|
||||||
%{_mandir}/man8/thin_ls.8.gz
|
%{_mandir}/man8/thin_ls.8.gz
|
||||||
%{_mandir}/man8/thin_metadata_size.8.gz
|
%{_mandir}/man8/thin_metadata_size.8.gz
|
||||||
|
%{_mandir}/man8/thin_migrate.8.gz
|
||||||
%{_mandir}/man8/thin_repair.8.gz
|
%{_mandir}/man8/thin_repair.8.gz
|
||||||
%{_mandir}/man8/thin_restore.8.gz
|
%{_mandir}/man8/thin_restore.8.gz
|
||||||
%{_mandir}/man8/thin_rmap.8.gz
|
%{_mandir}/man8/thin_rmap.8.gz
|
||||||
%{_mandir}/man8/thin_trim.8.gz
|
%{_mandir}/man8/thin_trim.8.gz
|
||||||
|
%{_mandir}/man8/thin_metadata_pack.8.gz
|
||||||
|
%{_mandir}/man8/thin_metadata_unpack.8.gz
|
||||||
%{_sbindir}/pdata_tools
|
%{_sbindir}/pdata_tools
|
||||||
%{_sbindir}/cache_check
|
%{_sbindir}/cache_check
|
||||||
%{_sbindir}/cache_dump
|
%{_sbindir}/cache_dump
|
||||||
|
|
@ -73,13 +121,120 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
|
||||||
%{_sbindir}/thin_dump
|
%{_sbindir}/thin_dump
|
||||||
%{_sbindir}/thin_ls
|
%{_sbindir}/thin_ls
|
||||||
%{_sbindir}/thin_metadata_size
|
%{_sbindir}/thin_metadata_size
|
||||||
|
%{_sbindir}/thin_migrate
|
||||||
%{_sbindir}/thin_repair
|
%{_sbindir}/thin_repair
|
||||||
%{_sbindir}/thin_restore
|
%{_sbindir}/thin_restore
|
||||||
%{_sbindir}/thin_rmap
|
%{_sbindir}/thin_rmap
|
||||||
%{_sbindir}/thin_trim
|
%{_sbindir}/thin_trim
|
||||||
|
%{_sbindir}/thin_metadata_pack
|
||||||
|
%{_sbindir}/thin_metadata_unpack
|
||||||
#% {_sbindir}/thin_show_duplicates
|
#% {_sbindir}/thin_show_duplicates
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 02 2025 Marian Csontos <mcsontos@redhat.com> - 1.3.1-1
|
||||||
|
- Update to latest upstream release 1.3.1.
|
||||||
|
|
||||||
|
* Wed Oct 22 2025 Marian Csontos <mcsontos@redhat.com> - 1.3.0-1
|
||||||
|
- Update to latest upstream release 1.3.0.
|
||||||
|
|
||||||
|
* Thu Sep 04 2025 Marian Csontos <mcsontos@redhat.com> - 1.2.1-1
|
||||||
|
- Update to latest upstream release 1.2.1.
|
||||||
|
|
||||||
|
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.0-2
|
||||||
|
- Rebuilt for the bin-sbin merge (2nd attempt)
|
||||||
|
|
||||||
|
* Mon Sep 02 2024 Marian Csontos <mcsontos@redhat.com> - 1.1.0-1
|
||||||
|
- Update to latest upstream release 1.1.0.
|
||||||
|
|
||||||
|
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.12-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.12-2
|
||||||
|
- Rebuilt for the bin-sbin merge
|
||||||
|
|
||||||
|
* Tue Feb 27 2024 Marian Csontos <mcsontos@redhat.com> - 1.0.12-1
|
||||||
|
- Update to latest upstream release 1.0.12.
|
||||||
|
|
||||||
|
* Tue Feb 13 2024 Marian Csontos <mcsontos@redhat.com> - 1.0.11-4
|
||||||
|
- Add licenses for statically linked libraries.
|
||||||
|
|
||||||
|
* Tue Feb 13 2024 Marian Csontos <mcsontos@redhat.com> - 1.0.11-3
|
||||||
|
- SPDX migration
|
||||||
|
|
||||||
|
* Thu Feb 08 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 1.0.11-2
|
||||||
|
- Update Rust macro usage
|
||||||
|
|
||||||
|
* Thu Feb 08 2024 Marian Csontos <mcsontos@redhat.com> - 1.0.11-1
|
||||||
|
- Update to latest upstream release 1.0.11.
|
||||||
|
|
||||||
|
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Dec 11 2023 Marian Csontos <mcsontos@redhat.com> - 1.0.9-1
|
||||||
|
- Update to latest upstream release 1.0.9.
|
||||||
|
|
||||||
|
* Thu Aug 31 2023 Marian Csontos <mcsontos@redhat.com> - 1.0.6-2
|
||||||
|
- Fix broken installation on ppc64le caused by incorrect ioctl call.
|
||||||
|
|
||||||
|
* Wed Aug 09 2023 Marian Csontos <mcsontos@redhat.com> - 1.0.6-1
|
||||||
|
- Update to latest upstream release 1.0.6.
|
||||||
|
|
||||||
|
* Thu Jul 27 2023 Marian Csontos <mcsontos@redhat.com> - 1.0.5-1
|
||||||
|
- Update to latest upstream release 1.0.5.
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 30 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.0.4-2
|
||||||
|
- Use rust-toolset in RHEL builds
|
||||||
|
|
||||||
|
* Fri Apr 28 2023 Marian Csontos <mcsontos@redhat.com> - 1.0.4-1
|
||||||
|
- Update to latest upstream release 1.0.4.
|
||||||
|
|
||||||
|
* Wed Mar 22 2023 Marian Csontos <mcsontos@redhat.com> - 1.0.3-1
|
||||||
|
- Update to latest upstream release 1.0.3.
|
||||||
|
|
||||||
|
* Sun Feb 05 2023 Fabio Valentini <decathorpe@gmail.com> - 0.9.0-10
|
||||||
|
- Rebuild for fixed frame pointer compiler flags in Rust RPM macros.
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Marian Csontos <mcsontos@redhat.com> - 0.9.0-6
|
||||||
|
- Fix rust-1.53 compilation issues.
|
||||||
|
|
||||||
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 10 2021 Marian Csontos <mcsontos@redhat.com> - 0.9.0-4
|
||||||
|
- Fix gating test syntax.
|
||||||
|
- Fix important issues found by static analysis.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Sep 21 2020 Marian Csontos <mcsontos@redhat.com> - 0.9.0-2
|
||||||
|
- Update crc32c to version 0.5 supporting non x86 architectures
|
||||||
|
|
||||||
|
* Thu Sep 17 2020 Marian Csontos <mcsontos@redhat.com> - 0.9.0-1
|
||||||
|
- Update to latest upstream version
|
||||||
|
- New tools thin_metadata_pack and thin_metadata_unpack
|
||||||
|
|
||||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-4
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
||||||
SHA512 (v0.8.5.tar.gz) = 11e8f6bccaa1d5ccc622a356995f60afa45bba5f4dd80e2fbd7e980963d856a15a32d7b3305e445291936d5207af72fac85d9956680ed7c651383cc57a945451
|
SHA512 (v1.3.1.tar.gz) = ff0758b21b50702568cad88522ee4c2b6b4433cec0a5f5074c9d1791c13e630e5c516601d7a68c51ac34e036091fc82fe831dbe51e6776737571d90ed266878e
|
||||||
|
SHA512 (dmpd131-vendor.tar.gz) = 0e1b8e501e330b64415c9097c94dfc1f1b43d2900a66258e40b6c8f28c51fd61247d60495f594f14550fb349ed4ad435f8959a8808fea1d363a206c5ead7db1e
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
|
||||||
BUILT_FILES=
|
BUILT_FILES=
|
||||||
|
|
||||||
# data files, .c files, scripts anything needed to either compile the test and/or run it.
|
# data files, .c files, scripts anything needed to either compile the test and/or run it.
|
||||||
FILES=$(METADATA) runtest.sh PURPOSE
|
FILES=$(METADATA) runtest.sh PURPOSE testinfo.desc dmpd_functions.py dmpd_library.py Makefile
|
||||||
|
|
||||||
run: $(FILES) build
|
run: $(FILES) build
|
||||||
./runtest.sh
|
./runtest.sh
|
||||||
|
|
@ -62,7 +62,7 @@ include /usr/share/rhts/lib/rhts-make.include
|
||||||
$(METADATA): Makefile
|
$(METADATA): Makefile
|
||||||
@touch $(METADATA)
|
@touch $(METADATA)
|
||||||
# Change to the test owner's name
|
# Change to the test owner's name
|
||||||
@echo "Owner: Jakub Krysl <jkrysl@redhat.com>" > $(METADATA)
|
@echo "Owner: Filip Suba <fsuba@redhat.com>" > $(METADATA)
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
@echo "License: GPL" >> $(METADATA)
|
@echo "License: GPL" >> $(METADATA)
|
||||||
|
|
@ -71,6 +71,5 @@ $(METADATA): Makefile
|
||||||
@echo "TestTime: 1h" >> $(METADATA)
|
@echo "TestTime: 1h" >> $(METADATA)
|
||||||
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
|
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
|
||||||
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
|
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
|
||||||
@echo "RhtsRequires: kernel-kernel-storage-misc-env_setup" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
rhts-lint $(METADATA)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ def thin_init(args):
|
||||||
atomic_run("Creating thin pool",
|
atomic_run("Creating thin pool",
|
||||||
vg_name=args["group"],
|
vg_name=args["group"],
|
||||||
lv_name=args["pool"],
|
lv_name=args["pool"],
|
||||||
options=["-T", "-L 500"],
|
options=["-T", "-L 1500"],
|
||||||
command=lvm.lv_create,
|
command=lvm.lv_create,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ def thin_init(args):
|
||||||
atomic_run("Creating thin LV No. %s" % i,
|
atomic_run("Creating thin LV No. %s" % i,
|
||||||
vg_name=args["group"] + "/" + args["pool"],
|
vg_name=args["group"] + "/" + args["pool"],
|
||||||
lv_name=args["vol"] + str(i),
|
lv_name=args["vol"] + str(i),
|
||||||
options=["-T", "-V 100"],
|
options=["-T", "-V 300"],
|
||||||
command=lvm.lv_create,
|
command=lvm.lv_create,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
|
|
@ -58,28 +58,16 @@ def thin_init(args):
|
||||||
command=create_filesystem,
|
command=create_filesystem,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
atomic_run("Deactivating thin LV No. %s" % i,
|
|
||||||
lv_name=args["vol"] + str(i),
|
|
||||||
vg_name=args["group"],
|
|
||||||
command=lvm.lv_deactivate,
|
|
||||||
errors=errors)
|
|
||||||
|
|
||||||
atomic_run("Creating metadata snapshot",
|
atomic_run("Creating metadata snapshot",
|
||||||
lv_name=args["pool"],
|
lv_name=args["pool"],
|
||||||
vg_name=args["group"],
|
vg_name=args["group"],
|
||||||
command=metadata_snapshot,
|
command=metadata_snapshot,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
atomic_run("Deactivating pool",
|
|
||||||
lv_name=args["pool"],
|
|
||||||
vg_name=args["group"],
|
|
||||||
command=lvm.lv_deactivate,
|
|
||||||
errors=errors)
|
|
||||||
|
|
||||||
atomic_run("Creating swap LV",
|
atomic_run("Creating swap LV",
|
||||||
vg_name=args["group"],
|
vg_name=args["group"],
|
||||||
lv_name=args["swap"],
|
lv_name=args["swap"],
|
||||||
options=["-L 100"],
|
options=["-L 300"],
|
||||||
command=lvm.lv_create,
|
command=lvm.lv_create,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
|
|
@ -89,6 +77,19 @@ def thin_init(args):
|
||||||
command=lvm.lv_deactivate,
|
command=lvm.lv_deactivate,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
|
atomic_run("Deactivating pool",
|
||||||
|
lv_name=args["pool"],
|
||||||
|
vg_name=args["group"],
|
||||||
|
command=lvm.lv_deactivate,
|
||||||
|
errors=errors)
|
||||||
|
|
||||||
|
for i in range(args["number of vols"]):
|
||||||
|
atomic_run("Deactivating thin LV No. %s" % i,
|
||||||
|
lv_name=args["vol"] + str(i),
|
||||||
|
vg_name=args["group"],
|
||||||
|
command=lvm.lv_deactivate,
|
||||||
|
errors=errors)
|
||||||
|
|
||||||
atomic_run("Swapping metadata",
|
atomic_run("Swapping metadata",
|
||||||
vg_name=args["group"],
|
vg_name=args["group"],
|
||||||
lv_name=args["swap"],
|
lv_name=args["swap"],
|
||||||
|
|
@ -195,7 +196,7 @@ def thin_clean(args):
|
||||||
|
|
||||||
def thin_test(args):
|
def thin_test(args):
|
||||||
print("\n#######################################\n")
|
print("\n#######################################\n")
|
||||||
print (
|
print(
|
||||||
"INFO: Testing thin tools runtime provided by device_mapper_persistent_data")
|
"INFO: Testing thin tools runtime provided by device_mapper_persistent_data")
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
@ -281,7 +282,8 @@ def thin_test(args):
|
||||||
command=run,
|
command=run,
|
||||||
errors=errors)
|
errors=errors)
|
||||||
|
|
||||||
atomic_run("Outputting reverse map of metadata device",
|
atomic_run("Outputting reverse map of metadata device with negative number in region",
|
||||||
|
False,
|
||||||
source_vg=args["group"],
|
source_vg=args["group"],
|
||||||
source_lv=args["swap"],
|
source_lv=args["swap"],
|
||||||
region="0..-1",
|
region="0..-1",
|
||||||
|
|
@ -415,7 +417,7 @@ def thin_test(args):
|
||||||
|
|
||||||
def thin_errors_test(args):
|
def thin_errors_test(args):
|
||||||
print("\n#######################################\n")
|
print("\n#######################################\n")
|
||||||
print (
|
print(
|
||||||
"INFO: Testing thin tools errors provided by device_mapper_persistent_data")
|
"INFO: Testing thin tools errors provided by device_mapper_persistent_data")
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
@ -845,7 +847,7 @@ def cache_clean(args):
|
||||||
|
|
||||||
def cache_test(args):
|
def cache_test(args):
|
||||||
print("\n#######################################\n")
|
print("\n#######################################\n")
|
||||||
print ("INFO: Testing cache tools runtime provided by device_mapper_persistent_data")
|
print("INFO: Testing cache tools runtime provided by device_mapper_persistent_data")
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
|
|
@ -965,7 +967,7 @@ def cache_test(args):
|
||||||
|
|
||||||
def cache_errors_test(args):
|
def cache_errors_test(args):
|
||||||
print("\n#######################################\n")
|
print("\n#######################################\n")
|
||||||
print ("INFO: Testing cache tools errors provided by device_mapper_persistent_data")
|
print("INFO: Testing cache tools errors provided by device_mapper_persistent_data")
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
|
|
@ -1111,6 +1113,7 @@ def cache_errors_test(args):
|
||||||
# errors=errors)
|
# errors=errors)
|
||||||
|
|
||||||
#FIXME: Find other way to corrupt metadata, this exploits a bug
|
#FIXME: Find other way to corrupt metadata, this exploits a bug
|
||||||
|
"""
|
||||||
atomic_run("Corrupting mappings on metadata device",
|
atomic_run("Corrupting mappings on metadata device",
|
||||||
False,
|
False,
|
||||||
source_file="Makefile",
|
source_file="Makefile",
|
||||||
|
|
@ -1139,7 +1142,7 @@ def cache_errors_test(args):
|
||||||
source_lv=args['swap'],
|
source_lv=args['swap'],
|
||||||
target_file="/tmp/metadata_repair",
|
target_file="/tmp/metadata_repair",
|
||||||
command=dmpd.cache_repair,
|
command=dmpd.cache_repair,
|
||||||
errors=errors)
|
errors=errors)"""
|
||||||
|
|
||||||
atomic_run("Corrupting metadata on device",
|
atomic_run("Corrupting metadata on device",
|
||||||
cmd="echo 'nothing' >> /dev/mapper/%s-%s" % (args['group'], args['swap']),
|
cmd="echo 'nothing' >> /dev/mapper/%s-%s" % (args['group'], args['swap']),
|
||||||
|
|
@ -1208,6 +1211,7 @@ def main():
|
||||||
"swap": "swapvol"}
|
"swap": "swapvol"}
|
||||||
|
|
||||||
# Initialization
|
# Initialization
|
||||||
|
install_package("lvm2")
|
||||||
install_package("device-mapper-persistent-data")
|
install_package("device-mapper-persistent-data")
|
||||||
|
|
||||||
# Tests for thin tools provided by device-mapper-persistent-data
|
# Tests for thin tools provided by device-mapper-persistent-data
|
||||||
|
|
@ -1223,10 +1227,10 @@ def main():
|
||||||
cache_clean(args)
|
cache_clean(args)
|
||||||
|
|
||||||
if not TC.tend():
|
if not TC.tend():
|
||||||
print "FAIL: test failed"
|
print("FAIL: test failed")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print "PASS: Test pass"
|
print("PASS: Test pass")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
"""dmpd_library.py: Complete library providing functionality for device-mapper-persistent-data upstream test."""
|
"""dmpd_library.py: Complete library providing functionality for device-mapper-persistent-data upstream test."""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
from os.path import expanduser
|
from os.path import expanduser
|
||||||
import re #regex
|
import re #regex
|
||||||
|
|
@ -23,6 +25,8 @@ import sys, os
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import fileinput
|
import fileinput
|
||||||
|
# TODO: Is this really necessary? Unlikely we will run into python2 in rawhide
|
||||||
|
# again...
|
||||||
|
|
||||||
|
|
||||||
def _print(string):
|
def _print(string):
|
||||||
|
|
@ -52,7 +56,7 @@ def run(cmd, return_output=False, verbose=True, force_flush=False):
|
||||||
date = "date \"+%Y-%m-%d %H:%M:%S\""
|
date = "date \"+%Y-%m-%d %H:%M:%S\""
|
||||||
p = subprocess.Popen(date, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
p = subprocess.Popen(date, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
stdout = stdout.rstrip("\n")
|
stdout = stdout.decode('ascii', 'ignore').rstrip("\n")
|
||||||
_print("INFO: [%s] Running: '%s'..." % (stdout, cmd))
|
_print("INFO: [%s] Running: '%s'..." % (stdout, cmd))
|
||||||
|
|
||||||
#enabling shell=True, because was the only way I found to run command with '|'
|
#enabling shell=True, because was the only way I found to run command with '|'
|
||||||
|
|
@ -74,7 +78,7 @@ def run(cmd, return_output=False, verbose=True, force_flush=False):
|
||||||
|
|
||||||
retcode = p.returncode
|
retcode = p.returncode
|
||||||
|
|
||||||
output = stdout + stderr
|
output = stdout.decode('ascii', 'ignore') + stderr.decode('ascii', 'ignore')
|
||||||
|
|
||||||
#remove new line from last line
|
#remove new line from last line
|
||||||
output = output.rstrip()
|
output = output.rstrip()
|
||||||
|
|
@ -152,11 +156,11 @@ def dist_release():
|
||||||
"""
|
"""
|
||||||
Find out the release number of Linux distribution.
|
Find out the release number of Linux distribution.
|
||||||
"""
|
"""
|
||||||
dist = platform.linux_distribution()
|
dist = platform.release()
|
||||||
if not dist or dist[1] == "":
|
if not dist:
|
||||||
_print("WARN: dist_release() - Could not determine dist release")
|
_print("WARN: dist_release() - Could not determine dist release")
|
||||||
return None
|
return None
|
||||||
return dist[1]
|
return dist
|
||||||
|
|
||||||
|
|
||||||
def dist_ver():
|
def dist_ver():
|
||||||
|
|
@ -191,7 +195,8 @@ def show_sys_info():
|
||||||
if run("rpm -q device-mapper-multipath") == 0:
|
if run("rpm -q device-mapper-multipath") == 0:
|
||||||
#Abort test execution if multipath is not working well
|
#Abort test execution if multipath is not working well
|
||||||
if run("multipath -l 2>/dev/null") != 0:
|
if run("multipath -l 2>/dev/null") != 0:
|
||||||
sys.exit(1)
|
print("WARN: Multipath is not configured correctly")
|
||||||
|
return
|
||||||
#Flush all unused multipath devices before starting the test
|
#Flush all unused multipath devices before starting the test
|
||||||
run("multipath -F")
|
run("multipath -F")
|
||||||
run("multipath -r")
|
run("multipath -r")
|
||||||
|
|
@ -602,7 +607,7 @@ class LogChecker:
|
||||||
_print("WARN: Could not open %s" % log_msg_file)
|
_print("WARN: Could not open %s" % log_msg_file)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
log_file = open(log_msg_file)
|
log_file = open(log_msg_file, encoding="utf-8", errors="ignore")
|
||||||
log = log_file.read()
|
log = log_file.read()
|
||||||
|
|
||||||
begin_tag = "\\[ cut here \\]"
|
begin_tag = "\\[ cut here \\]"
|
||||||
|
|
@ -1042,7 +1047,7 @@ class LoopDev:
|
||||||
_print("WARN: Could not create loop device image file")
|
_print("WARN: Could not create loop device image file")
|
||||||
return ret_fail
|
return ret_fail
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print >> sys.err, "command failed: ", e
|
print("command failed: ", e, file=sys.err)
|
||||||
return ret_fail
|
return ret_fail
|
||||||
|
|
||||||
loop_path = self._get_loop_path(name)
|
loop_path = self._get_loop_path(name)
|
||||||
|
|
@ -1125,7 +1130,7 @@ class LoopDev:
|
||||||
name = self._standardize_name(name)
|
name = self._standardize_name(name)
|
||||||
|
|
||||||
# Just try to detach if device is connected, otherwise ignore
|
# Just try to detach if device is connected, otherwise ignore
|
||||||
# print "INFO: Checking if ", loop_path, " exists, to be detached"
|
# print("INFO: Checking if ", loop_path, " exists, to be detached")
|
||||||
dev_path = self._get_loop_path(name)
|
dev_path = self._get_loop_path(name)
|
||||||
if dev_path in devs:
|
if dev_path in devs:
|
||||||
cmd = "losetup -d %s" % dev_path
|
cmd = "losetup -d %s" % dev_path
|
||||||
|
|
@ -1199,7 +1204,7 @@ class LVM:
|
||||||
cmd = "vgcreate %s %s %s" % (options, vg_name, pv_name)
|
cmd = "vgcreate %s %s %s" % (options, vg_name, pv_name)
|
||||||
retcode = run(cmd, verbose=verbose)
|
retcode = run(cmd, verbose=verbose)
|
||||||
if (retcode != 0):
|
if (retcode != 0):
|
||||||
# _print ("WARN: Could not create %s" % vg_name)
|
# _print("WARN: Could not create %s" % vg_name)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
@ -1277,7 +1282,7 @@ class LVM:
|
||||||
_print("WARN: (%s) does not match lvs output format" % lv)
|
_print("WARN: (%s) does not match lvs output format" % lv)
|
||||||
continue
|
continue
|
||||||
lv_info_dict = {}
|
lv_info_dict = {}
|
||||||
for index in xrange(len(param_names)):
|
for index in range(len(param_names)):
|
||||||
lv_info_dict[param_names[index]] = m.group(index + 1)
|
lv_info_dict[param_names[index]] = m.group(index + 1)
|
||||||
lv_list.append(lv_info_dict)
|
lv_list.append(lv_info_dict)
|
||||||
|
|
||||||
|
|
@ -1321,7 +1326,7 @@ class LVM:
|
||||||
cmd = "lvcreate %s %s -n %s" % (" ".join(str(i) for i in options), vg_name, lv_name)
|
cmd = "lvcreate %s %s -n %s" % (" ".join(str(i) for i in options), vg_name, lv_name)
|
||||||
retcode = run(cmd, verbose=verbose)
|
retcode = run(cmd, verbose=verbose)
|
||||||
if (retcode != 0):
|
if (retcode != 0):
|
||||||
# _print ("WARN: Could not create %s" % lv_name)
|
# _print("WARN: Could not create %s" % lv_name)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
@ -1514,7 +1519,7 @@ class DMPD:
|
||||||
_print("WARN: Could not create file to %s metadata to." % command_message)
|
_print("WARN: Could not create file to %s metadata to." % command_message)
|
||||||
return False
|
return False
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print >> sys.err, "command failed: ", e
|
print("command failed: ", e, file=sys.err)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,25 +14,27 @@
|
||||||
#
|
#
|
||||||
# Author: Bruno Goncalves <bgoncalv@redhat.com>
|
# Author: Bruno Goncalves <bgoncalv@redhat.com>
|
||||||
|
|
||||||
from os import walk
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
|
|
||||||
def run(cmd):
|
def run(cmd):
|
||||||
print "INFO: Running '%s'..." % cmd
|
print("INFO: Running '%s'..." % cmd)
|
||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
|
|
||||||
retcode = p.returncode
|
retcode = p.returncode
|
||||||
output = stdout + stderr
|
output = stdout.decode('ascii', 'ignore') + stderr.decode('ascii', 'ignore')
|
||||||
print output
|
|
||||||
|
# remove new line from last line
|
||||||
|
output = output.rstrip()
|
||||||
|
print(output)
|
||||||
return retcode, output
|
return retcode, output
|
||||||
|
|
||||||
def start_test():
|
def start_test():
|
||||||
|
|
||||||
#if uses any library linked to /usr this my affect the tools during boot
|
#if uses any library linked to /usr this my affect the tools during boot
|
||||||
print ("INFO: Making sure tools provided by device-mapper-persistent-data "
|
print("INFO: Making sure tools provided by device-mapper-persistent-data "
|
||||||
"are not linked to /usr")
|
"are not linked to /usr")
|
||||||
|
|
||||||
#Paths where we should have no libraries linked from
|
#Paths where we should have no libraries linked from
|
||||||
|
|
@ -54,7 +56,7 @@ def start_test():
|
||||||
continue
|
continue
|
||||||
tool_error = 0
|
tool_error = 0
|
||||||
for lib_path in lib_paths:
|
for lib_path in lib_paths:
|
||||||
print "INFO: Checking if %s is not linked to libraries at %s" % (tool, lib_path)
|
print("INFO: Checking if %s is not linked to libraries at %s" % (tool, lib_path))
|
||||||
ret, linked_lib = run("ldd %s" % tool)
|
ret, linked_lib = run("ldd %s" % tool)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
print("FAIL: Could not list dynamically libraries for %s" % (tool))
|
print("FAIL: Could not list dynamically libraries for %s" % (tool))
|
||||||
|
|
@ -83,10 +85,10 @@ def start_test():
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
if not start_test():
|
if not start_test():
|
||||||
print "FAIL: test failed"
|
print("FAIL: test failed")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print "PASS: Test pass"
|
print("PASS: Test pass")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue