Commit graph

2218 commits

Author SHA1 Message Date
rillig
59005a739b - Added about 50 variable types to makevars.map.
- Added some variable types.
- For unknown variables, the type is guessed from the variable name.
- Added more checks for relative pathnames.
- Improved the shell parser once more.
2006-01-12 22:28:06 +00:00
wiz
cf52b6b4c0 Bump date for some new features. 2006-01-12 21:50:43 +00:00
joerg
599b02b412 When creating the sorted list of binary packages, "ls -t *.tgz" can
easily overflow the argument space e.g. on DragonFly. Replace this
statement with "ls -t | grep '\.tgz$'" to remove this constraint.
2006-01-12 21:17:16 +00:00
joerg
ae610a4540 Add runtime dependency of xpkgwedge on imake and xmkmf.
When using non-native X11, xpkgwedge could be installed before imake
and host.def en up with just the xpkgwedge.def include. This means
that ProjectRoot as set by xorg's host.def is not used and wrong
path names are used. This run time dependency is the easiest way to
ensure proper order, but isn't perfect. Just providing a fixed host.def
and a secondary include file for Lesstif to modify breaks with
USE_XPKGWEDGE=NO, so keep the old approach.

Discussed with jlam@
2006-01-12 19:02:34 +00:00
rillig
16a2cd8def Updated pkglint to 4.53.
Changes since 4.52:
- New warning categories "debug", "space", "quoting" that can be selected
  independently.
- Improved the parsers for shell commands and shell words.
- Added warning for using $(...) in shell programs, as the Solaris /bin/sh
  doesn't support it.
- Added some warnings about quoting.
- Some other minor changes.
2006-01-12 14:05:50 +00:00
rillig
4eed0be377 Added APACHE_MODULE. 2006-01-12 13:59:42 +00:00
rillig
0740dd8c6c - Allow '^' to appear unquoted in shell programs, although it ``is an
obsolete synonym for the pipe operator "|", so you must protect it with
  quotes''. (Kernighan/Pike, The UNIX Programming Environment, 1984.)
- $@ is another well-known shell variable.
- All substitution arguments to ${SED} and ${PAX} should be quoted whether
  they contain special characters or not.
2006-01-12 13:51:54 +00:00
rillig
9af416c16b - The shell variables $!, $# and $? are recognized as such. All other
occurences of a $ in double quoted strings result in a warning.
2006-01-12 13:19:57 +00:00
rillig
c0fc81f666 - Improved the parsers for shell words and shell commands. Parsing errors
are only shown in -Wdebug mode, as the diagnostic messages are too
  cryptic.
- Added detection for the $(...) replacement for backticks, as the Solaris
  /bin/sh cannot handle them.
2006-01-12 13:01:47 +00:00
rillig
cb558f2a78 - Defining and using make variables starting with an underscore is only
worth a warning, not an error. There are worse things at the moment that
  need to be fixed.
2006-01-12 10:39:30 +00:00
rillig
4d9663f2a9 - Added three warning categories "debug", "quoting" and "space" that can
be enabled independently. They are all disabled by default.
- A note is emitted if variable definitions are aligned using space instead
  of tabs.
2006-01-12 10:32:40 +00:00
rillig
2ef3b243e0 - Added the package PkgLint::String, which will be used for improving the
precision of the diagnostics. It is currently unused.
2006-01-12 04:31:30 +00:00
rillig
e6e6cf9fb7 - Added plist-clash.pl to the list of files that have @PERL@ replaced. 2006-01-12 04:27:58 +00:00
rillig
fb188361c0 - In the shell command parser, go to state SCST_CONT instead of SCST_START
after parsing the command line options of ${INSTALL}.
- Don't warn for CFLAGS that reference other make variables.
2006-01-11 22:57:10 +00:00
rillig
4907cb1168 - In resolve_relative_path, the depth of the path should only be adjusted
in about half the cases -- added an additional parameter.
2006-01-11 12:25:19 +00:00
rillig
271edbd2ec Fixed spacing issue. 2006-01-11 11:42:27 +00:00
rillig
53e93b0ab9 - Renamed PkgLint::FileUtil::Line to PkgLint::Line in preparation to some
upcoming changes.
2006-01-11 04:29:12 +00:00
christos
cd18fc91dc Use ${ABI} for library files, patterned after what SGI does. This makes
X11 packages work on amd64 linux boxes. From Benjamin Shi.
2006-01-10 16:56:42 +00:00
rillig
2cd8334aa7 Updated pkglint to 4.52.
Changes since 4.51:
- The occurence of a symlink other than work* inside the pkgsrc tree is
  not an error, just a warning.
