Commit graph

1797 commits

Author SHA1 Message Date
jlam
6a485fcc01 Don't write ${FOO:Mbar} == "bar", when !empty(FOO:Mbar) will suffice.
In this case, "FOO" is "INTERACTIVE_STAGE".
2006-01-21 21:32:51 +00:00
rillig
e9f81c65bc Unquoted SUBST_MESSAGE.*, as this is no longer needed. 2006-01-21 10:10:42 +00:00
jlam
e08f70e543 Remove the old PLIST-handling code after bulk building has shown the new
PLIST module works correctly.
2006-01-20 20:17:07 +00:00
jlam
f6808df1ba Move more "patch"-related variables and targets out of bsd.pkg.mk and into
bsd.pkg.patch.mk.
2006-01-19 20:32:17 +00:00
jlam
4a3e4a25bc Move more of the "extract"-related variables and targets out of bsd.pkg.mk
and into bsd.pkg.extract.mk.
2006-01-19 19:35:25 +00:00
jlam
15e61bbe84 * Split out the "clean" targets and variables and put them into a separate
file pkgsrc/mk/bsd.pkg.clean.mk.

* Reimplement the clean target so that we don't need to invoke a separate
  make process just to do clean-depends.

* Reimplement clean-depends using a pipe to avoid command-line length
  issues.
2006-01-19 16:11:10 +00:00
jlam
19a4f23ea1 Move the following targets from bsd.pkg.mk to bsd.utils.mk:
show-depends-dirs
	show-all-depends-dirs
	show-all-depends-dirs-excl

While we're here, reimplement them using the new pkg_paths and
depends-depth-first.awk scripts.  As a side effect, this speeds up
the execution of these targets by around 5-15% depending on the
complexity of the dependency graph.

NOTE: This *does* change the behavior of these targets slightly because
      the output is now newline-separated instead of space-separated,
      and the order of the output lines doesn't match the original
      targets because the dependency graph is now walked depth-first
      instead of breadth first.
2006-01-18 20:18:04 +00:00
jlam
c7da3f7718 Remove unused "show-root-only" target. 2006-01-18 19:12:54 +00:00
jlam
5c5ac03ec1 Create a standalone awk script, depends-depth-first.awk, that encapsulates
the code that performs the dependency graph traversal (in depth-first
fashion).  This script has a hook that allows executing a shell command
line upon visiting a dependency's package directory in either prefix
or postfix order, and may be used to simplify the code in bsd.pkg.mk
that iterates over dependencies.

This awk script requires the target "show-depends-pkgpaths", which is
defined in a new Makefile pkgsrc/mk/bsd.utils.mk.  This file should
accumulate "utility" targets that current exist in bsd.pkg.mk, i.e.,
"helper" targets for various actions.
2006-01-18 00:10:07 +00:00
jlam
8e0e10d3fa Initial commit of a new module that encapsulates all of the code
for manipulating PLISTs.  This module is not used by default pending
more widespread testing -- currently the variable _USE_PLIST_MODULE
must be defined in /etc/mk.conf to enable its use.

The main features of the new PLIST module are:

    (1) Splits out the PLIST-handling code from bsd.pkg.mk into a
	separate "plist" module.

    (2) Splits out giant, multi-line awk scripts stored in make
	variables into separate awk scripts that may be joined
	together to post-process PLISTs.  Each of these awk scripts
	consolidates the processing for one set of files, e.g.,
	man pages, info pages, etc., and is more easily commented
	than a make variable.

    (3) Splits out the print-PLIST code from the regular PLIST code
	since they have no common pieces (print-plist.mk vs.
	plist.mk).

    (4) Completely re-implements the shared-library handling to be
	more efficient.  Along the way, this also fixes a problem
	for Mac OS X users where the PLISTs incorrectly contained
	absolute paths.

    (5) Completely re-implements the info-file handling so that we
	can migrate from INFO_FILES definitions to just adding
	info/foo.info entries in the static PLISTs.

    (6) Adds commented-out support for automatically compressed or
	decompressed info page entries based on the value of MANZ.
	These changes will be activated after texinfo.mk has been
	replaced by something that is built using the more modern
	primitives now available in pkgsrc.

    (7) Move the file compression logic into a separate script
	"doc-compress" that compresses or decompresses files while
	minding symlinks.  This script is now called by bsd.pkg.mk
	to do the "autmoatic man page handling".  In the future,
	it will also handle the "automatic info page handling" and
	possible others.

In general, the idea is to move stuff out of the Makefiles and into
separate files where we don't need to worry about quoting rules
and where each file can have a separate history of commits.  This
simplifies the makefile logic (especially in terms of readability)
and also simplifies maintenance of the code.
2006-01-12 23:43:56 +00:00
rillig
d3b0a7ae64 Added the target check-interpreter to bsd.pkg.check.mk, which checks
that the interpreter of "#!"-style scripts exists. It is disabled by
default, and can be enabled by setting CHECK_INTERPRETER=yes. As for the
other check-* targets, CHECK_INTERPRETER_SKIP is a list of shell globs
that can be used to to skip certain files.

