rpms/globus-rls-server/devel globus-rls-server, NONE, 1.1 globus-rls-server-setup-strlen.patch, NONE, 1.1 globus-rls-server-setup.patch, NONE, 1.1 globus-rls-server-strlen.patch, NONE, 1.1 globus-rls-server-type-punned-pointer.patch, NONE, 1.1 globus-rls-server.INSTALL, NONE, 1.1 globus-rls-server.patch, NONE, 1.1 globus-rls-server.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Mattias Ellert ellert at fedoraproject.org
Sat Jun 6 03:20:12 UTC 2009


Author: ellert

Update of /cvs/pkgs/rpms/globus-rls-server/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27035/devel

Modified Files:
	.cvsignore sources 
Added Files:
	globus-rls-server globus-rls-server-setup-strlen.patch 
	globus-rls-server-setup.patch globus-rls-server-strlen.patch 
	globus-rls-server-type-punned-pointer.patch 
	globus-rls-server.INSTALL globus-rls-server.patch 
	globus-rls-server.spec import.log 
Log Message:
* Fri Jun 05 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-2
- Add Requires needed for scriptlets
- Remove the SXXrls.in file
- Remove hardcoded port number in init.d startup script



--- NEW FILE globus-rls-server ---
#!/bin/bash
#
# Init file for Globus RLS server
#
# chkconfig: - 75 25
# description: Globus RLS server
#
# processname: globus-rls-server
# config: /etc/globus-rls-server.conf
# pidfile: /var/run/globus-rls-server.pid

# source function library
. /etc/init.d/functions

RETVAL=0
prog="globus-rls-server"

# Some functions to make the below more readable
GLOBUS_RLS_SERVER=/usr/sbin/globus-rls-server
GLOBUS_RLS_ADMIN=/usr/sbin/globus-rls-admin
PID_FILE=/var/run/globus-rls-server.pid

port=`grep '^port' /etc/globus-rls-server.conf | sed 's/port\s*//'`
port=${port:-39281}

start()
{
	echo -n $"Starting $prog: "
	$GLOBUS_RLS_SERVER && success || failure
	RETVAL=$?
	[ "$RETVAL" = 0 ] && touch /var/lock/subsys/globus-rls-server
	echo
}

stop()
{
	echo -n $"Stopping $prog: "
	if [ -n "`pidfileofproc $GLOBUS_RLS_SERVER`" ] ; then
	    $GLOBUS_RLS_ADMIN -q rls://localhost:$port && success || failure
	else
	    failure $"Stopping $prog"
	fi
	RETVAL=$?
	[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/globus-rls-server
	echo
}

restart()
{
	stop
	sleep 3
	start
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart | force-reload)
		restart
		;;
	reload)
		;;
	condrestart | try-restart)
		[ -e /var/lock/subsys/globus-rls-server ] && restart
		;;
	status)
		status -p $PID_FILE $prog &&
		$GLOBUS_RLS_ADMIN -S rls://localhost:$port
		RETVAL=$?
		;;
	*)
		echo $"Usage: $0 {start|stop|restart|condrestart|status}"
		RETVAL=1
		;;
esac
exit $RETVAL

globus-rls-server-setup-strlen.patch:

--- NEW FILE globus-rls-server-setup-strlen.patch ---
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-lrc-mysql.sql globus_rls_server_setup-4.4/globus-rls-lrc-mysql.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-lrc-mysql.sql	2003-11-04 07:14:41.000000000 +0100
+++ globus_rls_server_setup-4.4/globus-rls-lrc-mysql.sql	2008-01-21 10:02:17.000000000 +0100
@@ -5,14 +5,14 @@
 
 create table t_lfn (
   id int not null auto_increment primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 ) type = innodb;
 create unique index t_lfn_name on t_lfn(name);
 
 create table t_pfn (
   id int not null auto_increment primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 ) type = innodb;
 create unique index t_pfn_name on t_pfn(name);
@@ -27,20 +27,20 @@
 create table t_rli (
   id int not null auto_increment primary key,
   flags int default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 ) type = innodb;
 create unique index t_rli_name on t_rli(name);
 
 create table t_rlipartition (
   rli_id int not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 ) type = innodb;
 alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
 create index t_rlipartition_pattern on t_rlipartition(pattern);
 
 create table t_attribute (
   id int not null auto_increment primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   objtype int not null,
   type int not null
 ) type = innodb;
@@ -76,7 +76,7 @@
 create table t_str_attr (
   obj_id int not null,
   attr_id int not null references t_attribute(id),
-  value varchar(250) not null
+  value varchar(500) not null
 ) type = innodb;
 create index t_str_attr_attr_id on t_str_attr(attr_id);
 create index t_str_attr_value on t_str_attr(value);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-lrc-oracle.sql globus_rls_server_setup-4.4/globus-rls-lrc-oracle.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-lrc-oracle.sql	2003-11-04 07:14:41.000000000 +0100
