Commit graph

798 commits

Author SHA1 Message Date
Kris Kennaway
f8a634d336 * Cleanup
* Catch up to build ID directory changes
* Improved support for ZFS builds
* Improved robustness
* Report status verbosely to the caller; whether we succeeded in claiming
  a chroot, whether the caller needs to first set up the client, or
  whether a setup is in progress.
* If we discover that the client has not been set up either because it
  freshly booted and newfs'ed its filesystem, or because a particular
  build has not yet been encountered, atomically claim a cookie and
  report this to the caller to act on
2008-07-26 14:11:26 +00:00
Kris Kennaway
316ad2a0a7 * Cleanup
* Catch up to build ID directory changes
2008-07-26 14:07:49 +00:00
Kris Kennaway
1dc6876bab * Cleanup
* Catch up to build ID directory changes
* Add helper functions for resolving a build ID symlink and
  validating an arch/branch combination (centralize instead of doing it
  in many scripts)
2008-07-26 14:06:30 +00:00
Kris Kennaway
5acb87ae92 * Desupport alpha and ia64
* Catch up to build ID directory changes
2008-07-26 14:05:01 +00:00
Kris Kennaway
46356ad8f8 * Add comments 2008-07-26 14:04:23 +00:00
Kris Kennaway
0b457b9cf0 * Implement basename and dirname using shell builtins 2008-07-26 14:02:55 +00:00
Kris Kennaway
f204e78013 * Cleanup
* Catch up to build ID directory changes
* Record package build completion for reporting to ganglia
2008-07-26 14:02:38 +00:00
Kris Kennaway
90e209c3d9 * Cleanup
* Catch up to build ID directory changes
* Add support for ssh_cmd and scp_cmd to allow using HPN-SSH with the
  none cipher where possible (for performance)
* Lazy client setup; claim-chroot will report if the client needs to be
  set up with this buildid, and we initiate the setup and poll until
  it is complete.  This allows fast clients to begin building before
  slow ones have finished setting up.

TODO: a better solution would be to avoid trying to dispatch jobs onto
clients that are in the process of setting up, since they often have low
loads and are picked preferentially by the job scheduler.
2008-07-26 14:01:07 +00:00
Kris Kennaway
a52cf32275 * Cleanup
* Remove vestiges of archaic support for building bindists from FTP
  snapshots; we haven't used this for years and building a world is no
  longer a challenge
* Revert half-baked bindist generation number and make it per-buildid
  instead.  Compress and md5 it for distribution to the clients.

TODO: Merge with makeworld?
2008-07-26 13:54:59 +00:00
Kris Kennaway
46a114508f * Cleanup
* Catch up to build ID directory changes
* Optimize by using ECHO_MSG=true instead of /usr/bin/true
* Try harder to avoid pollution from local host
2008-07-26 13:52:32 +00:00
Kris Kennaway
18cafe9ff8 * Cleanup
* Catch up to build ID directory layout
2008-07-26 13:51:30 +00:00
Kris Kennaway
1ba1b7f79e * Cleanup
* Catch up to build ID directory changes
* Export the INDEX_PRISTINE and INDEX_QUIET variables (old bug)
* Desupport X11BASE
2008-07-26 13:50:15 +00:00
Kris Kennaway
4bcc698d1c * Cleanup
* Catch up to build ID directory changes
* Desupport 5.x
2008-07-26 13:47:45 +00:00
Kris Kennaway
e9fe4c9896 * Cleanup
* Catch up to build ID directory changes
* Optimize by using __MAKE_SHELL=/rescue/sh
2008-07-26 13:47:03 +00:00
Kris Kennaway
23fa193076 Rewrite in python and combine the functions of the former
checkmachines script.  Polls build machines for their status either
once-off or regularly as a daemon.  Optionally it will update the
queue entries but this remains subject to race conditions.

TODO: Integrate with queue manager and forward machine status changes
to it
2008-07-26 13:45:19 +00:00
Kris Kennaway
335c9a9ec3 More verbose status reporting using key=value format. We now also
report error status, architecture and OS version, and available build
environments, as well as load and number of running jobs
2008-07-26 13:42:14 +00:00
Kris Kennaway
54e565eedc Major optimizations for 'make index' and other recursive traversal
targets.

* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
  The former is statically linked and faster to execute, which becomes
  significant when executing it tens of thousands of times.  This
  trick can be used with other recursive targets by passing in
  __MAKE_SHELL.

* Get rid of make variable assignments that use != command invocations
  in the critical path, using several methods:

  - rewriting logic to use shell or make builtins instead of external command executions
  - macroizing commands and executing them in the targets where they
    are needed instead of with every invocation of make
  - precomputing the results of invariant commands in
    bsd.port.subdir.mk and passing them in explicitly to child makes,
    and using this to avoid recalculation in all the children. NB: the
    commands are still run one per top-level subdirectory but this
    does not currently seem to be a major issue.  They could be moved
    further up into the top-level Makefile at the cost of some
    cleanliness.
  - Committers are strongly discouraged from adding further "bare" !=
    assignments to the ports tree, even in their own ports.  One of
    the above strategies should be used to avoid future bloat.

