All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration
@ 2015-08-19 11:55 Andrew Price
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 1/3] scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper Andrew Price
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrew Price @ 2015-08-19 11:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Here are a 3 small patches which hook the withdraw scripts up to the build
system so that they get installed by 'make install'.

Cheers,
Andy

Andrew Price (3):
  scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper
  scripts: install the withdraw helper script
  scripts: install the withdraw udev rules script

 README.build                        |  7 +++----
 configure.ac                        |  8 ++++++++
 gfs2/scripts/82-gfs2-withdraw.rules |  2 +-
 gfs2/scripts/Makefile.am            | 10 +++++-----
 gfs2/scripts/gfs2_wd_udev.sh        | 30 ------------------------------
 gfs2/scripts/gfs2_withdraw_helper   | 30 ++++++++++++++++++++++++++++++
 6 files changed, 47 insertions(+), 40 deletions(-)
 delete mode 100755 gfs2/scripts/gfs2_wd_udev.sh
 create mode 100755 gfs2/scripts/gfs2_withdraw_helper

-- 
2.4.3



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 1/3] scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper
  2015-08-19 11:55 [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Andrew Price
@ 2015-08-19 11:55 ` Andrew Price
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 2/3] scripts: install the withdraw helper script Andrew Price
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Price @ 2015-08-19 11:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Makes the name more descriptive and consistent with the name of the udev
rules script.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 README.build                                           | 2 +-
 gfs2/scripts/82-gfs2-withdraw.rules                    | 2 +-
 gfs2/scripts/Makefile.am                               | 2 +-
 gfs2/scripts/{gfs2_wd_udev.sh => gfs2_withdraw_helper} | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename gfs2/scripts/{gfs2_wd_udev.sh => gfs2_withdraw_helper} (100%)

diff --git a/README.build b/README.build
index 6487bae..acfde1b 100644
--- a/README.build
+++ b/README.build
@@ -35,7 +35,7 @@ are not installed by 'make install' and need to be installed manually
 or during rpm installation to the corresponding locations.
 
 	82-gfs2-withdraw.rules in /etc/udev/rules.d/
-	gfs2_wd_udev.sh        in /usr/sbin/
+	gfs2_withdraw_helper   in /usr/sbin/
 
 See also doc/README.contributing for details on submitting patches and
 doc/README.tests for more details regarding the test suite.
diff --git a/gfs2/scripts/82-gfs2-withdraw.rules b/gfs2/scripts/82-gfs2-withdraw.rules
index 2228615..2c9e0e8 100644
--- a/gfs2/scripts/82-gfs2-withdraw.rules
+++ b/gfs2/scripts/82-gfs2-withdraw.rules
@@ -1,2 +1,2 @@
-SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_wd_udev.sh"
+SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_withdraw_helper"
 
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index dde906f..51764fa 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -6,5 +6,5 @@ dist_sbin_SCRIPTS = \
 
 noinst_SCRIPTS = \
 	82-gfs2-withdraw.rules \
-	gfs2_wd_udev.sh
+	gfs2_withdraw_helper
 
diff --git a/gfs2/scripts/gfs2_wd_udev.sh b/gfs2/scripts/gfs2_withdraw_helper
similarity index 100%
rename from gfs2/scripts/gfs2_wd_udev.sh
rename to gfs2/scripts/gfs2_withdraw_helper
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 2/3] scripts: install the withdraw helper script
  2015-08-19 11:55 [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Andrew Price
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 1/3] scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper Andrew Price
@ 2015-08-19 11:55 ` Andrew Price
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 3/3] scripts: install the withdraw udev rules script Andrew Price
  2015-08-19 16:15 ` [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Abhijith Das
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Price @ 2015-08-19 11:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Install gfs2_withdraw_helper into /usr/sbin in 'make install'.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 gfs2/scripts/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 51764fa..056aaa5 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -2,9 +2,9 @@ MAINTAINERCLEANFILES = Makefile.in
 
 dist_sbin_SCRIPTS = \
 	gfs2_lockcapture \
-	gfs2_trace
+	gfs2_trace \
+	gfs2_withdraw_helper
 
 noinst_SCRIPTS = \
-	82-gfs2-withdraw.rules \
-	gfs2_withdraw_helper
+	82-gfs2-withdraw.rules
 
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 3/3] scripts: install the withdraw udev rules script
  2015-08-19 11:55 [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Andrew Price
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 1/3] scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper Andrew Price
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 2/3] scripts: install the withdraw helper script Andrew Price
@ 2015-08-19 11:55 ` Andrew Price
  2015-08-19 16:15 ` [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Abhijith Das
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Price @ 2015-08-19 11:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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>
---
 README.build             | 5 ++---
 configure.ac             | 8 ++++++++
 gfs2/scripts/Makefile.am | 4 ++--
 3 files changed, 12 insertions(+), 5 deletions(-)

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration
  2015-08-19 11:55 [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Andrew Price
                   ` (2 preceding siblings ...)
  2015-08-19 11:55 ` [Cluster-devel] [PATCH 3/3] scripts: install the withdraw udev rules script Andrew Price
@ 2015-08-19 16:15 ` Abhijith Das
  3 siblings, 0 replies; 5+ messages in thread
From: Abhijith Das @ 2015-08-19 16:15 UTC (permalink / raw)
  To: cluster-devel.redhat.com

These look good to me. Thanks for sorting it out.
ACK.

Cheers!
--Abhi

----- Original Message -----
> From: "Andrew Price" <anprice@redhat.com>
> To: cluster-devel at redhat.com
> Sent: Wednesday, August 19, 2015 6:55:06 AM
> Subject: [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script	integration
> 
> Here are a 3 small patches which hook the withdraw scripts up to the build
> system so that they get installed by 'make install'.
> 
> Cheers,
> Andy
> 
> Andrew Price (3):
>   scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper
>   scripts: install the withdraw helper script
>   scripts: install the withdraw udev rules script
> 
>  README.build                        |  7 +++----
>  configure.ac                        |  8 ++++++++
>  gfs2/scripts/82-gfs2-withdraw.rules |  2 +-
>  gfs2/scripts/Makefile.am            | 10 +++++-----
>  gfs2/scripts/gfs2_wd_udev.sh        | 30 ------------------------------
>  gfs2/scripts/gfs2_withdraw_helper   | 30 ++++++++++++++++++++++++++++++
>  6 files changed, 47 insertions(+), 40 deletions(-)
>  delete mode 100755 gfs2/scripts/gfs2_wd_udev.sh
>  create mode 100755 gfs2/scripts/gfs2_withdraw_helper
> 
> --
> 2.4.3
> 
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-19 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-19 11:55 [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Andrew Price
2015-08-19 11:55 ` [Cluster-devel] [PATCH 1/3] scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper Andrew Price
2015-08-19 11:55 ` [Cluster-devel] [PATCH 2/3] scripts: install the withdraw helper script Andrew Price
2015-08-19 11:55 ` [Cluster-devel] [PATCH 3/3] scripts: install the withdraw udev rules script Andrew Price
2015-08-19 16:15 ` [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Abhijith Das

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.