- SUBST_MESSAGE should not be quoted.
- If -Wextra is enabled, all make variables that are used in shell commands
  are checked for proper quoting.
- Improved the parser for shell commands.
- Some other minor changes.
2006-01-10 00:52:00 +00:00
rillig
c24a72897b Fixed the simple part of the pkglint -Wall warnings. 2006-01-09 23:39:55 +00:00
rillig
1d78045e51 - Even in an unquoted shell word, variables should be quoted. For example,
${PREFIX:Q}/foo.
- The semicolon after the "for" loop in the shell does not mean that some
  exitcode is ignored, so don't print warnings for it.
2006-01-09 23:14:45 +00:00
rillig
9bb9aae442 - Only check make variables for deprecation and $(...) instead of ${...}. 2006-01-09 03:22:45 +00:00
rillig
043613d277 - Added "Please use ${FOO} instead of $(FOO)."
- It is an error if the COMMENT has the default value from url2pkg.
2006-01-09 02:47:56 +00:00
joerg
a32d8f5c53 Unbreak by adding NO_BUILD=yes. 2006-01-08 21:00:22 +00:00
rillig
2464072040 - Rewrote the state transition of the shell command parser. The source
code now needs less lines than before. For unknown state/shellword
  combinations, warnings are printed (currently none).
2006-01-08 15:55:13 +00:00
rillig
74e4928049 - In shell commands, "case" statements are parsed properly. (Fixes a false
positive warning in mk/subst.mk.)
- Improved debugging support for parsing shell commands by printing the
  current state and word in -vv mode.
2006-01-08 14:14:36 +00:00
wiz
d182d0d618 Sync with usr.sbin/pkg_install 1.58:
Use MaxPathSize instead of PATH_MAX.
2006-01-08 12:25:06 +00:00
rillig
4d0e362738 - Enabled the quoting warning for SUBST_MESSAGE (this time the other
direction: it had been quoted too much in the past).
2006-01-07 23:29:23 +00:00
rillig
6e63ea31f3 - Added SUBST_MESSAGE to the list of checked variables. The plan is to
remove the quoting from the definitions in the Makefiles.
- When checking with -Wall, print warnings about possibly misquoted
  variables in the various states of the shell word parser.
2006-01-07 20:00:00 +00:00
seb
5ad846112f Update to version 1.25.
Fix libkver support for pkg_comp's build, auto and install targets,
Reported broken and fix tested by salo@.

Also ensure libkver is built, if needed, even before digest.

Approved by jmmv@
2006-01-06 23:08:51 +00:00
rillig
6bf7eb18c8 - Moved the code for checking macro names in patch lines into its own
subroutine, as it has no code that is specific to patch files.
2006-01-06 21:06:06 +00:00
rillig
dcf63d1b4b Fixed pkglint warnings about incorrect quoting and unsorted PLIST. 2006-01-06 19:46:26 +00:00
rillig
d66e28a8c5 - s/existant/existent/ 2006-01-06 18:02:05 +00:00
rillig
b29b41bfc1 - Renamed checkfile_patches_patch to checkfile_patch. 2006-01-06 17:43:18 +00:00
joerg
90ac0fb998 Use SUBST framework. 2006-01-06 17:28:20 +00:00
rillig
7fa0c4e8e9 Added an RCS Id and an introductory comment. 2006-01-06 17:24:38 +00:00
joerg
a11c0f7879 Use SUBST framework. Use PERL5 instead of ${PREFIX}/bin/perl to get
the location of the interpreter.
2006-01-06 17:10:58 +00:00
joerg
98faef6634 Use SUBST framework. 2006-01-06 16:58:32 +00:00
rillig
8005613009 - It is not an error to have symlinks in pkgsrc -- just a warning. Any
directory entry besides regular files, directories and symlinks is still
  an error.