Ok'ed by jlam.
2006-01-12 00:40:19 +00:00
schmonz
ae8a1c813a Since qmail and related packages install into ${PREFIX} (and have
for a while now), we no longer need to add ${QMAILDIR} in PLIST_SUBST
or MESSAGE_SUBST. Noticed by jlam.
2006-01-11 05:48:19 +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
schmonz
094c4b78c1 Add a wee bit of infrastructure to improve how we deprecate broken
packages from branch to branch:

When a package is considered broken (for whatever reason) at branch
time, we'll mark it with BROKEN_IN=name-of-branch. At the next
branch, we can easily determine which ones have remained broken and
remove them.

BROKEN_IN is visible to users iff a build fails, when it appends a
warning message to the above effect.

With feedback from dillo. Reviewed by jlam.
2006-01-04 04:25:47 +00:00
wiz
d5a0e27f9a In the bin-install target, instead of running pkg_add for every
BINPKG_SITES entry separately, construct an appropriate PKG_PATH
and call pkg_add only once. Patch from Chapman Flack in PR 30929.

Use PKGNAME_REQD when installing package dependencies.
Patch from Chapman Flack in PR 30954.
2006-01-03 17:26:56 +00:00
jlam
d7e2d97754 Instead of patching the generated config.status script, patch the GNU
configure script itself so that the generated config.status script
does what we want (just exit if asked to "recheck").  This ensures
the timestamp for config.status is earlier than the timestamps for
the files that config.status generates (Makefile, config.h, etc.).

This fixes some problems where some packages end up "rebuilding" as
part of the install target, which makes the rebuilt files owned by
root and makes cleaning the work directory fail.
2006-01-03 00:41:51 +00:00
dmcmahill
ce2d3019e4 Change some remaining ONLY_FOR_ARCHS to ONLY_FOR_PLATFORM and NOT_FOR_ARCH to
NOT_FOR_PLATFORM that were missed when these variables were changed ages ago.
2006-01-02 23:24:58 +00:00
rillig
c666e33407 Don't check for PKG_FAIL_REASON when doing show-depends-dirs. This prevents
packages that set PKG_FAIL_REASON from being excluded from the bulk build
databases like .index and .dependstree.
2005-12-31 15:20:59 +00:00
wiz
14b750b437 Fix some quoting as per PR 30956 by Chapman Flack. 2005-12-31 08:18:34 +00:00
wiz
8466aed83c If target is real-su-bin-install, set DEPENDS_TARGET to bin-install.
From Chapman Flack in PR 30928.
2005-12-31 08:05:00 +00:00
wiz
62a3e4fd03 Handle automatic dependencies in bin-install correctly.
From Chapman Flack in PR 32422.
2005-12-31 07:53:11 +00:00
jlam
4ab7433a2c Teach the pkgsrc infrastructure to Just Know when the pkginstall
framework should be used.  This is implemented by creating a small
file mk/install/pkginstall.mk that guards the implementation makefile
mk/install/bsd.pkginstall.mk.  This guard file just checks whether
one of the pkginstall-related variables is non-empty, and if so, then
the implementation file is automatically included.  This completely
deprecates USE_PKGINSTALL, which no longer has any affect in pkgsrc.
2005-12-29 06:18:53 +00:00
rillig
999f8b6e04 Applied all quoting fixes found by "pkglint --autofix". 2005-12-05 22:07:07 +00:00
rillig
7d139e4056 The checksums for pkgsrc patches are always checked -- even if
NO_CHECKSUM is set.
2005-12-04 15:52:32 +00:00
rillig
0f75425cfe Don't create distinfo files in the "makesum" and "makepatchsum" targets
if NO_CHECKSUM is set to "yes". This allows to run "make makepatchsum"
in the top level pkgsrc directory without having to worry about lots of
additional distinfo files being created.
2005-12-01 11:18:30 +00:00
rillig
f39d78748c Inserted "set -e" as the first command in the show-depends-dirs target
to force an early exit as soon as a "cd" command fails. Otherwise, "/"
would have been added as a dependency, leading to undefined behavior.
See PR 32202 for details.

Fixes the second item of PR 32202.
2005-12-01 00:27:56 +00:00
rillig
be7bdd3b87 The new target do-check-pkg-fail-reason should to be a dependency of
every top level target that is intended to be called by the user or by a
package different from the current package. It provides the same action
as the "main" targets like "fetch", "expand", "build" before in case
PKG_FAIL_REASON is set, that is it prints all PKG_FAIL_REASONs and
fails.

Fixes PR 32202.

Implementation notes:
- The target names have the "do-" prefix to not pollute the
  bsd.pkg.check.mk namespace.
- The PKG_SKIP_REASON has no influence on the do-check-pkg-fail-reason
  target, although both are handled with the same code.
2005-12-01 00:17:05 +00:00
reed
31d6bf1215 Fix REQUIRES= when ldd output has wrong number of fields.
(This also fixes problem where on some Linux systems, ldd
outputs linux-gate.so.1 entry without corresponding library.)
This was noticed on Linux.

