Commit graph

823 commits

Author SHA1 Message Date
Alexander Leidinger
011560cf37 Teach about USE_ICONV, USE_GETTEXT, USE_GNOME and USE_XORG. 2007-08-24 14:29:03 +00:00
Alexander Leidinger
43b63893be Add 2 scripts which help in port maintenance to list all direct library
dependencies of a port:
	neededlibs.sh
		Extract direct library dependencies (filenames) from binaries.
	resolveportsfromlibs.sh
		Prints the name(s) of ports(s) given a library filename,
		suitable for direct use (copy&paste) in LIB_DEPENDS.

Example usage is included in the scripts. The following combined usage may
be helpful for further porting/testing automation:
	resolveportsfromlibs.sh -b /usr/local $(neededlibs.sh /test/bin/*)

Requested by:	kris, lofi (sort of)
2007-08-12 12:49:23 +00:00
Gabor Kovesdan
4c9cd257fd - Extract command variable definitions from bsd.port.mk, they are now stored in
bsd.commands.mk and can be easily reused within the infrastructure.
- Revert old DESTDIR implementation.
- Add a new, fully chrooted DESTDIR implementation as bsd.destdir.mk.

Sponsored by:	Google Summer of Code 2007
Approved by:	portmgr (pav)
2007-08-04 11:37:24 +00:00
Kris Kennaway
687f043633 Support builds using zfs and tmpfs backing store
zfs:

* Enabled by use_zfs=1 in portbuild.conf

* Populate build chroots by cloning a zfs snapshot instead of maintaining
  many duplicate copies.  In principle this is very efficient since
  everything is copy-on-write and zfs snapshot creation is almost
  instantaneous.  There might be additional overheads from building on zfs
  though.  Currently the snapshot base is hard-wired to y/${branch}@base
  but should be parametrized.  This also must be populated beforehand, e.g.
  during machine startup

* Clean build chroots by just destroying the snapshot.

tmpfs:

* Enabled by use_tmpfs=1 and tmpfs_size in portbuild.conf

* The previous md strategy of mounting in used/, populating and then
  remounting (to avoid possible races from multiple builds claiming the
  same chroot) doesn't work here because tmpfs instances are destroyed at
  umount.  I am not entirely sure the simpler approach is free from races.
2007-07-29 20:27:54 +00:00
Kris Kennaway
8d84574a4a Refresh old sample portbuild.conf with the one currently used for i386
builds.  Probably this should be better documented and commented ;)
2007-07-29 20:06:05 +00:00
Kris Kennaway
d197960279 * Clean up hacks that had to copy in shared libraries from the host in
order to run certain host binaries that were kernel-dependent.  We
  now seem to be able to rely on the /rescue versions (and killall(1)
  seems to be unused).

* Allow for ccache directories to be shared over NFS via the ccache_dir_nfs
  portbuild.conf boolean

* Populate BSD.local.dist from ${PORTSDIR}/Templates and remove population
  of BSD.x11-4.dist and support for XFree86 3.x
2007-07-29 19:56:36 +00:00
Kris Kennaway
54783169b2 Correct typo ("singal") 2007-07-29 19:48:40 +00:00
Kris Kennaway
064bda8040 * Switch from netcat port to base system nc. Replace symbolic port name
by its numeric equivalent since nc(1) does not look up the former.
2007-07-29 19:45:43 +00:00
Kris Kennaway
5f9d4f6e71 * Retire 4 build and add 6-exp2 experimental build
* Don't populate BSD.local.dist, this file is maintained in the ports tree
  now and is populated at build time
2007-07-29 19:45:05 +00:00
Kris Kennaway
ca2e9e98c7 Retire support for 4 and 4-exp builds 2007-07-29 19:43:22 +00:00
Kris Kennaway
26965e6e9c * Increase index build concurrency to reflect the new, improved pointyhat
* Add support for 6-exp2 experimental builds
2007-07-29 19:42:35 +00:00
Kris Kennaway
cc0916c8a0 * Revise the machine selection algorithm. Previously it chose the first
machine with the lowest number of running jobs.  This worked when the
  clients were all roughly equivalent, but schedules poorly when there
  are some that are much more powerful (e.g. 8-core machines vs UP machines)

* We now compute the ratio of running jobs to maximum jobs and schedule on
  the machine with lowest occupation fraction.  This populates the machines
  to equal fractions of their capacity.
2007-07-29 19:41:52 +00:00
Kris Kennaway
13e1b025a1 Use rsync -L instead of rsync -l to deal with the fact that we like to
symlink ports and src trees elsewhere.  With -l this would turn a populated
tree into a dangling symlink.
2007-07-29 19:39:30 +00:00
Kris Kennaway
b3551fde44 * Remove support for 4 and 4-exp builds and add 6-exp2 experimental build
* Only hardlink the old log files instead of anything else that might be
  in the directories
* Add comment that old logfiles should be removed as well as packages, to
  avoid duplicate versions of the same port log
2007-07-29 19:38:08 +00:00
Pav Lucistnik
87b4c7c511 Introduce straslivy.py, a fancier showrunning type of thing, written in Python. 2007-07-29 19:36:55 +00:00
Kris Kennaway
3eb8ee9622 * Remove processing of 4 and 4-exp logs now that the builds are no longer
run
* Add a 6-exp2 build which is a second experimental tree
* Remove an archaic 4.x/5.x log comparison
2007-07-29 19:36:33 +00:00
Kris Kennaway
5d0b9b3789 * Remove vestiges of procfs mounting/umounting from here; we have to
do it in portbuild from outside the jail thesedays

* Ignore /var/db/fontconfig which does not get restored to pristine state

* Save copies of master.passwd and groups and check them after the build
  for changes, to look for user/group additions that may not be correctly
  registered in UIDs/GIDs.  Future work will hopefully automatically
  check against those files and make unregistered IDs a fatal condition

* Correct logic mistake that was keeping distfiles for collection when
  the checksum mismatched
2007-07-29 19:35:00 +00:00
Pav Lucistnik
98990a91c7 - Log the failure to copy dependant package from pointyhat 2007-07-29 19:27:48 +00:00
Kris Kennaway
fd3a8f51f6 Refactor common variables from case statement for various branches.
Update default X11BASE.  Retire PARALLEL_PACKAGE_BUILD and HAVE_MOTIF which
are now obsolete.
2007-07-29 19:27:22 +00:00
Kris Kennaway
0a0b1be73c Retire this obsolete instruction file dating back to last century. We
have a more modern and complete version in the doc collection.
2007-07-29 19:21:47 +00:00
Mark Linimon
2e85070f37 Drop 4.X statistics. They are half-a-year stale. 2007-07-22 04:36:49 +00:00
Mark Linimon
df852181a7 Add 9 more cases of gcc4; remove some false positives for autoconf; add
an 'f77' reason; flag 'warnings being treated as errors' as 'cc'.  This
reduces the unknown output on i386-7 by about half.
2007-07-02 10:22:47 +00:00
Erwin Lansing
afade85a8a ARCH may be set in the environment for cross building, so only
set it conditionally.

Submitted by:	kris
2007-06-12 15:14:29 +00:00
Erwin Lansing
87b364f5fd Set default architecture to i386. 2007-06-11 21:18:46 +00:00
Erwin Lansing
05ba2446ab Make it possible to override the templates by using an environement
variable TEMPLATES.

RT:		105108 (reworked from)
Submitted by:	Curtis Jewell<swordsman@csjewell.fastmail.us>
2007-05-24 22:23:37 +00:00
Florent Thoumie
d4f0d0048a - Welcome X.org 7.2 \o/.
- Set X11BASE to ${LOCALBASE} for recent ${OSVERSION}.
- Bump PORTREVISION for ports intalling files in ${X11BASE}.
2007-05-19 20:36:56 +00:00
Renato Botelho
75b87da473 Fix addport to work correctly with ports-mgmt category.
Reported by:	miwi
Tested by:	miwi
2007-04-20 12:45:01 +00:00
Vasil Dimov
101df1b468 Use echo instead of printf because external commands cannot be executed
with very long arguments (>400000 characters).

The problem reveals for example if
/usr/ports/Tools/scripts/rmport -d print/ghostscript-gnu
is executed - it does
printf "%s\n" "... 451109 chars ..."

Spotted by:	rafan
2007-03-28 20:39:18 +00:00
Mark Linimon
43ad8e0f95 Add a column for 'build logs'. This is larger than the number of the
packages due to packages being trimmed by RESTRICTED.

While here, note that the 'missing' column will be off by the number of
duplicates in the other columns.  This happens when partial builds are
restarted.
2007-03-23 05:49:49 +00:00
Mark Linimon
9d6f970760 Workaround for the fact that 4/ports is no longer populated on pointyhat. 2007-03-09 02:43:55 +00:00
Vasil Dimov
eed3828ab1 * Run cvs update just before cvs commit to sync a potentially changed files
in the repository. Suggested by: gabor@
* Fix typo in the output
2007-02-19 07:24:36 +00:00
Kris Kennaway
7379c7f034 Increase resource limits to 400MB filesize and 2 hours CPU limit per
process.  Thankyou openoffice!

Pass in the jail IP address in the JAIL_ADDR environment variable
2007-02-18 09:05:28 +00:00
Kris Kennaway
ae0d1702e9 Default to -nocopy when using -norsync 2007-02-18 09:03:52 +00:00
Kris Kennaway
f400f2bb03 Also filter out gconf leftover files from /usr/local as well as /usr/X11R6.
Set DISPLAY to the IP address instead of using the :<...> implied form.
This is required for jails.
2007-02-18 09:03:21 +00:00
Kris Kennaway
ac6a452879 Don't require arch to be passed in on the command line, query it using
uname
2007-02-18 08:59:51 +00:00
Kris Kennaway
b21c917ce8 Don't play silly games trying to guess the arch, we are passed it in on
the command line
2007-02-18 08:59:22 +00:00
Kris Kennaway
bc7eeeee96 Increase global build timeout to 100 hours 2007-02-18 08:58:46 +00:00
Kris Kennaway
487025d7c8 Improved sanitization of the build environment 2007-02-18 08:58:24 +00:00
Kris Kennaway
da57eeaeb0 Don't require an /etc/arch file, we can obtain the information from uname 2007-02-18 08:58:07 +00:00
Kris Kennaway
d48df213cd Also attempt to clean /root/.ccache in case it is in use. When cleaning
on a machine that has use_md_swap=1, allow for the possibility of reusing
a md between builds if md_persistent=1.  This requires a patch from pjd
to support BIO_DELETE in md devices, but it is a big optimization when
it can be used.
2007-02-18 08:57:20 +00:00
Kris Kennaway
21c449a7fa Index building needs to happen before prunefailures is run, otherwise it
will completely erase the list.

When using -continue, don't append to the duds.errors, we don't want to
preserve the old cruft from a previous build
2007-02-18 08:55:39 +00:00
Kris Kennaway
56b6a0b170 Increase cleanup timeout to 5 days from 48 hours, the openoffice builds
now regularly take longer than this :(
2007-02-18 08:53:21 +00:00
Mark Linimon
e472b6f28c Fix late typo in previous commit. 2007-02-14 08:24:23 +00:00
Mark Linimon
385bfc1533 Eliminate some false positives for missing_header, sometimes seen in the
configure step.
2007-02-14 04:16:30 +00:00
Mark Linimon
b0904b6955 Combine all like terms to get another 10% speedup in processing time.
There is no change in any of the individual terms; this is merely a
rearrangement.

This change undoes what I was trying to do back in 2004 of breaking up
each individual test into a grep, for readability.  The performance of
the script has continued to suffer as new greps were added over time,
to the point where this is now a bad tradeoff.
2007-02-13 21:58:21 +00:00
Mark Linimon
f95f03392e Move two more cases into the 'uncommon' section. 2007-02-10 09:19:24 +00:00
Mark Linimon
87143d71d6 Append one character to the gcc4 case (missed during cut-and-paste). 2007-02-10 06:59:13 +00:00
Mark Linimon
8bff98fdb9 Move the uncommon cases below the common ones. A 10% improvement on large
directories, but a 5% loss on smaller ones.

No code changes (yet) except for the deletion of one duplicate
("fetch: transfer timed out" -> "fetch_timeout".
2007-02-10 06:57:53 +00:00
Mark Linimon
31e52eb01c Remove the other 2 cases of apxs. 2007-02-09 21:49:11 +00:00
Mark Linimon
4dd06f27ed Speed up by removing the following obsolete tags:
alignment apxs assert CATEGORIES cgi-bin forbidden stl
2007-02-09 20:55:43 +00:00
Mark Linimon
db8225268f Add a new case, 'gcc4', to try to catch the majority of the exceptions that
we are seeing on the latest -current runs.  Saves 40 seconds of time on
those runs, at the cost of 4 on the others.
2007-02-09 04:50:10 +00:00
Mark Linimon
4a1e61ae9c Fix up the code for amd64-6-exp; add a column to label builds that
still have processes running, and add that into the highlight logic.
2007-02-07 08:00:20 +00:00
Kris Kennaway
2c759cf3d0 Retire PORTOBJFORMAT 2007-02-01 03:28:03 +00:00
Erwin Lansing
f3f3875210 Drop the build on RELENG_4 2007-01-30 14:49:21 +00:00
Vasil Dimov
92615ddfc4 A bunch of cosmetic changes - add one empty line to make the output more
readable and use double quotes everywhere.
2007-01-26 14:25:39 +00:00
Vasil Dimov
a62c886fca Make output messages more useful 2007-01-26 10:19:23 +00:00
Vasil Dimov
0d451e0598 * Make it possible to skip existing dependencies and ports references in LEGAL
and continue with removal anyway. Requested by miwi@
* Pipe dependencies information (if any) through a PAGER because INDEX lines
  are very long and hard to read when wrapped
2007-01-19 15:49:49 +00:00
Mark Linimon
c43f8047ea Eliminate more false positives for install_error. Very noticeable on
latest gcc test build.
2006-12-25 18:09:34 +00:00
Vasil Dimov
59a026b0f1 Query Gnats for PRs by using the query-pr command on freefall instead of the
web-interface becase the later is not reliable.
2006-12-20 13:18:25 +00:00
Vasil Dimov
e2f1d375a7 Add check for existing non-closed PRs related to the port being removed.
If any are found then ask if the port should be skipped from removal or
removed regardless of the PRs.
2006-12-13 07:32:58 +00:00
Dirk Meyer
3ac2f4749e - add check sysvipc
happens when security.jail.sysvipc_allowed=0
2006-12-03 17:59:09 +00:00
Mark Linimon
2830a3d3df Work around the fact that 5-exp, these days, is really another 6-exp,
except in disguise.
2006-11-25 15:51:02 +00:00
Erwin Lansing
596b15845d Replace a simple call to localtime() to strftime() to include the
timezone.
2006-11-23 14:04:52 +00:00
Erwin Lansing
bdbae3ea52 eik@ has been inactive for quite some time and as I am running
these scripts on the cluster, transfer maintainership of these
to myself.
2006-11-23 12:16:59 +00:00
Erwin Lansing
6e65d26f6e Include a time when the script was started in the mail templates.
This script can sometimes take several hours to run on builder,
and thus leading to confusing of why it still reports an error
that was fixed in cvs some time ago.  Including the time when
the ports tree was updated should reduce some of this confusion.
2006-11-23 11:59:04 +00:00
Vasil Dimov
9125407be5 Add deprecated reason to the output of -F 2006-11-02 09:20:10 +00:00
Vasil Dimov
e1bcb99398 * Create custom commit message template and populate it with the ports
to be removed, possibly with the expiration date and deprecated reason
* If port is not marked for expiration than put "Removed" in ports/MOVED
  entry instead of "Has expired"
* Implement -a option to remove all expired ports
* Ask if the cvs diff output should be recreated/reviewed again thus
  giving the committer a chance to edit files by hand and view diff
  results afterwards
* Cosmetic changes
2006-11-01 09:57:36 +00:00
Vasil Dimov
1854c2ed1d When checking for dependencies of foocategory/barport also find constructs
like .../barport/something e.g. expect either space, slash or eol after
port's name
2006-10-05 10:40:29 +00:00
Mark Linimon
3c741dc25b Since we already have the data from the grep, go ahead and make the 'latest
log' cell a link to it.  My weak awk/sh skills are evident here, but it
does the job.
2006-09-23 07:44:34 +00:00
Mark Linimon
c5e446540c Add links to cvsdone and INDEX files. Add some whitespace. 2006-09-23 05:39:53 +00:00
Vasil Dimov
800d19da74 When checking dependencies also look for portname references in Mk/*.mk
in addition to */*/Makefile* and ignore references in comments
2006-09-14 09:13:39 +00:00
Kris Kennaway
81aca5b157 * Back up duds to duds.old before, not after we create the new one
* Add more XXX comments for future work

* Only record a cvsdone timestamp if we updated cvs

* When building with -trybroken, it's safe (and desirable) to run the
  prunefailure script

* Reorganise a few things for better parallelism

* Instead of keeping a duplicate copy of the previous logs and errors
  under bak/, just store a symlink to the archival location

* When doing an incremental build, also cycle out the old logs to avoid
  broken links on the website (the logs from the previous build are
  removed until the packages are rebuilt).  Use cpio to create
  hardlinked copies of the previous logs.  XXX when these are bzipped
  by cron to save space the links will be broken and it might actually
  take more space.

* Don't bother bunzipping old logs, now that the processlogs scripts
  can handle it.  This was a waste of time anyway since they'd all be
  rebzipped by the next nightly cron job.

* When the build is complete, stash a copy of the restricted ports in
  bak/restricted/ before deleting them from packages/, and restore from
  here when doing an incremental build to avoid needlessly rebuilding
  them each time.
2006-09-14 05:43:23 +00:00
Kris Kennaway
b7cf9de7e5 * When calculating the IP address to use for the jail, don't use
127.0.0.0 or 127.0.0.1

* Don't use chroot to mount the linprocfs, or it won't be visible
  within the jail.
2006-09-14 05:33:12 +00:00
Kris Kennaway
8dcaefb8ab * Support bzipped logfiles
* More robust extraction of the header values (copes with the addition of
  the build uname to the header)
2006-09-14 05:30:04 +00:00
Kris Kennaway
db6e3408a5 * If .force exists, rebuild index unconditionally
* Support .log.bz2 files

* Clarify that BROKEN ports are not frequently rebuilt so probably
  won't appear
2006-09-14 05:26:08 +00:00
Kris Kennaway
d35698c80e Correct typo in previous commit 2006-09-14 05:24:31 +00:00
Kris Kennaway
57407fb769 * Drop alpha support
* Increase sparc64 build timeout to 24 hours (we have so few build
  machines that we cannot afford to tie them up for longer)

* Increase other arch build timeout to 100 hours (hello openoffice!)

* If we successfully build a formerly broken package, touch errors/.force
  which will kick off a rebuild of the html files
2006-09-14 05:24:09 +00:00
Kris Kennaway
2df0e38d60 * Retire 4-exp builds and add support for 6-exp.
* Use a generation number for the bindist tarballs, with compatibility
  symlink.  Eventually we'll use this to avoid building in a "stale"
  chroot (i.e. populated by old world).

* Don't bother running ldconfig on i386, it is evidently not needed since
  the other arches work fine without it
2006-09-14 05:21:49 +00:00
Kris Kennaway
3c9d082dd2 * Silence gconf spam from the mtree checks (for now)
* Don't try and mount/umount procfs, it won't work when we build inside a
  jail.

* Report the uname -mr of the build environment, to ease confusion of
  people reading the error logs by mail.
2006-09-14 05:19:09 +00:00
Kris Kennaway
cef3a38ffb * Use SRCBASE for source location
* The 5.x variant for populating /etc does not work on 6.x and above, and
  vice versa.  Conditionalize old and new methods.
2006-09-14 05:17:12 +00:00
Kris Kennaway
72ac1bdadb Go back to force unmounting because not doing so was too unreliable. 2006-09-14 05:14:19 +00:00
Kris Kennaway
69e1fc873f Silence the clean-chroot invocation 2006-09-14 05:13:50 +00:00
Vasil Dimov
f5a601c10a Remove grep's -w switch from the dependency check since it misses some
dependencies. This needs some more polishing but for now it is better to
emit false positives than skip dependencies.
2006-09-12 08:35:16 +00:00
Mark Linimon
cb217a1914 Get rid of multiple false positives for "arch" due to compiler warning;
fix true positive for "runaway_process".
2006-08-20 18:38:08 +00:00
Mark Linimon
8765aa08c8 Catch a few more new cases of linker error; reclassify most of the linker
errors seen on -CURRENT as "compat6x" e.g. "someone needs to create a
compat6x port and then make it a dependency here."
2006-08-18 19:23:19 +00:00
Erwin Lansing
50513d5d52 Add support for DESTDIR part I.
This commit should largele be a NOOP as it only adds support
for DESTDIR undefined. This does allow us to start testing
ports with DESTDIR set, but this is as of yet not supported.

Although this has been extensively tested on pointyhat, this
is a very intrusive change and some cases may have been
overlooked. Please contact Gabor and me if you find any.

PR:             100555
Submitted by:   gabor
Sponsored by:   Google Summer of Code 2006
2006-08-04 12:34:50 +00:00
Mark Linimon
4ab6687b05 Catch another case of 'disk full'. 2006-07-31 20:05:12 +00:00
Erwin Lansing
4f52cd8ba6 Change locking from per architecture to per architecture and branch.
Especialy i386 has enough horsepower to run two branches simultaniously.
This change has been on pointyhat for some time.
2006-07-30 14:40:43 +00:00
Shaun Amott
068a568fca Add an option to the addport script: -b requests that any files in
${FILESDIR} which look like patches be treated as binary files. This
prevents RCS tags in patch fragments causing a problem for CVS.

Approved by:	garga (maintainer),
		ahze (mentor, implicit)
2006-07-14 01:49:35 +00:00
Mark Linimon
8465bb92e6 Add the cvs checkout date so people can see how long the runs take; add
a comment about openoffice.org*; generalize a bit.
2006-07-13 03:52:28 +00:00
Mark Linimon
48eea8eed4 Make it a little more robust. 2006-07-09 19:02:14 +00:00
Mark Linimon
8ccf5fa29d Convenience script to tersely display all currently running package builds. 2006-07-09 18:16:32 +00:00
Mark Linimon
8ae57c1526 'portcomment' appears to be obsolete. 2006-07-08 21:38:55 +00:00
Mark Linimon
ed5aedd9d3 Fix the disk_full rule. 2006-07-08 20:29:41 +00:00
Mark Linimon
7d3e7fee38 Add the -exp builds down at the end. Probably only of interest to portmgr,
so do them separately in order not to break up the ease of browsing the
most important stats, above.
2006-07-08 04:09:42 +00:00
Mark Linimon
8b9d5c5231 White space adjustment after refactoring. 2006-07-08 03:33:51 +00:00
Mark Linimon
655da76c6d Refactor. No code change (yet). 2006-07-08 03:33:06 +00:00
Mark Linimon
349e8952a4 Add some color to the display. 2006-07-06 04:54:53 +00:00
Mark Linimon
7de73dca03 Fix CVS tag. 2006-07-05 23:30:42 +00:00
Mark Linimon
c2c0a5bbad Refactor. No code changes yet. 2006-07-05 23:29:45 +00:00
Mark Linimon
34d3330d94 Add a column for last-date stamp and clean up the formatting a bit. 2006-07-05 23:17:53 +00:00
Vasil Dimov
ed290037f5 Escape characters (like +) that may appear in ports' names and
break sed -E regular expressions
2006-07-05 08:31:49 +00:00
Renato Botelho
0bc560fc74 When automatic commit log is generated, change @ to " at " on submitter email
to prevent spam
2006-07-04 23:12:10 +00:00
Mark Linimon
c693c172bc Handle the case where the size of INDEX is zero (e.g. during new builds). 2006-06-28 22:46:18 +00:00
Mark Linimon
e4e1eb4a82 Fix edit-o. 2006-06-28 04:27:43 +00:00
Mark Linimon
a2947a3c30 Creates an HTML file with tables for each architecture which summarize the
number of packages built vs. packages that failed, along with some other
related information.
2006-06-27 05:31:32 +00:00
Mark Linimon
ef2b06d533 - Remove false positives for 'makefile' (and possibly a few others).
- Remove obsolete explanations which are no longer seen, for speed:
   ELF, MOTIF, MOTIFLIB, X_manpage, awk, bison, ffs_conflict, forbidden,
   getopt, getopt.h, imake, lc_r, malloc.h, pod2man, sed, stl, soundcard.h,
   texinfo, union_wait, values.h

 - Add more cases to: arch, bad_c++, compiler_error, depend_object,
   install_error, linker_error, mtree, perl5

These changes reduce many dozens of false positives; add a few dozen
true positives; and for certain directories, improve the speed about 10%
(a few drop by 15%).

It turns out that the performance issues are mainly due to the multiple
greps.  If performance is an issue we need to go back to the moderately-
unreadable, everything-on-one-line paradigm.  Before that happens, I would
like to experiment with some refactoring, so that the patterns are built up
in the shell line-by-line, so you could still be able to read it.

Tested on:	pointyhat
Hat:		portmgr
2006-06-24 19:51:53 +00:00
Erwin Lansing
7fbbcb4402 MFP4:
Actually use ${SCP_DEST_TMP} to fix the case where
        SCP_DEST_TMP != /tmp/
2006-06-22 18:52:57 +00:00
Erwin Lansing
c090c55e39 MFP4:
When copying INDEX to the server, copy it first to a staging area and
first then to the real location. The copying can take long enough for
users to get a truncated file when downloading during the upload.
2006-06-19 15:44:16 +00:00
Renato Botelho
3cf8cfc8cd - Change addport script to do the job locally instead connect to freefall every
time to add a new module. If you want to still use old way, just use
  "-M freefall.FreeBSD.org" option
- Take addport maintainership
- When modulesupdate fail, ask user to retry
- Change modulesupdate to work fine with addport

Approved by:	will (maintainer)
2006-05-16 15:44:29 +00:00
Vasil Dimov
12dda3240e Add support for specifying ports to be removed as directories on the
filesystem (either absolute or relative) in addition to `category/port'.

PR:		ports/96649
Submitted by:	Cheng-Lung Sung <clsung@freebsd.org>
Reworked by:	vd
2006-05-02 11:31:54 +00:00
Vasil Dimov
8529c41f37 Improve dependency check:
When removing category/port - look if other ports' Makefiles contain
`/port' rather than `category/port', since the later misses things
like `${.CURDIR}/../port'
2006-05-02 09:16:10 +00:00
Vasil Dimov
b2a9550574 Add support for removing multiple ports which depend on each other 2006-04-17 08:08:37 +00:00
Kris Kennaway
38bfaf4774 Explicitly mount the NFS images ro, instead of relying on the server to
export it ro.  This saves thrashing the server if we accidentally try to
rm -rf a NFS mount (e.g. because a chroot cleanup failed).
2006-04-16 02:29:36 +00:00
Kris Kennaway
30e2a90b43 Don't bother archiving the ports tree, we don't use it for anything so it
just takes up time.
2006-04-16 02:27:27 +00:00
Vasil Dimov
dffa807775 Quote ${1} so we don't get ``[: =: unexpected operator'' if the script
is started without arguments.
2006-04-12 05:23:04 +00:00
Vasil Dimov
ffc261a29e Add the script I use to remove ports so everyone
can benefit (or suffer :-) from it.
2006-04-10 05:54:50 +00:00
Kris Kennaway
6da61e3ed2 Mount linprocfs on amd64 for the convenience of jdk builds. 2006-04-03 04:43:56 +00:00
Kris Kennaway
072a81b38f The squid rc.d script no longer has the .sh suffix 2006-04-03 04:42:42 +00:00
Kris Kennaway
36780b5bd1 Do not preserve the previous package sets in bak/. This is taking up
too much space on pointyhat, and it's also very slow.
2006-04-03 04:41:59 +00:00
Kris Kennaway
7d1ca938be Clean up linprocfs on amd64 as well. 2006-04-03 04:41:14 +00:00
Kris Kennaway
721c2900a5 jdk is buildable on amd64, so we need to also mount linprocfs there. 2006-04-03 04:40:39 +00:00
Kris Kennaway
6b9fc3cfd1 This script preserves packages that will be removed by the restricted.sh
script, i.e. so they can be moved back into place before start the next
incremental build so they won't be needlessly rebuilt every time (jdk, I'm
looking at you).  It is a bit of a hack since it relies on assumptions
about the structure of that shell script, but for now it's the best we
can do.
2006-04-03 04:40:10 +00:00
Kris Kennaway
fc0b01f665 Temporarily back out the pre.log change, it doesn't work properly.
Approved by:    portmgr (implicit)
2006-03-13 03:05:51 +00:00
Kris Kennaway
0a3523a185 Mount the md image async here too
Approved by:    portmgr (implicit)
2006-03-13 03:04:37 +00:00
Kris Kennaway
7a39c45c24 Add some more directories temporarily until these ports can be made to
clean themselves up properly.

Approved by:	portmgr (implicit)
2006-03-13 03:04:07 +00:00
Kris Kennaway
6d04ba603f Add a mechanism for reporting client machine error conditions back to the
server.  Error conditions are flagged by other processes by creating
a named dotfile in ${scratchdir}.  If these files are found, report the
error status instead of the number of running jobs.  Currently report "ERR"
for all error conditions; I will probably change this to a per-condition
message.

Currently only "squid not running" and "disk space low" conditions are
reported.
2006-02-15 07:48:53 +00:00
Kris Kennaway
744179e319 Trim some unused cruft
If the package copy fails, bail out immediately instead of later on when
we try to pkg_add it.  Also trap signals and bail out.

Both conditions will cause a retry of the package build.
2006-02-15 07:45:53 +00:00
Kris Kennaway
56aabd9e31 Save the output of portbuild run on the client to a temporary log file.
If portbuild bailed out unexpectedly, mail the log to ${mailto}.

Add some XXX comments about improving robustness of this script.

Sleep for 2 minutes before retrying builds, to avoid spamming ${mailto}
with a high rate of failure logs.  In future we might be smarter about
attempting to automatically correct common failure modes.
2006-02-15 07:44:47 +00:00
Kris Kennaway
d270e5ec99 Add some sanity checking of the build environment:
* Test whether squid is running.  If not, try to kick off
  the rc script in the background in case it can be restarted
  cleanly.

* Test for at least 100MB of free space on the scratch partition.

If either condition fails, set an exception flag and bail out.  This
will be reported back to the server via reportload.
2006-02-15 07:42:30 +00:00
Kris Kennaway
bb3de95c29 * Don't try to pkg_delete packages that are not installed (the usual
cause is because it was specified in the list twice)

* Don't panic when the list of packages to delete becomes empty

* When unexpected filesystem changes are detected, bail immediately
  instead of proceeding and hiding the error in the middle of
  the log
2006-02-15 07:39:48 +00:00
Kris Kennaway
4787e51b8b Add support for 6-exp builds (FreeBSD 6.x is our new reference platform) 2006-02-15 07:34:02 +00:00
Kris Kennaway
17394c78b7 * Switch back to using pkg_delete -f; we are not yet ready to deal
with all the errors from broken pkg_delete scripts

* As threatened in previous commit, move the pristine mtree spec
  generation to phase 1, and avoid having to delete and re-add the
  FETCH_DEPENDS.  We still have to keep them installed until after
  'make extract' though
2006-02-13 20:47:04 +00:00
Kris Kennaway
89b70a6115 * In kill_procs(), pass in the directory and mountpoint as separate
arguments (cosmetic)

* Detect if a chroot was used to run a jailed build, and first attempt
  to gracefully shut it down by killing everything within using pgrep(1)
  This has a much higher chance of succeeding that relying on fstat to
  identify processes that might interfere with our attempts to clean up
  mountpoints, which is fragile (libkvm-dependent), and inherently
  unreliable at best.
2006-02-11 10:05:01 +00:00
Kris Kennaway
50a3a73c61 Support for building ports in a jail instead of a chroot. If use_jail=1
in portbuild.conf (or per-machine .conf), then construct a 127.0.0.0/8
IP address based on the build directory ID (i.e. unique for each
build instance).  This is bound to the lo0 interface for the duration
of the 'phase 2' build.

We cannot build 'phase 1' in a jail since 'make fetch' doesn't always
work through a proxy (e.g. squid sometimes mangles files fetched through
FTP, I think by performing CR/LF translation in FTP ASCII mode).

Pass in the HTTP_PROXY variable to the jail, if set.  This allows FTP/HTTP
access from within the jail if the proxy is suitably configured (some ports
legitimately need to fetch additional files during the build, e.g. if they
have a BUILD_DEPENDS=...:configure target that needs to fetch additional
distfiles).

Not all ports can be built in jails (most notably the linux_base ports
since they want to mount/umount linprocfs), so we will need to come up
with a way to deal with this.

Some ports require SYSV IPC, so security.jail.sysvipc_allowed=1 might be
required.  Some other ports attempt to perform DNS lookups, ping, or
outbound TCP connections during the build.

When it works, this provides better compartmentalization of package builds,
e.g. easier termination of builds without the possibility of daemonized
processes staying active; no possibility of accidental interference
between jails, etc.  It also allows for admin monitoring using jls(1).
2006-02-11 10:01:37 +00:00
Kris Kennaway
624d76fbca * Use ${mailto} portbuild.conf variable instead of hard-coded list [1]
* Remove old logs and possible compressed logs before attempting the build

Requested by:   lofi [1]
Submitted by:   linimon [1]
No more accidental portbuild spam:      kris and krion [1]
2006-02-11 09:49:53 +00:00
Kris Kennaway
4094b5762c Use ${mailto} portbuild.conf variable instead of hard-coded list
Requested by:	lofi
Submitted by:	linimon
No more accidental portbuild spam:	kris and krion
2006-02-11 09:48:53 +00:00
Kris Kennaway
b8d81fba50 Checkpoint a major round of changes:
* Only keep distfiles if the port passes 'make fetch', so we don't
  accidentally keep files with invalid checksums

* Use cleanup() instead of directly exiting in some error conditions

* When cleanup() is called indicating an unexpected error (possibly
  leaving the filesystem in an inconsistent state), mark the chroot
  as dirty so it will not be reused by another build

* Remove packages in dependency order instead of with pkg_delete -f in
  possibly incorrect order.  This paves the way for focusing on errors
  generated by pkg_delete (e.g. @dirrm that should be @dirrmtry) in the
  future. [1]

* Detect when packages were left behind because they were still in use
  by other packages, indicating an incorrect or incomplete port
  dependency list

* Partial support for ccache builds (not yet complete)

* Support non-standard LOCALBASE/X11BASE settings

* Delete FETCH_DEPENDS after the 'make fetch' stage.  We have to add
  them again before 'make extract' since, due to a lack of a 'fetch
  cookie', 'make extract' actually *always* runs 'make fetch' again,
  even when distfiles have already been fetched.  We need to delete
  them in order to:

* Record an mtree spec of the 'pristine' filesystem state, for later
  comparison.
  # XXX Perhaps this can be done in stage 1 before the
  # 'make fetch', removing the need to delete-and-readd.

* Also record an mtree spec of the filesystem state prior to the
  build phase.  Compare this to the state of the filesystem
  immediately before running the install phase, to detect files
  that were inappropriately installed during the build phase.
  Doing so is a fatal error.

* Prior to installing, try to run a 'regression-test' port makefile
  target, if it exists.  This allows ports to hook their internal
  regression suites into the package build.  This needs further
  infrastructure support, e.g. a default NOP target in bsd.port.mk.
  For now this is run with 'make -k', so regression failures will
  not yet actually cause package build failures.

* Separate the 'make install' from 'make package' phases rather than
  let the latter implicitly do the install.

* After the newly packaged port has been deleted, compare the state
  of the filesystem to the state before 'make install'.

* After removing BUILD and RUN dependencies, compare the filesystem
  state to the pristine state before the start of the build.  This
  also detects package dependencies that did not clean themselves up
  properly when deinstalling.  It also detects dependencies that were
  'missing' from the port INDEX: these were not pkg_added into place,
  so the package build had to compile them from scratch (a big waste
  of time and effort), so this is now also a fatal error.

PR:		ports/85746 (inspired by) [1]
Submitted by:	Boris B. Samorodov <bsam@ipt.ru> [1]
2006-02-11 09:38:18 +00:00
Kris Kennaway
84c66c52a2 Flip from noclean to clean 2006-02-03 20:13:23 +00:00
Kris Kennaway
35fb7ca9ce Don't bother chowning the client /var/portbuild/, it just takes too long
and this doesn't happen in practise unless you screwed up manually.
2006-02-03 20:10:34 +00:00
Kris Kennaway
e0db90a164 Use clean-chroot with clean=2 to remove the chroot instead of duplicating
some of the code
2006-02-03 20:09:35 +00:00
Kris Kennaway
e3e716a021 Flip "noclean" to "clean" 2006-02-03 20:08:56 +00:00
Kris Kennaway
b762d9e066 Instead of passing in a "noclean" boolean, pass in a "clean" level:
0 = don't clean chroot
  1 = sanitize commonly-modified directories
  2 = remove entire chroot
2006-02-03 20:08:18 +00:00
Kris Kennaway
a65bd63641 Also look for chroots that are marked 'dirty' (previous build left chroot
in unclean state) and run clean-chroot on them to remove them.
2006-02-03 20:07:13 +00:00
Kris Kennaway
a9f9b51a89 Don't try to remove the lock file now that we use lockf to manage it
Noticed by:	 linimon
2006-02-03 20:06:04 +00:00
Mark Linimon
f7200095a8 Fix bogus comments. No code change. 2006-02-02 00:40:37 +00:00
Kris Kennaway
e242e2904e Correctly set SRCBASE; the version inherited from buildenv is wrong for
the client chroots.
2006-01-27 22:42:00 +00:00
Kris Kennaway
d59fe16ef4 Don't try to rsync docs, we no longer need to distribute them 2006-01-27 22:40:51 +00:00
Kris Kennaway
2c15d2d1d6 Update the list of quickports 2006-01-27 22:40:33 +00:00
Edwin Groothuis
faaea2b718 Warn if there are duplicate MD5/SHA256/SIZE statements for a single file 2006-01-24 21:53:51 +00:00