Commit graph

356 commits

Author SHA1 Message Date
rillig
15030772f7 No substitutions are needed for the pkglint manual page.
Re-added a post-install selftest to detect syntax errors in pkglint.pl.
2007-01-06 13:31:26 +00:00
joerg
1f50db5f15 PostgreSQL-7.4 support is about to be removed. 2006-12-27 15:52:16 +00:00
joerg
f3a63b6466 DESTDIR support. 2006-12-15 17:35:20 +00:00
joerg
5a7018c831 Add PKG_DESTDIR_SUPPORT to variable list. Bump to 4.73. 2006-11-01 09:14:45 +00:00
abs
2486f53002 Update to 4.72: check for .tbz as well as .tgz 2006-10-23 09:19:31 +00:00
abs
dd11e141d0 Update pkgtools/pkglint to 4.71 - lintpkgsrc changes:
- Handle 'badly named' patch files
  - In the event of a distint checksum mismatch, report the affected file
    as well as package
  - If we need to call out to make to parse a makefile and it returns any
    errors, ensure we prefix the error output with the Makefile path
  - run through perltidy. Ugly, but consistent
2006-10-02 19:35:43 +00:00
joerg
1f696545c6 De-recognise XFree86. Update to 4.70. 2006-09-27 15:10:45 +00:00
rillig
bf5a09954a Updated pkglint to 4.69.
Changes since 4.68:
- Improved the checks for BUILD_DEFS.
- Improved the shell word parser.
- Improved the heuristics for detecting absolute pathnames.
- The :M* operator is only required with GNU configure scripts.

Committed during the freeze to have a unique version number that includes
the features from the last days.
2006-09-16 15:43:01 +00:00
rillig
74a427c66c Updated pkglint to 4.68.
Changes since 4.67:
- Adjusted to the ongoing changes in the pkgsrc infrastructure.
- Many small improvements in the makevars.map file.
- Stricter checking of dependency patterns, to catch foo-*.
- Small improvement on the use of stack space due to complicated regular
  expressions.
- Many more absolute pathnames are found in patch files, no matter which
  type of file is patched.
- All user-defined variables that are used should be added to BUILD_DEFS.
- All packages that set GNU_CONFIGURE are assumed to need a C compiler.
- Instead of ${TOOL}, tool may be used directly, since the tool wrappers
  are installed very early in the build process.
- Removed the --debug option.
... and many more.
2006-08-04 18:41:11 +00:00
rillig
6a81ee9262 Updated pkglint to 4.67.
Changes since 4.66:
- Fixed the stack overflow in Perl in long variable assignment lines.
- Improved the SUBST check.
- For all files in bin/ and sbin/, pkglint now complains if the package
  does not have a manual page, too. (Only with -Wextra)
- Lists of pathnames may be used in .for loops, since they are _assumed_
  to not contain any additional white-space.
- Some more small improvements.
2006-07-15 07:02:11 +00:00
jlam
cf56f31e09 In URLs, the "NetBSD" should be capitalized as such, i.e. "NetBSD.org",
not "netbsd.org".
2006-07-06 21:14:19 +00:00
rillig
f8102338f3 Updated pkglint to 4.66.
This change includes all the things I thought of during the freeze of
2006Q2.

Some variables have disappeared from pkgsrc without notice. Marked them
deprecated to help the package authors at least a bit.

Renamed some ACL abbreviations in makevars.map and adjusted the variable
definitions.

Added the command line options -Dtrace, -Dunchecked and -Dunused.

Some variables may contain unexpected white-space and therefore should
not be used in .for loops.

The -Dmisc option replaces the --verbose option (and the log_info
subroutine), which does not exist any longer. This eliminates all
instances of "OK:" from the output, which I didn't like from the
beginning. The -Dmisc option also takes over many warnings that have
been issued by --debug before.

Improved the check for absolute pathnames. Especially, everything that
follows ${DESTDIR} or $(DESTDIR) in a Makefile is considered an absolute
pathname. This reveals many wrong uses of DESTDIR (as defined by the GNU
coding standards), for example $(DESTDIR)/$(prefix), which should be
$(DESTDIR)$(prefix) instead.

Almost every use of a make(1) variable is checked for spelling mistakes.
Before, only the definitions of variables have been checked.

Restricted the use of variables to specific files, which are defined in
makevars.map. This catches especially buildlink3.mk files with
unexpected side effects.

In shell commands, neither "echo" nor "echo -n" or "${ECHO} -n" should
be used. Since the INSTALL_*_DIR commands can only handle one directory
at a time, suggest to use INSTALLATION_DIRS instead.

Greatly improved the checks for dependency specifications, especially to
find foo-*, which should rather be foo-[0-9]*.

Fixed the incorrect handling of LICENSE_FILE (now using $line->text
instead of $line).

Improved the wording of the "plural names" warnings, so that for known
variables it is "The += operator should only be used with lists." now.

In buildlink3.mk files the uppercase and lowercase names of the package
should correspond with the package name. This catches many
copy-and-paste mistakes. Fixed many null pointer exceptions as well. In
addition, every buildlink3.mk file needs a definition of
BUILDLINK_API_DEPENDS.

In patch files, absolute pathnames and unportable macro names are
checked not only in added lines, but also in the context lines.

In the pkgsrc root directory and the category directories, the Makefiles
are checked like every other Makefile, too.

Fixed the place where the global variables for the package context are
defined and later undefined.

Variables that are mentioned in EVAL_PREFIX may be used in the current
file and are not flagged as "used but not defined".

When parsing shell words in Makefiles, recognize $<, $@, $^ and $/.
(The latter is used extensively by openoffice to represent a directory
separator.)

