Pkglint needs goyacc, which is provided by devel/go-tools. But that
packages pulls in a lot of dependencies that are not needed for pkglint.
This includes a Perl interpreter and various cryptography packages.
Instead, during build, pkglint installs the only needed tool of that
collection (goyacc).
Since go-package.mk assumes that each pkgsrc package only downloads and
installs a single project, but pkglint now needs two of them (goyacc and
pkglint), most parts of go-package.mk had to be copied here and
implemented directly.
Changes since 5.6.5:
- Removed plist-clash since it had crashed unconditionally whenever it
was called. This means that in the last 3 years, nobody can have
used it in the originally intended way.
- Fixed interactions between the --source, --explain, --show-autofix,
--autofix and --only options.
- Fixed "defined but not used" and "used but not defined" for variables
from the pkgsrc infrastructure.
- Lots of small fixes and improvements found by the large pkglint code
review (12% done).
Changes since 5.6.4:
* GCC_REQD should only contain the major version. For GCC versions up to
4.x, this consists of the first two numbers, such as 4.8, while starting
with the 5.x series, the major version is only the first number, such as
7.
Changes since 5.6.3:
* Allow += for COMMENT
* Sync variable type definitions with reality
* Fix check for "used but not defined" variables. This check had been
broken since pkgtools/pkglint/files/pkglint.pl r1.776 from 2008-10-18
(3cd071958e), which missed its 10-year anniversary by just 9 days.
After fixing this check, pkglint produces about 800 new warnings
spread all over pkgsrc, most of which are real typos.
* Detect used variables also in .if and .elif conditions. This is
closely related to the above fix and reduces the number of "defined
but not used" variables, while at the same time producing new warnings
because these variables are used at load time, where some of these
variables are not yet defined.
* Detect variables for which pkglint doesn't know the exact data type
by scanning all files under mk/ at startup. Currently there are about
470 of these variables. No "used but not defined" warnings are issued
for these variables anymore.
* To speed up pkglint when checking the whole pkgsrc tree at once, the
most often needed files are cached to reduce IO load. The checks for
USE_TOOLS are optimized now since they were a major bottleneck.
Together with other performance improvements this makes pkglint about
50% faster when checking the whole pkgsrc tree including pkgsrc-wip.
Changes since 5.6.2:
* Add check for version patterns 1.5*, which should rather be 1.5.*
* Re-enable check for "set -e" and commands that may silently fail
because of missing error checking
* Lots of internal clean-up and tests
Changes since 5.6.1:
* Improved checks that depend on whether bsd.prefs.mk is included or
not.
* Improved checks for tools, whether they may be used at load time
or at run time.
* Improved tokenizer for shell commands. $| is not a variable but a
dollar followed by a pipe.
* Warnings about SUBST context are now shown by default.
* A warning is shown when a SUBST block is declared for *-configure
but the package has defined USE_CONFIGURE=no.
* Don't warn about USE_TOOLS:= ${USE_TOOLS:Ntool}.
* Don't warn about using the ?= operator in buildlink3.mk files before
including bsd.prefs.mk (for some more variables, but not all).
* Report an error for packages from main pkgsrc that have a TODO or
README file. Packages should be simple enough that they don't need
a README file and ready for production so that they don't need a TODO.
* Lots of small bug fixes and new tests.
Changes since 5.6.0:
* Fix output of relative paths in the diagnostics (thanks @wiz)
* Fix parsing of ${VAR:ts---}; it is now a syntax error
* Load more type definitions from mk/* instead of hard-coding them
* Lots of refactoring to improve test coverage, fixing several
small bugs as they were found
Changes since 5.5.16:
* Check for negated shell commands (if ! test -z "foo"); they are not
supported by Solaris.
* Don't check variable permissions for infrastructure files. A warning
like "may not be set by any package" doesn't make sense for them.
* Check that PLIST_VARS matches PLIST.*, which is especially useful in
options.mk files.
* Improve checks for options.mk files (for PKG_OPTIONS_SET).
* Prefer options handling with !empty() over checking empty() first.
* Prefer ${MACHINE_ARCH} == i386 over !empty(MACHINE_ARCH:Mi386), for
single-valued variables.
Changes since 5.5.15:
* Add checks for options.mk files
* Treat redundant variable definitions as notes, not as warnings
* Check doc/CHANGES-* for typos in the dates (only for 2018 and later)
* Lots of cleanup in the test code
Changes since 5.5.14:
* Check that the comments in .endif and .endfor lines match the
corresponding conditions.
* Check for redundant variables (e.g. MASTER_SITES for R packages).
* Check for accidentally overwritten variables.
* Miscellaneous code cleanup and refactoring.
Changes since 5.5.13:
* Suppress duplicate warnings for unknown options in the same file
* Grab acceptable package versions directly from the infrastructure files
* Note about too deeply indented shell programs
Changes since 5.5.12:
* Allow underscore in package version.
* Warn about SUBST in post-patch and pre-patch phases.
* Allow multiple SUBST blocks per paragraph.
* Code cleanup.
Changes since 5.5.9:
* Fix wrong pkglint behavior for .include lines that are guarded by
corresponding .if exists(...)
* A little bit of refactoring, as always.
Changes since 5.5.8:
* Improved support for the "strip" tool, which has a special definition
and is not directly connected to the STRIP variable.
* Miscellaneous code cleanup and new tests.
The definitions from globaldata.go had been moved to pkgsrc.go. Having
these definitions twice led to compile errors.
While here, the file package_test.go doesn't need to be patched anymore
since it gets its @VERSION@ from the constants defined in pkglint.go.
Changes since 5.5.6:
* When pkglint warns about files that are accidentally executable, it
offers to fix the file permissions.
* Warn about ${HOMEPAGE:=repository/}, since the := modifier should
only be used with MASTER_SITES.
* When the distinfo file is missing, suggest setting NO_CHECKSUM.
* Several refactorings.
Changes since 5.5.5:
* Only offer explanations if an explainable diagnostic has actually
been logged.
* Clean up code.
* Improve a few diagnostics.
* In any Makefile, treat documented variables as used. This prevents
warning about defined but unused variables.
* Add support for some variables not previously known to pkglint.
Changes since 5.5.3:
- Removed check for PERL5_PACKLIST, since it was not fixable by the
package author.
- Completely rewrote the check for ordering variables in simple
package Makefiles. Now it reports the variables in the correct order
instead of just saying "this above that" for a few variables.
- Lots of code cleanup and documentation.
Changes since 5.5.2:
* Fixed lots of bugs regarding autofixing variable assignments in
continuation lines.
* Fixed checking of MESSAGE files, which also get fixed now.
* In variable assignments, commented assignments are aligned too.
* Fixed a crash when checking an empty patch file.
* The :Q modifier is only checked on predefined variables, to prevent
the --autofix mode from removing :Q from user-defined variables.
* Fixed lots of bugs in PLIST autofixing: relevant lines had been
removed, and the sorting was not correct.
Changes since 5.5.1:
* Fixed command line parsing for the --only option.
* Improved alignment of variable values in Makefiles.
* Code cleanup: better abstraction in the tests.
Changes since 5.5:
* Allow filtering log messages by keyword (--only)
* In --autofix and --show-autofix mode, show only fixable diagnostics
* When called with --source, show the source below the diagnostics
* Don't warn about USE_LANGUAGES in ../../mk/compiler.mk
* Fix autofix for .gz in PLIST
Changes since 5.4.26:
SUBST blocks are now checked correctly even if they contain conditionals
like .if ... .elif ... .endif.
AUTO_MKDIRS is only suggested for those directories that actually appear
in the PLIST since other directories are not affected by this variable.
Changes since 5.4.25:
* When autofixing a patch, fix the corresponding distinfo file as well.
* Properly parse ${VARNAME:[\#]};
the # was interpreted as a comment before.
* Don't add unnecessary :Q to PKG_OPTIONS and related variables.
* Don't warn about missing manual pages. While Debian and other
distributions do this work, pkgsrc keeps the packages as original as
possible.
* Autofix redundant ".gz" for manual pages in PLISTs.
Changes since 5.4.24:
* More specific warning for "exitcode with pipe shell commands"
* Don't warn that the echo in "echo | sed" could fail
* Allow packages to define custom make targets
* Don't warn about a misplaced LICENSE when a package doesn't define it
* Skip .git directories
* Reduce number of hicolor-icon-theme error messages in PLIST files
* Remove MKCRYPTO, USE_CRYPTO, CRYPTO variable definitions
Changes since 5.4.22:
Only autofix PLIST sorting in simple cases. Before this version, pkglint
sorted the PLIST even when it contained unresolved variable references like
${IMAKE_MAN_DIR}, which resulted in strange and unintuitive orders. These
complicated files are left for human inspection.
Changes since 5.4.21:
* Refactoring: moved packages line and linechecks back into main
* Fixed panic when autofixing package Makefiles
* Removed apache22
* Added a bit of inline documentation