Commit graph

548 commits

Author SHA1 Message Date
rillig
d846e3c2b5 When in "set -e" mode, the Solaris /bin/sh exits when "cd" fails, even
if it occurs as the condition of a "while" or "if", or in combination
with && or ||. This, of course, introduces a race condition if someone
removes the directory between the two "cd"s. The result would be that
the bulk build terminates, but that's not a big issue, as in this case
there must be something much more severely broken.
2006-02-07 21:34:48 +00:00
rillig
09e7dbca5e Added the KEEP_BUILDLOGS variable. If it is set to "yes", the build logs
of successful builds are not removed, only renamed. This variable will
be useful for examining the warnings that appear during the bulk builds
but are thrown away because the package builds fine. This feature is
experimental and thus not enabled by default.
2006-02-04 01:08:25 +00:00
rillig
2aa47ceaea If a package is still up to date, it doesn't matter if it is currently
installed or not. So there is no need for two different messages. (They
had been necessary in revision 1.1, though.)
2006-02-03 20:47:06 +00:00
rillig
0cca385f2a Added the bulk build ID to the subject line of the report mail. It had been
${BUILDDATE} before, which has disappeared with the REPORTS_* change.
2006-01-30 20:06:51 +00:00
rillig
c22e7cd031 Don't test(1) and cd(1), cd(1) directly. As long as "set -e" is not
activated this prevents unexpected behavior.
2006-01-29 23:07:04 +00:00
rillig
b7de3baf8d In the FTPHOST compatibility mode, there was a slash missing when
constructing REPORTS_DIR out of FTPHOST and FTPURL.
2006-01-24 19:19:01 +00:00
rillig
50b7e85526 Made all sentences in the comments start with an upper-case letter and end
with a period.
2006-01-22 21:36:28 +00:00
rillig
f8c8696542 Fixed pkglint warnings. 2006-01-21 15:44:23 +00:00
rillig
1278e33918 - Added a new top level file that saves the REPORT_BASEDIR from the first
call to the mk/bulk/build script. This is to allow restarting the bulk
  build without getting confused by the various timestamps that occur
  during a bulk build. It also fixes some problems where the text/plain
  report had ended up in a directory different from the other files.

- Changed the default filename for the text/plain report from
  "pkgsrc-results-${BUILDDATE}.txt" to simply "report.txt", as the
  ${BUILDDATE} variable didn't give a hint to when the bulk build had been
  started, which is often more important than when the bulk build stopped.

- Changed the way to specify the directory and the URL where the bulk build
  reports are made available. See

      http://mail-index.netbsd.org/tech-pkg/2005/12/05/0002.html

  for details. Specifying the directories using the FTPHOST and FTPURL
  variables will be possible for some months, after which it support for
  it will be dropped.
2006-01-21 11:29:31 +00:00
rillig
79e148d60b Made the program name in the DIAGNOSTICS section not appear emphasized. 2006-01-19 10:21:12 +00:00
jdc
a82b7c9750 tsort creates temporary files in the current directory, so change to the
BULKFILESDIR directory before running it.  We can now bulk build with a
read-only pkgsrc.
2006-01-17 22:35:13 +00:00
rillig
04f4fbc7c7 Allow "=" characters to appear in a line that comments out a package in a
category Makefile. Adjusted the other regular expressions to express more
clearly what is meant.
2006-01-15 23:33:23 +00:00
rillig
1c209076ce - Added pbc_checkpathname, pbc_checkbasename, pbc_checkurl.
- Modified pbc_checkexisting{dir,file} to use pbc_checkpathname.
2006-01-07 22:27:56 +00:00
joerg
f8ae6026cd Revert unintended part of last commit. 2006-01-05 23:18:26 +00:00
joerg
c750987c17 Adjust comment about SUBST_FILES to match reality:
absolute file names work as well.
2006-01-05 23:16:01 +00:00
minskim
7eded7fe00 Fix a typo (show-depends-dir -> show-depends-dirs). 2005-12-31 02:06:10 +00:00
rillig
550a2c6284 Prefixed all status messages with "pre-build>" to show the user where they
come from.
2005-12-08 21:21:15 +00:00
rillig
0e9febc62e Added missing "quotes" around many variables. 2005-12-06 09:15:29 +00:00
rillig
309745e03a Fixed a typo. 2005-12-06 08:25:18 +00:00
rillig
95c876eda2 * allow parallel builds (see parallel.txt) 2005-12-05 22:16:13 +00:00
rillig
d43e179274 Shortened the code to extract pkgsrc variables by 30 lines, taking out
much unnecessary redundancy from the code. Reordered the pkgsrc
variables so that related variables appear adjacently in the output.
2005-12-05 10:19:14 +00:00
rillig
22b5045e6f Renamed some variables to match the pkgsrc variables they are derived
from.
2005-12-03 13:39:04 +00:00
rillig
4f04fb18f4 Removed CVS_USER, as announced on pkgsrc-bulk.
See <http://mail-index.netbsd.org/pkgsrc-bulk/2005/11/24/0003.html>.
2005-12-03 01:00:37 +00:00
rillig
9682ee1f28 - Converted intermediate white-space to all tabs.
- Removed trailing white-space.
2005-11-30 18:33:14 +00:00
rillig
11eba3fcb7 - Ignore the return value of the "unset" command. This would terminate the
program if the program would be run in "set -e" mode.
2005-11-30 18:00:16 +00:00
joerg
013ea94433 Fix usage of BULKFILESDIR:
1. Ensure that it exists before trying to use anything inside of it.
2. Prefix files correctly with BULKFILESDIR to match the rest of
the tree.
3. Most importantly, create the .broken.html files for bootstrap tools
in BULKFILESDIR, otherwise e.g. bmake would be removed in the middle of
a bulk build on non-NetBSD.

