Commit graph

556 commits

Author SHA1 Message Date
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
jschauma
3751e8f33e uncomment the checksums for IRIX
(the commented version was committed by mistake)
2005-04-10 21:44:04 +00:00
reed
9fbd7c3f0c The last revision to this file added a check for removing packages.
If they existed, it cd to that package database directory.

This broke the code later which assumed to be running from
the pkgsrc directory.

So cd to the USR_PKGSRC after this.
2005-03-31 23:36:15 +00:00
hubertf
cb95f0b61b If SIGN_AS is not set, remind the user to please sign the checksum
files manually.

Suggested and OK'd by jschauma@
2005-03-30 22:36:18 +00:00
hubertf
18989c5968 libkver please 2005-03-30 22:32:27 +00:00
hubertf
1910d8dbb2 Before calculating checksums, print a line that says what's happening.
With a slow NFS server (as mine), this can take a lot of time.
2005-03-30 22:26:37 +00:00
kristerw
7555b9f1e3 Remove the packages added when pruning files etc. before starting
the real bulk build.  This ensures that the bulk build is started
in a consistent state, regardless of how the pre-build things are
configured.
2005-03-30 20:21:07 +00:00
hubertf
bbe230ce97 Run download-vulnerability-list before bulk-builds if
UPDATE_VULNERABILITY_LIST is set to 'yes' in pkgsrc/mk/bulk/build.conf.
2005-03-29 00:55:50 +00:00
tv
0facf8765f With the SORT=gsort hack for Interix, all hell breaks loose on pkg_add
because pkginstall encodes it into its scripts.  sigh.

Hack around this.  For bulk builds on Interix only, use gsort for "tflat";
use the system-supplied sort for the rest of the build.
2005-03-28 15:04:07 +00:00
tv
432b696c8e Correctly pass ${SORT} to tflat. Interix needs something other than the
OS-supplied one (currently, it will use gsort from coreutils).
2005-03-24 16:47:34 +00:00
wiz
f358bade15 Change default to 2005Q1. 2005-03-22 16:42:52 +00:00
dmcmahill
a6bbcb2584 fix broken sed regexp which sometimes causes a failed pkg fail in marking others as broken 2005-03-17 22:49:15 +00:00
dmcmahill
ef23058a67 Avoid feeding very long lines to grep/egrep. The grep/egrep implementation
on some systems, e.g. solaris, will simply drop long lines.  These longs
lines are found in the flattened up and down dependency lists in the bulk
cache files.  Instead, use sed to deal with this.

Fixes problems noted in Solaris bulk builds.  Patch tested on NetBSD-2.0
and Solaris-2.9
2005-03-12 13:27:03 +00:00
hubertf
d77f01809b Document doing a pkgsrc-current build 2005-02-26 17:17:16 +00:00
grant
3f3afebafb on Linux, we need more than just /proc in the sandbox. :) 2005-02-10 03:20:00 +00:00
sketch
b6aec517bc Pass the correct programs to the mkdatabase script. 2005-01-27 17:55:42 +00:00
grant
857b601b7b only try to run the build if "cd /usr/pkgsrc" is successful. 2005-01-25 08:47:55 +00:00
jschauma
0c0134061b Per default, only create md5 and sha1 checksums.
(These are available on all platforms via digest(1).)
Set commands for other checksums on a per OPSYS basis.

