summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files
AgeCommit message (Collapse)AuthorFilesLines
2022-11-28pkgtools/pkglint: update to 22.3.2rillig5-6/+75
Changes since 22.3.1: Complain about conditions of the form '_PYTHON_VERSION < 38', as they lead to 'Malformed conditional' when _PYTHON_VERSION is 'none' instead of a number.
2022-11-19pkgtools/pkglint: Update to 22.3.1rillig7-333/+595
Changes since 22.3.0: In doc/CHANGES files, check for typos in month and day of the dates. In conditions for YesNo variables, suggest to replace the modifier ':M[yY][eE][sS]' with a simpler comparison. https://mail-index.netbsd.org/tech-pkg/2022/11/16/msg026992.html
2022-10-02pkgtools/pkglint: fix check for package option groupsrillig1-2/+2
2022-10-02pkgtools/pkglint: update to 22.3.0rillig8-14/+94
Changes since 22.2.7: Pkglint no longer wrongly warns about package options from optional or required option groups. Fixes PR 57038.
2022-09-17pkglint: use Go module build, simplify Makefilebsiegert2-0/+25
Add a go.mod file to the sources and pull in goyacc through a TOOL_DEPENDS. Bump version to 22.2.7.
2022-08-19pkgtools/pkglint: update to 22.2.6rillig4-4/+58
Changes since 22.2.5: A makefile that adds a _VARGROUPS section is partly considered part of the infrastructure. It may define and use variables from its own namespace. For example, devel/cmake/build.mk adds _VARGROUPS+=cmake, thereby reserving the namespace '_CMAKE_*' for itself. Dependencies in BUILDLINK_API_DEPENDS and BUILDLINK_ABI_DEPENDS that contain unresolved variable expressions are no longer marked as redundant. They were marked as redundant before because '$', when interpreted as a package version, was smaller than 0.0.
2022-08-17pkgtools/pkglint: update to 22.2.5rillig4-46/+59
Changes since 22.2.4: Makefiles in wip/mk may use internal variables (starting with '_'), just like their counterparts in main mk/. Package versions containing letters are now parsed like in pkg_install.
2022-07-28pkgtools/pkglint: update to 22.2.4rillig6-27/+160
Changes since 22.2.3: Manual pages must not be listed in the ALTERNATIVES file. Instead, they are handled automatically based on the program in bin/ or sbin/. Detect packages that use the tool pkg-config even though they don't need it.
2022-07-24pkgtools/pkglint: update to 22.2.3rillig12-865/+1071
Changes since 22.2.2: CHECK_WRKREF is known to pkglint, which prevents conditions using this variable from being simplified in a wrong way. For variables that are guaranteed to be defined, suggest to simplify the condition '!empty(VAR:M[Yy][Ee][Ss])' to '${VAR:M[Yy][Ee][Ss]}', as that reduces the number of negations in the condition. Detect redundant WRKSRC definitions and suggest to remove them. Fix wrong "c99 is not valid for USE_LANGUAGES" warnings.
2022-07-09pkgtools/pkglint: update to 22.2.2rillig5-26/+32
Changes since 22.2.1: Require the current checksum algorithms for pkgsrc-wip packages as well. SHA1 and RMD160 are no longer allowed for distfiles. Do not warn about 'Package should not' when checking .mk files in the pkgsrc infrastructure.
2022-07-06pkgtools/pkglint: update to 22.2.1rillig3-13/+47
Changes since 22.2.0: Suggest simpler condition when matching a variable against a pattern (occurs 220 times in pkgsrc). Improve explanation for documenting patches.
2022-06-24pkgtools/pkglint: update to 22.2.0rillig10-57/+110
Changes since 22.1.0: In ALTERNATIVES files, the wrapper path must be either in bin, @PKGMANDIR@ or sbin. This catches typos like "in" instead of "bin", as well as hard-coded "man".
2022-03-21pkgtools/pkglint: update to 22.1.0rillig2-3/+22
Changes since 21.4.4: Python packages that declare 2.7 as an incompatible Python version no longer need to provide a rationale for this since it is common knowledge that Python 2.7 is old and therefore unsupported by many modern packages.
2022-03-11pkgtools/pkglint: update to 21.4.3rillig2-12/+18
Changes since 21.4.2: In simple Makefiles, do not allow the GitHub variables like GITHUB_RELEASE to occur above DISTNAME anymore. Previously, these variables had 2 possible places in the "canonical" order.
2022-01-16pkgtools/pkglint: update to 21.4.2rillig7-39/+162
Changes since 21.4.1: When checking a package, check for naming collision with other packages from the same category, on case-insensitive file systems. For packages from pkgsrc-wip, additionally perform the same check for the main category of the package, to prepare for importing the package.
2022-01-01pkgtools/pkglint: update to 21.4.1rillig31-161/+210
Changes since 21.4.0: Running 'pkglint doc/CHANGES-2021' now warns about issues for this single file. Previously, it was necessary to specify '-Cglobal' as well, but then pkglint also warned about issues in all other CHANGES files. Pkglint no longer warns about the characters '!' and '@' in GO_MODULES_FILES, since these are legitimate. Fixes PR pkg/56595. Small cleanups in the pkglint testing infrastructure.
2021-11-20pkgtools/pkglint: update to 21.3.4rillig1-0/+4
Changes since 21.3.3: For wip packages, allow SHA1 to be used as digest algorithm. An example package that needs this is wip/doomlegacy-devel.
2021-11-13pkgtools/pkglint: update to 21.3.3rillig3-2/+7
Changes since 21.3.2: Explain warning about invalid symlink. Do not warn when a package uses MAKE_JOBS without adding it to BUILD_DEFS, since MAKE_JOBS is supposed to be a build-time only variable.
2021-10-28pkglint: update to 21.3.2rillig6-142/+111
Changes since 21.3.1: Replace RMD160 with BLAKE2s for distfiles in main pkgsrc, keep the previous RMD160 for pkgsrc-wip, at least until 2021Q4.
2021-10-09pkgtools/pkglint: update to 21.3.1rillig9-63/+105
Changes since 21.3.0: When checking a standalone makefile fragment, pkglint reports redundant variable declarations. In pathname patterns, spaces and other escaping is allowed. This is needed for devel/meson. While here, register MESON_REQD. Adjust to the removal of SHA1 for distfiles. Only RMD160, SHA512 and Size remain now. Patches continue to use SHA1 since they don't come via untrusted paths.
2021-08-14pkgtools/pkglint: update to 21.2.6rillig3-18/+34
Changes since 21.2.5: Do not warn when a variable SITES.* refers to a GitHub URL directly instead of using MASTER_SITE_GITHUB. The variable expression for supporting multiple master sites would become quite complicated for human readers, especially with a leading '-' and a long trailing path.
2021-08-14pkgtools/pkglint: update to 21.2.5rillig9-23/+33
Changes since 21.2.4: Fixed wrong warning about man/man1 in INSTALLATION_DIRS. Fixed outdated warning that preformatted manual pages should end in '.0' since SunOS uses the section prefix for them.
2021-08-14pkgtools/pkglint: update to 21.2.4rillig10-28/+61
Changes since 21.2.3: Fixed loading of the tool definitions. This adds 76 warnings for packages that use tools without adding them to USE_TOOLS. It also fixes the warning about gmake and Meson.
2021-08-12pkgtools/pkglint: update to 21.2.3rillig2-7/+47
Changes since 21.2.2: Temporarily disable the warning about Meson and gmake. It led to a false positive in x11/libxkbcommon, where pkglint wrongly assumed that the package would use gmake. For packages using Meson, do not warn if an included package uses CONFIGURE_ARGS.
2021-08-08pkgtools/pkglint: update to 21.2.2rillig7-89/+334
Changes since 21.2.1: Check the variable names of OPSYS-specific variables for typos, such as 'Dragonfly' with a lowercase 'f'. Suggested by David A. Holland in PR pkg/56352. Warn if variables like CFLAGS are assigned using the operator '='. Suggested by David A. Holland in PR pkg/56352.
2021-06-25pkgtools/pkglint: update to 21.2.1rillig21-52/+725
Changes since 21.2.0: Files whose names ends in '~' are ignored by pkglint since they are ignored by CVS as well. Variables with name BUILDLINK_TRANSFORM.* may contain '-Wl,-rpath,' directly in commands of the form 'rm:*', just like their counterpart BUILDLINK_TRANSFORM without a package name in the variable name. Several new tests.
2021-06-06pkgtools/pkglint: update to 21.1.4rillig10-34/+191
Changes since 21.1.3: Allow slash in Git tags like 'refs/tags/v1.0.0', as well as in make targets like 'subdir/build'.
2021-06-06pkgtools/pkglint: update to 21.1.3rillig10-7/+167
Changes since 21.1.2: The entries in doc/CHANGES are checked more strictly, they must always consist of 4 words (for removed packages) or 6 words (for all other changes). Packages that include curses.buildlink3.mk may use all buildlink3 variables with the identifier "curses". The previous pkglint warnings had been wrong. Python packages that directly contain .egg-info in their PLIST files should include egg.mk instead. Pkglint can now fix these packages automatically.
2021-05-25pkglint: update to 21.1.2rillig2-7/+56
Changes since 21.1.1: Fixed the check for BUILDLINK3_PKGSRCDIR. Previously, pkglint had complained about ${_EMACS_PKGDIR} in buildlink3.mk.
2021-04-17pkgtools/pkglint: update to 21.1.1rillig5-11/+144
Changes since 21.1.0: Added check for packages that have been migrated to Meson but still refer to their previous build system, most often involving GNU make and GNU autotools. Suggested by nia.
2021-03-22pkgtools/pkglint: update to 20.4.2rillig4-5/+51
Changes since 20.4.1: Error out on package directories that differ only in case. This ensures that pkgsrc can be used on case-insensitive file systems as well, such as on macOS or Windows.
2021-03-20pkgtools/pkglint: update to 20.4.1rillig5-8/+115
Changes since 20.4.0: When a package has MAINTAINER set and there are modified local files, only remind the user once per package that changes should likely be approved by the maintainer. Previously there was a reminder once per file, which was just too much for a package that has Makefile and PLIST and maybe some patches changed. Small performance improvement for loading the doc/CHANGES files, since that costs a few tenths of seconds at every startup.
2020-10-26pkgtools/pkglint: update to 20.3.2rillig1-1/+47
Changes since 20.3.1: The available Java versions are parsed from mk/java-vm.mk instead of hard-coding them in pkglint.
2020-10-06pkgtools/pkglint: update to 20.3.1rillig5-10/+65
Changes since 20.3.0: URLs from cpan.metacpan.org should not be used as HOMEPAGE for Perl packages since they don't provide an overview over the package, instead the just list the distribution files. Lines in doc/CHANGES may contain the pattern "Removed <pkgpath> version <version>". Before, only "Removed <pkgpath>" (without additional information) or "Removed <pkgpath> successor <pkgpath>" were allowed. Mentioning the last seen version number sounds useful. It is not cross-checked right now; that check may be added later.
2020-08-02pkgtools/pkglint: update to 20.2.6rillig4-8/+45
Changes since 20.2.5: Some selected absolute paths, such as /etc/passwd, /etc/shadow and /etc/hosts are allowed in patch files. Other files in /etc should still use PKG_SYSCONFDIR, to keep the package portable between platforms and also in unprivileged mode. (Fixes PR pkg/55524.) Absolute pathnames are also allowed in C-style end-of-line comments (fixes PR pkg/55516) and in continuations of C-style block comments (fixes PR pkg/55524). The explanation for make's :ts modifier has been adjusted to the 2020 bmake update. The modifier :ts\040 is now interpreted as octal, as opposed to decimal.
2020-07-31pkgtools/pkglint: update to 20.2.5rillig5-10/+10
Changes since 20.2.4: The warning about "unknown options" has been reworded to "undocumented options", since that is more precise and less confusing. In pathnames and pathname patterns, the exclamation mark is allowed. This is necessary for Go packages like devel/gopls.
2020-07-23pkgtools/pkglint: update to 20.2.4rillig2-1/+13
Changes since 20.2.3: Complain about buildlink3.mk files that accidentally set their own BUILDLINK_PKGSRCDIR variable to a different directory than their own.
2020-07-23pkgtools/pkglint: update to 20.2.3rillig2-2/+87
Changes since 20.2.2: Complain about patches that add a hard-coded interpreter. Even if that interpreter is /bin/sh, which is available on most platforms, it is still inappropriate on old Solaris installations. Other popular paths start with /usr/pkg or /usr/local, and these are not controlled by pkgsrc either.
2020-07-22pkgtools/pkglint: update to 20.2.2rillig4-26/+67
Changes since 20.2.1: Emit notes about redundant != assignments, as well as those that overwrite each other. For packages that set DISTINFO_FILE to their own distinfo file, don't check that file twice.
2020-07-01pkgtools/pkglint: update to 20.2.1rillig26-276/+794
Changes since 20.2.0: Don't warn about a possibly redundant PKGNAME=${DISTNAME} assignment if PKGNAME is defined somewhere else in the package Makefile. Warn if NO_CONFIGURE=yes and REPLACE_* are combined. Suggest to replace ${VAR:@l@-l${l}@} with the simpler ${VAR:S,^,-l,}, as well as ${VAR:@l@${l}suffix@} with the simpler ${VAR:=suffix}. Allow lua in CATEGORIES.
2020-06-22pkgtools/pkglint: update to 20.1.19rillig1-0/+8
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.18rillig8-105/+539
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-14pkgtools/pkglint: update to 20.1.17rillig12-567/+1216
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.16rillig17-153/+280
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.15rillig28-61/+666
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.14rillig18-175/+317
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.13rillig2-0/+45
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.12rillig25-105/+254
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.11rillig5-36/+94
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.10rillig11-11/+131
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.