[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster ./configure cman/cman_tool/Makefile cm ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione sourceware org	2007-09-07 14:21:30

Modified files:
	.              : configure 
	cman/cman_tool : Makefile join.c 
	make           : defines.mk.input 

Log message:
	So in this first patch (that seems the most urgent one):
	
	- Make prefix default to /usr
	
	- Clean up all prefix use around configure (this will make alternate
	prefixes like /usr/local works properly).
	
	- Add a specific --aisexecbin option that is passed to cman_tool build.
	This change defaults to /usr/sbin/aisexec (default aisexec install
	path) but also allow local override if you have aisexec installed in
	different paths.
	
	3 NOTES:
	
	- the cman_tool change has not been tested in production. It builds and
	shows that the path is passed properly.
	
	- all people that use a prefix=/ will need to make sure to use some
	extra configure options to respect FHS (for example to install man
	pages in /usr/share/man rather than /share/man..).
	
	- If this patch goes in CVS, you need to make sure to re-run ./configure.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/configure.diff?cvsroot=cluster&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/cman_tool/Makefile.diff?cvsroot=cluster&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/cman_tool/join.c.diff?cvsroot=cluster&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/make/defines.mk.input.diff?cvsroot=cluster&r1=1.2&r2=1.3

--- cluster/configure	2007/09/06 16:26:47	1.29
+++ cluster/configure	2007/09/07 14:21:29	1.30
@@ -49,6 +49,7 @@
 	readlinelibdir => \$readlinelibdir,
 	openaisincdir => \$openaisincdir,
 	openaislibdir => \$openaislibdir,
+	aisexecbin => \$aisexecbin,
 	virtincdir => \$virtincdir,
 	virtlibdir => \$virtlibdir,
 	nssincdir => \$nssincdir,
@@ -94,6 +95,7 @@
 		    'readlinelibdir=s',
 		    'openaisincdir=s',
 		    'openaislibdir=s',
+		    'aisexecbin=s',
 		    'virtincdir=s',
 		    'virtlibdir=s',
 		    'nssincdir=s',
@@ -124,12 +126,12 @@
   print "Usage: $_ [flags]\n";
   print "--help\t\tPrints this usage information\n\n";
   print "install flags:\n";
-  print "--prefix=\tthe base directory to install into.  (Default: /)\n";
+  print "--prefix=\tthe base directory to install into.  (Default: /usr)\n";
   print "--sbindir=\tthe base directory for system binaries.  (Default: {prefix}/sbin)\n";
-  print "--libdir=\tthe base directory for libraries.  (Default: {prefix}/usr/lib)\n";
-  print "--libexecdir=\tthe base directory for executable components.  (Default: {prefix}/usr/libexec)\n";
-  print "--sharedir=\tthe base directory for misc cluster files.  (Default: {prefix}/usr/share/cluster)\n";
-  print "--mandir=\tthe base directory for man pages.  (Default:  {prefix}/usr/share/man)\n";
+  print "--libdir=\tthe base directory for libraries.  (Default: {prefix}/lib)\n";
+  print "--libexecdir=\tthe base directory for executable components.  (Default: {prefix}/libexec)\n";
+  print "--sharedir=\tthe base directory for misc cluster files.  (Default: {prefix}/share/cluster)\n";
+  print "--mandir=\tthe base directory for man pages.  (Default: {prefix}/share/man)\n";
   print "--module_dir=\tthe base directory for kernel modules.  (Default:  /lib/modules/`uname -r`/kernel\n";
   print "\nbuild flags:\n";
   print "--cc=\t\tcompiler to use.  (Default: gcc)\n";
@@ -139,7 +141,7 @@
   print "--ldflags=\toverride default LDFLAGS settings.  (Default: none)\n";
   print "--extraldflags=\tadd extra linking options to default LDFLAGS settings.  (Default: none)\n";
   print "--kernel_src=\tthe directory containing the kernel source you wish to\n\t\tcompile against. (Default: /lib/modules/`uname -r`/build)\n";
-  print "--incdir=\tthe base directory for include files.  (Default: {prefix}/usr/include)\n";
+  print "--incdir=\tthe base directory for include files.  (Default: {prefix}/include)\n";
   print "--ccsincdir=\tthe base directory for ccs include files.  (Default: ./ccs/lib)\n";
   print "--ccslibdir=\tthe base directory for ccs libraries.  (Default: ./ccs/lib)\n";
   print "--cmanincdir=\tthe base directory for cman include files.  (Default: ./cman/lib)\n";
@@ -154,6 +156,7 @@
   print "--readlinelibdir=\tthe base directory for readline libraries.  (Default: {libdir})\n";
   print "--openaisincdir=\tthe base directory for openais include files.  (Default: {incdir})\n";
   print "--openaislibdir=\tthe base directory for openais libraries.  (Default: {libdir}/openais)\n";
+  print "--aisexecbin=\tlocation of aisexec executable file.  (Default: /usr/sbin/aisexec)\n";
   print "--nssincdir=\tthe base directory for libnss include files.  (Default: {incdir}/nss3)\n";
   print "--nsslibdir=\tthe base directory for libnss libraries.  (Default: {libdir})\n";
   print "--nsprincdir=\tthe base directory for libnspr include files.  (Default: {incdir}/nspr4)\n";
@@ -189,6 +192,9 @@
 if ($extraldflags) {
   $ldflags="${ldflags} ${extraldflags}";
 }
+if (!$prefix) {
+  $prefix="/usr";
+}
 if (!$kernel_src) {
   $kernel_src="/lib/modules/`uname -r`/build";
 }
@@ -202,10 +208,10 @@
   $gnbdkincdir="${pwd}/gnbd-kernel/src";
 }
 if (!$incdir) {
-  $incdir="${prefix}/usr/include";
+  $incdir="${prefix}/include";
 }
 if (!$libdir) {
-  $libdir="${prefix}/usr/lib";
+  $libdir="${prefix}/lib";
 }
 if (!$ccsincdir) {
   $ccsincdir="${pwd}/ccs/lib";
@@ -249,6 +255,9 @@
 if (!$openaislibdir) {
   $openaislibdir="${libdir}/openais";
 }
+if (!$aisexecbin) {
+  $aisexecbin="/usr/sbin/aisexec";
+}
 if (!$nssincdir) {
   $nssincdir="${incdir}/nss3";
 }
@@ -274,16 +283,16 @@
   $xenlibdir="${libdir}";
 }
 if (!$libexecdir) {
-  $libexecdir="${prefix}/usr/libexec";
+  $libexecdir="${prefix}/libexec";
 }
 if (!$mandir) {
-  $mandir="${prefix}/usr/share/man";
+  $mandir="${prefix}/share/man";
 }
 if (!$sbindir) {
   $sbindir="${prefix}/sbin";
 }
 if (!$sharedir) {
-  $sharedir="${prefix}/usr/share/cluster";
+  $sharedir="${prefix}/share/cluster";
 }
 
 @args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'";
