Commit graph

59 commits

Author SHA1 Message Date
rillig
e2e94b2719 On Interix, the -c option of checkperms is disabled, as checkperms does
not know about Interix yet. This is a temporary work-around for
PR 34968.
2006-11-17 01:05:47 +00:00
rillig
1639b3587b Instead of $0 and $1 .. $NF, the function check_test_eqeq should test
the string in the ''line'' variable. This will make koffice build again.
2006-11-13 23:21:53 +00:00
rillig
66982a6030 Added a missing line continuation in the code for CHECK_FILES_STRICT.
Apparently no one has been using that code since June 2006.
2006-11-12 20:57:55 +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
918d65cc09 Added the CHECK_PERMS_AUTOFIX variable, which allows packages to say
that the file permissions should be fixed automatically.

Moved the test whether this check should be enabled from
../install/install.mk to here.

Renamed the target from check-perms to _check-perms.
2006-11-12 00:44:24 +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
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
53ee7b45c5 Fixed the comment. 2006-11-11 23:59:56 +00:00
rillig
06e3596610 Moved the check whether check-shlibs should be run from
install/install.mk to check/check-shlibs.mk.

Renamed check-shlibs to _check-shlibs. Since it had been declared as
"private" before, this will not break anything.
2006-11-11 23:31:38 +00:00
rillig
8589d49821 Added the usual header comment.
Removed the special case handling of NO_PKG_REGISTER. What does checking
for shared libraries have to do with whether the package is registered
in the package database or not?

Removed the check on CHECK_SHLIBS_SUPPORTED, which will be reintroduced
soon.
2006-11-11 23:27:51 +00:00
rillig
1a7d02851e Improved a comment. 2006-11-11 23:08:00 +00:00
rillig
d9096da9ad Fixed the warning from GNU awk that in strings, \$ is the same as a
plain $.
2006-11-10 08:17:06 +00:00
rillig
1a51080155 Refined the pattern for lines containing bad macros. White-space is
allowed between the "#" and the "define", and the value must be of the
form "${varname}/...", that is, starting with a double quote, followed
by "${" and a variable name, and directly behind the closing brace must
be a slash. This should catch most false positives while still being
useful.
2006-11-10 07:59:01 +00:00
rillig
d43645467b Added documentation. 2006-11-09 21:29:26 +00:00
rillig
05707c80dc This is also an FAQ of autoconf, so provide a link to there. 2006-11-09 21:07:25 +00:00
rillig
0a17361ac7 Documented the ksh-compatible form of the SKIP_FILTER. 2006-11-09 15:12:46 +00:00
rillig
a226b89651 Added a little comment.
The program now exits with the correct exit status in case of errors.
2006-11-09 15:12:15 +00:00
rillig
085172dcd3 Greatly simplified the code and added documentation. 2006-11-09 15:10:16 +00:00
rillig
e49f88c9ef Fixed the SKIP_FILTER command so that NetBSD's ksh can handle it as well. 2006-11-09 14:41:18 +00:00
rillig
ffe459f4de Rewrote check-portability in awk instead of shell, since the shell has a
huge performance problem: When reading files, it calls read(2) for every
single byte. awk instead reads a whole line at a time. For the lang/php5
package, the execution time changed from (7.8 real 4.5 user 3.1 sys) to
(1.6 real 1.5 user 0.4 sys).
2006-11-09 14:36:18 +00:00
rillig
24675f34ff Added a function cs_explain() to check-subr.sh that prints an
explanation for an error message, nicely formatted.

Added explanations for the checks in check-portability.sh.
2006-11-09 10:52:21 +00:00
rillig
649c0754d5 Added another sentence that explains how to disable this check for
individual files.
2006-11-09 10:31:54 +00:00
rillig
3dfe0787ed Added an explanation how to fix the errors reported by this check. 2006-11-09 10:26:50 +00:00
rillig
c4cb1de1ee Made the code simpler. 2006-11-09 09:51:46 +00:00
rillig
3911155e2f Moved the portability checks from the configure/ directory to checks/,
since according to the comment in check/bsd.check.mk, they belong there.