Fixed some minor bugs:
* $makevar had been defined unintentionally by using the -> operator.
2006-07-02 09:47:17 +00:00
rillig
a8deb9011f Updated pkglint to 4.65.
Changes since 4.64:
- Many refinements of quoting checks and variable type definitions.
- Improved the wording of diagnostics and added some explanations.
- Adjusted pkglint to the many recent changes in the infrastructure part.
- Improved detection of absolute pathnames.

Updated during the freeze because the version number has not changed for
two weeks, but many features were added. Therefore the old version
number was not reliable for determining the real functionality of
pkglint exactly.
2006-06-22 07:53:09 +00:00
rillig
ec002f76a4 I prefer #none over #empty in USE_LANGUAGES. 2006-06-09 10:27:09 +00:00
rillig
fcf3444e98 Updated pkglint to 4.64.
Changes since 4.63:

- Many diagnostics for the :Q operator have been wrong. They are currently
  left out, but will be re-added later. In the mean time, no diagnostics
  are better than wrong ones.
- Made defining the permissions for variables easier by providing a way to
  define "permission constants".
2006-06-06 05:36:40 +00:00
rillig
8ed8d63862 Updated pkglint to 4.63.
Changes since 4.62:
- Improved checking of variable permissions.
- Improved detection of unused variables, for spell checking.
- Added warnings for variables that are used at load time but should not.
- Much code cleanup.
2006-06-03 06:09:40 +00:00
rillig
79494065d4 Updated pkglint to 4.62.
Changes since 4.61:
- Bug fixes.
2006-05-16 22:18:59 +00:00
rillig
b9fd7c6af7 Updated pkglint to 4.61.
Changes since 4.60:
- Added ACL-based checks that restrict the files which may define
  variables.
- Many, many small improvements.
2006-05-13 11:58:25 +00:00
rillig
c9d4049caf clean up after doing a quick-install. 2006-05-10 15:42:03 +00:00
rillig
fff7c773b6 Updated pkglint to 4.60.
Changes since 4.59:
- For many variables the :Q operator is not needed (by definition), for
  example some pathnames, user names, group names.
- Improved the diagnostics for planned package updates.
- Various catch-ups to recent changes in the infrastructure, among them
  BUILDLINK_ABI_DEPENDS and gettext.mk.
- When the PLIST contains a libtool archive, the *.a and *.so files don't
  have to be mentioned explicitly.
2006-04-21 10:37:51 +00:00
rillig
fade1f44b0 Removed superfluous :Q operators. 2006-04-12 20:25:06 +00:00
rillig
2fbd4ebed2 Updated pkglint to 4.59.
Changes since 4.58:
- Improved checking of patch files.
- Adjusted the variable names to the recent pkgsrc changes.
- Print a note if the pkglint version does not match the one from the
  checked pkgsrc tree.
2006-03-14 14:24:14 +00:00
rillig
27f583a2a7 Updated pkglint to 4.58.
Changes since 4.57:
- New parser for patch files.
- New command line options -Wplist-depr and -Wstyle.
- Variable assignments are no longer allowed in variables that should only
  contain identifiers.
- builtin.mk files must not be included directly.
- Better checks for sed commands.
- Some commands like ktrace should never appear in Makefiles.
- The package version is compared to the requested update in file doc/TODO.
2006-03-01 22:19:13 +00:00
rillig
2d89c06d3b Fixed pkglint warnings. 2006-02-25 15:56:24 +00:00
adam
3b1e0a259d Added sed quotes 2006-02-25 09:45:38 +00:00
rillig
6edc959bd6 Fixed pkglint warnings. 2006-02-24 21:59:49 +00:00
reed
ed10e03e8b PKGMANDIR instead of "man".
(When do I use PKGMANDIR:Q or no :Q??)
2006-02-24 20:36:29 +00:00
rillig
897ff2b91f Updated pkglint to 4.57.
Changes since 4.56:
- Added warnings for variables that are defined, but not used. This is a
  simple spell-checker.
- Variables that appear as a single shell word should be quoted unless they
  have the type "List of something".
- Many small enhancements.
2006-02-18 12:24:22 +00:00
rillig
d62b095666 Updated pkglint to 4.56.
Changes since 4.55:
- Avoided false positive warnings about bsd.prefs.mk being required before
  using buildlink3.mk files.
- Restricted the files that are checked for absolute pathnames in patch
  files.
- Some tools that are often used as ${TOOLNAME} need to be explicitly
  added to the USE_TOOLS variable. When complaning about their direct
  use, add a proper advice.
- Readded all the deprecated variables. The warnings will have to stay
  longer than just three months.
2006-02-06 10:11:34 +00:00
rillig
8ade92fcb2 Updated pkglint to 4.55.
Changes since 4.54:
- -Wvarorder works now as expected.
- distinfo files are checked more strictly.
- Reduced the number of false positives.
- Make(1) variables of the form $(...) are detected properly.
2006-01-30 09:35:13 +00:00
rillig
482bedac8b Even in quick-install mode, the self test should be run. 2006-01-26 16:20:45 +00:00
rillig
95d3203cb2 Added a ``quick-install'' target that allows me to install pkglint in three
seconds instead of 40.
2006-01-25 22:04:26 +00:00
rillig
6abf92a1f4 Updated pkglint to 4.54.
Changes since 4.53:
- Added about 50 new variables to be type-checked.
- For unknown variables, the type is guessed from the variable name.
- In patch files that patch Makefiles, added lines are checked for
  absolute pathnames.
- Replaced the -Wdebug option with --debug, so that the debugging warnings
  don't show up when using -Wall.
- Many minor improvements.
2006-01-20 13:46:04 +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
e6e6cf9fb7 - Added plist-clash.pl to the list of files that have @PERL@ replaced. 2006-01-12 04:27:58 +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
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
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