* Rewrite the core 'describe' target to work entirely within a single
  shell process using only builtin commands.  The old version is
  retained as a backup for use on systems older than 603104, which
  does not have the make :u modifier.  This cuts down the number of
  processes executed during the course of a 'make index' by an order
  of magnitude, and we are essentially now amortized to the minimum of
  a single make + sh instance per port, plus whatever commands the
  port makefile itself executes (which are usually unnecessary and
  bogus).

* Less validation of the WWW: target is performed; this can become
  policed at a port level by portlint.  Specifically we look at the
  second word of the first line beginning with "WWW:" in pkg-descr,
  and append "http://" to it unless it already begins with "http://",
  "https://" or "ftp://".  Thanks to dougb for the idea of how to
  extract WWW: using shell builtins.

* Use the "true" shell builtin instead of echo > /dev/null for a
  measurable decrease in CPU use.

* Add a note about dubious escaping strategy in bsd.port.subdir.mk

* Minor change in output of 'make describe': it no longer strips
  trailing CR characters from pkg-descr files with MSDOS CR/LF
  termination.  Instead the makeindex perl script that post-processes
  make describe into the INDEX is tweaked to strip on input.

The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
Edwin Groothuis
17e6ef1c06 Have a different approach on how to check if the modules file has changed.
Because the $FreeBSD$ keyword isn't expanded in the new version, we can't
just do a diff, check the return value and ignore the output.

Every new modules file, changed or not with regarding to the contents,
has at least four lines in the diff output (line number, old line,
seperator, new line). Only commit it if there are more than four
lines difference between it.
2008-07-14 03:56:23 +00:00
Edwin Groothuis
00809d33a0 Keep the sources of the CVSROOT-ports/modules update script safely
in the ports CVS repository.
2008-07-08 21:03:42 +00:00
Edwin Groothuis
de831ac6da [PATCH] Tools/scripts: Some cleanups, additions to bump_version.pl
- added -c, doesn't change anything
	- added -n, deal with an already checkouted tree
	- removed negative logic in favor of 'unless'
	- switch to 3 arg form of open()
	- don't use globs for filehandles, this is been obsolete
	  since at least 5.6.1
	- handle possible errors in close()
	- allow CVSROOT to be overriden in the ENV

PR:		ports/125025
Submitted by:	"Philip M. Gollucci" <pgollucci@p6m7g8.com>
2008-07-06 02:00:52 +00:00
Mark Linimon
29b9f9c62d Reflect latest changes from production:
- no more 5-exp
 - add 8, 8-exp
 - fix two error-name hrefs
2008-07-02 08:44:20 +00:00
Kris Kennaway
a530ab018b This conversion script is no longer useful 2008-06-25 22:27:17 +00:00
Erwin Lansing
e4bbe0c85e CVSROOT/modules no longer contains an entry per port, remove support
for this from these scripts.
2008-06-19 22:09:01 +00:00
Kris Kennaway
cabd6f0d4a Modernize this script a bit.
* Remove 5.x support
* Leave the archaic ftp snapshot support for now, it is not hurting anything
  but will not work
* Be more careful when removing files (use absolute paths)
* Switch to bindist/tmp for the tmp dir
* Fix the recording of the bindist.tar generation number
* Get rid of redundant or useless processing of the world image
2008-06-11 13:30:35 +00:00
Kris Kennaway
8a8d78247c * Distfile collection is now the default; replace -distfiles with -nodistfiles
* Record the CVS update stamp in some extra places and make sure to remove it
  if the build is started with -noportscvs (since this probably means the
  ports tree was updated by hand at some random time)
2008-06-11 13:28:30 +00:00
Kris Kennaway
fce1fcb22a Add some test -d's to avoid cd'ing into directories that do not exist 2008-06-11 13:25:49 +00:00
Kris Kennaway
fdbc5869f0 Major optimizations. Instead of copying the distfiles around, mv
them in batches according to their target directory.
2008-06-11 13:25:13 +00:00
Kris Kennaway
efaa197bfb Revive this script and make it useful. Transfer the distfiles using rsync
and make sure they have been post-processed first.
2008-06-11 13:24:17 +00:00
Kris Kennaway
271351e954 * Catch up to X11R6 removal
* Keep RESTRICTED distfiles in a separate DISTDIR so we can easily
  avoid accidentally publishing them to the FTP site (idea from des@)
2008-06-11 13:22:58 +00:00
Edwin Groothuis
4937bd57bd Add support for "PORTREVISION?=" and "PORTEPOCH"
Tested on: devel/gettext bump
2008-06-06 05:52:57 +00:00
Kris Kennaway
5953f77e24 Rewrite this to make it more efficient (fewer external command
invocations).  It also fixes some edge cases that were not handled in
the previous version.