2006-01-06 13:42:47 +00:00
wiz
dc560ec778 Depend on cdrtools instead of cdrecord. Bump PKGREVISION.
Update some messages/comments.
2006-01-05 23:29:04 +00:00
xtraeme
a429287789 Remove GNU Autoconf's configure.lineno file if it's there. 2006-01-05 17:42:24 +00:00
xtraeme
40bf851429 Move the PKGCONFIG_OVERRIDE lines after USE_TOOLS, GNU_CONFIGURE, etc. 2006-01-05 17:32:50 +00:00
xtraeme
6c95a6da67 Update to 1.32:
* Don't use ${WRKSRC} for PKGCONFIG_OVERRIDE (it's assigned automatically)
* If there are pkg-config files, now it will add "USE_TOOLS+= pkg-config".
2006-01-05 17:26:54 +00:00
christos
c6761ed17e Handle newer versions of Berkeley DB. Our algorithm is:
- if you have > db1 the probably you have db_185.h which means
  that dbopen is really __db185_open, and we'll prefer that.
- else if you have db1, then you have db1/db.h and dbopen
- else if you have db.h, then this is either the one from db1 and it will
  work with -ldb having dbopen, or it will not.

Note that the compatibility option on __db185_open() will actually not create
or update db1.85/1.86 files, but it will use the current format of the db
library. This compatibility layer is source code only.
2006-01-04 23:33:23 +00:00
joerg
a485b489e3 Ask for warnings so that e.g. CONFIGURE_DIRS has overrides for
config.guess and config.sub as well.
2006-01-03 20:52:27 +00:00
abs
9ca94e98c0 update pkg_chk to 1.64
- Allow -U of filenames on the commandline
2006-01-03 19:00:09 +00:00
rillig
1c0702676a Cleaned up the TODO list. 2006-01-02 10:12:09 +00:00
rillig
0ff3a14888 - For possibly misquoted variables the current shellword state is
printed (-vv only).
- TODO: Decide which variables may be used in which quoting states.
2006-01-02 10:09:03 +00:00
rillig
862032689f * record with each substring its source location to be able to make
even more precise diagnostics
2006-01-02 09:42:52 +00:00
rillig
83f5dee91f Updated pkglint to 4.51. Welcome to the Fahrenheit release.
Changes since 4.50:
- Extended the quoting checks for make variables to shell commands.
- Added a check for unquoted shell variables (only with -Wextra).
- Some other minor changes.
2006-01-02 08:29:55 +00:00
rillig
11b91ee6d2 - Fixed the wording of the message when CONFIGURE_DIRS and friends are
prefixed with ${WRKSRC}. It had been plainly wrong.
2006-01-02 03:02:29 +00:00
rillig
d3a90242d3 - Removed the type guessing code for variables with unknown type, as
this code has led to duplicate diagnostics. It had been misplaced as
  well.
2006-01-02 01:20:31 +00:00
rillig
b42c46442f - Added MESSAGE_SUBST, PKG_GROUPS, PKG_USERS. 2006-01-02 01:18:24 +00:00
rillig
bc5fc19c6f - Unquoted shell variables may appear in for loops. 2006-01-01 22:08:22 +00:00
rillig
08274c2f69 - Uncommented the note that CONFIGURE_DIRS, BUILD_DIRS and INSTALL_DIRS
don't need to be prefixed with ${WRKSRC}, now that there will be no
  more pullups to 2005Q3.
2006-01-01 21:58:12 +00:00
rillig
2d6877dcb0 - Added a check for unquoted shell variables (only with -Wextra). 2006-01-01 21:55:44 +00:00
rillig
bab261e700 - Integrated checklines_patches_patch back into checkfile_patches_patch. 2006-01-01 19:58:36 +00:00
rillig
54171b1096 - Fixed typo: It's __NetBSD_Version__, not __NetBSD_Version_. 2006-01-01 19:07:20 +00:00
wiz
faf65456ad Remove stuff that was marked for removal after 2005Q4. 2006-01-01 18:53:03 +00:00
rillig
be3a661d5b - Added a parser for shell words.
- Added warnings for imperfect quoting style inside double quotes.
- All shell commands are checked for correct quoting of make(1) variables
  in shell assignments like --prefix=${PREFIX:Q} and TMPDIR=${WRKSRC:Q}.
2006-01-01 18:40:12 +00:00
rillig
ea3cb56d30 - Moved the code that checks for valid shell words into its own subroutine
because it will be extended soon.
2005-12-31 15:00:15 +00:00
rillig
068c3c65d5 Updated pkglint to 4.50.
Changes since 4.49:
- Added checks for shell commands whose exitcodes are ignored.
- Added checks for CFLAGS, CPPFLAGS and CXXFLAGS.
- Improved diagnostics.
- Various bugfixes.

Changes to lintpkgsrc:
- Avoided double occurrence of pkg_install.
2005-12-31 14:09:51 +00:00
rillig
816ce58996 Added some variables, strengthened the checks for some other variables. 2005-12-31 14:02:28 +00:00
rillig
5b0ebb51c6 - Restructured the header comment.
- Rewrote the message formatting.
- The indentation of explanations is changed to be always a tabulator
  character instead of depending on the last message.
- In verbose mode, statistics about the frequency of the individual
  messages are printed before exiting.
- The command line option -Wextra enables additional warnings that are
  not enabled by default because I have been told that Alistair would kill
  me for them. :)
- Improved the shell tokenizer by recognizing parentheses.
- Improved checking of pkgsrc-internal files (mostly in pkgsrc/mk).
- Added a (trivial) spellchecker.
- Added checks for shell code that ignores the exitcode of commands.
- Added checks for CFLAGS, CPPFLAGS and CXXFLAGS.
- Avoided false positive warnings for absolute filenames in AWK code.
- Added checks for .for variables.
- Pkglint can check single files in directories that are three levels deep.
  This is mostly useful for checking patch files.
2005-12-31 14:01:46 +00:00
rillig
7255646a18 Since pkg_install appears in the pkg_info listing, there is no need for
special treatment. Reported by Christoph Egger via private mail.
2005-12-31 09:07:22 +00:00
joerg
ff4b54c998 Index: has sometimes different precedence in patch, avoid problems. 2005-12-30 16:27:13 +00:00
jlam
dc9594e09d Remove USE_PKGINSTALL from pkgsrc now that mk/install/pkginstall.mk
automatically detects whether we want the pkginstall machinery to be
used by the package Makefile.
2005-12-29 06:21:30 +00:00
reed
45d9dae994 Honor PKGMANDIR. 2005-12-27 17:34:53 +00:00
seb
37d945e229 Lower expectations, both others' and mine: relinquish stewardship 2005-12-27 13:54:57 +00:00
rillig
1ddd52875f lintpkgsrc needs pkgtools/digest, so readd it to the DEPENDS. 2005-12-18 15:20:21 +00:00
rillig
b776d7dde2 Synchronized the way the checksum of patch files is computed with the one
that is used in the rest of pkgsrc. This avoids false positive errors.
2005-12-18 14:25:40 +00:00
jlam
2558c0291d Change my MAINTAINER email address to the one I've been using for
pkgsrc work.
2005-12-17 05:20:21 +00:00
dillo
f9639751a9 Fix precedence botch which breaks invocation using source. 2005-12-13 15:26:05 +00:00
wiz
525916457d NetBSD capitalization police. 2005-12-13 12:03:47 +00:00
rillig
18cff5b614 + ERROR: Other Makefiles must not be included. Use Makefile.common instead. 2005-12-12 21:36:45 +00:00
wiz
7923936df5 Sort options in SYNOPSIS, bump date for -S. 2005-12-12 14:03:20 +00:00
dillo
6ff6eb177b Add new option -S to create summary file of binary package directory.
Use this summary file to support using remote binary packages.

Okayed by agc and abs.
2005-12-12 13:36:37 +00:00
rillig
9c2bd09a33 * check quoting in CFLAGS+= -DPREFIX=\"${PREFIX:Q}\" 2005-12-11 22:07:46 +00:00
rillig
80b3d9a596 Improved diagnostic of the warning for @comment in variables. 2005-12-09 08:40:40 +00:00
rillig
5e79129a20 - Improved the wording of the explanation regarding relative directories.
- Fixed a bunch of format string bugs. (As this is not C, these were
  only bugs, not vulnerabilities. ;))
2005-12-08 21:13:49 +00:00
dillo
2b4de40b79 sync with src (revision 1.115):
(pkg_do) When marking already installed package as manually installed,
         only print message if we succeeded.

Noted by wiz.
2005-12-08 19:41:04 +00:00
rillig
a1ff561a90 Updated pkglint to 4.49.
Changes since 4.48:
- Added a check for .include lines in all Makefiles and *.mk files to make
  sure that only existant files are referenced and that pkgsrc packages do
  not contain references to packages in pkgsrc-wip.
- Extended the --autofix option to all Makefile* and *.mk files. Before, only the
  package Makefile could be fixed.
- Rewrote the detection of direct use of tool names.
- Append-only lists may be initialized using the "?=" operator.
- The typical form of ShellWords for CONFIGURE_ARGS, --foo=${FOODIR}, is checked for
  quoting errors.