+++ globus_rls_server_setup-4.4/globus-rls-lrc-oracle.sql	2008-01-21 10:02:17.000000000 +0100
@@ -1,6 +1,6 @@
 create table t_lfn (
   id int primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create sequence s_lfn_id start with 1 increment by 1;
@@ -15,7 +15,7 @@
 
 create table t_pfn (
   id int primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create sequence s_pfn_id start with 1 increment by 1;
@@ -38,7 +38,7 @@
 create table t_rli (
   id int primary key,
   flags int default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 );
 create sequence s_rli_id start with 1 increment by 1;
 create or replace trigger tr_rli
@@ -52,14 +52,14 @@
 
 create table t_rlipartition (
   rli_id int not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 );
 alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
 create index t_rlipartition_pattern on t_rlipartition(pattern);
 
 create table t_attribute (
   id int primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   objtype int not null,
   type int not null
 );
@@ -103,7 +103,7 @@
 create table t_str_attr (
   obj_id int not null,
   attr_id int not null references t_attribute(id),
-  value varchar(250) not null
+  value varchar(500) not null
 );
 create index t_str_attr_attr_id on t_str_attr(attr_id);
 create index t_str_attr_value on t_str_attr(value);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-lrc-postgres.sql globus_rls_server_setup-4.4/globus-rls-lrc-postgres.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-lrc-postgres.sql	2003-11-04 07:14:42.000000000 +0100
+++ globus_rls_server_setup-4.4/globus-rls-lrc-postgres.sql	2008-01-21 10:02:17.000000000 +0100
@@ -1,13 +1,13 @@
 create table t_lfn (
   id serial primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create unique index t_lfn_name on t_lfn(name);
 
 create table t_pfn (
   id serial primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create unique index t_pfn_name on t_pfn(name);
@@ -22,20 +22,20 @@
 create table t_rli (
   id serial primary key,
   flags int default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 );
 create unique index t_rli_name on t_rli(name);
 
 create table t_rlipartition (
   rli_id int not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 );
 alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
 create index t_rlipartition_pattern on t_rlipartition(pattern);
 
 create table t_attribute (
   id serial primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   objtype int not null,
   type int not null
 );
@@ -71,7 +71,7 @@
 create table t_str_attr (
   obj_id int not null,
   attr_id int not null references t_attribute(id),
-  value varchar(250) not null
+  value varchar(500) not null
 );
 create index t_str_attr_attr_id on t_str_attr(attr_id);
 create index t_str_attr_value on t_str_attr(value);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-lrc-sqlite.sql globus_rls_server_setup-4.4/globus-rls-lrc-sqlite.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-lrc-sqlite.sql	2006-08-22 01:12:32.000000000 +0200
+++ globus_rls_server_setup-4.4/globus-rls-lrc-sqlite.sql	2008-01-21 10:02:48.000000000 +0100
@@ -1,13 +1,13 @@
 create table t_lfn (
   id integer primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref integer default 0 not null
 );
 create unique index t_lfn_name on t_lfn(name);
 
 create table t_pfn (
   id integer primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref integer default 0 not null
 );
 create unique index t_pfn_name on t_pfn(name);
@@ -23,13 +23,13 @@
 create table t_rli (
   id integer primary key,
   flags integer default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 );
 create unique index t_rli_name on t_rli(name);
 
 create table t_rlipartition (
   rli_id integer not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 );
 create unique index pk_rlipartition on t_rlipartition(rli_id, pattern);
 create index t_rlipartition_rli_id on t_rlipartition(rli_id);
@@ -37,7 +37,7 @@
 
 create table t_attribute (
   id integer primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   objtype integer not null,
   type integer not null
 );
@@ -73,7 +73,7 @@
 create table t_str_attr (
   obj_id integer not null,
   attr_id integer not null references t_attribute(id),
-  value varchar(250) not null
+  value varchar(500) not null
 );
 create index t_str_attr_attr_id on t_str_attr(attr_id);
 create index t_str_attr_value on t_str_attr(value);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-rli-mysql.sql globus_rls_server_setup-4.4/globus-rls-rli-mysql.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-rli-mysql.sql	2003-11-04 07:14:42.000000000 +0100
+++ globus_rls_server_setup-4.4/globus-rls-rli-mysql.sql	2008-01-21 10:02:17.000000000 +0100
@@ -6,21 +6,21 @@
 
 create table t_lfn (
   id int not null auto_increment primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 ) type = innodb;
 create unique index t_lfn_name on t_lfn(name);
 
 create table t_lrc (
   id int not null auto_increment primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 ) type = innodb;
 create unique index t_lrc_name on t_lrc(name);
 
 create table t_sender (
   id int not null auto_increment primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 ) type = innodb;
 create unique index t_sender_name on t_sender(name);
@@ -39,13 +39,13 @@
 create table t_rli (
   id int not null auto_increment primary key,
   flags int default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 ) type = innodb;
 create unique index t_rli_name on t_rli(name);
 
 create table t_rlipartition (
   rli_id int not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 ) type = innodb;
 alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
 create index t_rlipartition_pattern on t_rlipartition(pattern);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-rli-oracle.sql globus_rls_server_setup-4.4/globus-rls-rli-oracle.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-rli-oracle.sql	2003-11-04 07:14:42.000000000 +0100
+++ globus_rls_server_setup-4.4/globus-rls-rli-oracle.sql	2008-01-21 10:02:17.000000000 +0100
@@ -1,6 +1,6 @@
 create table t_lfn (
   id int primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create sequence s_lfn_id start with 1 increment by 1;
@@ -15,7 +15,7 @@
 
 create table t_lrc (
   id int primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create sequence s_lrc_id start with 1 increment by 1;
@@ -30,7 +30,7 @@
 
 create table t_sender (
   id int primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create sequence s_sender_id start with 1 increment by 1;
@@ -57,7 +57,7 @@
 create table t_rli (
   id int primary key,
   flags int default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 );
 create sequence s_rli_id start with 1 increment by 1;
 create or replace trigger tr_rli
@@ -71,7 +71,7 @@
 
 create table t_rlipartition (
   rli_id int not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 );
 alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
 create index t_rlipartition_pattern on t_rlipartition(pattern);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-rli-postgres.sql globus_rls_server_setup-4.4/globus-rls-rli-postgres.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-rli-postgres.sql	2003-11-04 07:14:42.000000000 +0100
+++ globus_rls_server_setup-4.4/globus-rls-rli-postgres.sql	2008-01-21 10:02:17.000000000 +0100
@@ -1,20 +1,20 @@
 create table t_lfn (
   id serial primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create unique index t_lfn_name on t_lfn(name);
 
 create table t_lrc (
   id serial primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create unique index t_lrc_name on t_lrc(name);
 
 create table t_sender (
   id serial primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref int default 0 not null
 );
 create unique index t_sender_name on t_sender(name);
@@ -33,13 +33,13 @@
 create table t_rli (
   id serial primary key,
   flags int default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 );
 create unique index t_rli_name on t_rli(name);
 
 create table t_rlipartition (
   rli_id int not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 );
 alter table t_rlipartition add constraint pk_rlipartition primary key(rli_id, pattern);
 create index t_rlipartition_pattern on t_rlipartition(pattern);
diff -ur globus_rls_server_setup-4.4.orig/globus-rls-rli-sqlite.sql globus_rls_server_setup-4.4/globus-rls-rli-sqlite.sql
--- globus_rls_server_setup-4.4.orig/globus-rls-rli-sqlite.sql	2006-08-22 01:12:32.000000000 +0200
+++ globus_rls_server_setup-4.4/globus-rls-rli-sqlite.sql	2008-01-21 10:18:19.000000000 +0100
@@ -1,20 +1,20 @@
 create table t_lfn (
   id integer primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref integer default 0 not null
 );
 create unique index t_lfn_name on t_lfn(name);
 
 create table t_lrc (
   id integer primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref integer default 0 not null
 );
 create unique index t_lrc_name on t_lrc(name);
 
 create table t_sender (
   id integer primary key,
-  name varchar(250) not null,
+  name varchar(500) not null,
   ref integer default 0 not null
 );
 create unique index t_sender_name on t_sender(name);
@@ -33,13 +33,13 @@
 create table t_rli (
   id integer primary key,
   flags integer default 0 not null,
-  name varchar(250) not null
+  name varchar(500) not null
 );
 create unique index t_rli_name on t_rli(name);
 
 create table t_rlipartition (
   rli_id integer not null references t_rli(id),
-  pattern varchar(250) not null
+  pattern varchar(500) not null
 );
 create unique index pk_rlipartition on t_rlipartition(rli_id, pattern);
 create index t_rlipartition_rli_id on t_rlipartition(rli_id);

globus-rls-server-setup.patch:

--- NEW FILE globus-rls-server-setup.patch ---
diff -ur globus_rls_server_setup-4.4.orig/configure.in globus_rls_server_setup-4.4/configure.in
--- globus_rls_server_setup-4.4.orig/configure.in	2004-02-11 03:15:25.000000000 +0100
+++ globus_rls_server_setup-4.4/configure.in	2008-10-25 08:26:42.000000000 +0200
@@ -3,13 +3,6 @@
 AC_REVISION($Revision: 1.4 $)
 AC_INIT(Makefile.am)
 
-if test "x$GLOBUS_LOCATION" = "x"; then
-    echo "ERROR Please specify GLOBUS_LOCATION" >&2
-    exit 1
-fi
-
-AC_SUBST(GLOBUS_LOCATION)
-
 GLOBUS_INIT
 
 AM_PROG_LIBTOOL
diff -ur globus_rls_server_setup-4.4.orig/odbc.ini.in globus_rls_server_setup-4.4/odbc.ini.in
--- globus_rls_server_setup-4.4.orig/odbc.ini.in	2007-06-14 09:48:35.000000000 +0200
+++ globus_rls_server_setup-4.4/odbc.ini.in	2008-10-25 10:25:46.000000000 +0200
@@ -1,19 +1,27 @@
 [lrc1000]
-Driver      = @GLOBUS_LOCATION@/lib/libsqlite3odbc at SQLITEODBCFLAVOR@. at LIBSUFFIX@
-Database    = @GLOBUS_LOCATION@/var/lrc1000.db
+Driver      = @libdir@/libsqlite3odbc at SQLITEODBCFLAVOR@. at LIBSUFFIX@
+Database    = @localstatedir@/lrc1000.db
 
 [rli1000]
-Driver      = @GLOBUS_LOCATION@/lib/libsqlite3odbc at SQLITEODBCFLAVOR@. at LIBSUFFIX@
-Database    = @GLOBUS_LOCATION@/var/rli1000.db
+Driver      = @libdir@/libsqlite3odbc at SQLITEODBCFLAVOR@. at LIBSUFFIX@
+Database    = @localstatedir@/rli1000.db
 
 [lrc1000_psql]
-Driver      = @GLOBUS_LOCATION@/lib/psqlodbc. at LIBSUFFIX@
+Driver      = @libdir@/psqlodbc. at LIBSUFFIX@
 Database    = lrc1000
 Servername  = localhost
 Port        = 5432
 
 [rli1000_psql]
-Driver      = @GLOBUS_LOCATION@/lib/psqlodbc. at LIBSUFFIX@
+Driver      = @libdir@/psqlodbc. at LIBSUFFIX@
 Database    = rli1000
 Servername  = localhost
 Port        = 5432
+
+[lrc1000_mysql]
+Driver      = @libdir@/libmyodbc3_r. at LIBSUFFIX@
+Database    = lrc1000
+
+[rli1000_mysql]
+Driver      = @libdir@/libmyodbc3_r. at LIBSUFFIX@
+Database    = rli1000
diff -ur globus_rls_server_setup-4.4.orig/pkgdata/pkg_data_src.gpt.in globus_rls_server_setup-4.4/pkgdata/pkg_data_src.gpt.in
--- globus_rls_server_setup-4.4.orig/pkgdata/pkg_data_src.gpt.in	2007-06-14 09:56:07.000000000 +0200
+++ globus_rls_server_setup-4.4/pkgdata/pkg_data_src.gpt.in	2008-10-25 14:34:35.000000000 +0200
@@ -3,8 +3,7 @@
 
 <gpt_package_metadata Name="globus_rls_server_setup" Format_Version="0.02">
     <Aging_Version Major="4" Minor="4" Age="0"/>
-    <Description>
-    </Description>
+    <Description>Replica Location Service Server Setup</Description>
     <Version_Stability Release="Production"/>
     <src_pkg>
 
diff -ur globus_rls_server_setup-4.4.orig/rls-ldif.conf.in globus_rls_server_setup-4.4/rls-ldif.conf.in
--- globus_rls_server_setup-4.4.orig/rls-ldif.conf.in	2002-12-22 11:37:17.000000000 +0100
+++ globus_rls_server_setup-4.4/rls-ldif.conf.in	2008-10-25 15:16:27.000000000 +0200
@@ -7,9 +7,9 @@
 dn: RLS=stats, Mds-Vo-name=local, o=grid
 objectclass: GlobusTop
 objectclass: GlobusActiveObject
-objectclass GlobusActiveSearch
+objectclass: GlobusActiveSearch
 type: exec
-path: @GLOBUS_LOCATION@/libexec
+path: @sbindir@
 base: globus-rls-reporter
 args: -d RLS=stats,Mds-Vo-name=local,o=grid rls://localhost
 cachetime: 300
diff -ur globus_rls_server_setup-4.4.orig/setup-globus-rls-server globus_rls_server_setup-4.4/setup-globus-rls-server
--- globus_rls_server_setup-4.4.orig/setup-globus-rls-server	2007-07-02 21:13:22.000000000 +0200
+++ globus_rls_server_setup-4.4/setup-globus-rls-server	2008-10-25 08:26:42.000000000 +0200
@@ -1,6 +1,10 @@
 #! /bin/sh
 
-. $GLOBUS_LOCATION/etc/globus-user-env.sh
-. $GLOBUS_LOCATION/libexec/globus-sh-tools.sh
+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
+. ${libexecdir}/globus-sh-tools.sh
 
-perl $GLOBUS_LOCATION/setup/globus/setup-globus-rls-server.pl
+perl ${setupdir}/setup-globus-rls-server.pl
diff -ur globus_rls_server_setup-4.4.orig/setup-globus-rls-server.pl globus_rls_server_setup-4.4/setup-globus-rls-server.pl
--- globus_rls_server_setup-4.4.orig/setup-globus-rls-server.pl	2007-06-14 09:48:35.000000000 +0200
+++ globus_rls_server_setup-4.4/setup-globus-rls-server.pl	2008-10-25 10:31:15.000000000 +0200
@@ -19,12 +19,7 @@
 
 if (!defined($gpath))
 {
-  $gpath = $ENV{GLOBUS_LOCATION};
-}
-
-if (!defined($gpath))
-{
-   die "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script"
+  $gpath = "/usr";
 }
 
 @INC = (@INC, "$gpath/lib/perl");
@@ -33,19 +28,20 @@
 
 my $metadata = new Grid::GPT::Setup(package_name => "globus_rls_server_setup");
 
-my $globusdir = $ENV{GLOBUS_LOCATION};
-
-if((!defined($globusdir)))
-{
-    die "GLOBUS_LOCATION needs to be set before running this script"
-}
+require Globus::Core::Paths;
+my $setupdir = $Globus::Core::Paths::setupdir;
+my $globusdir = $Globus::Core::Paths::prefix;
+my $libdir = $Globus::Core::Paths::libdir;
+my $localstatedir = $Globus::Core::Paths::localstatedir;
+my $sbindir = $Globus::Core::Paths::sbindir;
+my $sysconfdir = $Globus::Core::Paths::sysconfdir;
 
 my $shell = $ENV{GLOBUS_SH};
 if (!defined($shell)) {
   $shell = "/bin/sh";
 }
 
-my $odbclib = "$globusdir/lib";
+my $odbclib = "$libdir";
 
 my $iodbc = $ENV{GLOBUS_IODBC_PATH};
 if (defined($iodbc)) {
@@ -66,7 +62,7 @@
 
 my $odbcini = $ENV{ODBCINI};
 if (!defined($odbcini)) {
-  $odbcini = "$globusdir/var/odbc.ini";
+  $odbcini = "$localstatedir/odbc.ini";
 }
 
 # Determine sysname
@@ -98,14 +94,15 @@
     $sqliteodbcflavor = "_" . @$pkgs[0]->flavor();
 }
 
-my $setupdir = "$globusdir/setup/globus";
-
 for my $f ("SXXrls", "globus-rls-server.conf", "rls-ldif.conf", "odbc.ini") {
   print "creating $f\n";
   open(FIN, "<$setupdir/${f}.in") || die "Can't find $setupdir/${f}.in";
   open(FOUT, ">$setupdir/${f}") || die "Can't open $setupdir/${f}.in";
   while (<FIN>) {
     s/\@GLOBUS_LOCATION\@/$globusdir/g;
+    s/\@libdir\@/$libdir/g;
+    s/\@localstatedir\@/$localstatedir/g;
+    s/\@sbindir\@/$sbindir/g;
     s/\@ODBCLIB\@/$odbclib/g;
     s/\@ODBCINI\@/$odbcini/g;
     s/\@SHELL\@/$shell/g;
@@ -117,36 +114,36 @@
   close FOUT;
 }
 
-system("cp $setupdir/SXXrls $globusdir/sbin/.");
-system("chmod 0755 $globusdir/sbin/SXXrls");
+system("cp $setupdir/SXXrls $sbindir");
+system("chmod 0755 $sbindir/SXXrls");
 
-if (-e "$globusdir/etc/globus-rls-server.conf") {
-  print "$globusdir/etc/globus-rls-server.conf already exists, not replacing with $setupdir/globus-rls-server.conf\n";
+if (-e "$sysconfdir/globus-rls-server.conf") {
+  print "$sysconfdir/globus-rls-server.conf already exists, not replacing with $setupdir/globus-rls-server.conf\n";
 } else {
-  system("cp $setupdir/globus-rls-server.conf $globusdir/etc/.");
-  system("chmod 0600 $globusdir/etc/globus-rls-server.conf");
+  system("cp $setupdir/globus-rls-server.conf $sysconfdir");
+  system("chmod 0600 $sysconfdir/globus-rls-server.conf");
 }
 
-system("cp $setupdir/rls-ldif.conf $globusdir/etc/.");
-system("chmod 0644 $globusdir/etc/rls-ldif.conf");
+system("cp $setupdir/rls-ldif.conf $sysconfdir");
+system("chmod 0644 $sysconfdir/rls-ldif.conf");
 
-if (-e "$globusdir/var/odbc.ini") {
-  print "$globusdir/var/odbc.ini already exists, not replacing with $setupdir/odbc.ini\n";
+if (-e "$localstatedir/odbc.ini") {
+  print "$localstatedir/odbc.ini already exists, not replacing with $setupdir/odbc.ini\n";
 } else {
-  system("cp $setupdir/odbc.ini $globusdir/var/.");
-  system("chmod 0644 $globusdir/var/odbc.ini");
+  system("cp $setupdir/odbc.ini $localstatedir");
+  system("chmod 0644 $localstatedir/odbc.ini");
 }
 
-if (-e "$globusdir/var/lrc1000.db") {
-  print "$globusdir/var/lrc1000.db already exists, not recreating lrc1000 database.\n";
+if (-e "$localstatedir/lrc1000.db") {
+  print "$localstatedir/lrc1000.db already exists, not recreating lrc1000 database.\n";
 } else {
-  system("$globusdir/bin/sqlite3 $globusdir/var/lrc1000.db < $globusdir/setup/globus/globus-rls-lrc-sqlite.sql");
+  system("sqlite3 $localstatedir/lrc1000.db < $setupdir/globus-rls-lrc-sqlite.sql");
 }
 
-if (-e "$globusdir/var/rli1000.db") {
-  print "$globusdir/var/rli1000.db already exists, not recreating rli1000 database.\n";
+if (-e "$localstatedir/rli1000.db") {
+  print "$localstatedir/rli1000.db already exists, not recreating rli1000 database.\n";
 } else {
-  system("$globusdir/bin/sqlite3 $globusdir/var/rli1000.db < $globusdir/setup/globus/globus-rls-rli-sqlite.sql");
+  system("sqlite3 $localstatedir/rli1000.db < $setupdir/globus-rls-rli-sqlite.sql");
 }
 
 print "Done\n";
diff -ur globus_rls_server_setup-4.4.orig/SXXrls.in globus_rls_server_setup-4.4/SXXrls.in
--- globus_rls_server_setup-4.4.orig/SXXrls.in	2006-06-09 00:30:32.000000000 +0200
+++ globus_rls_server_setup-4.4/SXXrls.in	2008-10-25 09:27:42.000000000 +0200
@@ -5,7 +5,11 @@
 
 export GLOBUS_LOCATION
 
-. ${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
 . ${libexecdir}/globus-sh-tools.sh
 
 case "$1" in
@@ -14,7 +18,7 @@
 
     echo "Starting up RLS server"
 
-    if [ "$ODBCLIB" != "$GLOBUS_LOCATION" ]; then
+    if [ "$ODBCLIB" != "${libdir}" ]; then
       if [ -d ${ODBCLIB} ]; then
         if [ "X$LD_LIBRARY_PATH" = "X" ]; then
           LD_LIBRARY_PATH=${ODBCLIB}
@@ -25,7 +29,7 @@
       fi
     fi
 
-    ${bindir}/globus-rls-server
+    ${sbindir}/globus-rls-server
 
     if [ $? -ne 0 ] ; then
       echo "Failed to start up RLS server"

globus-rls-server-strlen.patch:

--- NEW FILE globus-rls-server-strlen.patch ---
diff -ur globus_rls_server-4.2.orig/db.h globus_rls_server-4.2/db.h
--- globus_rls_server-4.2.orig/db.h	2005-04-18 22:56:46.000000000 +0200
+++ globus_rls_server-4.2/db.h	2007-03-08 09:03:48.000000000 +0100
@@ -13,7 +13,7 @@
  * Should be as large as longest string stored in the DB that's returned
  * by a query (see db schema files), plus one for terminating null byte.
  */
-#define MAXDBSTR	(250+1)
+#define MAXDBSTR	(500+1)
 
 typedef globus_bool_t	(*db_str1_callback_t) (
   void		*a,

globus-rls-server-type-punned-pointer.patch:

--- NEW FILE globus-rls-server-type-punned-pointer.patch ---
diff -ur globus_rls_server-4.7.orig/db.c globus_rls_server-4.7/db.c
--- globus_rls_server-4.7.orig/db.c	2007-11-10 03:08:06.000000000 +0100
+++ globus_rls_server-4.7/db.c	2008-12-30 20:55:10.000000000 +0100
@@ -1950,13 +1950,13 @@
      * We're adding a new mapping, so increment ref counts on lfn, lrc and
      * sender, or create if they don't exist.
      */
-    if ((rc = updateref(h, T_RLILFN, lfn, 1, 1, (SQLINTEGER *) &lfn_id, NULL,
+    if ((rc = updateref(h, T_RLILFN, lfn, 1, 1, (SQLINTEGER *) (void *) &lfn_id, NULL,
 			errmsg, adjcount)) != GLOBUS_RLS_SUCCESS)
       goto error;
-    if ((rc = updateref(h, T_RLILRC, lrc, 1, 1, (SQLINTEGER *) &lrc_id, NULL,
+    if ((rc = updateref(h, T_RLILRC, lrc, 1, 1, (SQLINTEGER *) (void *) &lrc_id, NULL,
 			errmsg, adjcount)) != GLOBUS_RLS_SUCCESS)
       goto error;
-    if ((rc = updateref(h, T_RLISENDER, sender, 1, 1, (SQLINTEGER *) &sender_id, NULL,
+    if ((rc = updateref(h, T_RLISENDER, sender, 1, 1, (SQLINTEGER *) (void *) &sender_id, NULL,
 			errmsg, adjcount)) != GLOBUS_RLS_SUCCESS)
       goto error;
 


--- NEW FILE globus-rls-server.INSTALL ---
How to set up a Globus RLS server
=================================

After installing the globus-rls-server RPM the server's database
backend must be configured and its database tables created. The Globus
RLS server is built using unixODBC and the server administrator
therefore can choose between different database backends. Database
definitions are provided for MySQL, postgres, sqlite and oracle.

The Globus RLS server consists of two parts, the local replica catalog
(LRC) and the replica location index (RLI). A server can run either
one or both. The instructions below enables both services. If only one
of the services is needed the instruction for creating the database
tables for the other service can be ignored. The default configuration
file /etc/globus-rls-server.conf have both lrc_server and rli_server
set to true. If only one of the services is required the entry for the
other one should be changed to false.


A) MySQL

MySQL version 4.0.1 or later is required in order to have support for
the database transaction features used by the Globus RLS
server. Without proper support for these features the reference
counters in the MySQL tables will get out of synch.

The MySQL ODBC driver is needed. It can be installed using:

  yum install mysql-connector-odbc

The MySQL server used as a backend can be running on the same host as
the Globus RLS server or on a different host if that is preferred.

A-1) Creating tables

Start the mysql tool and issue the following commands, replacing the
dbuser and dbpassword with the database username and password you will
be using for the Globus RLS server.

mysql> use mysql;
mysql> grant all on lrc1000.* to dbuser at localhost identified by 'dbpassword';
mysql> grant all on rli1000.* to dbuser at localhost identified by 'dbpassword';

If you are using a MySQL database on a different host than the one
running the Globus RLS server repeat the two last lines with localhost
replaced with the hostname of the Globus RLS Server.

Create the databases by running the following commands, replacing
dbuser with the database username you specified above. If you are
using a different database host than the Globus RLS server host you
can either copy the database definition files to the MySQL host or run
the commands on the Globus RLS server host and add a -h flag
indicating the hostname of the MySQL server. You will be promted for
the password.

  mysql -p -u dbuser < /usr/share/globus/setup/globus-rls-lrc-mysql.sql 
  mysql -p -u dbuser < /usr/share/globus/setup/globus-rls-rli-mysql.sql

A-2) Configuring the Globus RLS server

Edit the file /etc/globus-rls-server.conf and specify the database
username and password you have been using. Also change the lrc_dbname
and rli_dbname to lrc1000_mysql and rli1000_mysql respectivley. Make
sure this file is not world readable to protect the password.

If you are not using a MySQL server on the same host as the Globus RLS
server, edit the /etc/globus-rls-server-odbc.ini file and add a
Servername entry to the definitions of lrc1000_mysql and rli1000_mysql
providing the hostname of the MySQL server.

The default access control list gives all users the right to do
everything. If this is not what is intended, you should modify the acl
entry in the /etc/globus-rls-server.conf file.

A-3) Starting the server

Enable automatic start up of the server and start the server.

  chkconfig globus-rls-server on
  service globus-rls-server start

Once the server is running you can use the globus-rls-admin command to
let the LRC and/or RLI send updates to RLI servers. If the server is
running both an LRC and an RLI you can let the LRC send updates to the
RLI in the same server. Sending RLI updates is optional.


B) postgres

The postgres ODBC driver is needed. It can be installed using:

  yum install postgresql-odbc

The postgres server used as a backend can be running on the same host
as the Globus RLS server or on a different host if that is preferred.

B-1) Creating tables

Create a database user for the Globus RLS server using the following
command on the database host, replacing dbuser with the database
username you will be using. You will be prompted for a password for
the new user.

  createuser -P dbuser

Create the databases using the following commands, replacing dbuser
with the database username created above. If you are using a different
database host than the Globus RLS server host you can either copy the
database definition files to the postgresql host or run the commands
on the Globus RLS server host and add a -h flag indicating the
hostname of the postgresql server. You will be promted for the
password.

  createdb -O dbuser -U dbuser -W lrc1000
  createdb -O dbuser -U dbuser -W rli1000
  psql -W -U dbuser -d lrc1000 -f /usr/share/globus/setup/globus-rls-lrc-postgres.sql
  psql -W -U dbuser -d rli1000 -f /usr/share/globus/setup/globus-rls-rli-postgres.sql

B-2) Configuring the Globus RLS server

Edit the file /etc/globus-rls-server.conf and specify the database
username and password you have been using. Also change the lrc_dbname
and rli_dbname to lrc1000_psql and rli1000_psql respectivley. Make
sure this file is not world readable to protect the password.

If you are not using a postgresql server on the same host as the
Globus RLS server, edit the /etc/globus-rls-server-odbc.ini file and
change the Servername entry in the definitions of lrc1000_psql and
rli1000_psql providing the hostname of the postgresql server.

The default access control list gives all users the right to do
everything. If this is not what is intended, you should modify the acl
entry in the /etc/globus-rls-server.conf file.

B-3) Starting the server

Enable automatic start up of the server and start the server.

  chkconfig globus-rls-server on
  service globus-rls-server start

Once the server is running you can use the globus-rls-admin command to
let the LRC and/or RLI send updates to RLI servers. If the server is
running both an LRC and an RLI you can let the LRC send updates to the
RLI in the same server. Sending RLI updates is optional.


C) sqlite

The sqlite ODBC driver is needed. This is not yet (2009-01-05)
packaged in Fedora or RHEL/EPEL, so you need to install it
manually. Source and source RPMs are available form the sqliteodbc
website:

  http://www.ch-werner.de/sqliteodbc/

C-1) Creating tables

Use sqlite to create the database tables:

  mkdir -p /var/lib/globus-rls-server
  sqlite3 /var/lib/globus-rls-server/lrc1000.db < /usr/share/globus/setup/globus-rls-lrc-sqlite.sql
  sqlite3 /var/lib/globus-rls-server/rli1000.db < /usr/share/globus/setup/globus-rls-rli-sqlite.sql

C-2) Configuring the Globus RLS server

The default access control list gives all users the right to do
everything. If this is not what is intended, you should modify the acl
entry in the /etc/globus-rls-server.conf file.

C-3) Starting the server

Enable automatic start up of the server and start the server.

  chkconfig globus-rls-server on
  service globus-rls-server start

Once the server is running you can use the globus-rls-admin command to
let the LRC and/or RLI send updates to RLI servers. If the server is
running both an LRC and an RLI you can let the LRC send updates to the
RLI in the same server. Sending RLI updates is optional.


D) oracle

Configuring the Globus RLS server for the oracle backend is left as en
exercise for the reader.

globus-rls-server.patch:

--- NEW FILE globus-rls-server.patch ---
diff -ur globus_rls_server-4.7.orig/configure.in globus_rls_server-4.7/configure.in
--- globus_rls_server-4.7.orig/configure.in	2007-11-15 19:53:07.000000000 +0100
+++ globus_rls_server-4.7/configure.in	2009-06-05 13:45:08.000000000 +0200
@@ -3,13 +3,6 @@
 AC_REVISION($Revision: 1.11 $)
 AC_INIT(Makefile.am)
 
-if test "x$GLOBUS_LOCATION" = "x"; then
-    echo "ERROR Please specify GLOBUS_LOCATION" >&2
-    exit 1
-fi
-
-AC_SUBST(GLOBUS_LOCATION)
-
 GLOBUS_INIT
 
 AM_PROG_LIBTOOL
diff -ur globus_rls_server-4.7.orig/globus-rls-aggregatorsource.pl globus_rls_server-4.7/globus-rls-aggregatorsource.pl
--- globus_rls_server-4.7.orig/globus-rls-aggregatorsource.pl	2006-01-19 21:23:57.000000000 +0100
+++ globus_rls_server-4.7/globus-rls-aggregatorsource.pl	2009-06-05 13:45:08.000000000 +0200
@@ -46,7 +46,9 @@
 
 # Command line input
 $rlsurl = $ARGV[0];
-$rlsstatscmd = $ENV{GLOBUS_LOCATION} . "/bin/globus-rls-admin -S " . $rlsurl;
+$globus_location = $ENV{GLOBUS_LOCATION};
+$globus_location = "/usr" unless defined $globus_location;
+$rlsstatscmd = $globus_location . "/sbin/globus-rls-admin -S " . $rlsurl;
 
 if ($debug) {
     print "CMD: ", $rlsstatscmd, "\n";
diff -ur globus_rls_server-4.7.orig/Makefile.am globus_rls_server-4.7/Makefile.am
--- globus_rls_server-4.7.orig/Makefile.am	2005-10-27 03:44:54.000000000 +0200
+++ globus_rls_server-4.7/Makefile.am	2009-06-05 13:45:08.000000000 +0200
@@ -28,13 +28,10 @@
 # a list of header files that are to be installed in $prefix/include
 include_HEADERS=
 
-bin_PROGRAMS= \
-	globus-rls-server globus-rls-admin
+sbin_PROGRAMS= \
+	globus-rls-server globus-rls-admin globus-rls-reporter
 
-libexec_PROGRAMS = \
-	globus-rls-reporter
-
-libexec_aggrexecdir=$(GLOBUS_LOCATION)/libexec/aggrexec
+libexec_aggrexecdir=$(libexecdir)/aggrexec
 libexec_aggrexec_SCRIPTS = \
 	globus-rls-aggregatorsource.pl
 
@@ -68,7 +65,6 @@
 
 globus_rls_server_LDFLAGS = \
 	$(GPT_LDFLAGS) \
-	-lglobus_rls_client_$(GLOBUS_FLAVOR_NAME) \
 	$(ODBCLIB)
 
 globus_rls_server_LDADD = \
@@ -78,8 +74,7 @@
 	admin.c
 
 globus_rls_admin_LDFLAGS = \
-	$(GPT_LDFLAGS) \
-	-lglobus_rls_client_$(GLOBUS_FLAVOR_NAME)
+	$(GPT_LDFLAGS)
 
 globus_rls_admin_LDADD = \
 	$(GPT_PGM_LINKS)
@@ -89,8 +84,7 @@
 	version.h
 
 globus_rls_reporter_LDFLAGS = \
-	$(GPT_LDFLAGS) \
-	-lglobus_rls_client_$(GLOBUS_FLAVOR_NAME)
+	$(GPT_LDFLAGS)
 
 globus_rls_reporter_LDADD = \
 	$(GPT_PGM_LINKS)
@@ -100,8 +94,7 @@
 	version.h
 
 globus_rls_test_LDFLAGS = \
-	$(GPT_LDFLAGS) \
-	-lglobus_rls_client_$(GLOBUS_FLAVOR_NAME)
+	$(GPT_LDFLAGS)
 
 globus_rls_test_LDADD = \
 	$(GPT_PGM_LINKS)
diff -ur globus_rls_server-4.7.orig/pkgdata/pkg_data_src.gpt.in globus_rls_server-4.7/pkgdata/pkg_data_src.gpt.in
--- globus_rls_server-4.7.orig/pkgdata/pkg_data_src.gpt.in	2008-06-12 00:48:55.000000000 +0200
+++ globus_rls_server-4.7/pkgdata/pkg_data_src.gpt.in	2009-06-05 13:45:51.000000000 +0200
@@ -3,9 +3,7 @@
 
 <gpt_package_metadata Name="globus_rls_server" Format_Version="0.02">
     <Aging_Version Major="4" Minor="7" Age="0"/>
-    <Description>
-        The Globus Replica Location Service globus-rls-server daemon and globus-rls-admin command-line tool.
-    </Description>
+    <Description>Replica Location Service Server</Description>
     <Functional_Group>Data</Functional_Group>
     <Version_Stability Release="Production"/>
     <src_pkg>
@@ -17,8 +15,6 @@
                 <Version><Simple_Version Major="3"/></Version></Dependency>
             <Dependency Name="globus_io">
                 <Version><Simple_Version Major="3"/></Version></Dependency>
-            <Dependency Name="globus_gssapi_gsi">
-                <Version><Simple_Version Major="4"/></Version></Dependency>
             <Dependency Name="globus_usage">
                 <Version><Simple_Version Major="0"/></Version></Dependency>
             <Dependency Name="globus_database_iodbc">
@@ -27,15 +23,11 @@
                 <Version><Simple_Version Major ="5"/></Version></Dependency>
         </Source_Dependencies>
 
-        <Source_Dependencies Type="lib_link" >
-            <Dependency Name="globus_core">
-                <Version><Simple_Version Major="4"/></Version></Dependency>
+        <Source_Dependencies Type="pgm_link" >
             <Dependency Name="globus_common">
                 <Version><Simple_Version Major="3"/></Version></Dependency>
             <Dependency Name="globus_io">
                 <Version><Simple_Version Major="3"/></Version></Dependency>
-            <Dependency Name="globus_gssapi_gsi">
-                <Version><Simple_Version Major="4"/></Version></Dependency>
             <Dependency Name="globus_usage">
                 <Version><Simple_Version Major="0"/></Version></Dependency>
             <Dependency Name="globus_database_iodbc">
@@ -50,7 +42,7 @@
             <external_includes>@GPT_EXTERNAL_INCLUDES@</external_includes>
             <external_libs>@GPT_EXTERNAL_LIBS@</external_libs>
             <external_ldflags>@GPT_EXTERNAL_LDFLAGS@</external_ldflags>
-            <pkg_libs>-lglobus_rls_client</pkg_libs>
+            <pkg_libs></pkg_libs>
         </Build_Environment>
 
     </src_pkg>


--- NEW FILE globus-rls-server.spec ---
%ifarch alpha ia64 ppc64 s390x sparc64 x86_64
%global flavor gcc64pthr
%else
%global flavor gcc32pthr
%endif

Name:		globus-rls-server
%global _name %(tr - _ <<< %{name})
Version:	4.7
%global setupversion 4.4
Release:	2%{?dist}
Summary:	Globus Toolkit - Replica Location Service Server

Group:		Applications/Internet
License:	ASL 2.0
URL:		http://www.globus.org/
#		Source is extracted from the globus toolkit installer:
#		wget -N http://www-unix.globus.org/ftppub/gt4/4.2.1/installers/src/gt4.2.1-all-source-installer.tar.bz2
#		tar -jxf gt4.2.1-all-source-installer.tar.bz2
#		mv gt4.2.1-all-source-installer/source-trees/replica/rls/server globus_rls_server-4.7
#		cp -p gt4.2.1-all-source-installer/source-trees/core/source/GLOBUS_LICENSE globus_rls_server-4.7
#		tar -zcf globus_rls_server-4.7.tar.gz globus_rls_server-4.7
Source:		%{_name}-%{version}.tar.gz
#		Source1 is extracted from the globus toolkit installer:
#		wget -N http://www-unix.globus.org/ftppub/gt4/4.2.1/installers/src/gt4.2.1-all-source-installer.tar.bz2
#		tar -jxf gt4.2.1-all-source-installer.tar.bz2
#		mv gt4.2.1-all-source-installer/source-trees/replica/rls/setup globus_rls_server_setup-4.4
#		cp -p gt4.2.1-all-source-installer/source-trees/core/source/GLOBUS_LICENSE globus_rls_server_setup-4.4
#		tar -zcf globus_rls_server_setup-4.4.tar.gz globus_rls_server_setup-4.4
Source1:	%{_name}_setup-%{setupversion}.tar.gz
#		init.d startup script
Source2:	%{name}
#		Post-install setup instructions
Source3:	%{name}.INSTALL
#		Some dependency fixes:
#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6594
Patch0:		%{name}.patch
#		Increase the lengths of the LFN/PFN strings:
#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6596
Patch1:		%{name}-strlen.patch
#		Dereferencing of type-punned pointers:
#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6607
Patch2:		%{name}-type-punned-pointer.patch
#		Remove hardcoding of paths:
#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6595
Patch3:		%{name}-setup.patch
#		Increase the lengths of the LFN/PFN strings:
#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6596
Patch4:		%{name}-setup-strlen.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Provides:	%{name}-setup = %{setupversion}
Requires:	globus-common
BuildRequires:	grid-packaging-tools
BuildRequires:	globus-rls-client-devel >= 5
BuildRequires:	globus-common-devel >= 3
BuildRequires:	globus-usage-devel
BuildRequires:	unixODBC-devel
BuildRequires:	globus-io-devel >= 3
BuildRequires:	globus-core >= 4

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%description
The Globus Toolkit is an open source software toolkit used for building Grid
systems and applications. It is being developed by the Globus Alliance and
many others all over the world. A growing number of projects and companies are
using the Globus Toolkit to unlock the potential of grids for their cause.

The %{name} package contains:
Replica Location Service Server
Replica Location Service Server Setup

%prep
%setup -q -n %{_name}-%{version}
%setup -D -T -q -n %{_name}-%{version} -a 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
cd %{_name}_setup-%{setupversion}
%patch3 -p1
%patch4 -p1
cd -

%build
# Remove files that should be replaced during bootstrap
rm -f doxygen/Doxyfile*
rm -f doxygen/Makefile.am
rm -f pkgdata/Makefile.am
rm -f globus_automake*
rm -rf autom4te.cache

# Fix hardcoded default locations
sed 's!/usr/local/etc!/etc!g' -i server.c
sed 's!/usr/local/etc!/etc!g' -i Doc/man/man8/globus-rls-server.8

%{_datadir}/globus/globus-bootstrap.sh

%configure --with-flavor=%{flavor} --sysconfdir='${datadir}/globus'

make %{?_smp_mflags}

# setup package
cd %{_name}_setup-%{setupversion}

# Remove files that should be replaced during bootstrap
rm -f doxygen/Doxyfile*
rm -f doxygen/Makefile.am
rm -f pkgdata/Makefile.am
rm -f globus_automake*
rm -rf autom4te.cache

%{_datadir}/globus/globus-bootstrap.sh

%configure --without-flavor

make %{?_smp_mflags}

cd -

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# setup package
cd %{_name}_setup-%{setupversion}
make install DESTDIR=$RPM_BUILD_ROOT
cd -

# This script is intended to be sourced, not executed
chmod 644 $RPM_BUILD_ROOT%{_datadir}/globus/setup/setup-globus-rls-server.pl

# Register setup
perl -MGrid::GPT::Setup <<EOF
my \$metadata = new Grid::GPT::Setup(package_name => "%{_name}_setup",
				     globusdir => "$RPM_BUILD_ROOT%{_prefix}");
\$metadata->finish();
EOF

# Create setup files
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
sed -e s!@libdir@!%{_libdir}!g \
    -e s!@localstatedir@!%{_localstatedir}/lib/%{name}!g \
    -e s!@SQLITEODBCFLAVOR@!!g \
    -e s!@LIBSUFFIX@!so!g \
  $RPM_BUILD_ROOT%{_datadir}/globus/setup/odbc.ini.in > \
  $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-odbc.ini
sed -e s!@ODBCINI@!%{_sysconfdir}/%{name}-odbc.ini!g \
    -e 's!^odbcini.*$!&\npidfile\t\t\t/var/run/%{name}.pid!g' \
  $RPM_BUILD_ROOT%{_datadir}/globus/setup/%{name}.conf.in > \
  $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
sed s!@sbindir@!%{_sbindir}!g \
  $RPM_BUILD_ROOT%{_datadir}/globus/setup/rls-ldif.conf.in > \
  $RPM_BUILD_ROOT%{_sysconfdir}/rls-ldif.conf

# Remove the SXXrls.in file
rm $RPM_BUILD_ROOT%{_datadir}/globus/setup/SXXrls.in
sed /SXXrls.in/d \
  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}_setup/noflavor_pgm.filelist
sed -e 's/"SXXrls", //' -e '/SXXrls/d' \
  -i $RPM_BUILD_ROOT%{_datadir}/globus/setup/setup-globus-rls-server.pl

# Fix man page section
sed 's!^\(\.TH.*\) 1 !\1 8 !' \
  $RPM_BUILD_ROOT%{_mandir}/man1/globus-rls-reporter.1 > \
  $RPM_BUILD_ROOT%{_mandir}/man8/globus-rls-reporter.8
rm $RPM_BUILD_ROOT%{_mandir}/man1/globus-rls-reporter.1
sed 's!/man1/\(.*\)\.1!/man8/\1.8!' \
  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_doc.filelist

# Install start-up script
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}

# Install license file
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
install -m 644 -p GLOBUS_LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

# Install post installation instructions
install -m 644 -p %{SOURCE3} \
  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/INSTALL

# Generate package filelists
cat $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_pgm.filelist \
    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_data.filelist \
    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_doc.filelist \
    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}_setup/noflavor_pgm.filelist \
  | sed -e s!^!%{_prefix}! -e 's!^.*/man/.*!%doc &*!' > package.filelist

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ $1 = 1 ]; then
  /sbin/chkconfig --add %{name}
fi

%preun
if [ $1 = 0 ]; then
  /sbin/service %{name} stop >/dev/null 2>&1 || :
  /sbin/chkconfig --del %{name}
fi

%postun
if [ $1 -ge 1 ]; then
  /sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi

%files -f package.filelist
%defattr(-,root,root,-)
%dir %{_datadir}/globus/packages/%{_name}
%dir %{_docdir}/%{name}-%{version}
%doc %{_docdir}/%{name}-%{version}/GLOBUS_LICENSE
%dir %{_datadir}/globus/packages/%{_name}_setup
%{_datadir}/globus/packages/setup
%dir %{_datadir}/globus/setup
%dir %{_datadir}/globus/aggrexec
%config(noreplace) %{_sysconfdir}/%{name}-odbc.ini
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/rls-ldif.conf
%{_initrddir}/%{name}
%doc %{_docdir}/%{name}-%{version}/INSTALL

%changelog
* Fri Jun 05 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-2
- Add Requires needed for scriptlets
- Remove the SXXrls.in file
- Remove hardcoded port number in init.d startup script

* Thu Apr 16 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-1
- Make comment about source retrieval more explicit
- Change defines to globals
- Remove explicit requires on library packages
- Put GLOBUS_LICENSE file in extracted source tarball

* Sun Mar 15 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-0.5
- Adapting to updated globus-core package

* Thu Feb 26 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-0.4
- Add s390x to the list of 64 bit platforms

* Tue Dec 30 2008 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-0.3
- Adapt to updated GPT package

* Sat Oct 25 2008 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-0.2
- Update to Globus Toolkit 4.2.1

* Tue Jul 15 2008 Mattias Ellert <mattias.ellert at fysast.uu.se> - 4.7-0.1
- Autogenerated


--- NEW FILE import.log ---
globus-rls-server-4_7-2_fc9:HEAD:globus-rls-server-4.7-2.fc9.src.rpm:1244258197


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/globus-rls-server/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	5 Jun 2009 21:33:06 -0000	1.1
+++ .cvsignore	6 Jun 2009 03:19:39 -0000	1.2
@@ -0,0 +1,2 @@
+globus_rls_server-4.7.tar.gz
+globus_rls_server_setup-4.4.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/globus-rls-server/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	5 Jun 2009 21:33:06 -0000	1.1
+++ sources	6 Jun 2009 03:19:40 -0000	1.2
@@ -0,0 +1,2 @@
+2fa3c7592a2a990afe006038962b6048  globus_rls_server-4.7.tar.gz
+876313912bdea5f6fd3dd96b31dc5b8f  globus_rls_server_setup-4.4.tar.gz




More information about the fedora-extras-commits mailing list