Set MKSUSM=yes back as the default.
2005-01-24 15:00:48 +00:00
tv
51a7a67d08 Not all OS's have all the checksum tools available to make MKSUMS=yes work.
Default it to "no" instead.
2005-01-24 13:21:13 +00:00
jschauma
d004e03093 Add MKSUMS and SIGN_AS (the former defaulting to yes, the latter commented
out).
2005-01-24 13:08:19 +00:00
jschauma
bb18a86029 Add bits to allow bulk-builders to generate checksums for the binary
packages they upload (by setting the optional variable MKSUMS=yes) and,
also optionally, PGP signing them (by setting SIGN_AS=username@NetBSD.org,
for example).
2005-01-24 03:41:34 +00:00
tv
23c895bb83 The pipe triggers a subshell even though () is not used. So use "exit" and
|| on the outside of the command to determine whether the packages found
in the loop are up to date.
2005-01-21 13:24:13 +00:00
tv
737cb046a6 Fix missing {} around variable name, noted by wiz.
Change one instance of $(...) to `...` per policy.
2005-01-21 13:11:46 +00:00
tv
913dfa54a2 Add LINTPKGSRC_CACHE support to reuse .lintpkgsrc.db created by pre-build.
"cd" to $USR_PKGSRC automagically so this can be called from any dir.
2005-01-20 02:02:50 +00:00
tv
76a832fa68 Fix error in previous; add explicit version check first, then the optionally
excluded timestamp check.
2005-01-19 22:12:27 +00:00
tv
5b254ab9a7 * Add USE_BULK_TIMESTAMPS (default "yes") to control whether dependency
binpkg timestamps, and ${PKGDIR} file timestamps, will be used to
  determine if a rebuild is necessary.  If changed to "no", then rebuilds
  will only happen when PKGNAME actually changes.

* Add LINTPKGSRC_DB (and companion USE_LINTPKGSRC_CACHE, default "no") to
  make pre-build generate a reusable database with "lintpkgsrc -E"; helps
  with nfs-mounted pkgsrc.  A future change will allow use of this in the
  upload script.

* Add entry for PRUNEPACKAGES in build.conf-example (this was missing).
2005-01-19 20:58:00 +00:00
tv
81e40c318f Turn distfile pruning back off by suggestion of wiz@. It's only binpkg
pruning that needs to be on by default.
2005-01-18 15:04:34 +00:00
tv
9a80a01fb8 Turn on all pruning by default. This avoids problems with @blddep matching
in the current incarnation of pkg_install.
2005-01-18 14:11:11 +00:00
jmmv
cd4de569dd Add a blank line between multiple "broken due to a broken dependency"
messages for better readability.
2005-01-17 08:52:50 +00:00
tv
d59d4df63a Work around an undef-in-string warning caused by unexpanded $NetBSD$
id tags.  Noticed by kristerw.
2005-01-15 01:53:00 +00:00
tv
782903ea16 "uptodate-pkgtools" is actually a dead target these days. Use "fetch" in
pkgtools/pkglint to determine if pkg_install needs an update.
2005-01-14 15:32:34 +00:00
jmmv
e05f3f488a For those packages where the maintainer field can't be determined by
grepping, run make to get MAINTAINER's value.  I've tested this with
a script that tries to "simulate" this one without problems, but I
can't test it "in place".
2005-01-14 13:08:28 +00:00
tv
e4cc383421 * Clean up syntax ambiguities, e.g. (my $foo = $bar) =~ ....
* Add optional verbosity to show most commands as they are being executed.

* "use strict" and "use warnings".

* Slurp in the varables from build.conf and bmake in one shot (amazing
  startup speed boost with nfs pkgsrc); put them in a hash to make
  "use strict" much happier with the namespace.

* Fix a bunch of undef-dereference errors evidenced by "use warnings".

* Exclude PKG_DBDIR from leftovers list if it is inside LOCALBASE.

* Convert some <a name="..."/> constructs to <a name="..."></a> to make
  non-XHTML-compliant browsers happier.
2005-01-13 19:29:28 +00:00
tv
7ac5f2db44 Fix checking of up to date binary packages. The problem with DEPENDS
containing constructs of the form

    {perl>=5.8.3nb1,perl-thread>=5.8.3nb1}

is that a Bourne shell "for" interprets this as two separate items in the
list, nuking the {}s.  The above will never succeed and thus always cause
Perl-dependent packages to be rebuilt unconditionally.

