fix udev rules path

- include rules file in rpmspec
- update install docs with udev build requirement

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Alexander Fougner 2023-12-06 18:20:11 +01:00 committed by Kent Overstreet
parent 5d892680cf
commit 1c2cb80376
5 changed files with 11 additions and 8 deletions

View File

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

View File

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

View File

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

View File

@ -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 <sandeen@sandeen.net> - 2022.11.15-1