Added a new check for all C and C++ header files to make sure they don't
contain strings like ${prefix} or ${exec_prefix}, which is currently a
problem with sysutils/dbus and has been noticed in PR 35019. This check
is disabled by default since I don't know anything about possible false
positives, but I plan to enable it for PKG_DEVELOPERs after some
testing.

Added two names for hooks that are placed in the configure and in the
build phase. Now the checks look more like becoming something one could
call a framework, sharing a common structure and a documented interface.
2006-11-09 02:53:15 +00:00
joerg
144c44a4ac Look into DESTDIR when checking for WRKDIR references. 2006-11-05 14:46:50 +00:00
rillig
74d127ee88 Adjusted the check-perms target to the recent update of
sysutils/checkperms.

Regular files are now checked if they needlessly have the executable bit
set.
2006-11-02 02:44:17 +00:00
rillig
ce502552c2 Moved the check whether checkperms(1) exists from load time to run time. 2006-10-21 11:13:10 +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
rillig
20d92f3be1 Added a new post-installation check to see whether the files have their
permissions properly set. See mk/check/check-perms.mk and
sysutils/checkperms for details.
2006-10-13 06:32:15 +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
joerg
7545d135e6 - Compute CHEKCK_FILES filter on the entries requested and keep it
as tight as possible. Files we don't handle shouldn't be skipped.
- fonts.alias is not created automatically, so don't remove it.
- create fonts.encoding with mkfontdir using -e X11_ENCODINGSDIR.
  On platforms not following the X11R6 loayout this might need to
  be overriden.
- Fix type1inst calls.
- Modify packages which installed fonts.alias before to actually
  include it in the PLIST and bump the revisions accordingly.
- Modify xorg-fonts* packages to use FONTS_DIRS.* to build indices
  at run time.

Discussed with wiz and jlam.
2006-09-22 21:53:56 +00:00
joerg
86ec0977ff Also ignore fontconfig cache like the "clasic" databases. 2006-09-17 17:02:38 +00:00
rillig
5fbbc4d343 Bugfix: Missing shared libraries are reported again. This feature had been
broken since the introduction of delayed errors and warnings.
2006-09-14 22:00:49 +00:00
joerg
5c0a40494e Avoid spurious false negatives when the directories are reordered
during install phase by sorting explicitly.
2006-08-22 18:50:56 +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
jlam
990d0b5377 Make the check-vulnerable target more self-sufficient, by moving some
of the logic from fetch/fetch.mk into flavor/pkg/check.mk, so that
check-vulnerable can be used as a source target.

Make check-vulnerable a source target for every phase of the build
workflow, which ensures that it is always run if the user starts a
new phase from the command line.

Fix the cookie-generation targets so that they don't append, only
overwrite to the cookie file.  This works around potential problems
due to recursive makes.

Move the cookie checks so that they surround the corresponding phase
target.  The presence of the cookie should now inform the make process
to avoid doing any processing of phases that occur before the phase
corresponding to the cookie.
2006-07-05 09:08:35 +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
jlam
bbea7f72c2 Fix typo that would cause check-shlibs to never find missing libraries
needed by files in a package.  Noted and fix suggested by <taca> in
private email.
2006-06-23 12:55:15 +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
fa494e1722 make(1) will automatically delete partially made targets if the target
creation fails, so remove instances where temporary files were created
then moved to the final target filename, and just directly create the
target.  This is just for brevity/clarity, and saves a few tool calls.
2006-06-09 16:41:09 +00:00
jlam
2cc3f64abb Add a new variable CHECK_FILES_SUPPORTED which is a package-settable
variable to show whether the package supports running the check-files
target.

Set CHECK_FILES_SUPPORTED to "no" in pkgtools/pkg_install in the case
where the PREFIX does not match ${LOCALBASE} it's likely the tools are
being installed in some place that's completely outside pkgsrc control,
and check-files fails horribly in that case.
2006-06-09 16:12:08 +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