TODO: Correctly report IPv6 sockets (already in use by the sparc64 build)
2008-06-02 19:46:03 +00:00
Erwin Lansing
cdb5013c48 Remove support for FreeBSD 5.x 2008-06-01 09:26:12 +00:00
Mark Linimon
11ea3eeed1 Remove the force file, if it was used.
Forgotten by:	linimon
2008-05-29 14:14:54 +00:00
Mark Linimon
ed5147b294 Add a force function here, just like processlogs. 2008-05-29 02:34:41 +00:00
Mark Linimon
4cc67bd216 Add a note that processonelog and processlogs2 are finicky about the
header format of the log files.
2008-05-29 01:46:08 +00:00
Mark Linimon
f5c9292932 Fix these after the 1.31 update to buildscript.
Forgotten by:	pav
2008-05-29 01:45:39 +00:00
Kris Kennaway
9100b4ee0d Rewrite this in python instead of shell. Because we can read the
INDEX once and process internally instead of invoking many external
utilities, runtime is improved from ~20 minutes to <10 seconds.
2008-05-25 18:07:49 +00:00
Kris Kennaway
778518d745 NNew build scheduler written in python to replace the make+sh job
ordering, which had become too limited.

We now build packages ordered by those that are part of the longest
dependency chains first.  This has the effect of building the deepest
parts of the tree first and levelling out the tree height, hopefully
avoiding the situation we currently face where there appear
bottlenecks late in the build where the cluster becomes mostly idle
while waiting for a few long dependency chains to finish building
before the cluster can become fully loaded again.

The algorithm is that we sort the list of remaining packages according
to height (longest dependency chain), then add leaf packages from each
in order until we have filled a queue of length between 100 and 200,
to amortise the cost of this queue rebalancing while not losing the
height averaging property.  Jobs are dispatched from this queue into
worker threads as machine slots become available.

Unlike the make-based solution that required a fixed -j concurrency
value and could not respond to addition/removal of build resources, we
now can dynamically add new machines as they become available to the
queue.

The other advantage of using python is that we have more
customisability and visibility into the build status, e.g. we
periodically report the number of remaining packages, as well as the
list of deepest packages that we are working on.

TODO:

* Implement mtime checking for parent package staleness, so that
  parents are rebuilt if the dependencies are touched more recently.
  Currently packages will not be rebuild if they exist, whether or not
  they are "stale" wrt their dependencies.

* Offload the machine selection into an external queue manager.
  Currently the queue manager used here doesn't interoperate with the
  old one (getmachine/releasemachine) because it's not possible to use
  the lockf()-based mutual exclusion within a multithreaded client.
  Doing that will also allow for a more flexible job placement
  algorithm as well as finer queue customization.
2008-05-10 13:22:51 +00:00
Andrew Pantyukhin
0b5ca793be Add a tiny sh hack - ardiff - compares two archives. 2008-05-06 16:17:01 +00:00
Pav Lucistnik
989ac675fc Remove XFree86-4 from quickports 2008-04-11 11:34:30 +00:00
Pav Lucistnik
b88fea571b Parallelize to 4 concurrent jobs 2008-04-11 11:33:38 +00:00
Pav Lucistnik
0c02d135ff Include per-machine configuration and respect use_zfs flag 2008-04-11 11:32:29 +00:00
Pav Lucistnik
2545b7c79e Sync with pointyhat (reorg) 2008-04-11 11:31:33 +00:00
Pav Lucistnik
7b00cf5640 - Add the port's Makefile ident string to the build log headers
PR:		113234
Submitted by:	Andrej Zverev <andrey.zverev@electro-com.ru>

- Sync with actual script on pointyhat (whitespace, mostly)
2008-03-13 09:54:03 +00:00
Pav Lucistnik
d50ed44a19 - Don't write queue entry for machine that's not on mlist. This allows us to
gracefully remove a node from the workload, and also it prevents build from
  stucking when machine is deleted from mlist.
2008-03-12 16:04:59 +00:00
Pav Lucistnik
f7c728bb1e Make the INDEX_JOBS definition actually effective 2008-03-11 17:05:55 +00:00
Erwin Lansing
170314e4e2 Remove support for 5-exp and add 7-exp, 8 and 8-exp 2008-01-14 17:10:33 +00:00
Erwin Lansing
d32d4753c3 Change homebrew locking routines with lockf(1) based locking. 2008-01-01 13:25:01 +00:00
Mark Linimon
2c493361b0 Add the standard 6-line header and URL to all build failure logs, not
just the plist ones.  If the log is less than 1000 lines after the header,
include it all; else, trim to last 1000 lines.

This should help when deciding where to forward logs.

Tested on:	pointyhat
2007-12-24 14:25:42 +00:00
Mark Linimon
1a3e27b0eb Copy the duds file to a directory where the web server can find it. This
makes it possible to correctly analyze why packages were not built for a
specific run.

Add a beginning and ending email notification to help coordinate between
multiple portmgrs doing runs.
2007-12-24 01:56:22 +00:00