Just adding more \s isn't enough -- the parsing of the depends list has to
be moved out of the "for" clause.  So, echo them one per line and use "read"
to pull them in without allowing the shell to peek at those characters.
2005-01-12 22:51:54 +00:00
tv
1b0eb440fd nfs-pkgsrc friendliness change:
Add a knob to relocate all the global bulk state files in one setting.
BULKFILESDIR; defaults to PKGSRCDIR as before.
2005-01-11 18:44:10 +00:00
tv
71b0501db3 Some shells can cache * lookups, so do all the rm -f's of */*/<something>
on one line.  Add a message prior to doing the leftover log cleanup, as
it will take a while if pkgsrc is on nfs.
2005-01-11 18:33:16 +00:00
hubertf
d2b3d61718 rc is in /usr/pkgsrc/, even in sandboxes 2005-01-10 20:00:30 +00:00
hubertf
8f1c2afbd1 Upload pkgs built in sandbox
(wrapper to 'upload' script, similar to do-sandbox-build).
2005-01-10 18:52:25 +00:00
kristerw
fdb6419bd5 The documentation claims you can use -m as an alias for --mirror_only.
Make it so.
2004-12-11 02:49:57 +00:00
jlam
4952f1a79c Don't hard-code "lang/perl58". Instead, use the value of PERL5_PKGSRCDIR
which is computed based on whether perl or perl-thread should be the
default.
2004-11-23 19:44:02 +00:00
jlam
19c97f1019 Fix the find command used to print out all of the .broken* files. It now
prints out both the .broken.html and .broken.work.html files instead of
just the latter.
2004-11-23 19:31:46 +00:00
wiz
1d2852cb72 Change perlfiles var to look for files from perl*,
not only perl, so that perl-thread files are not marked as leftovers.
2004-11-22 12:53:56 +00:00
jlam
b2320b8957 Preserve the .work.log file from a broken build as .broken.work.html
in the package directory, and add a link to it from .broken.html at
the point where the build fails.  Also adjust the auxilliary scripts
to handle/cleanup .broken.work.html files.

This should enhance the ability of developers to debug broken builds
by providing important information about what is happening as a build
progresses and fails.
2004-11-16 18:34:12 +00:00
jlam
d13b06f317 Bulk builds should be defaulting to building perl58. 2004-11-12 15:39:22 +00:00
agc
a920ff2b3c Allow the xsrc directory to be specified on the command line, defaulting to
/usr/xsrc if not specified, and check for its existence.
2004-10-24 22:54:25 +00:00
jlam
17c3aafac1 * Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOPDIR,
as it's only used internally by bsd.prefs.mk.

* Make _PKGSRCDIR a public variable by renaming it to PKGSRCDIR.
  Also, generate its value from ${_PKGSRC_TOPDIR} so it's less fragile
  than the old method of stripping off the last two components of
  ${.CURDIR}.  PKGSRCDIR may now be used after bsd.prefs.mk is defined.

* Change all references to _PKGSRCDIR to PKGSRCDIR.
2004-10-07 02:01:37 +00:00
mason
d1a4ff1d2c Typo - "ressource". 2004-09-22 16:42:29 +00:00
cjep
8d4dc2e04d Make and mount the local patches directory when relevant. Fixes PR#26951
from Masanori Mikawa.
2004-09-16 09:55:42 +00:00
grant
b0bef53ef5 many kernel-grovelling tools in Linux need /proc mounted to do
anything useful.

make it so.
2004-09-02 07:04:54 +00:00
sketch
58a29490d5 Properly quote the NICE_LEVEL variable to prevent errors. 2004-08-12 22:18:07 +00:00
sketch
868a80d864 Unset CDPATH variable in the user environment which prints the cwd to stdout
when changing directory, breaking the resulting tsort from the printindex
script output.
2004-08-06 10:41:51 +00:00
grant
51bd835ca8 correctly use PKG_SUFX instead of ".tgz".
this fixes a problem where bulk builds with PKG_SUFX=.tbz would
needlessly, repeatedly rebuild dependency packages because
${PKGNAME}.tgz did not exist.
2004-07-25 08:40:46 +00:00
agc
047727a341 Abstract out the "nice -n 20" clause, so that it can be set to something
else if desired.

