diff --git a/.gitignore b/.gitignore index 4b9fa80..8293048 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,7 @@ /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 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..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 0d5347bd771e960294cd0c2f083d96448613ab9c 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 @@ -11,12 +11,12 @@ make mock happy. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml -index 500345a4..d4aa38a6 100644 +index b33b0a4b..2a87e432 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -27,7 +27,8 @@ quick-xml = "0.29" +@@ -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 af895b3..20578dc 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -9,15 +9,18 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 1.0.9 +Version: 1.0.12 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) + #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: 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 @@ -37,52 +40,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 +49,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 +64,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 +114,20 @@ 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. +- SPDX migration. +- Update Rust macro usage. + +* 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 + +* 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. diff --git a/sources b/sources index dc3f053..05d1960 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.12.tar.gz) = 2e960e5a0d11016c1131ed48678a44c54164b43811f8efaa7172d9df7f433b185fa4b2f8d3d430affff19ced672f74a1f17614efd00287f2c310a6a3745ff8e5 +SHA512 (dmpd1012-vendor.tar.gz) = 02c0015545f05ac71c427f734a766e75a0f5a17a7edddae57abbb0d1277c0d91c6e26d59dd91aef2f2050aee6aef2e118478ca15183c36348e93185ebad3c1e0