initial import
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 17 Mar 2006 15:34:48 +0000 (15:34 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 17 Mar 2006 15:34:48 +0000 (15:34 +0000)
29 files changed:
org.glite.deployment.jpis/build.xml [new file with mode: 0644]
org.glite.deployment.jpis/config/scripts/glite-jpis-config.py [new file with mode: 0755]
org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml [new file with mode: 0644]
org.glite.deployment.jpis/project/build.number [new file with mode: 0644]
org.glite.deployment.jpis/project/build.properties [new file with mode: 0644]
org.glite.deployment.jpis/project/glite-jp.sdf.xml.template [new file with mode: 0644]
org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template [new file with mode: 0644]
org.glite.deployment.jpis/project/lxscript-rpm.xsl [new file with mode: 0644]
org.glite.deployment.jpis/project/lxscript-tgz.xsl [new file with mode: 0644]
org.glite.deployment.jpis/project/properties.xml [new file with mode: 0644]
org.glite.deployment.jpis/project/quattor-template.xsl [new file with mode: 0644]
org.glite.deployment.jpis/project/version.properties [new file with mode: 0644]
org.glite.deployment.jpps/bin/glite-jpps_installer.sh [new file with mode: 0644]
org.glite.deployment.jpps/bin/glite-jpps_tgz_installer.sh [new file with mode: 0644]
org.glite.deployment.jpps/bin/pro_software_glite_jpps.tpl [new file with mode: 0644]
org.glite.deployment.jpps/build.xml [new file with mode: 0644]
org.glite.deployment.jpps/config/scripts/glite-jpps-config.py [new file with mode: 0755]
org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml [new file with mode: 0644]
org.glite.deployment.jpps/project/build.number [new file with mode: 0644]
org.glite.deployment.jpps/project/build.properties [new file with mode: 0644]
org.glite.deployment.jpps/project/glite-jpps.sdf.xml [new file with mode: 0644]
org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template [new file with mode: 0644]
org.glite.deployment.jpps/project/glite-jpps.spec [new file with mode: 0644]
org.glite.deployment.jpps/project/lxscript-rpm.xsl [new file with mode: 0644]
org.glite.deployment.jpps/project/lxscript-tgz.xsl [new file with mode: 0644]
org.glite.deployment.jpps/project/properties.xml [new file with mode: 0644]
org.glite.deployment.jpps/project/quattor-template.xsl [new file with mode: 0644]
org.glite.deployment.jpps/project/spec.xsl [new file with mode: 0644]
org.glite.deployment.jpps/project/version.properties [new file with mode: 0644]

diff --git a/org.glite.deployment.jpis/build.xml b/org.glite.deployment.jpis/build.xml
new file mode 100644 (file)
index 0000000..c2bf066
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+
+       Build file for the gLite JP Server Deployment Unit
+       
+    Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>     
+
+       Version info: $Id$
+       Release: $Name$
+
+       Revision history:
+       $Log$
+       
+-->
+
+<project name="deployment-lb" default="dist">
+
+       <!-- =========================================
+                Builds the gLite JP Deployment Unit
+                ========================================= -->
+
+       <!-- =========================================
+            Import properties (order is important)
+                ========================================= -->
+
+       <!-- import baseline & user properties -->
+       <import file="../org.glite/project/baseline.properties.xml" />
+
+       <!-- import component build properties,
+                       component properties &
+                       component common properties -->
+       <import file="./project/properties.xml"/>
+
+       <!-- import subsystem build properties,
+                       subsystem properties &
+                       subsystem common properties -->
+       <import file="${subsystem.properties.file}"/>
+
+       <!-- import global build properties &
+                       global properties -->
+       <import file="${global.properties.file}" />
+
+       <!-- =========================================
+                Load dependency property files (order is important)
+                ========================================= -->
+       <property file="${user.dependencies.file}"/>
+       <property file="${component.dependencies.file}" />
+       <property file="${subsystem.dependencies.file}" />
+       <property file="${global.dependencies.file}"/>
+
+
+       <!-- =========================================
+                Import task definitions (order is important)
+                ========================================= -->
+       <import file="${subsystem.taskdefs.file}" />
+       <import file="${global.taskdefs.file}" />
+
+       <!-- =========================================
+                Load configure options
+                ========================================= -->
+       <property file="${global.configure.options.file}"/>
+
+       <!-- =========================================
+                Load common targets
+                ========================================= -->
+       <import file="${global.targets-external-dependencies.file}"/>
+       <import file="${global.targets-deploy.file}" />
+
+       <!-- =========================================
+                Load version file 
+                ========================================= -->
+       <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+
+       <!-- ==============================================
+                Local private targets
+                ============================================== -->
+
+       <target name="localinit"
+               description="Module specific initialization tasks">
+       </target>
+
+       <target name="localcompile"
+               description="Module specific compilation tasks">
+       </target>
+
+       <target name="localclean"
+               description="Module specific cleaning tasks">
+       </target>
+
+</project>
diff --git a/org.glite.deployment.jpis/config/scripts/glite-jpis-config.py b/org.glite.deployment.jpis/config/scripts/glite-jpis-config.py
new file mode 100755 (executable)
index 0000000..7c347aa
--- /dev/null
@@ -0,0 +1,494 @@
+#!/usr/bin/env python
+################################################################################
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://eu-egee.org/partners/ for details on the copyright holders.
+# For license conditions see the license file or http://eu-egee.org/license.html
+#
+################################################################################
+# glite-jpis-config v. 1.0.0
+#
+# Post-installation script for configuring the gLite Job Provenance Servers
+# Robert Harakaly < mmulac@cern.ch >
+#
+# Version info: $Id$
+#
+# Usage: python glite-jpis-config [-c|-v|-h|--help]
+#        -c, --checkconf         print configuration
+#        -v, --version           print version
+#        -h,--help   print usage info
+#        --configure             configure the service
+#        --start                 start the service
+#        --stop                  stop the service
+#        --status                show service status
+#
+# Return codes: 0 - Ok
+#               1 - Configuration failed
+#
+################################################################################
+
+import os,string,pwd
+import sys, posix, getopt,time
+
+sys.path.append(".")
+from gLiteInstallerLib import gLib 
+from gLiteInstallerLib import ConfigParams
+import mysql as MySQL
+
+# Set global variables here 
+global params                         # all config values from the XML file
+
+class glite_jpis:
+
+    def __init__(self):
+        self.mysql = MySQL.Mysql()
+        self.verbose = 0
+        self.version = "1.0.0"
+        self.name = "glite-jpis"
+        self.friendly_name = "gLite Job Provenance Index Server"
+        
+    #-------------------------------------------------------------------------------
+    # Banner 
+    #-------------------------------------------------------------------------------
+
+    def banner(self):
+
+        print "\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+        print "Configuring the %s" % self.friendly_name
+        print "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
+    
+    #-------------------------------------------------------------------------------
+    # Copyright 
+    #-------------------------------------------------------------------------------
+
+    def copyright(self):
+
+        print '\nCopyright (c) Members of the EGEE Collaboration. 2004'
+        print 'See http://eu-egee.org/partners/ for details on the copyright holders'
+        print 'For license conditions see the license file or http://eu-egee.org/license.html'
+
+    #-------------------------------------------------------------------------------
+    # Version
+    #-------------------------------------------------------------------------------
+
+    def showVersion(self):
+
+        print '\n%s-config  v. %s\n' % (self.name,self.version)
+    
+    #-------------------------------------------------------------------------------
+    # Usage
+    #-------------------------------------------------------------------------------
+
+    def usage(self,msg = ""):
+
+        if msg:
+            print "\n%s" % (msg)
+        
+        self.copyright()
+        self.showVersion()
+    
+        print """Usage: \n
+Edit the configuration file %s.cfg.xml in
+%s/etc.config/templates\n
+save it as %s/etc/config/%s.cfg.xml
+and run the script as follows\n 
+python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
+        os.environ['GLITE_LOCATION'], self.name, self.name)
+
+        print '    -c, --checkconf     print the service configuration'
+        print '    -v, --version       print the version of the configuration script'
+        print '    -h, --help          print this usage information'
+        print '    --configure         configure the service'
+        print '    --start             start the service'
+        print '    --stop              stop the service'
+        print '    --status            check service status'
+        print '\n'
+
+    #-------------------------------------------------------------------------------
+    # All the configuration code goes here
+    #-------------------------------------------------------------------------------
+
+    def start(self):
+
+        self.mysql.start()
+        time.sleep(5)
+
+        if not os.path.exists('/tmp/mysql.sock'):
+            os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+            
+        #-------------------------------------------------------------------
+        # Start Index Server
+        #-------------------------------------------------------------------
+
+        pid = glib.getPID('indexd')
+        if pid != 0:
+            print 'The gLite JP Index Server service is already running. Restarting...'
+            os.system('%s/etc/init.d/glite-jp-indexd stop' % os.environ['GLITE_LOCATION'])
+        else:
+            print 'Starting the gLite JP Index Server service...'
+
+        os.system('%s/etc/init.d/glite-jp-indexd start' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('indexd')
+
+        if (pid != 0):
+            print "The gLite JP Index Server service has been started               ",
+            glib.printOkMessage()
+        else:
+            glib.printErrorMessage("Could not start the gLite JP Index Server service")
+            glib.printErrorMessage("Please verify and re-run the script                        "),
+            glib.printFailedMessage()
+            return 1
+        
+       return 0
+        
+    def stop(self):
+
+       error_level = 0
+
+        #-------------------------------------------------------------------
+        # Stop Index Server
+        #-------------------------------------------------------------------
+
+        pid = glib.getPID('indexd')
+        if (pid != 0):
+            os.system('%s/etc/init.d/glite-jp-indexd stop' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('indexd')
+        if (pid != 0):
+            print 'Could not stop the JP Index Server service            ',
+            glib.printFailedMessage()
+            error_level = 1
+        else:
+            print 'JP Index Server service has been stopped            ',
+            glib.printOkMessage()
+        
+        #-------------------------------------------------------------------
+        # MySQL
+        #-------------------------------------------------------------------
+
+        self.mysql.stop()
+
+        return error_level
+        
+    def status(self):
+
+        error_level = 0
+
+        retval = os.system('%s/etc/init.d/glite-jp-indexd status' % os.environ['GLITE_LOCATION'])
+        if retval != 0:
+            error_level = 1
+
+        return error_level
+        
+    def configure(self):
+        
+        #--------------------------------------------------------
+        # Installs the Security Utilities
+        #--------------------------------------------------------
+        
+        if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()):
+            print "\nConfiguring gLite Security Utilities                   ",
+            glib.printFailedMessage()
+        else:
+            print "\nConfiguring gLite Security Utilities                   ",
+            glib.printOkMessage()
+        
+        # Create the GLITE_USER if it doesn't exists
+        print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER']
+        (uid,gid) = glib.get_user_info(os.environ['GLITE_USER'])
+        glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid)
+        jpis_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+        glib.check_dir(jpis_cert_path ,0755, uid, gid)
+        glib.printOkMessage()
+
+        # Create all directories needed
+        glib.check_dir(os.environ['GLITE_CERT_DIR'])
+        print "\nVerify CA certificates directory            ",
+        glib.printOkMessage()
+         
+        # Copy certificates
+        print "\nCopy host certificates to GLITE_USER home directory as service certificates",
+        os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], jpis_cert_path))
+        os.chown("%s/hostcert.pem" % jpis_cert_path, uid,gid)
+        os.chmod("%s/hostcert.pem" % jpis_cert_path, 0644)
+        os.chown("%s/hostkey.pem" % jpis_cert_path, uid,gid)
+        os.chmod("%s/hostkey.pem" % jpis_cert_path, 0400)
+        glib.printOkMessage()
+
+        #--------------------------------------------------------
+        # Configure MySQL
+        #--------------------------------------------------------
+
+       # Set mysql parameters
+        #self.mysql.setConfiguration('client','max_allowed_packet',params['mysql.max_allowed_packet'])
+        self.mysql.setConfiguration('mysqld','max_allowed_packet',params['mysql.max_allowed_packet'])
+        
+        # start MySQL
+        self.mysql.stop()
+        time.sleep(5)
+        self.mysql.start()
+        
+        if not os.path.exists('/tmp/mysql.sock'):
+            os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+
+        # ------------------------------------------------------------
+        # Check password of MySQL
+        # ------------------------------------------------------------
+        
+        self.mysql_root_password = params['mysql.root.password']
+        if not params.has_key('set.mysql.root.password'):
+            params['set.mysql.root.password'] = 'false'
+        setempty = params['set.mysql.root.password']
+        if self.mysql.checkMySQLConfiguration(self.mysql_root_password,setempty):
+            return 1
+        
+        # Create the MySQL database
+        print "\nCreate/Verify the %s database" % params['jpis.database.name']
+        
+        # Check if database exists
+        if self.mysql.existsDB(params['jpis.database.name'],self.mysql_root_password) != 0:
+            # Create database
+            print ('\n==> Creating MySQL %s database\n' % params['jpis.database.name'])
+    
+            if os.path.exists('/bin/rm /tmp/mysql_ct'):
+                os.remove('/tmp/mysql_ct')
+            
+            file = open('/tmp/mysql_ct', 'w')
+
+            self.mysql.add_user(params['jpis.database.name'],params['jpis.database.username'],"",self.mysql_root_password)
+            text = ['USE %s;\n' % params['jpis.database.name'],
+                    '\. %s/etc/glite-jp-index-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
+    
+            file.writelines(text)
+            file.close()
+            os.system('/usr/bin/mysql -p%s < /tmp/mysql_ct' % self.mysql_root_password)
+            os.system('/bin/rm /tmp/mysql_ct')
+            
+            #Starting and stopping the database before the index creation
+            self.mysql.stop()
+            time.sleep(5)
+            self.mysql.start()
+
+        else:
+            print "\n==> MySQL database %s already exist\n" % params['jpis.database.name']
+            
+        self.mysql.stop()
+    
+        return 0
+        
+#-------------------------------------------------------------------------------
+# Set all environment variables
+#-------------------------------------------------------------------------------
+
+def loadDefaults(params):
+
+    params['GLITE_LOCATION'] = "/opt/glite"
+    params['mysql.root.password'] = ""
+    params['jpis.database.name'] = "jpis"
+    params['jpis.database.username'] = "jpis"
+    params['mysql.max_allowed_packet'] = "17"
+    params['jpis.serviceName'] = 'JP IS Server service at %s' % glib.fq_hostname
+    params['jpis.serviceType'] = 'org.glite.jp.index'
+    params['jpis.statusScript'] = '%s/etc/init.d/glite-jp-indexd status' % params['GLITE_LOCATION']
+    params['jpis.endpoint'] = 'not available'
+
+def set_env():
+
+    # gLite
+    glib.export('GLITE_LOCATION');
+    glib.export('GLITE_LOCATION_VAR');
+    if not os.path.exists(os.environ['GLITE_LOCATION_VAR']):
+        os.mkdir(os.environ['GLITE_LOCATION_VAR'],0755)
+    glib.export('GLITE_LOCATION_LOG');
+    if not os.path.exists(os.environ['GLITE_LOCATION_LOG']):
+        os.mkdir(os.environ['GLITE_LOCATION_LOG'],0755)
+    glib.export('GLITE_LOCATION_TMP');
+    if not os.path.exists(os.environ['GLITE_LOCATION_TMP']):
+        os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755)
+
+    if not params.has_key('glite.user.group'):
+        params['glite.user.group'] = ''
+    (uid,gid) = glib.add_user(params['glite.user.name'],params['glite.user.group'])
+    glib.export('GLITE_USER',params['glite.user.name'])
+    jpis_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+    glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % jpis_cert_path)
+    glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % jpis_cert_path)
+    glib.export('GLITE_CERT_DIR',params['ca.certificates.dir'])
+
+    glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION'])
+    glib.export('GPT_LOCATION',params['GPT_LOCATION'])
+    
+    glib.export('JAVA_HOME')
+
+    # bin and lib paths
+    glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/bin:%s/externals/bin:%s/bin" \
+        % (os.environ['JAVA_HOME'],os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
+    glib.addEnvPath("LD_LIBRARY_PATH","/usr/lib:%s/lib:%s/externals/lib:%s/lib" % (os.environ['GLOBUS_LOCATION'], os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
+
+    # Perl
+    glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION']))
+
+    # JP IS configuration
+    glib.export('GLITE_JPIS_PS',params['jpis.ps'])    
+    glib.export('GLITE_JPIS_DEBUG',params['jpis.debug'])    
+    glib.export('GLITE_JPIS_QT',params['jpis.qt'])    
+    glib.export('GLITE_JPIS_AUTH',params['jpis.auth'])    
+    glib.export('GLITE_JPIS_DB',params['jpis.db'])    
+    glib.export('GLITE_JPIS_PORT',params['jpis.port'])    
+    glib.export('GLITE_JPIS_PIDFILE',params['jpis.pid.file'])    
+    glib.export('GLITE_JPIS_LOGFILE',params['jpis.log.file'])
+
+    # Set environment
+    glib.setUserEnv()
+    
+#-------------------------------------------------------------------------------
+#  Main program begins here 
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+
+    # The script must be run as root
+    if not os.geteuid()==0:
+        print '"\nThis script must be run as root\n'
+        sys.exit(1)
+        
+    # Get an instance of the ConfigParams class
+    params = ConfigParams()
+
+    # Get an instance of the library class
+    glib = gLib()
+    
+    # Load parameters
+    loadDefaults(params)
+    try:
+        opts, args = glib.getopt(sys.argv[1:], '', ['siteconfig='])
+        for o, a in opts:
+            if o == "--siteconfig":
+                params['site.config.url'] = a
+                break
+    except getopt.GetoptError:
+        pass
+    if glib.loadConfiguration("%s/../glite-jpis.cfg.xml" % glib.getScriptPath(),params):
+        print "An error occurred while configuring the service"
+        sys.exit(1)
+
+    verbose = 0
+    if params.has_key('glite.installer.verbose'):
+        if params['glite.installer.verbose'] == "true":
+            verbose = 1
+    glib.verbose = verbose
+    
+    # Set up the environment
+    set_env()
+          
+
+    # Instantiate the service classes
+    service = glite_jpis()
+    service.verbose = verbose
+    
+    # Command line opts if any
+    try:
+        opts, args = glib.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','configure','stop','start','status','siteconfig='])
+    except getopt.GetoptError:
+        service.usage(msg = "Unknown options(s)")
+        sys.exit(1)
+
+    if len(opts) == 0:
+        service.usage()
+        sys.exit(0)
+    
+    # Check cli options
+    for o, a in opts:
+        if o in ("-h", "--help"):
+            service.usage()
+            sys.exit(0)
+        if o in ("-v", "--version"):
+            service.showVersion()
+            sys.exit(0)
+        if o in ("-c", "--checkconf"):
+            service.copyright()
+            service.showVersion()
+            glib.print_params(params)
+            sys.exit(0)
+                
+        if o == "--configure":
+       
+
+           # Check certificates
+           if params.has_key('glite.installer.checkcerts'):
+               if params['glite.installer.checkcerts'] == "true":
+                   if glib.check_certs(params) != 0:
+                       print "An error occurred while configuring the %s service" \
+                           % service.friendly_name
+                       sys.exit(1)
+           
+           # Print configuration parameters
+           if verbose:
+               glib.print_params(params)
+
+           service.copyright()
+           service.showVersion()
+           service.banner()
+        
+            # Stop all services
+            glib.printInfoMessage("\n\nStopping all running JP IS services...")
+            service.stop()
+            
+    # Configure the service
+            return_result = service.configure()
+
+            if return_result == 0:
+
+                # Stop all services
+                glib.printInfoMessage("\n\nStopping all running JP IS services...")
+                service.stop()
+                
+                print "\n\nThe %s configuration was successfully completed\n" % service.friendly_name
+                print "You can now start the service using the --start option of this script\n\n"
+               glib.registerService()
+
+                sys.exit(0)
+
+            elif return_result == 2:
+
+                # Stop all services
+                glib.printInfoMessage("\n\nStopping all running JP IS services...")
+                service.stop()
+                
+                print "\n\nThe %s configuration was completed,\n" % service.friendly_name
+                print "but warnings were issued. Please revise them and re-run the script\n"
+                print "or configure JP IS manually\n"
+
+                sys.exit(2)
+
+           else:
+                print "\n\nAn unrecoverable error occurred while configuring the %s" \
+                    % service.friendly_name
+
+               sys.exit(1)
+        
+       if o in ("start", "--start"):
+           # Start the service
+           if service.start() == 0:
+                print "\n\nThe %s was successfully started           " % service.friendly_name,
+               glib.printOkMessage()
+                sys.exit(0)
+           else:
+                print "\n\nAn error occurred while starting the %s            " % service.friendly_name,
+               glib.printFailedMessage()
+               sys.exit(1)
+
+        if o in ("stop", "--stop"): 
+            # Stop the service
+            if service.stop() == 0:
+                print "\n\nThe %s was successfully stopped           " % service.friendly_name,
+                glib.printOkMessage()
+                sys.exit(0)
+            else:
+                print "\n\nAn unrecoverable error occurred while stopping the %s " % service.friendly_name,
+                glib.printFailedMessage()
+                sys.exit(1)
+        if o == "--status":
+            sys.exit(service.status())
+                
diff --git a/org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml b/org.glite.deployment.jpis/config/templates/glite-jpis.cfg.xml
new file mode 100644 (file)
index 0000000..ca3e6b6
--- /dev/null
@@ -0,0 +1,88 @@
+<!--  Parameters for  configuring the org.glite.data.io-daemon service -->
+<config>
+       <parameters>
+
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- User-defined parameters - Please change them -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+
+               <!--  gLite services user accounts  -->
+               <glite.user.name 
+                       description="Name of the user account used to run the gLite services
+                       on this JP node"
+                       value="changeme"/>
+
+               <glite.user.group
+                       description="Group of the user specified in the 'glite.user.name'
+                       parameter. Leave it empty of comment it out to use the same as 'glite.user.name'"
+                       value="changeme"/>
+               
+               <mysql.root.password
+                       description="The mysql root password"
+                       value="changeme"/>
+
+               <!-- JP Index Server configuration -->
+               <jpis.ps
+                       description="URL of JP Index Server, typically https://localhost:jpps.port"
+                       value="changeme"/>
+               
+                               
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- Advanced parameters - Change them if you know what you're doing -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+
+               <!-- Installer configuration -->
+               <glite.installer.verbose
+                       description="Enable verbose output"
+                       value="true"/>
+                       
+               <glite.installer.checkcerts
+                       description="Enable check of host certificates"
+                       value="true"/>
+
+               <!-- mysql configuration -->
+               <set.mysql.root.password
+                       description="If this parameter is true, then the root password of the mysql database
+                       is set to the value specified in mysql.root.password if it not yet set. This parameter has
+                       no effect if the database root password is already set. It can be used to ease automated
+                       installation and configuration of the service, if mysql is not managed in some other way"
+                       value="false"/>
+
+               <!-- JP Index Server configuration -->
+               <jpis.debug
+                       description="enables to pass various debug options to JP IS"
+                       value=""/>
+
+               <jpis.qt
+                       description="enables to set query type - one of hist/cont/both"
+                       value="both"/>
+
+               <jpis.auth
+                       description="setting to '-n' switches off authorization"
+                       value=""/>
+
+               <jpis.db
+                       description="non-default JP IS DB contact string"
+                       value=""/>
+
+               <jpis.port
+                       description="non-default JP IS port"
+                       value=""/>
+
+               <jpis.pid.file
+                       description="path to non-default pidfile"
+                       value=""/>
+
+               <jpis.log.file
+                       description="path to non-default logfile"
+                       value=""/>
+
+
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- System parameters - You should leave these alone -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->               
+       
+                       
+       </parameters>
+
+</config>
diff --git a/org.glite.deployment.jpis/project/build.number b/org.glite.deployment.jpis/project/build.number
new file mode 100644 (file)
index 0000000..58569c4
--- /dev/null
@@ -0,0 +1,2 @@
+#Wed Apr 13 09:36:57 CEST 2005
+module.build=232
diff --git a/org.glite.deployment.jpis/project/build.properties b/org.glite.deployment.jpis/project/build.properties
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/org.glite.deployment.jpis/project/glite-jp.sdf.xml.template b/org.glite.deployment.jpis/project/glite-jp.sdf.xml.template
new file mode 100644 (file)
index 0000000..d27cdec
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version ="1.0" encoding="UTF-8"?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+-->
+
+<node name="glite-jpis-node" version="@module.version@">
+       <services>
+               <service name="glite-jpis-service">
+                       <components>
+                           <component name="glite-config"
+                                       version="@org.glite.deployment.config.info.version@"
+                                       age="@org.glite.deployment.config.info.age@"
+                                       build="@org.glite.deployment.config.info.build@"
+                                       arch="noarch"/>
+                                       
+                               <component name="glite-jpis-config"
+                                       version="@module.version@"
+                                       age="@module.age@"
+                                       build="@module.build@"
+                                       arch="noarch"/>
+
+                               <component name="glite-jp-ws-interface"
+                                       version="@org.glite.jp.ws-interface.info.version@"
+                                       age="@org.glite.jp.ws-interface.info.age@"
+                                       build="@org.glite.jp.ws-interface.info.build@"
+                                       arch="i386"/>
+                       
+                               <component name="glite-jp-common"
+                                       version="@org.glite.jp.common.info.version@"
+                                       age="@org.glite.jp.common.info.age@"
+                                       build="@org.glite.jp.common.info.build@"
+                                       arch="i386"/>
+       
+                               <component name="glite-jp-index"
+                                       version="@org.glite.jp.index.info.version@"
+                                       age="@org.glite.jp.index.info.age@"
+                                       build="@org.glite.jp.index.info.build@"
+                                       arch="i386"/>
+                                          
+                               <component name="glite-jp-server-common"
+                                       version="@org.glite.jp.server-common.info.version@"
+                                       age="@org.glite.jp.server-common.info.age@"
+                                       build="@org.glite.jp.server-common.info.build@"
+                                       arch="i386"/>
+
+                               <component name="glite-wms-utils-jobid"
+                                       version="@org.glite.wms-utils.jobid.info.version@"
+                                       age="@org.glite.wms-utils.jobid.info.age@"
+                                       build="@org.glite.wms-utils.jobid.info.build@"
+                                       arch="i386"/>
+       
+                               <component name="glite-wms-utils-exception"
+                                       version="@org.glite.wms-utils.exception.info.version@"
+                                       age="@org.glite.wms-utils.exception.info.age@"
+                                       build="@org.glite.wms-utils.exception.info.build@"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-gsoap-plugin"
+                                       version="@org.glite.security.gsoap-plugin.info.version@"
+                                       age="@org.glite.security.gsoap-plugin.info.age@"
+                                       build="@org.glite.security.gsoap-plugin.info.build@"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-voms-api-c"
+                                   version="@org.glite.security.voms-api-c.info.version@"
+                                   age="@org.glite.security.voms-api-c.info.age@"
+                                   build="@org.glite.security.voms-api-c.info.build@"
+                                   arch="i386"/>
+
+                               <component name="gridsite"
+                                   version="@org.gridsite.core.info.version@"
+                                   age="@org.gridsite.core.info.age@"
+                                                       build="@org.gridsite.core.info.build@"
+                                   arch="i386"/>
+                       </components>
+                       <dependencies>
+                               <external name="@ext.mysql-server.rpm.name@"
+                                         version="@ext.mysql-server.version@"
+                                         age="@ext.mysql-server.rpm.age@"
+                                         arch="@ext.mysql-server.platform@"/>                            
+                               <external name="@ext.mysql-client.rpm.name@"
+                                         version="@ext.mysql-client.version@"
+                                         age="@ext.mysql-client.rpm.age@"
+                                         arch="@ext.mysql-client.platform@"/>                            
+                               <external name="@ext.c-ares.rpm.name@"
+                                       version="@ext.c-ares.version@"
+                                       age="@ext.c-ares.rpm.age@"
+                                       arch="@ext.c-ares.platform@"/>
+                               <external name="@ext.globus-essentials.rpm.name@"
+                                       version="@ext.globus-essentials.rpm.version@"
+                                       age="@ext.globus-essentials.rpm.age@"
+                                       arch="@ext.globus-essentials.platform@"/>
+                               <external name="@ext.gpt.rpm.name@"
+                                       version="@ext.gpt.rpm.version@"
+                                       age="@ext.gpt.rpm.age@"
+                                       arch="@ext.gpt.platform@"/>
+                               <external name="@ext.myproxy.rpm.name@"
+                                       version="@ext.myproxy.version@"
+                                       age="@ext.myproxy.rpm.age@"
+                                       arch="@ext.myproxy.platform@"/>
+                               <external name="@ext.perl-expect-pm.rpm.name@"
+                                       version="@ext.perl-expect-pm.version@"
+                                       age="@ext.perl-expect-pm.rpm.age@"
+                                       arch="@ext.perl-expect-pm.platform@"/>
+                       </dependencies>
+               </service>
+
+               <!-- Security Utilities -->
+        <service name="glite-security-utils">
+                <subservice name="glite-security-utils"/>
+        </service>
+       </services>
+       <dependencies>
+       </dependencies>
+</node>
diff --git a/org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template b/org.glite.deployment.jpis/project/glite-jpis.sdf.xml.template
new file mode 100644 (file)
index 0000000..d27cdec
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version ="1.0" encoding="UTF-8"?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+-->
+
+<node name="glite-jpis-node" version="@module.version@">
+       <services>
+               <service name="glite-jpis-service">
+                       <components>
+                           <component name="glite-config"
+                                       version="@org.glite.deployment.config.info.version@"
+                                       age="@org.glite.deployment.config.info.age@"
+                                       build="@org.glite.deployment.config.info.build@"
+                                       arch="noarch"/>
+                                       
+                               <component name="glite-jpis-config"
+                                       version="@module.version@"
+                                       age="@module.age@"
+                                       build="@module.build@"
+                                       arch="noarch"/>
+
+                               <component name="glite-jp-ws-interface"
+                                       version="@org.glite.jp.ws-interface.info.version@"
+                                       age="@org.glite.jp.ws-interface.info.age@"
+                                       build="@org.glite.jp.ws-interface.info.build@"
+                                       arch="i386"/>
+                       
+                               <component name="glite-jp-common"
+                                       version="@org.glite.jp.common.info.version@"
+                                       age="@org.glite.jp.common.info.age@"
+                                       build="@org.glite.jp.common.info.build@"
+                                       arch="i386"/>
+       
+                               <component name="glite-jp-index"
+                                       version="@org.glite.jp.index.info.version@"
+                                       age="@org.glite.jp.index.info.age@"
+                                       build="@org.glite.jp.index.info.build@"
+                                       arch="i386"/>
+                                          
+                               <component name="glite-jp-server-common"
+                                       version="@org.glite.jp.server-common.info.version@"
+                                       age="@org.glite.jp.server-common.info.age@"
+                                       build="@org.glite.jp.server-common.info.build@"
+                                       arch="i386"/>
+
+                               <component name="glite-wms-utils-jobid"
+                                       version="@org.glite.wms-utils.jobid.info.version@"
+                                       age="@org.glite.wms-utils.jobid.info.age@"
+                                       build="@org.glite.wms-utils.jobid.info.build@"
+                                       arch="i386"/>
+       
+                               <component name="glite-wms-utils-exception"
+                                       version="@org.glite.wms-utils.exception.info.version@"
+                                       age="@org.glite.wms-utils.exception.info.age@"
+                                       build="@org.glite.wms-utils.exception.info.build@"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-gsoap-plugin"
+                                       version="@org.glite.security.gsoap-plugin.info.version@"
+                                       age="@org.glite.security.gsoap-plugin.info.age@"
+                                       build="@org.glite.security.gsoap-plugin.info.build@"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-voms-api-c"
+                                   version="@org.glite.security.voms-api-c.info.version@"
+                                   age="@org.glite.security.voms-api-c.info.age@"
+                                   build="@org.glite.security.voms-api-c.info.build@"
+                                   arch="i386"/>
+
+                               <component name="gridsite"
+                                   version="@org.gridsite.core.info.version@"
+                                   age="@org.gridsite.core.info.age@"
+                                                       build="@org.gridsite.core.info.build@"
+                                   arch="i386"/>
+                       </components>
+                       <dependencies>
+                               <external name="@ext.mysql-server.rpm.name@"
+                                         version="@ext.mysql-server.version@"
+                                         age="@ext.mysql-server.rpm.age@"
+                                         arch="@ext.mysql-server.platform@"/>                            
+                               <external name="@ext.mysql-client.rpm.name@"
+                                         version="@ext.mysql-client.version@"
+                                         age="@ext.mysql-client.rpm.age@"
+                                         arch="@ext.mysql-client.platform@"/>                            
+                               <external name="@ext.c-ares.rpm.name@"
+                                       version="@ext.c-ares.version@"
+                                       age="@ext.c-ares.rpm.age@"
+                                       arch="@ext.c-ares.platform@"/>
+                               <external name="@ext.globus-essentials.rpm.name@"
+                                       version="@ext.globus-essentials.rpm.version@"
+                                       age="@ext.globus-essentials.rpm.age@"
+                                       arch="@ext.globus-essentials.platform@"/>
+                               <external name="@ext.gpt.rpm.name@"
+                                       version="@ext.gpt.rpm.version@"
+                                       age="@ext.gpt.rpm.age@"
+                                       arch="@ext.gpt.platform@"/>
+                               <external name="@ext.myproxy.rpm.name@"
+                                       version="@ext.myproxy.version@"
+                                       age="@ext.myproxy.rpm.age@"
+                                       arch="@ext.myproxy.platform@"/>
+                               <external name="@ext.perl-expect-pm.rpm.name@"
+                                       version="@ext.perl-expect-pm.version@"
+                                       age="@ext.perl-expect-pm.rpm.age@"
+                                       arch="@ext.perl-expect-pm.platform@"/>
+                       </dependencies>
+               </service>
+
+               <!-- Security Utilities -->
+        <service name="glite-security-utils">
+                <subservice name="glite-security-utils"/>
+        </service>
+       </services>
+       <dependencies>
+       </dependencies>
+</node>
diff --git a/org.glite.deployment.jpis/project/lxscript-rpm.xsl b/org.glite.deployment.jpis/project/lxscript-rpm.xsl
new file mode 100644 (file)
index 0000000..7b6c6e3
--- /dev/null
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" 
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+       <xsl:output method="xml" 
+               indent="yes"
+               encoding="UTF-8"
+               omit-xml-declaration="yes"/>
+
+       <!-- Definition of variables and parameters -->
+       <xsl:param name="installers"/>
+       <xsl:param name="repository"/>
+       <xsl:param name="ext-repository"/>
+
+       <!-- global processing -->
+       <xsl:template match="/">
+#!/bin/sh
+
+# Copyright (c) Members of the EGEE Collaboration. 2004 
+# See http://eu-egee.org/partners/ for details on the copyright holders
+# For license conditions see the license file or http://eu-egee.org/license.html
+
+# glite-jpis_installer v. <xsl:value-of select="/node/@version"/>
+#
+# The glite-jpis_installer installs the gLite Job Provenance Index Server
+#
+# Usage: glite-jpis_installer [-u|-v|--help]
+#        -u          uninstall
+#        -v          print version
+#        --help      print script usage info
+# Return codes: 0 - Ok
+#               1 - if a file could not be downloaded
+
+###############################################################################
+
+#Parse the RPMLIST to strip out the RPMS that are already installed
+function parseRPMList()
+{
+        newRPMLIST=""
+        localRPMLIST=`rpm -qa`
+        for i in $RPMLIST
+        do
+                g=`echo $i | sed -e 's/\.i386\.rpm//g'`
+                g=`echo $g | sed -e 's/\.noarch\.rpm//g'`
+                if [ -z "`echo $localRPMLIST | grep $g`" ]; then
+                        newRPMLIST="${newRPMLIST} $i"
+                else
+                        echo "$i is already installed. It will be skipped."
+                fi
+        done
+                                                                                                                                                             
+        RPMLIST=$newRPMLIST
+}
+
+#Parse the SCRIPTLIST to execute all scripts
+function parseScriptList()
+{
+        for i in $SCRIPTLIST
+        do
+               if [ "$INSTALL" = "true" ]; then
+                        $i
+               else
+                        $i -u
+               fi
+        done
+}
+
+#Downloads and install the module RPMS
+function install()
+{
+
+       INSTALL=true
+       version
+       echo
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x Please wait, downloading the gLite Job Provenance Index Server... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+
+        mkdir -p glite-jpis
+        cd glite-jpis
+
+       # Download global dependencies  
+       <xsl:for-each select="node/dependencies">
+               <xsl:apply-templates>
+                               <xsl:with-param name="install">true</xsl:with-param>
+               </xsl:apply-templates>
+       </xsl:for-each>
+       
+       <xsl:for-each select="node/services/service">
+
+       # Download <xsl:value-of select="@name"/> scripts from repository
+                <xsl:for-each select=".">
+                        <xsl:apply-templates select="subservice">
+                                <xsl:with-param name="install">true</xsl:with-param>
+                        </xsl:apply-templates>
+                </xsl:for-each>
+
+
+       # Download <xsl:value-of select="@name"/> dependencies RPMS from repository
+               <xsl:for-each select="dependencies">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">true</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       # Download <xsl:value-of select="@name"/> RPMS from repository
+               <xsl:for-each select="components">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">true</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       </xsl:for-each>
+
+       # Download and install subservices
+        parseScriptList
+
+               
+       # Install all RPMS
+       echo
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x Please wait, installing the gLite Job Provenance Index Server... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+       parseRPMList
+       if [ ! -z "$RPMLIST" ]; then
+               rpm -Uvh $RPMLIST
+               rpm_return=$?
+       else
+               echo All required RPMS are already installed
+               rpm_return=0
+       fi
+       if [ "$rpm_return" == "0" ]; then
+               echo
+               echo Done!
+               echo
+               echo Before using the gLite JP, please create or update the configuration
+               echo files /opt/glite/etc/config/glite-jpis.cfg.xml
+               echo and /opt/glite/etc/config/glite-global.cfg.xml
+               echo and run the configuration script
+               echo /opt/glite/etc/config/scripts/glite-jpis-config.py.
+               echo A template is provided in
+               echo /opt/glite/etc/config/templates/glite-jpis.cfg.xml
+               echo Alternatively site configuration files can be used
+       else
+               echo
+               echo An error occurred while installing the JP RPMS.
+               echo Most likely one or more of the RPMS to be installed require
+               echo additional dependencies or are older than already installed packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
+       echo
+       echo For more information refer to the gLite Installation and User Guides
+       echo or to the gLite web site \(http:\/\/www.glite.org\)
+       echo Please report problems and comments to the gLite Team at
+       echo glite-bugs@cern.ch
+
+       cd ..
+}
+
+###############################################################################
+function uninstall()
+{
+       version
+
+       # Global dependencies   
+       <xsl:for-each select="node/dependencies">
+               <xsl:apply-templates>
+                       <xsl:with-param name="install">false</xsl:with-param>
+               </xsl:apply-templates>
+       </xsl:for-each>
+               
+       <xsl:for-each select="node/services/service">
+
+       # <xsl:value-of select="@name"/> dependencies RPMS from repository
+               <xsl:for-each select="dependencies">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">false</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       # <xsl:value-of select="@name"/> RPMS from repository
+               <xsl:for-each select="components">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">false</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       </xsl:for-each>
+               
+       # Uninstall all RPMS
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x  Please wait, uninstalling the gLite Job Provenance Index Server... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+       rpm -ev $RPMLIST
+       if [ "$?" == "0" ]; then
+               echo
+               echo Done!
+       else
+               echo
+               echo An error occurred while removing the JP RPMS.
+               echo Most likely one or more of the RPMS to be removed have
+               echo dependent packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
+}
+
+###############################################################################
+function usage()
+{
+       echo 
+       echo Copyright \(c\) Members of the EGEE Collaboration. 2004 
+       echo See http://eu-egee.org/partners/ for details on the copyright holders
+       echo For license conditions see the license file or http://eu-egee.org/license.html
+       echo 
+       echo glite-jpis_installer v. <xsl:value-of select="/node/@version"/>
+       echo 
+       echo The glite-jpis_installer installs the gLite Job Provenance Index Server
+       echo 
+       echo Usage: glite-jpis_installer \[-u\|-v\|--help\]
+       echo -u          uninstall
+       echo -v          print version
+       echo --help      print script usage info
+       echo 
+       echo Return codes:
+       echo 0 - Ok
+       echo 1 - if a file could not be downloaded
+       echo 
+}
+
+###############################################################################
+function version
+{
+       echo 
+       echo Copyright \(c\) Members of the EGEE Collaboration. 2004 
+       echo See http://eu-egee.org/partners/ for details on the copyright holders
+       echo For license conditions see the license file or http://eu-egee.org/license.html
+       echo 
+       echo glite-jpis_installer v. <xsl:value-of select="/node/@version"/>
+       echo 
+}
+
+
+RPMLIST=
+
+###############################################################################
+# Main
+
+while getopts uvh opt
+do
+       case $opt in
+               'u') uninstall
+                    exit 0     
+                    ;;
+               'v') version
+                    exit 0     
+                    ;;
+               'h') usage
+                    exit 0     
+                    ;;
+       esac
+done
+
+install
+
+exit 0
+       </xsl:template>
+
+       <xsl:template name="subservices" match="subservice">
+                <xsl:param name="install"/>
+                <xsl:variable name="package"><xsl:value-of select="@name"/>_installer.sh</xsl:variable>
+                <xsl:choose>
+                        <xsl:when test="$install = 'true'">
+wget -N -nv <xsl:value-of select="$installers"/><xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+        echo
+        echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+        exit 1
+fi
+chmod u+x <xsl:value-of select="$package"/>
+SCRIPTLIST="$SCRIPTLIST ./<xsl:value-of select="$package"/>"
+                        </xsl:when>
+                        <xsl:otherwise>
+SCRIPTLISTUn="$SCRIPTLISTUn ./<xsl:value-of select="$package"/> -u "
+                        </xsl:otherwise>
+                </xsl:choose>
+        </xsl:template>
+
+
+       <xsl:template name="dependencies" match="external">
+               <xsl:param name="install"/>
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
+               <xsl:variable name="package.name"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/></xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="$install = 'true'">
+wget -N -nv <xsl:value-of select="$ext-repository"/><xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+       echo 
+       echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST <xsl:value-of select="$package"/>"
+                       </xsl:when>
+                       <xsl:otherwise>
+RPMLIST="$RPMLIST <xsl:value-of select="$package.name"/>"
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+       
+       <xsl:template name="components" match="component">
+               <xsl:param name="install"/>
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
+               <xsl:variable name="package.name"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/></xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="$install='true'">
+wget -N -nv <xsl:value-of select="$repository"/><xsl:value-of select="@arch"/>/RPMS/<xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+       echo 
+       echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST <xsl:value-of select="$package"/>"
+                       </xsl:when>
+                       <xsl:otherwise>
+RPMLIST="$RPMLIST <xsl:value-of select="$package.name"/>"
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpis/project/lxscript-tgz.xsl b/org.glite.deployment.jpis/project/lxscript-tgz.xsl
new file mode 100644 (file)
index 0000000..8b1e0c0
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" 
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+       <xsl:output method="xml" 
+               indent="yes"
+               encoding="UTF-8"
+               omit-xml-declaration="yes"/>
+
+       <!-- Definition of variables and parameters -->
+       <xsl:param name="repository"/>
+       <xsl:param name="ext-repository"/>
+
+       <!-- global processing -->
+       <xsl:template match="/">
+#!/bin/sh
+#
+# glite-jpis_tgz_installer
+# usage: glite-jpis_tgz_installer [-u]
+#               -u             uninstall
+#
+# glite-jpis_tgz_installer installs the gLite <xsl:value-of select="/node/@name"/> Deployment Unit from biniary tarballs
+#
+<!-- Put here pre-install instructions -->
+PREFIX=/opt/glite
+
+###############################################################################
+# Download global dependencies 
+               <xsl:for-each select="node/dependencies">
+                       <xsl:apply-templates/>
+               </xsl:for-each>
+###############################################################################
+               
+               <xsl:for-each select="node/services/service">
+###############################################################################
+# Download <xsl:value-of select="@name"/> dependencies RPMS from repository
+                       <xsl:for-each select="dependencies">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+###############################################################################
+# Download <xsl:value-of select="@name"/> RPMS from repository
+                       <xsl:for-each select="components">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+###############################################################################
+               </xsl:for-each>
+               
+       </xsl:template>
+
+       <xsl:template name="dependencies" match="external">
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
+wget <xsl:value-of select="$ext-repository"/><xsl:value-of select="$package"/>
+       </xsl:template>
+       
+       <xsl:template name="components" match="component">
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>_bin.tar.gz</xsl:variable>
+wget <xsl:value-of select="$repository"/>i386/tgz/<xsl:value-of select="$package"/>
+tar -xzf <xsl:value-of select="$package"/> $PREFIX
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpis/project/properties.xml b/org.glite.deployment.jpis/project/properties.xml
new file mode 100644 (file)
index 0000000..c80f862
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+
+       Common build properties file for the gLite JP Index Server Node Deployment Unit
+       
+       Author: Alberto Di Meglio <alberto.di.meglio@cern.ch>
+       Version info: $Id$
+       Release: $Name$ 
+       
+       Revision history:
+       $Log$
+       Revision 1.2  2005/07/08 13:18:40  dimeglio
+       Merged from branch 1.2.2
+       
+       Revision 1.1  2004/10/06 09:19:24  dimeglio
+       First version of this file
+       
+-->
+
+<project name="gLite JP Index Server Deployment Unit common properties">
+
+       <!-- Include build properties to allow overwriting 
+            of properties for subsystem                    -->
+       <property file="project/build.properties" />    
+
+       <!-- ======================================================
+          Define corresponding subsystem properties
+                ====================================================== -->
+
+       <!-- Subsystem name -->
+       <property name="subsystem.name" value="${deployment.subsystem.name}"/>
+               
+       <!-- Subsystem prefix -->
+       <property name="subsystem.prefix" value="${deployment.subsystem.prefix}"/>
+
+       <!-- ======================================================
+          Define component properties
+                ====================================================== -->
+                               
+       <!-- Component name prefix -->
+       <property name="component.prefix" value="jpis" />
+                       
+       <!-- ======================================================
+          Define general component properties
+                ====================================================== -->
+       
+       <import file="${component.general.properties.file}" />
+                                               
+       <!-- ======================================================
+                Define extra properties here ...
+                ====================================================== -->
+                
+       <property name="build.package.summary" value="gLite Job Provenance Index Server node configuration files" />
+       <property name="build.package.description" value="gLite Job Provenance Index Server node configuration files" />
+       <property name="build.package.files" value="
+%attr(755,root,root) %{prefix}/etc/config/scripts/glite-jpis-config.py\n
+%attr(644,root,root) %{prefix}/etc/config/templates/glite-jpis.cfg.xml\n
+%attr(644,root,root) %{prefix}/share/doc/glite-jpis/release_notes/release_notes.doc\n
+%attr(644,root,root) %{prefix}/share/doc/glite-jpis/release_notes/release_notes.pdf\n
+%attr(644,root,root) %{prefix}/share/doc/glite-jpis/release_notes/release_notes.html\n"
+       />
+
+</project>
diff --git a/org.glite.deployment.jpis/project/quattor-template.xsl b/org.glite.deployment.jpis/project/quattor-template.xsl
new file mode 100644 (file)
index 0000000..d960582
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" 
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+       <xsl:output method="xml" 
+               indent="yes"
+               encoding="UTF-8"
+               omit-xml-declaration="yes"/>
+
+       <!-- Definition of variables and parameters -->
+
+       <!-- global processing -->
+       <xsl:template match="/">
+template pro_software_glite_jpis;
+
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004 
+# See http://eu-egee.org/partners/ for details on the copyright holders
+# For license conditions see the license file or http://eu-egee.org/license.html
+#
+# glite-jpis Quattor template v. <xsl:value-of select="/node/@version"/>
+#
+
+## CAs 
+               
+include pro_software_glite_CA;
+               
+               
+
+# Global dependencies  
+               <xsl:for-each select="node/dependencies">
+                       <xsl:apply-templates/>
+               </xsl:for-each>
+       
+               <xsl:for-each select="node/services/service">
+
+# <xsl:value-of select="@name"/> dependencies
+                       <xsl:for-each select="dependencies">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+
+# <xsl:value-of select="@name"/> RPMS
+                       <xsl:for-each select="components">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="subservice">
+include pro_software_<xsl:value-of select="translate(@name, '-', '_')"/>;
+               </xsl:for-each>
+                       
+
+               </xsl:for-each>
+       </xsl:template>
+
+       <xsl:template name="dependencies" match="external">
+"/software/packages"=pkg_repl("<xsl:value-of select="@name"/>","<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>","<xsl:value-of select="@arch"/>");
+       </xsl:template>
+       
+       <xsl:template name="components" match="component">
+"/software/packages"=pkg_repl("<xsl:value-of select="@name"/>","<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>","<xsl:value-of select="@arch"/>");
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpis/project/version.properties b/org.glite.deployment.jpis/project/version.properties
new file mode 100644 (file)
index 0000000..b6ff6e2
--- /dev/null
@@ -0,0 +1,4 @@
+
+module.version = 2.2.0
+module.age = 1
+                               
\ No newline at end of file
diff --git a/org.glite.deployment.jpps/bin/glite-jpps_installer.sh b/org.glite.deployment.jpps/bin/glite-jpps_installer.sh
new file mode 100644 (file)
index 0000000..5558875
--- /dev/null
@@ -0,0 +1,532 @@
+
+#!/bin/sh
+
+# Copyright (c) Members of the EGEE Collaboration. 2004 
+# See http://eu-egee.org/partners/ for details on the copyright holders
+# For license conditions see the license file or http://eu-egee.org/license.html
+
+# glite-jpps_installer v. 2.2.0
+#
+# The glite-jpps_installer installs the gLite Job Provenance Primary Storage
+#
+# Usage: glite-jpps_installer [-u|-v|--help]
+#        -u          uninstall
+#        -v          print version
+#        --help      print script usage info
+# Return codes: 0 - Ok
+#               1 - if a file could not be downloaded
+
+###############################################################################
+
+#Parse the RPMLIST to strip out the RPMS that are already installed
+function parseRPMList()
+{
+        newRPMLIST=""
+        localRPMLIST=`rpm -qa`
+        for i in $RPMLIST
+        do
+                g=`echo $i | sed -e 's/\.i386\.rpm//g'`
+                g=`echo $g | sed -e 's/\.noarch\.rpm//g'`
+                if [ -z "`echo $localRPMLIST | grep $g`" ]; then
+                        newRPMLIST="${newRPMLIST} $i"
+                else
+                        echo "$i is already installed. It will be skipped."
+                fi
+        done
+                                                                                                                                                             
+        RPMLIST=$newRPMLIST
+}
+
+#Parse the SCRIPTLIST to execute all scripts
+function parseScriptList()
+{
+        for i in $SCRIPTLIST
+        do
+               if [ "$INSTALL" = "true" ]; then
+                        $i
+               else
+                        $i -u
+               fi
+        done
+}
+
+#Downloads and install the module RPMS
+function install()
+{
+
+       INSTALL=true
+       version
+       echo
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x Please wait, downloading the gLite Job Provenance Primary Storage... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+
+        mkdir -p glite-jpps
+        cd glite-jpps
+
+       # Download global dependencies  
+       
+       
+
+       # Download glite-jpps-service scripts from repository
+                
+
+
+       # Download glite-jpps-service dependencies RPMS from repository
+               
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.1.11-0.i386.rpm
+if [ ! -f "MySQL-server-4.1.11-0.i386.rpm" ]
+then
+       echo 
+       echo ERROR: MySQL-server-4.1.11-0.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST MySQL-server-4.1.11-0.i386.rpm"
+                                                         
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.1.11-0.i386.rpm
+if [ ! -f "MySQL-client-4.1.11-0.i386.rpm" ]
+then
+       echo 
+       echo ERROR: MySQL-client-4.1.11-0.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST MySQL-client-4.1.11-0.i386.rpm"
+                                                         
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/c-ares-1.3.0-1.slc3.i386.rpm
+if [ ! -f "c-ares-1.3.0-1.slc3.i386.rpm" ]
+then
+       echo 
+       echo ERROR: c-ares-1.3.0-1.slc3.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST c-ares-1.3.0-1.slc3.i386.rpm"
+                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm
+if [ ! -f "vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm"
+                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_data_server-VDT1.2.2rh9-1.i386.rpm
+if [ ! -f "vdt_globus_data_server-VDT1.2.2rh9-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: vdt_globus_data_server-VDT1.2.2rh9-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST vdt_globus_data_server-VDT1.2.2rh9-1.i386.rpm"
+                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.2rh9-1.i386.rpm
+if [ ! -f "gpt-VDT1.2.2rh9-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: gpt-VDT1.2.2rh9-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST gpt-VDT1.2.2rh9-1.i386.rpm"
+                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm
+if [ ! -f "myproxy-1.14-EGEE.i386.rpm" ]
+then
+       echo 
+       echo ERROR: myproxy-1.14-EGEE.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST myproxy-1.14-EGEE.i386.rpm"
+                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/perl-Expect.pm-1.01-9.i386.rpm
+if [ ! -f "perl-Expect.pm-1.01-9.i386.rpm" ]
+then
+       echo 
+       echo ERROR: perl-Expect.pm-1.01-9.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST perl-Expect.pm-1.01-9.i386.rpm"
+                       
+                       
+
+       # Download glite-jpps-service RPMS from repository
+               
+                           
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/noarch/RPMS/glite-config-@org.glite.deployment.config.info.version@-@org.glite.deployment.config.info.age@.noarch.rpm
+if [ ! -f "glite-config-@org.glite.deployment.config.info.version@-@org.glite.deployment.config.info.age@.noarch.rpm" ]
+then
+       echo 
+       echo ERROR: glite-config-@org.glite.deployment.config.info.version@-@org.glite.deployment.config.info.age@.noarch.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-config-@org.glite.deployment.config.info.version@-@org.glite.deployment.config.info.age@.noarch.rpm"
+                       
+                                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/noarch/RPMS/glite-jpps-config-2.2.0-1.noarch.rpm
+if [ ! -f "glite-jpps-config-2.2.0-1.noarch.rpm" ]
+then
+       echo 
+       echo ERROR: glite-jpps-config-2.2.0-1.noarch.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-jpps-config-2.2.0-1.noarch.rpm"
+                       
+
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-jp-ws-interface-1.2.0-0.i386.rpm
+if [ ! -f "glite-jp-ws-interface-1.2.0-0.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-jp-ws-interface-1.2.0-0.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-jp-ws-interface-1.2.0-0.i386.rpm"
+                       
+                       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-jp-common-1.2.0-1.i386.rpm
+if [ ! -f "glite-jp-common-1.2.0-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-jp-common-1.2.0-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-jp-common-1.2.0-1.i386.rpm"
+                       
+       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-jp-primary-1.2.0-1.i386.rpm
+if [ ! -f "glite-jp-primary-1.2.0-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-jp-primary-1.2.0-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-jp-primary-1.2.0-1.i386.rpm"
+                       
+                                          
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-jp-server-common-1.0.0-1.i386.rpm
+if [ ! -f "glite-jp-server-common-1.0.0-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-jp-server-common-1.0.0-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-jp-server-common-1.0.0-1.i386.rpm"
+                       
+
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-lb-server-1.3.7-0.i386.rpm
+if [ ! -f "glite-lb-server-1.3.7-0.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-lb-server-1.3.7-0.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-lb-server-1.3.7-0.i386.rpm"
+                       
+                                          
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm
+if [ ! -f "glite-wms-utils-jobid-1.0.0-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-wms-utils-jobid-1.0.0-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-wms-utils-jobid-1.0.0-1.i386.rpm"
+                       
+       
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.0-1.i386.rpm
+if [ ! -f "glite-wms-utils-exception-1.0.0-1.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-wms-utils-exception-1.0.0-1.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-wms-utils-exception-1.0.0-1.i386.rpm"
+                       
+                               
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-security-gsoap-plugin-1.3.0-0.i386.rpm
+if [ ! -f "glite-security-gsoap-plugin-1.3.0-0.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-security-gsoap-plugin-1.3.0-0.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-security-gsoap-plugin-1.3.0-0.i386.rpm"
+                       
+                               
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/glite-security-voms-api-c-${module.version}-${module.age}.i386.rpm
+if [ ! -f "glite-security-voms-api-c-${module.version}-${module.age}.i386.rpm" ]
+then
+       echo 
+       echo ERROR: glite-security-voms-api-c-${module.version}-${module.age}.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST glite-security-voms-api-c-${module.version}-${module.age}.i386.rpm"
+                       
+
+                               
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/RPMS/gridsite-1.1.4-3.i386.rpm
+if [ ! -f "gridsite-1.1.4-3.i386.rpm" ]
+then
+       echo 
+       echo ERROR: gridsite-1.1.4-3.i386.rpm could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST gridsite-1.1.4-3.i386.rpm"
+                       
+                       
+
+       # Download glite-security-utils scripts from repository
+                
+wget -N -nv http://glite.web.cern.ch/glite/packages/HEAD/N20060317/installers/glite-security-utils_installer.sh
+if [ ! -f "glite-security-utils_installer.sh" ]
+then
+        echo
+        echo ERROR: glite-security-utils_installer.sh could not be downloaded!
+        exit 1
+fi
+chmod u+x glite-security-utils_installer.sh
+SCRIPTLIST="$SCRIPTLIST ./glite-security-utils_installer.sh"
+                        
+
+
+       # Download glite-security-utils dependencies RPMS from repository
+               
+
+       # Download glite-security-utils RPMS from repository
+               
+
+       # Download and install subservices
+        parseScriptList
+
+               
+       # Install all RPMS
+       echo
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x Please wait, installing the gLite Job Provenance Primary Storage... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+       parseRPMList
+       if [ ! -z "$RPMLIST" ]; then
+               rpm -Uvh $RPMLIST
+               rpm_return=$?
+       else
+               echo All required RPMS are already installed
+               rpm_return=0
+       fi
+       if [ "$rpm_return" == "0" ]; then
+               echo
+               echo Done!
+               echo
+               echo Before using the gLite JP PS, please create or update the configuration
+               echo files /opt/glite/etc/config/glite-jpps.cfg.xml
+               echo and /opt/glite/etc/config/glite-global.cfg.xml
+               echo and run the configuration script
+               echo /opt/glite/etc/config/scripts/glite-jpps-config.py.
+               echo A template is provided in
+               echo /opt/glite/etc/config/templates/glite-jpps.cfg.xml
+               echo Alternatively site configuration files can be used
+       else
+               echo
+               echo An error occurred while installing the JP PS RPMS.
+               echo Most likely one or more of the RPMS to be installed require
+               echo additional dependencies or are older than already installed packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
+       echo
+       echo For more information refer to the gLite Installation and User Guides
+       echo or to the gLite web site \(http:\/\/www.glite.org\)
+       echo Please report problems and comments to the gLite Team at
+       echo glite-bugs@cern.ch
+
+       cd ..
+}
+
+###############################################################################
+function uninstall()
+{
+       version
+
+       # Global dependencies   
+       
+       
+
+       # glite-jpps-service dependencies RPMS from repository
+               
+                               
+RPMLIST="$RPMLIST MySQL-server-4.1.11-0"
+                                                         
+                               
+RPMLIST="$RPMLIST MySQL-client-4.1.11-0"
+                                                         
+                               
+RPMLIST="$RPMLIST c-ares-1.3.0-1.slc3"
+                       
+                               
+RPMLIST="$RPMLIST vdt_globus_essentials-VDT1.2.2rh9-1"
+                       
+                               
+RPMLIST="$RPMLIST vdt_globus_data_server-VDT1.2.2rh9-1"
+                       
+                               
+RPMLIST="$RPMLIST gpt-VDT1.2.2rh9-1"
+                       
+                               
+RPMLIST="$RPMLIST myproxy-1.14-EGEE"
+                       
+                               
+RPMLIST="$RPMLIST perl-Expect.pm-1.01-9"
+                       
+                       
+
+       # glite-jpps-service RPMS from repository
+               
+                           
+RPMLIST="$RPMLIST glite-config-@org.glite.deployment.config.info.version@-@org.glite.deployment.config.info.age@"
+                       
+                                       
+                               
+RPMLIST="$RPMLIST glite-jpps-config-2.2.0-1"
+                       
+
+                               
+RPMLIST="$RPMLIST glite-jp-ws-interface-1.2.0-0"
+                       
+                       
+                               
+RPMLIST="$RPMLIST glite-jp-common-1.2.0-1"
+                       
+       
+                               
+RPMLIST="$RPMLIST glite-jp-primary-1.2.0-1"
+                       
+                                          
+                               
+RPMLIST="$RPMLIST glite-jp-server-common-1.0.0-1"
+                       
+
+                               
+RPMLIST="$RPMLIST glite-lb-server-1.3.7-0"
+                       
+                                          
+                               
+RPMLIST="$RPMLIST glite-wms-utils-jobid-1.0.0-1"
+                       
+       
+                               
+RPMLIST="$RPMLIST glite-wms-utils-exception-1.0.0-1"
+                       
+                               
+                               
+RPMLIST="$RPMLIST glite-security-gsoap-plugin-1.3.0-0"
+                       
+                               
+                               
+RPMLIST="$RPMLIST glite-security-voms-api-c-${module.version}-${module.age}"
+                       
+
+                               
+RPMLIST="$RPMLIST gridsite-1.1.4-3"
+                       
+                       
+
+       # glite-security-utils dependencies RPMS from repository
+               
+
+       # glite-security-utils RPMS from repository
+               
+               
+       # Uninstall all RPMS
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x  Please wait, uninstalling the gLite Job Provenance Primary Storage... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+       rpm -ev $RPMLIST
+       if [ "$?" == "0" ]; then
+               echo
+               echo Done!
+       else
+               echo
+               echo An error occurred while removing the JP PS RPMS.
+               echo Most likely one or more of the RPMS to be removed have
+               echo dependent packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
+}
+
+###############################################################################
+function usage()
+{
+       echo 
+       echo Copyright \(c\) Members of the EGEE Collaboration. 2004 
+       echo See http://eu-egee.org/partners/ for details on the copyright holders
+       echo For license conditions see the license file or http://eu-egee.org/license.html
+       echo 
+       echo glite-jpps_installer v. 2.2.0
+       echo 
+       echo The glite-jpps_installer installs the gLite Job Provenance Primary Storage
+       echo 
+       echo Usage: glite-jpps_installer \[-u\|-v\|--help\]
+       echo -u          uninstall
+       echo -v          print version
+       echo --help      print script usage info
+       echo 
+       echo Return codes:
+       echo 0 - Ok
+       echo 1 - if a file could not be downloaded
+       echo 
+}
+
+###############################################################################
+function version
+{
+       echo 
+       echo Copyright \(c\) Members of the EGEE Collaboration. 2004 
+       echo See http://eu-egee.org/partners/ for details on the copyright holders
+       echo For license conditions see the license file or http://eu-egee.org/license.html
+       echo 
+       echo glite-jpps_installer v. 2.2.0
+       echo 
+}
+
+
+RPMLIST=
+
+###############################################################################
+# Main
+
+while getopts uvh opt
+do
+       case $opt in
+               'u') uninstall
+                    exit 0     
+                    ;;
+               'v') version
+                    exit 0     
+                    ;;
+               'h') usage
+                    exit 0     
+                    ;;
+       esac
+done
+
+install
+
+exit 0
+       
\ No newline at end of file
diff --git a/org.glite.deployment.jpps/bin/glite-jpps_tgz_installer.sh b/org.glite.deployment.jpps/bin/glite-jpps_tgz_installer.sh
new file mode 100644 (file)
index 0000000..e21bd6e
--- /dev/null
@@ -0,0 +1,112 @@
+
+#!/bin/sh
+#
+# glite-jpps_tgz_installer
+# usage: glite-jpps_tgz_installer [-u]
+#               -u             uninstall
+#
+# glite-jpps_tgz_installer installs the gLite glite-jpps-node Deployment Unit from biniary tarballs
+#
+
+PREFIX=/opt/glite
+
+###############################################################################
+# Download global dependencies 
+               
+       
+###############################################################################
+               
+               
+###############################################################################
+# Download glite-jpps-service dependencies RPMS from repository
+                       
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.1.11-0.i386.rpm                            
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.1.11-0.i386.rpm                            
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/c-ares-1.3.0-1.slc3.i386.rpm
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_data_server-VDT1.2.2rh9-1.i386.rpm
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.2rh9-1.i386.rpm
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm
+                               
+wget http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/perl-Expect.pm-1.01-9.i386.rpm
+                       
+###############################################################################
+# Download glite-jpps-service RPMS from repository
+                       
+                           
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-config-@org.glite.deployment.config.info.version@_bin.tar.gz
+tar -xzf glite-config-@org.glite.deployment.config.info.version@_bin.tar.gz $PREFIX
+       
+                                       
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-jpps-config-2.2.0_bin.tar.gz
+tar -xzf glite-jpps-config-2.2.0_bin.tar.gz $PREFIX
+       
+
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-jp-ws-interface-1.2.0_bin.tar.gz
+tar -xzf glite-jp-ws-interface-1.2.0_bin.tar.gz $PREFIX
+       
+                       
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-jp-common-1.2.0_bin.tar.gz
+tar -xzf glite-jp-common-1.2.0_bin.tar.gz $PREFIX
+       
+       
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-jp-primary-1.2.0_bin.tar.gz
+tar -xzf glite-jp-primary-1.2.0_bin.tar.gz $PREFIX
+       
+                                          
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-jp-server-common-1.0.0_bin.tar.gz
+tar -xzf glite-jp-server-common-1.0.0_bin.tar.gz $PREFIX
+       
+
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-lb-server-1.3.7_bin.tar.gz
+tar -xzf glite-lb-server-1.3.7_bin.tar.gz $PREFIX
+       
+                                          
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-wms-utils-jobid-1.0.0_bin.tar.gz
+tar -xzf glite-wms-utils-jobid-1.0.0_bin.tar.gz $PREFIX
+       
+       
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-wms-utils-exception-1.0.0_bin.tar.gz
+tar -xzf glite-wms-utils-exception-1.0.0_bin.tar.gz $PREFIX
+       
+                               
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-security-gsoap-plugin-1.3.0_bin.tar.gz
+tar -xzf glite-security-gsoap-plugin-1.3.0_bin.tar.gz $PREFIX
+       
+                               
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/glite-security-voms-api-c-${module.version}_bin.tar.gz
+tar -xzf glite-security-voms-api-c-${module.version}_bin.tar.gz $PREFIX
+       
+
+                               
+wget http://glite.web.cern.ch/glite/packages/HEAD/N20060317/bin/rhel30/i386/tgz/gridsite-1.1.4_bin.tar.gz
+tar -xzf gridsite-1.1.4_bin.tar.gz $PREFIX
+       
+                       
+###############################################################################
+               
+###############################################################################
+# Download glite-security-utils dependencies RPMS from repository
+                       
+###############################################################################
+# Download glite-security-utils RPMS from repository
+                       
+###############################################################################
+               
\ No newline at end of file
diff --git a/org.glite.deployment.jpps/bin/pro_software_glite_jpps.tpl b/org.glite.deployment.jpps/bin/pro_software_glite_jpps.tpl
new file mode 100644 (file)
index 0000000..3abbb98
--- /dev/null
@@ -0,0 +1,107 @@
+
+template pro_software_glite_jpps;
+
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004 
+# See http://eu-egee.org/partners/ for details on the copyright holders
+# For license conditions see the license file or http://eu-egee.org/license.html
+#
+# glite-jpps Quattor template v. 2.2.0
+#
+
+## CAs 
+               
+include pro_software_glite_CA;
+               
+               
+
+# Global dependencies  
+               
+       
+
+# glite-jpps-service dependencies
+                       
+                               
+"/software/packages"=pkg_repl("MySQL-server","4.1.11-0","i386");
+                                         
+                               
+"/software/packages"=pkg_repl("MySQL-client","4.1.11-0","i386");
+                                         
+                               
+"/software/packages"=pkg_repl("c-ares","1.3.0-1.slc3","i386");
+       
+                               
+"/software/packages"=pkg_repl("vdt_globus_essentials","VDT1.2.2rh9-1","i386");
+       
+                               
+"/software/packages"=pkg_repl("vdt_globus_data_server","VDT1.2.2rh9-1","i386");
+       
+                               
+"/software/packages"=pkg_repl("gpt","VDT1.2.2rh9-1","i386");
+       
+                               
+"/software/packages"=pkg_repl("myproxy","1.14-EGEE","i386");
+       
+                               
+"/software/packages"=pkg_repl("perl-Expect.pm","1.01-9","i386");
+       
+                       
+
+# glite-jpps-service RPMS
+                       
+                           
+"/software/packages"=pkg_repl("glite-config","@org.glite.deployment.config.info.version@-@org.glite.deployment.config.info.age@","noarch");
+       
+                                       
+                               
+"/software/packages"=pkg_repl("glite-jpps-config","2.2.0-1","noarch");
+       
+
+                               
+"/software/packages"=pkg_repl("glite-jp-ws-interface","1.2.0-0","i386");
+       
+                       
+                               
+"/software/packages"=pkg_repl("glite-jp-common","1.2.0-1","i386");
+       
+       
+                               
+"/software/packages"=pkg_repl("glite-jp-primary","1.2.0-1","i386");
+       
+                                          
+                               
+"/software/packages"=pkg_repl("glite-jp-server-common","1.0.0-1","i386");
+       
+
+                               
+"/software/packages"=pkg_repl("glite-lb-server","1.3.7-0","i386");
+       
+                                          
+                               
+"/software/packages"=pkg_repl("glite-wms-utils-jobid","1.0.0-1","i386");
+       
+       
+                               
+"/software/packages"=pkg_repl("glite-wms-utils-exception","1.0.0-1","i386");
+       
+                               
+                               
+"/software/packages"=pkg_repl("glite-security-gsoap-plugin","1.3.0-0","i386");
+       
+                               
+                               
+"/software/packages"=pkg_repl("glite-security-voms-api-c","${module.version}-${module.age}","i386");
+       
+
+                               
+"/software/packages"=pkg_repl("gridsite","1.1.4-3","i386");
+       
+                       
+
+# glite-security-utils dependencies
+                       
+
+# glite-security-utils RPMS
+                       
+include pro_software_glite_security_utils;
+               
\ No newline at end of file
diff --git a/org.glite.deployment.jpps/build.xml b/org.glite.deployment.jpps/build.xml
new file mode 100644 (file)
index 0000000..c2bf066
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+
+       Build file for the gLite JP Server Deployment Unit
+       
+    Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>     
+
+       Version info: $Id$
+       Release: $Name$
+
+       Revision history:
+       $Log$
+       
+-->
+
+<project name="deployment-lb" default="dist">
+
+       <!-- =========================================
+                Builds the gLite JP Deployment Unit
+                ========================================= -->
+
+       <!-- =========================================
+            Import properties (order is important)
+                ========================================= -->
+
+       <!-- import baseline & user properties -->
+       <import file="../org.glite/project/baseline.properties.xml" />
+
+       <!-- import component build properties,
+                       component properties &
+                       component common properties -->
+       <import file="./project/properties.xml"/>
+
+       <!-- import subsystem build properties,
+                       subsystem properties &
+                       subsystem common properties -->
+       <import file="${subsystem.properties.file}"/>
+
+       <!-- import global build properties &
+                       global properties -->
+       <import file="${global.properties.file}" />
+
+       <!-- =========================================
+                Load dependency property files (order is important)
+                ========================================= -->
+       <property file="${user.dependencies.file}"/>
+       <property file="${component.dependencies.file}" />
+       <property file="${subsystem.dependencies.file}" />
+       <property file="${global.dependencies.file}"/>
+
+
+       <!-- =========================================
+                Import task definitions (order is important)
+                ========================================= -->
+       <import file="${subsystem.taskdefs.file}" />
+       <import file="${global.taskdefs.file}" />
+
+       <!-- =========================================
+                Load configure options
+                ========================================= -->
+       <property file="${global.configure.options.file}"/>
+
+       <!-- =========================================
+                Load common targets
+                ========================================= -->
+       <import file="${global.targets-external-dependencies.file}"/>
+       <import file="${global.targets-deploy.file}" />
+
+       <!-- =========================================
+                Load version file 
+                ========================================= -->
+       <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+
+       <!-- ==============================================
+                Local private targets
+                ============================================== -->
+
+       <target name="localinit"
+               description="Module specific initialization tasks">
+       </target>
+
+       <target name="localcompile"
+               description="Module specific compilation tasks">
+       </target>
+
+       <target name="localclean"
+               description="Module specific cleaning tasks">
+       </target>
+
+</project>
diff --git a/org.glite.deployment.jpps/config/scripts/glite-jpps-config.py b/org.glite.deployment.jpps/config/scripts/glite-jpps-config.py
new file mode 100755 (executable)
index 0000000..ec3ab7f
--- /dev/null
@@ -0,0 +1,502 @@
+#!/usr/bin/env python
+################################################################################
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://eu-egee.org/partners/ for details on the copyright holders.
+# For license conditions see the license file or http://eu-egee.org/license.html
+#
+################################################################################
+# glite-jpps-config v. 1.0.0
+#
+# Post-installation script for configuring the gLite Job Provenance Servers
+# Robert Harakaly < mmulac@cern.ch >
+#
+# Version info: $Id$
+#
+# Usage: python glite-jpps-config [-c|-v|-h|--help]
+#        -c, --checkconf         print configuration
+#        -v, --version           print version
+#        -h,--help   print usage info
+#        --configure             configure the service
+#        --start                 start the service
+#        --stop                  stop the service
+#        --status                show service status
+#
+# Return codes: 0 - Ok
+#               1 - Configuration failed
+#
+################################################################################
+
+import os,string,pwd
+import sys, posix, getopt,time
+
+sys.path.append(".")
+from gLiteInstallerLib import gLib 
+from gLiteInstallerLib import ConfigParams
+import mysql as MySQL
+
+# Set global variables here 
+global params                         # all config values from the XML file
+
+class glite_jpps:
+
+    def __init__(self):
+        self.mysql = MySQL.Mysql()
+        self.verbose = 0
+        self.version = "1.0.0"
+        self.name = "glite-jpps"
+        self.friendly_name = "gLite Job Provenance Primary Storage"
+        
+    #-------------------------------------------------------------------------------
+    # Banner 
+    #-------------------------------------------------------------------------------
+
+    def banner(self):
+
+        print "\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+        print "Configuring the %s" % self.friendly_name
+        print "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
+    
+    #-------------------------------------------------------------------------------
+    # Copyright 
+    #-------------------------------------------------------------------------------
+
+    def copyright(self):
+
+        print '\nCopyright (c) Members of the EGEE Collaboration. 2004'
+        print 'See http://eu-egee.org/partners/ for details on the copyright holders'
+        print 'For license conditions see the license file or http://eu-egee.org/license.html'
+
+    #-------------------------------------------------------------------------------
+    # Version
+    #-------------------------------------------------------------------------------
+
+    def showVersion(self):
+
+        print '\n%s-config  v. %s\n' % (self.name,self.version)
+    
+    #-------------------------------------------------------------------------------
+    # Usage
+    #-------------------------------------------------------------------------------
+
+    def usage(self,msg = ""):
+
+        if msg:
+            print "\n%s" % (msg)
+        
+        self.copyright()
+        self.showVersion()
+    
+        print """Usage: \n
+Edit the configuration file %s.cfg.xml in
+%s/etc.config/templates\n
+save it as %s/etc/config/%s.cfg.xml
+and run the script as follows\n 
+python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
+        os.environ['GLITE_LOCATION'], self.name, self.name)
+
+        print '    -c, --checkconf     print the service configuration'
+        print '    -v, --version       print the version of the configuration script'
+        print '    -h, --help          print this usage information'
+        print '    --configure         configure the service'
+        print '    --start             start the service'
+        print '    --stop              stop the service'
+        print '    --status            check service status'
+        print '\n'
+
+    #-------------------------------------------------------------------------------
+    # All the configuration code goes here
+    #-------------------------------------------------------------------------------
+
+    def start(self):
+
+        self.mysql.start()
+        time.sleep(5)
+
+        if not os.path.exists('/tmp/mysql.sock'):
+            os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+            
+        #-------------------------------------------------------------------
+        # Start Primary Storage
+        #-------------------------------------------------------------------
+
+        pid = glib.getPID('primarystoraged')
+        if pid != 0:
+            print 'The gLite JP Primary Storage service is already running. Restarting...'
+            os.system('%s/etc/init.d/glite-jp-primary stop' % os.environ['GLITE_LOCATION'])
+        else:
+            print 'Starting the gLite JP Primary Storage service...'
+
+        os.system('%s/etc/init.d/glite-jp-primary start' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('primarystoraged')
+
+        if (pid != 0):
+            print "The gLite JP Primary Storage service has been started               ",
+            glib.printOkMessage()
+        else:
+            glib.printErrorMessage("Could not start the gLite JP Primary Storage service")
+            glib.printErrorMessage("Please verify and re-run the script                        "),
+            glib.printFailedMessage()
+            return 1
+        
+       return 0
+        
+    def stop(self):
+
+       error_level = 0
+
+        #-------------------------------------------------------------------
+        # Stop Primary Storage
+        #-------------------------------------------------------------------
+
+        pid = glib.getPID('primarystoraged')
+        if (pid != 0):
+            os.system('%s/etc/init.d/glite-jp-primary stop' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('primarystoraged')
+        if (pid != 0):
+            print 'Could not stop the JP Primary Storage service            ',
+            glib.printFailedMessage()
+            error_level = 1
+        else:
+            print 'JP Primary Storage service has been stopped            ',
+            glib.printOkMessage()
+        
+        #-------------------------------------------------------------------
+        # MySQL
+        #-------------------------------------------------------------------
+
+        self.mysql.stop()
+
+        return error_level
+        
+    def status(self):
+
+        error_level = 0
+
+        retval = os.system('%s/etc/init.d/glite-jp-primary status' % os.environ['GLITE_LOCATION'])
+        if retval != 0:
+            error_level = 1
+
+        return error_level
+        
+    def configure(self):
+        
+        #--------------------------------------------------------
+        # Installs the Security Utilities
+        #--------------------------------------------------------
+        
+        if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()):
+            print "\nConfiguring gLite Security Utilities                   ",
+            glib.printFailedMessage()
+        else:
+            print "\nConfiguring gLite Security Utilities                   ",
+            glib.printOkMessage()
+        
+        # Create the GLITE_USER if it doesn't exists
+        print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER']
+        (uid,gid) = glib.get_user_info(os.environ['GLITE_USER'])
+        glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid)
+        jpps_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+        glib.check_dir(jpps_cert_path ,0755, uid, gid)
+        glib.printOkMessage()
+
+        # Create all directories needed
+        glib.check_dir(os.environ['GLITE_CERT_DIR'])
+        print "\nVerify CA certificates directory            ",
+        glib.printOkMessage()
+         
+        # Copy certificates
+        print "\nCopy host certificates to GLITE_USER home directory as service certificates",
+        os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], jpps_cert_path))
+        os.chown("%s/hostcert.pem" % jpps_cert_path, uid,gid)
+        os.chmod("%s/hostcert.pem" % jpps_cert_path, 0644)
+        os.chown("%s/hostkey.pem" % jpps_cert_path, uid,gid)
+        os.chmod("%s/hostkey.pem" % jpps_cert_path, 0400)
+        glib.printOkMessage()
+
+        #--------------------------------------------------------
+        # Configure MySQL
+        #--------------------------------------------------------
+
+       # Set mysql parameters
+        #self.mysql.setConfiguration('client','max_allowed_packet',params['mysql.max_allowed_packet'])
+        self.mysql.setConfiguration('mysqld','max_allowed_packet',params['mysql.max_allowed_packet'])
+        
+        # start MySQL
+        self.mysql.stop()
+        time.sleep(5)
+        self.mysql.start()
+        
+        if not os.path.exists('/tmp/mysql.sock'):
+            os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+
+        # ------------------------------------------------------------
+        # Check password of MySQL
+        # ------------------------------------------------------------
+        
+        self.mysql_root_password = params['mysql.root.password']
+        if not params.has_key('set.mysql.root.password'):
+            params['set.mysql.root.password'] = 'false'
+        setempty = params['set.mysql.root.password']
+        if self.mysql.checkMySQLConfiguration(self.mysql_root_password,setempty):
+            return 1
+        
+        # Create the MySQL database
+        print "\nCreate/Verify the %s database" % params['jpps.database.name']
+        
+        # Check if database exists
+        if self.mysql.existsDB(params['jpps.database.name'],self.mysql_root_password) != 0:
+            # Create database
+            print ('\n==> Creating MySQL %s database\n' % params['jpps.database.name'])
+    
+            if os.path.exists('/bin/rm /tmp/mysql_ct'):
+                os.remove('/tmp/mysql_ct')
+            
+            file = open('/tmp/mysql_ct', 'w')
+
+            self.mysql.add_user(params['jpps.database.name'],params['jpps.database.username'],"",self.mysql_root_password)
+            text = ['USE %s;\n' % params['jpps.database.name'],
+                    '\. %s/etc/glite-jp-primary-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
+    
+            file.writelines(text)
+            file.close()
+            os.system('/usr/bin/mysql -p%s < /tmp/mysql_ct' % self.mysql_root_password)
+            os.system('/bin/rm /tmp/mysql_ct')
+            
+            #Starting and stopping the database before the index creation
+            self.mysql.stop()
+            time.sleep(5)
+            self.mysql.start()
+
+        else:
+            print "\n==> MySQL database %s already exist\n" % params['jpps.database.name']
+            
+        self.mysql.stop()
+    
+        return 0
+        
+#-------------------------------------------------------------------------------
+# Set all environment variables
+#-------------------------------------------------------------------------------
+
+def loadDefaults(params):
+
+    params['GLITE_LOCATION'] = "/opt/glite"
+    params['mysql.root.password'] = ""
+    params['jpps.database.name'] = "jpps"
+    params['jpps.database.username'] = "jpps"
+    params['mysql.max_allowed_packet'] = "17"
+    params['jpps.serviceName'] = 'JP PS Server service at %s' % glib.fq_hostname
+    params['jpps.serviceType'] = 'org.glite.jp.primary'
+    params['jpps.statusScript'] = '%s/etc/init.d/glite-jp-primary status' % params['GLITE_LOCATION']
+    params['jpps.endpoint'] = 'not available'
+
+def set_env():
+
+    # gLite
+    glib.export('GLITE_LOCATION');
+    glib.export('GLITE_LOCATION_VAR');
+    if not os.path.exists(os.environ['GLITE_LOCATION_VAR']):
+        os.mkdir(os.environ['GLITE_LOCATION_VAR'],0755)
+    glib.export('GLITE_LOCATION_LOG');
+    if not os.path.exists(os.environ['GLITE_LOCATION_LOG']):
+        os.mkdir(os.environ['GLITE_LOCATION_LOG'],0755)
+    glib.export('GLITE_LOCATION_TMP');
+    if not os.path.exists(os.environ['GLITE_LOCATION_TMP']):
+        os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755)
+
+    if not params.has_key('glite.user.group'):
+        params['glite.user.group'] = ''
+    (uid,gid) = glib.add_user(params['glite.user.name'],params['glite.user.group'])
+    glib.export('GLITE_USER',params['glite.user.name'])
+    jpps_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+    glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % jpps_cert_path)
+    glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % jpps_cert_path)
+    glib.export('GLITE_CERT_DIR',params['ca.certificates.dir'])
+
+    glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION'])
+    glib.export('GPT_LOCATION',params['GPT_LOCATION'])
+    
+    glib.export('JAVA_HOME')
+
+    # bin and lib paths
+    glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/bin:%s/externals/bin:%s/bin" \
+        % (os.environ['JAVA_HOME'],os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
+    glib.addEnvPath("LD_LIBRARY_PATH","/usr/lib:%s/lib:%s/externals/lib:%s/lib" % (os.environ['GLOBUS_LOCATION'], os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
+
+    # Perl
+    glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION']))
+
+    # JP PS configuration
+    glib.export('GLITE_JP_PRIMARY_PEERS',params['jpps.peers'])    
+    glib.export('GLITE_JP_PRIMARY_FTP_PORT',params['jpps.ftp.port'])    
+    glib.export('GLITE_JP_PRIMARY_INTERNAL',params['jpps.internal'])    
+    if not os.path.exists(os.environ['GLITE_JP_PRIMARY_INTERNAL']):
+        os.mkdir(os.environ['GLITE_JP_PRIMARY_INTERNAL'],0755)
+    import socket
+    glib.export('GLITE_JP_PRIMARY_EXTERNAL',"gsiftp://%s:%s%s" % (socket.getfqdn(socket.gethostname()), params['jpps.ftp.port'], params['jpps.internal']) )    
+    if not os.path.exists(params['jpps.external']):
+        os.mkdir(params['jpps.external'],0755)
+    #glite_setenv.sh does not like variables with spaces, 
+    #and su don't like variables with "  
+    #glib.export('GLITE_JP_DEBUG',params['jpps.debug'])    
+    os.environ['GLITE_JP_DEBUG']='%s' % params['jpps.debug']
+    glib.export('GLITE_JP_PRIMARY_PORT',params['jpps.port'])    
+    glib.export('GLITE_JP_PRIMARY_DBCS',params['jpps.dbcs'])    
+    glib.export('GLITE_JP_PRIMARY_PIDFILE',params['jpps.pid.file'])    
+
+    # Set environment
+    glib.setUserEnv()
+    
+#-------------------------------------------------------------------------------
+#  Main program begins here 
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+
+    # The script must be run as root
+    if not os.geteuid()==0:
+        print '"\nThis script must be run as root\n'
+        sys.exit(1)
+        
+    # Get an instance of the ConfigParams class
+    params = ConfigParams()
+
+    # Get an instance of the library class
+    glib = gLib()
+    
+    # Load parameters
+    loadDefaults(params)
+    try:
+        opts, args = glib.getopt(sys.argv[1:], '', ['siteconfig='])
+        for o, a in opts:
+            if o == "--siteconfig":
+                params['site.config.url'] = a
+                break
+    except getopt.GetoptError:
+        pass
+    if glib.loadConfiguration("%s/../glite-jpps.cfg.xml" % glib.getScriptPath(),params):
+        print "An error occurred while configuring the service"
+        sys.exit(1)
+
+    verbose = 0
+    if params.has_key('glite.installer.verbose'):
+        if params['glite.installer.verbose'] == "true":
+            verbose = 1
+    glib.verbose = verbose
+    
+    # Set up the environment
+    set_env()
+          
+
+    # Instantiate the service classes
+    service = glite_jpps()
+    service.verbose = verbose
+    
+    # Command line opts if any
+    try:
+        opts, args = glib.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','configure','stop','start','status','siteconfig='])
+    except getopt.GetoptError:
+        service.usage(msg = "Unknown options(s)")
+        sys.exit(1)
+
+    if len(opts) == 0:
+        service.usage()
+        sys.exit(0)
+    
+    # Check cli options
+    for o, a in opts:
+        if o in ("-h", "--help"):
+            service.usage()
+            sys.exit(0)
+        if o in ("-v", "--version"):
+            service.showVersion()
+            sys.exit(0)
+        if o in ("-c", "--checkconf"):
+            service.copyright()
+            service.showVersion()
+            glib.print_params(params)
+            sys.exit(0)
+                
+        if o == "--configure":
+       
+
+           # Check certificates
+           if params.has_key('glite.installer.checkcerts'):
+               if params['glite.installer.checkcerts'] == "true":
+                   if glib.check_certs(params) != 0:
+                       print "An error occurred while configuring the %s service" \
+                           % service.friendly_name
+                       sys.exit(1)
+           
+           # Print configuration parameters
+           if verbose:
+               glib.print_params(params)
+
+           service.copyright()
+           service.showVersion()
+           service.banner()
+        
+            # Stop all services
+            glib.printInfoMessage("\n\nStopping all running JP PS services...")
+            service.stop()
+            
+    # Configure the service
+            return_result = service.configure()
+
+            if return_result == 0:
+
+                # Stop all services
+                glib.printInfoMessage("\n\nStopping all running JP PS services...")
+                service.stop()
+                
+                print "\n\nThe %s configuration was successfully completed\n" % service.friendly_name
+                print "You can now start the service using the --start option of this script\n\n"
+               glib.registerService()
+
+                sys.exit(0)
+
+            elif return_result == 2:
+
+                # Stop all services
+                glib.printInfoMessage("\n\nStopping all running JP PS services...")
+                service.stop()
+                
+                print "\n\nThe %s configuration was completed,\n" % service.friendly_name
+                print "but warnings were issued. Please revise them and re-run the script\n"
+                print "or configure JP PS manually\n"
+
+                sys.exit(2)
+
+           else:
+                print "\n\nAn unrecoverable error occurred while configuring the %s" \
+                    % service.friendly_name
+
+               sys.exit(1)
+        
+       if o in ("start", "--start"):
+           # Start the service
+           if service.start() == 0:
+                print "\n\nThe %s was successfully started           " % service.friendly_name,
+               glib.printOkMessage()
+                sys.exit(0)
+           else:
+                print "\n\nAn error occurred while starting the %s            " % service.friendly_name,
+               glib.printFailedMessage()
+               sys.exit(1)
+
+        if o in ("stop", "--stop"): 
+            # Stop the service
+            if service.stop() == 0:
+                print "\n\nThe %s was successfully stopped           " % service.friendly_name,
+                glib.printOkMessage()
+                sys.exit(0)
+            else:
+                print "\n\nAn unrecoverable error occurred while stopping the %s " % service.friendly_name,
+                glib.printFailedMessage()
+                sys.exit(1)
+        if o == "--status":
+            sys.exit(service.status())
+                
diff --git a/org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml b/org.glite.deployment.jpps/config/templates/glite-jpps.cfg.xml
new file mode 100644 (file)
index 0000000..55b2888
--- /dev/null
@@ -0,0 +1,85 @@
+<!--  Parameters for  configuring the org.glite.data.io-daemon service -->
+<config>
+       <parameters>
+
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- User-defined parameters - Please change them -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+
+               <!--  gLite services user accounts  -->
+               <glite.user.name 
+                       description="Name of the user account used to run the gLite services
+                       on this JP node"
+                       value="changeme"/>
+
+               <glite.user.group
+                       description="Group of the user specified in the 'glite.user.name'
+                       parameter. Leave it empty of comment it out to use the same as 'glite.user.name'"
+                       value="changeme"/>
+               
+               <mysql.root.password
+                       description="The mysql root password"
+                       value="changeme"/>
+
+               <!-- JP primary server configuration -->
+               <jpps.peers
+                       description="file with list (one per line) of X509 certificate subjects of 'trusted peers', i.e. LB servers which may upload data to this JPPS"
+                       value="changeme"/>
+
+               <jpps.ftp.port
+                       description="port for the ftp JPPS interface (bulk file transfers)"
+                       value="changeme"/>
+
+               <jpps.internal
+                       description="directory where the JPPS files are stored (local path)"
+                       value="changeme"/>
+
+                               
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- Advanced parameters - Change them if you know what you're doing -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+
+               <!-- Installer configuration -->
+               <glite.installer.verbose
+                       description="Enable verbose output"
+                       value="true"/>
+                       
+               <glite.installer.checkcerts
+                       description="Enable check of host certificates"
+                       value="true"/>
+
+               <!-- mysql configuration -->
+               <set.mysql.root.password
+                       description="If this parameter is true, then the root password of the mysql database
+                       is set to the value specified in mysql.root.password if it not yet set. This parameter has
+                       no effect if the database root password is already set. It can be used to ease automated
+                       installation and configuration of the service, if mysql is not managed in some other way"
+                       value="false"/>
+
+               <!-- JP primary server configuration -->
+               <jpps.debug
+                       description="enables to pass various debug options to JP PS
+                       (e.g. -l path_to_log_file; -s XX number of forked slaves;....)"
+                       value=""/>
+
+               <jpps.port
+                       description="non-default JP PS port"
+                       value=""/>
+
+               <jpps.dbcs
+                       description="non-default JP PS DB contact string
+                       default: jpps/@localhost:jpps"
+                       value=""/>
+
+               <jpps.pid.file
+                       description="non-default JP PS pidfile ($GLITE_LOCATION_VAR/glite-jp-primarystoraged.pid)"
+                       value=""/>
+
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- System parameters - You should leave these alone -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->               
+       
+                       
+       </parameters>
+
+</config>
diff --git a/org.glite.deployment.jpps/project/build.number b/org.glite.deployment.jpps/project/build.number
new file mode 100644 (file)
index 0000000..58569c4
--- /dev/null
@@ -0,0 +1,2 @@
+#Wed Apr 13 09:36:57 CEST 2005
+module.build=232
diff --git a/org.glite.deployment.jpps/project/build.properties b/org.glite.deployment.jpps/project/build.properties
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/org.glite.deployment.jpps/project/glite-jpps.sdf.xml b/org.glite.deployment.jpps/project/glite-jpps.sdf.xml
new file mode 100644 (file)
index 0000000..e3840c5
--- /dev/null
@@ -0,0 +1,127 @@
+<?xml version ="1.0" encoding="UTF-8"?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+-->
+
+<node name="glite-jpps-node" version="2.2.0">
+       <services>
+               <service name="glite-jpps-service">
+                       <components>
+                           <component name="glite-config"
+                                       version="@org.glite.deployment.config.info.version@"
+                                       age="@org.glite.deployment.config.info.age@"
+                                       build="@org.glite.deployment.config.info.build@"
+                                       arch="noarch"/>
+                                       
+                               <component name="glite-jpps-config"
+                                       version="2.2.0"
+                                       age="1"
+                                       build="232"
+                                       arch="noarch"/>
+
+                               <component name="glite-jp-ws-interface"
+                                       version="1.2.0"
+                                       age="0"
+                                       build="36"
+                                       arch="i386"/>
+                       
+                               <component name="glite-jp-common"
+                                       version="1.2.0"
+                                       age="1"
+                                       build="39"
+                                       arch="i386"/>
+       
+                               <component name="glite-jp-primary"
+                                       version="1.2.0"
+                                       age="1"
+                                       build="39"
+                                       arch="i386"/>
+                                          
+                               <component name="glite-jp-server-common"
+                                       version="1.0.0"
+                                       age="1"
+                                       build="70"
+                                       arch="i386"/>
+
+                               <component name="glite-lb-server"
+                                       version="1.3.7"
+                                       age="0"
+                                       build="0235"
+                                       arch="i386"/>
+                                          
+                               <component name="glite-wms-utils-jobid"
+                                       version="1.0.0"
+                                       age="1"
+                                       build="137"
+                                       arch="i386"/>
+       
+                               <component name="glite-wms-utils-exception"
+                                       version="1.0.0"
+                                       age="1"
+                                       build="111"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-gsoap-plugin"
+                                       version="1.3.0"
+                                       age="0"
+                                       build="0"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-voms-api-c"
+                                   version="${module.version}"
+                                   age="${module.age}"
+                                   build="${module.build}"
+                                   arch="i386"/>
+
+                               <component name="gridsite"
+                                   version="1.1.4"
+                                   age="3"
+                                                       build="134"
+                                   arch="i386"/>
+                       </components>
+                       <dependencies>
+                               <external name="MySQL-server"
+                                         version="4.1.11"
+                                         age="0"
+                                         arch="i386"/>                           
+                               <external name="MySQL-client"
+                                         version="4.1.11"
+                                         age="0"
+                                         arch="i386"/>                           
+                               <external name="c-ares"
+                                       version="1.3.0"
+                                       age="1.slc3"
+                                       arch="i386"/>
+                               <external name="vdt_globus_essentials"
+                                       version="VDT1.2.2rh9"
+                                       age="1"
+                                       arch="i386"/>
+                               <external name="vdt_globus_data_server"
+                                       version="VDT1.2.2rh9"
+                                       age="1"
+                                       arch="i386"/>
+                               <external name="gpt"
+                                       version="VDT1.2.2rh9"
+                                       age="1"
+                                       arch="i386"/>
+                               <external name="myproxy"
+                                       version="1.14"
+                                       age="EGEE"
+                                       arch="i386"/>
+                               <external name="perl-Expect.pm"
+                                       version="1.01"
+                                       age="9"
+                                       arch="i386"/>
+                       </dependencies>
+               </service>
+
+               <!-- Security Utilities -->
+        <service name="glite-security-utils">
+                <subservice name="glite-security-utils"/>
+        </service>
+       </services>
+       <dependencies>
+       </dependencies>
+</node>
diff --git a/org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template b/org.glite.deployment.jpps/project/glite-jpps.sdf.xml.template
new file mode 100644 (file)
index 0000000..ec2b692
--- /dev/null
@@ -0,0 +1,127 @@
+<?xml version ="1.0" encoding="UTF-8"?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+-->
+
+<node name="glite-jpps-node" version="@module.version@">
+       <services>
+               <service name="glite-jpps-service">
+                       <components>
+                           <component name="glite-config"
+                                       version="@org.glite.deployment.config.info.version@"
+                                       age="@org.glite.deployment.config.info.age@"
+                                       build="@org.glite.deployment.config.info.build@"
+                                       arch="noarch"/>
+                                       
+                               <component name="glite-jpps-config"
+                                       version="@module.version@"
+                                       age="@module.age@"
+                                       build="@module.build@"
+                                       arch="noarch"/>
+
+                               <component name="glite-jp-ws-interface"
+                                       version="@org.glite.jp.ws-interface.info.version@"
+                                       age="@org.glite.jp.ws-interface.info.age@"
+                                       build="@org.glite.jp.ws-interface.info.build@"
+                                       arch="i386"/>
+                       
+                               <component name="glite-jp-common"
+                                       version="@org.glite.jp.common.info.version@"
+                                       age="@org.glite.jp.common.info.age@"
+                                       build="@org.glite.jp.common.info.build@"
+                                       arch="i386"/>
+       
+                               <component name="glite-jp-primary"
+                                       version="@org.glite.jp.primary.info.version@"
+                                       age="@org.glite.jp.primary.info.age@"
+                                       build="@org.glite.jp.primary.info.build@"
+                                       arch="i386"/>
+                                          
+                               <component name="glite-jp-server-common"
+                                       version="@org.glite.jp.server-common.info.version@"
+                                       age="@org.glite.jp.server-common.info.age@"
+                                       build="@org.glite.jp.server-common.info.build@"
+                                       arch="i386"/>
+
+                               <component name="glite-lb-server"
+                                       version="@org.glite.lb.server.info.version@"
+                                       age="@org.glite.lb.server.info.age@"
+                                       build="@org.glite.lb.server.info.build@"
+                                       arch="i386"/>
+                                          
+                               <component name="glite-wms-utils-jobid"
+                                       version="@org.glite.wms-utils.jobid.info.version@"
+                                       age="@org.glite.wms-utils.jobid.info.age@"
+                                       build="@org.glite.wms-utils.jobid.info.build@"
+                                       arch="i386"/>
+       
+                               <component name="glite-wms-utils-exception"
+                                       version="@org.glite.wms-utils.exception.info.version@"
+                                       age="@org.glite.wms-utils.exception.info.age@"
+                                       build="@org.glite.wms-utils.exception.info.build@"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-gsoap-plugin"
+                                       version="@org.glite.security.gsoap-plugin.info.version@"
+                                       age="@org.glite.security.gsoap-plugin.info.age@"
+                                       build="@org.glite.security.gsoap-plugin.info.build@"
+                                       arch="i386"/>
+                               
+                               <component name="glite-security-voms-api-c"
+                                   version="@org.glite.security.voms-api-c.info.version@"
+                                   age="@org.glite.security.voms-api-c.info.age@"
+                                   build="@org.glite.security.voms-api-c.info.build@"
+                                   arch="i386"/>
+
+                               <component name="gridsite"
+                                   version="@org.gridsite.core.info.version@"
+                                   age="@org.gridsite.core.info.age@"
+                                                       build="@org.gridsite.core.info.build@"
+                                   arch="i386"/>
+                       </components>
+                       <dependencies>
+                               <external name="@ext.mysql-server.rpm.name@"
+                                         version="@ext.mysql-server.version@"
+                                         age="@ext.mysql-server.rpm.age@"
+                                         arch="@ext.mysql-server.platform@"/>                            
+                               <external name="@ext.mysql-client.rpm.name@"
+                                         version="@ext.mysql-client.version@"
+                                         age="@ext.mysql-client.rpm.age@"
+                                         arch="@ext.mysql-client.platform@"/>                            
+                               <external name="@ext.c-ares.rpm.name@"
+                                       version="@ext.c-ares.version@"
+                                       age="@ext.c-ares.rpm.age@"
+                                       arch="@ext.c-ares.platform@"/>
+                               <external name="@ext.globus-essentials.rpm.name@"
+                                       version="@ext.globus-essentials.rpm.version@"
+                                       age="@ext.globus-essentials.rpm.age@"
+                                       arch="@ext.globus-essentials.platform@"/>
+                               <external name="@ext.globus-data-server.rpm.name@"
+                                       version="@ext.globus-data-server.rpm.version@"
+                                       age="@ext.globus-data-server.rpm.age@"
+                                       arch="@ext.globus-data-server.platform@"/>
+                               <external name="@ext.gpt.rpm.name@"
+                                       version="@ext.gpt.rpm.version@"
+                                       age="@ext.gpt.rpm.age@"
+                                       arch="@ext.gpt.platform@"/>
+                               <external name="@ext.myproxy.rpm.name@"
+                                       version="@ext.myproxy.version@"
+                                       age="@ext.myproxy.rpm.age@"
+                                       arch="@ext.myproxy.platform@"/>
+                               <external name="@ext.perl-expect-pm.rpm.name@"
+                                       version="@ext.perl-expect-pm.version@"
+                                       age="@ext.perl-expect-pm.rpm.age@"
+                                       arch="@ext.perl-expect-pm.platform@"/>
+                       </dependencies>
+               </service>
+
+               <!-- Security Utilities -->
+        <service name="glite-security-utils">
+                <subservice name="glite-security-utils"/>
+        </service>
+       </services>
+       <dependencies>
+       </dependencies>
+</node>
diff --git a/org.glite.deployment.jpps/project/glite-jpps.spec b/org.glite.deployment.jpps/project/glite-jpps.spec
new file mode 100644 (file)
index 0000000..78cf8f9
--- /dev/null
@@ -0,0 +1,70 @@
+       
+Summary: gLite Job Provenance Primary Storage node configuration files
+Name:   glite-jpps-config
+Version: @MODULE.VERSION@
+Release: @MODULE.BUILD@
+Copyright:Open Source EGEE License
+Vendor:EU EGEE project
+Group:System/Application
+Prefix:/opt/glite
+BuildArch: noarch
+BuildRoot:%{_builddir}/%{name}-%{version}      
+
+
+Requires:glite-config
+Requires:glite-jp-ws-interface
+Requires:glite-jp-common
+Requires:glite-jp-primary
+Requires:glite-jp-server-common
+Requires:glite-lb-server
+Requires:glite-wms-utils-jobid
+Requires:glite-wms-utils-exception
+Requires:glite-security-gsoap-plugin
+Requires:glite-security-voms-api-c
+Requires:gridsite
+Requires:glite-security-utils-config
+
+Requires:MySQL-server
+Requires:MySQL-client
+Requires:c-ares
+Requires:vdt_globus_essentials
+Requires:vdt_globus_data_server
+Requires:gpt
+Requires:myproxy
+Requires:perl-Expect.pm
+Obsoletes:glite-security-voms
+Source: glite-jpps.tar.gz
+%define debug_package %{nil}
+
+%description
+gLite Job Provenance Primary Storage node configuration files
+
+%prep
+
+%setup -c
+
+%build
+
+%install
+
+%clean
+
+%pre
+
+%post
+
+%preun
+
+%postun
+
+%files
+ %attr(755,root,root) %{prefix}/etc/config/scripts/glite-jpps-config.py
+ %attr(644,root,root) %{prefix}/etc/config/templates/glite-jpps.cfg.xml
+ %attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.doc
+ %attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.pdf
+ %attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.html
+
+
+%changelog
+
+       
\ No newline at end of file
diff --git a/org.glite.deployment.jpps/project/lxscript-rpm.xsl b/org.glite.deployment.jpps/project/lxscript-rpm.xsl
new file mode 100644 (file)
index 0000000..c9bec9a
--- /dev/null
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" 
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+       <xsl:output method="xml" 
+               indent="yes"
+               encoding="UTF-8"
+               omit-xml-declaration="yes"/>
+
+       <!-- Definition of variables and parameters -->
+       <xsl:param name="installers"/>
+       <xsl:param name="repository"/>
+       <xsl:param name="ext-repository"/>
+
+       <!-- global processing -->
+       <xsl:template match="/">
+#!/bin/sh
+
+# Copyright (c) Members of the EGEE Collaboration. 2004 
+# See http://eu-egee.org/partners/ for details on the copyright holders
+# For license conditions see the license file or http://eu-egee.org/license.html
+
+# glite-jpps_installer v. <xsl:value-of select="/node/@version"/>
+#
+# The glite-jpps_installer installs the gLite Job Provenance Primary Storage
+#
+# Usage: glite-jpps_installer [-u|-v|--help]
+#        -u          uninstall
+#        -v          print version
+#        --help      print script usage info
+# Return codes: 0 - Ok
+#               1 - if a file could not be downloaded
+
+###############################################################################
+
+#Parse the RPMLIST to strip out the RPMS that are already installed
+function parseRPMList()
+{
+        newRPMLIST=""
+        localRPMLIST=`rpm -qa`
+        for i in $RPMLIST
+        do
+                g=`echo $i | sed -e 's/\.i386\.rpm//g'`
+                g=`echo $g | sed -e 's/\.noarch\.rpm//g'`
+                if [ -z "`echo $localRPMLIST | grep $g`" ]; then
+                        newRPMLIST="${newRPMLIST} $i"
+                else
+                        echo "$i is already installed. It will be skipped."
+                fi
+        done
+                                                                                                                                                             
+        RPMLIST=$newRPMLIST
+}
+
+#Parse the SCRIPTLIST to execute all scripts
+function parseScriptList()
+{
+        for i in $SCRIPTLIST
+        do
+               if [ "$INSTALL" = "true" ]; then
+                        $i
+               else
+                        $i -u
+               fi
+        done
+}
+
+#Downloads and install the module RPMS
+function install()
+{
+
+       INSTALL=true
+       version
+       echo
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x Please wait, downloading the gLite Job Provenance Primary Storage... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+
+        mkdir -p glite-jpps
+        cd glite-jpps
+
+       # Download global dependencies  
+       <xsl:for-each select="node/dependencies">
+               <xsl:apply-templates>
+                               <xsl:with-param name="install">true</xsl:with-param>
+               </xsl:apply-templates>
+       </xsl:for-each>
+       
+       <xsl:for-each select="node/services/service">
+
+       # Download <xsl:value-of select="@name"/> scripts from repository
+                <xsl:for-each select=".">
+                        <xsl:apply-templates select="subservice">
+                                <xsl:with-param name="install">true</xsl:with-param>
+                        </xsl:apply-templates>
+                </xsl:for-each>
+
+
+       # Download <xsl:value-of select="@name"/> dependencies RPMS from repository
+               <xsl:for-each select="dependencies">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">true</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       # Download <xsl:value-of select="@name"/> RPMS from repository
+               <xsl:for-each select="components">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">true</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       </xsl:for-each>
+
+       # Download and install subservices
+        parseScriptList
+
+               
+       # Install all RPMS
+       echo
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x Please wait, installing the gLite Job Provenance Primary Storage... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+       parseRPMList
+       if [ ! -z "$RPMLIST" ]; then
+               rpm -Uvh $RPMLIST
+               rpm_return=$?
+       else
+               echo All required RPMS are already installed
+               rpm_return=0
+       fi
+       if [ "$rpm_return" == "0" ]; then
+               echo
+               echo Done!
+               echo
+               echo Before using the gLite JP PS, please create or update the configuration
+               echo files /opt/glite/etc/config/glite-jpps.cfg.xml
+               echo and /opt/glite/etc/config/glite-global.cfg.xml
+               echo and run the configuration script
+               echo /opt/glite/etc/config/scripts/glite-jpps-config.py.
+               echo A template is provided in
+               echo /opt/glite/etc/config/templates/glite-jpps.cfg.xml
+               echo Alternatively site configuration files can be used
+       else
+               echo
+               echo An error occurred while installing the JP PS RPMS.
+               echo Most likely one or more of the RPMS to be installed require
+               echo additional dependencies or are older than already installed packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
+       echo
+       echo For more information refer to the gLite Installation and User Guides
+       echo or to the gLite web site \(http:\/\/www.glite.org\)
+       echo Please report problems and comments to the gLite Team at
+       echo glite-bugs@cern.ch
+
+       cd ..
+}
+
+###############################################################################
+function uninstall()
+{
+       version
+
+       # Global dependencies   
+       <xsl:for-each select="node/dependencies">
+               <xsl:apply-templates>
+                       <xsl:with-param name="install">false</xsl:with-param>
+               </xsl:apply-templates>
+       </xsl:for-each>
+               
+       <xsl:for-each select="node/services/service">
+
+       # <xsl:value-of select="@name"/> dependencies RPMS from repository
+               <xsl:for-each select="dependencies">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">false</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       # <xsl:value-of select="@name"/> RPMS from repository
+               <xsl:for-each select="components">
+                       <xsl:apply-templates>
+                               <xsl:with-param name="install">false</xsl:with-param>
+                       </xsl:apply-templates>
+               </xsl:for-each>
+
+       </xsl:for-each>
+               
+       # Uninstall all RPMS
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo x  Please wait, uninstalling the gLite Job Provenance Primary Storage... x
+       echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       echo
+       rpm -ev $RPMLIST
+       if [ "$?" == "0" ]; then
+               echo
+               echo Done!
+       else
+               echo
+               echo An error occurred while removing the JP PS RPMS.
+               echo Most likely one or more of the RPMS to be removed have
+               echo dependent packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
+}
+
+###############################################################################
+function usage()
+{
+       echo 
+       echo Copyright \(c\) Members of the EGEE Collaboration. 2004 
+       echo See http://eu-egee.org/partners/ for details on the copyright holders
+       echo For license conditions see the license file or http://eu-egee.org/license.html
+       echo 
+       echo glite-jpps_installer v. <xsl:value-of select="/node/@version"/>
+       echo 
+       echo The glite-jpps_installer installs the gLite Job Provenance Primary Storage
+       echo 
+       echo Usage: glite-jpps_installer \[-u\|-v\|--help\]
+       echo -u          uninstall
+       echo -v          print version
+       echo --help      print script usage info
+       echo 
+       echo Return codes:
+       echo 0 - Ok
+       echo 1 - if a file could not be downloaded
+       echo 
+}
+
+###############################################################################
+function version
+{
+       echo 
+       echo Copyright \(c\) Members of the EGEE Collaboration. 2004 
+       echo See http://eu-egee.org/partners/ for details on the copyright holders
+       echo For license conditions see the license file or http://eu-egee.org/license.html
+       echo 
+       echo glite-jpps_installer v. <xsl:value-of select="/node/@version"/>
+       echo 
+}
+
+
+RPMLIST=
+
+###############################################################################
+# Main
+
+while getopts uvh opt
+do
+       case $opt in
+               'u') uninstall
+                    exit 0     
+                    ;;
+               'v') version
+                    exit 0     
+                    ;;
+               'h') usage
+                    exit 0     
+                    ;;
+       esac
+done
+
+install
+
+exit 0
+       </xsl:template>
+
+       <xsl:template name="subservices" match="subservice">
+                <xsl:param name="install"/>
+                <xsl:variable name="package"><xsl:value-of select="@name"/>_installer.sh</xsl:variable>
+                <xsl:choose>
+                        <xsl:when test="$install = 'true'">
+wget -N -nv <xsl:value-of select="$installers"/><xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+        echo
+        echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+        exit 1
+fi
+chmod u+x <xsl:value-of select="$package"/>
+SCRIPTLIST="$SCRIPTLIST ./<xsl:value-of select="$package"/>"
+                        </xsl:when>
+                        <xsl:otherwise>
+SCRIPTLISTUn="$SCRIPTLISTUn ./<xsl:value-of select="$package"/> -u "
+                        </xsl:otherwise>
+                </xsl:choose>
+        </xsl:template>
+
+
+       <xsl:template name="dependencies" match="external">
+               <xsl:param name="install"/>
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
+               <xsl:variable name="package.name"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/></xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="$install = 'true'">
+wget -N -nv <xsl:value-of select="$ext-repository"/><xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+       echo 
+       echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST <xsl:value-of select="$package"/>"
+                       </xsl:when>
+                       <xsl:otherwise>
+RPMLIST="$RPMLIST <xsl:value-of select="$package.name"/>"
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+       
+       <xsl:template name="components" match="component">
+               <xsl:param name="install"/>
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
+               <xsl:variable name="package.name"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/></xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="$install='true'">
+wget -N -nv <xsl:value-of select="$repository"/><xsl:value-of select="@arch"/>/RPMS/<xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+       echo 
+       echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+       exit 1
+fi
+RPMLIST="$RPMLIST <xsl:value-of select="$package"/>"
+                       </xsl:when>
+                       <xsl:otherwise>
+RPMLIST="$RPMLIST <xsl:value-of select="$package.name"/>"
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpps/project/lxscript-tgz.xsl b/org.glite.deployment.jpps/project/lxscript-tgz.xsl
new file mode 100644 (file)
index 0000000..4589cf6
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" 
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+       <xsl:output method="xml" 
+               indent="yes"
+               encoding="UTF-8"
+               omit-xml-declaration="yes"/>
+
+       <!-- Definition of variables and parameters -->
+       <xsl:param name="repository"/>
+       <xsl:param name="ext-repository"/>
+
+       <!-- global processing -->
+       <xsl:template match="/">
+#!/bin/sh
+#
+# glite-jpps_tgz_installer
+# usage: glite-jpps_tgz_installer [-u]
+#               -u             uninstall
+#
+# glite-jpps_tgz_installer installs the gLite <xsl:value-of select="/node/@name"/> Deployment Unit from biniary tarballs
+#
+<!-- Put here pre-install instructions -->
+PREFIX=/opt/glite
+
+###############################################################################
+# Download global dependencies 
+               <xsl:for-each select="node/dependencies">
+                       <xsl:apply-templates/>
+               </xsl:for-each>
+###############################################################################
+               
+               <xsl:for-each select="node/services/service">
+###############################################################################
+# Download <xsl:value-of select="@name"/> dependencies RPMS from repository
+                       <xsl:for-each select="dependencies">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+###############################################################################
+# Download <xsl:value-of select="@name"/> RPMS from repository
+                       <xsl:for-each select="components">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+###############################################################################
+               </xsl:for-each>
+               
+       </xsl:template>
+
+       <xsl:template name="dependencies" match="external">
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
+wget <xsl:value-of select="$ext-repository"/><xsl:value-of select="$package"/>
+       </xsl:template>
+       
+       <xsl:template name="components" match="component">
+               <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>_bin.tar.gz</xsl:variable>
+wget <xsl:value-of select="$repository"/>i386/tgz/<xsl:value-of select="$package"/>
+tar -xzf <xsl:value-of select="$package"/> $PREFIX
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpps/project/properties.xml b/org.glite.deployment.jpps/project/properties.xml
new file mode 100644 (file)
index 0000000..57a76ec
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+       Copyright (c) Members of the EGEE Collaboration. 2004 
+       See http://eu-egee.org/partners/ for details on the copyright holders
+       For license conditions see the license file or http://eu-egee.org/license.html
+
+       Common build properties file for the gLite JP Primary Storage Node Deployment Unit
+       
+       Author: Alberto Di Meglio <alberto.di.meglio@cern.ch>
+       Version info: $Id$
+       Release: $Name$ 
+       
+       Revision history:
+       $Log$
+       Revision 1.2  2005/07/08 13:18:40  dimeglio
+       Merged from branch 1.2.2
+       
+       Revision 1.1  2004/10/06 09:19:24  dimeglio
+       First version of this file
+       
+-->
+
+<project name="gLite JP Primary Storage Deployment Unit common properties">
+
+       <!-- Include build properties to allow overwriting 
+            of properties for subsystem                    -->
+       <property file="project/build.properties" />    
+
+       <!-- ======================================================
+          Define corresponding subsystem properties
+                ====================================================== -->
+
+       <!-- Subsystem name -->
+       <property name="subsystem.name" value="${deployment.subsystem.name}"/>
+               
+       <!-- Subsystem prefix -->
+       <property name="subsystem.prefix" value="${deployment.subsystem.prefix}"/>
+
+       <!-- ======================================================
+          Define component properties
+                ====================================================== -->
+                               
+       <!-- Component name prefix -->
+       <property name="component.prefix" value="jpps" />
+                       
+       <!-- ======================================================
+          Define general component properties
+                ====================================================== -->
+       
+       <import file="${component.general.properties.file}" />
+                                               
+       <!-- ======================================================
+                Define extra properties here ...
+                ====================================================== -->
+                
+       <property name="build.package.summary" value="gLite Job Provenance Primary Storage node configuration files" />
+       <property name="build.package.description" value="gLite Job Provenance Primary Storage node configuration files" />
+       <property name="build.package.files" value="
+%attr(755,root,root) %{prefix}/etc/config/scripts/glite-jpps-config.py\n
+%attr(644,root,root) %{prefix}/etc/config/templates/glite-jpps.cfg.xml\n
+%attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.doc\n
+%attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.pdf\n
+%attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.html\n"
+       />
+
+</project>
diff --git a/org.glite.deployment.jpps/project/quattor-template.xsl b/org.glite.deployment.jpps/project/quattor-template.xsl
new file mode 100644 (file)
index 0000000..d4dc67b
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsl:stylesheet version="1.0" 
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       
+       <xsl:output method="xml" 
+               indent="yes"
+               encoding="UTF-8"
+               omit-xml-declaration="yes"/>
+
+       <!-- Definition of variables and parameters -->
+
+       <!-- global processing -->
+       <xsl:template match="/">
+template pro_software_glite_jpps;
+
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004 
+# See http://eu-egee.org/partners/ for details on the copyright holders
+# For license conditions see the license file or http://eu-egee.org/license.html
+#
+# glite-jpps Quattor template v. <xsl:value-of select="/node/@version"/>
+#
+
+## CAs 
+               
+include pro_software_glite_CA;
+               
+               
+
+# Global dependencies  
+               <xsl:for-each select="node/dependencies">
+                       <xsl:apply-templates/>
+               </xsl:for-each>
+       
+               <xsl:for-each select="node/services/service">
+
+# <xsl:value-of select="@name"/> dependencies
+                       <xsl:for-each select="dependencies">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+
+# <xsl:value-of select="@name"/> RPMS
+                       <xsl:for-each select="components">
+                               <xsl:apply-templates/>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="subservice">
+include pro_software_<xsl:value-of select="translate(@name, '-', '_')"/>;
+               </xsl:for-each>
+                       
+
+               </xsl:for-each>
+       </xsl:template>
+
+       <xsl:template name="dependencies" match="external">
+"/software/packages"=pkg_repl("<xsl:value-of select="@name"/>","<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>","<xsl:value-of select="@arch"/>");
+       </xsl:template>
+       
+       <xsl:template name="components" match="component">
+"/software/packages"=pkg_repl("<xsl:value-of select="@name"/>","<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>","<xsl:value-of select="@arch"/>");
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpps/project/spec.xsl b/org.glite.deployment.jpps/project/spec.xsl
new file mode 100644 (file)
index 0000000..11ab7bc
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet version="1.0"
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+        <xsl:output method="xml"
+                indent="yes"
+                encoding="UTF-8"
+                omit-xml-declaration="yes"/>
+        <!-- global processing -->
+        <xsl:template match="/">       
+Summary: gLite Job Provenance Primary Storage node configuration files
+Name:   glite-jpps-config
+Version: @MODULE.VERSION@
+Release: @MODULE.BUILD@
+Copyright:Open Source EGEE License
+Vendor:EU EGEE project
+Group:System/Application
+Prefix:/opt/glite
+BuildArch: noarch
+BuildRoot:%{_builddir}/%{name}-%{version}      
+<!-- put internal dependencies -->
+<xsl:for-each select='node/services/service/components/component[@name != "glite-jpps-config"]'>
+Requires:<xsl:value-of select="@name"/>
+</xsl:for-each>
+<!-- put internal subservices dependencies -->
+<xsl:for-each select="//service/subservice">
+Requires:<xsl:value-of select="@name"/>-config
+</xsl:for-each>
+<!-- put external dependencies -->
+<xsl:for-each select="//dependencies/external">
+Requires:<xsl:value-of select="@name"/>
+</xsl:for-each>
+Obsoletes:glite-security-voms
+Source: glite-jpps.tar.gz
+%define debug_package %{nil}
+
+%description
+gLite Job Provenance Primary Storage node configuration files
+
+%prep
+
+%setup -c
+
+%build
+
+%install
+
+%clean
+
+%pre
+
+%post
+
+%preun
+
+%postun
+
+%files
+ %attr(755,root,root) %{prefix}/etc/config/scripts/glite-jpps-config.py\n %attr(644,root,root) %{prefix}/etc/config/templates/glite-jpps.cfg.xml\n %attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.doc\n %attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.pdf\n %attr(644,root,root) %{prefix}/share/doc/glite-jpps/release_notes/release_notes.html\n
+
+%changelog
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.glite.deployment.jpps/project/version.properties b/org.glite.deployment.jpps/project/version.properties
new file mode 100644 (file)
index 0000000..b6ff6e2
--- /dev/null
@@ -0,0 +1,4 @@
+
+module.version = 2.2.0
+module.age = 1
+                               
\ No newline at end of file