[Pkg-zenoss-commits] r148 - /packages/zenoss/trunk/debian/patches/remove-ZENHOME-os.getent.dpatch

bzed-guest at users.alioth.debian.org bzed-guest at users.alioth.debian.org
Mon Jun 18 12:32:45 UTC 2007


Author: bzed-guest
Date: Mon Jun 18 12:32:44 2007
New Revision: 148

URL: http://svn.debian.org/wsvn/pkg-zenoss/?sc=1&rev=148
Log:
fixing the fixed patch. no clue what wrent wrong here

Modified:
    packages/zenoss/trunk/debian/patches/remove-ZENHOME-os.getent.dpatch

Modified: packages/zenoss/trunk/debian/patches/remove-ZENHOME-os.getent.dpatch
URL: http://svn.debian.org/wsvn/pkg-zenoss/packages/zenoss/trunk/debian/patches/remove-ZENHOME-os.getent.dpatch?rev=148&op=diff
==============================================================================
--- packages/zenoss/trunk/debian/patches/remove-ZENHOME-os.getent.dpatch (original)
+++ packages/zenoss/trunk/debian/patches/remove-ZENHOME-os.getent.dpatch Mon Jun 18 12:32:44 2007
@@ -1,13 +1,13 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## remove-ZENHOME-rest.dpatch by  <bernd at bzed.de>
+## remove-ZENHOME-os.getent_.dpatch by Bernd Zeimetz <bernd at bzed.de>
 ##
-## DP more zenhome stuff removed
-## DP: grep -lr "os.getenv('ZENHOME')" * | sort -u | while read i; do echo $i; sed "s,os.getenv('ZENHOME'),pwd.getpwnam('zenoss')[5],g;s/import os/import pwd, os/g" $i > $i.new; mv $i.new $i; done
+## DP: getting rid of ZENHOM
+## DP: grep -lr "os.getenv('ZENHOME')" * | sort -u | while read i; do echo $i; sed -i "s,os.getenv('ZENHOME'),pwd.getpwnam('zenoss')[5],g;s/import os/import pwd, os/g" $i; done
 
 @DPATCH@
 diff -urNad zenoss~/Products/ZenModel/DeviceClass.py zenoss/Products/ZenModel/DeviceClass.py
 --- zenoss~/Products/ZenModel/DeviceClass.py	2007-06-12 20:13:26.000000000 +0100
-+++ zenoss/Products/ZenModel/DeviceClass.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/DeviceClass.py	2007-06-18 13:31:09.000000000 +0100
 @@ -17,7 +17,7 @@
  
  __version__ = "$Revision: 1.76 $"[11:-2]
@@ -28,7 +28,7 @@
              basename = os.path.basename(filename)
 diff -urNad zenoss~/Products/ZenModel/ZenModelRM.py zenoss/Products/ZenModel/ZenModelRM.py
 --- zenoss~/Products/ZenModel/ZenModelRM.py	2007-05-03 16:19:41.000000000 +0100
-+++ zenoss/Products/ZenModel/ZenModelRM.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/ZenModelRM.py	2007-06-18 13:31:09.000000000 +0100
 @@ -17,7 +17,7 @@
  
  __version__ = "$Revision: 1.50 $"[11:-2]
@@ -48,17 +48,8 @@
          fileBase = '%s_%s.xml' % (context.getNodeName(), context.id)
          if dest == 'filesystem':
 diff -urNad zenoss~/Products/ZenModel/ZenPack.py zenoss/Products/ZenModel/ZenPack.py
