Commit graph

31 commits

Author SHA1 Message Date
dholland
69936c6955 Explicitly skip directories. PR 50955. 2016-03-11 21:11:47 +00:00
jperkin
454f6fae69 Perform interpreter sed(1) check with LC_ALL=C, avoids failures on newer
Darwin releases with "sed: RE error: illegal byte sequence".
2015-11-27 12:45:04 +00:00
jperkin
bb4c5026e6 Only check executable files for valid interpreters. By the time this check is
performed all installed files should have their correct mode set, and there are
no INSTALL scripts that currently change file modes under PREFIX after
installation (nor should they ever).

This change considerably speeds up the test.  For example in www/firefox-l10n
the time to run the test reduces from 181 seconds (135 seconds of system time)
down to 10 seconds (6 seconds system time) on my SmartOS build systems.
2015-04-29 13:05:28 +00:00
joerg
c6e1b83d1b Simplify PKG_DEVELOPER checks. 2014-10-12 23:39:17 +00:00
roy
7ecb96b2ef Just warn about non executable files using env. 2011-04-19 15:31:45 +00:00
roy
b73064c230 Disallow the use of env(1) as an interpreter. 2011-04-19 14:28:28 +00:00
obache
fb23ffa128 Skip interpreter check unless regular file.
PR#44089, avoid warnings from broken symbolic link or link to a directory.
2011-01-11 12:03:18 +00:00
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
rillig
339e8ef931 Adjusted the documentation to the source code. 2008-02-13 08:33:08 +00:00
tnn
a1bf36e0ae Convert to ${RUN} 2008-02-05 08:17:59 +00:00
bjs
c4ff3e236e The interpreter check for packages which are their own interpreter,
e.g. lang/perl5, was failing.  Adding a check for ${DESTDIR}"$$interp"
fixes this.
2007-11-30 08:34:31 +00:00
rillig
e5fa877447 Activated the check-interpreter for PKG_DEVELOPERs. I don't remember why
activating this has taken so long.
2007-11-07 10:52:00 +00:00
heinz
68d8d088d8 More DESTDIR fixes in warnng/error messages 2007-03-24 18:12:08 +00:00
heinz
ae77e8ea18 Removed unnecessary shell code:
p|p) is the same as p)
2007-03-24 18:03:09 +00:00
joerg
28be10b7b5 Fix check-interpreter when using USE_DESTDIR. From Klaus Heinz on
tech-pkg.
2007-03-20 16:21:10 +00:00
rillig
c879441de5 Moved the test whether this check should be enabled to this file.
Removed the dependency to NO_PKG_REGISTER.

Renamed the check-interpreter target to _check-interpreter.
2006-11-12 00:49:57 +00:00
rillig
b7ceab86aa Improved the formatting of the comment and made the code a little
shorter.
2006-11-12 00:37:44 +00:00
joerg
72cf605c7c s/LOCALBASE/PREFIX/, but thanks for catching this. 2006-10-10 13:01:26 +00:00
rillig
4fb63bd4af Since a few hours, the .PLIST file does not contain the full pathnames
anymore. Therefore, cd to ${LOCALBASE} to correctly resolve the relative
pathnames.
2006-10-09 23:06:48 +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
heinz
37b9df590f Fixed default path wildcards for CHECK_INTERPRETER_SKIP. Now they
actually apply to the whole subtree.
2006-07-13 19:07:54 +00:00
rillig
a5906ce386 Moved the command that generates the list of files to its own variable,
so it can be overridden on the command line. This allows to check for
example ${WRKSRC} instead of the installed files. Of course, since the
variable starts with an underscore, this feature is not meant to be
official.
2006-07-03 06:57:20 +00:00
rillig
52285a9477 I forgot to mention in the last commit that share/examples and share/doc
are automatically excluded from the checks, since those files are not
intended to be executed directly.
2006-07-02 09:40:37 +00:00
rillig
0ed5996894 Added a proper interface documentation. Instead of a .for loop, the
run-time for loop is used, which allows for white-space in
CHECK_INTERPRETER_SKIP.
2006-07-02 09:38:42 +00:00
rillig
226335ff5b It is worth a warning if a freshly installed file is not readable. 2006-06-16 12:03:38 +00:00
jlam
877745fd8f Create DELAYED_{ERROR,WARNING}_MSG macros that can be used to output
error and warning messages that are picked up by the error-check
target.  Use them instead of using a bare ${ECHO} for more code clarity.
Implemented as suggested by Roland Illig.
2006-06-14 15:09:34 +00:00
jlam
6b4b7743d0 Be more consistent about how we're emitting errors and warnings. 2006-06-12 03:42:02 +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
aa012e72aa Use WARNING_MSG and ERROR_MSG for consistency. 2006-06-07 17:41:14 +00:00
rillig
58873dc4d8 Check for [[:space:]] instead of [ ]. This fixes a misbehavior when
script files contain CRLF line-ends.
2006-06-06 23:43:10 +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