This was discussed and okayed on the tech-pkg list in February,
2002. I have been using this on NetBSD and Linux since then. (Also
just tested on DragonFly.)
2005-11-29 22:18:38 +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
jlam
fbde187715 Missing a line from the previous commit that would cause PKG_DB_TMPDIR
to also be forcibly created (if missing) as part of "make install".
2005-11-22 03:41:20 +00:00
jlam
02f3f44940 Create PKG_DB_TMPDIR (${WRKDIR}/.pkgdb) in a separate step from creating
${WRKDIR}, and just always create it as part of a "make extract".  This
should fix problems where if an old work directory is lying around that
doesn't already have .pkgdb, then a "make reinstall" won't break.
2005-11-22 03:38:40 +00:00
rillig
347897565a Removed a line in the _SU_TARGET variable that had been left from
debugging.
2005-11-20 15:34:33 +00:00
rillig
6f1c497a94 Added subshell parentheses around the command for updating pkg_install.
This allows for copy&paste.
2005-11-20 08:07:30 +00:00
rillig
7c0b4711eb Reverted the SU_CMD change from between 1.1748 and 1.1749 almost
completely. The only difference to revision 1.1748 is that the
PATH=$$PATH:${SU_CMD_PATH_APPEND} argument is included in single quotes.
This will lead to problems when the PATH should contain single quotes
but works in all other cases. (Single quotes in the PATH hadn't worked
before either.) The tricky part regarding this code is that the PATH and
.CURDIR bypass the SU_CMD. They are evaluated before and inserted as
literals into the command that is executed by the SU_CMD. Preserving
these variables this way circumvents interpretation and modification
through the SU_CMD, but leads to ugly rules for quoting which are
currently not handled completely correctly.
2005-11-20 01:11:14 +00:00
rillig
f31a09a613 If the directory of a dependency does not exist, fail instead of (almost)
silently skipping the dependency.
2005-11-19 12:30:41 +00:00
tv
8b47f68d59 Collapse two .for blocks to improve readability:
_ULIMIT_CMD to use a ${...:@var@loop ...@} construct
_ACCEPTABLE to use a !empty(var:Mfoo) conditional
2005-11-18 17:07:13 +00:00
tv
591cd3d3db Use :D and :U constructs in a few more places to collapse some .if defined
blocks to a more parallelism-readable state.
2005-11-18 14:40:21 +00:00
tv
323473ea47 Simplify the _MASTER_SITE_{BACKUP,OVERRIDE} settings a bit by using a :D
construct rather than .if defined(), and changing := to =.
2005-11-18 14:31:54 +00:00
erh
60a3dc4c1b To support variants of make that run the shell so 'set -e' is true (shell
exits on any command failing), add a '|| ${TRUE}' when running the
check-vulnerable target in do-fetch.
2005-11-17 19:30:22 +00:00
erh
ff4b561978 Back out the previous change. The output _will_ be visible to the user.
See the "*)" case in the do-fetch target.
2005-11-17 17:18:01 +00:00
rillig
d6d32da4b7 The message that audit-packages is out-of-date is printed on stderr instead
of stdout because the latter would not show up to the user.
2005-11-17 15:57:47 +00:00
erh
8dfe14c73d Only show the message about fiddling with mk.conf if the output of
check-vulnerable actually contains some vulnerability ids.
2005-11-17 04:12:54 +00:00
erh
d2e73bdcc9 Minimum audit-packages version is _1_.40, not 0.40 2005-11-17 03:58:16 +00:00
erh
9d5fe07cb8 Missed a couple of underscores. Add them. 2005-11-16 21:43:40 +00:00
erh
e2097e6bcd Improve the handling of allowed vulnerabilities. Instead of the single
ALLOW_VULNERABLE_PACKAGES settings that applies to all packages, there can
now be per-package lists of allowed vulnerability ids:
	ALLOW_VULNERABILITIES.<pkgname>=<space separated list of vulnids>

To avoid duplication of code, audit-packages is now used to do these checks.
It can be skipped altogether by setting:
	SKIP_AUDIT_PACKAGES=yes
2005-11-16 20:59:22 +00:00
rillig
74ae2eeea9 Rewrote the _PATH_CMD command, which could not handle a PATH environment
variable before if it had multiple adjacent white-space characters in
it. Removed the dependency on awk(1), as a simple shell script can do
this job, too. Another change is that all kinds of weird pathnames can
be used for PREPEND_PATH, like /bin, "/bin/Program Files", "/     ",
/foo\ bar, and so on. This had not been possible before, too.

Related to PR 32079.

Ok'ed by jlam.
2005-11-15 21:21:01 +00:00
gavan
4cdf73d5ca make install doesn't work when updating pkg_install. Recommend make update
instead.
2005-11-15 18:03:40 +00:00
rillig
b50cd76352 Allow white-space in the PATH environment variable. Fixes PR 32079. The
shell quoting still isn't completely correct for some other variables.
This needs to be fixed, too.
2005-11-15 16:29:10 +00:00
rillig
b6a86c162f Removed trailing white-space. 2005-11-14 04:41:17 +00:00