Commit graph

318 commits

Author SHA1 Message Date
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
1ddd52875f lintpkgsrc needs pkgtools/digest, so readd it to the DEPENDS. 2005-12-18 15:20:21 +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
dc15fda19c Adjusted the version number to the one that has been announced. (4.49 =>
4.48.)
2005-12-01 14:07:23 +00:00
rillig
9d462108c7 Updated pkglint to 4.48.
Changes since 4.47:
- Output warnings for partial RCS tags in patch files.
- Added many warnings concerning Makefile directives and make targets.
2005-12-01 13:44:11 +00:00
rillig
8f38ceeec1 Updated pkglint to 4.47.
Changes since 4.46:
- Made the --explain command line option work.
- Added many explanations for existing diagnostics.
- Improved the diagnostics.
- In --autofix mode, no backup files are created anymore.
- Temporarily disabled the check for direct use of tool names.
- Fixed some false positive warnings.
- Added a check for the use of absolute pathnames in shell commands.
2005-12-01 04:11:56 +00:00
rillig
b25d847872 Updated pkglint to 4.46.3.
- Added the $line->replace() method for a convenient way to achieve simple
  autofix tasks.
- When autofixing, no backup file is created (it had been created before).
  1. Usually "cvs diff" is available.
  2. All current autofixed changes are trivial.
  3. The fixed file is first written to disk in a new file and then renamed
     to the original file, greatly reducing the risk of data loss.
- Fixed a bug in checkdir_package(): In the call to load_package_Makefile(),
  the last parameter had not been passed by reference, but by value.
  Luckily this had not influenced any other part of pkglint.
- While there, I noticed that it is not necessary to pass some subroutines
  the lines of all included Makefiles, so I removed that parameter.
2005-11-27 23:48:01 +00:00
rillig
4c81669b0b Updated pkglint to 4.36.2.
- Improved diagnostics for URLs that are not strictly pkgsrc-compliant, as
  requested on tech-pkg.
2005-11-27 20:25:49 +00:00
rillig
3980bc7be6 Updated pkglint to 4.46.1.
- Marked ALLFILES as deprecated.
- Degraded white-space warnings to notes.
- Added many explanations for the diagnostics.
2005-11-24 21:51:10 +00:00
rillig
556eb8885a Updated pkglint to 4.46.
Changes since 4.45:
- Added the type ShellWord.
- Added quoting checks for variables that are appended to a
  List of ShellWord.
- Multiple -v increase the verbosity.
- The --autofix option is no longer undocumented, but still experimental,
  as this is the only part of pkglint that can modify external files.
- Added an --explain option that provides additional help for the
  diagnostics.
- Added checks for unportable CPP macro names in patches.
- Updated the documentation.
2005-11-24 10:16:54 +00:00
rillig
681277d002 Updated pkglint to 4.45.3.
- Added detection of redirection operators and comments to the
  regex_shellword constant.
- Changed the naming conventions for list data types. Now List simply
  means a list. List+ means a list that should only be modified using
  "+=", not "=". List! means an internal list. And List!+ is the
  combination of both.

  The distinction is necessary because of the introduction of
  redirection operators in the regex_shellword. When checking the data
  type of list elements, the lists are split up into shell words instead
  of simply using split(). This leads to much better results.
- When splitting a variable value or shell command into words, anchor the
  regular expression at the beginning of the string.
2005-11-24 08:05:01 +00:00
rillig
b4a4cd753e Updated pkglint to 4.45.2.
- Removed log_subinfo().
- Added log_debug().
- Multiple -v command line options increase the verbosity.
- Added the regex_shellword constant that will allow better parsing of
  shell commands. Currently it is only producing debugging information.
- Long [info] messages have been changed to [debug] messages.
2005-11-23 22:12:03 +00:00
rillig
09ccc37a3a Updated pkglint to 4.45.1.
- Added a new type ShellWord that is used for MAKE_ENV and the like to
  check for invalid FOO="${VALUE}" additions. They really should be
  FOO=${VALUE:Q}, as they may already contain embedded quotes. This is
  especially important for CPPFLAGS and CFLAGS.
