Author: wade
Date: 2006-06-09 20:21:06 -0400 (Fri, 09 Jun 2006)
New Revision: 61611

Added:
   trunk/release/packaging/get-range-revs
Modified:
   trunk/release/conf/mono/ximian-build.conf
   trunk/release/monobuild/scheduler-daemon.py
   trunk/release/monobuild/sync-daemon.py
   trunk/release/monobuild/tarball-builder-daemon.py
   trunk/release/packaging/build
   trunk/release/pyutils/datastore.py
Log:
packaging/build:
-add option to skip steps

conf/mono/ximian-build.conf:
-add new nunit files

scheduler-daemon.py/tarball-builder-daemon.py:
-add libgdiplus to automatically get built

pyutils/datastore.py:
-new method to lookup getball version based on rev, HEAD_or_RELEASE

packaging/get-range-revs:
-new script to get valid revs for a range of checkins for a certain component



Modified: trunk/release/conf/mono/ximian-build.conf
===================================================================
--- trunk/release/conf/mono/ximian-build.conf   2006-06-09 21:18:24 UTC (rev 
61610)
+++ trunk/release/conf/mono/ximian-build.conf   2006-06-10 00:21:06 UTC (rev 
61611)
@@ -994,10 +994,12 @@
          <i>[[usrprefix]]/lib/mono/1.0/nunit.core.dll</i> 
          <i>[[usrprefix]]/lib/mono/1.0/nunit.framework.dll</i> 
          <i>[[usrprefix]]/lib/mono/1.0/nunit.util.dll</i> 
+         <i>[[usrprefix]]/lib/mono/1.0/nunit.mocks.dll</i> 
 
          <i>[[usrprefix]]/lib/mono/gac/nunit.core</i> 
          <i>[[usrprefix]]/lib/mono/gac/nunit.framework</i> 
          <i>[[usrprefix]]/lib/mono/gac/nunit.util</i> 
+         <i>[[usrprefix]]/lib/mono/gac/nunit.mocks</i> 
          <i>[[usrlibdir]]/pkgconfig/mono-nunit.pc</i> 
        </files>
 

Modified: trunk/release/monobuild/scheduler-daemon.py
===================================================================
--- trunk/release/monobuild/scheduler-daemon.py 2006-06-09 21:18:24 UTC (rev 
61610)
+++ trunk/release/monobuild/scheduler-daemon.py 2006-06-10 00:21:06 UTC (rev 
61611)
@@ -3,7 +3,7 @@
 # Probably will only build HEAD packages for now...  No reason it couldn't 
build RELEASE... ?
 
 # TODO: Logging
-# TODO: Prioritize builds: Maybe there should be one thread per jail, and that 
thread chooses a tarball to build, and prioritizes.  That way, there are no 
wait times for startup (we'll only sleep when there are no tarballs available 
to build)
+# TODO: Prioritize builds: Maybe there should be one thread per jail, and that 
thread chooses a tarball to build, and prioritizes.  That way, there are no 
wait times for startup (we'll only sleep when there are no tarballs available 
to build) But, if we have jail multiplicity, the current design would be better
 # Possible TODO: For the slower build platforms, we could check to make sure 
the build succeeded on i386 before starting... ?
 
 import sys
@@ -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' ]
+latest_build_packages = [ 'mono', 'mono-1.1.13', 'libgdiplus' ]
 
 # regex to grab version out of filename
 # This only follows standards by autotools for now...

Modified: trunk/release/monobuild/sync-daemon.py
===================================================================
--- trunk/release/monobuild/sync-daemon.py      2006-06-09 21:18:24 UTC (rev 
61610)
+++ trunk/release/monobuild/sync-daemon.py      2006-06-10 00:21:06 UTC (rev 
61611)
@@ -12,13 +12,13 @@
 import build
 import utils
 
-# Use rsync to synchronize the last 10 builds
+# Use rsync to synchronize the last n builds
 
 # TODO: Run a later cronjob on mono.ximian.com that deletes all but the latest 
n builds (probably 10 or 20)
 
 # Target information
-host = '[EMAIL PROTECTED]'
-target_dir = '/root/builds'
+#host = '[EMAIL PROTECTED]'
+#target_dir = '/root/builds'
 
 # Testing
 host = '[EMAIL PROTECTED]'
@@ -38,7 +38,7 @@
                        for component in os.listdir(config.build_info_dir + 
os.sep + i + os.sep + distro):
                                # Get the last 'num_builds' number of elements 
from the list
                                versions = build.get_versions(i, distro, 
component)[-num_builds:]
-                               for j in versions[:num_builds]:
+                               for j in versions:
                                        dirs.append(os.path.join(i, distro, 
component, j))
 
 
@@ -46,11 +46,12 @@
 
        #  For some reason the --delete option crashes when running the second 