---- zenoss~/Products/ZenModel/ZenPack.py	2007-06-15 16:23:20.000000000 +0100
-+++ zenoss/Products/ZenModel/ZenPack.py	2007-06-15 16:47:21.000000000 +0100
-@@ -19,7 +19,7 @@
- from Products.ZenUtils.Utils import importClass
- import transaction
- 
--import os, pwd
-+import pwd, os, pwd
- 
- __doc__="ZenPacks base definitions"
- 
+--- zenoss~/Products/ZenModel/ZenPack.py	2007-06-18 13:30:04.000000000 +0100
++++ zenoss/Products/ZenModel/ZenPack.py	2007-06-18 13:31:09.000000000 +0100
 @@ -128,7 +128,7 @@
  ''' % (self.author, self.organization, self.version))
  
@@ -70,7 +61,7 @@
              os.makeDirs(path)
 diff -urNad zenoss~/Products/ZenModel/ZenossInfo.py zenoss/Products/ZenModel/ZenossInfo.py
 --- zenoss~/Products/ZenModel/ZenossInfo.py	2007-05-18 21:25:16.000000000 +0100
-+++ zenoss/Products/ZenModel/ZenossInfo.py	2007-06-15 16:47:21.000000000 +0100
++++ zenoss/Products/ZenModel/ZenossInfo.py	2007-06-18 13:31:09.000000000 +0100
 @@ -11,7 +11,7 @@
  #
  ###########################################################################
@@ -145,7 +136,7 @@
          # until the action has completed
 diff -urNad zenoss~/Products/ZenModel/migrate/about_zenoss.py zenoss/Products/ZenModel/migrate/about_zenoss.py
 --- zenoss~/Products/ZenModel/migrate/about_zenoss.py	2007-04-20 14:25:38.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/about_zenoss.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/about_zenoss.py	2007-06-18 13:31:09.000000000 +0100
 @@ -20,13 +20,13 @@
  
  __version__ = "$Revision$"[11:-2]
@@ -164,7 +155,7 @@
      version = Migrate.Version(0, 23, 0)
 diff -urNad zenoss~/Products/ZenModel/migrate/betterstandarderrormessage.py zenoss/Products/ZenModel/migrate/betterstandarderrormessage.py
 --- zenoss~/Products/ZenModel/migrate/betterstandarderrormessage.py	2007-06-05 14:19:35.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/betterstandarderrormessage.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/betterstandarderrormessage.py	2007-06-18 13:31:09.000000000 +0100
 @@ -20,7 +20,7 @@
  __version__ = "$Revision$"[11:-2]
  
@@ -185,7 +176,7 @@
          try:
 diff -urNad zenoss~/Products/ZenModel/migrate/datapoints.py zenoss/Products/ZenModel/migrate/datapoints.py
 --- zenoss~/Products/ZenModel/migrate/datapoints.py	2007-04-20 14:25:38.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/datapoints.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/datapoints.py	2007-06-18 13:31:09.000000000 +0100
 @@ -19,7 +19,7 @@
  
  __version__ = "$Revision$"[11:-2]
@@ -206,7 +197,7 @@
              oldname = os.path.join(oldbase + rrdPath, s.id)
 diff -urNad zenoss~/Products/ZenModel/migrate/evenbetterstandarderrormessage.py zenoss/Products/ZenModel/migrate/evenbetterstandarderrormessage.py
 --- zenoss~/Products/ZenModel/migrate/evenbetterstandarderrormessage.py	2007-06-05 14:19:35.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/evenbetterstandarderrormessage.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/evenbetterstandarderrormessage.py	2007-06-18 13:31:09.000000000 +0100
 @@ -11,7 +11,7 @@
  '''
  
@@ -227,7 +218,7 @@
          try:
 diff -urNad zenoss~/Products/ZenModel/migrate/hoist_perf_data.py zenoss/Products/ZenModel/migrate/hoist_perf_data.py
 --- zenoss~/Products/ZenModel/migrate/hoist_perf_data.py	2007-04-20 14:25:38.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/hoist_perf_data.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/hoist_perf_data.py	2007-06-18 13:31:09.000000000 +0100
 @@ -23,7 +23,7 @@
  
  import Migrate
