Commit graph

1680 commits

Author SHA1 Message Date
rillig
48ebfd0f74 pkgtools/pkglint: update to 19.3.3
Changes since 19.3.2:

The rationale for variables like BROKEN, GCC_REQD and for direct
inclusion of builtin.mk files may span multiple lines, and it may end
with an empty comment line.
2019-10-26 11:43:36 +00:00
rillig
fe85bf5b22 pkgtools/pkglint: update to 19.3.2
Changes since 19.3.1:

* Pkglint no longer warns about a missing :Q modifier if there is also
  a :D modifier, since the latter hides the original variable value
  from the expression value.

* Variable names like .CURDIR are now allowed in the _VARGROUPS section.

* In dependency lines like "${_COOKIE.extract}:", pkglint no longer
  warns about the unknown target. No matter whether this is a file name
  or even a list of other targets, there's no chance for a typo here.

* If some dependencies are included conditionally, and the package
  Makefile and buildlink3.mk disagree, and the conditions depend on
  PKG_OPTIONS, pkglint outputs a helpful explanation.

* The check for including builtin.mk directly can be disabled by giving
  a reason in a comment at the end of the line.
2019-10-26 09:51:47 +00:00
bsiegert
cb070cf0eb Revbump all Go packages after lang/go112 update 2019-10-18 14:58:43 +00:00
rillig
d5250cbc60 pkgtools/pkglint: update to 19.3.1
Changes since 19.3.0:

* In buildlink3.mk files, the package identifier doesn't have to match
  the PKGBASE from the package Makefile exactly. The PKGBASE may have a
  leading "lib" (for libiconv and libgettext), as well as a trailing
  number (for emacs20 and netatalk22).

* GITHUB_RELEASE is added to the variables that should appear in a fixed
  order in the package Makefile.

* In the MASTER_SITE URLs, the transport protocol is irrelevant for
  matching direct URLs to the predefined MASTER_SITE_* variables.
2019-10-11 23:30:02 +00:00
rillig
0b4c862c88 pkgtools/pkglint: update to 19.3.0
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.
2019-10-01 21:37:59 +00:00
bsiegert
866c85b303 Revbump all Go packages after 1.12.10 update.
ok wiz@ for PMC
2019-09-26 20:10:39 +00:00
rillig
58d2d50c2a pkgtools/pkglint: update to 5.7.24
Changes since 5.7.23:

* Improved the _VARGROUPS check for ignored variables
* Removed wrong warnings for variable expressions like ${VAR:Dyes:Uno}
* Used correct terminology for the :Q modifier (it's not an operator)
2019-09-12 21:15:48 +00:00
rillig
38f0aa6a18 pkgtools/pkglint: update to 5.7.23
Changes since 5.7.22:

* Added a warning for lines that look empty but are actually follow-up
  lines from a previous line.

* Added notes for unusual placement of the continuation backslash. It
  should always be preceded by a single space or tab, or be in column
  73.

* Improved check for needlessly complicated !empty(PKGPATH:Mcat/pkg)
  that is transformed into the simpler ${PKGPATH} == cat/pkg, even if
  the package name contains hyphens, dots, plus or slashes.

* Added check for the _VARGROUPS section since that section contains
  many redundancies that can easily be checked. For example, in
  mk/compiler/gcc.mk the _VARGROUPS section is 67 lines long and
  contains far more than 100 variables. It's tedious to manually check
  this file for internal consistency. That's better left to pkglint.

* The empty variable is no longer flagged as "used but not defined".
  It appears in expressions like ${:Ustring}.

* When --source is combined with --explain, don't unnecessarily
  repeat the source code for a single line if there are several
  diagnostics. Instead, even omit the empty line between the diagnostics
  for the same line.
2019-09-08 22:47:47 +00:00
rillig
00b8c55b94 pkgtools/pkglint: update to 5.7.22
Changes since 5.7.21:

* The files from wip/mk do not belong to the main pkgsrc infrastructure.
  Therefore, when loading the package Makefile to look for defined but
  unused variables, parsing doesn't stop in these files.
2019-08-25 21:47:11 +00:00
rillig
397e7ee2b6 pkgtools/pkglint: update to 5.7.22
Changes since 5.7.21:

* The files from wip/mk do not belong to the main pkgsrc infrastructure.
  Therefore, when loading the package Makefile to look for defined but
  unused variables, parsing doesn't stop in these files.
2019-08-25 21:44:37 +00:00
rillig
269a5efe8e pkgtools/pkglint: update to 5.7.21
Changes since 5.7.20:

* PKG_OPTIONS that are handled using patterns are correctly identified.

* Simple R packages should follow the canonical variable order.

* Fixed some edge cases for aligning variable assignments.

* Improved detection of allowed values for USE_LANGUAGES.
2019-08-21 16:45:16 +00:00
rillig
6ff137259f pkgtools/pkglint: update to 5.7.20
Changes since 5.7.19:

* Fixed warning about unknown C++ standard versions, which had appeared
  after the code in mk/compiler.mk changed.
2019-08-16 21:00:17 +00:00
bsiegert
2b7e432294 Recursive bump of all packages using Go after Go 1.12.8 update. 2019-08-14 15:45:31 +00:00
rillig
00a1cb3911 pkgtools/pkglint: update to 5.7.19
Changes since 5.7.18:

* The tricky construct for generating case-items from a Make variable
  no longer produces parse errors. Example:

  case $$expr in ${PATTERNS:@p@ (${p}) action ;; @} esac
2019-08-02 18:55:07 +00:00
rillig
3a9242e2e6 pkgtools/pkglint: update to 5.7.18
Changes since 5.7.17:

* Added "R" to the list of valid secondary categories.
2019-08-01 22:38:49 +00:00
rillig
07a3bdb40f pkgtools/pkglint: fix test for doc/CHANGES removals 2019-07-30 18:31:43 +00:00
rillig
139b0319b0 pkgtools/pkglint: update to 5.7.17
Changes since 5.7.16:

* The warnings for doc/CHANGES are only enabled when the -Cglobal option
  is given. This is to avoid warnings that are unrelated to the package
  that is being checked.
2019-07-30 18:16:13 +00:00
rillig
43c0a3a483 pkgtools/pkglint: update to 5.7.16
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.
2019-07-14 21:25:47 +00:00
rillig
c5f7c96ce2 pkgtools/pkglint: update to 5.7.15
Changes since 5.7.14:

* Added a check for packages that have been removed from the file system
  but not been recorded in doc/CHANGES. This will help produce more
  accurate release statistics.

* Small refactorings, as usual.
2019-07-01 22:25:52 +00:00
rillig
f5cf9c917b pkgtools/pkglint: regen pkglint.0 2019-06-30 21:03:16 +00:00
rillig
b08b5377b3 pkgtools/pkglint: update to 5.7.14
Changes since 5.7.13:

- Removed the -Cextra command line option since it didn't produce useful
  warnings.

- Removed unwarranted warnings about _WRAP_EXTRA_ARGS.CC being used in
  packages.

- Cleaned up the canonical order of variables in package Makefiles.

- Added a few commands to those that cannot fail, to reduce the number of
  "at the left of the | operator" in shell programs.

- Fixed warnings about "-ggdb" being an unknown shell command.

- Reduced number of warnings about lists being used where a single value
  is expected.

- Replaced unreliable check for invalid CFLAGS and LDFLAGS with a more
  practical check.

- Renamed "RCS tag" to "CVS tag" to make the diagnostics more modern.

- Added warning when PKGNAME or PKGVERSION is used in MASTER_SITES.

- Reworded warning for missing or superfluous PLIST files.

- Lots of other detail changes, refactorings and automatic tests.
2019-06-30 20:56:18 +00:00
rillig
ea699990d4 pkgtools/pkglint: updated to 5.7.13
Changes since 5.7.12:

* Fixed a warning in the variable permissions that previously said "this
  variable should not be used at load time in this file, it would be ok
  in .", with an empty list of alternative files.

* Lots of refactoring and new tests.
2019-06-10 19:51:57 +00:00
bsiegert
6b2717c133 Revbump all Go packages after go112 update. 2019-05-27 15:18:17 +00:00
rillig
4658590dac pkgtools/pkglint: update to 5.7.12
Changes since 5.7.11:

* Fixed an alignment bug when pkglint replaced SUBST_SED with
  SUBST_VARS.

* Added many test cases.
2019-05-26 14:05:57 +00:00
rillig
3c5e4bf99b pkgtools/pkglint: ignore hidden files during extraction
Fixes pkg/54204.
2019-05-26 13:52:14 +00:00
rillig
0493e834c1 pkgtools/pkglint: update to 5.7.11
Changes since 5.7.10:

Fixed wrong warnings about autoconf being an unknown shell command when
an included file had defined USE_TOOLS+=autoconf213.
2019-05-22 16:07:16 +00:00
rillig
d2484940b5 pkgtools/pkglint: update to 5.7.10
Changes since 5.7.9:

* Fixed URL checking for MASTER_SITES, especially remove the wrong error
  message about URLs of the form ${MASTER_SITE:S,^,-,:=subdir/}.

* Made warnings about invalid filenames, filename patterns, pathnames and
  pathname patterns more detailed.
2019-05-21 17:59:48 +00:00
rillig
3955e90918 pkgtools/pkglint: update to 5.7.9
Changes since 5.7.8:

* Buildlink3.mk files are checked for typos in the identifier that is
  used for BUILDLINK_TREE, to detect copy-and-paste mistakes.

* Having a rationale is recommended for some variables, especially those
  that make a package fail to build or crash at runtime. This check is
  only active when -Wextra is given, since it is still actively debated
  whether such a check is actually useful.

* Files called Makefile.php can easily be mistaken to be PHP files.
  Therefore the recommended naming convention is to have auxiliary files
  called *.mk. There are already many more files called *.mk than those
  being called Makefile.*.

* The check for unquoted sed substitution commands has been made more
  detailed, but since it is completely disabled, there's nothing to see
  for now.

* The definitions for MASTER_SITE_* are loaded directly from the pkgsrc
  infrastructure instead of hard-coding them in pkglint.
2019-05-06 20:27:17 +00:00
wiz
49b1bb13c3 sun-jdk6, sun-jre6: remove
Last update in 2013, remove sun-jdk7/sun-jre7 instead
2019-05-02 08:36:09 +00:00
rillig
8b00047de2 pkgtools/pkglint: update to 5.7.8
Changes since 5.7.7:

Warn about definitions of NOT_FOR_* and ONLY_FOR_* which are missing a
rationale. When maintaining such packages it helps a lot to know why the
package cannot be built on a particular platform or with a particular
compiler or Python version.
2019-04-28 18:13:53 +00:00
gdt
2e77121e33 pkgtools/pkglint*: Update DESCR to explain differences
Note that pkglint is current and pkglint4 is old, and that both are
present due to go portability issues.
2019-04-28 13:38:23 +00:00
rillig
f530ae598c pkgtools/pkglint: update to 5.7.7
Changes since 5.7.6:

Warn about packages that override user-settable variables. Packages that
define variables with the same value as the default value only get a
note instead of the warning since these definitions do not cause any
confusion.

Do not suppress technical error messages in autofix mode.

Do not warn about the package version being greater than the latest from
doc/CHANGES if the file defining the package version has been modified
locally and is about to be committed.
2019-04-27 19:33:56 +00:00
rillig
409d4a7d32 pkgtools/pkglint: update to 5.7.6
Changes since 5.7.5:

* The explanation for distfile hashes is only given when the distfiles
  actually need to be downloaded. If they are already there, no
  explanation is necessary.

* Makefile lines that are commented and have line continuations are
  properly parsed. This affects the autofix for variable value
  realignment.

* Variable permissions are not checked in hacks.mk since pkgsrc
  developers who know about hacks.mk probably know what they are doing.
  From hacks.mk files, builtin.mk files may be included directly, for
  the same reason.

* Expressions of the form !empty(PKGPATH:Mpattern), when PKGPATH is not
  a list variable and pattern has no wildcards, can be written in a
  simpler form, and pkglint autofixes this. For example the above
  expression is transformed into ${PKGPATH} == pattern. This
  transformation reduces the amount of double negations (!empty) in the
  code.

* Duplicate warnings about invalid relative ../package have been merged.

* TOOLS_ALIASES are properly resolved. The line USE_TOOLS=ggrep makes
  the tools grep, egrep and fgrep known to pkglint, in the same way as
  in the pkgsrc infrastructure.

* The diagnostics for missing or unnecessary distinfo files have been
  improved to provide some guidance.

* Packages that use MESSAGE_SRC to build the message from multiple files
  no longer produce a warning for malformed message files. These files
  are simply skipped.
2019-04-23 21:20:49 +00:00
rillig
0dd63a53db pkgtools/pkglint: update to 5.7.5
Changes since 5.7.4:

* Warn about invalid variable uses in directives like
  .if and .for

* Do not warn when a package-settable variable is assigned using the ?=
  operator before including bsd.prefs.mk. This warning only makes sense
  for user-settable and system-provided variables.

* The parser for variable uses like ${VAR:@v@${v:Q}} is more robust now,
  which reduces the number of parse errors and leads to more appropriate
  diagnostics, in cases like ${URL:Mftp://*}, which should really be
  ${URL:Mftp\://*}.

* The valid values for OPSYS are now determined by the files in
  mk/platform instead of allowing arbitrary identifiers. This catches a
  few instances where "Solaris" is used instead of the correct "SunOS".

* Setting USE_LANGUAGES only has an effect if mk/compiler.mk has not yet
  been included. In all other cases, pkglint warns now.

* Missing entries in doc/CHANGES produce a note now. This will lead to
  more accurate statistics for the release notes.
2019-04-20 17:43:24 +00:00
bsiegert
65fc216b57 Revbump all Go packages after go112 update 2019-04-16 18:41:08 +00:00
wiz
0db6be632e *: remove references to ruby 2.3 2019-04-15 06:11:32 +00:00
rillig
129bbfcb2b pkgtools/pkglint: update to 5.7.4
Changes since 5.7.3:

* Warn about dependency patterns that are missing a version number,
  such as ${PYPKGPREFIX}-sqlite3:../../databases/py-sqlite3.

* Suggest to replace the := assignment operator with the :sh modifier,
  in some cases where the variable is not obviously used at load time.
2019-04-03 21:49:51 +00:00
rillig
80648a0e93 pkgtools/pkglint: update to 5.7.3
Changes since 5.7.2:

PLIST files are checked for non-ASCII characters. Even though pkgsrc
sets up the environment with LC_ALL=C, there are still some cases
of encoding errors. The case discussed on the tech-pkg mailing list
was lang/go112.

The checks for variable permissions ("may not be set in this file")
have been reworked completely. Many of the variable permissions had
different rules for Makefile and Makefile.common. These different
rules tried to prevent accidental overwriting of variables. Starting
in July 2018, pkglint got a check for redundant variables that is
far more accurate than the previous variable permissions. Therefore
these fine-grained permissions are no longer necessary. This removes
a few hundred wrong warnings about insufficient permissions.

The check that adds missing SHA512 hashes to distinfo files has been
fixed to work correctly in DIST_SUBDIR cases.

Improved the checks regarding tools that are used by a package but
not added to USE_TOOLS. For example, the "make" tool is always
available, as are all tools that are added to TOOLS_CREATE.

Lots of small improvements, as always.
2019-03-24 13:58:38 +00:00
bsiegert
df61d022ce Revbump all Go packages after Go 1.12.1 update. 2019-03-16 08:35:37 +00:00
rillig
57d50087a5 pkgtools/pkglint: update to 5.7.2
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.
2019-03-10 19:01:50 +00:00
bsiegert
7455fa5a88 all: revbump Go packages, now that they use go112 to build 2019-03-09 10:05:01 +00:00
rillig
3e4a5c276f pkgtools/pkglint: update to 5.7.1
Changes since 5.7.0:

* Removed a line of code that was meant only for development, not for
  production use, from util.go.
2019-02-21 23:44:55 +00:00
rillig
08b33df96c pkgtools/pkglint: update to 5.7.0
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.
2019-02-21 22:49:03 +00:00
rillig
94af8e5f77 pkgtools/pkglint: update to 5.6.12
Changes since 5.6.11:

* In buildlink3.mk files, print the paths relative
  to the line, not to the pkgsrc root.

* When explaining that a variable cannot be set/used because of wrong
  permissions, list the permissions. This provides more transparency
  than just stating that the desired action is not allowed.

* When pkglint checks a pkgsrc-wip package, don't warn about malformed
  lines in doc/CHANGES-* since pkgsrc-wip users typically cannot do
  anything about these errors.

* In profiling mode, not only the code coverage and the performance
  statistics are dumped, the whole heap is also dumped to see which
  parts of pkglint consume the most heap memory. Pkglint now needs
  less heap memory than before, which mainly affects full scans.

* The checks for absolute pathnames have gone. They were of questionable
  value since pkglint has failed to give proper advice on how to fix
  them properly, at least for the last 12 years.

* The check that pkgsrc-wip packages should only use exact CVS Ids
  (the unexpanded variant) has been disabled again. It occurred about
  16000 times but even fixing it wouldn't improve anything since it
  was mostly a formatting issue without any practical consequences.

* Warn about trailing variable modifiers like in ${VAR:S,from,to,extra}.

* Properly parse ${VAR:!command!}.

* Suggest to replace SUBST_SED with SUBST_VARS where possible, even
  with complicated shell quoting. Pkglint can autofix most of these
  overly verbose cases.

* Load builtin.mk whenever the corresponding buildlink3.mk file is
  included. This fixes several warnings about undefined variables
  (especially for packages using OpenSSL).

* Parse .for lines like bmake does since 2015, splitting words like
  in brk_string.

* Optionally show a warning even if it cannot be autofixed by pkglint.
  This is useful for the SUBST_VARS replacement since even when
  pkglint cannot automatically replace the code, there are still cases
  where it can warn at least.

* As always, several refactorings.
2019-01-26 16:31:33 +00:00
bsiegert
066e1db646 Revbump Go packages after lang/go111 update. 2019-01-24 10:00:33 +00:00
rillig
6d4e6832e4 pkgtools/pkglint: update to 5.6.11
Changes since 5.6.10:

* Improved the wording of several warnings

* Fixed parsing of complicated dependency patterns such as
  {ssh{,6}-[0-9]*,openssh-[0-9]*}. Pkglint still doesn't understand
  them but at least it doesn't mark them as "unknown" anymore.

* Lots of refactoring, as usual. This is the last part of the big
  refactoring, therefore future changes to pkglint are expected to be
  smaller than in the previous 3 months.
2019-01-13 19:55:52 +00:00
rillig
ef8cffa82b pkgtools/pkglint: fix alternatives check
The alternatives implementation may have command line arguments.
2018-12-21 19:46:48 +00:00
rillig
31fb2a6890 pkgtools/pkglint: mention the update to 5.6.10 in Makefile
The actual update has been this morning.
2018-12-21 14:24:18 +00:00
rillig
e95dc72903 pkgtools/pkglint: update to 5.6.10
Changes since 5.6.9:

* ALTERNATIVES files are correctly checked now. Before, pkglint had
  suggested to remove the @PREFIX/ from the alternative, which was
  wrong and simply didn't work.

* Diagnostics about variable assignments are ordered to report the
  left-hand side first and then everything to the right of the
  assignment operator.

* The pkglint output is escaped properly to avoid sending unwanted
  escape sequences to the terminal.

* The items in .for loops are parsed taking "double" and 'single'
  quotes into account since bmake does it in the same way since 2015.

* In DESCR files, overly long lines are only warned about if they
  contain a space and therefore can be made shorter.

* In DESCR files, text like ${PREFIX} only gets a note if it refers
  to a commonly known pkgsrc variable. This avoids distraction when
  a package mentions ${prefix}/bin or ${template.property}.

* Lots of refactorings and small changes.
2018-12-21 08:05:24 +00:00
bsiegert
dcd9b75b1e Revbump all Go packages after go111 update. 2018-12-19 15:46:59 +00:00