Print out dates in the form: yyyy/mm/dd
2004-07-22 14:26:42 +00:00
grant
fc250c5bd6 add anchors for jumping to the top and each section of the HTML report. 2004-07-15 11:57:26 +00:00
grant
562864ccd0 only include broken packages in the email output. 2004-07-15 11:39:11 +00:00
grant
7c66293290 fix typo 2004-07-10 14:37:36 +00:00
grant
06d1f588de add /var/sadm so that Solaris pkgchk(8) can read the package database,
xpm/builtin.mk uses this to determine whether Solaris has xpm.
2004-07-03 21:42:37 +00:00
grant
eca521ff8e the timezone file on Solaris is /etc/TIMEZONE. 2004-07-01 13:18:20 +00:00
dmcmahill
f2b6b7c157 make sure we get BMAKE set when calling printdepends and printindex 2004-06-25 13:45:00 +00:00
grant
492fa68c52 on Solaris, ensure /usr/tmp and /var/tmp are created in the sandbox,
as nroff(1) and others complain if these directories don't exist.
2004-06-06 01:33:17 +00:00
grant
455f44b853 remove "local" variable scope, it is not required and is NetBSD sh(1)
specific.
2004-06-06 01:30:31 +00:00
dmcmahill
5e1b3f9aca add missing -r option that the usage claimed existed. Noted by garbled@ 2004-04-29 02:23:26 +00:00
dmcmahill
0436456e1c add a -s | --specific-pkgs option which will set SPECIFIC_PKGS=1 for the
build.  Suggested by Christoph Badura.
2004-04-24 01:22:49 +00:00
seb
94bd18b74a Fix pasto. 2004-04-19 23:09:55 +00:00
hubertf
5420388150 Deprecate RSYNC_DST_SPECIFIC and RSYNC_DST_OTHER and replace them
by RSYNC_DST. Warn if any of them is not set properly, and in
general adjust to the new layout on the FTP server.
2004-04-19 18:39:09 +00:00
hubertf
307e455bf2 Catch UPDATE_VULNERABILITY_LIST being unset, default to be conservative
and run it if it's not explicitly set to "no"
2004-04-12 13:01:52 +00:00
jschauma
f78237671a According to egrep(1):
Portability note: unlike GNU grep, traditional grep did not con-
  form to POSIX.2, because traditional grep lacked a -q option and
  its  -s option behaved like GNU grep's -q option.  Shell scripts
  intended to be portable to traditional grep should avoid both -q
  and -s and should redirect output to /dev/null instead.

