From 62ab60b959cea3ea200be41b059836b2f1e3f9a8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 17:03:28 +0000 Subject: [PATCH 01/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index af895b3..f503119 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.9 -Release: 1%{?dist}%{?release_suffix} +Release: 2%{?dist}%{?release_suffix} License: GPLv3+ #ExcludeArch: %%{ix86} URL: https://github.com/jthornber/thin-provisioning-tools @@ -149,6 +149,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.0.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Dec 11 2023 Marian Csontos - 1.0.9-1 - Update to latest upstream release 1.0.9. From c1fa90d775bb5001af1989752d817b76219297cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 09:20:18 +0000 Subject: [PATCH 02/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index f503119..abac08c 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.9 -Release: 2%{?dist}%{?release_suffix} +Release: 3%{?dist}%{?release_suffix} License: GPLv3+ #ExcludeArch: %%{ix86} URL: https://github.com/jthornber/thin-provisioning-tools @@ -149,6 +149,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 32537c977f33bfc2dcd43ed9795c80ec15c7633f Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 8 Feb 2024 15:05:54 +0100 Subject: [PATCH 03/20] Update to version 1.0.11 --- .gitignore | 2 ++ ...-Tweak-cargo.toml-to-work-with-vendor-directory.patch | 8 +++++--- device-mapper-persistent-data.spec | 9 ++++++--- sources | 4 ++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 4b9fa80..b4fb6f7 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ /dmpd106-vendor.tar.gz /v1.0.9.tar.gz /dmpd109-vendor.tar.gz +/v1.0.11.tar.gz +/dmpd1011-vendor.tar.gz diff --git a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch index 1bdbce3..133165a 100644 --- a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +++ b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch @@ -1,4 +1,4 @@ -From 0d5347bd771e960294cd0c2f083d96448613ab9c Mon Sep 17 00:00:00 2001 +From d7c6150c644a299bb8667a3d5a01b0e03449e996 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 27 Jul 2023 11:37:01 +0200 Subject: [PATCH] Tweak cargo.toml to work with vendor directory @@ -6,15 +6,17 @@ Subject: [PATCH] Tweak cargo.toml to work with vendor directory Mock works offline, cargo would try to download the files from github. So cargo vendor has to be run first, and then change the Cargo.toml to make mock happy. + +(cherry picked from commit 0d5347bd771e960294cd0c2f083d96448613ab9c) --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml -index 500345a4..d4aa38a6 100644 +index 23b46193..b33b7418 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -27,7 +27,8 @@ quick-xml = "0.29" +@@ -27,7 +27,8 @@ quick-xml = "0.31" rand = "0.8" rangemap = "1.4" roaring = "0.10" diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index abac08c..13e1bca 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -9,14 +9,14 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.0.9 -Release: 3%{?dist}%{?release_suffix} +Version: 1.0.11 +Release: 1%{?dist}%{?release_suffix} License: GPLv3+ #ExcludeArch: %%{ix86} 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: dmpd109-vendor.tar.gz +Source1: dmpd1011-vendor.tar.gz Patch1: 0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch %if %{defined rhel} @@ -149,6 +149,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Thu Feb 08 2024 Marian Csontos - 1.0.11-1 +- Update to latest upstream release 1.0.11. + * Wed Jan 24 2024 Fedora Release Engineering - 1.0.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index dc3f053..4dee685 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v1.0.9.tar.gz) = c7d137b82cce4286d43f49af039f8026d7d7746e96affebc82e8243173ba9a014e3b462fc4b55850067ecfbcc6113c49f009c1285e272a4d64455715d11a9da1 -SHA512 (dmpd109-vendor.tar.gz) = f2a581da80e4137c6ecab9237587ec42141fdfe8c1bfae2ab5b431b64c100ea6c65cfadbbdd10d665101364731d7c5e61780490b9cfd5231df3f463483890747 +SHA512 (v1.0.11.tar.gz) = e1adacea2a1d6b07fea288080c0d0c24c99f5e6908ac9ac623b86e068991ceb9ae8967cd253a8ee7bf329ab3d4cf9f57d472438a0b0ffa486f7f8939cf9c10db +SHA512 (dmpd1011-vendor.tar.gz) = 67a9753cf4e488ff37a116dd9232c8dbe2d91047fffd2735025aaa26f804150b5de9324e29a5240af75f1591f518913b7831f980871a4f3175f5a05a56893e9d From e9706a7124731b603260d14383c4f64d0f7b93e9 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 8 Feb 2024 12:26:19 -0500 Subject: [PATCH 04/20] Update Rust macro usage The rust-toolset macros in RHEL 10 are now compatible with Fedora's in terms of handling vendoring and automatic generation of license information and bundled provides. --- device-mapper-persistent-data.spec | 61 +++++++----------------------- 1 file changed, 13 insertions(+), 48 deletions(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 13e1bca..c901155 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.11 -Release: 1%{?dist}%{?release_suffix} +Release: 2%{?dist}%{?release_suffix} License: GPLv3+ #ExcludeArch: %%{ix86} URL: https://github.com/jthornber/thin-provisioning-tools @@ -37,52 +37,8 @@ are included and era check, dump, restore and invalidate to manage snapshot eras %prep -%autosetup -p1 -n thin-provisioning-tools-%{version}%{?version_suffix} -#%%cargo_prep -#%%cargo_generate_buildrequires -tar xf %{SOURCE1} -mkdir -p .cargo -( -# Part from %%cargo_prep: -set -euo pipefail -/usr/bin/mkdir -p target/rpm -/usr/bin/ln -s rpm target/release -/usr/bin/rm -rf .cargo/ -/usr/bin/mkdir -p .cargo -cat > .cargo/config << EOF -[build] -rustc = "/usr/bin/rustc" -rustdoc = "/usr/bin/rustdoc" - -[profile.rpm] -inherits = "release" -opt-level = 3 -codegen-units = 1 -debug = 2 -strip = "none" - -[env] -CFLAGS = "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer " -CXXFLAGS = "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer " -LDFLAGS = "-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 " - -[install] -root = "/home/mcsontos/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr" - -[term] -verbose = true -EOF - -# Our own part: -cat >> .cargo/config < VERSION %generate_buildrequires @@ -90,6 +46,9 @@ echo %{version}-%{release} > VERSION %build #make %{?_smp_mflags} V= %cargo_build +%cargo_license_summary +%{cargo_license} > LICENSE.dependencies +%cargo_vendor_manifest %if %{with check} %check @@ -102,7 +61,10 @@ echo %{version}-%{release} > VERSION %make_install MANDIR=%{_mandir} %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_dump.8.gz %{_mandir}/man8/cache_metadata_size.8.gz @@ -149,6 +111,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Thu Feb 08 2024 Yaakov Selkowitz - 1.0.11-2 +- Update Rust macro usage + * Thu Feb 08 2024 Marian Csontos - 1.0.11-1 - Update to latest upstream release 1.0.11. From 36f16d670379620c966d66a905e63707fa5b4e14 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 8 Feb 2024 15:05:54 +0100 Subject: [PATCH 05/20] SPDX migration. --- device-mapper-persistent-data.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index c901155..8644658 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,8 +10,8 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.11 -Release: 2%{?dist}%{?release_suffix} -License: GPLv3+ +Release: 3%{?dist}%{?release_suffix} +License: GPL-3.0-only #ExcludeArch: %%{ix86} URL: https://github.com/jthornber/thin-provisioning-tools #Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-%%{version}.tar.gz @@ -111,6 +111,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Tue Feb 13 2024 Marian Csontos - 1.0.11-3 +- SPDX migration + * Thu Feb 08 2024 Yaakov Selkowitz - 1.0.11-2 - Update Rust macro usage From 7ccc70d06b268eb735fbca85666592754fe18130 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Tue, 27 Feb 2024 10:41:23 +0100 Subject: [PATCH 06/20] SPDX: Add licenses for vendored libraries. --- device-mapper-persistent-data.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 8644658..e0b2dee 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -11,7 +11,8 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.11 Release: 3%{?dist}%{?release_suffix} -License: GPL-3.0-only +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) + #ExcludeArch: %%{ix86} URL: https://github.com/jthornber/thin-provisioning-tools #Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-%%{version}.tar.gz @@ -111,6 +112,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Tue Feb 13 2024 Marian Csontos - 1.0.11-4 +- Add licenses for statically linked libraries. + * Tue Feb 13 2024 Marian Csontos - 1.0.11-3 - SPDX migration From e10017f3760eaedd0f9db0eb85e5498d269fe608 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Tue, 27 Feb 2024 10:42:12 +0100 Subject: [PATCH 07/20] Update to version 1.0.12 --- .gitignore | 2 + ...o.toml-to-work-with-vendor-directory.patch | 10 ++--- ...-set-the-pipe-size-for-triggering-EP.patch | 25 ++++++++++++ ...-tests-Fix-closing-the-pipe-fd-twice.patch | 40 +++++++++++++++++++ device-mapper-persistent-data.spec | 11 +++-- sources | 4 +- 6 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch create mode 100644 0003-tests-Fix-closing-the-pipe-fd-twice.patch diff --git a/.gitignore b/.gitignore index b4fb6f7..8293048 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ /dmpd109-vendor.tar.gz /v1.0.11.tar.gz /dmpd1011-vendor.tar.gz +/v1.0.12.tar.gz +/dmpd1012-vendor.tar.gz diff --git a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch index 133165a..0532ec2 100644 --- a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +++ b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch @@ -1,4 +1,4 @@ -From d7c6150c644a299bb8667a3d5a01b0e03449e996 Mon Sep 17 00:00:00 2001 +From 2a3a7ffa38a2e8ed7f9e89920deabd797ed961d5 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 27 Jul 2023 11:37:01 +0200 Subject: [PATCH] Tweak cargo.toml to work with vendor directory @@ -6,19 +6,17 @@ Subject: [PATCH] Tweak cargo.toml to work with vendor directory Mock works offline, cargo would try to download the files from github. So cargo vendor has to be run first, and then change the Cargo.toml to make mock happy. - -(cherry picked from commit 0d5347bd771e960294cd0c2f083d96448613ab9c) --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml -index 23b46193..b33b7418 100644 +index b33b0a4b..2a87e432 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -27,7 +27,8 @@ quick-xml = "0.31" +@@ -33,7 +33,8 @@ quick-xml = "0.31" rand = "0.8" - rangemap = "1.4" + rangemap = "1.5" roaring = "0.10" -rio = { git = "https://github.com/jthornber/rio", branch = "master", optional = true } +#rio = { git = "https://github.com/jthornber/rio", branch = "master", optional = true } diff --git a/0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch b/0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch new file mode 100644 index 0000000..82159b8 --- /dev/null +++ b/0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch @@ -0,0 +1,25 @@ +From 9e55217135b7543f13a5801aafda0fe0a1fb363a Mon Sep 17 00:00:00 2001 +From: Ming-Hung Tsai +Date: Mon, 26 Feb 2024 21:11:27 +0800 +Subject: [PATCH] [tests] Explicitly set the pipe size for triggering EPIPE + +(cherry picked from commit 0b3c80efd7c627ce7d75397452f496b6329a90c0) +--- + tests/thin_dump.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/thin_dump.rs b/tests/thin_dump.rs +index 81982188..9eade06e 100644 +--- a/tests/thin_dump.rs ++++ b/tests/thin_dump.rs +@@ -154,6 +154,7 @@ fn test_no_stderr_on_broken_pipe(extra_args: &[&std::ffi::OsStr]) -> Result<()> + let mut pipefd = [0i32; 2]; + unsafe { + ensure!(libc::pipe2(pipefd.as_mut_slice().as_mut_ptr(), libc::O_CLOEXEC) == 0); ++ ensure!(libc::fcntl(pipefd[0], libc::F_SETPIPE_SZ, 65536) == 65536); + } + + let mut args = args![&md].to_vec(); +-- +2.43.0 + diff --git a/0003-tests-Fix-closing-the-pipe-fd-twice.patch b/0003-tests-Fix-closing-the-pipe-fd-twice.patch new file mode 100644 index 0000000..0681b5c --- /dev/null +++ b/0003-tests-Fix-closing-the-pipe-fd-twice.patch @@ -0,0 +1,40 @@ +From 54e7eaf002a2b07cd5571b5d3374eb760d727381 Mon Sep 17 00:00:00 2001 +From: Ming-Hung Tsai +Date: Tue, 27 Feb 2024 01:24:01 +0800 +Subject: [PATCH] [tests] Fix closing the pipe fd twice + +The duct::Expression::stdout_file() takes the ownership of the +passed-in file descriptor, thus the caller doesn't need to close +the fd afterward. Closing a fd twice in tests might inadvertently +closing the fd recently opened by other test threads, leading to +unexpected bugs. + +(cherry picked from commit 3b378b0e39a7ae111a81d394f8721bae89f9ca37) +--- + tests/thin_dump.rs | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/tests/thin_dump.rs b/tests/thin_dump.rs +index 9eade06e..caae31ef 100644 +--- a/tests/thin_dump.rs ++++ b/tests/thin_dump.rs +@@ -161,7 +161,7 @@ fn test_no_stderr_on_broken_pipe(extra_args: &[&std::ffi::OsStr]) -> Result<()> + args.extend_from_slice(extra_args); + let cmd = thin_dump_cmd(args) + .to_expr() +- .stdout_file(pipefd[1]) ++ .stdout_file(pipefd[1]) // this transfers ownership of the fd + .stderr_capture(); + let handle = cmd.unchecked().start()?; + +@@ -169,7 +169,6 @@ fn test_no_stderr_on_broken_pipe(extra_args: &[&std::ffi::OsStr]) -> Result<()> + std::thread::sleep(std::time::Duration::from_millis(1000)); + + unsafe { +- libc::close(pipefd[1]); // close the unused write-end + libc::close(pipefd[0]); // causing broken pipe + } + +-- +2.43.0 + diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index e0b2dee..2df597e 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -9,16 +9,18 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.0.11 -Release: 3%{?dist}%{?release_suffix} +Version: 1.0.12 +Release: 1%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} 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: dmpd1011-vendor.tar.gz +Source1: dmpd1012-vendor.tar.gz Patch1: 0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +Patch2: 0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch +Patch3: 0003-tests-Fix-closing-the-pipe-fd-twice.patch %if %{defined rhel} BuildRequires: rust-toolset @@ -112,6 +114,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Tue Feb 27 2024 Marian Csontos - 1.0.12-1 +- Update to latest upstream release 1.0.12. + * Tue Feb 13 2024 Marian Csontos - 1.0.11-4 - Add licenses for statically linked libraries. diff --git a/sources b/sources index 4dee685..05d1960 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v1.0.11.tar.gz) = e1adacea2a1d6b07fea288080c0d0c24c99f5e6908ac9ac623b86e068991ceb9ae8967cd253a8ee7bf329ab3d4cf9f57d472438a0b0ffa486f7f8939cf9c10db -SHA512 (dmpd1011-vendor.tar.gz) = 67a9753cf4e488ff37a116dd9232c8dbe2d91047fffd2735025aaa26f804150b5de9324e29a5240af75f1591f518913b7831f980871a4f3175f5a05a56893e9d +SHA512 (v1.0.12.tar.gz) = 2e960e5a0d11016c1131ed48678a44c54164b43811f8efaa7172d9df7f433b185fa4b2f8d3d430affff19ced672f74a1f17614efd00287f2c310a6a3745ff8e5 +SHA512 (dmpd1012-vendor.tar.gz) = 02c0015545f05ac71c427f734a766e75a0f5a17a7edddae57abbb0d1277c0d91c6e26d59dd91aef2f2050aee6aef2e118478ca15183c36348e93185ebad3c1e0 From 226ede080b60c05ed774629191c6afa29da3e64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 17 Apr 2024 23:26:03 +0200 Subject: [PATCH 08/20] Fix build when %_bindir==%_sbindir Preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin. %install was putting files in the wrong directory. Also, move %install above %test, because %install happens first, and %test after that. --- device-mapper-persistent-data.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 2df597e..eb7bdf4 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -53,16 +53,16 @@ echo %{version}-%{release} > VERSION %{cargo_license} > LICENSE.dependencies %cargo_vendor_manifest +%install +# TODO: Check that MANDIR is unused and remove +%make_install MANDIR=%{_mandir} BINDIR=%{buildroot}%{_sbindir} + %if %{with check} %check %cargo_test #cargo test --test thin_shrink -- --nocapture --test-threads=1 %endif -%install -# TODO: Check that MANDIR is unused and remove -%make_install MANDIR=%{_mandir} - %files %doc README.md %license COPYING From d830fc9808ed959177166fabeb02cda88eaf7f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Jul 2024 12:59:45 +0200 Subject: [PATCH 09/20] Rebuilt for the bin-sbin merge https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index eb7bdf4..f1925e9 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.12 -Release: 1%{?dist}%{?release_suffix} +Release: 2%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} @@ -114,6 +114,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 1.0.12-2 +- Rebuilt for the bin-sbin merge + * Tue Feb 27 2024 Marian Csontos - 1.0.12-1 - Update to latest upstream release 1.0.12. From 4bace50fd14f17ef138bb7b2d7377c4877db8915 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 20:51:53 +0000 Subject: [PATCH 10/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index f1925e9..fcac6bf 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.12 -Release: 2%{?dist}%{?release_suffix} +Release: 3%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} @@ -114,6 +114,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.0.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 1.0.12-2 - Rebuilt for the bin-sbin merge From a540c7b432485d963b1a45fa7765eab155d70de3 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Mon, 2 Sep 2024 15:28:34 +0200 Subject: [PATCH 11/20] Update to version 1.1.0 --- .gitignore | 2 + ...o.toml-to-work-with-vendor-directory.patch | 10 +++-- ...-set-the-pipe-size-for-triggering-EP.patch | 25 ------------ ...-tests-Fix-closing-the-pipe-fd-twice.patch | 40 ------------------- device-mapper-persistent-data.spec | 23 +++++++---- sources | 4 +- 6 files changed, 26 insertions(+), 78 deletions(-) delete mode 100644 0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch delete mode 100644 0003-tests-Fix-closing-the-pipe-fd-twice.patch diff --git a/.gitignore b/.gitignore index 8293048..f182b53 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ /dmpd1011-vendor.tar.gz /v1.0.12.tar.gz /dmpd1012-vendor.tar.gz +/v1.1.0.tar.gz +/dmpd110-vendor.tar.gz diff --git a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch index 0532ec2..fec51a3 100644 --- a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +++ b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch @@ -1,4 +1,4 @@ -From 2a3a7ffa38a2e8ed7f9e89920deabd797ed961d5 Mon Sep 17 00:00:00 2001 +From b0b04e59eb381859f3858120d535cc24059fbc08 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 27 Jul 2023 11:37:01 +0200 Subject: [PATCH] Tweak cargo.toml to work with vendor directory @@ -6,15 +6,17 @@ Subject: [PATCH] Tweak cargo.toml to work with vendor directory Mock works offline, cargo would try to download the files from github. So cargo vendor has to be run first, and then change the Cargo.toml to make mock happy. + +(cherry picked from commit 0d5347bd771e960294cd0c2f083d96448613ab9c) --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml -index b33b0a4b..2a87e432 100644 +index 47703bfc..4c605a54 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -33,7 +33,8 @@ quick-xml = "0.31" +@@ -34,7 +34,8 @@ quick-xml = "0.36" rand = "0.8" rangemap = "1.5" roaring = "0.10" @@ -25,5 +27,5 @@ index b33b0a4b..2a87e432 100644 threadpool = "1.8" thiserror = "1.0" -- -2.43.0 +2.46.0 diff --git a/0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch b/0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch deleted file mode 100644 index 82159b8..0000000 --- a/0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9e55217135b7543f13a5801aafda0fe0a1fb363a Mon Sep 17 00:00:00 2001 -From: Ming-Hung Tsai -Date: Mon, 26 Feb 2024 21:11:27 +0800 -Subject: [PATCH] [tests] Explicitly set the pipe size for triggering EPIPE - -(cherry picked from commit 0b3c80efd7c627ce7d75397452f496b6329a90c0) ---- - tests/thin_dump.rs | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/thin_dump.rs b/tests/thin_dump.rs -index 81982188..9eade06e 100644 ---- a/tests/thin_dump.rs -+++ b/tests/thin_dump.rs -@@ -154,6 +154,7 @@ fn test_no_stderr_on_broken_pipe(extra_args: &[&std::ffi::OsStr]) -> Result<()> - let mut pipefd = [0i32; 2]; - unsafe { - ensure!(libc::pipe2(pipefd.as_mut_slice().as_mut_ptr(), libc::O_CLOEXEC) == 0); -+ ensure!(libc::fcntl(pipefd[0], libc::F_SETPIPE_SZ, 65536) == 65536); - } - - let mut args = args![&md].to_vec(); --- -2.43.0 - diff --git a/0003-tests-Fix-closing-the-pipe-fd-twice.patch b/0003-tests-Fix-closing-the-pipe-fd-twice.patch deleted file mode 100644 index 0681b5c..0000000 --- a/0003-tests-Fix-closing-the-pipe-fd-twice.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 54e7eaf002a2b07cd5571b5d3374eb760d727381 Mon Sep 17 00:00:00 2001 -From: Ming-Hung Tsai -Date: Tue, 27 Feb 2024 01:24:01 +0800 -Subject: [PATCH] [tests] Fix closing the pipe fd twice - -The duct::Expression::stdout_file() takes the ownership of the -passed-in file descriptor, thus the caller doesn't need to close -the fd afterward. Closing a fd twice in tests might inadvertently -closing the fd recently opened by other test threads, leading to -unexpected bugs. - -(cherry picked from commit 3b378b0e39a7ae111a81d394f8721bae89f9ca37) ---- - tests/thin_dump.rs | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/tests/thin_dump.rs b/tests/thin_dump.rs -index 9eade06e..caae31ef 100644 ---- a/tests/thin_dump.rs -+++ b/tests/thin_dump.rs -@@ -161,7 +161,7 @@ fn test_no_stderr_on_broken_pipe(extra_args: &[&std::ffi::OsStr]) -> Result<()> - args.extend_from_slice(extra_args); - let cmd = thin_dump_cmd(args) - .to_expr() -- .stdout_file(pipefd[1]) -+ .stdout_file(pipefd[1]) // this transfers ownership of the fd - .stderr_capture(); - let handle = cmd.unchecked().start()?; - -@@ -169,7 +169,6 @@ fn test_no_stderr_on_broken_pipe(extra_args: &[&std::ffi::OsStr]) -> Result<()> - std::thread::sleep(std::time::Duration::from_millis(1000)); - - unsafe { -- libc::close(pipefd[1]); // close the unused write-end - libc::close(pipefd[0]); // causing broken pipe - } - --- -2.43.0 - diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index fcac6bf..4390168 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -2,25 +2,23 @@ # Copyright (C) 2011-2017 Red Hat, Inc # %bcond_without check -%global debug_package %{nil} +#%%global debug_package %%{nil} #%%global version_suffix -rc2 #%%global release_suffix .test3 Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.0.12 -Release: 3%{?dist}%{?release_suffix} +Version: 1.1.0 +Release: 1%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} 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: dmpd1012-vendor.tar.gz +Source1: dmpd110-vendor.tar.gz Patch1: 0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch -Patch2: 0002-tests-Explicitly-set-the-pipe-size-for-triggering-EP.patch -Patch3: 0003-tests-Fix-closing-the-pipe-fd-twice.patch %if %{defined rhel} BuildRequires: rust-toolset @@ -30,6 +28,12 @@ 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 thin-provisioning-tools contains check,dump,restore,repair,rmap @@ -55,7 +59,7 @@ echo %{version}-%{release} > VERSION %install # TODO: Check that MANDIR is unused and remove -%make_install MANDIR=%{_mandir} BINDIR=%{buildroot}%{_sbindir} +%make_install STRIP=true MANDIR=%{_mandir} BINDIR=%{buildroot}%{_sbindir} %if %{with check} %check @@ -83,6 +87,7 @@ echo %{version}-%{release} > VERSION %{_mandir}/man8/thin_dump.8.gz %{_mandir}/man8/thin_ls.8.gz %{_mandir}/man8/thin_metadata_size.8.gz +%{_mandir}/man8/thin_migrate.8.gz %{_mandir}/man8/thin_repair.8.gz %{_mandir}/man8/thin_restore.8.gz %{_mandir}/man8/thin_rmap.8.gz @@ -105,6 +110,7 @@ echo %{version}-%{release} > VERSION %{_sbindir}/thin_dump %{_sbindir}/thin_ls %{_sbindir}/thin_metadata_size +%{_sbindir}/thin_migrate %{_sbindir}/thin_repair %{_sbindir}/thin_restore %{_sbindir}/thin_rmap @@ -114,6 +120,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Mon Sep 02 2024 Marian Csontos - 1.1.0-1 +- Update to latest upstream release 1.1.0. + * Wed Jul 17 2024 Fedora Release Engineering - 1.0.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 05d1960..0d0f396 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v1.0.12.tar.gz) = 2e960e5a0d11016c1131ed48678a44c54164b43811f8efaa7172d9df7f433b185fa4b2f8d3d430affff19ced672f74a1f17614efd00287f2c310a6a3745ff8e5 -SHA512 (dmpd1012-vendor.tar.gz) = 02c0015545f05ac71c427f734a766e75a0f5a17a7edddae57abbb0d1277c0d91c6e26d59dd91aef2f2050aee6aef2e118478ca15183c36348e93185ebad3c1e0 +SHA512 (v1.1.0.tar.gz) = 8cf3953743334b5a34504695757fa2de5a5fb5bdb8c7aed859995154fc004f52c3ef041558d307a2309c2de8dcdcbd8a0537bd3408fd78c7ff2f641f28944c1e +SHA512 (dmpd110-vendor.tar.gz) = 05c32ade894331eb11239c88d702d20ac463745b51d2c8b71d5aed75ce443ab160d94cd33bdbf021982fe3edc21c630e5bd5dba66d890b352bb6636d09667077 From 42f0442c767c4c175e834002cb29f7489fd4fbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:26:13 +0100 Subject: [PATCH 12/20] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 4390168..db4d9c0 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.1.0 -Release: 1%{?dist}%{?release_suffix} +Release: 2%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} @@ -120,6 +120,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 1.1.0-2 +- Rebuilt for the bin-sbin merge (2nd attempt) + * Mon Sep 02 2024 Marian Csontos - 1.1.0-1 - Update to latest upstream release 1.1.0. From cfc94352300c8ee9a02733c7a0229e69d7179c06 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 15:37:25 +0000 Subject: [PATCH 13/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index db4d9c0..3ab5afa 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.1.0 -Release: 2%{?dist}%{?release_suffix} +Release: 3%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} @@ -120,6 +120,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 1.1.0-2 - Rebuilt for the bin-sbin merge (2nd attempt) From afa261551b1e2910bf7942d68412ab66e8e8217a Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Wed, 11 Jun 2025 15:20:55 +0200 Subject: [PATCH 14/20] Update README Describe Cargo.toml patching. And explain the notes to greater detail. --- README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4c77f74..ab05368 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,30 @@ # Packaging dmpd -This is mostly regular package except recent addition of rust to used languages. +This is rust package using *vendor* file for dependencies. -## rust-tools - -To build the rust-tools (`make rust-tools`) one needs: +To build the package following tooling is needed: - rust >= 1.35 -- cargo with vendor subcommand (now upstream, included in latest Fedora and RHEL8) +- cargo with vendor subcommand (now upstream, included in latest Fedora and RHEL8+) -### cargo vendpr +## cargo vendor -- run `cargo vendor` in the disrectory with sources +- run `cargo vendor` in the directory 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` +- some dependencies (at the moment only *rio*) are not using upstream from + registry, but a patched version. **After** running cargo vendor apply patch + *0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch* so build does not + try to connect to internet. This dependency is being replaced by supported + crate. ## 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? +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 defualt in */usr/bin* but the package expects */usr/sbin*. For now I run *make install-rust-tools*. +*%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. From 6eaa83f88661250417023e409095669b27768f42 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Mon, 16 Jun 2025 15:20:46 +0200 Subject: [PATCH 15/20] Update README --- README.md | 60 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ab05368..225838a 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,55 @@ -# Packaging dmpd +# Packaging device-mapper-persitent-data (AKA dmpd) -This is rust package using *vendor* file for dependencies. +This is rust package using *vendor* file for dependencies. (Vendor file is an archive of dependencies' sources.) -To build the package following tooling is needed: +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`. -- rust >= 1.35 -- cargo with vendor subcommand (now upstream, included in latest Fedora and RHEL8+) +Alternatively before committing anything use `fedpkg srpm` and `fedpkg scratch-build --srpm $SRPM [--arches x86_64]` to create a scratch build. -## cargo vendor +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. -- run `cargo vendor` in the directory 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: +## 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/mingnus/thin-merge/archive/v$VERSION.tar.gz` +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` -- some dependencies (at the moment only *rio*) are not using upstream from - registry, but a patched version. **After** running cargo vendor apply patch - *0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch* so build does not - try to connect to internet. This dependency is being replaced by supported - crate. +4. You may need to update *0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch* to modify + *Cargo.toml* file. Some dependencies (at the moment only *rio*) are not + using upstream from registry, but a patched version. With unmodified + *Cargo.toml* build would fail as it would try to reach to internet. + - NOTE: This patch **MUST NOT** be present in the upstream source directory + when running `cargo vendor`. + - I apply the patch after step 1, and use `git format-patch HEAD^` to + create the patch and add the patch to dist-git directory afterwards. + - The work to replace dependency on rio is in progress. ## TODO/NOTES From f8b6ae0ff5280ae6cff3ea0d91ca36780e198ec1 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 26 Jun 2025 13:53:30 +0200 Subject: [PATCH 16/20] Fix tarball links --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 225838a..1f4acf9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ In the upstream directory: In the dist-git directory: -1. Get the upstream tarball `wget https://github.com/mingnus/thin-merge/archive/v$VERSION.tar.gz` +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` From f5a75df400370d2620d498c6e0a437958baf4d43 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:13:00 +0000 Subject: [PATCH 17/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- device-mapper-persistent-data.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 3ab5afa..d93a722 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.1.0 -Release: 3%{?dist}%{?release_suffix} +Release: 4%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} @@ -120,6 +120,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jan 16 2025 Fedora Release Engineering - 1.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 6e755274167a3b1d286cd794a9508486b11c637c Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 4 Sep 2025 15:46:21 +0200 Subject: [PATCH 18/20] Update to version 1.2.1 --- .gitignore | 2 ++ ...o.toml-to-work-with-vendor-directory.patch | 22 +++++++++---------- device-mapper-persistent-data.spec | 21 +++++++++++++++--- sources | 4 ++-- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index f182b53..b493c9d 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,5 @@ /dmpd1012-vendor.tar.gz /v1.1.0.tar.gz /dmpd110-vendor.tar.gz +/v1.2.1.tar.gz +/dmpd121-vendor.tar.gz diff --git a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch index fec51a3..1d96b49 100644 --- a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +++ b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch @@ -1,6 +1,6 @@ -From b0b04e59eb381859f3858120d535cc24059fbc08 Mon Sep 17 00:00:00 2001 +From 954a2fd73edd2b07543c37143be7cce5ba4f5459 Mon Sep 17 00:00:00 2001 From: Marian Csontos -Date: Thu, 27 Jul 2023 11:37:01 +0200 +Date: Thu, 4 Sep 2025 11:16:06 +0200 Subject: [PATCH] Tweak cargo.toml to work with vendor directory Mock works offline, cargo would try to download the files from github. @@ -13,19 +13,19 @@ make mock happy. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml -index 47703bfc..4c605a54 100644 +index 7924643f..227ebc06 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -34,7 +34,8 @@ quick-xml = "0.36" - rand = "0.8" - rangemap = "1.5" - roaring = "0.10" +@@ -33,7 +33,8 @@ quick-xml = "0.38" + rand = "0.9" + rangemap = "1.6" + roaring = "0.11" -rio = { git = "https://github.com/jthornber/rio", branch = "master", optional = true } +#rio = { git = "https://github.com/jthornber/rio", branch = "master", optional = true } +rio = { version = "0.9.4", optional = true } - safemem = "0.3" - threadpool = "1.8" - thiserror = "1.0" + thiserror = "2.0" + tui = { version = "0.19", default-features = false, features = [ + "termion", -- -2.46.0 +2.51.0 diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index d93a722..078e982 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -9,15 +9,15 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.1.0 -Release: 4%{?dist}%{?release_suffix} +Version: 1.2.1 +Release: 1%{?dist}%{?release_suffix} 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) #ExcludeArch: %%{ix86} 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: dmpd110-vendor.tar.gz +Source1: dmpd121-vendor.tar.gz Patch1: 0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch %if %{defined rhel} @@ -46,6 +46,18 @@ snapshot eras %prep %autosetup -p1 -n thin-provisioning-tools-%{version}%{?version_suffix} -a1 %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 %generate_buildrequires @@ -120,6 +132,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Thu Sep 04 2025 Marian Csontos - 1.2.1-1 +- Update to latest upstream release 1.2.1. + * Wed Jul 23 2025 Fedora Release Engineering - 1.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 0d0f396..eb39fed 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v1.1.0.tar.gz) = 8cf3953743334b5a34504695757fa2de5a5fb5bdb8c7aed859995154fc004f52c3ef041558d307a2309c2de8dcdcbd8a0537bd3408fd78c7ff2f641f28944c1e -SHA512 (dmpd110-vendor.tar.gz) = 05c32ade894331eb11239c88d702d20ac463745b51d2c8b71d5aed75ce443ab160d94cd33bdbf021982fe3edc21c630e5bd5dba66d890b352bb6636d09667077 +SHA512 (v1.2.1.tar.gz) = cc96f8d4b32eb3f905e24db3ba9d291436effdea1c468c1f2292da20fdd8438058552314b5802450f62af414fb338cadff06b37c927f2272b8e34d3704a6a59b +SHA512 (dmpd121-vendor.tar.gz) = 999395721d94f35f459faf855ca718e5746f72989ca532aa85174b3d7d86ba31779718034248cabba708e12f4ef26747970d3ca8a4326eb19012287377aab969 From af8fbf5a507de6aa74b60f437cbb46ac0b92dfcf Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Wed, 22 Oct 2025 16:56:52 +0200 Subject: [PATCH 19/20] Update to version 1.3.0 --- .gitignore | 2 ++ ...o.toml-to-work-with-vendor-directory.patch | 31 ------------------- README.md | 9 ------ device-mapper-persistent-data.spec | 8 +++-- sources | 4 +-- 5 files changed, 9 insertions(+), 45 deletions(-) delete mode 100644 0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch diff --git a/.gitignore b/.gitignore index b493c9d..7903be8 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,5 @@ /dmpd110-vendor.tar.gz /v1.2.1.tar.gz /dmpd121-vendor.tar.gz +/v1.3.0.tar.gz +/dmpd130-vendor.tar.gz diff --git a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch b/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch deleted file mode 100644 index 1d96b49..0000000 --- a/0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 954a2fd73edd2b07543c37143be7cce5ba4f5459 Mon Sep 17 00:00:00 2001 -From: Marian Csontos -Date: Thu, 4 Sep 2025 11:16:06 +0200 -Subject: [PATCH] Tweak cargo.toml to work with vendor directory - -Mock works offline, cargo would try to download the files from github. -So cargo vendor has to be run first, and then change the Cargo.toml to -make mock happy. - -(cherry picked from commit 0d5347bd771e960294cd0c2f083d96448613ab9c) ---- - Cargo.toml | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index 7924643f..227ebc06 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -33,7 +33,8 @@ quick-xml = "0.38" - rand = "0.9" - rangemap = "1.6" - roaring = "0.11" --rio = { git = "https://github.com/jthornber/rio", branch = "master", optional = true } -+#rio = { git = "https://github.com/jthornber/rio", branch = "master", optional = true } -+rio = { version = "0.9.4", optional = true } - thiserror = "2.0" - tui = { version = "0.19", default-features = false, features = [ - "termion", --- -2.51.0 - diff --git a/README.md b/README.md index 1f4acf9..a81396d 100644 --- a/README.md +++ b/README.md @@ -42,15 +42,6 @@ In the dist-git directory: 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` -4. You may need to update *0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch* to modify - *Cargo.toml* file. Some dependencies (at the moment only *rio*) are not - using upstream from registry, but a patched version. With unmodified - *Cargo.toml* build would fail as it would try to reach to internet. - - NOTE: This patch **MUST NOT** be present in the upstream source directory - when running `cargo vendor`. - - I apply the patch after step 1, and use `git format-patch HEAD^` to - create the patch and add the patch to dist-git directory afterwards. - - The work to replace dependency on rio is in progress. ## TODO/NOTES diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 078e982..6d1a0c4 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -9,7 +9,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.2.1 +Version: 1.3.0 Release: 1%{?dist}%{?release_suffix} 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) @@ -17,8 +17,7 @@ License: GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache 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: dmpd121-vendor.tar.gz -Patch1: 0001-Tweak-cargo.toml-to-work-with-vendor-directory.patch +Source1: dmpd130-vendor.tar.gz %if %{defined rhel} BuildRequires: rust-toolset @@ -132,6 +131,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Wed Oct 22 2025 Marian Csontos - 1.3.0-1 +- Update to latest upstream release 1.3.0. + * Thu Sep 04 2025 Marian Csontos - 1.2.1-1 - Update to latest upstream release 1.2.1. diff --git a/sources b/sources index eb39fed..10e4d92 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v1.2.1.tar.gz) = cc96f8d4b32eb3f905e24db3ba9d291436effdea1c468c1f2292da20fdd8438058552314b5802450f62af414fb338cadff06b37c927f2272b8e34d3704a6a59b -SHA512 (dmpd121-vendor.tar.gz) = 999395721d94f35f459faf855ca718e5746f72989ca532aa85174b3d7d86ba31779718034248cabba708e12f4ef26747970d3ca8a4326eb19012287377aab969 +SHA512 (v1.3.0.tar.gz) = 84e364df240a43fea44edfe14cf428d79d1301891b2482599229e125768912127922377139c2117db50a5370fb08c0f52d589d11b6a90673af2d242ff4ef7920 +SHA512 (dmpd130-vendor.tar.gz) = 9f5e7e68da29189f74dfae5d8c219917b3e11fe73e9f978fec22d3003734a6fff2df6fb1a83c84a666726ba473f611aabd2ecf77ff859c0b3be85dc48a6dcf21 From 010e823bf009dac2fdbd046e5d979d16c536df37 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Tue, 2 Dec 2025 12:17:27 +0100 Subject: [PATCH 20/20] Update to version 1.3.1 --- .gitignore | 2 ++ device-mapper-persistent-data.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7903be8..1844bef 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ /dmpd121-vendor.tar.gz /v1.3.0.tar.gz /dmpd130-vendor.tar.gz +/v1.3.1.tar.gz +/dmpd131-vendor.tar.gz diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index 6d1a0c4..213bfff 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -9,7 +9,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.3.0 +Version: 1.3.1 Release: 1%{?dist}%{?release_suffix} 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) @@ -17,7 +17,7 @@ License: GPL-3.0-only AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache 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: dmpd130-vendor.tar.gz +Source1: dmpd131-vendor.tar.gz %if %{defined rhel} BuildRequires: rust-toolset @@ -131,6 +131,9 @@ echo %{version}-%{release} > VERSION #% {_sbindir}/thin_show_duplicates %changelog +* Tue Dec 02 2025 Marian Csontos - 1.3.1-1 +- Update to latest upstream release 1.3.1. + * Wed Oct 22 2025 Marian Csontos - 1.3.0-1 - Update to latest upstream release 1.3.0. diff --git a/sources b/sources index 10e4d92..4ddfdfb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v1.3.0.tar.gz) = 84e364df240a43fea44edfe14cf428d79d1301891b2482599229e125768912127922377139c2117db50a5370fb08c0f52d589d11b6a90673af2d242ff4ef7920 -SHA512 (dmpd130-vendor.tar.gz) = 9f5e7e68da29189f74dfae5d8c219917b3e11fe73e9f978fec22d3003734a6fff2df6fb1a83c84a666726ba473f611aabd2ecf77ff859c0b3be85dc48a6dcf21 +SHA512 (v1.3.1.tar.gz) = ff0758b21b50702568cad88522ee4c2b6b4433cec0a5f5074c9d1791c13e630e5c516601d7a68c51ac34e036091fc82fe831dbe51e6776737571d90ed266878e +SHA512 (dmpd131-vendor.tar.gz) = 0e1b8e501e330b64415c9097c94dfc1f1b43d2900a66258e40b6c8f28c51fd61247d60495f594f14550fb349ed4ad435f8959a8808fea1d363a206c5ead7db1e