2005-11-23 05:18:46 +00:00
rillig
3ffb27719a Updated pkglint to 4.45.
- Fixed perl -T warnings:
  - Replaced $#{@{$lines}} with $#{$lines}.
  - Avoided calls to external programs (sed and digest).
- Removed redundant warning if DISTNAME is set to an invalid package name
  and PKGNAME is not defined.
- Changed dependency from pkgtools/digest to security/p5-Digest-SHA1.
2005-11-21 22:06:30 +00:00
rillig
6efa75eb39 Updated pkglint to 4.44.
Changes since 4.43:
- Removed the remaining code that had been imported from FreeBSD's
  portlint.
- Removed the (undocumented) -Wvague option.
- Removed the -Wexec and -Wparen options. The latter had no effect at all,
  and the former cannot lead to false positives, so it is always enabled.
- Variable names starting with an underscore are reserved for internal
  pkgsrc use.
- Added some more type checks.
2005-11-20 20:09:35 +00:00
rillig
9ba2c80228 Updated pkglint to 4.43.2.
- Renamed the type Dependency to DependencyWithPath.
- Added new types Dependency, PlatformTuple and RelativePkgDir.
- Added some of the common variables to the list of typed variables.
2005-11-20 13:14:17 +00:00
rillig
99e0d66756 Updated lintpkgsrc to 4.43.1.
- In BATCH mode, that is for the bulk builds, hardcode PKGSRCDIR as
  /usr/pkgsrc. Otherwise take ${PKGSRCDIR}.
2005-11-20 10:55:43 +00:00
rillig
316a73bcbe Oops, covered the tracks from last-minute tests. 2005-11-19 17:23:49 +00:00
rillig
562cdf5268 Updated pkglint to 4.43.
Changes since 4.42:
- Reduced the number of duplicate diagnostics when checking multiple files.
  Only diagnostics concerning the current package are printed.
- Added checks for EXTRACT_SUFX and PKG_INSTALLATION_TYPES.
- Added a work-around for the PHP patches warnings.
- PERL5_PACKLIST should not contain references to other variables.
- Added the -s|--source command line option to show the code along with the
  diagnostics.
- Fixed a bug in get_logical_line(); logical lines have not had their
  physical lines attached.
- Deprecated variables are not only checked when they are defined but also
  when they are used.
2005-11-19 17:22:21 +00:00
rillig
9e07829918 Updated pkglint to 4.42.2.
- Added a check that PERL5_PACKLIST does not contain references to other
  variables. Some packages have ${PERL5_SITEARCH} in it, which results in
  a double slash, and the CHECK_FILES framework cannot handle this.
2005-11-19 13:34:41 +00:00
rillig
e60dd8de73 Updated pkglint to 4.42.1.
Added a work-around for the warnings from PHP modules when including
lang/php/ext.mk.
2005-11-15 03:10:20 +00:00
rillig
fcc9603807 Don't hide errors in the post-install stage. 2005-11-15 01:55:53 +00:00
rillig
57807fc95b MANINSTALL is a user-settable variable and thus must not be defined by
the package Makefile.
2005-11-15 01:55:00 +00:00
rillig
b4f8c1132f Updated pkglint to 4.42.
Changes since 4.41:
- In .mk files, line continuations are properly handled.
- An open bracket is allowed in variable and tool names.
- Added checks for ALTERNATIVES and INSTALL/DEINSTALL files.
- By default, don't check files in ${FILESDIR}.
- Warn about unknown file and directory names.
2005-11-14 11:45:52 +00:00
rillig
bc0aa35a22 Updated pkglint to 4.41.
- Documented the --recursive option.
- Added an option -Cmk for checking .mk files besides buildlink3.mk.
- pkglint can handle individual files on the command line, not only
  packages. (experimental)