@@ -248,7 +239,7 @@
          for name in names:
 diff -urNad zenoss~/Products/ZenModel/migrate/import_export_filesystem.py zenoss/Products/ZenModel/migrate/import_export_filesystem.py
 --- zenoss~/Products/ZenModel/migrate/import_export_filesystem.py	2007-04-20 14:25:38.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/import_export_filesystem.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/import_export_filesystem.py	2007-06-18 13:31:09.000000000 +0100
 @@ -20,11 +20,11 @@
  
  __version__ = "$Revision$"[11:-2]
@@ -265,7 +256,7 @@
      version = Migrate.Version(0, 23, 0)
 diff -urNad zenoss~/Products/ZenModel/migrate/standarderrormessage.py zenoss/Products/ZenModel/migrate/standarderrormessage.py
 --- zenoss~/Products/ZenModel/migrate/standarderrormessage.py	2007-06-05 14:19:35.000000000 +0100
-+++ zenoss/Products/ZenModel/migrate/standarderrormessage.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/migrate/standarderrormessage.py	2007-06-18 13:31:09.000000000 +0100
 @@ -20,7 +20,7 @@
  __version__ = "$Revision$"[11:-2]
  
@@ -286,7 +277,7 @@
          try:
 diff -urNad zenoss~/Products/ZenModel/zendmd.py zenoss/Products/ZenModel/zendmd.py
 --- zenoss~/Products/ZenModel/zendmd.py	2007-05-07 20:10:54.000000000 +0100
-+++ zenoss/Products/ZenModel/zendmd.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/Products/ZenModel/zendmd.py	2007-06-18 13:31:09.000000000 +0100
 @@ -11,7 +11,7 @@
  #
  ###########################################################################
@@ -307,7 +298,7 @@
          import readline
 diff -urNad zenoss~/Products/ZenUtils/ZCmdBase.py zenoss/Products/ZenUtils/ZCmdBase.py
 --- zenoss~/Products/ZenUtils/ZCmdBase.py	2007-05-15 16:26:26.000000000 +0100
-+++ zenoss/Products/ZenUtils/ZCmdBase.py	2007-06-15 16:47:21.000000000 +0100
++++ zenoss/Products/ZenUtils/ZCmdBase.py	2007-06-18 13:31:09.000000000 +0100
 @@ -26,8 +26,8 @@
  from Exceptions import ZentinelException
  from ZenDaemon import ZenDaemon
@@ -320,8 +311,8 @@
      defaultCacheDir = os.path.join(defaultCacheDir, 'var')
  
 diff -urNad zenoss~/Products/ZenUtils/ZenBackupBase.py zenoss/Products/ZenUtils/ZenBackupBase.py