And, guess what, that's exactly what we run into when we call IRIX'
egrep(1) with '-q' (which it doesn't know).  So let's follow this
suggestion and use neither '-q' nor '-s' and redirect output to
/dev/null instead.
2004-04-10 16:23:00 +00:00
jschauma
2cca9690d9 Commentary cleanup:
- If it's a full sentence, start capitalize first letter and end with a
  period.
- Break comments at ~80 chars so it fits into a terminal.[*]

(* This should be done for the code as well, but then it'll need testing.
   I'll do this at another point in time.)
2004-04-09 18:43:14 +00:00
jschauma
f060c78ebf On some systems, bootstrap also installs ${LOCALBASE}/bin/install-sh --
if that is removed, the bulk-build will fail immediately.  So tar it up,
too.  (Note that this will give a warning on systems that don't have it.)
2004-04-09 18:29:37 +00:00
dmcmahill
4886d69430 Add a --mirror_only option to the bulk build script. When combined with
setting SPECIFIC_PKGS=1, this is a convenient way to make sure you have
all required distfiles before starting a build.  In particular, you will
get all distfiles for all required dependencies of the explicitly listed
packages.  As part of this make the option processing part of this script
a bit more general purpose and add a -h|--help option.
2004-04-09 11:06:35 +00:00
dmcmahill
eb0a5dcca7 Add support in the bulk build code to properly deal with SPECIFIC_PKGS=1.
In particular, when SPECIFIC_PKGS is set in /etc/mk.conf, you can now do

  sh mk/bulk/build

and have the right thing happen.  Only those packages explicitly listed
and those which are depended upon are considered for the build.  Other
than the restricted list of packages, the bulk build works the same way
as a full bulk build.
2004-04-07 22:56:34 +00:00
agc
6e27f19f69 Rearrange the wording slightly in an informational message, to avoid
some email filters and false positives.
2004-03-28 20:35:29 +00:00
jlam
24fff0c6d9 Attribute "my thoughts" to the original author. 2004-03-26 08:22:55 +00:00
jschauma
e114a3e62b If BULK_BUILD_CONF points to an absolute path, don't try to use it
with a leading "./".
2004-03-22 21:54:48 +00:00
grant
511c9e8b95 don't assume there will always be broken packages. noted by wiz. 2004-03-18 14:27:20 +00:00
hubertf
51c65d9891 Enforce vulnerability list being installed & correct & upto-date
before trying to upload anything.
2004-03-16 13:55:51 +00:00
wiz
8f8df9c339 Remove some more of the "last touched by" code. 2004-03-13 11:55:40 +00:00
hubertf
399ce0a3ff Remove 'blame' column, OK'd by grant@. 2004-03-11 01:42:11 +00:00
grant
b6f7f60e16 s/netbsd.org/NetBSD.org/ 2004-02-25 09:20:59 +00:00
grant
3f7c436cf4 GNU tar on netbsd-1-6 doesn't grok "-T -" at the end, but pax-as-tar
does, so rearrange the arguments so that "-f -" is always at the end.
noted by krister@.

while I'm here, make sure we use the same tar(1) program pkgsrc does.
2004-02-25 09:05:40 +00:00
hubertf
4b44008c84 Add RCS ID 2004-02-16 20:25:35 +00:00
grant
b56215fa53 avoid another long command line calling tar(1). 2004-02-15 06:17:10 +00:00
grant
5fdae71af5 zoularis is deprecated, don't backup zoularis.mk. 2004-02-14 04:06:29 +00:00
grant
f426c40c92 when copying the broken files, use find(1) instead of a shell glob
to avoid a command line too long for sh(1) on some platforms.
2004-02-14 04:00:18 +00:00
grant
7430d655d9 on Solaris, mount /opt/SUNWspro in the sandbox if it exists. 2004-02-13 23:53:13 +00:00
grant
727d3d4ea3 print date and time in UTC. 2004-02-08 12:54:05 +00:00
grant
bb4eec4fb6 include the total number of binary pkgs created in the report. fix
some HTML nits.
2004-02-08 09:13:43 +00:00
grant
2b04192e07 extract OPSYS and OS_VERSION from pkgsrc and use them in the report
email subject.
2004-02-05 23:57:54 +00:00
grant
e3a6dc7dd8 show build start time in localtime, not seconds-since-epoch :) 2004-02-05 23:53:16 +00:00
sketch
8ebd17f97c Remove a local change which crept in with the last update. 2004-02-05 10:59:40 +00:00
grant
4ddc97c628 fix typo in comment 2004-01-31 03:37:24 +00:00
grant
68315859d7 improve report layout:
- move the build summary to the top and include build start/end
  times.
- break the report up into three sections for easier navigation:
  Broken, Broken dependencies, and Not packaged.
- HTML report now uses a subset of the www.NetBSD.org stylesheet.
- improve some of the text.
2004-01-31 03:30:49 +00:00
grant
226bb2c88f shut up a warning from gawk. 2004-01-30 11:10:47 +00:00