time to go-mono.com and mono.ximian.com ... ?
        # rsync all files over, and don't include the builds... just logs and 
info.xml
-       status, output = utils.launch_process('rsync -avzR -e ssh --copy-links  
--exclude=files %s %s:%s' % (" ".join(dirs), host, target_dir))
+       status, output = utils.launch_process('rsync -avzR -e ssh --copy-links 
--exclude=files %s %s:%s' % (" ".join(dirs), host, target_dir))
 
 
 while(1):
        print " *** Syncing ***"
        sync_dirs()
+       print " *** Sleeping ***"
        time.sleep(10)
 

Modified: trunk/release/monobuild/tarball-builder-daemon.py
===================================================================
--- trunk/release/monobuild/tarball-builder-daemon.py   2006-06-09 21:18:24 UTC 
(rev 61610)
+++ trunk/release/monobuild/tarball-builder-daemon.py   2006-06-10 00:21:06 UTC 
(rev 61611)
@@ -7,8 +7,6 @@
 import signal
 import threading
 
-import pdb
-
 sys.path += [ '../pyutils' ]
 
 import packaging
@@ -24,20 +22,10 @@
 max_poll_interval = 5
 #max_poll_interval = 1
 
-# TODO: catch sig quit to allow finishing of last mktarball
-
-
-# Create tarballs starting from this point
-#  Raise or lower this number as we go along...
-#starting_rev = 57790
-#starting_rev = 58100
-starting_rev = 58700
-
 # static list of packages to create tarballs for
 # What packages should these be?
-packages = ['mono', 'mono-1.1.13']
+packages = ['mono', 'mono-1.1.13', 'libgdiplus']
 
-
 src_repo = src_repo_utils.svn(config.MONO_ROOT)
 distfiles = datastore.source_file_repo()
 
@@ -47,6 +35,7 @@
 for pack in packages:
        pack_objs[pack] = packaging.package("", pack)
 
+#starting_rev = 61097
 
 class mktarball_loop(threading.Thread):
 
@@ -63,7 +52,7 @@
                        latest_tree_rev = src_repo.latest_tree_revision()
                        log.log("Latest tree rev: %d\n" % latest_tree_rev)
 
-                       # Only do for the last couple of commits, rather than 
constantly updating above number
+                       # Only do for the last couple of commits, rather than 
constantly updating a base revision
                        starting_rev = latest_tree_rev - 10
 
 
@@ -105,7 +94,7 @@
 
 
 # Signal handler routine
-#  This will let each thread finish when CTRL-C is pushed
+#  This will let the thread finish when CTRL-C is pushed
 def keyboard_interrupt(signum, frame):
         print "*** Signaling thread to finish ***"
         sigint_event.set()
@@ -124,4 +113,3 @@
        #print "Waiting for thread %s ..." % thread.getName()
        time.sleep(1)
 
-

Modified: trunk/release/packaging/build
===================================================================
--- trunk/release/packaging/build       2006-06-09 21:18:24 UTC (rev 61610)
+++ trunk/release/packaging/build       2006-06-10 00:21:06 UTC (rev 61611)
@@ -21,6 +21,7 @@
 import os
 import distutils.dir_util
 import signal
+import getopt
 
 sys.path += [ '../pyutils' ]
 import packaging
@@ -50,19 +51,25 @@
        else:
                return "success"
 
+# Collect optional opts
+skip_steps = False
+opts, remaining_args = getopt.getopt(sys.argv[1:], "", [ "skip_steps" ])
+for option, value in opts:
+       if option == "--skip_steps":
+                skip_steps = True
 
-if len(sys.argv) < 4:
-       print "Usage is: ./build configuration package version <release>"
+if len(remaining_args) < 3:
+       print "Usage is: ./build [--skip_steps] configuration package version 
<release>"
         print "  <release> is optional"
        sys.exit(1)
 
-distro = sys.argv[1]
-package_name = sys.argv[2]
-version = sys.argv[3]
+distro = remaining_args[0]
+package_name = remaining_args[1]
+version = remaining_args[2]
 
 # If serial is passed in
-if len(sys.argv) > 4:
-       serial = sys.argv[4]
+if len(remaining_args) > 3:
+       serial = remaining_args[3]
 else:  serial = "0"
 
 if serial == "0":
@@ -231,29 +238,31 @@
 build_info.update_step("build", state="success", 
download=os.path.basename('downloads'), finish=utils.get_time())
 
 # Run postbuild steps
-remote_env = {}
-remote_env['HEAD_or_RELEASE'] = "HEAD"
-counter = 1
-while(1):
-       if package.info.has_key('POSTBUILD_STEP_NAME%d' % counter) and 
package.info.has_key('POSTBUILD_STEP%d' % counter):
-               print "Running step %d!" % counter
-               name = package.info['POSTBUILD_STEP_NAME%d' % counter]
-               LOGFILE = os.path.join(config.build_info_dir, 
build_info.rel_files_dir, 'logs', '%s.log' % name)
-               log_obj = logger.Logger(filename=LOGFILE, print_screen=0)
-               build_info.update_step(name, state="inprogress", 
log=os.path.basename(LOGFILE), start=utils.get_time(), finish="")
+if not skip_steps:
+       remote_env = {}
+       remote_env['HEAD_or_RELEASE'] = "HEAD"
+       counter = 1
+       while(1):
+               if package.info.has_key('POSTBUILD_STEP_NAME%d' % counter) and 
package.info.has_key('POSTBUILD_STEP%d' % counter):
+                       print "Running step %d!" % counter
+                       name = package.info['POSTBUILD_STEP_NAME%d' % counter]
+                       LOGFILE = os.path.join(config.build_info_dir, 
build_info.rel_files_dir, 'logs', '%s.log' % name)
+                       log_obj = logger.Logger(filename=LOGFILE, 
print_screen=0)
+                       build_info.update_step(name, state="inprogress", 
log=os.path.basename(LOGFILE), start=utils.get_time(), finish="")
 
-               (code, output) = build_env.ssh.execute("%s cd %s  " % 
(step_env_pre_cmd, remote_src_dir + package.info['POSTBUILD_STEP%d' % counter] 
), env=remote_env, logger=log_obj, output_timeout=timeout)
-               state = get_state(code, test=1)
-               if code:
-                       print "Step %d (%s) failed..." % (counter, 
package.info['POSTBUILD_STEP_NAME%d' % counter])
-                       build_info.update_step(name, state=state, 
finish=utils.get_time())
+                       (code, output) = build_env.ssh.execute("%s cd %s  " % 
(step_env_pre_cmd, remote_src_dir + package.info['POSTBUILD_STEP%d' % counter] 
), env=remote_env, logger=log_obj, output_timeout=timeout)
+                       state = get_state(code, test=1)
+                       if code:
+                               print "Step %d (%s) failed..." % (counter, 
package.info['POSTBUILD_STEP_NAME%d' % counter])
+                               build_info.update_step(name, state=state, 
finish=utils.get_time())
+                       else:
+                               build_info.update_step(name, state=state, 
finish=utils.get_time())
                else:
-                       build_info.update_step(name, state=state, 
finish=utils.get_time())
-       else:
-               break
+                       break
 
-       counter += 1
+               counter += 1
 
+
 state = build_info.get_collective_state()
 build_info.update_build(state=state, finish=utils.get_time())
 

Added: trunk/release/packaging/get-range-revs
===================================================================
--- trunk/release/packaging/get-range-revs      2006-06-09 21:18:24 UTC (rev 
61610)
+++ trunk/release/packaging/get-range-revs      2006-06-10 00:21:06 UTC (rev 
61611)
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import sys
+
+sys.path += ['../pyutils']
+
+import src_repo_utils
+import packaging
+import config
+import utils
+
+
+if len(sys.argv) < 4:
+       print "Usage: ./get-range-revs <package> <start rev> <end rev>"
+       sys.exit(1)
+
+package_name = sys.argv[1]
+start = sys.argv[2]
+end = sys.argv[3]
+
+repo = src_repo_utils.svn(config.MONO_ROOT)
+
+pack = packaging.package("", package_name)
+
+revs = []
+for i in range(int(start), int(end)):
+       revs.append(repo.latest_path_revision(pack.info['HEAD_PATH'], 
revision=i))
+
+revs = utils.remove_list_duplicates(revs)
+
+print revs
+


Property changes on: trunk/release/packaging/get-range-revs
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/release/pyutils/datastore.py
===================================================================
--- trunk/release/pyutils/datastore.py  2006-06-09 21:18:24 UTC (rev 61610)
+++ trunk/release/pyutils/datastore.py  2006-06-10 00:21:06 UTC (rev 61611)
@@ -25,6 +25,7 @@
 
 
 # tarball datastore
+version_re = re.compile(".*-(.*).(tar.gz|tar.bz2|zip)")
 
 # info for where tarballs are at and what's available
 #  any reason for making this file xml?
@@ -140,7 +141,21 @@
 
                return latest_filename
 
+       def get_tarball_version(self, HEAD_or_RELEASE, package_name, rev):
+               self.load_info()
 
+               source_path = self.info[":".join([HEAD_or_RELEASE, 
package_name, rev])]
+
+               if source_path == "tarball_creation_failed":
+                       version = ""
+               else:
+                       filename = os.path.basename(source_path)
+                       version, ext = version_re.search(filename).groups()
+
+               return version
+
+
+
 # XML data store
 class build_info:
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to