Changes since 19.3.16:
Pkglint now handles SUBST blocks correctly, even those in which some of
the variables are defined conditionally. It correctly reports those that
are missing in at least one of the possible branches.
PKG_JVM is no longer marked as deprecated. It was once package-settable.
Since 2002 it is system-provided, and the package-settable counterpart
is PKG_JVM_DEFAULT. This does not fit into pkglint's simple model of
deprecating variables since the variable name is still valid, it should
just not be defined by packages anymore.
The alignment of variable assignments has been fixed in some edge cases.
In continuation lines where the backslash is beyond column 72, the
whitespace before the continuation backslash is fixed to a single space.
Changes since 19.3.12:
The command line option -Wspace has been removed. Warnings and notes
about whitespace are now generated by default and cannot be switched
off. This is to ensure a consistent visual appearance of the package
Makefiles.
Shell programs that are indented unnecessarily deep generate a note by
default now. Before, the option -Wall was necessary to get these notes.
The check for unintended comments in multi-line shell programs is now
enabled again. It had been disabled some time ago as byproduct of a bug
fix in the shell parser.
The check for unique buildlink3 package identifiers now also works if
pkglint is run from a package directory instead of the pkgsrc root
directory.
Changes since 19.3.11:
The command line option -Wstyle has been removed since it didn't have
any effect.
License names may contain underscores. This fixes 3 parse errors and 2
wrong notes about seemingly unused licenses.
The parser for Makefile variables has been improved for some edge cases.
The :M and :N modifiers behave surprisingly when they contain unbalanced
parentheses or braces. Pkglint now parses them in the same way as bmake,
but doesn't warn since these cases are not actually used in pkgsrc.
Changes since 19.3.10:
The check for buildlink3.mk files that are included conditionally in one
place and unconditionally in another place have been refined. Now they
also work in cases that do not involve any variables, such as when the
condition is a mere exists(filename).
References to variables that use parentheses instead of the usual braces
produce a warning now, even if pkglint cannot fix them automatically.
This affects only a few instances where more than one such variable
reference appeared in a single line.
The --log-verbose command line option has been removed since it does not
have any practical use other than improving the performance during
pkglint development itself. Because of that it hadn't even been
mentioned in the manual page.
Warnings for missing license files now report the path to the license
file relative to the line where the warning occurs, like everywhere
else.
Changes since 19.3.9:
In diagnostics for suggested package updates, the exact line of doc/TODO
is mentioned. If a suggested update has an additional comment, the
brackets around that comment are not output anymore.
The check for defined but not used variables has been improved for the
edge case of defining a variable in the package Makefile and using it
in the buildlink3.mk file of the same package, which just doesn't work.
Makefile fragments in patches/ directories are now completely ignored.
It was a hypothetical case anyway.
Comparing PKGSRC_COMPILER using the == or != operators is now considered
an error instead of a warning. The common cases can be autofixed.
Changes since 19.3.8:
Match man pages in ALTERNATIVES with their counterparts in PLIST. In
PLIST files, ${PKGMANDIR} may be abbreviated as a simple "man", but not
in ALTERNATIVES.
Changes since 19.3.6:
Improved variable value alignment.
Fixed wrong warning about comment lines that were interpreted as shell
commands before.
Warn when the first category of a package doesn't correspond to the
path in the filesystem. This affects 603 packages.
No longer warn about deprecated BUILDLINK_TRANSFORM.${OPSYS}. The
deprecation warning was meant for BUILDLINK_TRANSFORM.${pkgbase}, but
since pkglint cannot distinguish between these, the warnings were wrong.
Changes since 5.7.24:
* There is no need to ask the dummy MAINTAINER from url2pkg whether
committing changes is ok.
* When autofixing a condition like !empty(PKGPATH:Mliteral), don't
generate unnecessary parentheses around ${PKGPATH} == literal.
* In a _VARGROUPS section, the public variables should be listed
before the private variables, to put important things first.
* When pkglint suggests to be run again with the -e, -fs or -F options,
repeat the whole command line, to allow for copy-and-paste.
* The checks for PKGPATH are fixed and enhanced. It is not a relative
path like in ../../category/package, but relative to the pkgsrc root.
* Unintended file globbing in sed commands such as s,.*,any, gets a
warning.
* MASTER_SITES should normally end with a slash, in rare cases an
equals sign or a colon are correct, too.
* Detect redundant directories in INSTALLATION_DIRS.
Changes since 5.7.15:
* Completely rewrote the code for aligning multiple variable assignment
lines. It works on the actual lines of the file now instead of the
parsed lines. This provides more exact diagnostics and also makes the
handling of these lines easier so that future requirements can be
implemented more easily.
* Added support for exotic conditions in .if clauses. These conditions
are not seen in the wild though.
* Fixed wrong diagnostics for ALTERNATIVES files that appear
conditionally in the PLIST.
* As always: lots of refactorings and newly added tests.
Changes since 5.7.1:
* Fixed detection of GNU_CONFIGURE=yes combined with USE_LANGUAGES
missing c. This combination tends to fail in the configure phase.
* When the distinfo doesn't contain all hashes for the downloaded
distfiles (typically SHA512 is missing) and the distfiles are actually
downloaded to ${PKGSRCDIR}/distfiles, pkglint can now add the missing
hashes. It only does this if there is at least one existing hash
and if all existing hashes are correct.
* The check for redundant variables has been improved considerably.
Before there were several situations in which pkglint didn't get the
redundant variable definitions right because its internal model only
mimicked reality. The model has been improved and so have the
diagnostics.
* Pkglint only warns about wrong permissions (for defining or using
a variable) when it knows the type of the variable and the permissions
for the current file. Before, it had also warned if the permissions
for the current file were not explicitly defined.
* CFLAGS and LDFLAGS may be appended in buildlink3.mk files. This
had been disallowed before, for no apparent reason. There are several
places in pkgsrc where especially CFLAGS.${OPSYS} is appended to.
* Cleaned up internal handling of relative paths. Previously pkglint
sometimes resolved relative paths using the wrong base directory,
which led to all kinds of wrong warnings and strange behavior.
* Fixed lots of edge cases when parsing Makefile lines. These cases
don't occur often but experience tells that the most fundamental code
must be as correct as possible (see the handling of relative paths
above).
* Lots of refactoring and housekeeping, as always.
Changes since 5.6.12:
* Many of the -C and -W command line options have been removed since
they are not used in practice. The -Wall and -Call options continue
to work though; these are the only options mentioned in the pkgsrc
guide.
* When a PLIST file contains redundant libtool libraries (.la and the
corresponding .so), there is only a single warning per file.
* Warnings about the package COMMENT are now strictly ordered from left
to right.
* The hashes for all distfiles must now contain the SHA512 hash. This
hash has been added to many distfiles in 2015. It's time now to
enforce it on all other distfiles as well.
* Makefile fragments that are included inside an .elif exists(...)
are not reported as missing.
* The check for redundant variables and accidentally overwritten
variables has been improved. Now the warning occurs at the later
definition. This especially applies to cases where a file is included
and after that, some of its variables are overridden. Variables in
unrelated files are no longer marked as redundant.
* When a package contains multiple definitions of a single variable
(typical for Makefile.common), the later definition overrides the
earlier definition. That way, the location of DISTINFO_FILE and
PATCHDIR is resolved correctly.
Changes since 5.6.8:
* In addition to the pkglint binary, the whole pkglint code is installed as
a library, so that other packages can use the code for doing their own
checks on pkgsrc packages, Makefiles, shell programs, or the other file
types from pkgsrc.
* BUILDLINK_*.* may be used in all files.
* Lots of refactorings
Changes since 5.6.6:
User-defined variables that are not yet added to BUILD_DEFS are only
reported once per file.
Unnecessary space after variable names is only worth a note instead of
a warning. Example:
MASTER_SITES = https://cdn.example.org/
All variable names that are defined in the pkgsrc infrastructure are
assumed to be available to the package Makefiles. This reduces the
number of wrong "used but not defined" warnings, at the expense of
Variable names that are used in other variable names are checked
whether they are defined somewhere. Example:
CFLAGS+= ${CFLAGS.${PARAM}} # PARAM is now checked
In SUBST_SED, when the pattern is s,@VAR@,${VAR}, or a slight variant
thereof, pkglint suggests to define SUBST_VARS instead, which frees the
package author from thinking about how to escape special characters and
is generally easier to read. Example:
SUBST_SED.class= s,@VAR@,${VAR:Q},
SUBST_VARS.class= VAR
Directives like .if !defined(...) are now handled the same whether or
not there is a space after before the (...).
The check for locally modified files now works independently of the
timezone.
As always, lots of refactorings have happened under the hood. Many small
bugs have been discovered and fixed accordingly.
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.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.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.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
Changes since 5.4.15:
* updated vardefs from mk/defaults/mk.conf from v1.118 (2006) to v1.269
Gone:
* PKG_SUFX
* USETBL
* PKGSRC_SHOW_PATCH_ERRORMSG
* USE_XPKGWEDGE
* PKGVULNDIR
Adjusted:
* USE_GAMESGROUP
* BIN_INSTALL_FLAG -> BIN_INSTALL_FLAGS
* fixed license parsing to be more realistic
(the previous version didn't handle parentheses correctly)
* lots of housekeeping
* moved some code to separate packages, allowing re-use
* separated Line checks into LineChecker type
* separated MkLine checks into MkLineChecker type
* made Line an interface, for further refactorings