- Replaced checkfile_buildlink3_mk() with checkfile_mk().
- Factored out the checkfile() subroutine from checkdir_package().
2005-11-14 04:05:22 +00:00
rillig
273de48d5a The exitcode from running pkglint in the post-install target is ignored,
since the pkglint Makefile sets MANINSTALL but shouldn't, as this
variable is intended to be user-defined. This is only a work-around,
which needs to be addressed properly for the other packages setting
MANINSTALL, too.
2005-11-13 17:39:05 +00:00
rillig
72aa168b19 Updated pkglint to 4.40.
- Removed all references to the build-time pkgsrc directory, ${PKGSRCDIR}.
  This makes the binary package independent of the build location.
  Fixes PR 32006.
2005-11-10 14:30:56 +00:00
rillig
f619b2875c Updated pkglint to 4.39.
Changes since 4.38:
- Disabled the check on Makefile variable order, as the discussion on
  tech-pkg has not finished yet.
- Improved detection of valid tool names.
- Improved detection of direct use of tool names. (Less false positives.)
- Improved the diagnostics for direct use of tool names.
2005-11-10 11:03:57 +00:00
rillig
b0884ccf36 Updated pkglint to 4.38.4.
- Improved detection of valid tool names.
- In the post-install target, output does to stderr instead of stdout.
2005-11-10 10:26:46 +00:00
rillig
20e8563c6a Removed the -l command line option from lintpkgsrc(1). Use "pkglint -r"
instead.
2005-11-08 23:05:22 +00:00
rillig
b0ee766802 Updated pkglint to 4.38.2.
- pkglint(1) does not use the hard-coded PKGSRCDIR anymore.

This fix is related to PR 32006, but doesn't fix it, since the PR is
about lintpkgsrc(1), not pkglint(1).
2005-11-08 22:55:22 +00:00
rillig
b9cc275c78 Updated pkglint to 4.38.1.
- It is an error if packages define a variable whose name starts with an
  underscore.
- Removed the (vague) "wip" check, as it has been replaced by special checks for
  DEPENDS and .include directives.
- Disabled the check for variable ordering until the discussion on tech-pkg
  has led to any results.