Discussed-with: rillig@
2005-11-30 17:31:06 +00:00
rillig
a5d4be0f5a Instead of extracting the PKG_TOOLS_BIN make(1) variable, extract
PKG_DELETE and PKG_INFO. This is more straigt-forward and adds the
proper `-K' command line option to the calls, which in turn fixes bulk
builds that don't use the default PKG_DBDIR.
2005-11-28 21:50:01 +00:00
rillig
2cf64233df Prefixed the messages with "build> " that I had forgotten in the last
commit.
2005-11-28 21:18:20 +00:00
rillig
77e79b7392 Prefixed the status messages from this program with "build> ", to
distinguish them from the various other messages.
2005-11-28 21:11:36 +00:00
rillig
4f68e30cda Print a message before creating the bulk build report, as this takes
quite a long time. Currently the reader of the build log might assume
that the installation of lang/perl5 takes so long, which is wrong.
2005-11-28 20:17:27 +00:00
rillig
d3b9bf035d If the package-specific log directory is empty after building a package,
and ${BULKFILESDIR} != ${PKGSRCDIR}, try to remove the directory.
2005-11-28 20:08:37 +00:00
rillig
01ae880577 - Since printindex does not use the .pkglist cache anymore, this program
does not need to create it.
2005-11-28 01:22:53 +00:00
rillig
8ba3dc01c0 - Don't use the .pkglist cache anymore, as the cache is quite cheap to
regenerate. This change makes printdepends and printindex more
  independent, because before this change, printindex could use the
  cache provided by printdepends, but not the other way round.

- Fixed the section "Sanity checks, part 2" by allowing newline
  characters in the list of packages from which the index is built.
  This bug just hasn't been noticed because the list taken from the
  cache did not have newlines at all.

  The '-' character is not included in the $allowed variable because it
  is handled specially and differently by sh(1) and tr(1).

- Updated the printindex man page.
2005-11-28 01:14:35 +00:00
rillig
d0779b9925 Indentation fix to make the "case" statements look more uniform. 2005-11-24 22:01:54 +00:00
rillig
7565e704a8 Corrected the quoting of variables in clear cases. 2005-11-24 18:21:54 +00:00
rillig
678f9c3d5a 1. Added section headers in the part of the user-settable variables.
2. Reindented two "if" statements that looked like this:

if long_long_command; then :; else
	else_commands
fi

By just scanning the beginnings of the lines, which is a common way of
reading source code, one may easily miss the "hidden" "then" branch at
the end of the line. I have changed it to:

if long_long_command; then :;
else
	else_commands
fi
2005-11-24 12:14:32 +00:00
rillig
63e9bd3fa3 Changed the file extension of BROKENWRKLOG from ".html" to ".txt". This is
mostly a cosmetic change. The motives for this change are that the HTML
files only consisted of "<pre>", the properly quoted text/plain contents
and "</pre>". There has been no documentation of reasons for encoding plain
text in HTML unnecessarily, so this change will produce text/plain files
instead.

Another change is that instead of appending to the BROKENWRKSRC, the file is
overwritten each time. In a single bulk build this will not change anything.
Only when the package is built multiple times in a single bulk build, the
behavior will differ.

Ok'ed by agc.
2005-11-23 20:45:11 +00:00
erh
4d2fdd7bd5 Per request, back out all the SKIP_AUDIT_PACKAGES changes.
bsd.pkg.mk:1.1758-1.1752
bsd.prefs.mk:1.210
bulk/build:1.79
defaults/mk.conf:1.93-1.92
2005-11-23 18:27:13 +00:00
rillig
36386eb147 Put literal strings into .Ql quotes. 2005-11-20 15:46:48 +00:00
rillig
eca9c2c140 Added "" quotes to all arguments to echo(1). 2005-11-20 15:25:39 +00:00
rillig
a4b630d89c Moved the "export BROKENF" command from the top of the program to the
point where it is actually used, which is when mk/bulk/pre-build.local
is executed for allowing user-specific modifications before the build
begins. That way it's easier to see why this command is necessary at
all.
2005-11-20 14:55:13 +00:00
rillig
0750f1e1f7 - If the BULKFILESDIR differs from PKGSRCDIR, create it before trying to
create log files in it.
- Fail early if the ORDERFILE does not exist. (As this program is not in
  "set -e" mode, it had continued without error checking, which resulted
  in _many_ error messages.)
2005-11-20 11:18:45 +00:00
agc
9ee6f68b3c Despite having ALLOW_VULNERABLE_PACKAGES in my /etc/mk.conf, I found
that the bulk builds would only work properly with the audit-packages
package installed at all times.

I am obviously hideously mistaken in this.

By popular request, revert the change to add audit-packages, since I
am told this is the incorrect way of doing this.
2005-11-20 09:52:51 +00:00
wiz
493edd5bb5 Macro usage fixes, use more macros, grammar improvement. 2005-11-20 01:44:32 +00:00
agc
3940af4d32 Allow the bulk builds to work by adding security/audit-packages as a
BULK_PREREQ package.
2005-11-19 19:21:47 +00:00
rillig
d4b999a69e Indentation fix. 2005-11-19 17:31:40 +00:00
rillig
c192f7204c Fixed the documentation in the DIAGNOSTICS section. 2005-11-19 11:19:57 +00:00
rillig
409aeeb499 Made the diagnostics for invalid characters in BULK_PREREQ and the
package list more useful by only showing the invalid characters, not the
complete variable value.
2005-11-19 11:19:10 +00:00
rillig
1616b1c475 - Moved the "man page" comment into a real man page.
- Added more sanity checks.
2005-11-19 10:55:45 +00:00
rillig
d00d26ba33 The toplevel database files are referenced in the report, so they must not
be unlinked. Not even in a comment.
2005-11-19 09:35:20 +00:00
rillig
4100185f57 Replaced ${ECHO_MSG} with ${ECHO} where appropriate. While there, quoted
the filename of the toplevel BROKENFILE correctly.
2005-11-19 03:53:50 +00:00
agc
c1a86103c2 To check if the pkg_install tools are up to date, the bulk build script
cd's into pkgtools/pkglint and does a "make fetch".

Since the audit-packages check was introduced to bsd.pkg.mk, this
"make fetch" will fail with an error message which looks like:

	===> do-fetch [pkglint-4.42.1] ===> Checking for vulnerabilities in pkglint-4.42.1
	===> check-vulnerable [pkglint-4.42.1] ===> *** The audit-packages package must be at least version 1.40
	===> check-vulnerable [pkglint-4.42.1] ===> *** Please install the security/audit-packages package and run
	===> check-vulnerable [pkglint-4.42.1] ===> *** '/usr/pkg/sbin/download-vulnerability-list'.
	*** Error code 1

since there is no audit-packages package installed at this point (we
are still doing the pre-installation checks).

So call "make fetch" with an additional SKIP_AUDIT_PACKAGES=yes
argument at this point.
2005-11-19 00:30:54 +00:00
rillig
630f4b43ad The "Building packages" section has been split up into "Building the
packages" and "Generating the report".
2005-11-18 12:27:26 +00:00
rillig
9484e788d6 Added a new section called "Generating the report". Moved the FTP*
variables into that section, since they have nothing to do with
uploading the binary packages.
2005-11-18 12:11:51 +00:00
agc
b43f1e2ec1 Revert the change in 1.77, which does not work correctly.
However, this does not help people who are doing bulk builds
in sandboxes via read-only nullfs mounts.

A correct, long-term solution to this needs to be found.
2005-11-18 11:43:25 +00:00
rillig
ffb2a1b746 - The text/plain report is generated using printf() instead of
formline(). This prevents long package names from being trimmed.
- Removed the "-p e" command line option from the pax(1) command line.
  This makes it possible to run mk/bulk/post-build as different user
  from the one who did the actual build.
2005-11-18 11:38:00 +00:00
rillig
139533c93f Code cleanup, bugfixes and separation of PKGSRCDIR and BULKFILESDIR.
- Added section headings to make reading the code more efficient.
- Added bp_die() for uniform error messages.
- Added sanity checks:
  - $BULK_BUILD_CONF must be a regular file.
  - Protect against spurious output from the bulk.conf file.
  - Check that configuration variables are defined, non-empty and
    do not contain newlines.
  - Properly extract MAKECONF from the bulk.conf file when getting the
    mk.conf variables.
  - Protect against spurious output from BMAKE show-vars.
- Fixed the use of undefined values ($startdate).
- Changed some calls to my_system() to a more secure form.
- Check if the calls to chdir() actually work.
- Look for the BROKENFILEs in BULKFILESDIR instead of USR_PKGSRC.
- Changed postfix conditions to prefix conditions. Example:
  do_foo() if $bar; ==> if ($bar) { do_foo(); }
2005-11-18 10:18:05 +00:00
agc
9166786972 If the bulk build is taking place in a sandbox, then typically read-only
nullfs mounts are used (on NetBSD).

Only attempt to install new pkg_install tools if the bulk build is not
taking place in a sandbox.

This is a quick and dirty hack to allow sandboxed bulk builds (the majority
of cases, I suspect) to operate properly once again.
2005-11-18 08:58:12 +00:00
rillig
f0d0e72266 Corrected the comment above BULKFILESDIR. It is not only used for the
global log files but also for the package-specific ones.
2005-11-18 08:48:09 +00:00
rillig
f6c9f12624 Properly indented preprocessing directives. 2005-11-18 08:42:35 +00:00
rillig
5a0e397d42 Allow FORCEBROKENFILE files to be created in either PKGSRCDIR or
BULKFILESDIR.
2005-11-18 08:35:58 +00:00
rillig
0c5c5c91ec Changes for separation of BULKFILESDIR and PKGSRCDIR.
- Added a bunch of internal variables that determine the correct places
  for the build log files of the current package.
- Added section headings.
- Moved a sanity check out of the configuration section to not confuse
  the reader.
- mk/bulk/print{depends,index} are called with two arguments, which allows
  separation of BULKFILESDIR and PKGSRCDIR.
- Replaced uses of BUILDLOG, BROKENFILE and BROKENWRKLOG with their
  internal counterparts, which use ${BULKFILESDIR} instead of ${PKGSRCDIR}.
2005-11-16 22:58:59 +00:00
rillig
43a50150db Changes for enabling separate BULKFILESDIR and PKGSRCDIR.
- The main .make file is stored in ${BULKFILESDIR} instead of ${PKGSRCDIR}.
- The PKGLIST variable from the configuration file is passed to the
  bulk-cache command in the environment. There are very few variables left
  that have to be exported via export_config_vars(). Maybe that function
  can be avoided alltogether.
2005-11-16 22:44:06 +00:00
rillig
172d281652 Made printdepends very similar to printindex, as both iterate over all
pkgsrc packages, collecting different information.

- BMAKE is taken from the environment instead of querying `uname -s`.
- package-specific log files can be saved in a directory tree different
  from PKGSRCDIR.
- Added sanity checks for BMAKE, bulkfilesdir and brokenfile.
- The .pkglist cache is saved in ${BULKFILESDIR} instead of ${PKGSRCDIR}.
- Reformatted the diagnostics.
2005-11-16 22:18:03 +00:00
rillig
bb3c9ec9a1 As I'm not sure for what things ${BULKFILESDIR}/${BROKENFILE} is used,
error messages from failed "cd" commands simply go to stderr.
2005-11-16 22:11:11 +00:00
rillig
c86c30c6d4 Another rewrite:
- Changed the implementation how package-specific log files are generated.
  No user-visible changes.
- Stricter preconditions:
  - bulkfilesdir must be an absolute path.
  - brokenfile must not contain slashes.
- The .pkglist file is taken from BULKFILESDIR, not from PKGSRCDIR.
- Error messages use the prefix "[printindex]" instead of "===>", as the
  latter is already reserved for pkgsrc. Everything else would be confusing.
- If a "cd" into a package directory fails, an error message is written to
  ${BULKFILESDIR}/${BROKENFILE}.
2005-11-16 22:07:19 +00:00
rillig
950353e243 - Improved the "man page" comment a little.
- Renamed the second parameter from "brokenbasedir" to "bulkfilesdir". The
  latter name is already used in bsd.bulk-pkg.mk for the same purpose.
- Renamed "cwd" to "pkgsrcdir" for the same reason.
2005-11-16 20:39:02 +00:00
tv
d430660269 Interix cannot use the generic mksandbox procedure. Exit with error.
(A future Interix-specific mksandbox procedure is in work.)
2005-11-16 17:42:20 +00:00
rillig
1559efdcbf Fixed singleton variable which had been left over by one of the last
changes.
2005-11-14 21:37:16 +00:00
rillig
f11e7836ba Removed the code for printing progress information again, as printindex
is mostly used in batch mode. Impatient users should count the number of
lines in the output file if they can't wait.
2005-11-14 20:58:12 +00:00
kristerw
c504daf326 Fix a typo that in some cases prevented a BROKENFILE from being
created.
2005-11-12 16:44:20 +00:00
seb
4f0fd2ef69 Please, really only export MAKECONF if it is set. 2005-11-12 11:10:08 +00:00
kristerw
24e619dca7 Remove some redundant printing of messages when we are cleaning
before/after building the package.
2005-11-11 18:09:13 +00:00
rillig
8808ec4369 - A warning is printed if there is no PKGNAME matching for a PKGPATH in the
.index file.
- Condensed the code for printing to another package's .broken file in case
  of failure. (Added a variable pkg_brokenfile.)
2005-11-11 13:17:58 +00:00
rillig
877eb6072c Indentation fix. 2005-11-11 10:50:14 +00:00
rillig
b52174ba6f Removed the "BULK>" prefix from a message, as that prefix is reserved for
bsd.bulk-pkg.mk.
2005-11-11 10:49:41 +00:00
rillig
032798a500 Added two variables BULK_MSG and BULK_MSG_CONT that are used for printing
messages. Replaced all instances of ${ECHO_MSG} "BULK> " with ${BULK_MSG}.
2005-11-11 10:40:41 +00:00
rillig
aa474bfc18 Properly handle package directories containing shell special characters
like [], ?, *. They _really_ should not exist, but you never know. While
here, added a rationale for the not-so-obvious :detect_duplicates:
delimiter.
2005-11-11 09:18:57 +00:00
rillig
ee16d44ab0 Export MAKECONF again. 2005-11-10 08:28:49 +00:00
rillig
3b91bec8e6 Fixed the remaining instances of code relying on trailing white-space in
the INDEXFILE.
2005-11-10 07:19:17 +00:00
rillig
e84e44ce14 Replaced another instance of grep|awk with a simple awk. A warning is
printed if no package name could be found for a package directory.
2005-11-10 07:11:37 +00:00
rillig
6b1abc9aff Don't rely on the INDEXFILE having trailing white-space in each line.
Whoever had written such unusual code should have left a note in the
printindex script that the trailing white-space was required. It is such
an uncommon assumption that I treated it as a typo and removed it. Now
it's fixed. I also replaced the use of grep|awk with a simple awk, as
grep would have interpreted regular expressions in the package name.

In general, please think more about _appropriate_ ways to handle data.
grep(1) is not a tool for searching strings. It's a tool for searching
regular expressions.
2005-11-10 07:04:00 +00:00
rillig
1f17615fb6 Before extracting the pkgsrc variables (which takes some time), print a
line announcing that.
2005-11-09 22:12:16 +00:00
rillig
97101291fb PRUNEDISTFILES and PRUNEPACKAGES may be left undefined in build.conf, as
they get useful default values in the pre-build script. Thanks to
kristerw for pointing that out.
2005-11-09 18:48:22 +00:00
rillig
0be3c5b4d8 - Improved error handling.
- Changed "foo; if [ $? -eg 0 ]; then" to "if foo; then" in three places.
2005-11-08 22:12:42 +00:00
rillig
f651bf444c - Removed the redundant check on USR_PKGSRC.
- Removed the singleton variable pkg_install_dir.
2005-11-08 21:57:59 +00:00
rillig
ddb21fb644 Fixed computation of the .broken file, which had been "./dev/null" when the
program was invoked without arguments.
2005-11-08 13:55:29 +00:00
rillig
19fb9dddc8 Clarified the libkver item. 2005-11-07 22:09:38 +00:00
rillig
6807486bc8 Using a mk.conf different from /etc/mk.conf works. 2005-11-07 22:07:56 +00:00
tv
5585f1ae02 Mention FORCEBROKENFILE in the list. 2005-11-07 18:26:22 +00:00
tv
dd3ba1b122 Add .forcebroken, a builder-created text file that becomes a PKG_FAIL_REASON
if present.  By design, it is not cleaned at the start of a bulk build; it
is intended to allow a bulk build admin to mark a time-consuming package as
not buildable, but which shouldn't be marked permanently as such in the
package's Makefile.
2005-11-07 18:22:22 +00:00
rillig
0b797e7b5b Fixed grammar in a comment. 2005-11-06 17:14:07 +00:00
rillig
84755182d3 Added basic checks to make sure the values from the configuration file are
somewhat sane. If a check fails, the bulk build is terminated. Removed the
conditional under which MAKECONF is exported, as it is not needed anymore.
2005-11-06 17:12:55 +00:00
seb
077b34890e Only export MAKECONF if it is not null, <bsd.own.mk> does not really like
an empty MAKECONF...

$ echo ".include <bsd.own.mk>" > Makefile
$ env MAKECONF= make
make: "/usr/share/mk/" line 1: Need an operator
make: "/usr/share/mk/" line 2: Need an operator
...
2005-11-06 10:32:58 +00:00
seb
db0f78b3d1 Remove extra ${pkgsrc_dir} that slipped in. 2005-11-06 10:27:57 +00:00
rillig
2f5783121f - Replaced spaces with tabs in the "build --help" message.
- Added file post-build-conf, which provides functions to print and
  export the config variables from build.conf.
- All config variables are shown at the start of a bulk build.
- Added a configuration variable MAKECONF with the obvious meaning.
2005-11-05 23:22:05 +00:00
rillig
98b675d0c8 - Condensed the code.
- Sorted the command line options alphabetically in the parse loop.
2005-11-05 21:52:33 +00:00
rillig
031a9be746 Reformatted the --help output. Instead of many echo(1) commands, one
cat(1) is used.
2005-11-05 21:38:34 +00:00
rillig
e3fc3f4f0e The configuration variables had no apparent order. Now they are sorted
chronologically. First come the common definitions, then updating pkgsrc,
fetching distfiles, building packages and finally uploading them.
2005-11-05 20:54:38 +00:00
rillig
c17f30dd82 - Rewrote the "man page" comment.
- When printindex is called with two arguments, the second argument
  specifies the base directory of the <brokenfile>. The complete path is
  then <brokenbasedir>/${pkgdir}/<brokenfile>. This is useful for creating
  the log files in a directory outside the pkgsrc root.
2005-11-05 18:34:45 +00:00
rillig
55af86eea4 Replaced a complicated expression with the equivalent ${PKGWILDCARD}. Added
the :Q operator to all instances of ${PKGWILDCARD}.
2005-11-05 16:58:34 +00:00
rillig
cbec277885 - Added a comment above each paragraph explaining what goes on there.
- Removed the perl5_dir variable, as it has only been used in one place.
- Added error checking for the installation of the prerequisite packages
  after the main build.
2005-11-05 16:36:16 +00:00
rillig
0151c1d3b4 - Added an alias --resume for --restart, as "restart" sounds too much like
"from the beginning".
- Moved the code to get the value of BULK_PREREQ some lines up, as there
  are also 19 other variables using the same code. This saves one extra
  check if the pkglint directory exists.
- Added BULK_PREREQ to the variables whose value is printed before starting
  the actual build.
- When installing prerequisite packages, print a nice sentence instead of
  a simple "echo $pkgdir".
2005-11-05 16:10:06 +00:00
rillig
023a548473 - Added a function post_filter_cmd() that can be overridden in bulk.conf.
The default function prepends the well-known "date, progress, pkgdir" to
  each line.
- Check that the environment variable USR_PKGSRC is given and is an
  absolute pathname.
- Introduced variables for the various directories. Their names all end in
  _dir, and they contain absolute pathnames. Changed all instances of
  ${USR_PKGSRC}/pkgtools/pkglint to ${pkglint_dir}. Likewise for the other
  directories.
- Added more error checking. The bulk build is terminated if the
  pkg_install package cannot be updated or the prerequisite packages
  cannot be installed.
2005-11-05 15:41:53 +00:00
kristerw
1a69e27f40 Remove the cleaning of pre-requisite packages before and after building
a package.

This functionality consumed an enormous amount and time, and did not
do much useful work:
* It is not needed when doing a bulk build of the full pkgrsrc tree,
  since the pre-requisite packages already have been built and cleaned.
* It does not work when doing a bulk build of a subset of the packages,
  since it only cleans the direct dependencies, and not the full list.
2005-11-05 15:02:28 +00:00
rillig
94954ddd5c - Added a shell function die() that is used to provide consistently
formatted error messages in case of failure. It also helps shortening
  the code.
- Replaced many uses of "exit 1" with die().
2005-11-05 14:33:17 +00:00
rillig
26baa4afc0 - Removed trailing white-space from the --help output.
- All error messages go to stderr instead of stdout.
- Added variable quoting.
- Reindented some code for better readability.
- Changed "Build Temporary Files" caption to "Some variables used in the
  bulk build", which is more appropriate.
2005-11-05 14:23:30 +00:00
rillig
e4641e5562 Completely rewrote the printindex tool.
- Now it starts with "set -e", preventing unwanted continuing after
  errors have occured.
- Added more error checking and handling.
- All variables are properly quoted (if at all possible).
- Merged the two loops for checking packages into one loop.
- Instead of first checking if a directory exists and then changing
  into it, the tool now tries to cd, and handles failure.
- Fixed the check for duplicates. Some packages might have been skipped
  unintentionally.
2005-11-05 14:01:07 +00:00
rillig
61ecef8c03 As the printdepends program takes quite a long time, every 50 packages a
status line is printed on stderr to get an impression about how the
program gets along.
2005-11-05 10:14:43 +00:00
rillig
1fa22c0a3d Export the BULK_BUILD_CONF variable so that subprocesses can see it. Rewrote
the code a little.
2005-11-05 08:34:10 +00:00
rillig
74d06614c0 Added a command line option --config that allows to specify a custom
build.conf file. The only way to do this before had been to set the
(undocumented) environment variable BULK_BUILD_CONF. This is a
conservative extension.
2005-11-05 02:20:52 +00:00
rillig
0c15f61e98 Fixed a typo. 2005-11-05 02:12:56 +00:00
rillig
84d18d23bb Environment and pkgsrc variables used by the bulk build. 2005-11-05 01:57:01 +00:00
tv
601fcf276c Microoptimization: awk has BRE pattern matching, so use it instead of
"grep | awk".
2005-11-02 05:33:38 +00:00
tv
975ce705a3 Add lang/perl5 early, but not specifically as part of BULK_PREREQ, so that
it is available at tflat time.
2005-10-27 13:04:54 +00:00
tv
8365241b72 Use Perl-based tflat, which is up to 90% faster than the awk-based one
(necause it was forking off "sort" subprocesses on every package).
2005-10-26 16:54:04 +00:00
tv
ea9310e16a Add USE_BULK_BROKEN_CHECK variable, default 'yes'; if set to 'no', skips
the extra BROKEN/PKG_FAIL_REASON/PKG_SKIP_REASON checks when marking
dependent packages as broken.
2005-10-16 17:35:25 +00:00
jschauma
b7d81330d8 Finally remember to commit this:
Make use of find(1) instead of ls(1) to find the broken files.
This prevents the generation of an empty report due to 'too many arguments'
to ls on certain platforms.
2005-09-25 15:05:40 +00:00
reed
de26529572 Make the directory before creating the pkgsrc-results text file in it.
(Maybe the BUILDDATE is not needed since by default the directory
has the specific date stamp in it.)
2005-09-21 15:46:06 +00:00
xtraeme
1ec80de24c Add a new command line option "-e | --no-email" to not send the email
with the results to ADMIN.

Now the file will be created if the option is not defined and the
email will be sent too, otherwise only the file will be created.

The file with the results will be created in
${FTP}/pkgsrc-results-${DATE}.txt.
2005-09-20 18:54:37 +00:00
reed
f351e3c89b Use PKG_TOOLS_BIN, so it doesn't run wrong pkg_* tools found in the PATH. 2005-08-26 07:24:53 +00:00
reed
1a9bb2d079 Add todo item: Generate list of packages that were "Successfully packaged". 2005-08-26 07:21:47 +00:00
reed
02a66dd2b2 Create intermediate directories as required when creating PKG_DBDIR. 2005-08-26 07:19:05 +00:00
reed
1f611d7e2f Make sure TEE is defined.
I saw:
-a: not found
2005-08-25 22:57:29 +00:00
reed
69eb1bfee2 iUse "up-to-date" instead of "upto date" to be consistent. 2005-08-25 22:56:03 +00:00
grant
91a2d8e88e fix some non-portable statements, allowing this to work properly
on Solaris.
2005-07-28 00:37:43 +00:00
ben
af63d72ec7 Fix the following error:
Can't use an undefined value as an ARRAY reference at mk/bulk/post-build line 470.

In the case that no packages were broken, getBroken returns a hash
without the key "topten".  When Perl tries to use that undefined value
as an array reference, it croaks.
2005-07-17 13:38:01 +00:00
rillig
2649c7e107 Removed superfluous "--" arguments from the command line, as the
argument following the "--" is guaranteed not to start with a dash.
Fixes pkg/30362.
2005-07-13 22:07:46 +00:00
rillig
cd217d9e1f Fixed the quoting. The shell is hard-coded to /bin/sh instead of relying
on which(1). Correctly pass all arguments (even the first one) to the
build script. See PR 30362 for details.
2005-06-27 18:37:22 +00:00
rillig
63d76b7f93 Fixed the quoting. The shell is hard-coded to /bin/sh instead of relying
on which(1). Correctly pass all arguments (even the first one) to the
build script. This fixes PR 30362.
2005-06-27 16:04:08 +00:00
sketch
4228902141 Use ${PERL5} instead of `perl' and relying on $PATH order. 2005-06-24 13:37:51 +00:00
dillo
334a53f8dc lang/perl58 has been renamed to lang/perl5 (hi johnny!) 2005-06-24 08:29:59 +00:00
jlam
c2fb31ba79 Drop the perl-5.6.x package from pkgsrc. Remove lang/perl58 and update
lang/perl5 to perl-5.8.6nb4.  Modify packages that referred to
lang/perl58 to point to lang/perl5 instead.
2005-06-24 06:43:43 +00:00
sketch
e2eb7e8270 mk.conf needs to be backed up as part of the bootstrap files. 2005-06-10 13:09:07 +00:00
rillig
e3aa46eedc Added a leading underscore to the names of the *_COOKIE variables, as they
are not part of the public interface.
2005-06-04 20:56:47 +00:00
dillo
00369f3c0a list all the extracted variables, not just some of them 2005-05-19 22:58:21 +00:00
kristerw
9fbb603b11 Use MACHINE_ARCH instead of arch to be consistent with things like the
subject line in the bulk mail.  This also prevents the quoting problem
on Darwin, where arch contains a space.
2005-05-19 20:56:36 +00:00
kristerw
ec780b54f1 Convert the last remaining usage of GTAR to use PAX instead. 2005-05-19 19:50:25 +00:00
jlam
a743d24806 Use PAX instead of GTAR since pax is provided on all systems while gtar
isn't.
2005-05-19 19:24:59 +00:00
jlam
87110dbd7b PERL5_PKGSRCDIR is no more. Explicitly use "lang/perl58" for the
location of the perl package to install for bulk builds.
2005-05-19 15:18:13 +00:00
sketch
7cdf1cbaf4 Reinstall BULK_PREREQ before running the post-build script as there may be
dependancies required for that script, an smtpd for example, as well.
2005-05-18 20:12:49 +00:00
jschauma
a3fb779cec When generating the report, add a list of top ten offenders at the top.
This makes it easy for people to track down which packages should receive
immediate attention.
2005-05-16 19:11:19 +00:00
kristerw
1400eaeabd Do not add the things in pkgsrc/regress to the bulk build since they
are not meant to be built -- regress testing is done using the
pkgtools/pkg_regress tool.
2005-05-09 16:03:58 +00:00
wiz
e86bd09e3c Changes to the upload script:
vulnerable packages are uploaded directly into the vulnerable subdir.

