Blob Blame History Raw
diff -ur globus_common-10.2.orig/Makefile.am globus_common-10.2/Makefile.am
--- globus_common-10.2.orig/Makefile.am	2004-10-11 14:53:32.000000000 +0200
+++ globus_common-10.2/Makefile.am	2008-10-13 00:01:24.000000000 +0200
@@ -9,7 +9,7 @@
 	config \
 	doxygen
 
-sbin_SCRIPTS= \
+libexec_SCRIPTS= \
 	config.guess
 
 EXTRA_DIST = \
diff -ur globus_common-10.2.orig/programs/globus-sh-exec.in globus_common-10.2/programs/globus-sh-exec.in
--- globus_common-10.2.orig/programs/globus-sh-exec.in	2006-01-19 06:54:19.000000000 +0100
+++ globus_common-10.2/programs/globus-sh-exec.in	2008-10-13 00:01:24.000000000 +0200
@@ -17,7 +17,11 @@
 # 
 
 
-. ${GLOBUS_LOCATION}/libexec/globus-script-initializer
+if test -f ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer ; then
+. ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer
+else
+. ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer
+fi
 globus_source ${libexecdir}/globus-sh-tools.sh
 
 # This was done by the script initializer before V2.0
diff -ur globus_common-10.2.orig/programs/globus-version.in globus_common-10.2/programs/globus-version.in
--- globus_common-10.2.orig/programs/globus-version.in	2008-09-29 23:20:05.000000000 +0200
+++ globus_common-10.2/programs/globus-version.in	2008-10-13 00:01:24.000000000 +0200
@@ -43,7 +43,11 @@
 
 usage()
 {
-    . ${GLOBUS_LOCATION}/libexec/globus-script-initializer
+    if test -f ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer ; then
+    . ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer
+    else
+    . ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer
+    fi
     globus_source ${libexecdir}/globus-sh-tools.sh
 
     ${GLOBUS_SH_CAT-cat} 1>&2 <<EOF
diff -ur globus_common-10.2.orig/programs/Makefile.am globus_common-10.2/programs/Makefile.am
--- globus_common-10.2.orig/programs/Makefile.am	2005-12-07 10:37:44.000000000 +0100
+++ globus_common-10.2/programs/Makefile.am	2008-10-13 00:01:24.000000000 +0200
@@ -3,7 +3,7 @@
 if ENABLE_PROGRAMS
 bin_SCRIPTS = globus-sh-exec globus-version
 
-libexec_PROGRAMS = globus-libc-hostname globus-is-local-user
+sbin_PROGRAMS = globus-libc-hostname globus-is-local-user
 
 EXTRA_DIST = globus-sh-exec.in globus-version.in
 
diff -ur globus_common-10.2.orig/scripts/globus-hostname globus_common-10.2/scripts/globus-hostname
--- globus_common-10.2.orig/scripts/globus-hostname	2006-01-19 06:54:22.000000000 +0100
+++ globus_common-10.2/scripts/globus-hostname	2008-10-13 00:01:24.000000000 +0200
@@ -23,13 +23,12 @@
 # domainname
 
 
-if test "x$GLOBUS_LOCATION" = "x"; then
-    echo "ERROR Please specify GLOBUS_LOCATION" >&2
-    exit 1
+if test -f ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer ; then
+. ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer
+else
+. ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer
 fi
 
-. ${GLOBUS_LOCATION}/libexec/globus-script-initializer
-
 PROGRAM_NAME=`echo $0 | ${GLOBUS_SH_SED-sed} -e 's|.*/||g'`
 PROGRAM_VERSION=`echo '$Revision: 1.3 $' | ${GLOBUS_SH_CUT-cut} -d' ' -f2`
 
@@ -67,7 +66,7 @@
 EOF
 }
 
-. ${GLOBUS_LOCATION}/libexec/globus-args-parser-header
+. ${libexecdir}/globus-args-parser-header
 
 if [ -n "$1" ]; then
     globus_args_unrecognized_option "$1"
@@ -79,8 +78,8 @@
 if [ -z "${GLOBUS_HOSTNAME}" ] ; then
 
   # Set the _fullname based upon Globus's hostname command
-  if [ -x "${libexecdir}/globus-libc-hostname" ]; then
-    _fullname="`${libexecdir}/globus-libc-hostname`"
+  if [ -x "${sbindir}/globus-libc-hostname" ]; then
+    _fullname="`${sbindir}/globus-libc-hostname`"
   fi
 
   # if failed to set, use the system's hostname command
