summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
AgeCommit message (Collapse)AuthorFilesLines
2020-06-28pkgtools/pkglint: update version to 20.2.0rillig1-2/+2
No code changes. This is just to align the pkglint version number with the upcoming branch name.
2020-06-22pkgtools/pkglint: update to 20.1.19rillig2-2/+10
Changes since 20.1.18: Fixed a wrong warning about unknown buildlink identifier "lua" in mail/neomutt, reported by wiz.
2020-06-20pkgtools/pkglint: update to 20.1.18rillig9-108/+541
Changes since 20.1.17: Fixed the algorithm for checking whether two patterns overlap, such as MACHINE_PLATFORM:MNetBSD-[0-9].*-*. Fixed wrong warning about foreign variable in SUBST block, as seen in geography/qgis.
2020-06-17Revbump Go packages after Go 1.14.4 update.bsiegert1-1/+2
2020-06-14pkgtools/pkglint: update to 20.1.17rillig14-570/+1224
Changes since 20.1.16: Conditions that contradict each other in the same file are reported as errors. Inspired by lang/rust/Makefile r1.174.
2020-06-12pkgtools/pkglint: update to 20.1.16rillig18-155/+282
Changes since 20.1.15: When a package adds an additional version requirement for another package, it must do so using BUILDLINK_API_DEPENDS instead of BUILDLINK_ABI_DEPENDS. Most packages already do this. When a values is appended to an undefined variable using the += operator, bmake does not add a space before, and pkglint caught up to do the same. This change has no practical consequences though. As always, a bit of refactoring. The method names of MkAssignChecker contained the redundant word "varassign".
2020-06-07pkgtools/pkglint: update to 20.1.15rillig29-63/+668
Changes since 20.1.14: Fix confusing wording of diagnostic "should contain text". It's more precise to say "this line should consist of this text". Otherwise it's too easy to interpret it as "the text should occur somewhere in the line". Allow BUILDLINK_PREFIX.* to be used in helper files. Especially for programming language packages, files like plugin.mk often include buildlink3.mk and therefore may refer to the BUILDLINK_PREFIX of this package. Warn about redundant BUILDLINK_API_VERSION restrictions. Previously, the check had only been enabled if the operators from the default dependency pattern (buildlink3.mk) and the additional dependency pattern (package) used the same operators, which already covered most practical cases. Determine SuSE versions from the pkgsrc tree.
2020-06-06pkgtools/pkglint: update to 20.1.14rillig19-177/+319
Changes since 20.1.13: Packages that don't define DISTNAME probably don't download any files and thus may not need a distinfo file. (There are several other conditions involved in this, though.) When reporting wrong distinfo hashes, always report them in the order in which they appear in the distinfo file, not by hashmap order. Fix panic when parsing the Makefile line "./=value", which according to bmake is a variable assignment. This is not used in practice though. Disallow a leading hyphen in package option names. There are only very few packages that wrongly use these option selectors in PKG_SUGGESTED_OPTIONS. Distinguish between a tool dependency (USE_TOOLS) and a plain tool name (TOOLS_NOOP, TOOLS_BROKEN, TOOLS_FAIL). Allow packages to add arbitrary tools to these lists.
2020-06-02pkgtools/pkglint: update to 20.1.13rillig3-2/+47
Changes since 20.1.12: Numeric comparison in conditions should not be used. It is currently only used for comparing version numbers. https://mail-index.netbsd.org/pkgsrc-changes/2020/06/02/msg215278.html
2020-06-01pkgtools/pkglint: update to 20.1.12rillig26-107/+256
Changes since 20.1.11: The file bsd.pkg.mk must only ever be included by package Makefiles directly, not by other Makefile fragments. Seen in www/w3m. The variable BUILDLINK_PREFIX.* should only be used for packages that have actually been included by the package. This catches the use of BUILDLINK_PREFIX.libiconv, which should have been iconv instead. Allow comments before line 3 in buildlink3.mk files. This is necessary for mariadb55-client since its buildlink identifier is mysql-client, which is so non-obvious that it needs to be documented.
2020-05-29pkgtools/pkglint: update to 20.1.11rillig6-38/+96
Changes since 20.1.10: PKG_SYSCONFDIR and VARBASE must not appear in INSTALLATION_DIRS. Patch files in which the line number have been edited manually are marked with notes.
2020-05-24pkgtools/pkglint: update to 20.1.10rillig12-13/+133
Changes since 20.1.8: Recognize SUBST_NOOP_OK and SUBST_SHOW_DIFF. Allow plain -Wl,-R and -Wl,-rpath in BUILDLINK_TRANSFORM, when they are used to remove compiler options. Recognize ggrep and other platform tools as valid tool names. Seen in lang/rust.
2020-05-24pkgtools/pkglint: remove runtime dependency on devel/go-checkrillig1-6/+1
Since 2019-11-16, the main pkglint code does not require this package anymore. It is still used in the test code.
2020-05-23pkgtools/pkglint: update to 20.1.8rillig8-28/+87
Changes since 20.1.7: There are about 300 cases where a package defines a PLIST conditional in PLIST_VARS but none of its PLIST files actually uses that condition. These cases get a warning.
2020-05-18pkgtools/pkglint: update to 20.1.7rillig2-5/+8
Changes since 20.1.6: Versioned Python dependencies may end with :test or :tool, as the code in lang/python/versioned_dependencies.mk says.
2020-05-17pkgtools/pkglint: update to 20.1.6rillig5-26/+83
Changes since 20.1.5: Category Makefiles must only list subdirectories in SUBDIR that actually contain a package. There is no need to mention the other directories. This is the same as in the top-level Makefile, where mk/ and regress/ are not listed. Packages from pkgsrc-wip may have a COMMIT_MSG file with a suggested commit message for importing the package into main pkgsrc.
2020-05-09pkgtools/pkglint: update to 20.1.5rillig4-141/+10
Changes since 20.1.4: No more wrong warnings about the Solaris /bin/sh. These warnings had been there for 14 years, preventing pkgsrc developers from using the $$(...) command substitution and negation in shell conditions. https://mail-index.netbsd.org/pkgsrc-changes/2020/05/01/msg212194.html
2020-05-08pkgtools/pkglint: update to 20.1.4rillig14-104/+318
Changes since 20.1.3: For patches that patch a single file, the filename of the patch should correspond to the patched file. There are a few different naming schemes in action, therefore the check is relatively loose. Patches that are called patch-[a-z][a-z] continue to be allowed for historic reasons. Patches that are called patch-CVE-* are also allowed. The entries in doc/CHANGES-* are checked for consistency. For example, it doesn't make sense to add a package twice or "update" a package from version 1.0 to version 1.0. All version numbers in these entries must be valid pkgsrc versions, i.e. start with a digit and only use characters from -.0-9A-Z_a-z.
2020-05-02don't need a wildcard heretnn1-2/+2
2020-05-02pkglint/select.mk: prefer golang pkglint on NetBSD/aarch64 9.1 or latertnn1-2/+5
2020-04-30pkgtools/pkglint: update to 20.1.3rillig19-94/+366
Changes since 20.1.2: Stricter check for Python version numbers. Before, 25 and 26 had not been marked as wrong. In assignments like PKGNAME=${DISTNAME:S,from,to,}, modifiers that don't have any effect generate a note. Most of these modifiers are redundant or outdated. Patches must not add well-known absolute paths like /usr/pkg, /var and /etc since these must be overridable by the pkgsrc user. Other absolute paths continue to be allowed.
2020-04-13pkgtools/pkglint: update to 20.1.2rillig10-159/+321
Changes since 20.1.1: Ensure that relative paths to other packages have the canonical form ../../category/package. Add notes about pathname patters that mention ${WRKSRC} even though they are already defined to be relative to WRKSRC. Fix check for redundantly added categories. The check had previously reported that the included file would be redundant, which was wrong. It's always the including file that provides the redundancy.
2020-04-12Revbump all Go packages after default version switch to 1.14.bsiegert1-1/+2
2020-03-26pkgtools/pkglint: update to 20.1.1rillig12-8/+289
Changes since 20.1.0: In UNLIMIT_RESOURCES, the recently added virtualsize is allowed. Packages that have distfiles without any digit in their name should define DIST_SUBDIR to avoid polluting the global namespace. The top-level distfiles directory should only contain versioned filenames.
2020-03-23pkgtools/pkglint: update to 20.1.0rillig3-2/+32
Changes since 19.4.13: It is an error to have TODO lines in DESCR files. These are typically generated by url2pkg and should be replaced with proper text before committing the package.
2020-03-22pkgtools/pkglint: update to 19.4.13rillig13-76/+308
Changes since 19.4.12: Files that are mentioned redundantly in PLIST files generate an error. Missing DESCR files generate an error. Hard-coded /usr/pkg in patches generates an error.
2020-03-21Revbump all Go packages after go113 update.bsiegert1-1/+2
2020-03-18pkgtools/pkglint: increase performancerillig2-6/+8
2020-03-18pkgtools/pkglint: update to 19.4.12rillig24-182/+719
Changes since 19.4.11: Redundant additions to BUILDLINK_API_DEPENDS and BUILDLINK_ABI_DEPENDS get warnings since they may have been needed in the past but the dependent package has increased its required version numbers over time.
2020-03-15pkgtools/pkglint: update to 19.4.11rillig16-58/+357
Changes since 19.4.10: The use of PKG_OPTIONS and PKG_BUILD_OPTIONS in buildlink3.mk and other files is checked for common mistakes. Checking the indentation of a continuation line no longer crashes in edge cases.
2020-03-07pkgtools/pkglint: update to 19.4.10rillig22-142/+480
Changes since 19.4.9: In continuation lines with long values, pkglint no longer suggests to move the continuation backslash in the middle of the variable value, as that would be impossible. Warn when a shell command is assigned to a variable that only takes pathnames. Shell commands can contain command line options, and these are not pathnames. The TOOLS_PLATFORM.tool variables are not defined on every platform. When these variables are used outside an OPSYS check, a warning lists the platforms where the tool is undefined or only defined conditionally.
2020-02-17pkgtools/pkglint: update to 19.4.9rillig8-17/+158
Changes since 19.4.8: Packages that include omf-scrollkeeper.mk even though their PLIST doesn't contain any .omf files will generate an error message, suggesting that the .include line be removed.
2020-02-15pkgtools/pkglint: update to 19.4.8rillig57-816/+944
Changes since 19.4.7: The diagnostic for homepages using FTP is simpler now. When running pkglint recursively on the top-level directory, the inter-package checks (distfile hashes, unused licenses) are enabled implicitly. This way, the only effect of the -Cglobal option is now whether the pkgsrc infrastructure files are checked as well. The check for removed packages that have not been recorded in doc/CHANGES prints the correct lines when pkglint is run with the --source option. Fatal technical errors are no longer treated as diagnostics since they are none. That was an early conceptual mistake, but since these fatal error didn't happen often, it didn't matter. In diagnostics, when referring to other lines, the previously used words before/after have been replaced with above/below to avoid any confusion whether space or time is meant. In CONF_FILES, spaces and quotes are allowed. See https://gnats.netbsd.org/42191. Fixed unintended side-effects when running pkglint --autofix --only. Before, all fixes were applied to the file, whether or not they matched the --only option. Fixed resolution of relative paths of the form ../../category/package when they appeared in an infrastructure file. Lots of refactorings and housekeeping, as usual.
2020-02-05pkgtools/pkglint: update to 19.4.7rillig10-85/+203
Changes since 19.4.6: HOMEPAGE definitions that use http no longer get a warning that they should migrate to https. Those that could be migrated have been migrated, and the remaining homepages are not yet ready, so there's no benefit in having this warning by default. Only in --network mode and when the https site is indeed reachable, the warning is shown. In long continued lines, the continuation backslash should be preceded by a single space. Pkglint had wrongly removed that space in a few cases before.
2020-02-02Revbump all Go packages after go113 update.bsiegert1-1/+2
2020-01-26pkgtools/pkglint: use ASCII-only variant of the preformatted manual pagerillig1-33/+34
2020-01-26pkgtools/pkglint: fine-tune manual pagerillig3-34/+38
2020-01-26pkgtools/pkglint: update manual pagerillig2-7/+14
2020-01-26pkgtools/pkglint: update to 19.4.6rillig18-258/+913
Changes since 19.4.5: Added the --network option, which allows pkglint to use HTTP calls for determining whether the homepage of a package is reachable. Added migration from http URLs to the corresponding https URLs. This is only done if the https URL is indeed reachable or well-known to support https. Added migration from https SourceForge URLs back to http URLs since a previous pkglint run had migrated URLs to non-working https URLs. See https://mail-index.netbsd.org/pkgsrc-changes/2020/01/18/msg205146.html. Added a warning for HOMEPAGE that uses ftp:// since that is not user-friendly. In the same way, download-only host names on SourceForge are not suitable as a homepage since they usually only generate a 404.
2020-01-23pkgtools/pkglint: update to 19.4.5rillig4-3/+59
Changes since 19.4.4: Fixed automatic replacement from http SourceForge URLs to their https counterparts. According to their official documentation, the https URLs are not on the same hosts as before, but on *.sourceforge.io.
2020-01-18pkgtools/pkglint: update to 19.4.4rillig22-143/+457
Changes since 19.4.3: Packages that still use http in their HOMEPAGE URL generate warnings that the URL should use https instead.
2020-01-11pkgtools/pkglint: update to 19.4.3rillig10-12/+161
Changes since 19.4.2: PLIST_VARS identifiers must not contain characters that are interpreted specially in regular expressions. All pkgsrc text files except for doc/pkgsrc.{html,txt} must use the default CVS keyword substitution.
2020-01-10Revbump Go packages after Go default version bump.bsiegert1-1/+2
2020-01-06pkglint: Remove an outdated file from PLIST to fix packagingryoon1-2/+1
2020-01-06pkgtools/pkglint: remove outdated ideas.gorillig1-17/+0
2020-01-06pkgtools/pkglint: update to 19.4.2rillig15-35/+271
Changes since 19.4.1: Fixed variable resolution. Before, variables that had not been defined in an included file could still end up in the scope of the package, which made many of the pkglint checks unreliable. Each condition that is used in the PLIST should be defined somewhere in the package Makefile or its included files. When loading a package Makefile, hacks.mk is loaded implicitly at the end, just as the pkgsrc infrastructure does in mk/bsd.hacks.mk.
2020-01-05pkglint: Include more .go file to PLISTryoon1-1/+2
2020-01-04pkgtools/pkglint: update to 19.4.1rillig69-1012/+1349
Changes since 19.4.0: The notes for inserting an empty line have been changed from "insert after this line" to "insert before this line" to make the line numbers in the diagnostics contiguous. There had been several places where the diagnostics went from line 1 to line 2 and then back to line 1, which was confusing. The lines in ALTERNATIVES files are checked for trailing whitespace. This is only for consistency with the other checks. In the whole pkgsrc tree all ALTERNATIVES files are already fine. The diagnostics for comments in .endif/.endfor lines that don't correspond to their .if/.elif/.for counterparts now includes the exact line number of the corresponding condition, to make the warning easier to fix. The diagnostics for wrong variable value alignment now mention the current column in addition to the desired column, to make it easier to see by how much and in which direction the indentation should be fixed. Variables that are used in conditions before they are actually defined need the :U modifier.
2019-12-30pkgtools/pkglint: update to 19.4.0rillig32-654/+907
Changes since 19.3.19: Empty PLIST files now generate an error instead of a warning since there is no reason for having these empty files. If a follow-up line in a Makefile is completely empty, there is no note about trailing whitespace anymore since the warning about the misleading empty line already covers this case. The remaining code changes are only refactorings.
2019-12-16pkgtools/pkglint: update to 19.3.19rillig18-487/+1083
Changes since 19.3.18: Small improvements to edge cases in SUBST blocks. Small improvements to edge cases in variable assignment and alignment of the continuation backslashes. The --source option shows the changes from autofix, even when the --show-autofix option is not given. This is a welcome side-effect of making the autofix logging simpler and more predictable.