Commit graph

21 commits

Author SHA1 Message Date
bad
89f715edf7 I'm fed up with having to waste time because PKG_DEVELOPER is "special" and
can't be disabled by setting it to "no" like the other variables.
Besides, flavor/pkg/metadata.mk has been expecting for a long time that "no"
is a valid value.

Make PKG_DEVELOPER DWIM.
2010-08-24 19:08:28 +00:00
joerg
013ced16d3 Add wrkref check for using the .buildlink or .x11-buildlink
subdirectories. Update comment on the default checks.
2009-09-02 14:43:06 +00:00
uebayasi
c166eebbec Fix check-wrkref path.
_CHECK_WRKREF_FILELIST_CMD is a command which prints PLIST paths
converted to absolute path.  _CHECK_WRKREF_FILELIST_CMD can run
anywhere, so cd ${DESTDIR} before that is pointless.  To access files,
_CHECK_WRKREF_FILELIST_CMD's output needs to be s/^/${DESTDIR}/ when
destdir is used.


Reviewed By:	joerg
2009-01-12 13:11:22 +00:00
rillig
5f7de0ffaa Removed colons for the sake of "bmake help". 2008-02-20 10:23:26 +00:00
tnn
d91ec32482 Enable fake home directory support. Also add a wrkref check because an
embedded path to the HOME directory can be a security problem if, say,
the package looks in the HOME directory of an unprivileged user for
configuration files.

Note that this has the potential to cause some short-term fallout.
2008-02-10 11:43:20 +00:00
rillig
66736dde43 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2008-02-07 21:36:13 +00:00
rillig
7c238f4588 In bulk builds with a custom PKGSRCDIR, that directory should not appear
in binary packages. This check can be enabled by adding "pkgsrc" to
CHECK_WRKREF.
2007-09-13 09:52:46 +00:00
rillig
876b9237c3 Now it's possible to add custom directories to the check for directory
references.
2007-09-05 13:34:32 +00:00
rillig
185782f13a Added the variable declarations for the "show-all" target. 2007-03-16 10:29:22 +00:00
rillig
d61f4b03b7 The CHECK_WRKREF variable has changed type: It is now a list of
directory aliases. That makes it possible to check for references into
TOOLS_DIR and WRKSRC, but to leave out the other infrastructure
directories.

On IRIX, x11/gtk2 failed to build because of an unknown library
-lharfbuzz. That library turned out to be an internal dependency of
graphics/cairo, which had made it into the installed libpangocairo.la
file.

With this change, that bug would have been caught earlier.
2007-03-15 01:06:02 +00:00
rillig
5c8a2d4f08 Fixed the mismatch between absolute and relative paths. 2007-01-07 11:21:24 +00:00
rillig
5644aacf25 Moved the check for whether check-wrkref should be run from
install/install.mk to check/check-wrkref.mk.

Renamed the check-wrkref target to _check-wrkref.
2006-11-12 00:13:26 +00:00
rillig
bd41165b43 Improved the readability of the header comment.
CHECK_WRKREF may be set to "wrkobjdir" to check for references to
WRKOBJDIR.

Added some error checking.

Removed the dependency on NO_PKG_REGISTER.
2006-11-12 00:09:50 +00:00
rillig
085172dcd3 Greatly simplified the code and added documentation. 2006-11-09 15:10:16 +00:00
joerg
144c44a4ac Look into DESTDIR when checking for WRKDIR references. 2006-11-05 14:46:50 +00:00
seb
24fa002d66 Since 2006/10/09 the ${PLIST} file does not contain the full
pathnames anymore. Therefore cd to ${PREFIX} to correctly resolve
the relative pathnames.

While here unbreak CHECK_WRKREF for another reason:
Append to ${ERROR_DIR}/${.TARGET} otherwise the "_NONZERO_FILESIZE_P"
check is always false...
2006-10-16 19:02:53 +00:00
joerg
5b374e445d Main infrastructure for DESTDIR support.
Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or
"user-destdir" to flag support for this, following the same
rules as PKG_INSTALLATION_TYPES (e.g. define before first include
of bsd.prefs.mk).

The user activates it via USE_DESTDIR. When set to "yes",
packages with "user-destdir" are handled as "destdir".
The installation of the package will not go to ${LOCALBASE},
but a subdirectory of ${WRKDIR} instead. pre/post install scripts are
not run and the package is not registered either. A binary package
can be created instead to be installed normally with pkg_add.

For "user-destdir" packages, everything is run as normal user and
ownership is supposed to be correctled by pkg_create later. Since
the current pkg_install code uses pax and it doesn't allow overwriting
owners, this does not work yet.

For "destdir" packages, installation, packaging and cleaning is run as
root.

This commit does not change the handling of DEPENDS_TARGET or
bin-install to allow recursive usage.
2006-10-09 12:25:44 +00:00
jlam
8c10d39139 Introduce the capability to gather all the warnings and errors that
are generated for a target and output them all at once at the conclusion
of the target's invocation.  The implementation is in bsd.pkg.error.mk,
which defines a macro target "error-check" that will print out any
non-empty warning and error files in ${WARNING_DIR} and ${ERROR_DIR}
and exit appropriately if there were errors.

Convert some targets that were just long sequences of ${ERROR_MSG} or
${WARNING_MSG} within a single shell statement to use the new delayed
error output via error-check.

Modify the compiler "fail" wrappers for C++ and Fortran to be less
verbose during invocation.  Instead collect the warnings and only
print them at the end of the completed phase, e.g. after "configure"
and/or "build" completes.
2006-06-09 13:59:06 +00:00
jlam
0f5fc1ca58 Rewrite to avoid using "grep -H", which Solaris' grep does not support. 2006-06-07 17:05:25 +00:00
jlam
08763d7226 Fix problem with saving variables whose value contains "$$" by avoiding
it altogether.  In this case, saving _CHECK_WRKREF_SKIP_FILTER was
problematic because the value was cached and in the process, one $
was stripped.  This makes the check-wrkref target work again after
the big refactoring commit from a couple of days ago.
2006-06-06 18:07:50 +00:00
jlam
e5eb2c56af First pass at implementing support for package system flavors other
than pkgsrc's current one.  This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices.  This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.

The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc.  modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}.  The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work.  The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support.  Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor.  I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.

There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls.  I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.

The "depends" module is a complete overhaul of the way that we handle
dependencies.  There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed.  This
differs from the old way where dependencies were installed just before
extraction occurred.  The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies.  It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.

Future work on this project include:

    * Resolve the workflow design in anticipation of future work on
      staged installations where "package" conceptually happens before
      "install".

    * Rewrite the buildlink3 framework to not assume the use of the
      pkgsrc pkg_* tools.

    * Rewrite the pkginstall framework to provide a standard pkg_*
      tool to perform the actions, and allowing a purely declarative
      file per package to describe what actions need to be taken at
      install or deinstall time.

    * Implement support for the SVR4 package flavor.  This will be
      proof that the appropriate abstractions are in place to allow
      using a completely different set of package management tools.
2006-06-03 23:11:42 +00:00