@@ -337,6 +346,7 @@
   $_ =~ s/\ NCURSESLIBDIR\@/$ncurseslibdir/;
   $_ =~ s/\ OPENAISINCDIR\@/$openaisincdir/;
   $_ =~ s/\ OPENAISLIBDIR\@/$openaislibdir/;
+  $_ =~ s/\ AISEXECBIN\@/$aisexecbin/;
   $_ =~ s/\ XENINCDIR\@/$xenincdir/;
   $_ =~ s/\ XENLIBDIR\@/$xenlibdir/;
   $_ =~ s/\ NSSINCDIR\@/$nssincdir/;
--- cluster/cman/cman_tool/Makefile	2007/08/28 04:35:39	1.24
+++ cluster/cman/cman_tool/Makefile	2007/09/07 14:21:30	1.25
@@ -17,7 +17,7 @@
 OBJS=	main.o \
 	join.o
 
-CFLAGS += -DSBINDIR=\"${sbindir}\"
+CFLAGS += -DAISEXECBIN=\"${aisexecbin}\"
 CFLAGS += -I${ccsincdir} -I${cmanincdir}
 CFLAGS += -I${incdir}
 
--- cluster/cman/cman_tool/join.c	2007/02/19 13:10:24	1.50
+++ cluster/cman/cman_tool/join.c	2007/09/07 14:21:30	1.51
@@ -137,11 +137,10 @@
 	case 0: // child
 		close(p[0]);
 		be_daemon(!comline->verbose);
-		chdir(SBINDIR);
-		execve("./aisexec", argv, envp);
+		execve(AISEXECBIN, argv, envp);
 
 		// exec failed - tell the parent process */
-		sprintf(scratch, "execve of " SBINDIR "/aisexec failed: %s", strerror(errno));
+		sprintf(scratch, "execve of " AISEXECBIN " failed: %s", strerror(errno));
 		write(p[1], scratch, strlen(scratch));
 		exit(1);
 		break;
--- cluster/make/defines.mk.input	2007/05/02 12:39:35	1.2
+++ cluster/make/defines.mk.input	2007/09/07 14:21:30	1.3
@@ -55,6 +55,7 @@
 nsprlibdir ?= @NSPRLIBDIR@
 openaisincdir ?= @OPENAISINCDIR@
 openaislibdir ?= @OPENAISLIBDIR@
+aisexecbin ?= @AISEXECBIN@
 xenincdir ?= @XENINCDIR@
 xenlibdir ?= @XENLIBDIR@
 virtincdir ?= @VIRTINCDIR@


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]