Github messages for voidlinux
 help / color / mirror / Atom feed
From: leahneukirchen <leahneukirchen@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] bcachefs-tools: update to 1.2.
Date: Thu, 02 Nov 2023 13:21:15 +0100	[thread overview]
Message-ID: <20231102122115.4QB5c3FbUq5r1jmNnInV6hORQZ2r8K_bHTL24wykuNc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46988@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages bcachefs-tools-12
https://github.com/void-linux/void-packages/pull/46988

bcachefs-tools: update to 1.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### 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/46988.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bcachefs-tools-12-46988.patch --]
[-- Type: text/x-diff, Size: 4497 bytes --]

From e5af1a58e3ddc0906efb42b6977d2689aef1bad7 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 31 Oct 2023 17:49:21 +0100
Subject: [PATCH] bcachefs-tools: update to 1.2.

---
 srcpkgs/bcachefs-tools/patches/32bit.patch | 42 ++++++++++++++++++++++
 srcpkgs/bcachefs-tools/patches/make.patch  | 22 ++++++++++++
 srcpkgs/bcachefs-tools/template            | 10 +++---
 3 files changed, 70 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/bcachefs-tools/patches/32bit.patch
 create mode 100644 srcpkgs/bcachefs-tools/patches/make.patch

diff --git a/srcpkgs/bcachefs-tools/patches/32bit.patch b/srcpkgs/bcachefs-tools/patches/32bit.patch
new file mode 100644
index 0000000000000..5002e103fceb7
--- /dev/null
+++ b/srcpkgs/bcachefs-tools/patches/32bit.patch
@@ -0,0 +1,42 @@
+mount(2) takes an unsigned long parameter, which is not u64 on 32-bit
+architectures.
+
+--- a/rust-src/src/cmd_mount.rs
++++ b/rust-src/src/cmd_mount.rs
+@@ -7,14 +7,14 @@
+ use crate::key;
+ use crate::key::KeyLoc;
+ use crate::logger::SimpleLogger;
+-use std::ffi::{CStr, CString, OsStr, c_int, c_char, c_void};
++use std::ffi::{CStr, CString, OsStr, c_int, c_char, c_ulong, c_void};
+ use std::os::unix::ffi::OsStrExt;
+ 
+ fn mount_inner(
+     src: String,
+     target: impl AsRef<std::path::Path>,
+     fstype: &str,
+-    mountflags: u64,
++    mountflags: c_ulong,
+     data: Option<String>,
+ ) -> anyhow::Result<()> {
+ 
+@@ -45,7 +45,7 @@
+ 
+ /// Parse a comma-separated mount options and split out mountflags and filesystem
+ /// specific options.
+-fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, u64) {
++fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, c_ulong) {
+     use either::Either::*;
+     debug!("parsing mount options: {}", options.as_ref());
+     let (opts, flags) = options
+--- a/libbcachefs/btree_write_buffer.c
++++ b/libbcachefs/btree_write_buffer.c
+@@ -340,7 +340,7 @@
+ 	bch2_journal_pin_add(&c->journal, trans->journal_res.seq, &wb->journal_pin,
+ 			     bch2_btree_write_buffer_journal_flush);
+ 
+-	atomic64_sub_return_release(btree_write_buffer_ref(new.idx), &wb->state.counter);
++	atomic64_sub_return(btree_write_buffer_ref(new.idx), &wb->state.counter);
+ out:
+ 	preempt_enable();
+ 	return ret;
diff --git a/srcpkgs/bcachefs-tools/patches/make.patch b/srcpkgs/bcachefs-tools/patches/make.patch
new file mode 100644
index 0000000000000..d39baba7e29cc
--- /dev/null
+++ b/srcpkgs/bcachefs-tools/patches/make.patch
@@ -0,0 +1,22 @@
+--- a/Makefile
++++ b/Makefile
+@@ -39,7 +39,7 @@
+ CARGO_PROFILE=release
+ # CARGO_PROFILE=debug
+ 
+-CARGO_BUILD_ARGS=--$(CARGO_PROFILE)
++CARGO_BUILD_ARGS=--$(CARGO_PROFILE) --target $(RUST_TARGET)
+ CARGO_BUILD=$(CARGO) build $(CARGO_BUILD_ARGS)
+ VERSION?=$(shell git describe --dirty=+ 2>/dev/null || echo v0.1-nogit)
+ 
+@@ -126,7 +126,10 @@
+ 
+ RUST_SRCS=$(shell find rust-src/src rust-src/bch_bindgen/src -type f -iname '*.rs')
+ rust-src/target/release/libbcachefs_rust.a: $(RUST_SRCS)
+ 	$(CARGO_BUILD) --manifest-path rust-src/Cargo.toml
++	if [ -f rust-src/target/*/release/libbcachefs_rust.a ]; then \
++		cp rust-src/target/*/release/libbcachefs_rust.a $@; \
++	fi
+ 
+ tests/test_helper: $(filter ./tests/%.o, $(OBJS))
+ 	@echo "    [LD]     $@"
diff --git a/srcpkgs/bcachefs-tools/template b/srcpkgs/bcachefs-tools/template
index 63ae509da080d..58e36a727d197 100644
--- a/srcpkgs/bcachefs-tools/template
+++ b/srcpkgs/bcachefs-tools/template
@@ -1,12 +1,13 @@
 # Template file for 'bcachefs-tools'
 pkgname=bcachefs-tools
-version=24
+reverts="24_1"
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_install_args="ROOT_SBINDIR=/usr/bin"
 make_use_env=yes
-hostmakedepends="pkg-config"
-makedepends="attr-devel keyutils-devel libaio-devel libblkid-devel
+hostmakedepends="pkg-config cargo clang"
+makedepends="rust attr-devel keyutils-devel libaio-devel libblkid-devel
  liblz4-devel libscrypt-devel libsodium-devel libudev-devel liburcu-devel
  libuuid-devel libzstd-devel zlib-devel"
 short_desc="Userspace tools for bcachefs"
@@ -14,6 +15,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="GPL-2.0-only"
 homepage="https://bcachefs.org/"
 distfiles="https://github.com/koverstreet/bcachefs-tools/archive/refs/tags/v${version}.tar.gz"
-checksum=4631f8ba752c562f0e7d74a8052bace39abefa98421e4a2989069d988892c264
+checksum=2f7b68576303bcbb80ea6c4042aa27b1b1027739f3de68106ca9166963e161dc
 
 export VERSION=v${version}
+export RUST_TARGET

  reply	other threads:[~2023-11-02 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 16:52 [PR PATCH] " leahneukirchen
2023-11-02 12:21 ` leahneukirchen [this message]
2023-11-02 12:31 ` [PR PATCH] [Merged]: " leahneukirchen

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=20231102122115.4QB5c3FbUq5r1jmNnInV6hORQZ2r8K_bHTL24wykuNc@z \
    --to=leahneukirchen@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).