2026-07-26 18:01:33 +02:00
|
|
|
# Maintainer: Kira <[@kira](https://dev.kira-linux.org/kira)>
|
|
|
|
|
|
|
|
|
|
pkgname=bcachefs-tools
|
2026-08-12 00:08:36 +02:00
|
|
|
pkgver=1.39.1
|
2026-07-26 18:01:33 +02:00
|
|
|
pkgrel=1
|
|
|
|
|
pkgdesc='BCacheFS filesystem utilities'
|
|
|
|
|
arch=('x86_64')
|
|
|
|
|
url='https://bcachefs.org/'
|
|
|
|
|
license=('GPL-2.0-only')
|
|
|
|
|
_tools_depends=(
|
|
|
|
|
glibc
|
|
|
|
|
keyutils libkeyutils.so
|
|
|
|
|
libaio libaio.so
|
|
|
|
|
libgcc
|
|
|
|
|
libsodium libsodium.so
|
|
|
|
|
libunwind libunwind.so
|
|
|
|
|
liburcu
|
|
|
|
|
lz4
|
|
|
|
|
libudev.so
|
|
|
|
|
udev
|
|
|
|
|
util-linux-libs libblkid.so libuuid.so
|
|
|
|
|
zlib libz.so
|
|
|
|
|
zstd libzstd.so
|
|
|
|
|
)
|
|
|
|
|
makedepends=(
|
|
|
|
|
${_tools_depends[@]}
|
|
|
|
|
rust
|
|
|
|
|
rust-bindgen
|
|
|
|
|
clang
|
|
|
|
|
git
|
|
|
|
|
jq
|
|
|
|
|
llvm
|
|
|
|
|
pkgconf
|
|
|
|
|
)
|
|
|
|
|
options=(!lto)
|
|
|
|
|
|
|
|
|
|
source=(
|
|
|
|
|
https://github.com/koverstreet/bcachefs-tools/archive/refs/tags/v${pkgver}.tar.gz
|
|
|
|
|
)
|
2026-08-12 00:08:36 +02:00
|
|
|
sha256sums=('4c29a25036c5795f9ebe0dbc619c803b73447e8f938bd40e7f7ea223d038a38d')
|
|
|
|
|
b2sums=('7aa199260780c3867295a2bbb46badddd9e9ec84a1339c2d26ebc79048181c88cf96246c1025611c7608962f2efe95769850d836aa927803135fe7a0232a0bfb')
|
2026-07-26 18:01:33 +02:00
|
|
|
|
|
|
|
|
build() {
|
|
|
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
|
|
|
|
|
|
# this uses malloc_usable_size, which is incompatible with fortification level 3
|
|
|
|
|
# https://github.com/koverstreet/bcachefs-tools/issues/237
|
|
|
|
|
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
|
|
|
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
|
|
|
|
|
|
|
|
make \
|
|
|
|
|
LIBEXECDIR=/usr/lib \
|
|
|
|
|
DESTDIR="${pkgdir}" \
|
|
|
|
|
ROOT_SBINDIR="/usr/bin" \
|
|
|
|
|
INITRAMFS_DIR=/usr/lib/initcpio
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package() {
|
|
|
|
|
depends=(
|
|
|
|
|
${_tools_depends[@]}
|
|
|
|
|
)
|
|
|
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
|
|
|
|
|
|
# this uses malloc_usable_size, which is incompatible with fortification level 3
|
|
|
|
|
# https://github.com/koverstreet/bcachefs-tools/issues/237
|
|
|
|
|
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
|
|
|
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
|
|
|
|
|
|
|
|
make \
|
|
|
|
|
PREFIX="/usr" \
|
|
|
|
|
LIBEXECDIR=/usr/lib \
|
|
|
|
|
DESTDIR="${pkgdir}" \
|
|
|
|
|
ROOT_SBINDIR="/usr/bin" \
|
|
|
|
|
INITRAMFS_DIR=/usr/lib/initcpio \
|
|
|
|
|
install
|
|
|
|
|
|
|
|
|
|
# replace incompatible initcpio hooks
|
|
|
|
|
# rm -rf "${pkgdir}"/usr/lib/initcpio/*
|
|
|
|
|
# install -dm755 "${pkgdir}"/usr/lib/initcpio/{hooks,install}
|
|
|
|
|
# install -Dm644 arch/etc/initcpio/hooks/bcachefs "${pkgdir}"/usr/lib/initcpio/hooks/
|
|
|
|
|
# install -Dm644 arch/etc/initcpio/install/bcachefs "${pkgdir}"/usr/lib/initcpio/install/
|
|
|
|
|
|
|
|
|
|
# we do not have initcpio hookers on Kira Linux
|
|
|
|
|
rm -rf "${pkgdir}"/usr/lib/initcpio
|
|
|
|
|
|
|
|
|
|
# remove dkms module from the main package
|
|
|
|
|
rm -rf "${pkgdir}"/usr/src
|
|
|
|
|
|
|
|
|
|
# package completions
|
|
|
|
|
install -dm755 "${pkgdir}"/usr/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
|
|
|
|
"${pkgdir}"/usr/bin/bcachefs completions bash > "${pkgdir}"/usr/share/bash-completion/completions/bcachefs
|
|
|
|
|
"${pkgdir}"/usr/bin/bcachefs completions fish > "${pkgdir}"/usr/share/fish/vendor_completions.d/bcachefs.fish
|
|
|
|
|
"${pkgdir}"/usr/bin/bcachefs completions zsh > "${pkgdir}"/usr/share/zsh/site-functions/_bcachefs
|
|
|
|
|
}
|
|
|
|
|
|