gfs2-utils/scripts_install_the_withdraw_udev_rules_script.patch
Andrew Price 6d1e4a09ae * Thu Aug 20 2015 Andrew Price <anprice@redhat.com> - 3.1.8-5
- Add patches to install the withdraw helper script properly:
  scripts_rename_gfs2_wd_udev_sh_to_gfs2_withdraw_helper.patch
  scripts_install_the_withdraw_helper_script.patch
  scripts_install_the_withdraw_udev_rules_script.patch
- Remove the obsolete udev script installation bits
2015-08-20 16:11:44 +01:00

73 lines
2.7 KiB
Diff

commit 9aa261bd5e65beb757b0953ba43211fc29641952
Author: Andrew Price <anprice@redhat.com>
Date: Wed Aug 19 12:13:39 2015 +0100
scripts: install the withdraw udev rules script
Add a --with-udevdir configure option and default to $prefix/lib/udev.
Note that we can't use $libdir for this as that will often be /usr/lib64
and the udevdir is arch-independent.
Also add the autoconf bits needed to install 82-gfs2-withdraw.rules into
$udevdir/rules.d
Signed-off-by: Andrew Price <anprice@redhat.com>
diff --git a/README.build b/README.build
index acfde1b..d0a21c3 100644
--- a/README.build
+++ b/README.build
@@ -31,10 +31,9 @@ To install gfs2-utils, run:
The following scripts (located in gfs2/scripts) are used to complete
the userland portion of the gfs2 withdraw feature using uevents. They
-are not installed by 'make install' and need to be installed manually
-or during rpm installation to the corresponding locations.
+will be installed by 'make install' to these directories by default:
- 82-gfs2-withdraw.rules in /etc/udev/rules.d/
+ 82-gfs2-withdraw.rules in /usr/lib/udev/rules.d/
gfs2_withdraw_helper in /usr/sbin/
See also doc/README.contributing for details on submitting patches and
diff --git a/configure.ac b/configure.ac
index de96e5a..35cafe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,12 @@ if test -z "$ncurses_CFLAGS" && test -z "$ncurses_LIBS"; then
ncurses_LIBS=-lncurses
fi
+AC_ARG_WITH([udevdir],
+ AS_HELP_STRING([--with-udevdir=DIR],
+ [udev directory containing rules.d [default=${prefix}/lib/udev]]),
+ [], [with_udevdir=\${prefix}/lib/udev])
+AC_SUBST([udevdir], [$with_udevdir])
+
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h sys/file.h sys/ioctl.h sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h])
AC_CHECK_HEADER([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h])])
@@ -209,7 +215,9 @@ echo " Configure summary"
echo " ==================="
echo " prefix : $prefix"
echo " exec_prefix : $exec_prefix"
+echo " libdir : $libdir"
echo " sbindir : $sbindir"
+echo " udevdir : $udevdir"
echo " ------------------"
echo " debug build : $enable_debug"
echo " C unit tests : $have_check"
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 056aaa5..d4bda04 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -5,6 +5,6 @@ dist_sbin_SCRIPTS = \
gfs2_trace \
gfs2_withdraw_helper
-noinst_SCRIPTS = \
+udevrulesdir=@udevdir@/rules.d
+dist_udevrules_DATA = \
82-gfs2-withdraw.rules
-