Age | Commit message (Collapse) | Author | Files | Lines |
|
- 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.
|
|
Changes since 4.47:
- Output warnings for partial RCS tags in patch files.
- Added many warnings concerning Makefile directives and make targets.
|
|
*.mk file is checked.
- Added warnings for unusual make targets. Everything except the usual
{pre,do,post}-* targets is considered unusual. Exceptions may be declared
in the Makefile using ".PHONY".
- The directives are checked to contain arguments if and only if needed.
- The .ifndef and .ifdef directives are marked as deprecated because
the parsing algorithm of NetBSD's make is so bad that it cannot
distinguish ".if" from ".ifdef".
- Added notes whenever ".undef" is used with a variable that had been used
in a ".for" loop before. Undefining the variable is simply unnecessary.
|
|
partial tags like $NetBSD:... that don't have a trailing "$".
|
|
|
|
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.
|
|
changed since that time.
|
|
|
|
check had been removed some time ago due to the huge number of false
positives. Now that pkglint can parse shell commands quite well, it
has been reintroduced, as absolute pathnames often indicate unportable
features of a package. To implement this check (and a few others)
accurately, the whole code for checking shell commands has been
rewritten as a finite state machine.
|
|
two different kinds of tools in pkgsrc, which need different checks.
|
|
warnings that LIST+=FOO=${FOO} should rather be LIST+=FOO=${FOO:Q}.
The cause was that I had added a capturing group in a regular
expression that also contained a back reference (\2). Adjusted the
back reference to \3. (This is the only place in pkglint where such
back references are used, so I don't have much experience with them.)
|
|
- The macro __sparc__ should be replaced with __sparc, so that the code
works with SunPro, too.
|
|
|
|
names of tools instead of the tool variables.
|
|
|
|
Update provided by the maintainer in PR 32189. He says that version 0.2
does not work anymore.
|
|
defined. Changes approved by grant.
|
|
|
|
matches.
|
|
- 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.
|
|
- Added an explanation for invalid PlatformTriples.
|
|
- Made pkglint's wording more polite ("Use" => "Please use").
|
|
- Improved diagnostics for URLs that are not strictly pkgsrc-compliant, as
requested on tech-pkg.
|
|
|
|
- Marked ALLFILES as deprecated.
- Degraded white-space warnings to notes.
- Added many explanations for the diagnostics.
|
|
|
|
- Removed the unused variable $opt_explain. It should really have been
PkgLint::Logging::set_explain().
- In accordance to my personal idea of beauty, the --explain messages are
indented as deep as the last diagnostics, and not by a single "\t".
|
|
files. New TODO items:
* extract the DISTFILES if they exist and check all files in them for:
- security holes,
- coding style violations,
- possible unportable constructs
|
|
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.
|
|
:M*:Q instead of a simple :Q. Currently only the GNU configure
scripts need the white-space stripped, so it's enough to quote
those (see regex_gnu_configure_volatile_vars in the source).
|
|
- 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.
|
|
|
|
- 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.
|
|
Addresses PR#32149
|
|
|
|
CFLAGS=${CFLAGS}, check for the correct modifiers. The above is
obviously not correct, as CFLAGS may contain white-space.
CFLAGS=${CFLAGS:Q} is also a little wrong in that it may contain leading
and/or trailing white-space, which must be discarded, too, because the
broken GNU configure scripts cannot handle them correctly. This can be
done using ${CFLAGS:M*:Q}, which first splits CFLAGS into a list of
shell words, then selects all of them and finally combines the words
forming a nicely formatted string without leading and trailing
white-space where all entries are separated from each other by a single
space.
|
|
- 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.
|
|
and add PAX_CMD fallback macro.
|
|
problems. Instead, use exec*() functions.
Replace PUSHOUT() macro and string buffers with a function that
operates on data structures.
If it is necessary to copy files into place from staging area, then use
pax to copy them.
Add functions in pexec.c to create a pipe for sending data to a child
process. Replace pipe code in create/perform.c with these functions.
Use these functions instead of command-line arguments when copying files
into place from staging area.
Three system() references remain: @exec, @unexec, and vsystem().
|
|
- 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.
|
|
|
|
|
|
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.
|
|
Renamed some subroutines to fit into the general scheme.
|
|
depending on this option have been converted to modern code, although it
can still be improved.
|
|
that occur during "cvs update"s.
|
|
- 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.
|
|
|
|
|
|
- In BATCH mode, that is for the bulk builds, hardcode PKGSRCDIR as
/usr/pkgsrc. Otherwise take ${PKGSRCDIR}.
|