From: <wda...@us...> - 2010-08-13 00:12:29
|
Revision: 6103 http://oorexx.svn.sourceforge.net/oorexx/?rev=6103&view=rev Author: wdashley Date: 2010-08-13 00:12:23 +0000 (Fri, 13 Aug 2010) Log Message: ----------- New scripts for the new VMs. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex Modified: websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -54,7 +54,7 @@ build~homedir = '/home/'userid() -- always do first! -- build~builddir = build~homedir'/buildorx' build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu -build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname @@ -69,7 +69,7 @@ 'scp' build~statusfile()' , 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, build~builddate() || '-' || build~osname -call SysFileDelete build~homedir() || '/BuildRPM.log' +call SysFileDelete build~statusfile return @@ -100,7 +100,7 @@ ::method log -- log messages use strict arg msg -strm = .stream~new(self~homedir() || '/BuildRPM.log') +strm = .stream~new(self~statusfile) strm~open('write append') msg = date('S') time('N') msg say msg Modified: websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -55,7 +55,7 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname @@ -68,9 +68,9 @@ -- Cleanup 'scp' build~statusfile() , - 'dashley@192.168.0.104:/home/dashley/website/trunk/docroot/builds/status/' ||, + 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, build~builddate() || '-' || build~osname -call SysFileDelete build~homedir() || '/BuildRPM.log' +call SysFileDelete build~statusfile return @@ -144,16 +144,16 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if \sysisfiledirectory(newdir) then do +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do -- build the deb self~log('Building SVN revision' svnver'.') './bootstrap 2>&1 | tee -a' buildrpt './configure --disable-static 2>&1 | tee -a' buildrpt 'make deb 2>&1 | tee -a' buildrpt -- copy the results to the host - 'ssh dashley@192.168.0.104 "mkdir -p' newdir'"' - 'scp ../oorexx*.deb dashley@192.168.0.104:'newdir - 'scp' buildrpt 'dashley@192.168.0.104:'newdir + 'ssh da...@bu... "mkdir -p' newdir'"' + 'scp ../oorexx*.deb da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir end else self~log('This was a duplicate build request for SVN revision' svnver'.') -- remove everything @@ -163,3 +163,19 @@ self~log('Finished build.') return +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + Modified: websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -54,15 +54,22 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/imports/builds/docs' +build~targetdir = '/pub/www/build/docroot/builds/docs' build~osname = osname build~builddate = date('S') +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname -- Set our home directory call directory build~homedir -- Do the build build~build_docs() + +-- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile return @@ -84,6 +91,7 @@ ::attribute builddir -- the temp build dir ::attribute osname ::attribute builddate +::attribute statusfile /*----------------------------------------------------------------------------*/ /* build_docs */ @@ -112,26 +120,26 @@ self~log('Building SVN revision' svnver'.') 'make all 2>&1 | tee -a' buildrpt -- copy the results to the host - 'mkdir' newdir - 'cp ./oodialog/oodialog.pdf' newdir - 'cp ./oodialog/oodialog-html.zip' newdir - 'cp ./readme/readme.pdf' newdir - 'cp ./readme/readme.html' newdir - 'cp ./rexxpg/rexxpg.pdf' newdir - 'cp ./rexxpg/rexxpg-html.zip' newdir - 'cp ./rexxref/rexxref.pdf' newdir - 'cp ./rexxref/rexxref-html.zip' newdir - 'cp ./rxftp/rxftp.pdf' newdir - 'cp ./rxftp/rxftp-html.zip' newdir - 'cp ./rxmath/rxmath.pdf' newdir - 'cp ./rxmath/rxmath-html.zip' newdir - 'cp ./rxsock/rxsock.pdf' newdir - 'cp ./rxsock/rxsock-html.zip' newdir - 'cp ./rexxextensions/rexxextensions.pdf' newdir - 'cp ./rexxextensions/rexxextensions-html.zip' newdir - 'cp ./winextensions/winextensions.pdf' newdir - 'cp ./winextensions/winextensions-html.zip' newdir - 'cp' buildrpt newdir + 'ssh da...@bu... "mkdir' newdir'"' + 'cp ./oodialog/oodialog.pdf da...@bu...:'newdir + 'cp ./oodialog/oodialog-html.zip da...@bu...:'newdir + 'cp ./readme/readme.pdf da...@bu...:'newdir + 'cp ./readme/readme.html da...@bu...:'newdir + 'cp ./rexxpg/rexxpg.pdf da...@bu...:'newdir + 'cp ./rexxpg/rexxpg-html.zip da...@bu...:'newdir + 'cp ./rexxref/rexxref.pdf da...@bu...:'newdir + 'cp ./rexxref/rexxref-html.zip da...@bu...:'newdir + 'cp ./rxftp/rxftp.pdf da...@bu...:'newdir + 'cp ./rxftp/rxftp-html.zip da...@bu...:'newdir + 'cp ./rxmath/rxmath.pdf da...@bu...:'newdir + 'cp ./rxmath/rxmath-html.zip da...@bu...:'newdir + 'cp ./rxsock/rxsock.pdf da...@bu...:'newdir + 'cp ./rxsock/rxsock-html.zip da...@bu...:'newdir + 'cp ./rexxextensions/rexxextensions.pdf da...@bu...:'newdir + 'cp ./rexxextensions/rexxextensions-html.zip da...@bu...:'newdir + 'cp ./winextensions/winextensions.pdf da...@bu...:'newdir + 'cp ./winextensions/winextensions-html.zip da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir end else self~log('This was a duplicate build request.') -- remove everything @@ -168,7 +176,7 @@ use strict arg msg msg = date('S') time('N') msg say msg -strm = .stream~new('/imports/builds/status/' || self~builddate() || '-' || self~osname) +strm = .stream~new(self~statusfile) strm~open('write append') strm~lineout(msg) strm~close() Modified: websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -53,10 +53,10 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/imports/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') -build~statusfile = '/imports/builds/status/' || build~builddate() || '-' || build~osname +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname -- Set our home directory call directory build~homedir @@ -64,6 +64,10 @@ build~build_rpm() -- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile return @@ -137,58 +141,58 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if sysisfiledirectory(newdir) = 0 then do +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do -- build the rpm self~log('Building SVN revision' svnver'.') './bootstrap 2>&1 | tee -a' buildrpt './configure 2>&1 | tee -a' buildrpt 'make rpm 2>&1 | tee -a' buildrpt -- copy the results to the host - 'mkdir -p' newdir + 'ssh da...@bu... "mkdir -p' newdir'"' if SysIsFileDirectory('./rpm/RPMS/i386') then do - 'cp ./rpm/RPMS/i386/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i386', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/i486') then do - 'cp ./rpm/RPMS/i486/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i486', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/i586') then do - 'cp ./rpm/RPMS/i586/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i586', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/i686') then do - 'cp ./rpm/RPMS/i686/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i686', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/x86_64') then do - 'cp ./rpm/RPMS/x86_64/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('x86_64', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/s390x') then do - 'cp ./rpm/RPMS/s390x/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('s390x', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/s390') then do - 'cp ./rpm/RPMS/s390/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('s390', newdir) then do self~log('Build was bad, no output files produced.') end end else nop -- it must not be a supported rpm type - 'cp' buildrpt newdir + 'scp' buildrpt 'da...@bu...:'newdir end else do self~log('This was a duplicate build request for SVN revision' svnver'.') @@ -212,3 +216,20 @@ if files.0 = 0 then return .false -- bad build return .true -- good build + +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-08-15 17:15:58
|
Revision: 6110 http://oorexx.svn.sourceforge.net/oorexx/?rev=6110&view=rev Author: wdashley Date: 2010-08-15 17:15:52 +0000 (Sun, 15 Aug 2010) Log Message: ----------- A few updates. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex Modified: websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-13 13:01:57 UTC (rev 6109) +++ websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-15 17:15:52 UTC (rev 6110) @@ -55,7 +55,7 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' +build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname Modified: websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex 2010-08-13 13:01:57 UTC (rev 6109) +++ websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex 2010-08-15 17:15:52 UTC (rev 6110) @@ -46,10 +46,10 @@ -- initialization -hostbuilds = 's:' +hostbuilds = 'p:' builddir = 'c:\buildtemp' osname = 'winxpsp3-i386' -targetdir = hostbuilds'\interpreter-main' +targetdir = hostbuilds'\www\build\docroot\builds\interpreter-main' startbuildtime = 165 -- 2:45 AM -- make sure our temp dir is empty @@ -142,22 +142,19 @@ setlatestdocs: -- Do not use SysFileTree here! RXAPI may not be running! -'dir /aD /oN' hostbuilds'\docs > dirlist.txt' +'dir /aD /oN' hostbuilds'\www\build\docroot\builds\docs > dirlist.txt' strm = .stream~new('dirlist.txt') retc = strm~open('read') if retc <> 'READY:' then return 'unknown' lines = strm~arrayIn() retc = strm~close() dirline = lines[lines~items() - 2] -parse var dirline . . . . docdir . -- this only works for WinXP -if docdir = '' then do - parse var dirline . . . docdir . -- this works for Win2k - end +parse var dirline . . . . docdir . if docdir <> '' then do - call value 'DOC_LOCATION', hostbuilds'\docs\'docdir, 'ENVIRONMENT' + call value 'DOC_LOCATION', hostbuilds'\www\build\docroot\builds\docs\'docdir, 'ENVIRONMENT' end 'del dirlist.txt' --- say 'The doc_location is' hostbuilds'\docs\'docdir +-- say 'The doc_location is' hostbuilds'\www\build\docroot\builds\docs\'docdir return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-08-17 14:40:47
|
Revision: 6115 http://oorexx.svn.sourceforge.net/oorexx/?rev=6115&view=rev Author: wdashley Date: 2010-08-17 14:40:41 +0000 (Tue, 17 Aug 2010) Log Message: ----------- Updates for the new script for dynamically building ooRexx nightly builds. This will be implemented soon after I install the new network card in the new server. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/buildall.rex Added Paths: ----------- websites/build/trunk/docroot/builds/scripts/orxbuildmachines.txt Modified: websites/build/trunk/docroot/builds/scripts/buildall.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/buildall.rex 2010-08-17 03:31:53 UTC (rev 6114) +++ websites/build/trunk/docroot/builds/scripts/buildall.rex 2010-08-17 14:40:41 UTC (rev 6115) @@ -41,103 +41,62 @@ /*----------------------------------------------------------------------------*/ --- build the list of builddomains with their attributes -buildarr = .array~new() -buildarr~append(.builddomain~new('fedora13-i386', '/home/'userid()'/fedora13-i386')) -buildarr~append(.builddomain~new('fedora13-x86_64', '/home/'userid()'/fedora13-x86_64')) -buildarr~append(.builddomain~new('ubuntu1004-i386', '/home/'userid()'/ubuntu1004-i386')) +-- initialization +machines = 'orxbuildmachines.txt' -buildarr~append(.builddomain~new('sles10-s390x', '/home/'userid()'/sles10-s390x', .false)) - --- do the docs build first -kvmmach = .kvmdomain~new(sys~osname()) -if kvmmach~status() = 'shutoff' then kvnmach~startup() -do until kvmmach~status = 'running' - call SysSleep 10 +-- get the contentst of the input file and create the build array +arr = file_arrayin(machines) +buildarr = .array~new() +do machine over machines + if machine~strip() = '' then iterate + if machine~strip()~substr 1, 1) = '#' then iterate + if machine~strip()~substr 1, 2) = '--' then iterate + parse var machine osname addr userid cmd virt_flag . + buildarr~append(.buildmachine~new(osname, addr, userid, cmd, virt_flag)) end --- get the ip address and perform the build -arr = file_arrayin(sys~addrfile) -ipaddr = arr[1]~strip() -'ssh dashley@'ipaddr '"/home/dashley/orxbuild.rex"' -kvmmach~shutdown() -- do all the virtual builds -do sys over buildarr - if sys~virt() = .false then iterate - -- make sure the domain is running - kvmmach = .kvmdomain~new(sys~osname()) - if kvmmach~status() = 'shutoff' then kvnmach~startup() - do until kvmmach~status = 'running' - call SysSleep 10 - end - -- get the ip address and perform the build - arr = file_arrayin(sys~addrfile) - ipaddr = arr[1]~strip() - 'ssh dashley@'ipaddr '"/home/dashley/orxbuild.rex"' - kvmmach~shutdown() +do machine over buildarr + machine~do_build() end - --- do all the real builds -do sys over buildarr - if sys~virt() = .true then iterate - -- get the ip address and perform the build - arr = file_arrayin(sys~addrfile) - ipaddr = arr[1]~strip() - 'ssh dashley@'ipaddr '"/home/dashley/orxbuild.rex"' - end - --- send an email that the builds are done -mime1 = .mimepart~new -mime1~addContent('The nightly builds of ooRexx are complete at' date('s') time()'.') -msg = .smtpmsg~new -msg~From = 'don...@bu...' -msg~addRecipient('dav...@gm...') -msg~Subject = 'Nightly builds of ooRexx are complete' -msg~Content = mime1 -smtpconx = .smtp~new -retc = smtpconx~connect('127.0.0.1', 'dashley', 'wda123aa') -if retc = -1 then do - do rsp over smtpconx~cmdresponse - say rsp - end - return - end -retc = smtpconx~send(msg) -if retc = -1 then do - do rsp over smtpconx~cmdresponse - say rsp - end - return - end -retc = smtpconx~logoff return -::requires 'smtpmail.cls' ::requires 'kvmdomain.cls' /*----------------------------------------------------------------------------*/ -/* Class: builddomain */ +/* Class: buildmachine */ /*----------------------------------------------------------------------------*/ -::class builddomain public +::class buildmachine public ::attribute osname ::attribute addr -::attribute addrfile -::attribute virt +::attribute userid +::attribute cmd +::attribute virt_flag ::method init -expose osname addrfile -use strict arg osname, addrfile, virt = .true +expose osname addr userid cmd virt_flag +use strict arg osname, addr, userid, cmd, virt_flag = .true return -::method get_ipaddr -arr = file_arrayin(self~addrfile()) -ln = arr[2] -parse var ln . 'inet addr:' ipaddr . -return ipaddr +::method do_build +expose osname addr userid virt_flag +if virt_flag = .true then do + -- start the domain + domain = .kvmdomain~new(osname) + retc = domain~startup() + if retc <> 0 then return + call SysSleep 90 -- allow some time for the domain to fully start + end +'ssh' userid'@'addr '"'cmd'"' +if virt_flag = .true then do + 'ssh' userid'@'addr '"shutdown now"' + call SysSleep 90 -- allow some time for the domain to fully stop + end +return /*----------------------------------------------------------------------------*/ Added: websites/build/trunk/docroot/builds/scripts/orxbuildmachines.txt =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildmachines.txt (rev 0) +++ websites/build/trunk/docroot/builds/scripts/orxbuildmachines.txt 2010-08-17 14:40:41 UTC (rev 6115) @@ -0,0 +1,14 @@ +# This file contains the list of build machine and all the information needed +# to build ooRexx on each machine. + +# Always do the docs first +fedora13-i386-orxbuild-1 192.168.0.52 dashley /home/dashley/orxbuilddocs.rex 1 + +# The rest can be done in any order +fedora13-i386-orxbuild-1 192.168.0.52 dashley /home/dashley/orxbuildrpm.rex 1 +fedora13-x86_64-orxbuild-1 192.168.0.53 dashley /home/dashley/orxbuildrpm.rex 1 + +SLES10-s390x-orxbuild-1 oorexx.osdl.marist.edu dashley /home/dashley/orxbuildrpm.rex 0 + +ubuntu1004-i386-orxbuild-1 192.168.0.54 dashley /home/dashley/orxbuilddeb.rex 1 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-08-19 18:35:31
|
Revision: 6121 http://oorexx.svn.sourceforge.net/oorexx/?rev=6121&view=rev Author: wdashley Date: 2010-08-19 18:35:23 +0000 (Thu, 19 Aug 2010) Log Message: ----------- Prepare scripts for the new build machine environment. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex Removed Paths: ------------- websites/build/trunk/docroot/builds/scripts/orxlinuxbuild.rex websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex Deleted: websites/build/trunk/docroot/builds/scripts/orxlinuxbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxlinuxbuild.rex 2010-08-19 15:58:39 UTC (rev 6120) +++ websites/build/trunk/docroot/builds/scripts/orxlinuxbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) @@ -1,326 +0,0 @@ -#!/usr/bin/rexx -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: This is the build script for ooRexx automated *nix builds. */ -/* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- these are some valid os names --- fedora13-i386 --- fedora13-x86_64 --- redhat54-i386 --- redhat54-x86_64 --- opensuse11-i386 --- opensuse11-x86_64 --- SLES10-s390x - --- initialization --- Note: THE ORDER HERE IS VERY IMPORTANT!!! -build = .build~new() -build~acct = userid() -build~homedir = '/home/' || build~acct() -build~osnamefile = build~homedir()'/osname.txt' -build~osname = build~get_osname(arg(1)) -if build~osname()~pos('fedora') > 0 then build~type = 'rpm' -else if build~osname()~pos('opensuse') > 0 then build~type = 'rpm' -else if build~osname()~pos('SLES') > 0 then build~type = 'rpm' -else if build~osname()~pos('ubuntu') > 0 then build~type = 'deb' -else if build~osname()~pos('debian') > 0 then build~type = 'deb' -build~date = date('S') -build~localdir = build~homedir()'/buildorx' -build~targetacct = 'dashley' -build~targethost = 'build.oorexx.org' -build~targetdir = '/home/' || build~targetacct()'/website/docroot/builds/interpreter-main' -build~logdir = '/home/' || build~targetacct()'/website/docroot/builds/status' -build~logfile = build~homedir() || '/' || build~date() || '-' || build~osname() - --- do the build -call directory build~homedir() -build~log('Starting build.') -build~do_build() -build~log('Finished build.') - --- Cleanup -'scp' build~logfile() build~targetacct() || '@' || build~targethost() || ':' || build~targetdir() -call SysFileDelete build~logfile() -return - - - - - - - - - - - -/*----------------------------------------------------------------------------*/ -/* Class: build */ -/*----------------------------------------------------------------------------*/ - -::class build public -::method init -return - -/*----------------------------------------------------------------------------*/ -/* Attributes: */ -/*----------------------------------------------------------------------------*/ - -::attribute osname -- the name of this OS and machine type -::attribute osnamefile -- the file containing the osname value -::attribute acct -- the account to used to perform the build -::attribute homedir -- the build acct home dir -::attribute date -- the date the build was started -::attribute type -- the build type (exe, rpm, deb, docs, etc) -::attribute localdir -- the local temp build dir -::attribute svnver -- the current subversion revision -::attribute targetacct -- the account on the build server -::attribute targethost -- the target system ip addr or dns name -::attribute targetdir -- the target dir for build outputs -::attribute logdir -- the target dir for the build status file -::attribute logfile -- the local build status file - -/*----------------------------------------------------------------------------*/ -/* Method: log */ -/*----------------------------------------------------------------------------*/ - -::method log --- log messages -use strict arg msg -strm = .stream~new(self~logfile()) -strm~open('write append') -msg = date('S') time('N') msg -say msg -strm~lineout(msg) -strm~close() -return - -/*----------------------------------------------------------------------------*/ -/* Method: targetexist */ -/*----------------------------------------------------------------------------*/ - -::method targetexists -use strict arg target -tempf = '/tmp/orxbuild.tmp' -'ssh' self~targetacct()'@'self~targethost() '"ls -l' target'" >' tempf -strm = .stream~new(tempf) -strm~open('read') -arr = strm~arrayin() -strm~close() -if arr~items() = 0 then return .false -if arr[1]~pos('cannot access') > 0 then return .false -return .true - -/*----------------------------------------------------------------------------*/ -/* Method: getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -::method getsvnrevision -verlocal = './temp.ver' -'svnversion >' verlocal -strm = .stream~new(verlocal) -retc = strm~open('read') -if retc <> 'READY:' then return '' -svnver = strm~lineIn() -retc = strm~close() -if svnver = '' then svnver = 'unknown' -return svnver - -/*----------------------------------------------------------------------------*/ -/* Method: do_build */ -/*----------------------------------------------------------------------------*/ - -::method do_build -use strict arg -savedir = directory() --- create temp dir and checkout the source -'rm -rf' self~localdir() -- make sure the temp subdir is removed -'mkdir' self~localdir() -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' self~localdir -call directory self~localdir() --- see if we have already built this revision -self~svnver = self~getsvnrevision() -if \datatype(self~svnver(), 'W') then do - self~log('Subversion checkout failed.') - return - end -newdir = self~targetdir'/'self~svnver()'/'self~osname -if self~targetexists(newdir) = .false then do - select - when self~type() = 'rpm' then self~build_rpm(newdir) - when self~type() = 'deb' then self~build_deb(newdir) - when self~type() = 'exe' then self~build_exe(newdir) - otherwise do - self~log('Unknown build type. No output files produced.') - end - end - end -else self~log('This was a duplicate build request for SVN revision' svnver'.') --- remove everything -call directory savedir -'rm -rf' self~localdir() -'rm oorexx*.deb' -return - - -/*----------------------------------------------------------------------------*/ -/* Method: build_deb */ -/*----------------------------------------------------------------------------*/ - -::method build_deb -use strict arg newdir -buildrpt = self~osname()'.buildrpt.txt' -self~log('Building SVN revision' self~svnver()'.') -'./bootstrap 2>&1 | tee -a' buildrpt -'./configure --disable-static 2>&1 | tee -a' buildrpt -'make deb 2>&1 | tee -a' buildrpt --- copy the results to the host -'ssh' self~targetacct()'@'self~tergethost() '"mkdir -p' newdir'"' -'scp ../oorexx*.deb' self~targetacct()'@'self~targethost()':'newdir -'scp' buildrpt self~targetact()'@'self~targethost()':'newdir -return - - -/*----------------------------------------------------------------------------*/ -/* Method: build_rpm */ -/*----------------------------------------------------------------------------*/ - -::method build_rpm -use strict arg newdir -buildrpt = self~osname()'.buildrpt.txt' -self~log('Building SVN revision' self~svnver()'.') -'./bootstrap 2>&1 | tee -a' buildrpt -'./configure 2>&1 | tee -a' buildrpt -'make rpm 2>&1 | tee -a' buildrpt --- copy the results to the host -'ssh' self~targetacct()'@'self~tergethost() '"mkdir -p' newdir'"' -if SysIsFileDirectory('./rpm/RPMS/i386') then , - 'scp ./rpm/RPMS/i386/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else if SysIsFileDirectory('./rpm/RPMS/i486') then , - 'scp ./rpm/RPMS/i486/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else if SysIsFileDirectory('./rpm/RPMS/i586') then , - 'scp ./rpm/RPMS/i586/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else if SysIsFileDirectory('./rpm/RPMS/i686') then , - 'scp ./rpm/RPMS/i686/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else if SysIsFileDirectory('./rpm/RPMS/x86_64') then , - 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else if SysIsFileDirectory('./rpm/RPMS/s390x') then , - 'scp ./rpm/RPMS/s390x/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else if SysIsFileDirectory('./rpm/RPMS/s390') then , - 'scp ./rpm/RPMS/s390/ooRexx*.rpm' self~targetacct()'@'self~targethost()':'newdir -else self~log('Unknown rpm type, no output rpms copied.') -'scp' buildrpt self~targetacct()'@'self~targethost()':'newdir -return - - -/*----------------------------------------------------------------------------*/ -/* Method: get_osname */ -/*----------------------------------------------------------------------------*/ - -::method get_osname -use strict arg osname --- if there was a program argument use that as the osname -if osname <> '' then return osname --- see if the osname is in a file -if SysIsFile(self~osnamefile()) then do - arr = self~file_arrayin(self~osnamefile()) - if arr~items() > 0 & arr[1]~strip() <> '' then return arr[1]~strip() - end --- now try to dynamically figure out the osname --- try fedora before redhat -if SysIsFile('/etc/fedora-release') then do - arr = self~file_arrayin('/etc/fedora-release') - ln = arr[1] - parse var ln 'Fedora' 'release' release . - osname = 'fedora'release - end --- try red hat -if SysIsFile('/etc/redhat-release') then do - arr = self~file_arrayin('/etc/redhat-release') - ln = arr[1] - parse var ln 'Red Hat' 'release' release . - osname = 'redhat'release - end --- try SuSE -if SysIsFile('/etc/SuSE-release') then do - arr = self~file_arrayin('/etc/SuSE-release') - if arr[1]~pos('SUSE Linux Enterprise Server') > 0 then relname = 'SLES' - ln = arr[2] - parse var ln 'VERSION =' ver - ln = arr[3] - parse var ln 'PATCHLEVEL =' patch - osname = relname || ver || patch - end --- try debian/ubuntu -if SysIsFile('/etc/lsb-release') then do - arr = self~file_arrayin('/etc/lsb-release') - ln = arr[1] - parse var ln 'DISTRIB_ID=' relname . - relname = relname~lower() - ln = arr[2] - parse var ln 'DISTRIB_RELEASE=' release . - osname = relname || release - end -else osname = 'Unknown' --- now get the architecture -'uname -m > /tmp/machtype.txt' -arr = self~file_arrayin('/tmp/machtype.txt') -ln = arr[1] -parse var ln mach . -if mach = 'i486' then mach = 'i386' -else if mach = 'i586' then mach = 'i386' -else if mach = 'i686' then mach = 'i386' -else nop --- now return the full name -return osname || '-' || mach - - -/*----------------------------------------------------------------------------*/ -/* Method: file_arrayin */ -/*----------------------------------------------------------------------------*/ - -::method file_arrayin private -use strict arg file -strm = .stream~new(file) -strm~open('read') -arr = strm~arrayin() -strm~close() -return arr - Deleted: websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex 2010-08-19 15:58:39 UTC (rev 6120) +++ websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) @@ -1,195 +0,0 @@ -#!/usr/bin/rexx -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: This is the build script for any rpm-based external OS. */ -/* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- platform specific variables! --- osname = 'fedora13-i386' --- osname = 'fedora13-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' -osname = 'SLES10-s390x' --- osname = 'winxpsp3-i386' - --- Initialization -build = .build~new() -build~homedir = '/home/'userid() -- always do first! --- build~builddir = build~homedir'/buildorx' -build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu -build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' -build~osname = osname -build~builddate = date('S') -build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname - --- Set our home directory -call directory build~homedir - --- Do the build -build~build_rpm() - --- Cleanup -'scp' build~statusfile()' , - 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname -call SysFileDelete build~statusfile -return - - -/*----------------------------------------------------------------------------*/ -/* Class: build */ -/*----------------------------------------------------------------------------*/ - -::class build public -::method init -return - -/*----------------------------------------------------------------------------*/ -/* Attributes: */ -/*----------------------------------------------------------------------------*/ - -::attribute svnrevision -::attribute homedir -::attribute targetdir -::attribute builddir -- the temp build dir -::attribute osname -::attribute builddate -::attribute statusfile - -/*----------------------------------------------------------------------------*/ -/* Method: log */ -/*----------------------------------------------------------------------------*/ - -::method log --- log messages -use strict arg msg -strm = .stream~new(self~statusfile) -strm~open('write append') -msg = date('S') time('N') msg -say msg -strm~lineout(msg) -strm~close() -return - -/*----------------------------------------------------------------------------*/ -/* Method: getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -::method getsvnrevision -verlocal = './temp.ver' -'svnversion >' verlocal -strm = .stream~new(verlocal) -retc = strm~open('read') -if retc <> 'READY:' then return '' -svnver = strm~lineIn() -retc = strm~close() -if svnver = '' then svnver = 'unknown' -return svnver - -/*----------------------------------------------------------------------------*/ -/* Method: build_rpm */ -/*----------------------------------------------------------------------------*/ - -::method build_rpm -self~log('Starting build.') -buildrpt = self~osname'.buildrpt.txt' -savedir = directory() --- create temp dir and checkout the source -'rm -rf' self~builddir -- make sure the subdir is erased -'mkdir' self~builddir -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' self~builddir -call directory self~builddir --- see if we have already built this revision -svnver = self~getsvnrevision() -if \datatype(svnver, 'W') then do - self~log('Subversion checkout failed.') - return - end -newdir = self~targetdir'/'svnver'/'self~osname -if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do - -- build the rpm - self~log('Building SVN revision' svnver'.') - './bootstrap 2>&1 | tee -a' buildrpt - './configure 2>&1 | tee -a' buildrpt - 'make rpm 2>&1 | tee -a' buildrpt - -- copy the results to the host - 'ssh da...@bu... "mkdir -p' newdir'"' - if SysIsFileDirectory('./rpm/RPMS/i386') then , - 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/i486') then , - 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/i586') then , - 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/i686') then , - 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/x86_64') then , - 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/s390x') then , - 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/s390') then , - 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir - else nop -- it must not be a supported rpm type - 'scp' buildrpt 'da...@bu...:'newdir - end -else do - self~log('This was a duplicate build request for SVN revision' svnver'.') - end --- remove everything -call directory savedir -'rm -rf' self~builddir -self~log('Finished build.') -return - -/*----------------------------------------------------------------------------*/ -/* Method: targetexist */ -/*----------------------------------------------------------------------------*/ - -::method targetexists -use strict arg userid, host, target -tempf = '/tmp/orxbuild.tmp' -'ssh' userid'@'host '"ls -l' target'" >' tempf -strm = .stream~new(tempf) -strm~open('read') -arr = strm~arrayin() -strm~close() -if arr~items() = 0 then return .false -if arr[1]~pos('cannot access') > 0 then return .false -return .true - Modified: websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-19 15:58:39 UTC (rev 6120) +++ websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) @@ -1,7 +1,7 @@ #!/usr/bin/rexx /*----------------------------------------------------------------------------*/ /* */ -/* Description: This is the build daemon for any rpm-based KVM guest OS. */ +/* Description: This is the build daemon for any deb-based build machine. */ /* */ /* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ /* */ @@ -55,7 +55,7 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname @@ -68,7 +68,7 @@ -- Cleanup 'scp' build~statusfile() , - 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname call SysFileDelete build~statusfile return Modified: websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-19 15:58:39 UTC (rev 6120) +++ websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) @@ -1,7 +1,7 @@ #!/usr/bin/rexx /*----------------------------------------------------------------------------*/ /* */ -/* Description: This is the build script for the docs KVM guest. */ +/* Description: This is the build script for the docs build machine. */ /* */ /* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ /* */ @@ -54,7 +54,7 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/home/dashley/website/trunk/docroot/builds/docs' +build~targetdir = '/pub/www/build/docroot/builds/docs' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname @@ -67,7 +67,7 @@ -- Cleanup 'scp' build~statusfile() , - 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname call SysFileDelete build~statusfile return Modified: websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-19 15:58:39 UTC (rev 6120) +++ websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) @@ -1,7 +1,7 @@ #!/usr/bin/rexx /*----------------------------------------------------------------------------*/ /* */ -/* Description: This is the build script for any rpm-based KVM guest OS. */ +/* Description: This is the build script for any rpm-based build machine. */ /* */ /* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ /* */ @@ -52,12 +52,15 @@ -- Initialization build = .build~new() build~homedir = '/home/'userid() -- always do first! + build~builddir = build~homedir'/buildorx' -build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' +-- build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu + +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname --- Set our home directory +-- Move to our home directory call directory build~homedir -- Do the build @@ -65,7 +68,7 @@ -- Cleanup 'scp' build~statusfile() , - 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname call SysFileDelete build~statusfile return @@ -149,27 +152,20 @@ 'make rpm 2>&1 | tee -a' buildrpt -- copy the results to the host 'ssh da...@bu... "mkdir -p' newdir'"' - if SysIsFileDirectory('./rpm/RPMS/i386') then do - 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir - end - else if SysIsFileDirectory('./rpm/RPMS/i486') then do - 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir - end - else if SysIsFileDirectory('./rpm/RPMS/i586') then do - 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir - end - else if SysIsFileDirectory('./rpm/RPMS/i686') then do - 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir - end - else if SysIsFileDirectory('./rpm/RPMS/x86_64') then do - 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir - end - else if SysIsFileDirectory('./rpm/RPMS/s390x') then do - 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir - end - else if SysIsFileDirectory('./rpm/RPMS/s390') then do - 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir - end + if SysIsFileDirectory('./rpm/RPMS/i386') then , + 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/i486') then , + 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/i586') then , + 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/i686') then , + 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/x86_64') then , + 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/s390x') then , + 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/s390') then , + 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir else nop -- it must not be a supported rpm type 'scp' buildrpt 'da...@bu...:'newdir end @@ -180,8 +176,6 @@ call directory savedir 'rm -rf' self~builddir self~log('Finished build.') --- shutdown the system --- 'sudo shutdown -h now' return Modified: websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex 2010-08-19 15:58:39 UTC (rev 6120) +++ websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) @@ -1,6 +1,6 @@ /*----------------------------------------------------------------------------*/ /* */ -/* Description: This is the build script for the Windows KVM guest OS. */ +/* Description: This is the build script for the Windows XP build machine. */ /* */ /* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ /* */ @@ -165,7 +165,7 @@ log: -- log messages use strict arg msg -strm = .stream~new(hostbuilds'\status\' || builddate || '-' || osname) +strm = .stream~new(hostbuilds'\www\build\docroot\builds\status\' || builddate || '-' || osname) strm~open('write append') msg = date('S') time('N') msg say msg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-08-19 18:42:08
|
Revision: 6122 http://oorexx.svn.sourceforge.net/oorexx/?rev=6122&view=rev Author: wdashley Date: 2010-08-19 18:41:59 +0000 (Thu, 19 Aug 2010) Log Message: ----------- Rename some scripts and fix some others. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/buildall.rex Added Paths: ----------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex Removed Paths: ------------- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex Modified: websites/build/trunk/docroot/builds/scripts/buildall.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/buildall.rex 2010-08-19 18:35:23 UTC (rev 6121) +++ websites/build/trunk/docroot/builds/scripts/buildall.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -1,7 +1,7 @@ #!/usr/bin/rexx /*----------------------------------------------------------------------------*/ /* */ -/* Description: Do an ooRexx build on a virtual machine. */ +/* Description: Build ooRexx on all build machines. */ /* */ /* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ /* */ Copied: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex (from rev 6121, websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -0,0 +1,181 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build daemon for any deb-based build machine. */ +/* */ +/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- platform specific variables! +-- osname = 'fedora13-i386' +-- osname = 'fedora13-x86_64' +osname = 'ubuntu1004-i386' +-- osname = 'ubuntu1004-x86_64' +-- osname = 'opensuse11-i386' +-- osname = 'opensuse11-x86_64' +-- osname = 'SLES10-s390x' +-- osname = 'winxpsp3-i386' + +-- Initialization +build = .build~new() +build~homedir = '/home/'userid() -- always do first! +build~builddir = build~homedir'/buildorx' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' +build~osname = osname +build~builddate = date('S') +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname + +-- Set our home directory +call directory build~homedir + +-- Do the build +build~build_deb() + +-- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile +return + + + +/*----------------------------------------------------------------------------*/ +/* Class: build */ +/*----------------------------------------------------------------------------*/ + +::class build public +::method init +return + +/*----------------------------------------------------------------------------*/ +/* Attributes: */ +/*----------------------------------------------------------------------------*/ + +::attribute svnrevision +::attribute homedir +::attribute targetdir +::attribute builddir -- the temp build dir +::attribute osname +::attribute builddate +::attribute statusfile + +/*----------------------------------------------------------------------------*/ +/* Method: log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +strm = .stream~new(self~statusfile()) +strm~open('write append') +msg = date('S') time('N') msg +say msg +strm~lineout(msg) +strm~close() +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + +/*----------------------------------------------------------------------------*/ +/* build_deb */ +/*----------------------------------------------------------------------------*/ + +::method build_deb +use strict arg +self~log('Starting build.') +savedir = directory() +buildrpt = self~osname'.buildrpt.txt' +-- create temp dir and checkout the source +'mkdir' self~builddir() +call directory self~builddir() +'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/ ./' +svnver = self~getsvnrevision() +if \datatype(svnver, 'W') then do + self~log('Subversion checkout failed.') + return + end +newdir = self~targetdir'/'svnver'/'self~osname +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do + -- build the deb + self~log('Building SVN revision' svnver'.') + './bootstrap 2>&1 | tee -a' buildrpt + './configure --disable-static 2>&1 | tee -a' buildrpt + 'make deb 2>&1 | tee -a' buildrpt + -- copy the results to the host + 'ssh da...@bu... "mkdir -p' newdir'"' + 'scp ../oorexx*.deb da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir + end +else self~log('This was a duplicate build request for SVN revision' svnver'.') +-- remove everything +call directory savedir +'rm -rf' self~builddir() +'rm oorexx*.deb' +self~log('Finished build.') +return + +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + Copied: websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex (from rev 6121, websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -0,0 +1,201 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build script for the docs build machine. */ +/* */ +/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- platform specific variables! +-- osname = 'fedora13-i386' +osname = 'fedora13-docs' +-- osname = 'fedora13-x86_64' +-- osname = 'opensuse11-i386' +-- osname = 'opensuse11-x86_64' +-- osname = 'SLES11-s390x' +-- osname = 'winxpsp3-i386' + +-- Initialization +build = .build~new() +build~homedir = '/home/'userid() -- always do first! +build~builddir = build~homedir'/buildorx' +build~targetdir = '/pub/www/build/docroot/builds/docs' +build~osname = osname +build~builddate = date('S') +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname + +-- Set our home directory +call directory build~homedir + +-- Do the build +build~build_docs() + +-- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile +return + + +/*----------------------------------------------------------------------------*/ +/* Class: build */ +/*----------------------------------------------------------------------------*/ + +::class build public +::method init +return + +/*----------------------------------------------------------------------------*/ +/* Attributes: */ +/*----------------------------------------------------------------------------*/ + +::attribute svnrevision +::attribute homedir +::attribute targetdir +::attribute builddir -- the temp build dir +::attribute osname +::attribute builddate +::attribute statusfile + +/*----------------------------------------------------------------------------*/ +/* build_docs */ +/*----------------------------------------------------------------------------*/ + +::method build_docs +use strict arg +self~log('Starting build.') +buildrpt = './docs-buildrpt.txt' +savedir = directory() +-- create temp dir and checkout the source +tempdir = './builddocs' +'rm -rf' tempdir -- make sure the subdir is erased +'mkdir' tempdir +'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/docs/trunk' tempdir +call directory tempdir +-- see if we have already built this revision +svnver = self~getsvnrevision() +if \datatype(svnver, 'W') then do + self~log('Subversion checkout failed.') + return + end +newdir = self~targetdir'/'svnver +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do + -- build the docs + self~log('Building SVN revision' svnver'.') + 'make all 2>&1 | tee -a' buildrpt + -- copy the results to the host + 'ssh da...@bu... "mkdir' newdir'"' + 'scp ./oodialog/oodialog.pdf da...@bu...:'newdir + 'scp ./oodialog/oodialog-html.zip da...@bu...:'newdir + 'scp ./readme/readme.pdf da...@bu...:'newdir + 'scp ./readme/readme.html da...@bu...:'newdir + 'scp ./rexxpg/rexxpg.pdf da...@bu...:'newdir + 'scp ./rexxpg/rexxpg-html.zip da...@bu...:'newdir + 'scp ./rexxref/rexxref.pdf da...@bu...:'newdir + 'scp ./rexxref/rexxref-html.zip da...@bu...:'newdir + 'scp ./rxftp/rxftp.pdf da...@bu...:'newdir + 'scp ./rxftp/rxftp-html.zip da...@bu...:'newdir + 'scp ./rxmath/rxmath.pdf da...@bu...:'newdir + 'scp ./rxmath/rxmath-html.zip da...@bu...:'newdir + 'scp ./rxsock/rxsock.pdf da...@bu...:'newdir + 'scp ./rxsock/rxsock-html.zip da...@bu...:'newdir + 'scp ./rexxextensions/rexxextensions.pdf da...@bu...:'newdir + 'scp ./rexxextensions/rexxextensions-html.zip da...@bu...:'newdir + 'scp ./winextensions/winextensions.pdf da...@bu...:'newdir + 'scp ./winextensions/winextensions-html.zip da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir + end +else self~log('This was a duplicate build request.') +-- remove everything +call directory savedir +'rm -rf' tempdir +self~log('Finished build.') +-- shutdown the system +-- 'sudo shutdown -h now' +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + + +/*----------------------------------------------------------------------------*/ +/* log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +use strict arg msg +msg = date('S') time('N') msg +say msg +strm = .stream~new(self~statusfile) +strm~open('write append') +strm~lineout(msg) +strm~close() +return + + +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + Copied: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex (from rev 6121, websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -0,0 +1,197 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build script for any rpm-based build machine. */ +/* */ +/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- platform specific variables! +osname = 'fedora13-i386' +-- osname = 'fedora13-x86_64' +-- osname = 'opensuse11-i386' +-- osname = 'opensuse11-x86_64' +-- osname = 'SLES10-s390x' +-- osname = 'winxpsp3-i386' + +-- Initialization +build = .build~new() +build~homedir = '/home/'userid() -- always do first! + +build~builddir = build~homedir'/buildorx' +-- build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu + +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' +build~osname = osname +build~builddate = date('S') +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname +-- Move to our home directory +call directory build~homedir + +-- Do the build +build~build_rpm() + +-- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile +return + + +/*----------------------------------------------------------------------------*/ +/* Class: build */ +/*----------------------------------------------------------------------------*/ + +::class build public +::method init +return + +/*----------------------------------------------------------------------------*/ +/* Attributes: */ +/*----------------------------------------------------------------------------*/ + +::attribute svnrevision +::attribute homedir +::attribute targetdir +::attribute builddir -- the temp build dir +::attribute osname +::attribute builddate +::attribute statusfile + +/*----------------------------------------------------------------------------*/ +/* Method: log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +msg = date('S') time('N') msg +say msg +strm = .stream~new(self~statusfile) +strm~open('write append') +strm~lineout(msg) +strm~close() +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + +/*----------------------------------------------------------------------------*/ +/* Method: build_rpm */ +/*----------------------------------------------------------------------------*/ + +::method build_rpm +self~log('Starting build.') +buildrpt = self~osname'.buildrpt.txt' +savedir = directory() +-- create temp dir and checkout the source +'rm -rf' self~builddir -- make sure the subdir is erased +'mkdir' self~builddir +'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' self~builddir +call directory self~builddir +-- see if we have already built this revision +svnver = self~getsvnrevision() +if \datatype(svnver, 'W') then do + self~log('Subversion checkout failed.') + return + end +newdir = self~targetdir'/'svnver'/'self~osname +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do + -- build the rpm + self~log('Building SVN revision' svnver'.') + './bootstrap 2>&1 | tee -a' buildrpt + './configure 2>&1 | tee -a' buildrpt + 'make rpm 2>&1 | tee -a' buildrpt + -- copy the results to the host + 'ssh da...@bu... "mkdir -p' newdir'"' + if SysIsFileDirectory('./rpm/RPMS/i386') then , + 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/i486') then , + 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/i586') then , + 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/i686') then , + 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/x86_64') then , + 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/s390x') then , + 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('./rpm/RPMS/s390') then , + 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir + else nop -- it must not be a supported rpm type + 'scp' buildrpt 'da...@bu...:'newdir + end +else do + self~log('This was a duplicate build request for SVN revision' svnver'.') + end +-- remove everything +call directory savedir +'rm -rf' self~builddir +self~log('Finished build.') +return + + +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + Copied: websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex (from rev 6121, websites/build/trunk/docroot/builds/scripts/virtwinbuild.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -0,0 +1,196 @@ +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build script for the Windows XP build machine. */ +/* */ +/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/* Notes: */ +/* 1. On Windows we need to avoid any RexxUtil functions because they */ +/* reside in RXAPI and that gets stopped and restarted multiple times */ +/* during the build process. */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- initialization +hostbuilds = 'p:' +builddir = 'c:\buildtemp' +osname = 'winxpsp3-i386' +targetdir = hostbuilds'\www\build\docroot\builds\interpreter-main' +startbuildtime = 165 -- 2:45 AM + +-- make sure our temp dir is empty +'rmdir /S /Q' builddir + +-- see if we just do one build only +cmdline = arg(1)~strip() +if cmdline = '--immediate' then do + call dobuild + return + end + +-- wait until the specified time +do forever + if time('M') = startbuildtime then call dobuild + 'sleep 50' + say 'Current time is' time('C') + end +return + + +/*----------------------------------------------------------------------------*/ +/* dobuild */ +/*----------------------------------------------------------------------------*/ + +dobuild: +builddate = date('S') -- do this first!!!! +call log 'Starting build.' +-- create temp dir and checkout the source +'md' builddir +'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' builddir +call directory builddir +-- build the exe +call value 'SRC_DRV', 'c:', 'ENVIRONMENT' +call value 'SRC_DIR', '\buildtemp', 'ENVIRONMENT' +call setlatestdocs +svnver = getsvnrevision() +if \datatype(svnver, 'W') then do + call log 'Subversion checkout failed.' + return + end +if checkbuild(targetdir'\'svnver'\'osname) = .false then do + call log 'Building SVN revision' svnver'.' + 'makeorx.bat BOTH PACKAGE' + -- copy the results to the host + call log 'Copying build output files to the server' + newdir = targetdir'\'svnver + 'md' newdir + newdir = newdir'\'osname + 'md' newdir + 'copy ooRexx*.exe' newdir + 'copy Win32Rel\Win32Rel.log' newdir'\Win32RelLog.txt' + 'copy Win32Dbg\Win32Dbg.log' newdir'\Win32DbgLog.txt' + -- check build success + if \checkbuild(newdir) then do + call log 'Build was bad, no output files produced' + end + end +else do + call log 'This was a duplicate build request for SVN revision' svnver'.' + end +-- remove everything +call directory 'c:\' +'rmdir /S /Q' builddir +call log 'Finished build.' +return + + +/*----------------------------------------------------------------------------*/ +/* getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +getsvnrevision: procedure +'svn info > svntemp' +strm = .stream~new('svntemp') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +revline = lines[5] +parse var revline . svnver . +if svnver = '' then svnver = 'unknown' +-- say 'The SVN Revision is' svnver +return svnver + + +/*----------------------------------------------------------------------------*/ +/* setlatestdocs */ +/*----------------------------------------------------------------------------*/ + +setlatestdocs: +-- Do not use SysFileTree here! RXAPI may not be running! +'dir /aD /oN' hostbuilds'\www\build\docroot\builds\docs > dirlist.txt' +strm = .stream~new('dirlist.txt') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +dirline = lines[lines~items() - 2] +parse var dirline . . . . docdir . +if docdir <> '' then do + call value 'DOC_LOCATION', hostbuilds'\www\build\docroot\builds\docs\'docdir, 'ENVIRONMENT' + end +'del dirlist.txt' +-- say 'The doc_location is' hostbuilds'\www\build\docroot\builds\docs\'docdir +return + + +/*----------------------------------------------------------------------------*/ +/* log */ +/*----------------------------------------------------------------------------*/ + +log: +-- log messages +use strict arg msg +strm = .stream~new(hostbuilds'\www\build\docroot\builds\status\' || builddate || '-' || osname) +strm~open('write append') +msg = date('S') time('N') msg +say msg +strm~lineout(msg) +strm~close() +return + + +/*----------------------------------------------------------------------------*/ +/* checkbuild */ +/*----------------------------------------------------------------------------*/ + +checkbuild: procedure +-- check fo good build +use strict arg newdir +'dir' newdir'\ooRexx*.exe > checkexists' +strm = .stream~new('checkexists') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +count = 0 +do line over lines + if line~pos('ooRexx') > 0 & line~pos('.exe') > 0 then count += 1 + end +if count < 2 then return .false -- bad build +return .true -- good build + Deleted: websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) +++ websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -1,181 +0,0 @@ -#!/usr/bin/rexx -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: This is the build daemon for any deb-based build machine. */ -/* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- platform specific variables! --- osname = 'fedora13-i386' --- osname = 'fedora13-x86_64' -osname = 'ubuntu1004-i386' --- osname = 'ubuntu1004-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' --- osname = 'SLES10-s390x' --- osname = 'winxpsp3-i386' - --- Initialization -build = .build~new() -build~homedir = '/home/'userid() -- always do first! -build~builddir = build~homedir'/buildorx' -build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' -build~osname = osname -build~builddate = date('S') -build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname - --- Set our home directory -call directory build~homedir - --- Do the build -build~build_deb() - --- Cleanup -'scp' build~statusfile() , - 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname -call SysFileDelete build~statusfile -return - - - -/*----------------------------------------------------------------------------*/ -/* Class: build */ -/*----------------------------------------------------------------------------*/ - -::class build public -::method init -return - -/*----------------------------------------------------------------------------*/ -/* Attributes: */ -/*----------------------------------------------------------------------------*/ - -::attribute svnrevision -::attribute homedir -::attribute targetdir -::attribute builddir -- the temp build dir -::attribute osname -::attribute builddate -::attribute statusfile - -/*----------------------------------------------------------------------------*/ -/* Method: log */ -/*----------------------------------------------------------------------------*/ - -::method log --- log messages -use strict arg msg -strm = .stream~new(self~statusfile()) -strm~open('write append') -msg = date('S') time('N') msg -say msg -strm~lineout(msg) -strm~close() -return - -/*----------------------------------------------------------------------------*/ -/* Method: getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -::method getsvnrevision -verlocal = './temp.ver' -'svnversion >' verlocal -strm = .stream~new(verlocal) -retc = strm~open('read') -if retc <> 'READY:' then return '' -svnver = strm~lineIn() -retc = strm~close() -if svnver = '' then svnver = 'unknown' -return svnver - -/*----------------------------------------------------------------------------*/ -/* build_deb */ -/*----------------------------------------------------------------------------*/ - -::method build_deb -use strict arg -self~log('Starting build.') -savedir = directory() -buildrpt = self~osname'.buildrpt.txt' --- create temp dir and checkout the source -'mkdir' self~builddir() -call directory self~builddir() -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/ ./' -svnver = self~getsvnrevision() -if \datatype(svnver, 'W') then do - self~log('Subversion checkout failed.') - return - end -newdir = self~targetdir'/'svnver'/'self~osname -if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do - -- build the deb - self~log('Building SVN revision' svnver'.') - './bootstrap 2>&1 | tee -a' buildrpt - './configure --disable-static 2>&1 | tee -a' buildrpt - 'make deb 2>&1 | tee -a' buildrpt - -- copy the results to the host - 'ssh da...@bu... "mkdir -p' newdir'"' - 'scp ../oorexx*.deb da...@bu...:'newdir - 'scp' buildrpt 'da...@bu...:'newdir - end -else self~log('This was a duplicate build request for SVN revision' svnver'.') --- remove everything -call directory savedir -'rm -rf' self~builddir() -'rm oorexx*.deb' -self~log('Finished build.') -return - -/*----------------------------------------------------------------------------*/ -/* Method: targetexist */ -/*----------------------------------------------------------------------------*/ - -::method targetexists -use strict arg userid, host, target -tempf = '/tmp/orxbuild.tmp' -'ssh' userid'@'host '"ls -l' target'" >' tempf -strm = .stream~new(tempf) -strm~open('read') -arr = strm~arrayin() -strm~close() -if arr~items() = 0 then return .false -if arr[1]~pos('cannot access') > 0 then return .false -return .true - Deleted: websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) +++ websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -1,201 +0,0 @@ -#!/usr/bin/rexx -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: This is the build script for the docs build machine. */ -/* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- platform specific variables! --- osname = 'fedora13-i386' -osname = 'fedora13-docs' --- osname = 'fedora13-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' --- osname = 'SLES11-s390x' --- osname = 'winxpsp3-i386' - --- Initialization -build = .build~new() -build~homedir = '/home/'userid() -- always do first! -build~builddir = build~homedir'/buildorx' -build~targetdir = '/pub/www/build/docroot/builds/docs' -build~osname = osname -build~builddate = date('S') -build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname - --- Set our home directory -call directory build~homedir - --- Do the build -build~build_docs() - --- Cleanup -'scp' build~statusfile() , - 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname -call SysFileDelete build~statusfile -return - - -/*----------------------------------------------------------------------------*/ -/* Class: build */ -/*----------------------------------------------------------------------------*/ - -::class build public -::method init -return - -/*----------------------------------------------------------------------------*/ -/* Attributes: */ -/*----------------------------------------------------------------------------*/ - -::attribute svnrevision -::attribute homedir -::attribute targetdir -::attribute builddir -- the temp build dir -::attribute osname -::attribute builddate -::attribute statusfile - -/*----------------------------------------------------------------------------*/ -/* build_docs */ -/*----------------------------------------------------------------------------*/ - -::method build_docs -use strict arg -self~log('Starting build.') -buildrpt = './docs-buildrpt.txt' -savedir = directory() --- create temp dir and checkout the source -tempdir = './builddocs' -'rm -rf' tempdir -- make sure the subdir is erased -'mkdir' tempdir -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/docs/trunk' tempdir -call directory tempdir --- see if we have already built this revision -svnver = self~getsvnrevision() -if \datatype(svnver, 'W') then do - self~log('Subversion checkout failed.') - return - end -newdir = self~targetdir'/'svnver -if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do - -- build the docs - self~log('Building SVN revision' svnver'.') - 'make all 2>&1 | tee -a' buildrpt - -- copy the results to the host - 'ssh da...@bu... "mkdir' newdir'"' - 'scp ./oodialog/oodialog.pdf da...@bu...:'newdir - 'scp ./oodialog/oodialog-html.zip da...@bu...:'newdir - 'scp ./readme/readme.pdf da...@bu...:'newdir - 'scp ./readme/readme.html da...@bu...:'newdir - 'scp ./rexxpg/rexxpg.pdf da...@bu...:'newdir - 'scp ./rexxpg/rexxpg-html.zip da...@bu...:'newdir - 'scp ./rexxref/rexxref.pdf da...@bu...:'newdir - 'scp ./rexxref/rexxref-html.zip da...@bu...:'newdir - 'scp ./rxftp/rxftp.pdf da...@bu...:'newdir - 'scp ./rxftp/rxftp-html.zip da...@bu...:'newdir - 'scp ./rxmath/rxmath.pdf da...@bu...:'newdir - 'scp ./rxmath/rxmath-html.zip da...@bu...:'newdir - 'scp ./rxsock/rxsock.pdf da...@bu...:'newdir - 'scp ./rxsock/rxsock-html.zip da...@bu...:'newdir - 'scp ./rexxextensions/rexxextensions.pdf da...@bu...:'newdir - 'scp ./rexxextensions/rexxextensions-html.zip da...@bu...:'newdir - 'scp ./winextensions/winextensions.pdf da...@bu...:'newdir - 'scp ./winextensions/winextensions-html.zip da...@bu...:'newdir - 'scp' buildrpt 'da...@bu...:'newdir - end -else self~log('This was a duplicate build request.') --- remove everything -call directory savedir -'rm -rf' tempdir -self~log('Finished build.') --- shutdown the system --- 'sudo shutdown -h now' -return - -/*----------------------------------------------------------------------------*/ -/* Method: getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -::method getsvnrevision -verlocal = './temp.ver' -'svnversion >' verlocal -strm = .stream~new(verlocal) -retc = strm~open('read') -if retc <> 'READY:' then return '' -svnver = strm~lineIn() -retc = strm~close() -if svnver = '' then svnver = 'unknown' -return svnver - - -/*----------------------------------------------------------------------------*/ -/* log */ -/*----------------------------------------------------------------------------*/ - -::method log --- log messages -use strict arg msg -use strict arg msg -msg = date('S') time('N') msg -say msg -strm = .stream~new(self~statusfile) -strm~open('write append') -strm~lineout(msg) -strm~close() -return - - -/*----------------------------------------------------------------------------*/ -/* Method: targetexist */ -/*----------------------------------------------------------------------------*/ - -::method targetexists -use strict arg userid, host, target -tempf = '/tmp/orxbuild.tmp' -'ssh' userid'@'host '"ls -l' target'" >' tempf -strm = .stream~new(tempf) -strm~open('read') -arr = strm~arrayin() -strm~close() -if arr~items() = 0 then return .false -if arr[1]~pos('cannot access') > 0 then return .false -return .true - Deleted: websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-19 18:35:23 UTC (rev 6121) +++ websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-19 18:41:59 UTC (rev 6122) @@ -1,197 +0,0 @@ -#!/usr/bin/rexx -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: This is the build script for any rpm-based build machine. */ -/* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- platform specific variables! -osname = 'fedora13-i386' --- osname = 'fedora13-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' --- osname = 'SLES10-s390x' --- osname = 'winxpsp3-i386' - --- Initialization -build = .build~new() -build~homedir = '/home/'userid() -- always do first! - -build~builddir = build~homedir'/buildorx' --- build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu - -build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' -build~osname = osname -build~builddate = date('S') -build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname --- Move to our home directory -call directory build~homedir - --- Do the build -build~build_rpm() - --- Cleanup -'scp' build~statusfile() , - 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname -call SysFileDelete build~statusfile -return - - -/*----------------------------------------------------------------------------*/ -/* Class: build */ -/*----------------------------------------------------------------------------*/ - -::class build public -::method init -return - -/*----------------------------------------------------------------------------*/ -/* Attributes: */ -/*------------... [truncated message content] |
From: <wda...@us...> - 2010-08-19 20:30:44
|
Revision: 6123 http://oorexx.svn.sourceforge.net/oorexx/?rev=6123&view=rev Author: wdashley Date: 2010-08-19 20:30:37 +0000 (Thu, 19 Aug 2010) Log Message: ----------- Add lockfile support to the build scripts. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-08-19 18:41:59 UTC (rev 6122) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-08-19 20:30:37 UTC (rev 6123) @@ -59,6 +59,7 @@ build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname +build~lockfile = '/tmp/ooRexxBuild.lock' -- Set our home directory call directory build~homedir @@ -71,6 +72,7 @@ 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname call SysFileDelete build~statusfile +call SysFileDelete build~lockfile return @@ -94,43 +96,18 @@ ::attribute osname ::attribute builddate ::attribute statusfile +::attribute lockfile /*----------------------------------------------------------------------------*/ -/* Method: log */ -/*----------------------------------------------------------------------------*/ - -::method log --- log messages -use strict arg msg -strm = .stream~new(self~statusfile()) -strm~open('write append') -msg = date('S') time('N') msg -say msg -strm~lineout(msg) -strm~close() -return - -/*----------------------------------------------------------------------------*/ -/* Method: getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -::method getsvnrevision -verlocal = './temp.ver' -'svnversion >' verlocal -strm = .stream~new(verlocal) -retc = strm~open('read') -if retc <> 'READY:' then return '' -svnver = strm~lineIn() -retc = strm~close() -if svnver = '' then svnver = 'unknown' -return svnver - -/*----------------------------------------------------------------------------*/ /* build_deb */ /*----------------------------------------------------------------------------*/ ::method build_deb use strict arg +do while stream(self~lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +'touch' self~lockfile self~log('Starting build.') savedir = directory() buildrpt = self~osname'.buildrpt.txt' @@ -161,6 +138,7 @@ 'rm -rf' self~builddir() 'rm oorexx*.deb' self~log('Finished build.') +'rm' self~lockfile return /*----------------------------------------------------------------------------*/ @@ -179,3 +157,33 @@ if arr[1]~pos('cannot access') > 0 then return .false return .true +/*----------------------------------------------------------------------------*/ +/* Method: log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +strm = .stream~new(self~statusfile()) +strm~open('write append') +msg = date('S') time('N') msg +say msg +strm~lineout(msg) +strm~close() +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-08-19 18:41:59 UTC (rev 6122) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-08-19 20:30:37 UTC (rev 6123) @@ -58,6 +58,7 @@ build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname +build~lockfile = '/tmp/ooRexxDocsBuild.lock' -- Set our home directory call directory build~homedir @@ -70,6 +71,7 @@ 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname call SysFileDelete build~statusfile +call SysFileDelete build~lockfile return @@ -92,6 +94,7 @@ ::attribute osname ::attribute builddate ::attribute statusfile +::attribute lockfile /*----------------------------------------------------------------------------*/ /* build_docs */ @@ -99,6 +102,10 @@ ::method build_docs use strict arg +do while stream(self~lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +'touch' self~lockfile self~log('Starting build.') buildrpt = './docs-buildrpt.txt' savedir = directory() @@ -146,8 +153,7 @@ call directory savedir 'rm -rf' tempdir self~log('Finished build.') --- shutdown the system --- 'sudo shutdown -h now' +'rm' self~lockfile return /*----------------------------------------------------------------------------*/ Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-08-19 18:41:59 UTC (rev 6122) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-08-19 20:30:37 UTC (rev 6123) @@ -60,6 +60,8 @@ build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname +build~lockfile = '/tmp/ooRexxBuild.lock' + -- Move to our home directory call directory build~homedir @@ -71,6 +73,7 @@ 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname call SysFileDelete build~statusfile +call SysFileDelete build~lockfile return @@ -93,42 +96,17 @@ ::attribute osname ::attribute builddate ::attribute statusfile +::attribute lockfile /*----------------------------------------------------------------------------*/ -/* Method: log */ -/*----------------------------------------------------------------------------*/ - -::method log --- log messages -use strict arg msg -msg = date('S') time('N') msg -say msg -strm = .stream~new(self~statusfile) -strm~open('write append') -strm~lineout(msg) -strm~close() -return - -/*----------------------------------------------------------------------------*/ -/* Method: getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -::method getsvnrevision -verlocal = './temp.ver' -'svnversion >' verlocal -strm = .stream~new(verlocal) -retc = strm~open('read') -if retc <> 'READY:' then return '' -svnver = strm~lineIn() -retc = strm~close() -if svnver = '' then svnver = 'unknown' -return svnver - -/*----------------------------------------------------------------------------*/ /* Method: build_rpm */ /*----------------------------------------------------------------------------*/ ::method build_rpm +do while stream(self~lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +'touch' self~lockfile self~log('Starting build.') buildrpt = self~osname'.buildrpt.txt' savedir = directory() @@ -176,6 +154,7 @@ call directory savedir 'rm -rf' self~builddir self~log('Finished build.') +'rm' self~lockfile return @@ -195,3 +174,33 @@ if arr[1]~pos('cannot access') > 0 then return .false return .true +/*----------------------------------------------------------------------------*/ +/* Method: log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +msg = date('S') time('N') msg +say msg +strm = .stream~new(self~statusfile) +strm~open('write append') +strm~lineout(msg) +strm~close() +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + Modified: websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2010-08-19 18:41:59 UTC (rev 6122) +++ websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2010-08-19 20:30:37 UTC (rev 6123) @@ -51,6 +51,7 @@ osname = 'winxpsp3-i386' targetdir = hostbuilds'\www\build\docroot\builds\interpreter-main' startbuildtime = 165 -- 2:45 AM +lockfile = 'c:\ooRexxBuild.lock' -- make sure our temp dir is empty 'rmdir /S /Q' builddir @@ -77,6 +78,11 @@ dobuild: builddate = date('S') -- do this first!!!! +do while stream(lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +call lineout lockfile, '' +call lineout lockfile call log 'Starting build.' -- create temp dir and checkout the source 'md' builddir @@ -115,6 +121,7 @@ call directory 'c:\' 'rmdir /S /Q' builddir call log 'Finished build.' +'del' lockfile return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-09-21 00:34:25
|
Revision: 6207 http://oorexx.svn.sourceforge.net/oorexx/?rev=6207&view=rev Author: wdashley Date: 2010-09-21 00:34:18 +0000 (Tue, 21 Sep 2010) Log Message: ----------- Updates to support dynamic builds. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-19 05:27:10 UTC (rev 6206) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-21 00:34:18 UTC (rev 6207) @@ -57,10 +57,13 @@ build~builddir = build~homedir'/buildorx' build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname -build~builddate = date('S') +build~builddate = date('S') || '-' || right(time('S'), 5, '0') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxBuild.lock' +-- get the command line arguments +call parse_cmd_line arg(1)~strip(), build + -- Set our home directory call directory build~homedir @@ -71,6 +74,7 @@ 'scp' build~statusfile() , 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname +build~email_result() call SysFileDelete build~statusfile call SysFileDelete build~lockfile return @@ -97,6 +101,8 @@ ::attribute builddate ::attribute statusfile ::attribute lockfile +::attribute src +::attribute email /*----------------------------------------------------------------------------*/ /* build_deb */ @@ -114,7 +120,7 @@ -- create temp dir and checkout the source 'mkdir' self~builddir() call directory self~builddir() -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/ ./' +'svn co' self~src() self~builddir svnver = self~getsvnrevision() if \datatype(svnver, 'W') then do self~log('Subversion checkout failed.') @@ -131,6 +137,7 @@ 'ssh da...@bu... "mkdir -p' newdir'"' 'scp ../oorexx*.deb da...@bu...:'newdir 'scp' buildrpt 'da...@bu...:'newdir + self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) end else self~log('This was a duplicate build request for SVN revision' svnver'.') -- remove everything @@ -187,3 +194,45 @@ if svnver = '' then svnver = 'unknown' return svnver +/*----------------------------------------------------------------------------*/ +/* Method: email_result */ +/*----------------------------------------------------------------------------*/ + +::method email_result +if self~email() = '' then return +tmpemail = .stream~new('tmpemail.txt') +tmpemail~open('write replace') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~lineout('') +statstrm = .stream~new(self~statusfile()) +statstrm~open(read) +arr = statstrm~arrayin() +statstrm~close() +do line over arr + tmpemail~lineout(line) + end +tmpemail~lineout('') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~close() +'mailx -s "Your ooRexx Build Is Ready" -r bu...@bu...' self~email() '< tmpemail.txt' +call SysFileDelete 'tmpemail.txt' +return + +/*----------------------------------------------------------------------------*/ +/* Routine: parse_cmd_line */ +/*----------------------------------------------------------------------------*/ + +::routine parse_cmd_line +use strict arg cmdline, build +argc = cmdline~words() +if argc > 0 then build~src = cmdline~word(1) +else build~src = 'trunk' +select + when build~src = 'branch' then build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' + otherwise build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + end +if argc > 1 then build~email = cmdline~word(2) +else build~email = '' +-- just ignore everything else on the cmdline +return + Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-09-19 05:27:10 UTC (rev 6206) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-09-21 00:34:18 UTC (rev 6207) @@ -56,9 +56,10 @@ build~builddir = build~homedir'/buildorx' build~targetdir = '/pub/www/build/docroot/builds/docs' build~osname = osname -build~builddate = date('S') +build~builddate = date('S') || '-' || right(time('S'), 5, '0') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxDocsBuild.lock' +build~email = arg(1)~strip() -- Set our home directory call directory build~homedir @@ -70,6 +71,7 @@ 'scp' build~statusfile() , 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname +build~email_result() call SysFileDelete build~statusfile call SysFileDelete build~lockfile return @@ -95,6 +97,7 @@ ::attribute builddate ::attribute statusfile ::attribute lockfile +::attribute email /*----------------------------------------------------------------------------*/ /* build_docs */ @@ -149,6 +152,7 @@ 'scp ./unixextensions/unixextensions.pdf da...@bu...:'newdir 'scp ./unixextensions/unixextensions-html.zip da...@bu...:'newdir 'scp' buildrpt 'da...@bu...:'newdir + self~log('The build is located at http://build.oorexx.org/builds/docs/'svnver'/') end else self~log('This was a duplicate build request.') -- remove everything @@ -207,3 +211,27 @@ if arr[1]~pos('cannot access') > 0 then return .false return .true +/*----------------------------------------------------------------------------*/ +/* Method: email_result */ +/*----------------------------------------------------------------------------*/ + +::method email_result +if self~email() = '' then return +tmpemail = .stream~new('tmpemail.txt') +tmpemail~open('write replace') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~lineout('') +statstrm = .stream(self~statusfile()) +statstrm~open(read) +arr = statstrm~arrayin() +statstrm~close() +do line over ayy + tmpemail~lineout(line) + end +tmpemail~lineout('') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpstrm~close() +'mailx -s "Your ooRexx Build Is Ready" -r bui...@bu...' self~email() '< tmpemail.txt' +call SysFileDelete 'tmpemail.txt' +return + Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-19 05:27:10 UTC (rev 6206) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-21 00:34:18 UTC (rev 6207) @@ -58,10 +58,13 @@ build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname -build~builddate = date('S') +build~builddate = date('S') || '-' || right(time('S'), 5, '0') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxBuild.lock' +-- get the command line arguments +call parse_cmd_line arg(1)~strip(), build + -- Move to our home directory call directory build~homedir @@ -72,6 +75,7 @@ 'scp' build~statusfile() , 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, build~builddate() || '-' || build~osname +build~email_result() call SysFileDelete build~statusfile call SysFileDelete build~lockfile return @@ -97,6 +101,8 @@ ::attribute builddate ::attribute statusfile ::attribute lockfile +::attribute src +::attribute email /*----------------------------------------------------------------------------*/ /* Method: build_rpm */ @@ -113,7 +119,7 @@ -- create temp dir and checkout the source 'rm -rf' self~builddir -- make sure the subdir is erased 'mkdir' self~builddir -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' self~builddir +'svn co' self~src() self~builddir call directory self~builddir -- see if we have already built this revision svnver = self~getsvnrevision() @@ -122,7 +128,7 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false | self~src <> 'trunk' then do -- build the rpm self~log('Building SVN revision' svnver'.') './bootstrap 2>&1 | tee -a' buildrpt @@ -130,22 +136,23 @@ 'make rpm 2>&1 | tee -a' buildrpt -- copy the results to the host 'ssh da...@bu... "mkdir -p' newdir'"' - if SysIsFileDirectory('./rpm/RPMS/i386') then , - 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/i486') then , - 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/i586') then , - 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/i686') then , - 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/x86_64') then , - 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/s390x') then , - 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('./rpm/RPMS/s390') then , - 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir + if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i386') then , + 'scp ~/rpmbuild/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i486') then , + 'scp ~/rpmbuild/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i586') then , + 'scp ~/rpmbuild/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i686') then , + 'scp ~/rpmbuild/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/x86_64') then , + 'scp ~/rpmbuild/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390x') then , + 'scp ~/rpmbuild/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir + else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390') then , + 'scp ~/rpmbuild/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir else nop -- it must not be a supported rpm type 'scp' buildrpt 'da...@bu...:'newdir + self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) end else do self~log('This was a duplicate build request for SVN revision' svnver'.') @@ -204,3 +211,45 @@ if svnver = '' then svnver = 'unknown' return svnver +/*----------------------------------------------------------------------------*/ +/* Method: email_result */ +/*----------------------------------------------------------------------------*/ + +::method email_result +if self~email() = '' then return +tmpemail = .stream~new('tmpemail.txt') +tmpemail~open('write replace') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~lineout('') +statstrm = .stream~new(self~statusfile()) +statstrm~open(read) +arr = statstrm~arrayin() +statstrm~close() +do line over arr + tmpemail~lineout(line) + end +tmpemail~lineout('') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~close() +'mailx -s "Your ooRexx Build Is Ready" -r bu...@bu...' self~email() '< tmpemail.txt' +call SysFileDelete 'tmpemail.txt' +return + +/*----------------------------------------------------------------------------*/ +/* Routine: parse_cmd_line */ +/*----------------------------------------------------------------------------*/ + +::routine parse_cmd_line +use strict arg cmdline, build +argc = cmdline~words() +if argc > 0 then build~src = cmdline~word(1) +else build~src = 'trunk' +select + when build~src = 'branch' then build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' + otherwise build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + end +if argc > 1 then build~email = cmdline~word(2) +else build~email = '' +-- just ignore everything else on the cmdline +return + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-09-25 22:55:16
|
Revision: 6224 http://oorexx.svn.sourceforge.net/oorexx/?rev=6224&view=rev Author: wdashley Date: 2010-09-25 22:55:09 +0000 (Sat, 25 Sep 2010) Log Message: ----------- Fix the timestamp for the status file name. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-25 16:40:14 UTC (rev 6223) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-25 22:55:09 UTC (rev 6224) @@ -57,7 +57,7 @@ build~builddir = build~homedir'/buildorx' build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname -build~builddate = date('S') || '-' || right(time('S'), 5, '0') +build~builddate = date('S') || '-' || changestr(':', time(), '') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxBuild.lock' Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-09-25 16:40:14 UTC (rev 6223) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-09-25 22:55:09 UTC (rev 6224) @@ -56,7 +56,7 @@ build~builddir = build~homedir'/buildorx' build~targetdir = '/pub/www/build/docroot/builds/docs' build~osname = osname -build~builddate = date('S') || '-' || right(time('S'), 5, '0') +build~builddate = date('S') || '-' || changestr(':', time(), '') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxDocsBuild.lock' build~email = arg(1)~strip() Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-25 16:40:14 UTC (rev 6223) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-25 22:55:09 UTC (rev 6224) @@ -58,7 +58,7 @@ build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname -build~builddate = date('S') || '-' || right(time('S'), 5, '0') +build~builddate = date('S') || '-' || changestr(':', time(), '') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxBuild.lock' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-09-28 16:39:22
|
Revision: 6228 http://oorexx.svn.sourceforge.net/oorexx/?rev=6228&view=rev Author: wdashley Date: 2010-09-28 16:39:15 +0000 (Tue, 28 Sep 2010) Log Message: ----------- Remove test for duplicate builds. Fix syntax error in buildall.rex. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/buildall.rex websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Modified: websites/build/trunk/docroot/builds/scripts/buildall.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/buildall.rex 2010-09-27 20:50:15 UTC (rev 6227) +++ websites/build/trunk/docroot/builds/scripts/buildall.rex 2010-09-28 16:39:15 UTC (rev 6228) @@ -85,8 +85,8 @@ return ::method do_build +expose osname addr userid cmd virt_flag use strict arg cmdargs -expose osname addr userid cmd virt_flag if virt_flag = .true then do -- start the domain domain = .kvmdomain~new(osname) Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-27 20:50:15 UTC (rev 6227) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-28 16:39:15 UTC (rev 6228) @@ -127,19 +127,16 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do - -- build the deb - self~log('Building SVN revision' svnver'.') - './bootstrap 2>&1 | tee -a' buildrpt - './configure --disable-static 2>&1 | tee -a' buildrpt - 'make deb 2>&1 | tee -a' buildrpt - -- copy the results to the host - 'ssh da...@bu... "mkdir -p' newdir'"' - 'scp ../oorexx*.deb da...@bu...:'newdir - 'scp' buildrpt 'da...@bu...:'newdir - self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) - end -else self~log('This was a duplicate build request for SVN revision' svnver'.') +-- build the deb +self~log('Building SVN revision' svnver'.') +'./bootstrap 2>&1 | tee -a' buildrpt +'./configure --disable-static 2>&1 | tee -a' buildrpt +'make deb 2>&1 | tee -a' buildrpt +-- copy the results to the host +'ssh da...@bu... "mkdir -p' newdir'"' +'scp ../oorexx*.deb da...@bu...:'newdir +'scp' buildrpt 'da...@bu...:'newdir +self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) -- remove everything call directory savedir 'rm -rf' self~builddir() Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-27 20:50:15 UTC (rev 6227) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-28 16:39:15 UTC (rev 6228) @@ -128,35 +128,30 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false | self~src <> 'trunk' then do - -- build the rpm - self~log('Building SVN revision' svnver'.') - './bootstrap 2>&1 | tee -a' buildrpt - './configure 2>&1 | tee -a' buildrpt - 'make rpm 2>&1 | tee -a' buildrpt - -- copy the results to the host - 'ssh da...@bu... "mkdir -p' newdir'"' - if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i386') then , - 'scp ~/rpmbuild/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i486') then , - 'scp ~/rpmbuild/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i586') then , - 'scp ~/rpmbuild/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i686') then , - 'scp ~/rpmbuild/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/x86_64') then , - 'scp ~/rpmbuild/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390x') then , - 'scp ~/rpmbuild/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir - else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390') then , - 'scp ~/rpmbuild/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir - else nop -- it must not be a supported rpm type - 'scp' buildrpt 'da...@bu...:'newdir - self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) - end -else do - self~log('This was a duplicate build request for SVN revision' svnver'.') - end +-- build the rpm +self~log('Building SVN revision' svnver'.') +'./bootstrap 2>&1 | tee -a' buildrpt +'./configure 2>&1 | tee -a' buildrpt +'make rpm 2>&1 | tee -a' buildrpt +-- copy the results to the host +'ssh da...@bu... "mkdir -p' newdir'"' +if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i386') then , + 'scp ~/rpmbuild/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir +else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i486') then , + 'scp ~/rpmbuild/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir +else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i586') then , + 'scp ~/rpmbuild/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir +else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i686') then , + 'scp ~/rpmbuild/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir +else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/x86_64') then , + 'scp ~/rpmbuild/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir +else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390x') then , + 'scp ~/rpmbuild/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir +else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390') then , + 'scp ~/rpmbuild/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir +else nop -- it must not be a supported rpm type +'scp' buildrpt 'da...@bu...:'newdir +self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) -- remove everything call directory savedir 'rm -rf' self~builddir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-09-30 19:08:40
|
Revision: 6236 http://oorexx.svn.sourceforge.net/oorexx/?rev=6236&view=rev Author: wdashley Date: 2010-09-30 19:08:34 +0000 (Thu, 30 Sep 2010) Log Message: ----------- Fix so the the build rpt is uniquely named. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-30 18:10:34 UTC (rev 6235) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-30 19:08:34 UTC (rev 6236) @@ -41,22 +41,12 @@ /*----------------------------------------------------------------------------*/ --- platform specific variables! --- osname = 'fedora13-i386' --- osname = 'fedora13-x86_64' -osname = 'ubuntu1004-i386' --- osname = 'ubuntu1004-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' --- osname = 'SLES10-s390x' --- osname = 'winxpsp3-i386' - -- Initialization build = .build~new() build~homedir = '/home/'userid() -- always do first! +call localize(build, build~homedir()'/orxbuildlocal.txt') build~builddir = build~homedir'/buildorx' build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' -build~osname = osname build~builddate = date('S') || '-' || changestr(':', time(), '') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxBuild.lock' @@ -102,6 +92,7 @@ ::attribute statusfile ::attribute lockfile ::attribute src +::attribute location -- the build type ie. branch4.1.0 ::attribute email /*----------------------------------------------------------------------------*/ @@ -116,7 +107,7 @@ 'touch' self~lockfile self~log('Starting build.') savedir = directory() -buildrpt = self~osname'.buildrpt.txt' +buildrpt = self~osname()'.'self~location()'.buildrpt.txt' -- create temp dir and checkout the source 'mkdir' self~builddir() call directory self~builddir() @@ -222,14 +213,35 @@ ::routine parse_cmd_line use strict arg cmdline, build argc = cmdline~words() -if argc > 0 then build~src = cmdline~word(1) -else build~src = 'trunk' +if argc > 0 then build~location = cmdline~word(1) +else build~location = 'trunk' select - when build~src = 'branch' then build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' - otherwise build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + when build~location = 'branch' then do + build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' + build~location = 'branch4.1.0' + end + otherwise do + build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + end end if argc > 1 then build~email = cmdline~word(2) else build~email = '' -- just ignore everything else on the cmdline return +/*----------------------------------------------------------------------------*/ +/* Routine: localize */ +/*----------------------------------------------------------------------------*/ + +::routine localize +-- set the osname and possibly other build object attributes +use strict arg ifile +strm = .stream~new(ifile) +strm~open('read') +arr = strm~arrayin() +strm~close() +do line over arr + interpret line + end +return + Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-09-30 18:10:34 UTC (rev 6235) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2010-09-30 19:08:34 UTC (rev 6236) @@ -41,16 +41,8 @@ /*----------------------------------------------------------------------------*/ --- platform specific variables! --- osname = 'fedora13-i386' -osname = 'fedora13-docs' --- osname = 'fedora13-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' --- osname = 'SLES11-s390x' --- osname = 'winxpsp3-i386' - -- Initialization +osname = 'fedora13-docs' build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-30 18:10:34 UTC (rev 6235) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-30 19:08:34 UTC (rev 6236) @@ -41,23 +41,15 @@ /*----------------------------------------------------------------------------*/ --- platform specific variables! -osname = 'fedora13-i386' --- osname = 'fedora13-x86_64' --- osname = 'opensuse11-i386' --- osname = 'opensuse11-x86_64' --- osname = 'SLES10-s390x' --- osname = 'winxpsp3-i386' - -- Initialization build = .build~new() build~homedir = '/home/'userid() -- always do first! +call localize(build, build~homedir()'/orxbuildlocal.txt') build~builddir = build~homedir'/buildorx' -- build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' -build~osname = osname build~builddate = date('S') || '-' || changestr(':', time(), '') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname build~lockfile = '/tmp/ooRexxBuild.lock' @@ -102,6 +94,7 @@ ::attribute statusfile ::attribute lockfile ::attribute src +::attribute location -- the build type ie. branch4.1.0 ::attribute email /*----------------------------------------------------------------------------*/ @@ -114,7 +107,7 @@ end 'touch' self~lockfile self~log('Starting build.') -buildrpt = self~osname'.buildrpt.txt' +buildrpt = self~osname()'.'self~location()'.buildrpt.txt' savedir = directory() -- create temp dir and checkout the source 'rm -rf' self~builddir -- make sure the subdir is erased @@ -237,14 +230,35 @@ ::routine parse_cmd_line use strict arg cmdline, build argc = cmdline~words() -if argc > 0 then build~src = cmdline~word(1) -else build~src = 'trunk' +if argc > 0 then build~location = cmdline~word(1) +else build~location = 'trunk' select - when build~src = 'branch' then build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' - otherwise build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + when build~location = 'branch' then do + build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' + build~location = 'branch4.1.0' + end + otherwise do + build~src = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + end end if argc > 1 then build~email = cmdline~word(2) else build~email = '' -- just ignore everything else on the cmdline return +/*----------------------------------------------------------------------------*/ +/* Routine: localize */ +/*----------------------------------------------------------------------------*/ + +::routine localize +-- set the osname and possibly other build object attributes +use strict arg build, ifile +strm = .stream~new(ifile) +strm~open('read') +arr = strm~arrayin() +strm~close() +do line over arr + interpret line + end +return + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-10-01 14:15:25
|
Revision: 6237 http://oorexx.svn.sourceforge.net/oorexx/?rev=6237&view=rev Author: wdashley Date: 2010-10-01 14:15:15 +0000 (Fri, 01 Oct 2010) Log Message: ----------- Fix syntax error. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-09-30 19:08:34 UTC (rev 6236) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-10-01 14:15:15 UTC (rev 6237) @@ -44,7 +44,7 @@ -- Initialization build = .build~new() build~homedir = '/home/'userid() -- always do first! -call localize(build, build~homedir()'/orxbuildlocal.txt') +call localize build, build~homedir()'/orxbuildlocal.txt' build~builddir = build~homedir'/buildorx' build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~builddate = date('S') || '-' || changestr(':', time(), '') Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-09-30 19:08:34 UTC (rev 6236) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-10-01 14:15:15 UTC (rev 6237) @@ -44,7 +44,7 @@ -- Initialization build = .build~new() build~homedir = '/home/'userid() -- always do first! -call localize(build, build~homedir()'/orxbuildlocal.txt') +call localize build, build~homedir()'/orxbuildlocal.txt' build~builddir = build~homedir'/buildorx' -- build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2010-10-17 22:32:48
|
Revision: 6299 http://oorexx.svn.sourceforge.net/oorexx/?rev=6299&view=rev Author: wdashley Date: 2010-10-17 22:32:41 +0000 (Sun, 17 Oct 2010) Log Message: ----------- Add statement to ensure the correct group ownership of files. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-10-14 20:05:13 UTC (rev 6298) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2010-10-17 22:32:41 UTC (rev 6299) @@ -118,6 +118,7 @@ 'ssh da...@bu... "mkdir -p' newdir'"' 'scp ../oorexx*.deb da...@bu...:'newdir 'scp' buildrpt 'da...@bu...:'newdir +'ssh da...@bu... "chown -R dashley:users 'self~targetdir'"' self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) -- remove everything call directory savedir Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-10-14 20:05:13 UTC (rev 6298) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2010-10-17 22:32:41 UTC (rev 6299) @@ -130,6 +130,7 @@ 'scp ~/rpmbuild/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir else nop -- it must not be a supported rpm type 'scp' buildrpt 'da...@bu...:'newdir +'ssh da...@bu... "chown -R dashley:users 'self~targetdir'"' self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) -- remove everything call directory savedir This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2011-04-07 19:33:18
|
Revision: 6911 http://oorexx.svn.sourceforge.net/oorexx/?rev=6911&view=rev Author: wdashley Date: 2011-04-07 19:33:11 +0000 (Thu, 07 Apr 2011) Log Message: ----------- Get ready for a reorg. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/buildall.rex websites/build/trunk/docroot/builds/scripts/kvmdomain.cls websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex Added Paths: ----------- websites/build/trunk/docroot/builds/scripts/guests/ websites/build/trunk/docroot/builds/scripts/host/ Modified: websites/build/trunk/docroot/builds/scripts/buildall.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/buildall.rex 2011-04-07 03:13:15 UTC (rev 6910) +++ websites/build/trunk/docroot/builds/scripts/buildall.rex 2011-04-07 19:33:11 UTC (rev 6911) @@ -3,7 +3,7 @@ /* */ /* Description: Build ooRexx on all build machines. */ /* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the Common Public License v1.0 which accompanies this */ @@ -41,78 +41,45 @@ /*----------------------------------------------------------------------------*/ --- initialization -machines = 'orxbuildmachines.txt' +-- This script should be invoked as follows: +-- +-- buildall.rex [location [machine [email]]] +-- +-- where +-- +-- location - (optional) the build type - trunk or branch +-- machine - (optional) the target virtual machine +-- email - (optional) The email address for the build report --- get the contentst of the input file and create the build array -arr = file_arrayin(machines) -buildarr = .array~new() -do line over arr - if line~strip() = '' then iterate - if line~strip()~substr(1, 1) = '#' then iterate - if line~strip()~substr(1, 2) = '--' then iterate - parse var line osname addr userid cmd virt_flag . - buildarr~append(.buildmachine~new(osname, addr, userid, cmd, virt_flag)) - end -cmdargs = arg(1)~strip() - --- do all the virtual builds -do machine over buildarr - machine~do_build(cmdargs) +-- initialization +cmdline = arg(1)~strip() +parse var cmdline location specific_machine email . +if location = 'branch' then do + cmdargs = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' + cmdargs = cmdargs '/pub/www/build/docroot/builds/interpreter-main' + cmdargs = cmdargs email end -return +else do -- trunk + cmdargs = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + cmdargs = cmdargs '/pub/www/build/docroot/builds/interpreter-main' + cmdargs = cmdargs email + end +cmdargs = cmdargs~strip() +machines = './orxbuildmachines.txt' +-- get the contentst of the input file and create the build array +buildmachines = .buildmachines~new(machines) -::requires 'kvmdomain.cls' - - -/*----------------------------------------------------------------------------*/ -/* Class: buildmachine */ -/*----------------------------------------------------------------------------*/ - -::class buildmachine public - -::attribute osname -::attribute addr -::attribute userid -::attribute cmd -::attribute virt_flag - -::method init -expose osname addr userid cmd virt_flag -use strict arg osname, addr, userid, cmd, virt_flag = .true -return - -::method do_build -expose osname addr userid cmd virt_flag -use strict arg cmdargs -if virt_flag = .true then do - -- start the domain - domain = .kvmdomain~new(osname) - retc = domain~startup() - if retc <> 0 then return - call SysSleep 90 -- allow some time for the domain to fully start +-- do the build(s) +if specific_machine <> '' then do + buildmachines~build_one(specific_machine, cmdargs) end -if cmdargs = '' then cmdline = cmd -else cmdline = cmd cmdargs -'ssh' userid'@'addr '"'cmdline'"' -if virt_flag = .true then do - retc = domain~shutdown() - call SysSleep 90 -- allow some time for the domain to fully stop +else do -- do all the machines + buildmachines~build_all(cmdargs) end return -/*----------------------------------------------------------------------------*/ -/* Routine: file_arrayin */ -/*----------------------------------------------------------------------------*/ +::requires 'buildmachines.cls' -::routine file_arrayin -use strict arg file -strm = .stream~new(file) -strm~open('read') -arr = strm~arrayin() -strm~close() -return arr - Modified: websites/build/trunk/docroot/builds/scripts/kvmdomain.cls =================================================================== --- websites/build/trunk/docroot/builds/scripts/kvmdomain.cls 2011-04-07 03:13:15 UTC (rev 6910) +++ websites/build/trunk/docroot/builds/scripts/kvmdomain.cls 2011-04-07 19:33:11 UTC (rev 6911) @@ -2,7 +2,7 @@ /* */ /* Description: Manage a KVM virtual domain. */ /* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the Common Public License v1.0 which accompanies this */ Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2011-04-07 03:13:15 UTC (rev 6910) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex 2011-04-07 19:33:11 UTC (rev 6911) @@ -3,7 +3,7 @@ /* */ /* Description: This is the build daemon for any deb-based build machine. */ /* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the Common Public License v1.0 which accompanies this */ @@ -41,8 +41,19 @@ /*----------------------------------------------------------------------------*/ +-- This script should be invoked as follows: +-- +-- orxbuilddeb.rex src target [email] +-- +-- where +-- +-- src - the SVN source path +-- target - the target subdirectory path on the build server for build files +-- email - (optional) The email address for the build report + + -- Initialization -build= .build~new('./orxbuild.local.properties', arg(1)~strip()) +build= .build~new('/home/'userid()'/orxbuild.local.properties', arg(1)~strip()) -- Set our home directory call directory build~homedir @@ -51,9 +62,6 @@ build~build_deb() -- Cleanup -'scp' build~statusfile() , - 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname build~email_result() call SysFileDelete build~statusfile call SysFileDelete build~lockfile @@ -80,8 +88,9 @@ ::attribute statusfile ::attribute lockfile ::attribute src -::attribute location -- the build type ie. branch4.1.0 +::attribute location -- the build type ie. branch | trunk ::attribute email +::attribute targetsys /*----------------------------------------------------------------------------*/ /* build_deb */ @@ -115,17 +124,15 @@ './configure --disable-static 2>&1 | tee -a' buildrpt 'make deb 2>&1 | tee -a' buildrpt -- copy the results to the host -'ssh da...@bu... "mkdir -p' newdir'"' -'scp ../oorexx*.deb da...@bu...:'newdir -'scp' buildrpt 'da...@bu...:'newdir -'ssh da...@bu... "chown -R dashley:users 'self~targetdir'"' +'ssh' self~targetsys() '"mkdir -p' newdir'"' +'scp ../oorexx*.deb' self~targetsys() ':'newdir +'scp' buildrpt self~targetsys()':'newdir self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) -- remove everything call directory savedir 'rm -rf' self~builddir() 'rm oorexx*.deb' self~log('Finished build.') -'rm' self~lockfile return /*----------------------------------------------------------------------------*/ @@ -180,6 +187,7 @@ tmpemail~close() 'mailx -s "Your ooRexx Build Is Ready" -r bu...@bu...' self~email() '< tmpemail.txt' call SysFileDelete 'tmpemail.txt' +'sleep 120' -- give time for the email to be sent return /*----------------------------------------------------------------------------*/ @@ -193,25 +201,18 @@ self~osname = prop['osname'] self~homedir = prop['homedir'] self~builddir = prop['builddir'] -self~targetdir = prop['targetdir'] self~lockfile = prop['lockfile'] --- get the unsaves attributes +self~targetsys = prop['targetsys'] +-- get the unsaved attributes self~builddate = date('S') || '-' || changestr(':', time(), '') self~statusfile = self~homedir() || '/' || self~builddate() || '-' || self~osname --- get the comman line options -argc = cmdline~words() -if argc > 0 then self~location = cmdline~word(1) +-- get the command line options +parse var cmdline src target email . +self~src = src +self~targetdir = target +self~email = email +-- determine if this is a trunk or branch build +if target~pos('branches') > 0 then self~location = 'branch' else self~location = 'trunk' -select - when self~location = 'branch' then do - self~src = prop['branchsrc'] - self~location = 'branch4.1.0' - end - otherwise do - self~src = prop['trunksrc'] - end - end -if argc > 1 then self~email = cmdline~word(2) -else self~email = '' return Modified: websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2011-04-07 03:13:15 UTC (rev 6910) +++ websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex 2011-04-07 19:33:11 UTC (rev 6911) @@ -3,7 +3,7 @@ /* */ /* Description: This is the build script for the docs build machine. */ /* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the Common Public License v1.0 which accompanies this */ @@ -60,9 +60,9 @@ build~build_docs() -- Cleanup -'scp' build~statusfile() , - 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname +-- 'scp' build~statusfile() , +-- 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, +-- build~builddate() || '-' || build~osname build~email_result() call SysFileDelete build~statusfile call SysFileDelete build~lockfile @@ -110,10 +110,11 @@ 'mkdir' tempdir 'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/docs/trunk' tempdir call directory tempdir --- see if we have already built this revision svnver = self~getsvnrevision() -if \datatype(svnver, 'W') then do +if svnver = 'unknown' then do self~log('Subversion checkout failed.') + 'rm -rf' self~builddir() + 'rm' self~lockfile return end newdir = self~targetdir'/'svnver @@ -225,5 +226,6 @@ tmpstrm~close() 'mailx -s "Your ooRexx Build Is Ready" -r bui...@bu...' self~email() '< tmpemail.txt' call SysFileDelete 'tmpemail.txt' +'sleep 120' -- give time for the email to be sent return Modified: websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2011-04-07 03:13:15 UTC (rev 6910) +++ websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex 2011-04-07 19:33:11 UTC (rev 6911) @@ -3,7 +3,7 @@ /* */ /* Description: This is the build script for any rpm-based build machine. */ /* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the Common Public License v1.0 which accompanies this */ @@ -41,8 +41,19 @@ /*----------------------------------------------------------------------------*/ +-- This script should be invoked as follows: +-- +-- orxbuilddeb.rex src target [email] +-- +-- where +-- +-- src - the SVN source path +-- target - the target subdirectory path on the build server for build files +-- email - (optional) The email address for the build report + + -- Initialization -build = .build~new('./orxbuild.local.properties', arg(1)~strip()) +build = .build~new('/home/'userid()'/orxbuild.local.properties', arg(1)~strip()) -- Move to our home directory call directory build~homedir @@ -51,9 +62,6 @@ build~build_rpm() -- Cleanup -'scp' build~statusfile() , - 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, - build~builddate() || '-' || build~osname build~email_result() call SysFileDelete build~statusfile call SysFileDelete build~lockfile @@ -79,8 +87,9 @@ ::attribute statusfile ::attribute lockfile ::attribute src -::attribute location -- the build type ie. branch4.1.0 +::attribute location -- the build type ie. branch | trunk ::attribute email +::attribute targetsys /*----------------------------------------------------------------------------*/ /* Method: build_rpm */ @@ -113,29 +122,28 @@ './configure 2>&1 | tee -a' buildrpt 'make rpm 2>&1 | tee -a' buildrpt -- copy the results to the host -'ssh da...@bu... "mkdir -p' newdir'"' -if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i386') then , - 'scp ~/rpmbuild/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir -else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i486') then , - 'scp ~/rpmbuild/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir -else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i586') then , - 'scp ~/rpmbuild/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir -else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/i686') then , - 'scp ~/rpmbuild/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir -else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/x86_64') then , - 'scp ~/rpmbuild/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir -else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390x') then , - 'scp ~/rpmbuild/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir -else if SysIsFileDirectory('/home/'userid()'/rpmbuild/RPMS/s390') then , - 'scp ~/rpmbuild/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir +'ssh' self~targetsys() '"mkdir -p' newdir'"' +if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i386') then , + 'scp' self~builddir()'/rpmbuild/RPMS/i386/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i486') then , + 'scp' self~builddir()'/RPMS/i486/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i586') then , + 'scp' self~builddir()'/RPMS/i586/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i686') then , + 'scp' self~builddir()'/RPMS/i686/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/x86_64') then , + 'scp' self~builddir()'/RPMS/x86_64/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/s390x') then , + 'scp' self~builddir()'/RPMS/s390x/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/s390') then , + 'scp' self~builddir()'/RPMS/s390/ooRexx*.rpm' self~targetsys()':'newdir else nop -- it must not be a supported rpm type -'scp' buildrpt 'da...@bu...:'newdir -'ssh da...@bu... "chown -R dashley:users 'self~targetdir'"' +'scp' buildrpt self~targetsys()':'newdir self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) -- remove everything call directory savedir +'rm -rf' self~builddir() self~log('Finished build.') -'rm' self~lockfile return /*----------------------------------------------------------------------------*/ @@ -190,6 +198,7 @@ tmpemail~close() 'mailx -s "Your ooRexx Build Is Ready" -r bu...@bu...' self~email() '< tmpemail.txt' call SysFileDelete 'tmpemail.txt' +'sleep 120' -- give time for the email to be sent return /*----------------------------------------------------------------------------*/ @@ -203,25 +212,18 @@ self~osname = prop['osname'] self~homedir = prop['homedir'] self~builddir = prop['builddir'] -self~targetdir = prop['targetdir'] self~lockfile = prop['lockfile'] --- get the unsaves attributes +self~targetsys = prop['targetsys'] +-- get the unsaved attributes self~builddate = date('S') || '-' || changestr(':', time(), '') self~statusfile = self~homedir() || '/' || self~builddate() || '-' || self~osname --- get the comman line options -argc = cmdline~words() -if argc > 0 then self~location = cmdline~word(1) +-- get the command line options +parse var cmdline src target email . +self~src = src +self~targetdir = target +self~email = email +-- determine if this is a trunk or branch build +if target~pos('branches') > 0 then self~location = 'branch' else self~location = 'trunk' -select - when self~location = 'branch' then do - self~src = prop['branchsrc'] - self~location = 'branch4.1.0' - end - otherwise do - self~src = prop['trunksrc'] - end - end -if argc > 1 then self~email = cmdline~word(2) -else self~email = '' return Modified: websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2011-04-07 03:13:15 UTC (rev 6910) +++ websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2011-04-07 19:33:11 UTC (rev 6911) @@ -2,7 +2,7 @@ /* */ /* Description: This is the build script for the Windows XP build machine. */ /* */ -/* Copyright (c) 2010-2010 Rexx Language Association. All rights reserved. */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the Common Public License v1.0 which accompanies this */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wda...@us...> - 2011-04-07 19:41:50
|
Revision: 6912 http://oorexx.svn.sourceforge.net/oorexx/?rev=6912&view=rev Author: wdashley Date: 2011-04-07 19:41:40 +0000 (Thu, 07 Apr 2011) Log Message: ----------- Reorg the scripts so we have better idea what goes with what. Added Paths: ----------- websites/build/trunk/docroot/builds/scripts/guests/orxbuild.local.properties websites/build/trunk/docroot/builds/scripts/guests/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/guests/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/guests/orxbuildrpm.rex websites/build/trunk/docroot/builds/scripts/host/buildall.rex websites/build/trunk/docroot/builds/scripts/host/buildmachine.cls websites/build/trunk/docroot/builds/scripts/host/copyall.rex websites/build/trunk/docroot/builds/scripts/host/kvmdomain.cls websites/build/trunk/docroot/builds/scripts/host/orxbuildmachines.txt Removed Paths: ------------- websites/build/trunk/docroot/builds/scripts/buildall.rex websites/build/trunk/docroot/builds/scripts/kvmdomain.cls websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex websites/build/trunk/docroot/builds/scripts/orxbuildmachines.txt websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex Deleted: websites/build/trunk/docroot/builds/scripts/buildall.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/buildall.rex 2011-04-07 19:33:11 UTC (rev 6911) +++ websites/build/trunk/docroot/builds/scripts/buildall.rex 2011-04-07 19:41:40 UTC (rev 6912) @@ -1,85 +0,0 @@ -#!/usr/bin/rexx -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: Build ooRexx on all build machines. */ -/* */ -/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- This script should be invoked as follows: --- --- buildall.rex [location [machine [email]]] --- --- where --- --- location - (optional) the build type - trunk or branch --- machine - (optional) the target virtual machine --- email - (optional) The email address for the build report - - --- initialization -cmdline = arg(1)~strip() -parse var cmdline location specific_machine email . -if location = 'branch' then do - cmdargs = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' - cmdargs = cmdargs '/pub/www/build/docroot/builds/interpreter-main' - cmdargs = cmdargs email - end -else do -- trunk - cmdargs = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' - cmdargs = cmdargs '/pub/www/build/docroot/builds/interpreter-main' - cmdargs = cmdargs email - end -cmdargs = cmdargs~strip() -machines = './orxbuildmachines.txt' - --- get the contentst of the input file and create the build array -buildmachines = .buildmachines~new(machines) - --- do the build(s) -if specific_machine <> '' then do - buildmachines~build_one(specific_machine, cmdargs) - end -else do -- do all the machines - buildmachines~build_all(cmdargs) - end -return - - -::requires 'buildmachines.cls' - Added: websites/build/trunk/docroot/builds/scripts/guests/orxbuild.local.properties =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuild.local.properties (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuild.local.properties 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,11 @@ +-- This is just a sample ooRexx build properties file. +-- Note: Do not quote the string data. Do not place spaces on either side of the +-- equal (=) sign. Doing either of these will cause strange problems. + + +osname=fedora13-i386 +homedir=/home/dashley +builddir=/home/dashley/buildorx +lockfile=/tmp/ooRexxBuild.lock +targetsys=da...@bu... + Copied: websites/build/trunk/docroot/builds/scripts/guests/orxbuilddeb.rex (from rev 6911, websites/build/trunk/docroot/builds/scripts/orxbuilddeb.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuilddeb.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuilddeb.rex 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,218 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build daemon for any deb-based build machine. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- This script should be invoked as follows: +-- +-- orxbuilddeb.rex src target [email] +-- +-- where +-- +-- src - the SVN source path +-- target - the target subdirectory path on the build server for build files +-- email - (optional) The email address for the build report + + +-- Initialization +build= .build~new('/home/'userid()'/orxbuild.local.properties', arg(1)~strip()) + +-- Set our home directory +call directory build~homedir + +-- Do the build +build~build_deb() + +-- Cleanup +build~email_result() +call SysFileDelete build~statusfile +call SysFileDelete build~lockfile +return + + + +/*----------------------------------------------------------------------------*/ +/* Class: build */ +/*----------------------------------------------------------------------------*/ + +::class build public + +/*----------------------------------------------------------------------------*/ +/* Attributes: */ +/*----------------------------------------------------------------------------*/ + +::attribute svnrevision +::attribute homedir +::attribute targetdir +::attribute builddir -- the temp build dir +::attribute osname +::attribute builddate +::attribute statusfile +::attribute lockfile +::attribute src +::attribute location -- the build type ie. branch | trunk +::attribute email +::attribute targetsys + +/*----------------------------------------------------------------------------*/ +/* build_deb */ +/*----------------------------------------------------------------------------*/ + +::method build_deb +use strict arg +do while stream(self~lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +'touch' self~lockfile +self~log('Starting build.') +savedir = directory() +buildrpt = self~osname()'.'self~location()'.buildrpt.txt' +-- create temp dir and checkout the source +'rm -rf' self~builddir() -- make sure the subdir is erased +'mkdir' self~builddir() +'svn co' self~src() self~builddir() +call directory self~builddir() +svnver = self~getsvnrevision() +if svnver = 'unknown' then do + self~log('Subversion checkout failed.') + 'rm -rf' self~builddir() + 'rm' self~lockfile + return + end +newdir = self~targetdir'/'svnver'/'self~osname +-- build the deb +self~log('Building SVN revision' svnver'.') +'./bootstrap 2>&1 | tee -a' buildrpt +'./configure --disable-static 2>&1 | tee -a' buildrpt +'make deb 2>&1 | tee -a' buildrpt +-- copy the results to the host +'ssh' self~targetsys() '"mkdir -p' newdir'"' +'scp ../oorexx*.deb' self~targetsys() ':'newdir +'scp' buildrpt self~targetsys()':'newdir +self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) +-- remove everything +call directory savedir +'rm -rf' self~builddir() +'rm oorexx*.deb' +self~log('Finished build.') +return + +/*----------------------------------------------------------------------------*/ +/* Method: log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +strm = .stream~new(self~statusfile()) +strm~open('write append') +msg = date('S') time('N') msg +say msg +strm~lineout(msg) +strm~close() +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + +/*----------------------------------------------------------------------------*/ +/* Method: email_result */ +/*----------------------------------------------------------------------------*/ + +::method email_result +if self~email() = '' then return +tmpemail = .stream~new('tmpemail.txt') +tmpemail~open('write replace') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~lineout('') +statstrm = .stream~new(self~statusfile()) +statstrm~open(read) +arr = statstrm~arrayin() +statstrm~close() +do line over arr + tmpemail~lineout(line) + end +tmpemail~lineout('') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~close() +'mailx -s "Your ooRexx Build Is Ready" -r bu...@bu...' self~email() '< tmpemail.txt' +call SysFileDelete 'tmpemail.txt' +'sleep 120' -- give time for the email to be sent +return + +/*----------------------------------------------------------------------------*/ +/* Method: init */ +/*----------------------------------------------------------------------------*/ + +::method init +use strict arg propfile, cmdline +-- get the saved properties/attributes +prop = .properties~load(propfile) +self~osname = prop['osname'] +self~homedir = prop['homedir'] +self~builddir = prop['builddir'] +self~lockfile = prop['lockfile'] +self~targetsys = prop['targetsys'] +-- get the unsaved attributes +self~builddate = date('S') || '-' || changestr(':', time(), '') +self~statusfile = self~homedir() || '/' || self~builddate() || '-' || self~osname +-- get the command line options +parse var cmdline src target email . +self~src = src +self~targetdir = target +self~email = email +-- determine if this is a trunk or branch build +if target~pos('branches') > 0 then self~location = 'branch' +else self~location = 'trunk' +return + Copied: websites/build/trunk/docroot/builds/scripts/guests/orxbuilddocs.rex (from rev 6911, websites/build/trunk/docroot/builds/scripts/orxbuilddocs.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuilddocs.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuilddocs.rex 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,231 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build script for the docs build machine. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- Initialization +osname = 'fedora13-docs' +build = .build~new() +build~homedir = '/home/'userid() -- always do first! +build~builddir = build~homedir'/buildorx' +build~targetdir = '/pub/www/build/docroot/builds/docs' +build~osname = osname +build~builddate = date('S') || '-' || changestr(':', time(), '') +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname +build~lockfile = '/tmp/ooRexxDocsBuild.lock' +build~email = arg(1)~strip() + +-- Set our home directory +call directory build~homedir + +-- Do the build +build~build_docs() + +-- Cleanup +-- 'scp' build~statusfile() , +-- 'da...@bu...:/pub/www/build/docroot/builds/status/' ||, +-- build~builddate() || '-' || build~osname +build~email_result() +call SysFileDelete build~statusfile +call SysFileDelete build~lockfile +return + + +/*----------------------------------------------------------------------------*/ +/* Class: build */ +/*----------------------------------------------------------------------------*/ + +::class build public +::method init +return + +/*----------------------------------------------------------------------------*/ +/* Attributes: */ +/*----------------------------------------------------------------------------*/ + +::attribute svnrevision +::attribute homedir +::attribute targetdir +::attribute builddir -- the temp build dir +::attribute osname +::attribute builddate +::attribute statusfile +::attribute lockfile +::attribute email + +/*----------------------------------------------------------------------------*/ +/* build_docs */ +/*----------------------------------------------------------------------------*/ + +::method build_docs +use strict arg +do while stream(self~lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +'touch' self~lockfile +self~log('Starting build.') +buildrpt = './docs-buildrpt.txt' +savedir = directory() +-- create temp dir and checkout the source +tempdir = './builddocs' +'rm -rf' tempdir -- make sure the subdir is erased +'mkdir' tempdir +'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/docs/trunk' tempdir +call directory tempdir +svnver = self~getsvnrevision() +if svnver = 'unknown' then do + self~log('Subversion checkout failed.') + 'rm -rf' self~builddir() + 'rm' self~lockfile + return + end +newdir = self~targetdir'/'svnver +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do + -- build the docs + self~log('Building SVN revision' svnver'.') + 'make all 2>&1 | tee -a' buildrpt + -- copy the results to the host + 'ssh da...@bu... "mkdir' newdir'"' + 'scp ./oodialog/oodialog.pdf da...@bu...:'newdir + 'scp ./oodialog/oodialog-html.zip da...@bu...:'newdir + 'scp ./readme/readme.pdf da...@bu...:'newdir + 'scp ./readme/readme.html da...@bu...:'newdir + 'scp ./rexxpg/rexxpg.pdf da...@bu...:'newdir + 'scp ./rexxpg/rexxpg-html.zip da...@bu...:'newdir + 'scp ./rexxref/rexxref.pdf da...@bu...:'newdir + 'scp ./rexxref/rexxref-html.zip da...@bu...:'newdir + 'scp ./rxftp/rxftp.pdf da...@bu...:'newdir + 'scp ./rxftp/rxftp-html.zip da...@bu...:'newdir + 'scp ./rxmath/rxmath.pdf da...@bu...:'newdir + 'scp ./rxmath/rxmath-html.zip da...@bu...:'newdir + 'scp ./rxsock/rxsock.pdf da...@bu...:'newdir + 'scp ./rxsock/rxsock-html.zip da...@bu...:'newdir + 'scp ./rexxextensions/rexxextensions.pdf da...@bu...:'newdir + 'scp ./rexxextensions/rexxextensions-html.zip da...@bu...:'newdir + 'scp ./winextensions/winextensions.pdf da...@bu...:'newdir + 'scp ./winextensions/winextensions-html.zip da...@bu...:'newdir + 'scp ./unixextensions/unixextensions.pdf da...@bu...:'newdir + 'scp ./unixextensions/unixextensions-html.zip da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir + self~log('The build is located at http://build.oorexx.org/builds/docs/'svnver'/') + end +else self~log('This was a duplicate build request.') +-- remove everything +call directory savedir +'rm -rf' tempdir +self~log('Finished build.') +'rm' self~lockfile +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + + +/*----------------------------------------------------------------------------*/ +/* log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +use strict arg msg +msg = date('S') time('N') msg +say msg +strm = .stream~new(self~statusfile) +strm~open('write append') +strm~lineout(msg) +strm~close() +return + + +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + +/*----------------------------------------------------------------------------*/ +/* Method: email_result */ +/*----------------------------------------------------------------------------*/ + +::method email_result +if self~email()~pos('@') = 0 then return +tmpemail = .stream~new('tmpemail.txt') +tmpemail~open('write replace') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~lineout('') +statstrm = .stream~new(self~statusfile()) +statstrm~open(read) +arr = statstrm~arrayin() +statstrm~close() +do line over ayy + tmpemail~lineout(line) + end +tmpemail~lineout('') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpstrm~close() +'mailx -s "Your ooRexx Build Is Ready" -r bui...@bu...' self~email() '< tmpemail.txt' +call SysFileDelete 'tmpemail.txt' +'sleep 120' -- give time for the email to be sent +return + Copied: websites/build/trunk/docroot/builds/scripts/guests/orxbuildrpm.rex (from rev 6911, websites/build/trunk/docroot/builds/scripts/orxbuildrpm.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuildrpm.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuildrpm.rex 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,229 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build script for any rpm-based build machine. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- This script should be invoked as follows: +-- +-- orxbuilddeb.rex src target [email] +-- +-- where +-- +-- src - the SVN source path +-- target - the target subdirectory path on the build server for build files +-- email - (optional) The email address for the build report + + +-- Initialization +build = .build~new('/home/'userid()'/orxbuild.local.properties', arg(1)~strip()) + +-- Move to our home directory +call directory build~homedir + +-- Do the build +build~build_rpm() + +-- Cleanup +build~email_result() +call SysFileDelete build~statusfile +call SysFileDelete build~lockfile +return + + +/*----------------------------------------------------------------------------*/ +/* Class: build */ +/*----------------------------------------------------------------------------*/ + +::class build public + +/*----------------------------------------------------------------------------*/ +/* Attributes: */ +/*----------------------------------------------------------------------------*/ + +::attribute svnrevision +::attribute homedir +::attribute targetdir +::attribute builddir -- the temp build dir +::attribute osname +::attribute builddate +::attribute statusfile +::attribute lockfile +::attribute src +::attribute location -- the build type ie. branch | trunk +::attribute email +::attribute targetsys + +/*----------------------------------------------------------------------------*/ +/* Method: build_rpm */ +/*----------------------------------------------------------------------------*/ + +::method build_rpm +do while stream(self~lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +'touch' self~lockfile +self~log('Starting build.') +buildrpt = self~osname()'.'self~location()'.buildrpt.txt' +savedir = directory() +-- create temp dir and checkout the source +'rm -rf' self~builddir() -- make sure the subdir is erased +'mkdir' self~builddir() +'svn co' self~src() self~builddir() +call directory self~builddir() +svnver = self~getsvnrevision() +if svnver = 'unknown' then do + self~log('Subversion checkout failed.') + 'rm -rf' self~builddir + 'rm' self~lockfile + return + end +newdir = self~targetdir'/'svnver'/'self~osname +-- build the rpm +self~log('Building SVN revision' svnver'.') +'./bootstrap 2>&1 | tee -a' buildrpt +'./configure 2>&1 | tee -a' buildrpt +'make rpm 2>&1 | tee -a' buildrpt +-- copy the results to the host +'ssh' self~targetsys() '"mkdir -p' newdir'"' +if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i386') then , + 'scp' self~builddir()'/rpmbuild/RPMS/i386/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i486') then , + 'scp' self~builddir()'/RPMS/i486/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i586') then , + 'scp' self~builddir()'/RPMS/i586/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/i686') then , + 'scp' self~builddir()'/RPMS/i686/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/x86_64') then , + 'scp' self~builddir()'/RPMS/x86_64/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/s390x') then , + 'scp' self~builddir()'/RPMS/s390x/ooRexx*.rpm' self~targetsys()':'newdir +else if SysIsFileDirectory(self~builddir()'/rpmbuild/RPMS/s390') then , + 'scp' self~builddir()'/RPMS/s390/ooRexx*.rpm' self~targetsys()':'newdir +else nop -- it must not be a supported rpm type +'scp' buildrpt self~targetsys()':'newdir +self~log('The build is located at http://build.oorexx.org/builds/interpreter-main/'svnver'/'self~osname) +-- remove everything +call directory savedir +'rm -rf' self~builddir() +self~log('Finished build.') +return + +/*----------------------------------------------------------------------------*/ +/* Method: log */ +/*----------------------------------------------------------------------------*/ + +::method log +-- log messages +use strict arg msg +msg = date('S') time('N') msg +say msg +strm = .stream~new(self~statusfile) +strm~open('write append') +strm~lineout(msg) +strm~close() +return + +/*----------------------------------------------------------------------------*/ +/* Method: getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +::method getsvnrevision +verlocal = './temp.ver' +'svnversion >' verlocal +strm = .stream~new(verlocal) +retc = strm~open('read') +if retc <> 'READY:' then return '' +svnver = strm~lineIn() +retc = strm~close() +if svnver = '' then svnver = 'unknown' +return svnver + +/*----------------------------------------------------------------------------*/ +/* Method: email_result */ +/*----------------------------------------------------------------------------*/ + +::method email_result +if self~email() = '' then return +tmpemail = .stream~new('tmpemail.txt') +tmpemail~open('write replace') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~lineout('') +statstrm = .stream~new(self~statusfile()) +statstrm~open(read) +arr = statstrm~arrayin() +statstrm~close() +do line over arr + tmpemail~lineout(line) + end +tmpemail~lineout('') +tmpemail~lineout('This email is from a service machine. DO NOT REPLY!') +tmpemail~close() +'mailx -s "Your ooRexx Build Is Ready" -r bu...@bu...' self~email() '< tmpemail.txt' +call SysFileDelete 'tmpemail.txt' +'sleep 120' -- give time for the email to be sent +return + +/*----------------------------------------------------------------------------*/ +/* Method: init */ +/*----------------------------------------------------------------------------*/ + +::method init +use strict arg propfile, cmdline +-- get the saved properties/attributes +prop = .properties~load(propfile) +self~osname = prop['osname'] +self~homedir = prop['homedir'] +self~builddir = prop['builddir'] +self~lockfile = prop['lockfile'] +self~targetsys = prop['targetsys'] +-- get the unsaved attributes +self~builddate = date('S') || '-' || changestr(':', time(), '') +self~statusfile = self~homedir() || '/' || self~builddate() || '-' || self~osname +-- get the command line options +parse var cmdline src target email . +self~src = src +self~targetdir = target +self~email = email +-- determine if this is a trunk or branch build +if target~pos('branches') > 0 then self~location = 'branch' +else self~location = 'trunk' +return + Copied: websites/build/trunk/docroot/builds/scripts/host/buildall.rex (from rev 6911, websites/build/trunk/docroot/builds/scripts/buildall.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/host/buildall.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/host/buildall.rex 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,85 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: Build ooRexx on all build machines. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- This script should be invoked as follows: +-- +-- buildall.rex [location [machine [email]]] +-- +-- where +-- +-- location - (optional) the build type - trunk or branch +-- machine - (optional) the target virtual machine +-- email - (optional) The email address for the build report + + +-- initialization +cmdline = arg(1)~strip() +parse var cmdline location specific_machine email . +if location = 'branch' then do + cmdargs = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branches/4.1.0/trunk/' + cmdargs = cmdargs '/pub/www/build/docroot/builds/interpreter-main' + cmdargs = cmdargs email + end +else do -- trunk + cmdargs = 'http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' + cmdargs = cmdargs '/pub/www/build/docroot/builds/interpreter-main' + cmdargs = cmdargs email + end +cmdargs = cmdargs~strip() +machines = './orxbuildmachines.txt' + +-- get the contentst of the input file and create the build array +buildmachines = .buildmachines~new(machines) + +-- do the build(s) +if specific_machine <> '' then do + buildmachines~build_one(specific_machine, cmdargs) + end +else do -- do all the machines + buildmachines~build_all(cmdargs) + end +return + + +::requires 'buildmachines.cls' + Added: websites/build/trunk/docroot/builds/scripts/host/buildmachine.cls =================================================================== --- websites/build/trunk/docroot/builds/scripts/host/buildmachine.cls (rev 0) +++ websites/build/trunk/docroot/builds/scripts/host/buildmachine.cls 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,178 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: Build ooRexx on all build machines. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +::requires 'kvmdomain.cls' + + +/*----------------------------------------------------------------------------*/ +/* Class: buildmachines */ +/*----------------------------------------------------------------------------*/ + +::class buildmachines public + +::attribute arr + +::method init +use strict arg file +lines = file_arrayin(file) +self~arr = .array~new() +do line over lines + if line~strip() = '' then iterate + if line~strip()~substr(1, 1) = '#' then iterate + if line~strip()~substr(1, 2) = '--' then iterate + parse var line osname addr userid cmd virt_flag . + self~arr~append(.buildmachine~new(osname, addr, userid, cmd, virt_flag)) + end +return + +::method build_all +use strict arg cmdargs +do machine over self~arr -- do all the machines + machine~do_build(cmdargs) + end +return + +::method build_one +use strict arg specific_machine, cmdargs +if specific_machine <> '' then do + -- find the machine and do the build + do machine over buildarr + if specific_machine = machine~osname() then do + machine~do_build(cmdargs) + leave + end + end + else say specific_machine 'Error: not found.' + end +else say 'Error: no machine specified.' +return + +::method copy_all +use strict arg cmdargs +do machine over self~arr -- do all the machines + machine~do_copy(cmdargs) + end +return + +::method copy_one +use strict arg specific_machine, cmdargs +if specific_machine <> '' then do + -- find the machine and do the build + do machine over buildarr + if specific_machine = machine~osname() then do + machine~do_copy(cmdargs) + leave + end + end + else say specific_machine 'Error: not found.' + end +else say 'Error: no machine specified.' +return + + +/*----------------------------------------------------------------------------*/ +/* Class: buildmachine */ +/*----------------------------------------------------------------------------*/ + +::class buildmachine + +::attribute osname +::attribute addr +::attribute userid +::attribute cmd +::attribute virt_flag + +::method init +expose osname addr userid cmd virt_flag +use strict arg osname, addr, userid, cmd, virt_flag = .true +return + +::method do_build +expose osname addr userid cmd virt_flag +use strict arg cmdargs +if virt_flag = .true then do + -- start the domain + domain = .kvmdomain~new(osname) + retc = domain~startup() + if retc <> 0 then return + call SysSleep 90 -- allow some time for the domain to fully start + end +if cmdargs = '' then cmdline = cmd +else cmdline = cmd cmdargs +'ssh' userid'@'addr '"'cmdline'"' +if virt_flag = .true then do + retc = domain~shutdown() + call SysSleep 90 -- allow some time for the domain to fully stop + end +return + +::method do_copy +expose osname addr userid virt_flag +use strict arg file +if virt_flag = .true then do + -- start the domain + domain = .kvmdomain~new(osname) + retc = domain~startup() + if retc <> 0 then return + call SysSleep 90 -- allow some time for the domain to fully start + end +'scp' file userid'@'addr':/home/'userid +if virt_flag = .true then do + retc = domain~shutdown() + call SysSleep 90 -- allow some time for the domain to fully stop + end +return + + +/*----------------------------------------------------------------------------*/ +/* Routine: file_arrayin */ +/*----------------------------------------------------------------------------*/ + +::routine file_arrayin +use strict arg file +strm = .stream~new(file) +strm~open('read') +arr = strm~arrayin() +strm~close() +return arr + Added: websites/build/trunk/docroot/builds/scripts/host/copyall.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/host/copyall.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/host/copyall.rex 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,73 @@ +#!/usr/bin/rexx +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: Build ooRexx on all build machines. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- This script should be invoked as follows: +-- +-- copyall.rex file [machine] +-- +-- where +-- +-- file - the file to be copied +-- machine - (optional) the target virtual machine + + +-- initialization +cmdline = arg(1)~strip() +parse var file specific_machine . +machines = './orxbuildmachines.txt' + +-- get the contentst of the input file and create the build array +buildmachines = .buildmachines~new(machines) + +-- do the build(s) +if specific_machine <> '' then do + buildmachines~copy_one(specific_machine, cmdargs) + end +else do -- do all the machines + buildmachines~copy_all(cmdargs) + end +return + + +::requires 'buildmachines.cls' + Copied: websites/build/trunk/docroot/builds/scripts/host/kvmdomain.cls (from rev 6911, websites/build/trunk/docroot/builds/scripts/kvmdomain.cls) =================================================================== --- websites/build/trunk/docroot/builds/scripts/host/kvmdomain.cls (rev 0) +++ websites/build/trunk/docroot/builds/scripts/host/kvmdomain.cls 2011-04-07 19:41:40 UTC (rev 6912) @@ -0,0 +1,123 @@ +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: Manage a KVM virtual domain. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + + +::class kvmdomain public + +::attribute domainname get +::attribute domainname set private + +::method init +expose domainname +use strict arg domainname +return + +::method startup +-- start a domain +use strict arg +domainid = self~name2id() +if domainid <> '-' then return -1 +if userid() = 'root' then self~docmd('virsh start' self~domainname) +else self~docmd('sudo virsh start' self~domainname) +domainid = self~name2id() +if domainid = '-' then return -1 +return 0 + +::method shutdown +-- shutdown a domain +use strict arg wait = .false +domainid = self~name2id() +if domainid = '-' then return 0 +if userid() = 'root' then self~docmd('virsh shutdown' self~domainname) +else self~docmd('sudo virsh shutdown' self~domainname) +if wait = .true then do i = 1 to 10 + call SysSleep 5 + domainid = self~name2id() + if domainid = '-' then return 0 + end +return 0 + +::method reboot +-- reboot a domain +use strict arg +domainid = self~name2id() +if domainid = '-' then return 0 +if userid() = 'root' then self~docmd('virsh reboot' self~domainname) +else self~docmd('sudo virsh reboot' self~domainname) +return 0 + +::method status +-- return the status of a domain +use strict arg +if userid() = 'root' then status = self~doCmd('virsh list --all', , self~domainname) +else status = self~doCmd('sudo virsh list --all', , self~domainname) +if status = .nil then return 'unknown' +parse var status . . status +return status~strip() + +::method name2id private +-- if the domain is running converts a domain name to a domainid, +-- otherwise it returns .nil +use strict arg +if userid() = 'root' then id = self~doCmd('virsh domid' self~domainname, 1) +else id = self~doCmd('sudo virsh domid' self~domainname, 1) +if id = .nil then return id +return id~strip() + +::method doCmd private +-- perform the command and possibly return one line of the resulting output +use strict arg cmd, line = '', srch = '' +tmpname = SystempFileName('/tmp/kvmdomain.???') +address bash cmd '2>&1 >' tmpname +tmp = .stream~new(tmpname) +tmp~open('read') +arr = tmp~arrayin() +tmp~close() +call SysFileDelete tmpname +if line = '' & srch = '' then return .nil +if line <> '' & srch <> '' then return .nil +if line <> '' & srch = '' then retur... [truncated message content] |
From: <wda...@us...> - 2011-04-07 19:46:27
|
Revision: 6913 http://oorexx.svn.sourceforge.net/oorexx/?rev=6913&view=rev Author: wdashley Date: 2011-04-07 19:46:20 +0000 (Thu, 07 Apr 2011) Log Message: ----------- More reorg. Added Paths: ----------- websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.bat websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.copy.rex websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.rex websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.setenv.rex Removed Paths: ------------- websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex Added: websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.bat =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.bat (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.bat 2011-04-07 19:46:20 UTC (rev 6913) @@ -0,0 +1,112 @@ +rem +rem Description: This is a build script step for the Windows build machine. +rem +rem Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. +rem +rem This program and the accompanying materials are made available under +rem the terms of the Common Public License v1.0 which accompanies this +rem distribution. A copy is also available at the following address: +rem http://www.ibm.com/developerworks/oss/CPLv1.0.htm +rem +rem Redistribution and use in source and binary forms, with or +rem without modification, are permitted provided that the following +rem conditions are met: +rem +rem Redistributions of source code must retain the above copyright +rem notice, this list of conditions and the following disclaimer. +rem Redistributions in binary form must reproduce the above copyright +rem notice, this list of conditions and the following disclaimer in +rem the documentation and/or other materials provided with the distribution. +rem +rem Neither the name of Rexx Language Association nor the names +rem of its contributors may be used to endorse or promote products +rem derived from this software without specific prior written permission. +rem +rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +rem OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +rem SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +rem TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +rem OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +rem OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +rem NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +rem SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +rem +rem Author: W. David Ashley +rem + +rem --------------------------------------------------------------------------- +rem +rem This script should be invoked as follows: +rem orxbuildwin.bat osname [buildtype [email]] +rem where: +rem osname is like "win7-i386" +rem buildtype is eother "trunk" or "branch" +rem email is an email address +rem +rem --------------------------------------------------------------------------- + +rem get the command line arguments +set osname=%1 +set buildtype=%2 +if %buildtype%=="" set buildtype=trunk +set email=%3 + +rem set up our default environment variables +c: +cd \ +set builddir=\buildtemp +set targetdir=p:\www\build\docroot\builds\interpreter-main +set lockfile=c:\ooRexxBuild.lock + +rem check the lockfile and loop if it exists +:existcheck +if exits %lockfile% goto startsleep +touch %lockfile% +goto endsleep +:startsleep +echo Sleeping one minute +sleep 60 +goto existcheck +:endsleep + +rem remove the old builddir if it still exists +rmdir /S /Q %builddir% + +rem set up our build environment variables +if %osname%==win7-i386 call "C:\Tools\Visual.Studio.2008\VC\vcvarsall.bat" x86 +if %osname%==win7-i386 call "C:\Tools\MsSDK.v6.0\bin\SetEnv.cmd" /Release /x86 /XP +if %osname%==win7-x86_64 call "C:\Tools\Visual.Studio2008\VC\vcvarsall.bat" amd64 +if %osname%==win7-x86_64 call "C:\Tools\MsSDK.v6.0\bin\SetEnv.cmd" /Release /x64 /XP +rexx orxbuildwin.setenv.rex \orxbuildwin.setenv.bat +call \orxbuildwin.setenv.bat +del \orxbuildwin.setenv.bat +set SRC_DRV=c: +set SRC_DIR=%builddir% + +rem create the builddir +md %builddir% +setlocal +cd %builddir% + +rem checkout the source code +if %buildtype%==branch svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/branch/4.1.0/trunk/ %builddir% +if %buildtype%==trunk svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/ %builddir% + +rem perform the build +if not exist makeorx.bat exit +call makeorx.bat BOTH PACKAGE + +rem copy the output files +rexx orxbuildwin.copy.rex %email% +cd \ +endlocal + +rem remove build subdirectory tree +rmdir /S /Q %builddir% + +rem remove the lockfile +rm %lockfile% + Added: websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.copy.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.copy.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.copy.rex 2011-04-07 19:46:20 UTC (rev 6913) @@ -0,0 +1,107 @@ +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is a build script for the Windows build machine. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/* Notes: */ +/* 1. On Windows we need to avoid any RexxUtil functions because they */ +/* reside in RXAPI and that gets stopped and restarted multiple times */ +/* during the build process. */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- initialization +email = arg(1)~strip() +hostbuilds = 'p:' +builddir = value('osname', , 'ENVIRONMENT') +osname = 'winxpsp3-i386' +targetdir = hostbuilds'\www\build\docroot\builds\interpreter-main' +statusdir = hostbuilds'\www\build\docroot\builds\status' + +-- create the subdirectories to store the build files +svnver = getsvnrevision() +newdir = targetdir'\'svnver +'md' newdir +newdir = newdir'\'osname +'md' newdir + +-- copy the build files +'copy ooRexx*.exe' newdir +if osname~pos('i386') > 0 then do + 'copy Win32Rel\Win32Rel.log' newdir'\Win32RelLog.txt' + 'copy Win32Dbg\Win32Dbg.log' newdir'\Win32DbgLog.txt' + end +else if osname~pos('x86_64') > 0 then do + 'copy Win64Rel\Win64Rel.log' newdir'\Win64RelLog.txt' + 'copy Win64Dbg\Win64Dbg.log' newdir'\Win64DbgLog.txt' + end +else nop + +-- create the status file +strm = .stream~new(statusdir'\' || builddate || '-' || osname) +strm~open('write append') +msg = date('S') time('N') msg +strm~lineout( date('S') time('N') 'Built SVN revision' svnver'.') +strm~lineout( date('S') time('N') 'Finished build.') +strm~close() + +-- email the results +if email <> '' then do + -- TODO: email the results + end + +return + + +/*----------------------------------------------------------------------------*/ +/* getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +getsvnrevision: procedure +'svn info > svntemp' +strm = .stream~new('svntemp') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +revline = lines[5] +parse var revline . svnver . +if svnver = '' then svnver = 'unknown' +-- say 'The SVN Revision is' svnver +return svnver + Copied: websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.rex (from rev 6911, websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex) =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.rex 2011-04-07 19:46:20 UTC (rev 6913) @@ -0,0 +1,203 @@ +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is the build script for the Windows XP build machine. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/* Notes: */ +/* 1. On Windows we need to avoid any RexxUtil functions because they */ +/* reside in RXAPI and that gets stopped and restarted multiple times */ +/* during the build process. */ +/* */ +/*----------------------------------------------------------------------------*/ + + +-- initialization +hostbuilds = 'p:' +builddir = 'c:\buildtemp' +osname = 'winxpsp3-i386' +targetdir = hostbuilds'\www\build\docroot\builds\interpreter-main' +startbuildtime = 165 -- 2:45 AM +lockfile = 'c:\ooRexxBuild.lock' + +-- make sure our temp dir is empty +'rmdir /S /Q' builddir + +-- see if we just do one build only +cmdline = arg(1)~strip() +if cmdline = '--immediate' then do + call dobuild + return + end + +-- wait until the specified time +do forever + if time('M') = startbuildtime then call dobuild + 'sleep 50' + say 'Current time is' time('C') + end +return + + +/*----------------------------------------------------------------------------*/ +/* dobuild */ +/*----------------------------------------------------------------------------*/ + +dobuild: +builddate = date('S') -- do this first!!!! +do while stream(lockfile, 'c', 'query exists') <> '' + 'sleep 50' + end +call lineout lockfile, '' +call lineout lockfile +call log 'Starting build.' +-- create temp dir and checkout the source +'md' builddir +'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' builddir +call directory builddir +-- build the exe +call value 'SRC_DRV', 'c:', 'ENVIRONMENT' +call value 'SRC_DIR', '\buildtemp', 'ENVIRONMENT' +call setlatestdocs +svnver = getsvnrevision() +if \datatype(svnver, 'W') then do + call log 'Subversion checkout failed.' + return + end +if checkbuild(targetdir'\'svnver'\'osname) = .false then do + call log 'Building SVN revision' svnver'.' + 'makeorx.bat BOTH PACKAGE' + -- copy the results to the host + call log 'Copying build output files to the server' + newdir = targetdir'\'svnver + 'md' newdir + newdir = newdir'\'osname + 'md' newdir + 'copy ooRexx*.exe' newdir + 'copy Win32Rel\Win32Rel.log' newdir'\Win32RelLog.txt' + 'copy Win32Dbg\Win32Dbg.log' newdir'\Win32DbgLog.txt' + -- check build success + if \checkbuild(newdir) then do + call log 'Build was bad, no output files produced' + end + end +else do + call log 'This was a duplicate build request for SVN revision' svnver'.' + end +-- remove everything +call directory 'c:\' +'rmdir /S /Q' builddir +call log 'Finished build.' +'del' lockfile +return + + +/*----------------------------------------------------------------------------*/ +/* getsvnrevision */ +/*----------------------------------------------------------------------------*/ + +getsvnrevision: procedure +'svn info > svntemp' +strm = .stream~new('svntemp') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +revline = lines[5] +parse var revline . svnver . +if svnver = '' then svnver = 'unknown' +-- say 'The SVN Revision is' svnver +return svnver + + +/*----------------------------------------------------------------------------*/ +/* setlatestdocs */ +/*----------------------------------------------------------------------------*/ + +setlatestdocs: +-- Do not use SysFileTree here! RXAPI may not be running! +'dir /aD /oN' hostbuilds'\www\build\docroot\builds\docs > dirlist.txt' +strm = .stream~new('dirlist.txt') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +dirline = lines[lines~items() - 2] +parse var dirline . . . docdir . +if docdir <> '' then do + call value 'DOC_LOCATION', hostbuilds'\www\build\docroot\builds\docs\'docdir, 'ENVIRONMENT' + end +'del dirlist.txt' +-- say 'The doc_location is' hostbuilds'\www\build\docroot\builds\docs\'docdir +return + + +/*----------------------------------------------------------------------------*/ +/* log */ +/*----------------------------------------------------------------------------*/ + +log: +-- log messages +use strict arg msg +strm = .stream~new(hostbuilds'\www\build\docroot\builds\status\' || builddate || '-' || osname) +strm~open('write append') +msg = date('S') time('N') msg +say msg +strm~lineout(msg) +strm~close() +return + + +/*----------------------------------------------------------------------------*/ +/* checkbuild */ +/*----------------------------------------------------------------------------*/ + +checkbuild: procedure +-- check for good build +use strict arg newdir +'dir' newdir'\ooRexx*.exe > checkexists' +strm = .stream~new('checkexists') +retc = strm~open('read') +if retc <> 'READY:' then return 'unknown' +lines = strm~arrayIn() +retc = strm~close() +count = 0 +do line over lines + if line~pos('ooRexx') > 0 & line~pos('.exe') > 0 then count += 1 + end +if count < 2 then return .false -- bad build +return .true -- good build + Added: websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.setenv.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.setenv.rex (rev 0) +++ websites/build/trunk/docroot/builds/scripts/guests/orxbuildwin.setenv.rex 2011-04-07 19:46:20 UTC (rev 6913) @@ -0,0 +1,55 @@ +/*----------------------------------------------------------------------------*/ +/* */ +/* Description: This is a build script for the Windows build machine. */ +/* */ +/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the Common Public License v1.0 which accompanies this */ +/* distribution. A copy is also available at the following address: */ +/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ +/* */ +/* Redistribution and use in source and binary forms, with or */ +/* without modification, are permitted provided that the following */ +/* conditions are met: */ +/* */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* Redistributions in binary form must reproduce the above copyright */ +/* notice, this list of conditions and the following disclaimer in */ +/* the documentation and/or other materials provided with the distribution. */ +/* */ +/* Neither the name of Rexx Language Association nor the names */ +/* of its contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written permission. */ +/* */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* */ +/* Author: W. David Ashley */ +/* */ +/*----------------------------------------------------------------------------*/ + + +batfile = arg(1)~strip() +hostbuilds = 'p:\www\build\docroot\builds\docs' + +call sysfiletree hostbulds'\*', 'lines.' +i = lines.0 +dirline = lines.i +parse var dirline . . . docdir . +strm = .stream~new(batfile) +strm~open('write') +strm~lineout('set DOC_LOCATION='hostbuilds'\'docdir) +strm~close() +return + Deleted: websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2011-04-07 19:41:40 UTC (rev 6912) +++ websites/build/trunk/docroot/builds/scripts/orxbuildwin.rex 2011-04-07 19:46:20 UTC (rev 6913) @@ -1,203 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* */ -/* Description: This is the build script for the Windows XP build machine. */ -/* */ -/* Copyright (c) 2010-2011 Rexx Language Association. All rights reserved. */ -/* */ -/* This program and the accompanying materials are made available under */ -/* the terms of the Common Public License v1.0 which accompanies this */ -/* distribution. A copy is also available at the following address: */ -/* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */ -/* */ -/* Redistribution and use in source and binary forms, with or */ -/* without modification, are permitted provided that the following */ -/* conditions are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* Redistributions in binary form must reproduce the above copyright */ -/* notice, this list of conditions and the following disclaimer in */ -/* the documentation and/or other materials provided with the distribution. */ -/* */ -/* Neither the name of Rexx Language Association nor the names */ -/* of its contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written permission. */ -/* */ -/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ -/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ -/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ -/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ -/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ -/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ -/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/* Author: W. David Ashley */ -/* */ -/* Notes: */ -/* 1. On Windows we need to avoid any RexxUtil functions because they */ -/* reside in RXAPI and that gets stopped and restarted multiple times */ -/* during the build process. */ -/* */ -/*----------------------------------------------------------------------------*/ - - --- initialization -hostbuilds = 'p:' -builddir = 'c:\buildtemp' -osname = 'winxpsp3-i386' -targetdir = hostbuilds'\www\build\docroot\builds\interpreter-main' -startbuildtime = 165 -- 2:45 AM -lockfile = 'c:\ooRexxBuild.lock' - --- make sure our temp dir is empty -'rmdir /S /Q' builddir - --- see if we just do one build only -cmdline = arg(1)~strip() -if cmdline = '--immediate' then do - call dobuild - return - end - --- wait until the specified time -do forever - if time('M') = startbuildtime then call dobuild - 'sleep 50' - say 'Current time is' time('C') - end -return - - -/*----------------------------------------------------------------------------*/ -/* dobuild */ -/*----------------------------------------------------------------------------*/ - -dobuild: -builddate = date('S') -- do this first!!!! -do while stream(lockfile, 'c', 'query exists') <> '' - 'sleep 50' - end -call lineout lockfile, '' -call lineout lockfile -call log 'Starting build.' --- create temp dir and checkout the source -'md' builddir -'svn co http://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk/' builddir -call directory builddir --- build the exe -call value 'SRC_DRV', 'c:', 'ENVIRONMENT' -call value 'SRC_DIR', '\buildtemp', 'ENVIRONMENT' -call setlatestdocs -svnver = getsvnrevision() -if \datatype(svnver, 'W') then do - call log 'Subversion checkout failed.' - return - end -if checkbuild(targetdir'\'svnver'\'osname) = .false then do - call log 'Building SVN revision' svnver'.' - 'makeorx.bat BOTH PACKAGE' - -- copy the results to the host - call log 'Copying build output files to the server' - newdir = targetdir'\'svnver - 'md' newdir - newdir = newdir'\'osname - 'md' newdir - 'copy ooRexx*.exe' newdir - 'copy Win32Rel\Win32Rel.log' newdir'\Win32RelLog.txt' - 'copy Win32Dbg\Win32Dbg.log' newdir'\Win32DbgLog.txt' - -- check build success - if \checkbuild(newdir) then do - call log 'Build was bad, no output files produced' - end - end -else do - call log 'This was a duplicate build request for SVN revision' svnver'.' - end --- remove everything -call directory 'c:\' -'rmdir /S /Q' builddir -call log 'Finished build.' -'del' lockfile -return - - -/*----------------------------------------------------------------------------*/ -/* getsvnrevision */ -/*----------------------------------------------------------------------------*/ - -getsvnrevision: procedure -'svn info > svntemp' -strm = .stream~new('svntemp') -retc = strm~open('read') -if retc <> 'READY:' then return 'unknown' -lines = strm~arrayIn() -retc = strm~close() -revline = lines[5] -parse var revline . svnver . -if svnver = '' then svnver = 'unknown' --- say 'The SVN Revision is' svnver -return svnver - - -/*----------------------------------------------------------------------------*/ -/* setlatestdocs */ -/*----------------------------------------------------------------------------*/ - -setlatestdocs: --- Do not use SysFileTree here! RXAPI may not be running! -'dir /aD /oN' hostbuilds'\www\build\docroot\builds\docs > dirlist.txt' -strm = .stream~new('dirlist.txt') -retc = strm~open('read') -if retc <> 'READY:' then return 'unknown' -lines = strm~arrayIn() -retc = strm~close() -dirline = lines[lines~items() - 2] -parse var dirline . . . docdir . -if docdir <> '' then do - call value 'DOC_LOCATION', hostbuilds'\www\build\docroot\builds\docs\'docdir, 'ENVIRONMENT' - end -'del dirlist.txt' --- say 'The doc_location is' hostbuilds'\www\build\docroot\builds\docs\'docdir -return - - -/*----------------------------------------------------------------------------*/ -/* log */ -/*----------------------------------------------------------------------------*/ - -log: --- log messages -use strict arg msg -strm = .stream~new(hostbuilds'\www\build\docroot\builds\status\' || builddate || '-' || osname) -strm~open('write append') -msg = date('S') time('N') msg -say msg -strm~lineout(msg) -strm~close() -return - - -/*----------------------------------------------------------------------------*/ -/* checkbuild */ -/*----------------------------------------------------------------------------*/ - -checkbuild: procedure --- check for good build -use strict arg newdir -'dir' newdir'\ooRexx*.exe > checkexists' -strm = .stream~new('checkexists') -retc = strm~open('read') -if retc <> 'READY:' then return 'unknown' -lines = strm~arrayIn() -retc = strm~close() -count = 0 -do line over lines - if line~pos('ooRexx') > 0 & line~pos('.exe') > 0 then count += 1 - end -if count < 2 then return .false -- bad build -return .true -- good build - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |