Author: wade
Date: 2006-06-21 21:07:20 -0400 (Wed, 21 Jun 2006)
New Revision: 61925
Modified:
trunk/release/monobuild/scheduler-daemon.py
trunk/release/monobuild/tarball-builder-daemon.py
trunk/release/packaging/build
trunk/release/packaging/defs/gtk-sharp
trunk/release/packaging/defs/gtk-sharp-2.0
trunk/release/packaging/defs/gtk-sharp-2.8
trunk/release/packaging/defs/mono-1.1.13
trunk/release/packaging/defs/mono-1.1.7
trunk/release/packaging/defs/mono-1.1.8
trunk/release/packaging/do-msvn-tar
trunk/release/packaging/do-zip-build
trunk/release/packaging/mktarball
trunk/release/pyutils/datastore.py
trunk/release/pyutils/packaging.py
trunk/release/pyutils/utils.py
trunk/release/website/mk-sources-index.py
trunk/release/windows-installer/buildwindows-installer
Log:
defs:
-added/implemented version_selection_reg for aliased and branched files
-reorganize some gtk-sharp and reduce some redundancies
build/install-deps/mktarball/do-zip-build:
-copy all def alias files over
do-msvn-tar:
-get commands from alias files if they are there and execute directly, don't
use any temp files
-set environment with python instead of bash
windows-installer:
-strip binaries in installer instead of as part of build
monobuild:
-add 1.1.7 and 1.1.8 to schedulers/tarball-creators
website/mk-sources-index.py:
-use internal version selection in packaging class and def file instead of
hardcoding gtk-sharp versions in
(required update to utils.get_latest_ver, which was pass in an optional reg by
which versions much mastch)
pyutils/packaging.py:
-more alias work (fixes and features)
-implement version_selection_reg
pyutils/datastore.py:
-use list instead of string and search each for aliases
Modified: trunk/release/monobuild/scheduler-daemon.py
===================================================================
--- trunk/release/monobuild/scheduler-daemon.py 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/monobuild/scheduler-daemon.py 2006-06-22 01:07:20 UTC (rev
61925)
@@ -34,7 +34,7 @@
# Some of these platforms take much longer, and one platform shouldn't hold
them all up
latest_build_distros = [ 'sles-9-x86_64', 'macos-10-ppc', 'redhat-9-i386',
'win-4-i386', 'sunos-8-sparc', 'sles-9-ia64', 'sles-9-s390', 'sles-9-s390x' ]
-latest_build_packages = [ 'mono', 'mono-1.1.13', 'libgdiplus' ]
+latest_build_packages = [ 'mono', 'mono-1.1.13', 'mono-1.1.8', 'mono-1.1.7',
'libgdiplus' ]
# regex to grab version out of filename
# This only follows standards by autotools for now...
Modified: trunk/release/monobuild/tarball-builder-daemon.py
===================================================================
--- trunk/release/monobuild/tarball-builder-daemon.py 2006-06-22 00:03:12 UTC
(rev 61924)
+++ trunk/release/monobuild/tarball-builder-daemon.py 2006-06-22 01:07:20 UTC
(rev 61925)
@@ -25,7 +25,7 @@
# static list of packages to create tarballs for
# What packages should these be?
-packages = ['mono', 'mono-1.1.13', 'libgdiplus']
+packages = ['mono', 'mono-1.1.13', 'mono-1.1.7', 'mono-1.1.8', 'libgdiplus']
src_repo = src_repo_utils.svn(config.MONO_ROOT)
distfiles = datastore.source_file_repo()
Modified: trunk/release/packaging/build
===================================================================
--- trunk/release/packaging/build 2006-06-22 00:03:12 UTC (rev 61924)
+++ trunk/release/packaging/build 2006-06-22 01:07:20 UTC (rev 61925)
@@ -148,8 +148,8 @@
# Update step: Add link to mktarball log
# Check for package aliases
repo = datastore.source_file_repo()
-alias = package.get_info_var('def_alias')
-logfile = repo.get_log_file(source_file, package_name_alias=alias)
+aliases = package.get_aliases()
+logfile = repo.get_log_file(source_file, package_name_aliases=aliases)
if logfile:
# Create symbolic link to tarball in 'files' dir
@@ -206,8 +206,8 @@
if build_env.get_info_var('USE_ZIP_PKG'):
# do-zip-build deps...
files_to_copy += '../pyutils/config.py ../pyutils/utils.py
../pyutils/sshutils.py ../pyutils/packaging.py
../pyutils/shell_parse.py'.split()
- if alias:
- files_to_copy += ['defs/' + alias]
+ for f in aliases:
+ files_to_copy += ['defs/' + f]
files_to_copy += ['do-zip-build', 'conf/' + distro,
'../conf/%s/*.patch' % package_name, 'defs/%s' % package_name ]
build_command = '%s/do-zip-build %s %s %s %s' % (build_location,
revision, package_name, distro, version)
remote_src_dir = "%s/scratch/%s" % (build_location, build_dir)
Modified: trunk/release/packaging/defs/gtk-sharp
===================================================================
--- trunk/release/packaging/defs/gtk-sharp 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/defs/gtk-sharp 2006-06-22 01:07:20 UTC (rev
61925)
@@ -1,5 +1,7 @@
web_index=5
+version_selection_reg="1\.0\.\d+"
+
BUILD_HOSTS=(
fedora-3-i386
fedora-4-i386
Modified: trunk/release/packaging/defs/gtk-sharp-2.0
===================================================================
--- trunk/release/packaging/defs/gtk-sharp-2.0 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/defs/gtk-sharp-2.0 2006-06-22 01:07:20 UTC (rev
61925)
@@ -1,5 +1,9 @@
web_index=6
+def_alias="gtk-sharp"
+
+version_selection_reg="2\.4\.\d+"
+
BUILD_HOSTS=(
fedora-3-i386
fedora-4-i386
@@ -9,6 +13,7 @@
suse-92-i586
suse-93-i586
suse-93-x86_64
+ win-4-i386
)
USE_HOSTS=([EMAIL PROTECTED])
@@ -57,4 +62,89 @@
make dist
}
+win_4_i386_ZIP_BUILD () {
+ # Make sure it's not dependent on cygwin
+ # Fixed at least in 2.8.2
+ #export CC="gcc -mno-cygwin"
+ CSC=`cygpath -d /cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322`
+ CSC=`cygpath -a $CSC`
+
+ # Add MS SDK to path for ilasm and ildasm
+ SDK=`cygpath -d "/cygdrive/c/Program Files/Microsoft.NET/SDK/v1.1/Bin"`
+ SDK=`cygpath -a $SDK`
+ export PATH=$SDK:$CSC:$PATH
+
+ # Since we're using MS compiler, fake like mono's not installed
+ mkdir -p /tmp/backup
+ mv /tmp/build_deps/lib/pkgconfig/mono.pc /tmp/backup
+
+ # Build fails on gnome-vfs tests, don't build those
+ # Actually, do sed below for sample/Makefile
+ #mv /tmp/build_deps/lib/pkgconfig/gnome-vfs-* /tmp/backup/
+
+ # TODO: Paco used to alter configure.in to change the dep on libart to
2.3.14
+ # Something like this:
+ # Paco said people were using rsvg-sharp compiled in this manner with
no problems... should probably investigate this
+ # Don't need this anymore since we have something newer than 2.3.16
+ #sed -i "s/2.3.16/2.3.14/" configure
+
+ # Patch configure to check for gtkhtml, even if gnome# isn't enabled
+ #if test "x$enable_gnome" = "xyes"; then
+ #if test "xyes" = "xyes"; then
+ # Can't do this... gtkhtml depends on gnome
+
+ ./configure --prefix=/tmp/install
+
+ # let's just skip the gnomevfs sample instead of disabling gnome-vfs
+ # Unnecessary in 2.8.1... doh, still another problem: Mono.GetOptions
isn't on mssdk
+ sed -i "s/gnomevfs valtest/valtest/" sample/Makefile
+
+ # Don't have cyg in dll files
+ # Not needed (in 2.8.2 at least)
+ #sed -i "s/\/cyg\//\/\//" libtool
+
+ # Clean up the MS gac of gtk-sharp
+ rm -Rf /cygdrive/c/WINDOWS/ASSEMBLY/GAC/*-sharp
+
+ make || exit 1
+ make install || exit 1
+
+ # Install the samples
+ mkdir -p /tmp/install/samples/gtk-sharp-2.0
+ cp -Rf sample/* /tmp/install/samples/gtk-sharp-2.0
+
+ # Move files out of MS gac and install them into the /tmp/install's gac
+ #mkdir -p /tmp/install/lib/mono/gac
+ #mv /cygdrive/c/WINDOWS/ASSEMBLY/GAC/*-sharp /tmp/install/lib/mono/gac
+
+ # Move them to a temp dir...
+ rm -Rf /tmp/temp_install
+ mkdir -p /tmp/temp_install
+ mv /cygdrive/c/WINDOWS/ASSEMBLY/GAC/*-sharp /tmp/temp_install
+
+ # TODO: Should I be using mono's gacutil instead to install these
files? yes!
+
+ # Do some path manipulation so that "." is removed from the path. This
allows execdir to work
+ OLD_PATH=$PATH
+ export
PATH=/tmp/build_deps/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
+ find /tmp/temp_install -name "*.dll" -execdir
/tmp/build_deps/bin/gacutil /i {} /f /package gtk-sharp-2.0 /gacdir `cygpath -m
/tmp/install/lib` \;
+ export PATH=$OLD_PATH
+
+ # Remove some uneeded files
+ # exit on the first failure, usually means windows find was used
instead of cygwin's find
+ find /tmp/install -name "*\.a" | xargs rm -f || exit 1
+ find /tmp/install -name "*\.la" | xargs rm -f
+ find /tmp/install -name "__*\.ini" | xargs rm -f
+
+ ## Don't have to worry about removing the .config files because this
is built with ms sdk. Once we build with mono we'll have to remove them
+ ## We need to make sure we keep the policy .config files (but not the
normal .config files)
+ # The 2.8.2 build doesn't install .config files for non-policy
assemblies... this should never be needed
+ #find /tmp/install -name "*\.config" | xargs rm -f
+
+ # Windows convention to have .dll files in the bin dir instead of lib
+ mv /tmp/install/lib/*.dll /tmp/install/bin
+
+}
+
+
Modified: trunk/release/packaging/defs/gtk-sharp-2.8
===================================================================
--- trunk/release/packaging/defs/gtk-sharp-2.8 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/defs/gtk-sharp-2.8 2006-06-22 01:07:20 UTC (rev
61925)
@@ -1,5 +1,7 @@
web_index=7
+def_alias="gtk-sharp-2.0"
+
BUILD_HOSTS=(
fedora-5-i386
fedora-5-x86_64
@@ -46,167 +48,3 @@
make dist
}
-
-win_4_i386_ZIP_DEPS=(
-
-
http://primates.ximian.com/~wberrier/windows-installer/win32_deps/libxml2-2.6.20-1-mono.win32.zip
-
- # for libxml2 and other image deps
-
http://internap.dl.sourceforge.net/sourceforge/gnuwin32/zlib-1.2.3-bin.zip
-
http://internap.dl.sourceforge.net/sourceforge/gnuwin32/zlib-1.2.3-lib.zip
-
- # For some extra dll's (art-sharp, glade-sharp, rsvg-sharp)
- #http://www.gimp.org/~tml/gimp/win32/libart_lgpl-2.3.14.zip
- #http://www.gimp.org/~tml/gimp/win32/libart_lgpl-dev-2.3.14.zip
-
- http://www.gimp.org/~tml/gimp/win32/librsvg-2.4.0.zip
- http://www.gimp.org/~tml/gimp/win32/librsvg-dev-2.4.0.zip
- http://www.gimp.org/~tml/gimp/win32/libgsf-1.8.2-20040121.zip
- http://www.gimp.org/~tml/gimp/win32/libgsf-dev-1.8.2.zip
-
-
http://easynews.dl.sourceforge.net/sourceforge/gladewin32/libglade-2.4.0-dev.zip
-
http://easynews.dl.sourceforge.net/sourceforge/gladewin32/libglade-2.4.0-bin.zip
-
- # gtk 2.8 / gnome 2.12
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/atk-1.10.3.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/atk-dev-1.10.3.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/gtk+-2.8.11.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/gtk+-dev-2.8.11.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/pango-1.10.2.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/pango-dev-1.10.2.zip
-
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/dependencies/cairo-1.0.2.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/dependencies/cairo-dev-1.0.2.zip
-
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/GConf-dev-2.12.1-20050910.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/GConf-2.12.1-20050910-1.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/ORBit2-2.13.2.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/ORBit2-dev-2.13.2.zip
-
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libart_lgpl-2.3.17.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libart_lgpl-dev-2.3.17.zip
-
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libgnomecanvas-2.12.0.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libgnomecanvas-dev-2.12.0.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libgnomeui-2.12.0.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libgnomeui-dev-2.12.0.zip
-
-
#http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libglade-2.5.1-20060104.zip
-
#http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libglade-dev-2.5.1-20060104.zip
-
- # libgnomeprintui
-
http://ftp.gnome.org/pub/GNOME/desktop/2.12/2.12.2/win32/libgnomeprintui-2.12.1.zip
-
http://ftp.gnome.org/pub/GNOME/desktop/2.12/2.12.2/win32/libgnomeprintui-dev-2.12.1.zip
-
http://ftp.gnome.org/pub/gnome/desktop/2.12/2.12.2/win32/libgnomeprint-2.12.1.zip
-
http://ftp.gnome.org/pub/gnome/desktop/2.12/2.12.2/win32/libgnomeprint-dev-2.12.1.zip
-
- # gtkhtml
-
http://ftp.gnome.org/pub/GNOME/desktop/2.12/2.12.2/win32/gtkhtml-3.9.90.zip
-
http://ftp.gnome.org/pub/GNOME/desktop/2.12/2.12.2/win32/gtkhtml-dev-3.9.90.zip
-
- # libgnome
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libgnome-2.12.0.1-20050929.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libgnome-dev-2.12.0.1-20050929.zip
-
- # gda and gnomedb? we don't ship them with anything else...
-
- # libbonobo and bonoboui? Not sure yet... gdk, vfs, bonobo
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libbonobo-2.10.1-20051220.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libbonobo-dev-2.10.1-20051220.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libbonoboui-2.10.1.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/libbonoboui-dev-2.10.1.zip
-
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/gnome-vfs-2.12.2.pre-tml-20051126.zip
-
http://ftp.gnome.org/pub/GNOME/platform/2.12/2.12.2/win32/gnome-vfs-dev-2.12.2.pre-tml-20051126.zip
-
-
http://ftp.gnome.org/pub/gnome/platform/2.12/2.12.2/win32/dependencies/popt-1.10.2-tml-20050828.zip
-
http://ftp.gnome.org/pub/gnome/platform/2.12/2.12.2/win32/dependencies/popt-dev-1.10.2-tml-20050828.zip
-
-
-)
-
-win_4_i386_ZIP_BUILD () {
- # Make sure it's not dependent on cygwin
- # Fixed at least in 2.8.2
- #export CC="gcc -mno-cygwin"
-
- CSC=`cygpath -d /cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322`
- CSC=`cygpath -a $CSC`
-
- # Add MS SDK to path for ilasm and ildasm
- SDK=`cygpath -d "/cygdrive/c/Program Files/Microsoft.NET/SDK/v1.1/Bin"`
- SDK=`cygpath -a $SDK`
- export PATH=$SDK:$CSC:$PATH
-
- # Since we're using MS compiler, fake like mono's not installed
- mkdir -p /tmp/backup
- mv /tmp/build_deps/lib/pkgconfig/mono.pc /tmp/backup
-
- # Build fails on gnome-vfs tests, don't build those
- # Actually, do sed below for sample/Makefile
- #mv /tmp/build_deps/lib/pkgconfig/gnome-vfs-* /tmp/backup/
-
- # TODO: Paco used to alter configure.in to change the dep on libart to
2.3.14
- # Something like this:
- # Paco said people were using rsvg-sharp compiled in this manner with
no problems... should probably investigate this
- # Don't need this anymore since we have something newer than 2.3.16
- #sed -i "s/2.3.16/2.3.14/" configure
-
- # Patch configure to check for gtkhtml, even if gnome# isn't enabled
- #if test "x$enable_gnome" = "xyes"; then
- #if test "xyes" = "xyes"; then
- # Can't do this... gtkhtml depends on gnome
-
- ./configure --prefix=/tmp/install
-
- # let's just skip the gnomevfs sample instead of disabling gnome-vfs
- # Unnecessary in 2.8.1... doh, still another problem: Mono.GetOptions
isn't on mssdk
- sed -i "s/gnomevfs valtest/valtest/" sample/Makefile
-
- # Don't have cyg in dll files
- # Not needed (in 2.8.2 at least)
- #sed -i "s/\/cyg\//\/\//" libtool
-
- # Clean up the MS gac of gtk-sharp
- rm -Rf /cygdrive/c/WINDOWS/ASSEMBLY/GAC/*-sharp
-
- make || exit 1
- make install || exit 1
-
- # Install the samples
- mkdir -p /tmp/install/samples/gtk-sharp-2.0
- cp -Rf sample/* /tmp/install/samples/gtk-sharp-2.0
-
- # Move files out of MS gac and install them into the /tmp/install's gac
- #mkdir -p /tmp/install/lib/mono/gac
- #mv /cygdrive/c/WINDOWS/ASSEMBLY/GAC/*-sharp /tmp/install/lib/mono/gac
-
- # Move them to a temp dir...
- rm -Rf /tmp/temp_install
- mkdir -p /tmp/temp_install
- mv /cygdrive/c/WINDOWS/ASSEMBLY/GAC/*-sharp /tmp/temp_install
-
- # TODO: Should I be using mono's gacutil instead to install these
files? yes!
-
- # Do some path manipulation so that "." is removed from the path. This
allows execdir to work
- OLD_PATH=$PATH
- export
PATH=/tmp/build_deps/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
- find /tmp/temp_install -name "*.dll" -execdir
/tmp/build_deps/bin/gacutil /i {} /f /package gtk-sharp-2.0 /gacdir `cygpath -m
/tmp/install/lib` \;
- export PATH=$OLD_PATH
-
- # Remove some uneeded files
- # exit on the first failure, usually means windows find was used
instead of cygwin's find
- find /tmp/install -name "*\.a" | xargs rm -f || exit 1
- find /tmp/install -name "*\.la" | xargs rm -f
- find /tmp/install -name "__*\.ini" | xargs rm -f
-
- ## Don't have to worry about removing the .config files because this
is built with ms sdk. Once we build with mono we'll have to remove them
- ## We need to make sure we keep the policy .config files (but not the
normal .config files)
- # The 2.8.2 build doesn't install .config files for non-policy
assemblies... this should never be needed
- #find /tmp/install -name "*\.config" | xargs rm -f
-
- # Windows convention to have .dll files in the bin dir instead of lib
- mv /tmp/install/lib/*.dll /tmp/install/bin
-
-}
-
Modified: trunk/release/packaging/defs/mono-1.1.13
===================================================================
--- trunk/release/packaging/defs/mono-1.1.13 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/defs/mono-1.1.13 2006-06-22 01:07:20 UTC (rev
61925)
@@ -1,7 +1,7 @@
web_index=1
def_alias="mono"
-bundle="1.1.13"
+version_selection_reg="1\.1\.13\.\d+"
BUILD_HOSTS=(
redhat-9-i386
Modified: trunk/release/packaging/defs/mono-1.1.7
===================================================================
--- trunk/release/packaging/defs/mono-1.1.7 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/defs/mono-1.1.7 2006-06-22 01:07:20 UTC (rev
61925)
@@ -1,7 +1,7 @@
web_index=2
def_alias="mono"
-bundle="1.1.7"
+version_selection_reg="1\.1\.7\.\d+"
BUILD_HOSTS=(
redhat-9-i386
Modified: trunk/release/packaging/defs/mono-1.1.8
===================================================================
--- trunk/release/packaging/defs/mono-1.1.8 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/defs/mono-1.1.8 2006-06-22 01:07:20 UTC (rev
61925)
@@ -1,6 +1,7 @@
web_index=3
def_alias="mono"
+version_selection_reg="1\.1\.8\.\d+"
BUILD_HOSTS=(
redhat-9-i386
@@ -21,14 +22,12 @@
suse-93-x86_64
)
+# 1.1.7 for now... (until we have a 1.1.8)
MONO_DEPS=(
-# mono-1.1.7
+ #mono-1.1.8
+ mono-1.1.7
)
-get_destroot () {
- DEST_ROOT=$ARCH
-}
-
HEAD_PATH=(
branches/mono-1-1-8/mono
branches/mono-1-1-8/mcs
@@ -38,13 +37,3 @@
tags/mono-[[version]]/mcs
)
-make_dist () {
- . /etc/profile
- ./autogen.sh
- if [ $HEAD_or_RELEASE == "HEAD" ] ; then
- make dist-zip MCS=mcs RESGEN=resgen
- else
- make dist MCS=mcs RESGEN=resgen
- fi
-}
-
Modified: trunk/release/packaging/do-msvn-tar
===================================================================
--- trunk/release/packaging/do-msvn-tar 2006-06-22 00:03:12 UTC (rev 61924)
+++ trunk/release/packaging/do-msvn-tar 2006-06-22 01:07:20 UTC (rev 61925)
@@ -16,7 +16,6 @@
package = sys.argv[2]
version = sys.argv[3]
-
os.chdir('/tmp')
dummy_env = ""
@@ -49,10 +48,7 @@
svn_paths[i] = svn_paths[i].replace('[[versiondot]]',
version_dot)
svn_paths[i] = svn_paths[i].replace('[[version]]',
version_hyphen)
- # TODO where to handle gtk-sharp?
-
-
# use the key in /usr/share/ximian-build-system/conf/ssh
# This needs to be exported to the environment
SVN_SSH = "/usr/bin/bb_ssh"
@@ -69,7 +65,13 @@
print "SVN_PATHS: %s" % SVN_PATHS
print "VERSION: %s" % VERSION
-env_string = 'export SVN_SSH="%s"; export SVNEXPORT="%s"; export
MONO_ROOT="%s"; export HEAD_or_RELEASE="%s"; export SVN_PATHS="%s"; export
VERSION="%s"' % (SVN_SSH, SVNEXPORT, MONO_ROOT, HEAD_or_RELEASE, SVN_PATHS,
VERSION)
+# set env
+os.environ['SVN_SSH'] = SVN_SSH
+os.environ['SVNEXPORT'] = SVNEXPORT
+os.environ['MONO_ROOT'] = MONO_ROOT
+os.environ['HEAD_or_RELEASE'] = HEAD_or_RELEASE
+os.environ['SVN_PATHS'] = SVN_PATHS
+os.environ['VERSION'] = VERSION
# If they don't have any svn_paths, they MUST specify BUILD_DIR
if package_obj.info.has_key('BUILD_DIR'):
@@ -82,25 +84,23 @@
sys.exit(1)
# Maybe we'll eventually use python code in the def file someday...
-default_script = """
-update_version_file () {
+update_version_file = package_obj.get_info_var('update_version_file')
+if not update_version_file:
+ update_version_file = """
sed -i "s/\(AM_INIT_AUTOMAKE.*\\))/\\1.$VERSION)/" configure.in
-}
+"""
-make_dist () {
+make_dist = package_obj.get_info_var('make_dist')
+if not make_dist:
+ make_dist = """
# profile is needed on suse systems with gnome in /opt
. /etc/profile
./autogen.sh
make dist
-}
"""
+get_source = package_obj.get_info_var('get_source')
-shell_script = tempfile.mktemp()
-fd = open(shell_script, 'w')
-fd.write(default_script)
-fd.close()
-
# pwd: /tmp/tarball-creation
### Execute the source creating functions ###
@@ -110,11 +110,9 @@
os.system("rm -Rf /tmp/bb_ssh*")
# get_source
-if package_obj.info.has_key('get_source'):
- script = def_file
- command = '%s; . %s ; get_source' % (env_string, script)
- print "Command: %s" % command
- os.system(command)
+if get_source:
+ print "Command: %s" % get_source
+ os.system(get_source)
else:
cache_dir = "/tmp/src_cache/%s/%s" % (package, HEAD_or_RELEASE)
for path in svn_paths:
@@ -123,7 +121,7 @@
# Do we have a working copy already?
if os.path.exists("%s/%s" % (cache_dir, module)):
# svn switch (will update update if the path in the
working copy hasn't changed, this ensures have the right path)
- command = '%s; cd %s/%s; svn switch %s %s/%s' %
(env_string, cache_dir, module, rev_arg, MONO_ROOT, path)
+ command = 'cd %s/%s; svn switch %s %s/%s' % (cache_dir,
module, rev_arg, MONO_ROOT, path)
print "Executing: " + command
if os.system(command):
print "*** Error *** updating cached copy
failed (this is usually because of a malformed url, ex: invalid version, or
bb_ssh failed)"
@@ -132,17 +130,17 @@
# create cache dir
if not os.path.exists(cache_dir):
distutils.dir_util.mkpath(cache_dir)
#check out working copy
- command = "%s; cd %s; svn checkout -q %s %s/%s" %
(env_string, cache_dir, rev_arg, MONO_ROOT, path)
+ command = "cd %s; svn checkout -q %s %s/%s" %
(cache_dir, rev_arg, MONO_ROOT, path)
print command
os.system(command)
# svn export from working copy
- #command = "%s; %s %s/%s" % (env_string, SVNEXPORT, MONO_ROOT,
path)
- #command = "%s; %s %s/%s" % (env_string, SVNEXPORT, cache_dir,
module)
+ #command = "%s %s/%s" % (SVNEXPORT, MONO_ROOT, path)
+ #command = "%s %s/%s" % (SVNEXPORT, cache_dir, module)
# Note: using -r rev with svn export from a local cache dir
will connect to the svn server... bad
- #command = "%s; svn export -q %s/%s" % (env_string, cache_dir,
module)
+ #command = "svn export -q %s/%s" % (cache_dir, module)
# svn export from a working dir pegs the processor at 99%!!
also bad... it also takes longer (3 minutes... ?)
# Use rsync instead? probably...
@@ -158,51 +156,28 @@
# update_version_file (If this is a snapshot build)
if HEAD_or_RELEASE == "HEAD":
- if package_obj.info.has_key('update_version_file'):
- script = def_file
- else:
- script = shell_script
- os.system('%s; . %s ; update_version_file' % (env_string, script) )
+ os.system(update_version_file )
# pwd: /tmp/tarball-creation/$build_dir
# make_dist
-if package_obj.info.has_key('make_dist'):
- script = def_file
-else:
- script = shell_script
-os.system('%s; . %s ; make_dist' % (env_string, script) )
+os.system(make_dist)
### End of source creating functions ###
-# clean up shell files
-os.unlink(shell_script)
-
-# TODO
-# Remove bb.ssh /tmp files?
-
### Finish moving things around
shutil.rmtree('/tmp/built-tarball')
os.mkdir('/tmp/built-tarball')
found_source_file = 0
+source_files = glob.glob('*.zip') + glob.glob('*.tar.gz') +
glob.glob('*.tar.bz2')
-# Move zip file
-source_file = glob.glob('*.zip')
-if len(source_file) == 1:
- os.rename(source_file[0], '/tmp/built-tarball/%s' % source_file[0])
+if len(source_files) == 1:
+ os.rename(source_files[0], '/tmp/built-tarball/%s' % source_files[0])
found_source_file = 1
print "print source filename..."
- print source_file[0]
+ print source_files[0]
-# Move tar file
-source_file = glob.glob('*.tar.gz')
-if len(source_file) == 1:
- os.rename(source_file[0], '/tmp/built-tarball/%s' % source_file[0])
- found_source_file = 1
- print "print source filename..."
- print source_file[0]
-
# Clean up
os.chdir('/tmp')
shutil.rmtree('tarball-creation')
Modified: trunk/release/packaging/do-zip-build
===================================================================
--- trunk/release/packaging/do-zip-build 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/packaging/do-zip-build 2006-06-22 01:07:20 UTC (rev
61925)
@@ -56,15 +56,12 @@
shell_code = pack_def.get_zip_build_commands()
# Move def file so it gets cleaned up, and also saved with successful build
-pack2_def_file = pack_def.get_info_var('def_alias')
-if pack2_def_file:
- pack2_def_file = '/tmp/' + pack2_def_file
- shutil.move(pack2_def_file, '..')
+for f in pack_def.get_aliases():
+ shutil.move('/tmp/' + f, '..')
-
-
# set version var, load up environment for deps, and execute build command
-build_command = "export version=%s; . /tmp/build_deps/env.sh ; %s" % (version,
shell_code)
+os.environ['version'] = version
+build_command = ". /tmp/build_deps/env.sh ; %s'" % shell_code
# TODO: For some reason the above exit isn't being called on failures
# (Still an issue... ?)
@@ -79,5 +76,8 @@
# Keep a copy of the "spec" file and distro conf file
shutil.copy('/tmp/scratch/' + package, '/tmp/builder/built-packages')
shutil.copy('/tmp/scratch/' + distro, '/tmp/builder/built-packages')
-if pack2_def_file: shutil.copy('/tmp/scratch/' +
os.path.basename(pack2_def_file), '/tmp/builder/built-packages')
+# Save alias files
+for f in pack_def.get_aliases():
+ shutil.copy('/tmp/scratch/' + f, '/tmp/builder/built-packages')
+
Modified: trunk/release/packaging/mktarball
===================================================================
--- trunk/release/packaging/mktarball 2006-06-22 00:03:12 UTC (rev 61924)
+++ trunk/release/packaging/mktarball 2006-06-22 01:07:20 UTC (rev 61925)
@@ -83,7 +83,10 @@
# Copy some files over and execute!
+# Also copy over def_alias files
files_to_copy = [ 'do-msvn-tar', 'defs/%s' % package] +
glob.glob('../pyutils/*.py')
+for f in package_obj.get_aliases():
+ files_to_copy += ['defs/' + f ]
env.ssh.copy_to(files_to_copy, '/tmp', mode='scp')
log_obj.log("Starting to build source dist...\n")
Modified: trunk/release/pyutils/datastore.py
===================================================================
--- trunk/release/pyutils/datastore.py 2006-06-22 00:03:12 UTC (rev 61924)
+++ trunk/release/pyutils/datastore.py 2006-06-22 01:07:20 UTC (rev 61925)
@@ -101,7 +101,7 @@
fd.write('%s=%s\n' % (key, self.info[key]))
fd.close()
- def get_log_file(self, source_file, package_name_alias=""):
+ def get_log_file(self, source_file, package_name_aliases=[]):
"""Find a key (mktarball parameters) based on a source
filename."""
self.load_info()
key = ""
@@ -111,12 +111,14 @@
source_file = os.sep.join(source_file.split(os.sep)[-2:])
# Also search the alias
- parts = source_file.split(os.sep)
- parts[0] = package_name_alias
- alias_source_file = os.sep.join(parts)
+ alias_source_files = []
+ for f in package_name_aliases:
+ parts = source_file.split(os.sep)
+ parts[0] = f
+ alias_source_files.append(os.sep.join(parts))
for k,v in self.info.iteritems():
- if v == source_file or (package_name_alias and v ==
alias_source_file):
+ if v == source_file or (package_name_aliases and
alias_source_files.count(v)):
key = k
break
Modified: trunk/release/pyutils/packaging.py
===================================================================
--- trunk/release/pyutils/packaging.py 2006-06-22 00:03:12 UTC (rev 61924)
+++ trunk/release/pyutils/packaging.py 2006-06-22 01:07:20 UTC (rev 61925)
@@ -172,11 +172,13 @@
self.info['USE_HOSTS'] = self.info['BUILD_HOSTS']
# Check alias package so we include any information from it
that we don't include in this package (reduces maintenance redundancy)
+ self.alias_pack_obj = ""
if self.get_info_var('def_alias'):
- self.alias_pack_obj =
packaging.package(self.package_env, self.get_info_var('def_alias'))
+ # TODO: pass all contructor vars to this new object?
+ self.alias_pack_obj =
packaging.package(self.package_env, self.get_info_var('def_alias'),
inside_jail=inside_jail)
for k, v in self.alias_pack_obj.info.iteritems():
# There's some type of data we don't want to
copy: def_alias to avoid recursive loops...
- if k != 'def_alias':
+ if k != 'def_alias' and k !=
'version_selection_reg':
# If we don't have the key, grab info
from alias def
if not self.info.has_key(k):
self.info[k] = v
@@ -372,7 +374,7 @@
if not self.version:
if not self.latest_version:
- self.latest_version =
utils.get_latest_ver(self.package_fullpath, fail_on_missing=fail_on_missing)
+ self.latest_version =
utils.get_latest_ver(self.package_fullpath, fail_on_missing=fail_on_missing,
version_reg=self.get_info_var('version_selection_reg'))
if self.bundle_obj.version_map_exists:
# Cases
@@ -391,7 +393,7 @@
# 3. If a package is listed as package="",
select the latest version
if self.version == "": self.version =
self.latest_version
- # 4. If version has a release of x-0, select x
(will have to do with selecting sources as well)
+ # 4. If version has a release of x-0, select x
elif
re.compile('([\d\.]*)-0').search(self.version):
# Weird comma is because groups()
returns tuples
self.version, =
re.compile('([\d\.]*)-0').search(self.version).groups(1)
@@ -408,11 +410,9 @@
return self.version
- def get_source_file(self, qualifier_reg=""):
+ def get_source_file(self):
if not self.source_filename:
- if qualifier_reg:
- reg = qualifier_reg
- elif self.bundle_obj.version_map_exists and
self.bundle_obj.version_map.has_key(self.name):
+ if self.bundle_obj.version_map_exists and
self.bundle_obj.version_map.has_key(self.name):
# Strip release version if it exists (so that a
bundle conf may have a release attached,
# but that it won't apply to the source)
ver_wo_rel, =
re.compile("(.*)-?").search(self.bundle_obj.version_map[self.name]).groups(1)
@@ -423,7 +423,8 @@
candidates = []
for file in os.listdir(self.source_fullpath):
- if reg.search(file):
+ # Also match against the version selection reg
for this pack def
+ if reg.search(file) and
re.compile(self.get_info_var('version_selection_reg')).search(file):
candidates.append(file)
self.source_filename = self.name + os.sep +
utils.version_sort(candidates).pop()
@@ -484,7 +485,17 @@
def get_info_var(self, key):
return utils.get_dict_var(key, self.info)
+ def get_aliases(self):
+ """Return all names of alises, recursively.
+ This was being done in the packaging scripts to copy stuff
over. Was put here for consolidation.
+ """
+ if self.alias_pack_obj:
+ return [ self.get_info_var('def_alias') ] +
self.alias_pack_obj.get_aliases()
+ else:
+ return []
+
+
class bundle:
def __init__(self, bundle_name=""):
"""Args: optional: bundle_name, pointing to a file in
packaging/bundles
Modified: trunk/release/pyutils/utils.py
===================================================================
--- trunk/release/pyutils/utils.py 2006-06-22 00:03:12 UTC (rev 61924)
+++ trunk/release/pyutils/utils.py 2006-06-22 01:07:20 UTC (rev 61925)
@@ -433,10 +433,14 @@
return exit_code, "".join(collected).rstrip()
-def get_latest_ver(dir, version="", fail_on_missing=True):
+def get_latest_ver(dir, version="", fail_on_missing=True, version_reg=""):
"""args: dir, and optional version.
- If version is specified, the latest release of that version will be
selected."""
+ If version is specified, the latest release of that version will be
selected.
+ version_reg: select version only based on files matching regular
expression,
+ but verion has high precedence than version_reg.
+ """
+
if os.path.exists(dir):
files = os.listdir(dir)
else:
@@ -444,6 +448,7 @@
sys.exit(1)
# If a version is specified, find latest release of that version
+ # and also take precedence over a version_reg
if version:
candidates = []
if os.path.exists(dir + os.sep + version):
@@ -459,6 +464,14 @@
print "utils.get_latest_ver: Could not find dir entry
for '%s/%s', exiting" % (dir, version)
sys.exit(1)
+ # Or if a version reg is specified, only select versions matching it
+ elif version_reg:
+ candidates = []
+ for file in files:
+ if re.compile(version_reg).search(file):
+ candidates.append(file)
+ files = candidates
+
if files:
latest_version = version_sort(files).pop()
else:
Modified: trunk/release/website/mk-sources-index.py
===================================================================
--- trunk/release/website/mk-sources-index.py 2006-06-22 00:03:12 UTC (rev
61924)
+++ trunk/release/website/mk-sources-index.py 2006-06-22 01:07:20 UTC (rev
61925)
@@ -42,11 +42,7 @@
tarballs = []
for pack in args:
pack_obj = packaging.package("", pack,
bundle_obj=bundle_conf, source_basepath=sources_dir)
- # TODO: move package specific out of of here and info
the bundle conf somehow
- if pack == "gtk-sharp-2.0":
-
tarballs.append(pack_obj.get_source_file(qualifier_reg=re.compile('gtk-sharp-2\.4\..*\.tar.gz')))
- else:
- tarballs.append(pack_obj.get_source_file())
+ tarballs.append(pack_obj.get_source_file())
print tarballs
Modified: trunk/release/windows-installer/buildwindows-installer
===================================================================
--- trunk/release/windows-installer/buildwindows-installer 2006-06-22
00:03:12 UTC (rev 61924)
+++ trunk/release/windows-installer/buildwindows-installer 2006-06-22
01:07:20 UTC (rev 61925)
@@ -606,6 +606,10 @@
print "Copying files to build client..."
installer_env.ssh.copy_to(["build", "Mono.iss", "setup-files"],
'/tmp/windows-installer', compress=1, mode='tar')
+# Strip binaries for each selection
+for sel in selections:
+ (code, output) = installer_env.ssh.execute('cd
/tmp/windows-installer/build/%s/bin; strip --strip-unneeded *.dll *.exe ; cd
../lib; strip --strip-unneeded *.a' % sel.name)
+
# Run installer on windows
(code, output) = installer_env.ssh.execute('export
PATH="$PATH:/cygdrive/c/PROGRA~1/INNOSE~1:C:\Program Files\Inno Setup5"; cd
/tmp/windows-installer; ISCC.exe Mono.iss')
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches