diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 0f7da5c4..e7dac5dd 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -22,7 +22,7 @@ jobs: libkeyutils-dev liblz4-dev libsodium-dev liburcu-dev libzstd-dev \ uuid-dev zlib1g-dev valgrind libudev-dev python3-docutils \ debhelper llvm clang libclang-dev rustc cargo \ - devscripts + devscripts udev - name: Setup Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal diff --git a/INSTALL.md b/INSTALL.md index e5510aa0..2928ed93 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -25,7 +25,7 @@ Debian (Bullseye or later) and Ubuntu (20.04 or later): you can install these wi ``` shell apt install -y pkg-config libaio-dev libblkid-dev libkeyutils-dev \ liblz4-dev libsodium-dev liburcu-dev libzstd-dev \ - uuid-dev zlib1g-dev valgrind libudev-dev git build-essential \ + uuid-dev zlib1g-dev valgrind libudev-dev udev git build-essential \ python3 python3-docutils libclang-dev ``` @@ -34,7 +34,7 @@ Fedora: install the "Development tools" group along with: dnf install -y libaio-devel libsodium-devel \ libblkid-devel libzstd-devel zlib-devel userspace-rcu-devel \ lz4-devel libuuid-devel valgrind-devel keyutils-libs-devel \ - findutils + findutils udev systemd-devel ``` Arch: install bcachefs-tools-git from the AUR. @@ -60,7 +60,7 @@ On Debian/Ubuntu (Bullseye/20.04 or later needed for libfuse >= 3.7): apt install -y libfuse3-dev ``` -On Fedora (32 or later needed for lbifuse >= 3.7): +On Fedora (32 or later needed for libfuse >= 3.7): ```shell dnf install -y fuse3-devel ``` diff --git a/Makefile b/Makefile index 1e3226bd..42692673 100644 --- a/Makefile +++ b/Makefile @@ -73,10 +73,11 @@ PKGCONFIG_LDLIBS:=$(shell $(PKG_CONFIG) --libs $(PKGCONFIG_LIBS)) ifeq (,$(PKGCONFIG_LDLIBS)) $(error pkg-config error, command: $(PKG_CONFIG) --libs $(PKGCONFIG_LIBS)) endif -PKGCONFIG_UDEVRULESDIR:=$(shell $(PKG_CONFIG) --variable=udev_dir udev) -ifeq (,$(PKGCONFIG_UDEVRULESDIR)) - $(error pkg-config error, command: $(PKG_CONFIG) --variable=udev_dir udev) +PKGCONFIG_UDEVDIR:=$(shell $(PKG_CONFIG) --variable=udevdir udev) +ifeq (,$(PKGCONFIG_UDEVDIR)) + $(error pkg-config error, command: $(PKG_CONFIG) --variable=udevdir udev) endif +PKGCONFIG_UDEVRULESDIR:=$(PKGCONFIG_UDEVDIR)/rules.d CFLAGS+=$(PKGCONFIG_CFLAGS) LDLIBS+=$(PKGCONFIG_LDLIBS) @@ -161,7 +162,7 @@ install: bcachefs $(INSTALL) -m0644 -D bcachefs.8 -t $(DESTDIR)$(PREFIX)/share/man/man8/ $(INSTALL) -m0755 -D initramfs/script $(DESTDIR)$(INITRAMFS_SCRIPT) $(INSTALL) -m0755 -D initramfs/hook $(DESTDIR)$(INITRAMFS_HOOK) - $(INSTALL) -m0644 -D udev/bcachefs.rules -t $(DESTDIR)$(PKGCONFIG_UDEVRULESDIR)/ + $(INSTALL) -m0644 -D udev/64-bcachefs.rules -t $(DESTDIR)$(PKGCONFIG_UDEVRULESDIR)/ $(LN) -sfr $(DESTDIR)$(ROOT_SBINDIR)/bcachefs $(DESTDIR)$(ROOT_SBINDIR)/mkfs.bcachefs $(LN) -sfr $(DESTDIR)$(ROOT_SBINDIR)/bcachefs $(DESTDIR)$(ROOT_SBINDIR)/fsck.bcachefs $(LN) -sfr $(DESTDIR)$(ROOT_SBINDIR)/bcachefs $(DESTDIR)$(ROOT_SBINDIR)/mount.bcachefs diff --git a/packaging/bcachefs-tools.spec b/packaging/bcachefs-tools.spec index 24d93dee..7a9e7f16 100644 --- a/packaging/bcachefs-tools.spec +++ b/packaging/bcachefs-tools.spec @@ -20,6 +20,7 @@ BuildRequires: libuuid-devel BuildRequires: libzstd-devel BuildRequires: lz4-devel BuildRequires: systemd-devel +BuildRequires: udev BuildRequires: userspace-rcu-devel BuildRequires: zlib-devel @@ -53,6 +54,7 @@ rm -f %{buildroot}/usr/lib/libbcachefs.so %{_sbindir}/fsck.fuse.bcachefs %{_sbindir}/mkfs.fuse.bcachefs %{_mandir}/man8/bcachefs.8.gz +%{_udevrulesdir}/64-bcachefs.rules %changelog * Tue Nov 15 2022 Eric Sandeen - 2022.11.15-1 diff --git a/udev/bcachefs.rules b/udev/64-bcachefs.rules similarity index 100% rename from udev/bcachefs.rules rename to udev/64-bcachefs.rules