diff -ur globus_common-10.2.orig/scripts/globus-makefile-header globus_common-10.2/scripts/globus-makefile-header
--- globus_common-10.2.orig/scripts/globus-makefile-header	2008-02-20 17:03:35.000000000 +0100
+++ globus_common-10.2/scripts/globus-makefile-header	2008-10-13 00:01:24.000000000 +0200
@@ -25,29 +25,15 @@
 
 my $gpt_path = $ENV{GPT_LOCATION};
 my $globus_path = $ENV{GLOBUS_LOCATION};
-my $gpath;
 
-if ( !defined($gpt_path) && !defined($globus_path) )
+if ( !defined($gpt_path) )
 {
-    die("ERROR: GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script");
+    $gpt_path = "/usr";
 }
 
-if ( defined($gpt_path) )
+if ( !defined($globus_path) )
 {
-    $gpath = $gpt_path;
-    if ( ! -d $gpath )
-    {
-        die("ERROR: $gpath doesn't exist!\n");
-    }
-}
-
-if ( !defined($gpath) && defined($globus_path) )
-{
-    $gpath = $globus_path;
-    if ( ! -d $gpath )
-    {
-        die("ERROR: $gpath doesn't exist!\n");
-    }
+    $globus_path = "/usr";
 }
 
 
@@ -60,7 +46,7 @@
 #
 
 my($environment);
-@INC = ("$gpath/lib/perl", "$gpath/lib/perl/$Config{'archname'}", @INC);
+@INC = ("$gpt_path/lib/perl", "$gpt_path/lib/perl/$Config{'archname'}", @INC);
 
 if ( defined eval "require Grid::GPT::V1::Package" )
 {
@@ -240,7 +226,9 @@
     # point our installation object at our globus location
     #
 
-    $installation = new Grid::GPT::Installation(pkgdir => "$globus_path/etc/globus_packages");
+    $installation = -d "$globus_path/share/globus/packages" ?
+        new Grid::GPT::Installation(pkgdir => "$globus_path/share/globus/packages") :
+        new Grid::GPT::Installation(pkgdir => "$globus_path/etc/globus_packages");
     $installation->set_depenv('Build');
 
     #
@@ -313,10 +301,17 @@
     # push all of our entries onto our header array
     #
 
+    @INC = ("$globus_path/lib/perl", @INC);
+
+    require Globus::Core::Paths;
+    my $includedir = $Globus::Core::Paths::includedir;
+    my $flavorincludedir = $Globus::Core::Paths::flavorincludedir;
+    my $libdir = $Globus::Core::Paths::libdir;
+
     push(@$header, "GLOBUS_CFLAGS=\"$cflagslist\"");
-    push(@$header, "GLOBUS_INCLUDES=\"-I${globus_path}/include/$flavor $includeslist\"");
+    push(@$header, "GLOBUS_INCLUDES=\"-I${includedir} -I${flavorincludedir} $includeslist\"");
     push(@$header, "GLOBUS_LIBS=\"$libslist\"");
-    push(@$header, "GLOBUS_LDFLAGS=\"-L${globus_path}/lib\"");
+    push(@$header, "GLOBUS_LDFLAGS=\"-L${libdir}\"");
     push(@$header, "GLOBUS_PKG_LIBS=\"$pkglibslist $extlibslist\"");
     push(@$header, "GLOBUS_LIBTOOL=\"$globus_path/sbin/libtool-$flavor\"");
 }
@@ -332,7 +327,9 @@
     my($header) = @_;
     my($copy);
 
