summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBrent Eagles <brent@zeroc.com>2007-09-04 07:19:40 -0230
committerBrent Eagles <brent@zeroc.com>2007-09-04 07:19:40 -0230
commit9865706797a1a9237e0818a21d354da4eefce58f (patch)
tree79515b4c021a29844fd931f8d5bbb8901cf51bf5 /cpp
parentUpdate Ruby CHANGES file for http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?... (diff)
downloadice-9865706797a1a9237e0818a21d354da4eefce58f.tar.bz2
ice-9865706797a1a9237e0818a21d354da4eefce58f.tar.xz
ice-9865706797a1a9237e0818a21d354da4eefce58f.zip
-Updating the makedist.py scripts for the various language mappings to support the root makedist script.
-Adding the new makedist tool. Merging fixes from R3_2_branch. Specifically: - bzip2 DLL library naming problem for .dotnet - EOLN character translation for RELEASE_NOTES file. - Remove exclusion of backup demo from Windows installers. - Remove obsoleted files from Ruby - Remove unused and obsolete iceproject.xml file. - Modify makewindist.py to use distfiles archive instead of trying to guess versions, etc.
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/install/common/components.py2
-rwxr-xr-xcpp/install/common/components/berkeleydb.runtime2
-rwxr-xr-xcpp/install/common/components/bzip2.runtime1
-rwxr-xr-xcpp/install/common/components/components.ini8
-rwxr-xr-xcpp/install/common/components/ice.demo.vc602
-rwxr-xr-xcpp/install/common/components/ice.demo.vc711
-rwxr-xr-xcpp/install/common/components/ice.demo.vc801
-rwxr-xr-xcpp/install/common/components/ice.demo.vc80_x641
-rwxr-xr-xcpp/install/common/components/ice.dotnet.assemblies14
-rwxr-xr-xcpp/install/common/components/ice.ruby.ruby3
-rw-r--r--cpp/install/common/components/relnotes1
-rw-r--r--cpp/install/common/iceproject.xml38
-rwxr-xr-xcpp/install/common/makewindist.py88
-rwxr-xr-xcpp/makebindist.py308
-rwxr-xr-xcpp/makedist.py197
15 files changed, 300 insertions, 367 deletions
diff --git a/cpp/install/common/components.py b/cpp/install/common/components.py
index 58a595f761c..d360dc33603 100755
--- a/cpp/install/common/components.py
+++ b/cpp/install/common/components.py
@@ -290,7 +290,7 @@ class FileSpecWorker:
# 'convert to dos file format' name patterns. (These are
# regex patterns, not patterns for filename globbing).
#
- textFiles = [".*README.*", ".*Makefile.mak", ".*LICENSE.*"]
+ textFiles = [".*README.*", ".*Makefile.mak", ".*LICENSE.*", "RELEASE_NOTES.txt"]
textFileScanner = None
expression = ""
for p in textFiles:
diff --git a/cpp/install/common/components/berkeleydb.runtime b/cpp/install/common/components/berkeleydb.runtime
index 6a34ba79cd2..f4c69bb1830 100755
--- a/cpp/install/common/components/berkeleydb.runtime
+++ b/cpp/install/common/components/berkeleydb.runtime
@@ -1,6 +1,7 @@
f,build_windows/Release/db_archive.exe
f,build_windows/Release/db_checkpoint.exe
f,build_windows/Release/db_deadlock.exe
+f,build_windows/Release/db_hotbackup.exe
f,build_windows/Release/db_dump.exe
f,build_windows/Release/db_load.exe
f,build_windows/Release/db_printlog.exe
@@ -8,5 +9,4 @@ f,build_windows/Release/db_recover.exe
f,build_windows/Release/db_stat.exe
f,build_windows/Release/db_upgrade.exe
f,build_windows/Release/db_verify.exe
-f,build_windows/Release/db_hotbackup.exe
f,build_windows/Release/libdb%(dbver)s.dll
diff --git a/cpp/install/common/components/bzip2.runtime b/cpp/install/common/components/bzip2.runtime
index c6544d82d29..9ff40946cbb 100755
--- a/cpp/install/common/components/bzip2.runtime
+++ b/cpp/install/common/components/bzip2.runtime
@@ -1 +1,2 @@
bzip2.dll
+libbz2.dll
diff --git a/cpp/install/common/components/components.ini b/cpp/install/common/components/components.ini
index fb27060d322..226b8a99320 100755
--- a/cpp/install/common/components/components.ini
+++ b/cpp/install/common/components/components.ini
@@ -47,7 +47,7 @@ microsoft-runtime=microsoft runtime
packages-common=ice packages common
[ice common]
-elements=4
+elements=5
active=1
source1=%(INSTALL_TOOLS)s/common
filelist1=installer.data
@@ -63,6 +63,9 @@ source4=%(INSTALL_TOOLS)s/common/docs/%(target)s
filelist4=generated.installer.docs
dest4=doc
processor4=fixVersion
+source5=%(BUILD_DIR)s/install
+filelist5=relnotes
+dest5=doc
[ice packages common]
elements=3
@@ -242,6 +245,9 @@ dest1=bin
source2=%(BUILD_DIR)s/debug/IceCS-%(version)s/certs
filelist2=ice.dotnet.certs
dest2=certs
+#
+# Patch updates will require policy assemblies.
+#
#filelist3=ice.dotnet.ssl
#source3=%(BUILD_DIR)s/debug/IceCS-%(version)s/bin
#filetemplate3=policy.3.2.%(name)s.dll
diff --git a/cpp/install/common/components/ice.demo.vc60 b/cpp/install/common/components/ice.demo.vc60
index 4c9bb28a2a7..6b2a491ef29 100755
--- a/cpp/install/common/components/ice.demo.vc60
+++ b/cpp/install/common/components/ice.demo.vc60
@@ -16,6 +16,4 @@ exclude=**/Makefile.*
exclude=**/*Makefile*
exclude=**/Debug/**
exclude=**/Release/**
-exclude=Freeze/backup/**
exclude=Database/**
-
diff --git a/cpp/install/common/components/ice.demo.vc71 b/cpp/install/common/components/ice.demo.vc71
index c67f668131c..cabc970a6f6 100755
--- a/cpp/install/common/components/ice.demo.vc71
+++ b/cpp/install/common/components/ice.demo.vc71
@@ -15,7 +15,6 @@ exclude=**/*.dummy
exclude=**/*Makefile*
exclude=**/Debug/**
exclude=**/Release/**
-exclude=Freeze/backup/**
exclude=**/*.dll
exclude=**/*.obj
exclude=**/*.vcproj.*
diff --git a/cpp/install/common/components/ice.demo.vc80 b/cpp/install/common/components/ice.demo.vc80
index ff9447e9754..78d883fb9a1 100755
--- a/cpp/install/common/components/ice.demo.vc80
+++ b/cpp/install/common/components/ice.demo.vc80
@@ -18,4 +18,3 @@ exclude=**/*.vcproj.*
exclude=**/*Makefile*
exclude=**/Debug/**
exclude=**/Release/**
-exclude=Freeze/backup/**
diff --git a/cpp/install/common/components/ice.demo.vc80_x64 b/cpp/install/common/components/ice.demo.vc80_x64
index 9f96bc09cb1..6f6670d57db 100755
--- a/cpp/install/common/components/ice.demo.vc80_x64
+++ b/cpp/install/common/components/ice.demo.vc80_x64
@@ -18,5 +18,4 @@ exclude=**/*.vcproj.*
exclude=**/*Makefile*
exclude=**/Debug/**
exclude=**/Release/**
-exclude=Freeze/backup/**
exclude=Database/**
diff --git a/cpp/install/common/components/ice.dotnet.assemblies b/cpp/install/common/components/ice.dotnet.assemblies
index 71379d0e6f7..c20c8c4fa53 100755
--- a/cpp/install/common/components/ice.dotnet.assemblies
+++ b/cpp/install/common/components/ice.dotnet.assemblies
@@ -5,3 +5,17 @@ icegridcs.dll
icepatch2cs.dll
icestormcs.dll
iceboxnet.exe
+#policy.3.2.glacier2cs
+#policy.3.2.glacier2cs.dll
+#policy.3.2.iceboxcs
+#policy.3.2.iceboxcs.dll
+#policy.3.2.icecs
+#policy.3.2.icecs.dll
+#policy.3.2.icegridcs
+#policy.3.2.icegridcs.dll
+#policy.3.2.icepatch2cs
+#policy.3.2.icepatch2cs.dll
+#policy.3.2.icesslcs
+#policy.3.2.icesslcs.dll
+#policy.3.2.icestormcs
+#policy.3.2.icestormcs.dll
diff --git a/cpp/install/common/components/ice.ruby.ruby b/cpp/install/common/components/ice.ruby.ruby
index 9b5f1dd95a7..033fcb1ee21 100755
--- a/cpp/install/common/components/ice.ruby.ruby
+++ b/cpp/install/common/components/ice.ruby.ruby
@@ -22,7 +22,6 @@ Ice/Locator.rb
Ice/LocatorF.rb
Ice/Logger.rb
Ice/LoggerF.rb
-Ice/ObjectAdapter.rb
Ice/ObjectAdapterF.rb
Ice/ObjectFactory.rb
Ice/ObjectFactoryF.rb
@@ -34,8 +33,6 @@ Ice/Properties.rb
Ice/PropertiesF.rb
Ice/Router.rb
Ice/RouterF.rb
-Ice/ServantLocator.rb
-Ice/ServantLocatorF.rb
Ice/SliceChecksumDict.rb
Ice/Stats.rb
Ice/StatsF.rb
diff --git a/cpp/install/common/components/relnotes b/cpp/install/common/components/relnotes
new file mode 100644
index 00000000000..4a76e355b4f
--- /dev/null
+++ b/cpp/install/common/components/relnotes
@@ -0,0 +1 @@
+RELEASE_NOTES.txt \ No newline at end of file
diff --git a/cpp/install/common/iceproject.xml b/cpp/install/common/iceproject.xml
deleted file mode 100644
index e6dc792ffb5..00000000000
--- a/cpp/install/common/iceproject.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
- **********************************************************************
-
- Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
-
- This copy of Ice is licensed to you under the terms described in the
- ICE_LICENSE file included in this distribution.
-
- **********************************************************************
--->
-
- <property environment="env"/>
-
- <!-- Check presence of Ice installtion in ICE_HOME -->
-
- <condition property="checkinstall" value="true">
- <and>
- <available file="${env.ICE_HOME}/slice" />
- </and>
- </condition>
-
- <fail message="Unable to detect a valid Ice installation. Please set ICE_HOME!" unless="installtype" />
-
- <target name="config-init">
- <property name="lib.dir" value="${env.ICE_HOME}/lib" />
- <property name="slice.dir" value="${env.ICE_HOME}/slice"/>
- <taskdef name="slice2java" classpath="${env.ICE_HOME}/ant" classname="Slice2JavaTask"/>
- <taskdef name="slice2freezej" classpath="${env.ICE_HOME}/ant" classname="Slice2FreezeJTask" />
-
- <!-- Ice classpath -->
- <path id="ice.classpath">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- </path>
- </target>
-
- <property file="${top.dir}/config/build.properties"/>
diff --git a/cpp/install/common/makewindist.py b/cpp/install/common/makewindist.py
index 8b31fe23d88..cd32d011b11 100755
--- a/cpp/install/common/makewindist.py
+++ b/cpp/install/common/makewindist.py
@@ -97,64 +97,35 @@ def environmentCheck(target):
logging.error("Invalid environment. Please consult error log and repair environment/command line settings.")
sys.exit(2)
-def maxVersion(a, b):
- """Compares to version strings. The version strings should be trimmed of leading and trailing whitespace."""
- if a == b:
- return a
-
- avalues = a.split('.')
- bvalues = b.split('.')
-
- diff = len(avalues) - len(bvalues)
- if not diff == 0:
- if diff < 0:
- for f in range(0, abs(diff)):
- avalues.append('0')
- else:
- for f in range(0, abs(diff)):
- bvalues.append('0')
-
- for i in range(0, len(avalues)):
- if int(avalues[i]) > int(bvalues[i]):
- return a
- elif int(avalues[i]) < int(bvalues[i]):
- return b
-
- return a
-
-def testMaxVersion():
- # Case format first, second, expected.
- cases = [ ("1.0", "1.0.0", "1.0"), ("0.0", "0.1", "0.1"), ("2.1.0", "2.0.1", "2.1.0"),
- ("2.1", "2.0.1", "2.1"), ("2.1.9", "2.1.12", "2.1.12")]
- for a, b, expected in cases:
- result = maxVersion(a, b)
- if not expected == result:
- print "Expected %s from %s and %s, got %s" % (expected, a, b, result)
- assert(False)
- print "testMaxVersion() succeeded"
-
-def checkSources(sourceDir):
- """Scans a directory for source distributions. The version is keyed on the Ice for C++ distribution."""
-
- icezip = glob.glob(os.path.join(sourceDir, "Ice-*.zip"))
- if len(icezip) == 0:
- msg = "Source directory %s does not contain a zip archive for any version of Ice for C++" % sourceDir
- logging.error(msg)
- raise DistEnvironmentError(msg)
-
- keyVersion = '0.0.0'
- exp = re.compile("Ice-([0-9.b]*).*.zip")
- current = None
- for d in icezip:
- m = exp.match(os.path.split(d)[1])
- if m == None:
- print icezip
- current = m.group(1)
- keyVersion = maxVersion(keyVersion, current)
+def getIceVersion(file):
+ """Extract the ICE version string from a file."""
+ config = open(file, 'r')
+ return re.search('ICE_STRING_VERSION \"([0-9\.b]*)\"', config.read()).group(1)
+
+def checkSources(buildDir, sourceDir):
+ """Scans a directory for source distributions."""
+
+ if not os.path.exists(os.path.join(sourceDir, "distfiles.tar.gz")):
+ print "Unable to locate distfiles.tar.gz"
+ sys.exit(1)
+
+ installFiles = os.path.join(buildDir, "install")
+ if not os.path.exists(installFiles):
+ os.mkdir(os.path.join(buildDir, "install"))
+ result = os.system("gzip -dc " + os.path.join(os.path.join(sourceDir, "distfiles.tar.gz")) + " | tar xf - -C " +
+ installFiles)
+ if result != 0:
+ print "Unable to extract distfile.tar.gz"
+ sys.exit(1)
+
+ #
+ # Get current Ice version from Config.h in distfiles.
+ #
+ keyVersion = getIceVersion(os.path.join(installFiles, "Config.h"))
print keyVersion
+ global DistPrefixes
prefixes = list(DistPrefixes)
- prefixes.remove("Ice-%s")
for prefix in prefixes:
pkg = prefix % keyVersion + ".zip"
if not os.path.exists(os.path.join(sourceDir, pkg)):
@@ -704,7 +675,7 @@ def main():
logging.debug(environToString(os.environ))
- sourcesVersion = checkSources(os.environ['SOURCES'])
+ sourcesVersion = checkSources(buildDir, os.environ['SOURCES'])
defaults = os.environ
defaults['dbver'] = '45'
@@ -754,7 +725,10 @@ libraries."""
# Screw clean rules, run the ultimate clean!
#
if clean:
- shutil.rmtree(buildDir)
+ if os.path.exists(os.path.join(buildDir, "debug")):
+ shutil.rmtree(os.path.join(buildDir, "debug"))
+ if os.path.exists(os.path.join(buildDir, "release")):
+ shutil.rmtree(os.path.join(buildDir, "release"))
if not os.path.exists(buildDir):
os.mkdir(buildDir)
diff --git a/cpp/makebindist.py b/cpp/makebindist.py
index e76f54741d8..d780c89e655 100755
--- a/cpp/makebindist.py
+++ b/cpp/makebindist.py
@@ -58,25 +58,6 @@ class ExtProgramError:
def __str__(self):
return repr(self.msg)
-def gitarchive(archiveArgs = [], haltOnError = True):
- '''git is a little different because the main command that we need,
- `git archive', needs to be run from an actual repository.
- Fortunately we most likely have one if we are running this script!
- To run the archive, we need to cd into the directory where
- makebindist.py resides and run the command while extracting the
- results into the current directory'''
- cwd = os.getcwd()
- global repoDir
- os.chdir(repoDir)
- cmdString = "git archive "
- for a in archiveArgs:
- cmdString = cmdString + " " + a
- if getPlatform() == 'solaris':
- runprog(cmdString + " | (cd %s && gtar xf -)" % cwd)
- else:
- runprog(cmdString + " | (cd %s && tar xf -)" % cwd)
- os.chdir(cwd)
-
def runprog(commandstring, haltOnError = True):
#commandtuple = commandstring.split()
#result = os.spawnvpe(os.P_WAIT, commandtuple[0], commandtuple, os.environ)
@@ -143,6 +124,11 @@ def getPlatformString():
return 'rhel-i386'
else:
return 'sles-i586'
+ elif getPlatform() == "solaris":
+ if readcommand("uname -p") == "i386":
+ return "solaris-x86"
+ else:
+ return "solaris-sparc"
else:
return getPlatform()
@@ -162,20 +148,14 @@ def getMakeRulesSuffix():
else:
return None
-def getVersion(cvsTag, buildDir):
+def getVersion(buildDir):
"""Extracts a source file from the repository and gets the version number from it"""
cwd = os.getcwd()
- os.chdir(buildDir)
if getPlatform() == 'aix':
os.environ['LIBPATH'] = ''
- gitarchive(["--prefix=cpp/", cvsTag, "include/IceUtil/Config.h"])
-
- result = [ getIceVersion('cpp/include/IceUtil/Config.h'), \
- getIceSoVersion('cpp/include/IceUtil/Config.h'), \
- getIceMMVersion('cpp/include/IceUtil/Config.h') ]
+ configFile = os.path.join(buildDir, "install", "Config.h")
+ result = [ getIceVersion(configFile), getIceSoVersion(configFile), getIceMMVersion(configFile) ]
- os.remove('cpp/include/IceUtil/Config.h')
- os.removedirs('cpp/include/IceUtil')
os.chdir(cwd)
return result
@@ -188,25 +168,24 @@ def fixVersion(filename, version, mmVersion):
print l
f.close()
-def getInstallFiles(cvsTag, buildDir, version, mmVersion):
+def fixInstallFiles(buildDir, version, mmVersion):
"""Gets the install sources for this revision"""
cwd = os.getcwd()
try:
os.chdir(buildDir)
- runprog('rm -rf ' + os.path.join(buildDir, "ice", "install"))
- gitarchive(['--prefix="cpp/"', cvsTag, "install"])
- fixVersion('cpp/install/common/README.DEMOS', version, mmVersion)
- snapshot = os.walk('./cpp/install/unix')
+ fixVersion('install/common/README.DEMOS', version, mmVersion)
+ snapshot = os.walk('./install/unix')
for dirInfo in snapshot:
for f in dirInfo[2]:
fixVersion(os.path.join(dirInfo[0], f), version, mmVersion)
finally:
os.chdir(cwd)
- return os.path.join(buildDir, "cpp", "install")
+ return os.path.join(buildDir, "install")
-def getInstallFilesFromLocalDirectory(cvsTag, buildDir, version, mmVersion):
- '''Gets the install files from an existing CVS directory, has the
- advantage of working even if CVS is down allowing the install-O to
+# XXX- I don't think this is needed any longer.
+def getInstallFilesFromLocalDirectory(buildDir, version, mmVersion):
+ '''Gets the install files from an existing repository, has the
+ advantage of working even if repository is down allowing the install-O to
continue working!'''
cwd = os.getcwd()
try:
@@ -234,26 +213,6 @@ def readcommand(cmd):
pipe_stdout.close()
return lines[0].strip()
-def collectSourceDistributions(tag, sourceDir, cvsdir, distro):
- '''
- The location for the source distributions is not supplied so we are
- going to assume we are being called from a CVS tree and we are going
- to go get them ourselves
- '''
- cwd = os.getcwd()
- os.chdir(cwd + "/../" + cvsdir)
- if len(tag) > 0:
- print 'Making disribution ' + cvsdir + ' with tag ' + tag
-
- #
- # The sources collected by the makebindist.py script are *NOT*
- # suitable for release as they do not all contain the documentation.
- #
- runprog("./makedist.py " + tag)
-
- shutil.copy("dist/" + distro + ".tar.gz", sourceDir)
- os.chdir(cwd)
-
def editMakeRulesCS(filename, version):
'''
The make rules in the C# distribution need some simple tweaking to
@@ -610,12 +569,31 @@ def extractDemos(sources, buildDir, version, distro, demoDir):
def archiveDemoTree(buildDir, version, installFiles):
cwd = os.getcwd()
- os.chdir(os.path.join(buildDir, 'Ice-%s-demos' % version))
- filesToRemove = ['certs/makecerts.py', 'certs/ImportKey.java', 'certs/ImportKey.class', 'certs/seed.dat',
- 'config/convertssl.py', 'config/upgradeicegrid.py', 'config/upgradeicestorm.py',
- 'config/icegrid-slice.3.1.ice.gz', 'config/PropertyNames.def', 'config/makeprops.py',
- 'config/Makefile', 'config/Makefile.mak', 'config/TestUtil.py', 'config/IceGridAdmin.py',
- 'config/ice_ca.cnf', 'config/icegridgui.pro']
+ os.chdir(os.path.join(buildDir, "Ice-%s-demos" % version))
+ filesToRemove = [
+ "certs/makecerts.py",
+ "certs/ImportKey.java",
+ "certs/ImportKey.class",
+ "certs/seed.dat",
+ "config/convertssl.py",
+ "config/upgradeicegrid.py",
+ "config/upgradeicestorm.py",
+ "config/icegrid-slice.3.1.ice.gz",
+ "config/PropertyNames.def",
+ "config/makeprops.py",
+ "config/Makefile",
+ "config/Makefile.mak",
+ "config/TestUtil.py",
+ "config/IceGridAdmin.py",
+ "config/ice_ca.cnf",
+ "config/findSliceFiles.py",
+ "config/IcecsKey.snk",
+ "config/icegridnode.cfg",
+ "config/icegridregistry.cfg",
+ "config/makeconfig.py",
+ "config/makedepend.py",
+ "config/makegitignore.py",
+ "config/icegridgui.pro"]
obliterate(filesToRemove)
os.chdir(buildDir)
@@ -659,9 +637,7 @@ def makeInstall(sources, buildDir, installDir, distro, clean, version, mmVersion
if not os.path.exists(distro):
filename = os.path.join(sources, distro + '.tar')
- runprog('gzip -d %s.gz' % filename)
- runprog('tar xf %s' % filename)
- runprog('gzip -9 %s' % filename)
+ runprog('gzip -dc %s.gz | tar xf -' % filename)
os.chdir(distro)
@@ -700,19 +676,34 @@ def makeInstall(sources, buildDir, installDir, distro, clean, version, mmVersion
logging.info('PYTHON_HOME is not set, figuring it out and trying that')
pyHome = sys.exec_prefix
os.environ['PYTHON_HOME'] = pyHome
-
- if getPlatform() == 'macosx':
- make = "make"
- else:
- make = "gmake"
-
+
#
# XXX- Optimizations need to be turned on for the release.
#
+
try:
- runprog(make + ' NOGAC=yes OPTIMIZE=yes prefix=%s embedded_runpath_prefix=/opt/Ice-%s install' % (installDir, mmVersion))
+
+ buildCommand = "gmake NOGAC=yes OPTIMIZE=yes prefix=%s embedded_runpath_prefix=/opt/Ice-%s install" % \
+ (installDir, mmVersion)
+ if getPlatform() == "solaris":
+ os.chdir(buildDir)
+ srcdir = os.path.join(buildDir, distro + "-64")
+
+ if clean:
+ shutil.rmtree(srcdir, True)
+ if not os.path.exists(srcdir):
+ filename = os.path.join(sources, distro + '.tar')
+ runprog('gzip -dc %s.gz | tar xf -' % filename)
+ runprog("mv %s %s" % (distro, srcdir))
+
+ os.chdir(srcdir)
+ runprog("LP64=yes && export LP64 && " + buildCommand)
+ os.chdir(os.path.join(buildDir, distro))
+
+ runprog("LP64=no && export LP64 && " + buildCommand)
+
except ExtProgramError:
- print make + " failed for makeInstall(%s, %s, %s, %s, %s, %s, %s)" % (sources, buildDir, installDir, distro, str(clean), version, mmVersion)
+ print "gmake failed for makeInstall(%s, %s, %s, %s, %s, %s, %s)" % (sources, buildDir, installDir, distro, str(clean), version, mmVersion)
raise
runprog('rm -rf /opt/Ice-%s' % (mmVersion), False)
@@ -729,7 +720,12 @@ def makeInstall(sources, buildDir, installDir, distro, clean, version, mmVersion
for a in assemblies:
shutil.copy("bin/%s.dll" % a, "%s/bin/%s.dll" % (installDir, a))
+ if os.path.exists("bin/policy.%s.%s" % (mmVersion, a)):
+ shutil.copy("bin/policy.%s.%s" % (mmVersion, a), "%s/bin/policy.%s.%s" % (installDir, mmVersion, a))
+ shutil.copy("bin/policy.%s.%s.dll" % (mmVersion, a),
+ "%s/bin/policy.%s.%s.dll" % (installDir, mmVersion, a))
shutil.copy("lib/pkgconfig/%s.pc" % a, "%s/lib/pkgconfig" % installDir)
+
os.chdir(cwd)
@@ -766,7 +762,11 @@ def getDBfiles(dbLocation):
findCmd = ''
if getPlatform() == 'solaris':
- findCmd = 'find lib -name "*' + getPlatformLibExtension() + '" -type f -maxdepth 1'
+ #
+ # Removed the maxdepth limiter to pick up the 64 bit versions of the libraries.
+ #
+ findCmd = 'find lib -name "*' + getPlatformLibExtension() + '" -type f'
+
elif getPlatform() == 'macosx':
findCmd = 'find lib \( -name "*' + getPlatformLibExtension() + '" -or -name "*jnilib" \) -type f '
else:
@@ -879,13 +879,10 @@ def usage():
print ' the host and use this option to reference their'
print ' location.'
print '-v, --verbose Print verbose processing messages.'
- print '-t, --tag Specify the CVS version tag for the packages.'
print '--noclean Do not clean up current sources where'
print ' applicable (some bits will still be cleaned.'
print '--nobuild Run through the process but don\'t build'
print ' anything new.'
- print '--userepos Use contents of existing CVS directories'
- print ' to create binary package.'
print
print 'The following options set the locations for third party libraries'
print 'that may be required on your platform. Alternatively, you can'
@@ -920,16 +917,14 @@ def main():
buildEnvironment = dict()
buildDir = None
installDir = None
- sources = None
+ sources = os.getcwd()
installRoot = None
- cvsTag = 'HEAD'
clean = True
build = True
version = None
mmVersion = None
soVersion = 0
verbose = False
- cvsMode = False # Use CVS directories.
offline = False
#
@@ -938,9 +933,9 @@ def main():
try:
optionList, args = getopt.getopt(sys.argv[1:], 'hvt:',
[ 'build-dir=', 'install-dir=', 'install-root=', 'sources=',
- 'verbose', 'tag=', 'noclean', 'nobuild',
+ 'verbose', 'noclean', 'nobuild',
'stlporthome=', 'bzip2home=', 'dbhome=', 'sslhome=',
- 'expathome=', 'readlinehome=', 'userepos', 'offline', 'debug'])
+ 'expathome=', 'readlinehome=', 'offline', 'debug'])
except getopt.GetoptError:
usage()
@@ -960,8 +955,6 @@ def main():
sys.exit()
elif o in ('-v', '--verbose'):
verbose = True
- elif o in ('-t', '--tag'):
- cvsTag = a
elif o == '--noclean':
clean = False
elif o == '--nobuild':
@@ -981,9 +974,25 @@ def main():
buildEnvironment['READLINE_HOME'] = a
elif o == '--offline':
offline = True
- elif o == '--userepos':
- cvsMode = True
+ if sources == None or not os.path.exists(sources):
+ print "You must specify a valid location for the source distributions"
+ sys.exit(1)
+
+ #
+ # Determine location of binary distribution-only files.
+ #
+ distfiles = None
+ trypaths = [ sources, os.getcwd() ]
+ for f in trypaths:
+ if os.path.exists(os.path.join(f, "distfiles.tar.gz")):
+ distfiles = os.path.join(f, "distfiles.tar.gz")
+ break
+
+ if distfiles == None:
+ print "Unable to find distfiles.tar.gz."
+ sys.exit(1)
+
if verbose:
logging.getLogger().setLevel(logging.DEBUG)
@@ -1011,10 +1020,7 @@ def main():
if buildDir == None:
print 'No build directory specified, defaulting to $HOME/tmp/icebuild'
buildDir = os.path.join(os.environ.get('HOME'), "tmp", "icebuild")
-
- if cvsMode:
- print 'Using CVS mode'
-
+
if installDir == None:
print 'No install directory specified, default to $HOME/tmp/iceinstall'
installDir = os.path.join(os.environ.get('HOME'), "tmp", "iceinstall")
@@ -1028,35 +1034,25 @@ def main():
if os.path.exists(installDir):
shutil.rmtree(installDir, True)
- #
- # In CVS mode we are relying on the checked out CVS sources *are*
- # the build sources.
- #
- if cvsMode:
- directories = []
- else:
- directories = [buildDir, os.path.join(buildDir, "sources"), os.path.join(buildDir, "demotree")]
-
- directories.append(installDir)
+ directories = [buildDir, os.path.join(buildDir, "sources"), os.path.join(buildDir, "demotree"),
+ os.path.join(buildDir, "install"), installDir]
for d in directories:
initDirectory(d)
#
- # Determine location of binary distribution-only files.
+ # Unpack and update distribution files.
#
+ # TODO: The updates performed here should be performed by the makedist script.
+ #
installFiles = None
- configFile = os.path.join("include", "IceUtil", "Config.h")
+ os.system("gzip -dc " + distfiles + " | tar xf - -C " + os.path.join(buildDir, "install"))
+ configFile = os.path.join(buildDir, "install", "Config.h")
version = getIceVersion(configFile)
soVersion = getIceSoVersion(configFile)
mmVersion = getIceMMVersion(configFile)
- if cvsMode:
- installFiles = 'install'
- elif offline:
- installFiles = getInstallFilesFromLocalDirectory(cvsTag, buildDir, version, mmVersion)
- else:
- version, soVersion, mmVersion = getVersion(cvsTag, buildDir)
- installFiles = getInstallFiles(cvsTag, buildDir, version, mmVersion)
+ version, soVersion, mmVersion = getVersion(buildDir)
+ installFiles = fixInstallFiles(buildDir, version, mmVersion)
if verbose:
print 'Building binary distributions for Ice-' + version + ' on ' + getPlatformString()
@@ -1064,25 +1060,14 @@ def main():
print 'Using install directory: ' + installDir
print
+ #
+ # These last build directories will have to wait until we've got
+ # the version number for the distribution.
+ #
+ shutil.rmtree(buildDir + '/Ice-' + version + '-demos', True)
+ initDirectory(buildDir + '/Ice-' + version + '-demos/config')
- if not cvsMode:
- #
- # These last build directories will have to wait until we've got
- # the version number for the distribution.
- #
- shutil.rmtree(buildDir + '/Ice-' + version + '-demos', True)
- initDirectory(buildDir + '/Ice-' + version + '-demos/config')
-
- if build and not cvsMode:
- collectSources = False
- if sources == None:
- if not getPlatform().startswith("linux"):
- print "makedist.py is not supported on non-Linux platforms. Create the source"
- print "distributions on a Linux box, copy them to a location on this host and"
- print "specify their location with the --sources argument"
- sources = buildDir + '/sources'
- collectSources = clean
-
+ if build:
#
# Ice must be first or building the other source distributions will fail.
#
@@ -1111,24 +1096,6 @@ def main():
os.environ['PATH'] = os.path.join(buildDir, "Ice-" + version, "bin") + os.pathsep + os.environ['PATH']
#
- # Collect all of the distributions first. This prevents having
- # to go through costly builds before finding out that one of the
- # distributions doesn't build.
- #
- if collectSources:
- toCollect = list(sourceTarBalls)
- toCollect.append(('vb', 'IceVB-' + version, 'vb'))
- for cvs, tarball, demoDir in toCollect:
- collectSourceDistributions(cvsTag, sources, cvs, tarball)
-
- print '''
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
->> <<
->> Sources have been collected! <<
->> <<
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'''
-
- #
# Package up demo distribution.
#
if getPlatform() != 'hpux' and getPlatform() != 'solaris' and getPlatform() != 'macosx':
@@ -1159,51 +1126,17 @@ def main():
shutil.rmtree("IceJ-%s-java5" % version)
os.chdir(prevDir)
- elif cvsMode:
- collectSources = False
-
- #
- # TODO: Sanity check to make sure that the script is being run
- # from a location that it expects.
- #
- cvsDirs = [ 'cpp', 'java', 'php' ]
- if getPlatform() == 'linux':
- cvsDirs.append('cs', 'py', 'rb')
-
- os.environ['ICE_HOME'] = os.getcwd()
- currentLibraryPath = None
- try:
- currentLibraryPath = os.environ[dylibEnvironmentVar]
- except KeyError:
- currentLibraryPath = ''
-
- os.environ[dylibEnvironmentVar] = installDir + '/Ice-' + version + '/lib:' + currentLibraryPath
- os.environ['PATH'] = installDir + '/Ice-' + version + '/bin:' + os.environ['PATH']
-
- for d in cvsDirs:
- currentDir = os.getcwd()
- os.chdir('../' + d)
- print 'Going to directory ' + d
- if d == 'java':
- shutil.copy('lib/Ice.jar', installDir +'/Ice-' + version + '/lib')
- shutil.copy('lib/IceGridGUI.jar', installDir +'/Ice-' + version + '/lib')
- runprog('cp -pR ant ' + installDir + '/Ice-' + version)
- initDirectory(os.path.join(installDir, 'help'))
- runprog('cp -pR resources/IceGridAdmin ' + installDir + '/Ice-' + version + '/help')
- runprog('find ' + installDir + '/Ice-' + version + ' -name "*.java" | xargs rm')
- else:
- runprog('gmake prefix=' + installDir + '/Ice-' + version + ' install')
- os.chdir(currentDir)
-
#
# Sources should have already been built and installed. We
# can pick the binaries up from the iceinstall directory.
#
+ # TODO: What is this used for?
+ #
binaries = glob.glob(installDir + '/Ice-' + version + '/bin/*')
binaries.extend(glob.glob(installDir + '/Ice-' + version + '/lib/*' + shlibExtensions(version, soVersion)[0]))
+
cwd = os.getcwd()
os.chdir(installDir)
-
#
# Get third party libraries.
@@ -1238,6 +1171,12 @@ def main():
platform = 'RHEL'
else:
platform = 'SLES'
+ elif platform == "SunOS":
+ cpu = readcommand("uname -p")
+ if cpu == "i386":
+ platform = platform + ".x86"
+ else:
+ platform = platform + ".SPARC"
cf = os.path.join(installFiles, 'unix', psf + '.' + platform)
if os.path.exists(cf):
shutil.copy(cf, os.path.join('Ice-' + version, psf))
@@ -1259,6 +1198,9 @@ def main():
if getPlatform() == 'macosx':
fixInstallNames(version, mmVersion)
+ shutil.copyfile(os.path.join(buildDir, "install", "RELEASE_NOTES.txt"),
+ os.path.join(installDir, "Ice-%s" % version, "RELEASE_NOTES.txt"))
+
runprog('tar cf Ice-' + version + '-bin-' + getPlatformString() + '.tar Ice-' + version)
runprog('gzip -9 Ice-' + version + '-bin-' + getPlatformString() + '.tar')
os.chdir(cwd)
diff --git a/cpp/makedist.py b/cpp/makedist.py
index d0bdc5ae3ef..532927cf90b 100755
--- a/cpp/makedist.py
+++ b/cpp/makedist.py
@@ -14,13 +14,11 @@ import os, sys, shutil, fnmatch, re, glob
# Program usage.
#
def usage():
- print "Usage: " + sys.argv[0] + " [options] [tag]"
+ print "Usage: " + sys.argv[0] + " [options]"
print
print "Options:"
print "-h Show this message."
print "-v Be verbose."
- print
- print "If no tag is specified, HEAD is used."
#
# Find files matching a pattern.
@@ -195,7 +193,6 @@ def fixVersion(files, version, mmversion):
#
# Check arguments
#
-tag = "HEAD"
verbose = 0
for x in sys.argv[1:]:
if x == "-h":
@@ -208,9 +205,11 @@ for x in sys.argv[1:]:
print
usage()
sys.exit(1)
- else:
- tag = x
+if os.path.exists("../.git"):
+ print "ERROR: Unable to run in repository! Exiting..."
+ sys.exit(1)
+
#
# Remove any existing "dist" directory and create a new one.
#
@@ -218,77 +217,117 @@ distdir = "dist"
if os.path.exists(distdir):
shutil.rmtree(distdir)
os.mkdir(distdir)
-os.mkdir(os.path.join(distdir, "ice"))
-#
-# Export sources from git.
-#
-print "Checking out " + tag + "..."
if verbose:
- quiet = "-v"
+ quiet = "v"
else:
quiet = ""
-os.system("git archive " + quiet + " " + tag + " . | (cd dist/ice && tar xf -)")
-
-os.chdir(distdir)
#
# Get Ice version.
#
-config = open(os.path.join("ice", "include", "IceUtil", "Config.h"), "r")
+config = open(os.path.join("include", "IceUtil", "Config.h"), "r")
version = re.search("ICE_STRING_VERSION \"([0-9\.b]*)\"", config.read()).group(1)
mmversion = re.search("([0-9]+\.[0-9b]+)[\.0-9]*", version).group(1)
-print "Fixing version in various files..."
-fixVersion(find("ice", "README*"), version, mmversion)
-fixVersion(find("ice", "INSTALL*"), version, mmversion)
-fixVersion(find("ice/config", "glacier2router.cfg"), version, mmversion)
-fixVersion(find("ice/config", "icegridregistry.cfg"), version, mmversion)
-fixVersion(find("ice/install/rpm", "*.conf"), version, mmversion)
-
print "Creating Ice-rpmbuild..."
-rpmbuildver = "Ice-rpmbuild-" + version
-if verbose:
- quiet = "v"
-else:
- quiet = ""
-os.system("tar c" + quiet + "f " + rpmbuildver + ".tar " +
- "-C ice/install -C rpm {icegridregistry,icegridnode,glacier2router}.{conf,suse,redhat} README.RPM " +
- "-C ../unix THIRD_PARTY_LICENSE.Linux README.Linux-RPM SOURCES.Linux " +
- "-C ../thirdparty/php ice.ini")
-os.system("gzip -9 " + rpmbuildver + ".tar")
+rpmbuildver = os.path.join("dist", "Ice-rpmbuild-" + version)
+fixVersion(find(os.path.join("install", "rpm"), "icegridregistry.*"), version, mmversion)
+fixVersion(find(os.path.join("install", "rpm"), "icegridnode.*"), version, mmversion)
+fixVersion(find(os.path.join("install", "rpm"), "glacier2router.*"), version, mmversion)
+fixVersion(find(os.path.join("install", "rpm"), "README.RPM"), version, mmversion)
+fixVersion(find(os.path.join("install", "unix"), "THIRD_PARTY_LICENSE.Linux"), version, mmversion)
+fixVersion(find(os.path.join("install", "unix"), "README.Linux-RPM"), version, mmversion)
+fixVersion(find(os.path.join("install", "unix"), "SOURCES.Linux"), version, mmversion)
+
+if os.system("tar c" + quiet + "f " + rpmbuildver + ".tar " +
+ "-C .. `[ -e RELEASE_NOTES.txt ] && echo ""RELEASE_NOTES.txt""` " +
+ "-C cpp/install -C rpm {icegridregistry,icegridnode,glacier2router}.{conf,suse,redhat} README.RPM " +
+ "-C ../unix THIRD_PARTY_LICENSE.Linux README.Linux-RPM SOURCES.Linux " +
+ "-C ../thirdparty/php ice.ini"):
+ print >> sys.stderr, "ERROR: Archiving failed"
+ sys.exit(1)
+
+if os.system("gzip -9 " + rpmbuildver + ".tar"):
+ print >> sys.stderr, "ERROR: Archiving failed"
+ sys.exit(1)
+
#
-# Remove files.
+# Create archives.
#
-print "Removing unnecessary files..."
+print "Creating distribution..."
+icever = "Ice-" + version
+
+print "Creating exclusion file..."
filesToRemove = [ \
- os.path.join("ice", "makedist.py"), \
- os.path.join("ice", "makebindist.py"), \
- os.path.join("ice", "iceemakedist.py"), \
- os.path.join("ice", "RPMTools.py"), \
- os.path.join("ice", "fixCopyright.py"), \
- os.path.join("ice", "fixVersion.py"), \
- os.path.join("ice", "icee.dsw"), \
- os.path.join("ice", "icee.dsp"), \
- os.path.join("ice", "src", "icecpp", "icecppe.dsp"), \
- os.path.join("ice", "src", "IceUtil", "iceutile.dsp"), \
- os.path.join("ice", "src", "Slice", "slicee.dsp"), \
+ "makedist.py", \
+ "makebindist.py", \
+ "iceemakedist.py", \
+ "RPMTools.py", \
+ "fixCopyright.py", \
+ "fixVersion.py", \
+ "icee.dsw", \
+ "icee.dsp", \
+ "allDemos.py", \
+ os.path.join("config", "makegitignore.py"), \
+ os.path.join("src", "icecpp", "icecppe.dsp"), \
+ os.path.join("src", "IceUtil", "iceutile.dsp"), \
+ os.path.join("src", "Slice", "slicee.dsp"), \
+ "dist", \
+ "install", \
+ os.path.join("src", "slice2cppe"), \
+ os.path.join("src", "slice2javae"), \
+ os.path.join("exclusions")
]
-filesToRemove.extend(find("ice", ".gitignore"))
+
+filesToRemove.extend(find(".", ".gitignore"))
+filesToRemove.extend(find(".", "expect.py"))
+
+exclusionFile = open("exclusions", "w")
for x in filesToRemove:
- if os.path.exists(x):
- os.remove(x)
-shutil.rmtree(os.path.join("ice", "install"))
-shutil.rmtree(os.path.join("ice", "src", "slice2cppe"))
-shutil.rmtree(os.path.join("ice", "src", "slice2javae"))
+ exclusionFile.write("%s\n" % x)
+exclusionFile.close()
+os.mkdir(os.path.join("dist", icever))
+if os.system("tar c" + quiet + " -X exclusions . | ( cd " + os.path.join("dist", icever) + " && tar xf - )"):
+ print >> sys.stderr, "ERROR: demo script archive caused errors"
+ sys.exit(1)
+os.remove("exclusions")
+os.chdir("dist")
+
+if os.system("chmod -R u+rw,go+r-w %s " % icever):
+ print >> sys.stderr, "ERROR: unable to set directory permissions"
+ sys.exit(1)
+
+#
+# Printing warnings here instead of exiting because these probably
+# are not errors per-se but may reflect an unnecessary operation.
+#
+if os.system("find %s \\( -name \"*.h\" -or -name \"*.cpp\" -or -name \"*.ice\" \\) -exec chmod a-x {} \\;" % icever):
+ print >> sys.stderr, "WARNING: find returned non-zero result"
+if os.system("find %s \\( -name \"README*\" -or -name \"INSTALL*\" \\) -exec chmod a-x {} \\;" % icever):
+ print >> sys.stderr, "WARNING: find returned non-zero result"
+if os.system("find %s \\( -name \"*.xml\" -or -name \"*.mc\" \\) -exec chmod a-x {} \\;" % icever):
+ print >> sys.stderr, "WARNING: find returned non-zero result"
+if os.system("find %s \\( -name \"Makefile\" -or -name \"*.dsp\" \\) -exec chmod a-x {} \\;" % icever):
+ print >> sys.stderr, "WARNING: find returned non-zero result"
+if os.system("find %s -type d -exec chmod a+x {} \\;" % icever):
+ print >> sys.stderr, "WARNING: find returned non-zero result"
+if os.system("find %s -perm +111 -exec chmod a+x {} \\;" % icever):
+ print >> sys.stderr, "WARNING: find returned non-zero result"
+
+print "Fixing version in various files..."
+fixVersion(find(icever, "README*"), version, mmversion)
+fixVersion(find(icever, "INSTALL*"), version, mmversion)
+fixVersion(find(os.path.join(icever, "config"), "glacier2router.cfg"), version, mmversion)
+fixVersion(find(os.path.join(icever, "config"), "icegridregistry.cfg"), version, mmversion)
#
# Generate bison files.
#
print "Generating bison files..."
cwd = os.getcwd()
-grammars = find("ice", "*.y")
+grammars = find(icever, "*.y")
for x in grammars:
#
# Change to the directory containing the file.
@@ -303,10 +342,13 @@ for x in grammars:
quiet = ""
else:
quiet = "-s"
+ result = 0
if file == "cexp.y":
- os.system("gmake " + quiet + " cexp.c")
+ result = os.system("gmake " + quiet + " cexp.c")
else:
- os.system("gmake " + quiet + " " + base + ".cpp")
+ result = os.system("gmake " + quiet + " " + base + ".cpp")
+ if result:
+ print
#
# Edit the Makefile to comment out the grammar rules.
#
@@ -324,7 +366,7 @@ for x in grammars:
# Generate flex files.
#
print "Generating flex files..."
-scanners = find("ice", "*.l")
+scanners = find(icever, "*.l")
for x in scanners:
#
# Change to the directory containing the file.
@@ -339,7 +381,9 @@ for x in scanners:
quiet = ""
else:
quiet = "-s"
- os.system("gmake " + quiet + " " + base + ".cpp")
+ if os.system("gmake " + quiet + " " + base + ".cpp"):
+ print>>sys.stderr, "Generating flex files failed."
+ sys.exit(1)
#
# Edit the Makefile to comment out the flex rules.
#
@@ -353,37 +397,34 @@ for x in scanners:
fixProject(p, file)
os.chdir(cwd)
+if verbose:
+ quiet = "v"
+else:
+ quiet = ""
+
#
# Comment out the implicit parser and scanner rules in
# config/Make.rules.
#
print "Fixing makefiles..."
-fixMakeRules(os.path.join("ice", "config", "Make.rules"))
+fixMakeRules(os.path.join(icever, "config", "Make.rules"))
+
+if os.system("tar c" + quiet + "f %s.tar %s" % (icever, icever)):
+ print>>sys.stderr, "ERROR: tar command failed"
+ sys.exit(1)
+
+if os.system("gzip -9 " + icever + ".tar"):
+ print>>sys.stderr, "ERROR: gzip command failed"
+ sys.exit(1)
-#
-# Create archives.
-#
-print "Creating distribution..."
-icever = "Ice-" + version
-os.rename("ice", icever)
-if verbose:
- quiet = "v"
-else:
- quiet = ""
-os.system("chmod -R u+rw,go+r-w . " + icever)
-os.system("find " + icever + " \\( -name \"*.h\" -or -name \"*.cpp\" -or -name \"*.ice\" \\) -exec chmod a-x {} \\;")
-os.system("find " + icever + " \\( -name \"README*\" -or -name \"INSTALL*\" \\) -exec chmod a-x {} \\;")
-os.system("find " + icever + " \\( -name \"*.xml\" -or -name \"*.mc\" \\) -exec chmod a-x {} \\;")
-os.system("find " + icever + " \\( -name \"Makefile\" -or -name \"*.dsp\" \\) -exec chmod a-x {} \\;")
-os.system("find " + icever + " -type d -exec chmod a+x {} \\;")
-os.system("find " + icever + " -perm +111 -exec chmod a+x {} \\;")
-os.system("tar c" + quiet + "f " + icever + ".tar " + icever)
-os.system("gzip -9 " + icever + ".tar")
if verbose:
quiet = ""
else:
quiet = "q"
-os.system("zip -9r" + quiet + " " + icever + ".zip " + icever)
+
+if os.system("zip -9r" + quiet + " " + icever + ".zip " + icever):
+ print>>sys.stderr, "ERROR: zip command failed"
+ sys.exit(1)
#
# Copy CHANGES