---- zenoss~/Products/ZenUtils/ZenBackupBase.py	2007-06-15 16:23:20.000000000 +0100
-+++ zenoss/Products/ZenUtils/ZenBackupBase.py	2007-06-15 16:47:21.000000000 +0100
+--- zenoss~/Products/ZenUtils/ZenBackupBase.py	2007-06-18 13:30:04.000000000 +0100
++++ zenoss/Products/ZenUtils/ZenBackupBase.py	2007-06-18 13:31:09.000000000 +0100
 @@ -18,8 +18,8 @@
  Common code for zenbackup.py and zenrestore.py
  '''
@@ -344,7 +335,7 @@
  
 diff -urNad zenoss~/Products/ZenUtils/ZenScriptBase.py zenoss/Products/ZenUtils/ZenScriptBase.py
 --- zenoss~/Products/ZenUtils/ZenScriptBase.py	2007-04-20 14:25:38.000000000 +0100
-+++ zenoss/Products/ZenUtils/ZenScriptBase.py	2007-06-15 16:47:21.000000000 +0100
++++ zenoss/Products/ZenUtils/ZenScriptBase.py	2007-06-18 13:31:09.000000000 +0100
 @@ -22,8 +22,8 @@
  
  from Exceptions import ZentinelException
@@ -356,9 +347,355 @@
  if defaultCacheDir is not None:
      defaultCacheDir = os.path.join(defaultCacheDir, 'var')
  
+diff -urNad zenoss~/debian/patches/remove-ZENHOME-os.getent.dpatch zenoss/debian/patches/remove-ZENHOME-os.getent.dpatch
+--- zenoss~/debian/patches/remove-ZENHOME-os.getent.dpatch	2007-06-18 13:28:20.000000000 +0100
++++ zenoss/debian/patches/remove-ZENHOME-os.getent.dpatch	2007-06-18 13:31:09.000000000 +0100
+@@ -2,7 +2,7 @@
+ ## remove-ZENHOME-rest.dpatch by  <bernd at bzed.de>
+ ##
+ ## DP more zenhome stuff removed
+-## DP: grep -lr "os.getenv('ZENHOME')" * | sort -u | while read i; do echo $i; sed "s,os.getenv('ZENHOME'),pwd.getpwnam('zenoss')[5],g;s/import os/import pwd, os/g" $i > $i.new; mv $i.new $i; done
++## DP: grep -lr "pwd.getpwnam('zenoss')[5]" * | sort -u | while read i; do echo $i; sed "s,pwd.getpwnam('zenoss')[5],pwd.getpwnam('zenoss')[5],g;s/import pwd, os/import pwd, os/g" $i > $i.new; mv $i.new $i; done
+ 
+ @DPATCH@
+ diff -urNad zenoss~/Products/ZenModel/DeviceClass.py zenoss/Products/ZenModel/DeviceClass.py
+@@ -12,7 +12,7 @@
+  
+  __version__ = "$Revision: 1.76 $"[11:-2]
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  import types
+  import time
+@@ -21,7 +21,7 @@
+          """Get a list of XML filenames and basenames from the ZENHOME/import
+          directory.
+          """
+--        path = os.path.join(os.getenv('ZENHOME'), 'import')
++-        path = os.path.join(pwd.getpwnam('zenoss')[5], 'import')
+ +        path = os.path.join(pwd.getpwnam('zenoss')[5], 'import')
+          filedata = []
+          for filename in glob(path+os.path.sep+'*.xml'):
+@@ -33,7 +33,7 @@
+  
+  __version__ = "$Revision: 1.50 $"[11:-2]
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  import time
+  
+@@ -42,7 +42,7 @@
+          dest = 'filesystem'
+          if REQUEST:
+              dest = REQUEST.form.get('dest')
+--        zenhome = os.getenv('ZENHOME')
++-        zenhome = pwd.getpwnam('zenoss')[5]
+ +        zenhome = pwd.getpwnam('zenoss')[5]
+          expDir = os.path.join(zenhome, 'export')
+          fileBase = '%s_%s.xml' % (context.getNodeName(), context.id)
+@@ -54,7 +54,7 @@
+  from Products.ZenUtils.Utils import importClass
+  import transaction
+  
+--import os, pwd
++-import pwd, os, pwd
+ +import pwd, os, pwd
+  
+  __doc__="ZenPacks base definitions"
+@@ -63,7 +63,7 @@
+  ''' % (self.author, self.organization, self.version))
+  
+              fp.close()
+--        zenhome = os.getenv('ZENHOME')
++-        zenhome = pwd.getpwnam('zenoss')[5]
+ +        zenhome = pwd.getpwnam('zenoss')[5]
+          path = os.path.join(zenhome, 'export')
+          if not os.path.isdir(path):
+@@ -75,7 +75,7 @@
+  #
+  ###########################################################################
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  import re
+  import time
+@@ -84,7 +84,7 @@
+              v = Version(*getRRDToolVersion())
+              v.full()
+          """
+--        cmd = os.path.join(os.getenv('ZENHOME'), 'bin', 'rrdtool')
++-        cmd = os.path.join(pwd.getpwnam('zenoss')[5], 'bin', 'rrdtool')
+ +        cmd = os.path.join(pwd.getpwnam('zenoss')[5], 'bin', 'rrdtool')
+          if not os.path.exists(cmd):
+              cmd = 'rrdtool'
+@@ -93,7 +93,7 @@
+      
+      def getZenossRevision(self):
+          try:
+--            os.chdir(os.path.join(os.getenv('ZENHOME'), 'Products'))
++-            os.chdir(os.path.join(pwd.getpwnam('zenoss')[5], 'Products'))
+ +            os.chdir(os.path.join(pwd.getpwnam('zenoss')[5], 'Products'))
+              fd = os.popen("svn info 2>/dev/null | grep Revision | awk '{print $2}'")
+              return fd.readlines()[0].strip()
+@@ -102,7 +102,7 @@
+              name = 'ZEO'
+          else:
+              name = "%s.py" % name
+--        pidFile = os.path.join(os.getenv('ZENHOME'), 'var', '%s.pid' % name)
++-        pidFile = os.path.join(pwd.getpwnam('zenoss')[5], 'var', '%s.pid' % name)
+ +        pidFile = os.path.join(pwd.getpwnam('zenoss')[5], 'var', '%s.pid' % name)
+          if os.path.exists(pidFile):
+              pid = open(pidFile).read()
+@@ -111,7 +111,7 @@
+          """
+          Get the list of supported Zenoss daemons.
+          """
+--        masterScript = os.path.join(os.getenv('ZENHOME'), 'bin', 'zenoss')
++-        masterScript = os.path.join(pwd.getpwnam('zenoss')[5], 'bin', 'zenoss')
+ +        masterScript = os.path.join(pwd.getpwnam('zenoss')[5], 'bin', 'zenoss')
+          daemons = []
+          for line in os.popen("%s list" % masterScript).readlines():
+@@ -120,7 +120,7 @@
+              daemon = 'event'
+          elif daemon == 'zeoctl':
+              daemon = 'zeo'
+--        filename = os.path.join(os.getenv('ZENHOME'), 'log', "%s.log" % daemon)
++-        filename = os.path.join(pwd.getpwnam('zenoss')[5], 'log', "%s.log" % daemon)
+ +        filename = os.path.join(pwd.getpwnam('zenoss')[5], 'log', "%s.log" % daemon)
+          # if there is no data read, we don't want to return something that can
+          # be interptreted as "None", so we make the default a single white
+@@ -129,7 +129,7 @@
+              daemon = 'zope'
+          elif daemon == 'zeoctl':
+              daemon = 'zeo'
+--        return os.path.join(os.getenv('ZENHOME'), 'etc',
++-        return os.path.join(pwd.getpwnam('zenoss')[5], 'etc',
+ +        return os.path.join(pwd.getpwnam('zenoss')[5], 'etc',
+              "%s.conf" % daemon)
+  
+@@ -138,7 +138,7 @@
+          action = (REQUEST.form.get('action') or '').lower()
+          if action not in legalValues:
+              return self.callZenScreen(REQUEST)
+--        daemon = os.path.join(os.getenv('ZENHOME'), 'bin',
++-        daemon = os.path.join(pwd.getpwnam('zenoss')[5], 'bin',
+ +        daemon = os.path.join(pwd.getpwnam('zenoss')[5], 'bin',
+              REQUEST.form.get('daemon'))
+          # we actually want to block here, so that the page doesn't refresh
+@@ -150,14 +150,14 @@
+  
+  __version__ = "$Revision$"[11:-2]
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  
+  from Products.ZenModel.ZenossInfo import manage_addZenossInfo
+  
+  import Migrate
+  
+--zenhome = os.getenv('ZENHOME')
++-zenhome = pwd.getpwnam('zenoss')[5]
+ +zenhome = pwd.getpwnam('zenoss')[5]
+  
+  class AboutZenoss(Migrate.Step):
+@@ -169,7 +169,7 @@
+  __version__ = "$Revision$"[11:-2]
+  
+  import Migrate
+--import os
++-import pwd, os
+ +import pwd, os
+  
+  class BetterStandardErrorMessage(Migrate.Step):
+@@ -178,7 +178,7 @@
+          app = dmd.getPhysicalRoot()
+          if app.hasObject('standard_error_message'):
+              app._delObject('standard_error_message')
+--        zenhome = os.getenv('ZENHOME')
++-        zenhome = pwd.getpwnam('zenoss')[5]
+ +        zenhome = pwd.getpwnam('zenoss')[5]
+          file = open('%s/Products/ZenModel/dtml/standard_error_message.dtml' %
+                          zenhome)
+@@ -190,7 +190,7 @@
+  
+  __version__ = "$Revision$"[11:-2]
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  import sys
+  import Migrate
+@@ -199,7 +199,7 @@
+              s.datapoints._setObject(p.id, p)
+  
+      def cutoverTemplate(self, t, rrdPath):
+--        oldbase = os.path.join(os.getenv('ZENHOME'), 'perf')
++-        oldbase = os.path.join(pwd.getpwnam('zenoss')[5], 'perf')
+ +        oldbase = os.path.join(pwd.getpwnam('zenoss')[5], 'perf')
+          for s in t.datasources()[:]:
+              self.cutoverDataSource(s)
+@@ -211,7 +211,7 @@
+  '''
+  
+  import Migrate
+--import os
++-import pwd, os
+ +import pwd, os
+  
+  class EvenBetterStandardErrorMessage(Migrate.Step):
+@@ -220,7 +220,7 @@
+          app = dmd.getPhysicalRoot()
+          if app.hasObject('standard_error_message'):
+              app._delObject('standard_error_message')
+--        zenhome = os.getenv('ZENHOME')
++-        zenhome = pwd.getpwnam('zenoss')[5]
+ +        zenhome = pwd.getpwnam('zenoss')[5]
+          file = open('%s/Products/ZenModel/dtml/standard_error_message.dtml' %
+                          zenhome)
+@@ -232,7 +232,7 @@
+  
+  import Migrate
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  
+  class HoistPerfData(Migrate.Step):
+@@ -241,7 +241,7 @@
+          import glob
+          names = dmd.getDmdRoot('Devices').getOrganizerNames(True)
+          
+--        oldbase = os.path.join(os.getenv('ZENHOME'), 'perf', 'Devices')
++-        oldbase = os.path.join(pwd.getpwnam('zenoss')[5], 'perf', 'Devices')
+ +        oldbase = os.path.join(pwd.getpwnam('zenoss')[5], 'perf', 'Devices')
+          names.sort()
+          names.reverse()
+@@ -253,12 +253,12 @@
+  
+  __version__ = "$Revision$"[11:-2]
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  
+  import Migrate
+  
+--zenhome = os.getenv('ZENHOME')
++-zenhome = pwd.getpwnam('zenoss')[5]
+ +zenhome = pwd.getpwnam('zenoss')[5]
+  
+  class ImportExportFilesystem(Migrate.Step):
+@@ -270,7 +270,7 @@
+  __version__ = "$Revision$"[11:-2]
+  
+  import Migrate
+--import os
++-import pwd, os
+ +import pwd, os
+  
+  class StandardErrorMessage(Migrate.Step):
+@@ -279,7 +279,7 @@
+          app = dmd.getPhysicalRoot()
+          if app.hasObject('standard_error_message'):
+              app._delObject('standard_error_message')
+--        zenhome = os.getenv('ZENHOME')
++-        zenhome = pwd.getpwnam('zenoss')[5]
+ +        zenhome = pwd.getpwnam('zenoss')[5]
+          file = open('%s/Products/ZenModel/dtml/standard_error_message.dtml' %
+                          zenhome)
+@@ -291,7 +291,7 @@
+  #
+  ###########################################################################
+  
+--import os
++-import pwd, os
+ +import pwd, os
+  import atexit
+  import socket
+@@ -300,7 +300,7 @@
+      # Itamar Shtull-Trauring of Twisted Python. A current copy of his
+      # original code is available at http://pastebin.adytum.us/40 though
+      # the original has proven difficult to locate.
+--    zenHome = os.getenv('ZENHOME')
++-    zenHome = pwd.getpwnam('zenoss')[5]
+ +    zenHome = pwd.getpwnam('zenoss')[5]
+      historyPath = os.path.join(zenHome, '.pyhistory')
+      def save_history(historyPath=historyPath):
+@@ -312,8 +312,8 @@
+  from Exceptions import ZentinelException
+  from ZenDaemon import ZenDaemon
+  
+--import os
+--defaultCacheDir = os.getenv('ZENHOME')
++-import pwd, os
++-defaultCacheDir = pwd.getpwnam('zenoss')[5]
+ +import pwd, os
+ +defaultCacheDir = pwd.getpwnam('zenoss')[5]
+  if defaultCacheDir is not None:
+@@ -326,8 +326,8 @@
+  Common code for zenbackup.py and zenrestore.py
+  '''
+  
+--import os
+--import os.path
++-import pwd, os
++-import pwd, os.path
+ +import pwd, os
+ +import pwd, os.path
+  import tempfile
+@@ -337,7 +337,7 @@
+  
+      def __init__(self, noopts=0):
+          CmdBase.__init__(self, noopts)
+--        self.zenhome = os.getenv('ZENHOME')
++-        self.zenhome = pwd.getpwnam('zenoss')[5]
+ +        self.zenhome = pwd.getpwnam('zenoss')[5]
+          self.zopehome = os.getenv('ZOPEHOME')
+  
+@@ -349,8 +349,8 @@
+  
+  from Exceptions import ZentinelException
+  
+--import os
+--defaultCacheDir = os.getenv('ZENHOME')
++-import pwd, os
++-defaultCacheDir = pwd.getpwnam('zenoss')[5]
+ +import pwd, os
+ +defaultCacheDir = pwd.getpwnam('zenoss')[5]
+  if defaultCacheDir is not None:
+@@ -363,8 +363,8 @@
+  
+  
+  
+--import os
+--defaultCacheDir = os.getenv('ZENHOME')
++-import pwd, os
++-defaultCacheDir = pwd.getpwnam('zenoss')[5]
+ +import pwd, os
+ +defaultCacheDir = pwd.getpwnam('zenoss')[5]
+  if defaultCacheDir is not None:
+@@ -377,12 +377,12 @@
+  #   Copyright (c) 2006 Zenoss, Inc. All rights reserved.
+  #
+  #################################################################
+--import os
++-import pwd, os
+ +import pwd, os
+  import sys
+  import shutil
+  
+--sys.path.append(os.path.join(os.getenv('ZENHOME'), 'Products'))
++-sys.path.append(os.path.join(pwd.getpwnam('zenoss')[5], 'Products'))
+ +sys.path.append(os.path.join(pwd.getpwnam('zenoss')[5], 'Products'))
+  from ZenModel.version import Current
+  from ZenModel.version.Version import Version
 diff -urNad zenoss~/inst/zen2dump.py zenoss/inst/zen2dump.py
 --- zenoss~/inst/zen2dump.py	2007-05-31 21:43:11.000000000 +0100
-+++ zenoss/inst/zen2dump.py	2007-06-15 16:47:20.000000000 +0100
++++ zenoss/inst/zen2dump.py	2007-06-18 13:31:09.000000000 +0100
 @@ -287,8 +287,8 @@
  
  
@@ -372,7 +709,7 @@
  
 diff -urNad zenoss~/scripts/updateVersion zenoss/scripts/updateVersion
 --- zenoss~/scripts/updateVersion	2006-09-27 23:06:57.000000000 +0100
-+++ zenoss/scripts/updateVersion	2007-06-15 16:47:21.000000000 +0100
++++ zenoss/scripts/updateVersion	2007-06-18 13:31:10.000000000 +0100
 @@ -4,11 +4,11 @@
  #   Copyright (c) 2006 Zenoss, Inc. All rights reserved.
  #




More information about the Pkg-zenoss-commits mailing list