- All PKG_OPTIONs are checked whether they are documented in mk/defaults/\
  options.description.
- Many small fixes and improvements.
2005-12-08 10:57:59 +00:00
rillig
ab84b76ce4 Cleaned up the TODO list. 2005-12-08 10:47:38 +00:00
rillig
081ebe2d92 The option names are now checked if they are in
mk/defaults/options.description.
2005-12-08 10:43:04 +00:00
rillig
1f93724529 - Fixed a typo (SUBST_PLIST => PLIST_SUBST) noted by wiz. 2005-12-08 10:07:20 +00:00
rillig
ebba7b0a8c - Added a warning that prevents the quoting issues from the recent
"pkglint --autofix" change. Added a long and detailed explanation for it.
2005-12-08 09:01:08 +00:00
rillig
0ed1c6a38d - All PKG_OPTIONs are checked whether they are documented in mk/defaults/\
options.description.
- Added the checkline_relative_pkgdir() subroutine, as the code is useful
  in two different places.
2005-12-07 21:39:59 +00:00
rillig
45edf96e98 - Fixed a comment. The order of subroutines is no longer historical. 2005-12-07 19:46:51 +00:00
rillig
ddf867e458 I've sent joerg a patch which would fix his TODO item. 2005-12-07 18:47:34 +00:00
rillig
59f4a103be - Added a check that exists if RelativePkgDir exists. Suggested by wiz in
a private mail.
2005-12-07 18:46:28 +00:00
rillig
e55cea632a - Changed the type of PKG_OPTIONS_VAR from Varname to PkgOptionsVar. Added
a check that PKGBASE is not used in PKG_OPTIONS_VAR.
- Added some macros to the list of portable CPP macro names.
2005-12-06 22:07:35 +00:00
rillig
e12c8a5077 - Moved checkline_mk_varassign() below checkline_mk_vartype() to avoid
forward references.
2005-12-06 17:37:06 +00:00
rillig
d526260071 - Improved the heuristics for shell words by allowing pkgsrc variables with
a "$" in the modifier part, as long as they don't contain references to
  other variables.
- Removed checkline_mk_direct_tool_use().
- Renamed checkline_mk_shellcmd() to checkline_mk_shelltext(). This sub-
  routine is also used for checking the right hand side of variable assign-
  ments.
- Renamed direct_tools_ok_vars to non_shellcode_vars, which is more
  appropriate. Added some variables to it that produced false positive
  warnings.
2005-12-06 17:32:12 +00:00
rillig
e3aeff9129 * IMAKE_MANNEWSUFFIX should be deprecated in PLISTs, says Joerg. 2005-12-06 16:42:15 +00:00
rillig
8c635c3030 - Removed the checklines_mk() subroutine and copied the code to
checklines_package_Makefile(). Then, renamed
  checklines_package_Makefile() to checklines_mk(), as it not only
  applies to the main package Makefile.
- Fixed the regular expression for detecting ambiguous variables like
  $f, which could mean either ${f} or $$f.
- When checking for deprecated variables, also mention the ones that
  don't have modifiers.
2005-12-06 16:13:28 +00:00
rillig
e9a455da93 - Integrated the code from checklines_mk_deprecated_variables() into
checkline_mk_text() and checkline_mk_varassign(). This saves 20 lines
  and makes the warnings appear ordered by line number.
2005-12-06 15:47:14 +00:00
rillig
01f34446ba - Improved the heuristics for detecting direct use of ${TOOL}s.
- Moved the whole complicated code from checklines_package_Makefile() to
  checkline_mk_shellcmd() and checkline_mk_varassign().
- Reenabled the -Wdirectcmd options by default.
2005-12-06 15:22:28 +00:00
rillig
4cff6fbbc6 Reordered the complete file. Grouped subroutines by name (checkline_*,
checklines_*, checkfile_*). No functional changes.
2005-12-06 14:15:02 +00:00
rillig
df0a56361d Collected the routines that load pkglint-specific data in one section.
No functional changes.
2005-12-06 13:23:16 +00:00
rillig
2c55734d95 - Renamed get_make_vars_typemap() to get_vartypes_map().
- Added specialized subroutines for checking a single line.
- Removed checklines_Makefile_varuse().
- Removed checklines_direct_tools(), which has been replaced by the
  specialized routines mentioned above.
2005-12-06 13:16:23 +00:00