Skip to contentSkip to conversation

btrfsprogs: only install udev rules for udev >= 190

PATCH Applied Jeff Mahoney 2 participants 2 messages Aug 31, 2016 – Sep 1, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfsprogs: only install udev rules for udev >= 190

Prior to udev v190, there was no btrfs builtin helper. Installing it on systems with an older udev will cause problems.

---

 configure.ac |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
configure.ac +7 -1
index 97e89f2..8fd8f42 100644
@@ -161,7 +161,13 @@ PKG_STATIC(UUID_LIBS_STATIC, [uuid])
 PKG_CHECK_MODULES(ZLIB, [zlib])
 PKG_STATIC(ZLIB_LIBS_STATIC, [zlib])
 
-UDEVDIR="$(pkg-config udev --variable=udevdir)"
+# udev v190 introduced the btrfs builtin and a udev rule to use it.
+# Our udev rule gives us the friendly dm names but isn't required (or valid)
+# on earlier releases.
+UDEVDIR=
+if pkg-config udev --atleast-version 190; then
+	UDEVDIR="$(pkg-config udev --variable=udevdir)"
+fi
 AC_SUBST(UDEVDIR)
 
 dnl lzo library does not provide pkg-config, let use classic way
Signature · 2 lines
Jeff Mahoney
SUSE Labs
Applied
#1 lore raw
Quoted 4 lines · Jeff Mahoney

Prior to udev v190, there was no btrfs builtin helper. Installing it on systems with an older udev will cause problems.

Applied, thanks.