From: mhmdanas <mhmdanas@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] thin-provisioning-tools: update to 1.0.4.
Date: Wed, 03 May 2023 23:15:58 +0200 [thread overview]
Message-ID: <20230503211558.yGTcayRtkj2tm2Wm-31dxTROO_gGcbHKsoORxwu8cQI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43722@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
There is an updated pull request by mhmdanas against master on the void-packages repository
https://github.com/mhmdanas/void-packages thin-provisioning-tools-1.0.4
https://github.com/void-linux/void-packages/pull/43722
thin-provisioning-tools: update to 1.0.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO** (testing appreciated)
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/43722.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-thin-provisioning-tools-1.0.4-43722.patch --]
[-- Type: text/x-diff, Size: 3682 bytes --]
From 1aa71e0d578c68400fe58b98256e9e7d64cda256 Mon Sep 17 00:00:00 2001
From: triallax <triallax@tutanota.com>
Date: Wed, 3 May 2023 01:38:56 +0300
Subject: [PATCH] thin-provisioning-tools: update to 1.0.4.
---
.../patches/fix-musl.diff | 36 +++++++++++++++++++
srcpkgs/thin-provisioning-tools/template | 22 +++++++-----
2 files changed, 49 insertions(+), 9 deletions(-)
create mode 100644 srcpkgs/thin-provisioning-tools/patches/fix-musl.diff
diff --git a/srcpkgs/thin-provisioning-tools/patches/fix-musl.diff b/srcpkgs/thin-provisioning-tools/patches/fix-musl.diff
new file mode 100644
index 000000000000..5f0d03174139
--- /dev/null
+++ b/srcpkgs/thin-provisioning-tools/patches/fix-musl.diff
@@ -0,0 +1,36 @@
+diff --git a/src/file_utils.rs b/src/file_utils.rs
+index 0ca3c0f..279a202 100644
+--- a/src/file_utils.rs
++++ b/src/file_utils.rs
+@@ -56,7 +56,12 @@ fn get_device_size<P: AsRef<Path>>(path: P) -> io::Result<u64> {
+ let fd = file.as_raw_fd();
+ let mut cap = 0u64;
+ unsafe {
+- if libc::ioctl(fd, BLKGETSIZE64 as libc::c_ulong, &mut cap) == 0 {
++ #[cfg(target_env = "musl")]
++ type RequestType = libc::c_int;
++ #[cfg(not(target_env = "musl"))]
++ type RequestType = libc::c_ulong;
++
++ if libc::ioctl(fd, BLKGETSIZE64 as RequestType, &mut cap) == 0 {
+ Ok(cap)
+ } else {
+ Err(io::Error::last_os_error())
+diff --git a/src/thin/trim.rs b/src/thin/trim.rs
+index 3d938ca..80f3d6f 100644
+--- a/src/thin/trim.rs
++++ b/src/thin/trim.rs
+@@ -135,7 +135,12 @@ impl<'a> Iterator for RangeIterator<'a> {
+ const BLKDISCARD: u32 = 0x1277;
+ fn ioctl_blkdiscard(fd: i32, range: &[u64; 2]) -> std::io::Result<()> {
+ unsafe {
+- if libc::ioctl(fd, BLKDISCARD as libc::c_ulong, range) == 0 {
++ #[cfg(target_env = "musl")]
++ type RequestType = libc::c_int;
++ #[cfg(not(target_env = "musl"))]
++ type RequestType = libc::c_ulong;
++
++ if libc::ioctl(fd, BLKDISCARD as RequestType, range) == 0 {
+ Ok(())
+ } else {
+ Err(std::io::Error::last_os_error())
diff --git a/srcpkgs/thin-provisioning-tools/template b/srcpkgs/thin-provisioning-tools/template
index d74be6fe5d72..1eb520953b0a 100644
--- a/srcpkgs/thin-provisioning-tools/template
+++ b/srcpkgs/thin-provisioning-tools/template
@@ -1,21 +1,25 @@
# Template file for 'thin-provisioning-tools'
pkgname=thin-provisioning-tools
-version=0.9.0
+version=1.0.4
revision=1
-build_style=gnu-configure
-hostmakedepends="automake autoconf libtool pkg-config"
-makedepends="boost-devel expat-devel libaio-devel"
+build_style=cargo
+hostmakedepends="pkg-config"
+# Note: links statically to libzstd
+makedepends="libzstd-devel"
short_desc="Tools for manipulating the metadata of dm-thin device-mapper targets"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/jthornber/thin-provisioning-tools"
+changelog="https://raw.githubusercontent.com/jthornber/thin-provisioning-tools/main/CHANGES"
distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=a2508d9933ed8a3f6c8d302280d838d416668a1d914a83c4bd0fb01eaf0676e8
+checksum=a973786fb9cb49d30be6fb8178d6739bc23609d4114ab601f0983ecdbf349abf
+# Does a ton of disk IO.
+make_check=extended
-pre_configure() {
- autoreconf -fi
+post_patch() {
+ vsed -e "s:target/release/pdata_tools:target/${RUST_TARGET}/release/pdata_tools:" -i Makefile
}
-do_install() {
- make DESTDIR=${DESTDIR} BINDIR=${DESTDIR}/usr/bin MANDIR=/usr/share/man install
+post_install() {
+ make DESTDIR=${DESTDIR} BINDIR=${DESTDIR}/usr/bin install
}
next prev parent reply other threads:[~2023-05-03 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 22:40 [PR PATCH] " mhmdanas
2023-05-03 21:15 ` mhmdanas [this message]
2023-05-04 18:05 ` [PR PATCH] [Updated] " mhmdanas
2023-06-11 16:57 ` [PR PATCH] [Closed]: " abenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503211558.yGTcayRtkj2tm2Wm-31dxTROO_gGcbHKsoORxwu8cQI@z \
--to=mhmdanas@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).