1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
Commit Graph

635 Commits

Author SHA1 Message Date
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