AG 2.3 Packaging

Thomas D. Uram turam at mcs.anl.gov
Thu Sep 16 13:35:33 CDT 2004


Doug:

I'll look at and commit these soon.  What is the status of your account 
access here?  Let us know if there's anything we can do to unblock it, 
if it's blocked.

That goes for you, too, Chris.

Thanks,

Tom


Douglas Kosovic wrote:
> Hi,
> 
> Could someone CVS checkin the attached patch file. Summary of files
> affected and changes:
> 
> - 'AGNodeService.py' to 'AGServiceManager.py -n' change :
> packaging/linux/gnome/NodeService-Debug.desktop
> packaging/linux/gnome/NodeService.desktop
> packaging/linux/kde/NodeService-Debug.desktop
> packaging/linux/kde/NodeService.desktop
> packaging/linux/xdg/NodeService-Debug.desktop
> packaging/linux/xdg/NodeService.desktop
> 
> - Python 2.2 doesn't support mkdtemp() workaround :
> bin/agpm.py
> 
> - Changes as a consequences of the Globus flavor change :
> packaging/linux/fedora/BuildPackage.py
> packaging/linux/fedora/globus-accessgrid.spec
> packaging/linux/fedora/install.sh
> 
> - General maintenance changes :
> packaging/linux/fedora/AccessGrid.spec.in
> 
> - Gracefully continues if Optik-1.4.1 source not found.
>   (FC1 uses python-optik-1.4.1-5 RPM package instead) :
> packaging/BuildPythonModules.py
> 
> 
> Thanks,
> Doug
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: bin/agpm.py
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/bin/agpm.py,v
> retrieving revision 1.23
> diff -u -r1.23 agpm.py
> --- bin/agpm.py	7 Sep 2004 20:16:35 -0000	1.23
> +++ bin/agpm.py	12 Sep 2004 12:08:38 -0000
> @@ -115,7 +115,11 @@
>      """
>      zipArchive = zipfile.ZipFile(filename)
>      # We have to unpack things some where we can use them
> -    workingDir = tempfile.mkdtemp()
> +    if hasattr(tempfile, "mkdtemp"):
> +        workingDir = tempfile.mkdtemp()
> +    else:
> +        workingDir = tempfile.mktemp()
> +	os.mkdir(workingDir)
>      appFile = None
>      for filename in zipArchive.namelist():
>          parts = filename.split('.')
> Index: packaging/BuildPythonModules.py
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/BuildPythonModules.py,v
> retrieving revision 1.14
> diff -u -r1.14 BuildPythonModules.py
> --- packaging/BuildPythonModules.py	10 Sep 2004 22:56:16 -0000	1.14
> +++ packaging/BuildPythonModules.py	12 Sep 2004 12:08:38 -0000
> @@ -50,8 +50,11 @@
>      print "Building Logging 0.4.7"
>      SetupModule("logging-0.4.7", SOURCE, DEST)
>  
> -    print "Building Optik 1.4.1"
> -    SetupModule("Optik-1.4.1", SOURCE, DEST)
> +    try:
> +        print "Building Optik 1.4.1"
> +        SetupModule("Optik-1.4.1", SOURCE, DEST)
> +    except:
> +        print "Warning: " + SOURCE + "/Optik-1.4.1 not found, ignoring"
>  
>  
>  print "Building fpconst 0.7.0"
> Index: packaging/linux/fedora/AccessGrid.spec.in
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/fedora/AccessGrid.spec.in,v
> retrieving revision 1.2
> diff -u -r1.2 AccessGrid.spec.in
> --- packaging/linux/fedora/AccessGrid.spec.in	10 Sep 2004 15:10:46 -0000	1.2
> +++ packaging/linux/fedora/AccessGrid.spec.in	12 Sep 2004 12:08:38 -0000
> @@ -46,6 +46,8 @@
>  %if %{has_fc1_appmenu_file}
>  Requires:	patch
>  %endif
> +BuildRequires:	globus-accessgrid
> +BuildRequires:	wxPython
>  Obsoletes:	AccessGrid-BridgeServer
>  Obsoletes:	AccessGrid-VenueServer
>  Obsoletes:	AccessGrid-VenueClient
> @@ -61,15 +63,8 @@
>  %prep
>  %setup -n AccessGrid-%{version} -c
>  
> -#
> -# The following builds the package using setup.py
> -# It starts by zipping up the services in the services directory
> -# then builds the package
> -#
> -
>  %build
>  
> -
>  #
>  # The following installs the package in the buildroot,
>  # moves the etc directory to the "root" directory,
> @@ -80,7 +75,6 @@
>  # Move node services and shared apps into etc 
>  mv NodeServices etc/AccessGrid
>  mv SharedApplications etc/AccessGrid
> -rm -rf etc/AccessGrid/SharedBrowser*
>  rm -f share/applications/AccessGrid/DevelopersDocumentation.desktop
>  mkdir etc/AccessGrid/Services
>  mkdir etc/AccessGrid/PackageCache
> @@ -92,6 +86,11 @@
>  mv lib usr/lib
>  mv bin usr/bin
>  
> +# compile python modules
> +. /etc/profile.d/globus.sh
> +python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/usr/lib/python%{pyver}",10,"/usr/lib/python%{pyver}", 1)'
> +python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/usr/lib/python%{pyver}",10,"/usr/lib/python%{pyver}")'
> +
>  
>  #
>  # Define the files that are to go into the AccessGrid package
> @@ -150,37 +149,9 @@
>  
>  #
>  # AccessGrid package postinstall commands
> -# - Make a file, /tmp/AccessGrid-Postinstall.py, run it, then delete.
> -#   This script will compile all the AccessGrid python modules
>  #
>  
>  %post
> -cat <<EOF > /tmp/AccessGrid-Postinstall.py
> -#!/usr/bin/python
> -import AccessGrid
> -import AccessGrid.hosting
> -import os
> -import os.path
> -import glob
> -import sys
> -
> -def modimport(module):
> -    for module_file in glob.glob(os.path.join(module.__path__[0], "*.py")):
> -	try:
> -            __import__(module.__name__ + "." + os.path.basename(module_file[:-3]))
> -	except:
> -	    pass
> -
> -sys.stdout.write("Compiling Access Grid Python modules.... ")
> -modimport(AccessGrid)
> -modimport(AccessGrid.hosting)
> -modimport(AccessGrid.Platform)
> -sys.stdout.write("Done\n")
> -EOF
> -. /etc/profile.d/globus.sh
> -chmod +x /tmp/AccessGrid-Postinstall.py
> -/tmp/AccessGrid-Postinstall.py
> -rm -f /tmp/AccessGrid-Postinstall.py
>  agpm.py --post-install
>  
>  %if %{has_fc1_appmenu_file}
> @@ -197,41 +168,15 @@
>  
>  #
>  # AccessGrid package pre-uninstall
> -# - Create a file, /tmp/AccessGrid-Preuninstall.py, run it, then delete it.
> -#   This script will remove those compiled AccessGrid python modules
> +#
>  
>  %preun
> -cat <<EOF > /tmp/AccessGrid-Preuninstall.py
> -#!/usr/bin/python
> -import AccessGrid
> -import AccessGrid.hosting
> -import AccessGrid.Security
> -import AccessGrid.Security.wxgui
> -import AccessGrid.Platform
> -import AccessGrid.Platform.unix
> -import os
> -import os.path
> -import glob
> -
> -def delcompiled(module):
> -    for module_file in glob.glob(os.path.join(module.__path__[0], "*.pyc")):
> -        try:
> -            os.remove(module_file)
> -        except os.error:
> -            pass
> -
> -delcompiled(AccessGrid.Security.wxgui)
> -delcompiled(AccessGrid.Security)
> -delcompiled(AccessGrid.Platform.unix)
> -delcompiled(AccessGrid.Platform)
> -delcompiled(AccessGrid.hosting.SOAPpy)
> -delcompiled(AccessGrid.hosting)
> -delcompiled(AccessGrid)
> -EOF
> -. /etc/profile.d/globus.sh
> -chmod +x /tmp/AccessGrid-Preuninstall.py
> -/tmp/AccessGrid-Preuninstall.py
> -rm -f /tmp/AccessGrid-Preuninstall.py
> +# clean up some non-RPM managed files and dirs
> +rm -f /etc/AccessGrid/Config/ApplicationDatabase
> +rm -rf /etc/AccessGrid/SharedApplications/Shared_Browser
> +rm -rf /etc/AccessGrid/SharedApplications/Shared_Presentation
> +rm -rf /etc/AccessGrid/SharedApplications/Shared_Question_Tool
> +rm -rf /etc/AccessGrid/SharedApplications/VenueVNC
>  
>  %if %{has_fc1_appmenu_file}
>    # remove AccessGrid menu from /etc/X11/desktop-menus/applications.menu
> @@ -260,8 +205,11 @@
>  
>  %changelog
>  
> -* Mon May 23 2004 Douglas Kosovic <douglask at itee.uq.edu.au>
> +* Mon Aug 30 2004 Douglas Kosovic <douglask at itee.uq.edu.au>
>  - Merged Fedora Core 1 & 2 AccessGrid.spec.in files into this single file
>  
> -
> +* Mon Aug 13 2004 Douglas Kosovic <douglask at itee.uq.edu.au>
> +- clean up some non-RPM managed files and dirs in preun step
> +- moved python module compiling from post to install step
> +- optimize generated python bytecode with -O python switch
>  
> Index: packaging/linux/fedora/BuildPackage.py
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/fedora/BuildPackage.py,v
> retrieving revision 1.1
> diff -u -r1.1 BuildPackage.py
> --- packaging/linux/fedora/BuildPackage.py	25 Aug 2004 17:32:10 -0000	1.1
> +++ packaging/linux/fedora/BuildPackage.py	12 Sep 2004 12:08:38 -0000
> @@ -102,7 +102,7 @@
>  cmd = "rpmbuild -ba globus-accessgrid.spec"     
>  print "cmd = ", cmd     
>  os.system(cmd)      
> -cmd = "cp /usr/src/redhat/RPMS/i386/globus-accessgrid-2.4-4.i386.rpm %s" % (RpmDir,)   
> +cmd = "cp /usr/src/redhat/RPMS/i386/globus-accessgrid-2.4-5.i386.rpm %s" % (RpmDir,)   
>  print "cmd = ", cmd     
>  os.system(cmd)      
>  
> Index: packaging/linux/fedora/globus-accessgrid.spec
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/fedora/globus-accessgrid.spec,v
> retrieving revision 1.1
> diff -u -r1.1 globus-accessgrid.spec
> --- packaging/linux/fedora/globus-accessgrid.spec	25 Aug 2004 17:32:10 -0000	1.1
> +++ packaging/linux/fedora/globus-accessgrid.spec	12 Sep 2004 12:08:38 -0000
> @@ -1,6 +1,6 @@
>  %define	name		globus-accessgrid
>  %define	version		2.4
> -%define	release		4
> +%define	release		5
>  %define	prefix		/usr/lib/globus
>  %define buildroot	/var/tmp/%{name}-%{version}
>  
> @@ -33,7 +33,7 @@
>  
>  ##
>  # Globus Data Management Client
> -${GPT_LOCATION}/sbin/gpt-build ${AGBUILDROOT}/gt3.0.2-source-installer/globus-data-management-client-2.4.3-src_bundle.tar.gz gcc32pthr
> +${GPT_LOCATION}/sbin/gpt-build ${AGBUILDROOT}/gt3.0.2-source-installer/globus-data-management-client-2.4.3-src_bundle.tar.gz gcc32dbgpthr
>  (cd ${GLOBUS_LOCATION}/setup/globus/ ; ./setup-globus-common )
>  
>  ##
> @@ -41,7 +41,7 @@
>  sed -e 's,/usr/local/bin/perl,/usr/bin/perl,g' < %{buildroot}%{prefix}/bin/der_chop > %{buildroot}%{prefix}/bin/der_chop.sed
>  mv -f %{buildroot}%{prefix}/bin/der_chop.sed %{buildroot}%{prefix}/bin/der_chop
>  chmod 0755 %{buildroot}%{prefix}/bin/der_chop
> -cp -f -p %{buildroot}%{prefix}/bin/der_chop %{buildroot}%{prefix}/bin/gcc32pthr/shared/der_chop
> +cp -f -p %{buildroot}%{prefix}/bin/der_chop %{buildroot}%{prefix}/bin/gcc32dbgpthr/shared/der_chop
>  
>  %install
>  mkdir -p %{buildroot}/etc/profile.d
> Index: packaging/linux/fedora/install.sh
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/fedora/install.sh,v
> retrieving revision 1.1
> diff -u -r1.1 install.sh
> --- packaging/linux/fedora/install.sh	25 Aug 2004 17:32:10 -0000	1.1
> +++ packaging/linux/fedora/install.sh	12 Sep 2004 12:08:38 -0000
> @@ -15,7 +15,7 @@
>  #
>  
>  export GLOBUS="globus-accessgrid"
> -export GLOBUS_VER="2.4-1"
> +export GLOBUS_VER="2.4-5"
>  
>  export AG="AccessGrid"
>  export AG_VER=VER
> Index: packaging/linux/gnome/NodeService-Debug.desktop
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/gnome/NodeService-Debug.desktop,v
> retrieving revision 1.1
> diff -u -r1.1 NodeService-Debug.desktop
> --- packaging/linux/gnome/NodeService-Debug.desktop	5 May 2004 19:59:56 -0000	1.1
> +++ packaging/linux/gnome/NodeService-Debug.desktop	12 Sep 2004 12:08:38 -0000
> @@ -1,8 +1,8 @@
>  [Desktop Entry]
>  Name=Node Service (Debug)
>  Comment=Run the node service software in debug mode
> -TryExec=AGNodeService.py
> -Exec=AGNodeService.py -d
> +TryExec=AGServiceManager.py -n
> +Exec=AGServiceManager.py -n -d
>  Icon=/usr/share/AccessGrid/ag.ico
>  Terminal=1
>  Type=Application
> Index: packaging/linux/gnome/NodeService.desktop
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/gnome/NodeService.desktop,v
> retrieving revision 1.1
> diff -u -r1.1 NodeService.desktop
> --- packaging/linux/gnome/NodeService.desktop	5 May 2004 19:59:56 -0000	1.1
> +++ packaging/linux/gnome/NodeService.desktop	12 Sep 2004 12:08:38 -0000
> @@ -1,8 +1,8 @@
>  [Desktop Entry]
>  Name=Node Service
>  Comment=Run the node service software
> -TryExec=AGNodeService.py
> -Exec=AGNodeService.py
> +TryExec=AGServiceManager.py -n
> +Exec=AGServiceManager.py -n
>  Icon=/usr/share/AccessGrid/ag.ico
>  Terminal=0
>  Type=Application
> Index: packaging/linux/kde/NodeService-Debug.desktop
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/kde/NodeService-Debug.desktop,v
> retrieving revision 1.2
> diff -u -r1.2 NodeService-Debug.desktop
> --- packaging/linux/kde/NodeService-Debug.desktop	17 May 2004 17:11:41 -0000	1.2
> +++ packaging/linux/kde/NodeService-Debug.desktop	12 Sep 2004 12:08:38 -0000
> @@ -3,6 +3,6 @@
>  Encoding=UTF-8
>  Name=Node Service
>  Type=Application
> -Exec=AGNodeService.py -d
> +Exec=AGServiceManager.py -n -d
>  Icon=/usr/share/AccessGrid/ag.ico
>  Terminal=1
> Index: packaging/linux/kde/NodeService.desktop
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/kde/NodeService.desktop,v
> retrieving revision 1.2
> diff -u -r1.2 NodeService.desktop
> --- packaging/linux/kde/NodeService.desktop	17 May 2004 17:11:41 -0000	1.2
> +++ packaging/linux/kde/NodeService.desktop	12 Sep 2004 12:08:38 -0000
> @@ -3,6 +3,6 @@
>  Encoding=UTF-8
>  Name=Node Service
>  Type=Application
> -Exec=AGNodeService.py 
> +Exec=AGServiceManager.py -n 
>  Icon=/usr/share/AccessGrid/ag.ico
>  Terminal=0
> Index: packaging/linux/xdg/NodeService-Debug.desktop
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/xdg/NodeService-Debug.desktop,v
> retrieving revision 1.1
> diff -u -r1.1 NodeService-Debug.desktop
> --- packaging/linux/xdg/NodeService-Debug.desktop	24 Jun 2004 22:35:32 -0000	1.1
> +++ packaging/linux/xdg/NodeService-Debug.desktop	12 Sep 2004 12:08:38 -0000
> @@ -1,8 +1,8 @@
>  [Desktop Entry]
>  Name=Node Service (Debug)
>  Comment=Run the node service software in debug mode
> -TryExec=AGNodeService.py
> -Exec=AGNodeService.py -d
> +TryExec=AGServiceManager.py -n
> +Exec=AGServiceManager.py -n -d
>  Icon=/usr/share/AccessGrid/ag.ico
>  Terminal=1
>  Type=Application
> Index: packaging/linux/xdg/NodeService.desktop
> ===================================================================
> RCS file: /cvs/fl/AccessGrid/packaging/linux/xdg/NodeService.desktop,v
> retrieving revision 1.1
> diff -u -r1.1 NodeService.desktop
> --- packaging/linux/xdg/NodeService.desktop	24 Jun 2004 22:35:32 -0000	1.1
> +++ packaging/linux/xdg/NodeService.desktop	12 Sep 2004 12:08:38 -0000
> @@ -1,8 +1,8 @@
>  [Desktop Entry]
>  Name=Node Service
>  Comment=Run the node service software
> -TryExec=AGNodeService.py
> -Exec=AGNodeService.py
> +TryExec=AGServiceManager.py -n
> +Exec=AGServiceManager.py -n
>  Icon=/usr/share/AccessGrid/ag.ico
>  Terminal=false
>  Type=Application




More information about the ag-dev mailing list