From: Sughosha via Guix-patches via <guix-patches@gnu.org>
To: Gabriel Wicki <gabriel@erlikon.ch>
Cc: Sughosha <sughosha@disroot.org>,
66870@debbugs.gnu.org, Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#66870] [PATCH v6 08/11] gnu: Add rust-reflink-0.1.
Date: Thu, 28 Nov 2024 22:45:11 +0530 [thread overview]
Message-ID: <a4c1019661374d47d4e94f2823f469e780b84589.1732814114.git.sughosha@disroot.org> (raw)
In-Reply-To: <ceea7qbasyeebkvf7qxo2mg2zvhyznbwyjrcsfzkkxm7bqcscg@nxha7odqzrmv>
* gnu/packages/crates-io.scm (rust-reflink-0.1): New variable.
* gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch:
New file.
* gnu/local.mk: Register the patch file.
Change-Id: I193db0f4e51a133b8791ca9461032655da20137f
---
gnu/local.mk | 1 +
gnu/packages/crates-io.scm | 25 +++++++++++++++++++
...k-0.1-fix-64bit-toolchain-assumption.patch | 24 ++++++++++++++++++
3 files changed, 50 insertions(+)
create mode 100644 gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index bc93477fa3..bfe80f3ebe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2133,6 +2133,7 @@ dist_patch_DATA = \
%D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-1.70-fix-rustix-build.patch \
%D%/packages/patches/rust-cargo-edit-remove-ureq.patch \
+ %D%/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch \
%D%/packages/patches/rust-ring-0.17-ring-core.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
%D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ce339eb3d6..bf41835bf7 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -62339,6 +62339,31 @@ (define-public rust-reference-counted-singleton-0.1
can be recreated as needed.")
(license license:expat)))
+(define-public rust-reflink-0.1
+ (package
+ (name "rust-reflink")
+ (version "0.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "reflink" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1glcyqvryv2zj6kjbfji0cldrkincqx3ds3wjwl4qnsnig15wn5w"))
+ (patches
+ (search-patches
+ "rust-reflink-0.1-fix-64bit-toolchain-assumption.patch"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-libc" ,rust-libc-0.2)
+ ("rust-winapi" ,rust-winapi-0.3))))
+ (home-page "https://github.com/nicokoch/reflink")
+ (synopsis "Copy-on-write mechanism on supported file systems")
+ (description "This package provides copy-on-write mechanism on supported
+file systems.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-refpool-0.4
(package
(name "rust-refpool")
diff --git a/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch b/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
new file mode 100644
index 0000000000..1fc877815f
--- /dev/null
+++ b/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
@@ -0,0 +1,24 @@
+This patch fixes assuming a 64-bit toolchain.
+https://github.com/nicokoch/reflink/pull/5
+
+
+--- reflink-0.1.3/src/sys/unix.rs 2019-04-02 16:13:06.000000000 +0200
++++ "reflink-0.1.3 (Kopie)/src/sys/unix.rs" 2023-06-29 09:47:26.867681403 +0200
+@@ -7,7 +7,7 @@
+ use std::os::unix::io::AsRawFd;
+
+ // TODO is this equal on all archs? Just tested on x86_64 and x86.
+- const IOCTL_FICLONE: u64 = 0x40049409;
++ macro_rules! IOCTL_FICLONE { () => (0x40049409) };
+
+ let src = fs::File::open(&from)?;
+
+@@ -18,7 +18,7 @@
+ .open(&to)?;
+ let ret = unsafe {
+ // http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html
+- libc::ioctl(dest.as_raw_fd(), IOCTL_FICLONE, src.as_raw_fd())
++ libc::ioctl(dest.as_raw_fd(), IOCTL_FICLONE!(), src.as_raw_fd())
+ };
+
+ if ret == -1 {
\ No newline at end of file
--
2.46.0
next prev parent reply other threads:[~2024-11-28 17:21 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 1/6] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 2/6] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 3/6] gnu: Add function2 Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 4/6] gnu: Add tomlplusplus Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 5/6] gnu: Add clap Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 6/6] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 2/7] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 3/7] gnu: Add function2 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 5/7] gnu: Add clap Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 7/7] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 2/7] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 3/7] gnu: Add function2 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 5/7] gnu: Add clap Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 7/7] gnu: Add yabridge Sughosha via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 2/5] gnu: Add function2 Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 3/5] gnu: Add clap Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 4/5] gnu: Add clap-1.1.7 Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 5/5] gnu: Add yabridge Nicolas Graves via Guix-patches via
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
2024-11-28 17:15 ` [bug#66870] [PATCH v6 00/11] gnu: Add yabridge and yabridgectl Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 01/11] gnu: Add bitsery Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 02/11] gnu: Add function2 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 03/11] gnu: Add clap Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 04/11] gnu: Add clap-1.1 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 05/11] gnu: Add yabridge Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 06/11] gnu: rust-rustyline-9: Update to 9.1.2 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 07/11] gnu: Add rust-promptly-0.3 Sughosha via Guix-patches via
2024-11-28 17:15 ` Sughosha via Guix-patches via [this message]
2024-11-28 17:15 ` [bug#66870] [PATCH v6 09/11] gnu: Add rust-ryu-0.2 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 10/11] gnu: Add rust-serde-jsonrc-0.1 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 11/11] gnu: Add yabridgectl Sughosha via Guix-patches via
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=a4c1019661374d47d4e94f2823f469e780b84589.1732814114.git.sughosha@disroot.org \
--to=guix-patches@gnu.org \
--cc=66870@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
--cc=gabriel@erlikon.ch \
--cc=sughosha@disroot.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.