2005-11-08 21:09:48 +00:00
rillig
7428daea90 Updated pkglint to 4.38.
- PKGNAME is checked for being a valid package name.
- PLIST files should not contain filenames that match */CVS/*.
- Completely rewrote the check for variable ordering. The new code
  operates on a data structure that's easily understandable and
  extendable (see the source for an example). It also generates greatly
  improved diagnostics. As the old code had been enabled only when
  checking with -Wvague or -Wall, it has been seldom used anyway.
2005-11-07 00:45:01 +00:00
rillig
5bcd0d42ba Updated pkglint to 4.37.2.
- Removed the hard-coded values for valid tool names.
  The detection is good enough.
- Make sure that the domain part NetBSD.org is written like this
  in mail addresses.
2005-11-05 11:02:53 +00:00
rillig
1665492f83 Updated pkglint to 4.37.1.
- Improved detection of valid tool names.
2005-11-04 22:54:59 +00:00
rillig
26fbd1036b Updated pkglint to 4.37.
- Added checks for TOOL_* variables.
- Added {pre,do,post}-extract to the list of valid stages.
- Fixed the regular expression for detecting tool names.
- Added a check for invalid syntax in tool names.
- Improved the diagnostic for enumerations.
2005-11-04 20:39:49 +00:00
rillig
0e8bf529d9 Updated pkglint to 4.36.1.
- Added many of the variables found in pkgsrc/mk/* to makevars.map.
- Added the function log_fatal, whose output goes to stderr instead of
  stdout.
- All files in pkgsrc/mk/ are excluded from checking, as they may use
  private variables and do other questionable things.
- Removed the Language type, as it is a simple enumeration.
- Added the Userdefined type to distinguish user-definable and read-only
  variables.
2005-11-04 17:00:58 +00:00
rillig
84dc0f88aa Updated pkglint to 4.36.
Implemented checking for enumeration types. Added new types Filemask,
Filename, Language, Option, Pathmask, Pathname, Stage, Varname and
WrksrcSubdirectory. Made the check for URLs stricter. Added some
variables to the makevars.map file.
2005-11-04 13:57:35 +00:00
rillig
916d79ef91 I knew there had been a program that uses the (now removed) -Wno-workdir
option. I just didn't think it was pkglint itself. :)
Thanks to Martti for notifying me about that.
2005-11-04 10:09:13 +00:00
rillig
4478d43858 Updated pkglint to 4.35.
Removed the -Wworkdir option. Added an --import option that replaces
-Wworkdir. Changed the warning about uncleaned work* directories into an
error. Updated the man page.
2005-11-04 09:32:03 +00:00
rillig
b50c1b58d7 Updated pkglint to 4.34.
Fixed the --autofix handling of category Makefiles. Added an --import
option that helps importing packages from pkgsrc-wip. When checked with
--import, the package is checked as if it weren't part of pkgsrc-wip.
2005-11-04 08:40:59 +00:00
rillig
fb6d872ea2 Updated pkglint to 4.33.1.
Fixed undefined behavior when reading a file that ends in a continuation
line. Any use of ${WRKSRC}/.. is considered an error, as ${WRKSRC} is
meant to point to the top of the build directories. A proper combination
of WRKSRC, CONFIGURE_DIRS and BUILD_DIRS should be used instead. Sorted
the makevars.map file and added SUBST_CLASSES.
2005-11-03 18:49:32 +00:00
rillig
6030a9b69a Updated pkglint to 4.33.
Changes since 4.32.2:
  - Added checks for CATEGORIES.
  - Modernized checks for DEPENDS and BUILD_DEPENDS.
  - Simplified PLIST directive checks.
2005-11-03 12:35:05 +00:00
rillig
61d017f3a0 Updated pkglint to 4.32.2.
Added a check for invalid uses of MASTER_SITE_* variables.
2005-11-01 23:08:42 +00:00
rillig
7024427060 Updated pkglint to 4.32.1.
Added type check for USE_TOOLS. Fixed false warning about direct use of
tools in comments.
2005-11-01 21:39:31 +00:00
rillig
438ad41261 Updated pkglint to 4.32.
The --autofix support has been rewritten to be more easily usable.
Automatic fixes are currently restricted to the sort order of SUBDIR
entries in category Makefiles. It had been the complete category
Makefile before. Added a new diagnostic, prefixed with "NOTE:", that is
used for important informational diagnostics, for example autofixed
files.
2005-11-01 01:08:38 +00:00
rillig
6b5a2446b0 Updated pkglint to 4.31.2.
Added the expected and actual checksums to the diagnostics if they
differ for patches.
2005-10-30 23:09:40 +00:00
rillig
41fe22047c When checking Makefiles, get rid of the "physical" lines as soon as
possible and base all other checks on the logical lines. The physical
source lines are saved literally to make implementing the --autofix
option easier.
2005-10-30 22:11:38 +00:00
rillig
ec7b393671 Updated pkglint to 4.31.
Changed the names of the datatypes (Yes_Or_Undefined => Yes, Boolean =>
YesNo, Integer => PkgRevision) in makevars.map. It is now an error if
PKGREVISION appears outside a package Makefile. Improved detection of
Makefile.common. Improved wording of the warning for relative
directories in the form ../package.
2005-10-26 23:17:49 +00:00
rillig
5219926c41 Updated pkglint to 4.30.
Rewrote the typechecking code for Makefile variables. The variable
definitions are extracted from logical lines instead of physical lines,
comments are separated from actual values, for Lists of something, each
something is checked. All URLs are subject to MASTER_SITES expansion.
MASTER_SITES is checked to be a List of URLs.
2005-10-24 23:54:37 +00:00