While here:
quote variables
better handling of the temporary directory
remove some backwards compatibility code that's been here long enough
opsys-specific package handling was doing the same as non-opsys
specific, so fold them together.

Written together with dillo.
2005-05-08 13:29:09 +00:00
wiz
af43f6cfdc Refer doc/pkgsrc.txt instead of Packages.txt. 2005-05-07 22:16:38 +00:00
rillig
1c499d648b Properly quote the &, <, and > characters when generating BROKENWORKLOG.
Approved by wiz.
2005-05-06 00:52:30 +00:00
jlam
0044ab65dc Teach the bulk build scripts about the new tools framework. 2005-05-03 16:34:02 +00:00
jschauma
b4cb11f8f8 s/upto date/up-to-date/ 2005-04-30 21:35:06 +00:00
dmcmahill
51352eff3c by default don't try to include src and xsrc in the list of things to
mount in the sandbox.  Then in the individual OS section, turn it back
on if needed.  Right now, just turn on NetBSD.  At some point we should
probably fill out the other supported OS's or figure out a way to pull
in the information from the makefiles which already define much of whats
needed.
2005-04-21 21:44:56 +00:00
agc
c42f7878b8 Be more informative when cleaning packages and pre-requisites, and clean
up the English in two informational messages. No functional changes.
2005-04-11 11:18:01 +00:00