Commit graph

1626 commits

Author SHA1 Message Date
rillig
896ceafaeb pkgtools/pkglint: make goyacc accessible to the build 2018-11-11 20:55:23 +00:00
rillig
ca069a9348 pkgtools/pkglint: fix build
go-package.mk needs to be included at the bottom of the package Makefile
since it defines several make targets that pkglint also defines.
2018-11-10 11:45:29 +00:00
rillig
123aacb46c pkgtools/pkglint: don't access the internet during the build
Pkglint needs goyacc, which is provided by devel/go-tools. But that
packages pulls in a lot of dependencies that are not needed for pkglint.
This includes a Perl interpreter and various cryptography packages.

Instead, during build, pkglint installs the only needed tool of that
collection (goyacc).

Since go-package.mk assumes that each pkgsrc package only downloads and
installs a single project, but pkglint now needs two of them (goyacc and
pkglint), most parts of go-package.mk had to be copied here and
implemented directly.
2018-11-10 11:41:40 +00:00
rillig
709e705010 pkgtools/pkglint: fix build when PKGSRC_RUN_TEST is not set 2018-11-08 19:41:32 +00:00
rillig
90b9c2e198 pkgtools/pkglint: remove unnecessary files 2018-11-07 21:04:53 +00:00
rillig
6c78147abf pkgtools/pkglint: update to 5.6.6
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).
2018-11-07 20:58:22 +00:00
bsiegert
ac232c7df5 Revbump all Go packages after go111 update. 2018-11-04 18:37:54 +00:00
jperkin
7e2faa77fb pkglint: go-package.mk needs to come before bsd.prefs.mk 2018-10-19 15:17:26 +00:00
rillig
3ad10c3c9f pkgtools/pkglint: update to 5.6.5
Changes since 5.6.4:

* GCC_REQD should only contain the major version. For GCC versions up to
  4.x, this consists of the first two numbers, such as 4.8, while starting
  with the 5.x series, the major version is only the first number, such as
  7.
2018-10-09 23:17:17 +00:00
rillig
230558eea6 pkgtools/pkglint: update to 5.6.4
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.
2018-10-09 19:12:13 +00:00
rillig
4cf358f8b1 pkgtools/pkglint: Update to 5.6.3
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
2018-10-03 22:27:53 +00:00
rillig
0cd23c95f5 pkgtools/pkglint: update to 5.6.2
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.
2018-09-05 17:56:22 +00:00
rillig
03f184edf4 pkgtools/pkglint: remove TODO file
In the next version, pkglint will report an error if a package has a
README or a TODO file. The content of the current TODO file is still
available at https://github.com/rillig/pkglint/blob/master/TODO.md.
2018-09-05 17:01:03 +00:00
rillig
fa9b3fdffd pkgtools/pkglint: update source files to latest state 2018-08-21 19:21:41 +00:00
rillig
3505d7d933 pkgtools/pkglint: update to 5.6.1
Changes since 5.6.0:

* Fix output of relative paths in the diagnostics (thanks @wiz)
* Fix parsing of ${VAR:ts---}; it is now a syntax error
* Load more type definitions from mk/* instead of hard-coding them
* Lots of refactoring to improve test coverage, fixing several
  small bugs as they were found
2018-08-16 20:41:42 +00:00
rillig
99caa446db pkgtools/pkglint: update to 5.6.0
Changes since 5.5.16:

* Check for negated shell commands (if ! test -z "foo"); they are not
  supported by Solaris.

* Don't check variable permissions for infrastructure files. A warning
  like "may not be set by any package" doesn't make sense for them.

* Check that PLIST_VARS matches PLIST.*, which is especially useful in
  options.mk files.

* Improve checks for options.mk files (for PKG_OPTIONS_SET).

* Prefer options handling with !empty() over checking empty() first.

* Prefer ${MACHINE_ARCH} == i386 over !empty(MACHINE_ARCH:Mi386), for
  single-valued variables.
2018-08-12 16:31:56 +00:00
rillig
365416742f pkgtools/pkglint: make the tests run cleanly 2018-08-09 20:21:42 +00:00
rillig
323d0c0b74 pkgtools/pkglint: Update to 5.5.16
Changes since 5.5.15:

* Add checks for options.mk files

* Treat redundant variable definitions as notes, not as warnings

* Check doc/CHANGES-* for typos in the dates (only for 2018 and later)

* Lots of cleanup in the test code
2018-08-09 20:08:12 +00:00
rillig
630782f1dc pkgtools/pkglint: hotfix for release 5.5.15
* Fixed detection of redundant variable definitions.
* Fixed check for PATH environment variable.
2018-07-28 20:44:45 +00:00
rillig
45e0be2d13 pkgtools/pkglint: update to 5.5.15
Changes since 5.5.14:

* Check that the comments in .endif and .endfor lines match the
  corresponding conditions.

* Check for redundant variables (e.g. MASTER_SITES for R packages).

* Check for accidentally overwritten variables.

* Miscellaneous code cleanup and refactoring.
2018-07-28 18:31:23 +00:00
rillig
d59c283a96 pkgtools/pkglint: updated to 5.5.14
Changes since 5.5.13:

* Suppress duplicate warnings for unknown options in the same file

* Grab acceptable package versions directly from the infrastructure files

* Note about too deeply indented shell programs
2018-07-19 06:38:15 +00:00
rillig
0ccdbc3361 pkgtools/pkglint: Update to 5.5.13
Changes since 5.5.12:

* Allow underscore in package version.
* Warn about SUBST in post-patch and pre-patch phases.
* Allow multiple SUBST blocks per paragraph.
* Code cleanup.
2018-07-12 16:23:36 +00:00
bsiegert
d22fe57854 Revbump all Go packages after lang/go update. 2018-06-12 17:50:20 +00:00
adam
e8b7a8609d Removed 92 from PGSQL_VERSIONS_ACCEPTED 2018-05-21 08:12:23 +00:00
rillig
ea78dd51f1 pkgtools/pkglint: update to 5.5.12
Changes since 5.5.11:
* Improve support for TEST_DEPENDS and USE_TOOLS+= *:test (thanks @leot)
* Add checks for ALTERNATIVES files
2018-05-19 12:58:24 +00:00
rillig
ce27e5d877 Update pkglint to 5.5.11
Changes since 5.5.10:
* Read JVMs and compiler languages from mk/* instead of predefined lists.
* Support TEST_DEPENDS.
2018-05-14 20:25:48 +00:00
rillig
4f39f7beaf Update pkglint to 5.5.10.
Changes since 5.5.9:

* Fix wrong pkglint behavior for .include lines that are guarded by
  corresponding .if exists(...)
* A little bit of refactoring, as always.
2018-05-01 23:30:11 +00:00
rillig
e3a129c57e Update pkglint to 5.5.9
Changes since 5.5.8:
* Improved support for the "strip" tool, which has a special definition
  and is not directly connected to the STRIP variable.
* Miscellaneous code cleanup and new tests.
2018-04-28 23:32:52 +00:00
rillig
e0a582d629 pkgtools/pkglint: update to 5.5.8
Changes since 5.5.7:
* Enable the check for variable order in Makefiles by default.
2018-04-06 21:04:22 +00:00
bsiegert
429ee23e50 Revbump all Go packages after 1.10.1 update.
ok wiz@ for committing during freeze
2018-03-30 11:56:19 +00:00
rillig
63279d80a4 pkgtools/pkglint: remove duplicate files
The definitions from globaldata.go had been moved to pkgsrc.go. Having
these definitions twice led to compile errors.

While here, the file package_test.go doesn't need to be patched anymore
since it gets its @VERSION@ from the constants defined in pkglint.go.
2018-03-25 07:37:39 +00:00
rillig
e124a6faff Update pkglint to 5.5.7
Changes since 5.5.6:

* When pkglint warns about files that are accidentally executable, it
  offers to fix the file permissions.

* Warn about ${HOMEPAGE:=repository/}, since the := modifier should
  only be used with MASTER_SITES.

* When the distinfo file is missing, suggest setting NO_CHECKSUM.

* Several refactorings.
2018-03-24 14:32:49 +00:00
rillig
4aa500ca36 pkgtools/pkglint: update to 5.5.6
Changes since 5.5.5:

* Only offer explanations if an explainable diagnostic has actually
  been logged.

* Clean up code.

* Improve a few diagnostics.

* In any Makefile, treat documented variables as used. This prevents
  warning about defined but unused variables.

* Add support for some variables not previously known to pkglint.
2018-03-04 20:34:32 +00:00
bsiegert
9ab6e4ca7b Revbump all Go packages after Go 1.10 update. 2018-03-04 15:52:12 +00:00
rillig
371a1183ae pkgtools/pkglint: update to 5.5.5
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.
2018-02-19 12:40:38 +00:00
rillig
deaf48767a pkgtools/pkglint: update to 5.5.3
Changes since 5.5.2:

* Fixed lots of bugs regarding autofixing variable assignments in
  continuation lines.
* Fixed checking of MESSAGE files, which also get fixed now.
* In variable assignments, commented assignments are aligned too.
* Fixed a crash when checking an empty patch file.
* The :Q modifier is only checked on predefined variables, to prevent
  the --autofix mode from removing :Q from user-defined variables.
* Fixed lots of bugs in PLIST autofixing: relevant lines had been
  removed, and the sorting was not correct.
2018-01-28 23:21:16 +00:00
rillig
e795354040 pkgtools/pkglint: update HOMEPAGE 2018-01-28 13:40:22 +00:00
rillig
51008f3dc3 pkgtools/pkglint: Update to 5.5.2
Changes since 5.5.1:

* Fixed command line parsing for the --only option.
* Improved alignment of variable values in Makefiles.
* Code cleanup: better abstraction in the tests.
2018-01-27 18:50:36 +00:00
rillig
31a3a6b80c pkglint: Update to 5.5.1
Changes since 5.5:

* Allow filtering log messages by keyword (--only)
* In --autofix and --show-autofix mode, show only fixable diagnostics
* When called with --source, show the source below the diagnostics
* Don't warn about USE_LANGUAGES in ../../mk/compiler.mk
* Fix autofix for .gz in PLIST
2018-01-13 23:56:14 +00:00
rillig
5e7481dcd2 pkglint: Update to 5.5
Changes since 5.4.26:

SUBST blocks are now checked correctly even if they contain conditionals
like .if ... .elif ... .endif.

AUTO_MKDIRS is only suggested for those directories that actually appear
in the PLIST since other directories are not affected by this variable.
2018-01-10 00:39:52 +00:00
rillig
902c8a49a5 Updated pkglint to 5.4.26.
Changes since 5.4.25:

* When autofixing a patch, fix the corresponding distinfo file as well.

* Properly parse ${VARNAME:[\#]};
  the # was interpreted as a comment before.

* Don't add unnecessary :Q to PKG_OPTIONS and related variables.

* Don't warn about missing manual pages. While Debian and other
  distributions do this work, pkgsrc keeps the packages as original as
  possible.

* Autofix redundant ".gz" for manual pages in PLISTs.
2018-01-07 17:08:15 +00:00
rillig
f726ad139c Updated pkglint to 5.4.25.
Changes since 5.4.24:

* More specific warning for "exitcode with pipe shell commands"
* Don't warn that the echo in "echo | sed" could fail
* Allow packages to define custom make targets
* Don't warn about a misplaced LICENSE when a package doesn't define it
* Skip .git directories
* Reduce number of hicolor-icon-theme error messages in PLIST files
* Remove MKCRYPTO, USE_CRYPTO, CRYPTO variable definitions
2018-01-07 01:13:21 +00:00
maya
6e5f1de0c2 pkglint 5.4.24: remove references to crypto restrictions.
Discussed with rillig.
2018-01-02 08:13:15 +00:00
rillig
e93a88ba30 Updated pkglint to 5.4.23.
Changes since 5.4.22:
Only autofix PLIST sorting in simple cases. Before this version, pkglint
sorted the PLIST even when it contained unresolved variable references like
${IMAKE_MAN_DIR}, which resulted in strange and unintuitive orders. These
complicated files are left for human inspection.
2018-01-01 21:55:36 +00:00
rillig
e012ab11fa Updated pkglint to 5.4.22.
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
2018-01-01 18:04:15 +00:00
wiz
67ea766c4c apache22: remove, it was eol'd in June 2017
Remove packages that only work with apache22.
Remove apache22 references.
2018-01-01 10:23:04 +00:00
ryoon
c0c6815977 Some files are moved. Fix build 2017-10-17 03:32:28 +00:00
rillig
ccb81e9920 Updated pkglint to 5.4.21
Changes since 5.4.20:

* Removed obsolete kde3 check
* Removed obsolete WindowMaker variables
* Removed postgresql91
* Removed teTeX
* Removed old Emacs versions 22, 23, 24
* Allow db6
* Allow c++11 in USE_LANGUAGES
* New check for GNOME icon themes
* Added CHECK_RELRO variables
* Refactoring: new package linechecks
* Refactoring: regex.Pattern
2017-10-08 22:31:13 +00:00
wiz
6b593e536e pkglint*: Start sentence with a capital letter
From Thomas Orgis in private mail.
2017-10-02 14:41:21 +00:00
wiz
eef80df883 emacs22*, emacs23*, emacs24*: remove unmaintained emacs versions
As announced in
https://mail-index.netbsd.org/pkgsrc-users/2017/09/11/msg025563.html

This still leaves emacs20, emacs21, and the current version, emacs25.
2017-09-29 12:40:26 +00:00