bcachefs-tools: update to 1.2.

This commit is contained in:
Leah Neukirchen 2023-10-31 17:49:21 +01:00
parent 571c27e513
commit 173bed201b
3 changed files with 70 additions and 4 deletions

View File

@ -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;

View File

@ -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] $@"

View File

@ -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