-    open(IN, "$globus_path/libexec/globus-build-env-$flavor.sh") || die "ERROR: Cannot open $globus_path/libexec/globus-build-env-$flavor.sh!\n$common_error\n";
+    open(IN, "$globus_path/share/globus/globus-build-env-$flavor.sh") ||
+      open(IN, "$globus_path/libexec/globus-build-env-$flavor.sh") ||
+      die "ERROR: Cannot open globus-build-env-$flavor.sh!\n$common_error\n";
 
     while (<IN>)
     { 
@@ -370,7 +367,9 @@
     my($header) = @_;
     my($copy);
 
-    open(IN, "$globus_path/libexec/globus-sh-tools-vars.sh") || die "ERROR: Cannot open $globus_path/libexec/globus-sh-tools-vars.sh!\n$common_error\n";
+    open(IN, "$globus_path/share/globus/globus-sh-tools-vars.sh") ||
+      open(IN, "$globus_path/libexec/globus-sh-tools-vars.sh") ||
+      die "ERROR: Cannot open globus-sh-tools-vars.sh!\n$common_error\n";
 
     while (<IN>) 
     {
diff -ur globus_common-10.2.orig/scripts/globus-makefile-header.gpt1 globus_common-10.2/scripts/globus-makefile-header.gpt1
--- globus_common-10.2.orig/scripts/globus-makefile-header.gpt1	2003-02-05 03:48:31.000000000 +0100
+++ globus_common-10.2/scripts/globus-makefile-header.gpt1	2008-10-13 00:01:24.000000000 +0200
@@ -15,18 +15,13 @@
 
 my $flavor;
 my $link="static";
-my $gpt=$ENV{GPT_LOCATION};
+
 my $gpath = $ENV{GPT_LOCATION};
 if (!defined($gpath))
 {
-	  $gpath = $ENV{GLOBUS_LOCATION};
-	   
-  }
-  if (!defined($gpath))
-  {
-	     die "ERROR: GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script"
-     }
-      
+  $gpath = "/usr";
+}
+
      @INC = (@INC, "$gpath/lib/perl");
 
 require Grid::GPT::Dependencies;
@@ -40,20 +35,10 @@
 my $pgm_linkslist;
 my $lib_linkslist;
 
-if(!defined($gpt))
-{
-  $gpt=$ENV{GLOBUS_LOCATION};
-}
-if(!defined($gpt))
-{
-  die "ERROR: GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script\n";
-}
-
 my $globus=$ENV{GLOBUS_LOCATION};
-
 if(!defined($globus))
 {
-  die "ERROR: GLOBUS_LOCATION needs to be set before running this script\n";
+  $globus = "/usr";
 }
 
 my %hash;
@@ -102,14 +87,23 @@
 
 	assemble_link_lines($fakepkg, $flavor, $link);
 	  
+@INC = ("$globus/lib/perl", @INC);
+
+require Globus::Core::Paths;
+my $includedir = $Globus::Core::Paths::includedir;
+my $flavorincludedir = $Globus::Core::Paths::flavorincludedir;
+my $libdir = $Globus::Core::Paths::libdir;
+
 push @temp_header,  "GLOBUS_CFLAGS=\"$cflagslist\"\n";
-push @temp_header,  "GLOBUS_INCLUDES=\" -I$ENV{GLOBUS_LOCATION}/include/$flavor $includeslist\"\n";
+push @temp_header,  "GLOBUS_INCLUDES=\"-I$includedir -I$flavorincludedir $includeslist\"\n";
 push @temp_header, "GLOBUS_LIBS=\"$libslist\"\n";
-push @temp_header, "GLOBUS_LDFLAGS=\" -L$ENV{GLOBUS_LOCATION}/lib\n";
+push @temp_header, "GLOBUS_LDFLAGS=\"-L$libdir\"\n";
 push @temp_header, "GLOBUS_PKG_LIBS=\"$pkglibslist\"\n";
 push @temp_header, "GLOBUS_LIBTOOL=$globus/sbin/libtool-$flavor\n";
 
-open(IN, "$globus/libexec/globus-build-env-$flavor.sh") || die "ERROR: Cannot open GLOBUS_LOCATION/libexec/globus-build-env-$flavor.sh\n";
+open(IN, "$globus/share/globus/globus-build-env-$flavor.sh") ||
+  open(IN, "$globus/libexec/globus-build-env-$flavor.sh") ||
+  die "ERROR: Cannot open globus-build-env-$flavor.sh\n";
 
 while(<IN>)
 { 
@@ -130,7 +124,9 @@
 
 #END of Section one:  prepending GLOBUS_
 close (IN);
-open(IN, "$globus/libexec/globus-sh-tools-vars.sh") || die "ERROR: Cannot open GLOBUS_LOCATION/libexec/globus-sh-tools-vars.sh\n";
+open(IN, "$globus/share/globus/globus-sh-tools-vars.sh") ||
+  open(IN, "$globus/libexec/globus-sh-tools-vars.sh") ||
+  die "ERROR: Cannot open globus-sh-tools-vars.sh\n";
 while(<IN>) 
 {
 	if(m!\S!)  
diff -ur globus_common-10.2.orig/scripts/globus-sh-tools.sh globus_common-10.2/scripts/globus-sh-tools.sh
--- globus_common-10.2.orig/scripts/globus-sh-tools.sh	2006-01-19 06:54:22.000000000 +0100
+++ globus_common-10.2/scripts/globus-sh-tools.sh	2008-10-13 00:01:24.000000000 +0200
@@ -18,7 +18,11 @@
 
 if test -z "$GLOBUS_SH_VARIABLES_SET" ; then
     
-    . ${GLOBUS_LOCATION}/libexec/globus-sh-tools-vars.sh
+    if test -f ${GLOBUS_LOCATION:-/usr}/share/globus/globus-sh-tools-vars.sh ; then
+    . ${GLOBUS_LOCATION:-/usr}/share/globus/globus-sh-tools-vars.sh
+    else
+    . ${GLOBUS_LOCATION:-/usr}/libexec/globus-sh-tools-vars.sh
+    fi
     
     # export all commands: