Commit graph

2355 commits

Author SHA1 Message Date
rillig
c99dd61732 - PkgLint::String::substring accepts an undefined second argument.
- Added PkgLint::String::match_all.
- Make(1) variables of the form $(...) are detected properly.
- The shellword parser's state is printed in --debug mode.
- In double quoted strings, normal text is processed faster.
- The proof of concept for match_all is done with finding absolute
  pathnames in patch files.
2006-01-28 12:24:20 +00:00
rillig
6282c39496 - Added a comment above get_regex_plurals, explaining what it does. 2006-01-28 11:19:07 +00:00
rillig
20511917c5 - Added PkgLint::Util::min and PkgLint::Util::max.
- Rewrote PkgLint::String::substring to make it look less like a Brainf***
  program. I guess this will greatly improve execution speed.
2006-01-28 11:18:17 +00:00
rillig
6af5ebf4c7 - Removed PkgLint::Util::match.
- Added PkgLint::Match, which represents the result of matching a regular
  expression against a PkgLint::String.
- Fixed the arguments to substr in PkgLint::String::substring.
- Added PkgLint::String::match.
- Added a proof of concept in checkfile_patch, in the warning about RCS
  tags. Run pkglint -s --klickibunti to see it.
2006-01-28 11:11:49 +00:00
rillig
0d54162e3d - Found the one variable that slipped through when renaming $file to
$fname.
2006-01-27 02:25:52 +00:00
rillig
a45550b4ce - Fixed inconsistent use of white-space. 2006-01-27 00:56:26 +00:00
rillig
825e4abfb6 - Reformatted simple getter/setter methods to save some space. 2006-01-27 00:55:08 +00:00
rillig
48fa42a5a7 - Globally renamed all variables called $file into $fname. The identifier
$file is reserved for variables of the type PkgLint::File.
2006-01-27 00:48:57 +00:00
rillig
f833e97ec7 - Added the two data types PkgLint::File and PkgLint::Location. I will need
them soon.
2006-01-27 00:07:07 +00:00
rillig
3a4982c5f2 - Added the PkgLint::Util::match function that matches a string against a
regular expression and saves the values of the volatile @- and @+ arrays.
2006-01-26 23:05:49 +00:00
rillig
482bedac8b Even in quick-install mode, the self test should be run. 2006-01-26 16:20:45 +00:00
rillig
95d3203cb2 Added a ``quick-install'' target that allows me to install pkglint in three
seconds instead of 40.
2006-01-25 22:04:26 +00:00
xtraeme
391437abe6 Fix false positives about the test that checks for pkg-config files
in WRKSRC. Now it works properly.

Bump to 1.33.
2006-01-25 05:10:00 +00:00
rillig
f43a67d266 - In --debug mode, all variable assignments that occur when the package
Makefile is read in are logged to give further aid in debugging.
- Warnings about PKGNAME and DISTNAME are anchored at line numbers instead
  of the package Makefile.
2006-01-25 00:23:48 +00:00
joerg
fa0e987ec8 Add conditional code to ignore the non-numeric part of an OS version
for the sake of compatibility tests in pkg_add.
E.g. DragonFly versions like
        1.4.0-RELEASE
are reduced to
        1.4.0

This code is currently enabled for DragonFly only.
2006-01-25 00:20:09 +00:00
rillig
365204f1fe - As "set -- $i" is often used for splitting variables, don't warn if shell
variables appear unquoted here.
2006-01-24 20:41:07 +00:00
rillig
4dfa584a87 - In shell variable assignments, no quoting is needed. 2006-01-24 20:26:11 +00:00
rillig
ec6e11887d - Accept "\"...\"" as valid CPP macro, as some old configure scripts need
it that way. In --debug mode, a warning is printed.
2006-01-24 20:07:54 +00:00
rillig
972b1c15e8 - Made the parser for distinfo files stricter. It can catch mismatched
filenames now.
- MD5 checksums are marked as deprecated.
- Warnings from distinfo files now appear correctly sorted.
2006-01-23 01:51:46 +00:00
rillig
f08ac4fcfb - Made -Wvarorder work like stated in the documentation. I had replaced the
wrong ``false'' with $opt_warn_varorder.
- Fixed the detection of $seen_Makefile_common.
2006-01-23 00:04:50 +00:00
rillig
bc1f74eace - Instead of only allowing the :Q modifier for quoting, allow any modifier
that ends in :Q.
- When NO_CONFIGURE ist defined, REPLACE_PERL does not work.
2006-01-22 23:35:04 +00:00
tron
393e2ba708 Update "rpm2pkg" package to version 2.1.1. Changes since 2.1:
- Fixed GCC 4.x build warning (which would have resulted in an error
  with future GCC versions).
- Depend on newer version of "rpm" package to fix build under Mac OS X.
2006-01-21 20:46:29 +00:00
jlam
758d912e33 Update package Makefile now that bsd.pkg.extract.mk is using the
"extract" script for extraction.  Many cases where a custom EXTRACT_CMD
simply copied the distfile into the work directory are no longer
needed.  The extract script also hides differences between pax and
tar behind a common command-line interface, so we no longer need code
that's conditional on whether EXTRACT_USING is tar or pax.
2006-01-21 18:57:40 +00:00
rillig
6abf92a1f4 Updated pkglint to 4.54.
Changes since 4.53:
- Added about 50 new variables to be type-checked.
- For unknown variables, the type is guessed from the variable name.
- In patch files that patch Makefiles, added lines are checked for
  absolute pathnames.
- Replaced the -Wdebug option with --debug, so that the debugging warnings
  don't show up when using -Wall.
- Many minor improvements.
2006-01-20 13:46:04 +00:00
rillig
46b20cd5dc - Added the -d|--debug command line option, which replaces -Wdebug. The
latter has been removed.
- Added -Wvarorder (default: disabled) to check the ordering of variables
  in simple packages.
- Using ${WRKSRC}/.. is only considered a warning, not an error, because
  there are packages that work nevertheless. Using this construct remains
  discouraged.
- Replaced most of the TODOs in the source code with code that prints
  a warning in --debug mode.
- The characters '.' and '+' are allowed in BuildlinkPackages.
- Variables *_FLAGS and *_ARGS that have their type guessed based on the
  name don't have to be assigned using the += operator.
- Variables that are assigned using the != operator are not checked for
  type compliance.
- README files are not marked as unknown when they appear in a package
  directory.
2006-01-20 13:33:37 +00:00
rillig
07a40aebce Setting BROKEN_GETTEXT_DETECTION to "no" really means "no", so allow it. 2006-01-20 13:03:10 +00:00
rillig
e6e1a0b8eb Despite its name, BUILTIN_FIND_FILES_VAR is a _list_ of variable names. 2006-01-20 12:35:51 +00:00
reed
6491d05a69 Add include/X11/XlibConf.h to xorg list. I noticed and added that
a few weeks ago when I was doing some builds using modular-xorg.
(Now that new Xorg is in, maybe there are some others to add?)

Update version.
2006-01-19 01:05:24 +00:00
rillig
de8b313520 - Added some more state transitions and warnings to the shellword parser.
It has come to the point where almost any further improvement means to
  adopt a real recursive parser.
2006-01-17 23:01:17 +00:00
rillig
97e5b5c2cd - In -Wextra mode, emit warnings if a "?=" operator occurs before
../../bsd.prefs.mk is included. (It is only shown in -Wextra mode
  because it is still quite unreliable.)
2006-01-16 01:37:39 +00:00
abs
59b795ff54 Update pkgtools/pkg_chk to 1.66
Fix incorrect quotation in test
2006-01-15 12:32:56 +00:00
rillig
d2bf446cb1 - Implemented a first prototype of the diagnostics with character-wise
precision in checkfile_patch for the warning for context diffs.
- The --source option produces more condensed output than before.
- The diagnostics with character-wise precision are colored using
  ANSI/VT100 color sequences. Support for other output formats will be
  added later.
2006-01-15 01:35:55 +00:00
rillig
76967e1b58 - The pkgdir variable is only defined when checking a pkgsrc package. For
other directories it is undefined. This avoids some false warnings when
  checking files in pkgsrc/mk/.
2006-01-14 11:56:09 +00:00
rillig
fa01b55c47 - Reduced the number of false warnings for relative directories. 2006-01-14 11:44:04 +00:00
rillig
03370d625a - Unquoted make variables in shell words can be fixed automatically. As
with the change from December 2005, when using this feature, care should
  be taken for variables that are pre-quoted.
- In patch files that patch Makefiles, added lines are checked for
  absolute pathnames.
2006-01-14 01:48:08 +00:00
rillig
a1ca3d5c5a Added LIBTOOL_OVERRIDE. 2006-01-13 00:59:39 +00:00
rillig
913ad8e379 - When guessing the type of variables, *_DIRS and *_FILES are both of the
type List of Pathmask.
2006-01-13 00:42:08 +00:00
rillig
59005a739b - Added about 50 variable types to makevars.map.
- Added some variable types.
- For unknown variables, the type is guessed from the variable name.
- Added more checks for relative pathnames.
- Improved the shell parser once more.
2006-01-12 22:28:06 +00:00
wiz
cf52b6b4c0 Bump date for some new features. 2006-01-12 21:50:43 +00:00
joerg
599b02b412 When creating the sorted list of binary packages, "ls -t *.tgz" can
easily overflow the argument space e.g. on DragonFly. Replace this
statement with "ls -t | grep '\.tgz$'" to remove this constraint.
2006-01-12 21:17:16 +00:00
joerg
ae610a4540 Add runtime dependency of xpkgwedge on imake and xmkmf.
When using non-native X11, xpkgwedge could be installed before imake
and host.def en up with just the xpkgwedge.def include. This means
that ProjectRoot as set by xorg's host.def is not used and wrong
path names are used. This run time dependency is the easiest way to
ensure proper order, but isn't perfect. Just providing a fixed host.def
and a secondary include file for Lesstif to modify breaks with
USE_XPKGWEDGE=NO, so keep the old approach.

Discussed with jlam@
2006-01-12 19:02:34 +00:00
rillig
16a2cd8def Updated pkglint to 4.53.
Changes since 4.52:
- New warning categories "debug", "space", "quoting" that can be selected
  independently.
- Improved the parsers for shell commands and shell words.
- Added warning for using $(...) in shell programs, as the Solaris /bin/sh
  doesn't support it.
- Added some warnings about quoting.
- Some other minor changes.
2006-01-12 14:05:50 +00:00
rillig
4eed0be377 Added APACHE_MODULE. 2006-01-12 13:59:42 +00:00
rillig
0740dd8c6c - Allow '^' to appear unquoted in shell programs, although it ``is an
obsolete synonym for the pipe operator "|", so you must protect it with
  quotes''. (Kernighan/Pike, The UNIX Programming Environment, 1984.)
- $@ is another well-known shell variable.
- All substitution arguments to ${SED} and ${PAX} should be quoted whether
  they contain special characters or not.
2006-01-12 13:51:54 +00:00
rillig
9af416c16b - The shell variables $!, $# and $? are recognized as such. All other
occurences of a $ in double quoted strings result in a warning.
2006-01-12 13:19:57 +00:00
rillig
c0fc81f666 - Improved the parsers for shell words and shell commands. Parsing errors
are only shown in -Wdebug mode, as the diagnostic messages are too
  cryptic.
- Added detection for the $(...) replacement for backticks, as the Solaris
  /bin/sh cannot handle them.
2006-01-12 13:01:47 +00:00
rillig
cb558f2a78 - Defining and using make variables starting with an underscore is only
worth a warning, not an error. There are worse things at the moment that
  need to be fixed.
2006-01-12 10:39:30 +00:00
rillig
4d9663f2a9 - Added three warning categories "debug", "quoting" and "space" that can
be enabled independently. They are all disabled by default.
- A note is emitted if variable definitions are aligned using space instead
  of tabs.
2006-01-12 10:32:40 +00:00
rillig
2ef3b243e0 - Added the package PkgLint::String, which will be used for improving the
precision of the diagnostics. It is currently unused.
2006-01-12 04:31:30 +00:00
rillig
e6e6cf9fb7 - Added plist-clash.pl to the list of files that have @PERL@ replaced. 2006-01-12 04:27:58 +00:00
rillig
fb188361c0 - In the shell command parser, go to state SCST_CONT instead of SCST_START
after parsing the command line options of ${INSTALL}.
- Don't warn for CFLAGS that reference other make variables.
2006-01-11 22:57:10 +00:00
rillig
4907cb1168 - In resolve_relative_path, the depth of the path should only be adjusted
in about half the cases -- added an additional parameter.
2006-01-11 12:25:19 +00:00
rillig
271edbd2ec Fixed spacing issue. 2006-01-11 11:42:27 +00:00
rillig
53e93b0ab9 - Renamed PkgLint::FileUtil::Line to PkgLint::Line in preparation to some
upcoming changes.
2006-01-11 04:29:12 +00:00
christos
cd18fc91dc Use ${ABI} for library files, patterned after what SGI does. This makes
X11 packages work on amd64 linux boxes. From Benjamin Shi.
2006-01-10 16:56:42 +00:00
rillig
2cd8334aa7 Updated pkglint to 4.52.
Changes since 4.51:
- The occurence of a symlink other than work* inside the pkgsrc tree is
  not an error, just a warning.
- SUBST_MESSAGE should not be quoted.
- If -Wextra is enabled, all make variables that are used in shell commands
  are checked for proper quoting.
- Improved the parser for shell commands.
- Some other minor changes.
2006-01-10 00:52:00 +00:00
rillig
c24a72897b Fixed the simple part of the pkglint -Wall warnings. 2006-01-09 23:39:55 +00:00
rillig
1d78045e51 - Even in an unquoted shell word, variables should be quoted. For example,
${PREFIX:Q}/foo.
- The semicolon after the "for" loop in the shell does not mean that some
  exitcode is ignored, so don't print warnings for it.
2006-01-09 23:14:45 +00:00
rillig
9bb9aae442 - Only check make variables for deprecation and $(...) instead of ${...}. 2006-01-09 03:22:45 +00:00
rillig
043613d277 - Added "Please use ${FOO} instead of $(FOO)."
- It is an error if the COMMENT has the default value from url2pkg.
2006-01-09 02:47:56 +00:00
joerg
a32d8f5c53 Unbreak by adding NO_BUILD=yes. 2006-01-08 21:00:22 +00:00
rillig
2464072040 - Rewrote the state transition of the shell command parser. The source
code now needs less lines than before. For unknown state/shellword
  combinations, warnings are printed (currently none).
2006-01-08 15:55:13 +00:00
rillig
74e4928049 - In shell commands, "case" statements are parsed properly. (Fixes a false
positive warning in mk/subst.mk.)
- Improved debugging support for parsing shell commands by printing the
  current state and word in -vv mode.
2006-01-08 14:14:36 +00:00
wiz
d182d0d618 Sync with usr.sbin/pkg_install 1.58:
Use MaxPathSize instead of PATH_MAX.
2006-01-08 12:25:06 +00:00
rillig
4d0e362738 - Enabled the quoting warning for SUBST_MESSAGE (this time the other
direction: it had been quoted too much in the past).
2006-01-07 23:29:23 +00:00
rillig
6e63ea31f3 - Added SUBST_MESSAGE to the list of checked variables. The plan is to
remove the quoting from the definitions in the Makefiles.
- When checking with -Wall, print warnings about possibly misquoted
  variables in the various states of the shell word parser.
2006-01-07 20:00:00 +00:00
seb
5ad846112f Update to version 1.25.
Fix libkver support for pkg_comp's build, auto and install targets,
Reported broken and fix tested by salo@.

Also ensure libkver is built, if needed, even before digest.

Approved by jmmv@
2006-01-06 23:08:51 +00:00
rillig
6bf7eb18c8 - Moved the code for checking macro names in patch lines into its own
subroutine, as it has no code that is specific to patch files.
2006-01-06 21:06:06 +00:00
rillig
dcf63d1b4b Fixed pkglint warnings about incorrect quoting and unsorted PLIST. 2006-01-06 19:46:26 +00:00
rillig
d66e28a8c5 - s/existant/existent/ 2006-01-06 18:02:05 +00:00
rillig
b29b41bfc1 - Renamed checkfile_patches_patch to checkfile_patch. 2006-01-06 17:43:18 +00:00
joerg
90ac0fb998 Use SUBST framework. 2006-01-06 17:28:20 +00:00
rillig
7fa0c4e8e9 Added an RCS Id and an introductory comment. 2006-01-06 17:24:38 +00:00
joerg
a11c0f7879 Use SUBST framework. Use PERL5 instead of ${PREFIX}/bin/perl to get
the location of the interpreter.
2006-01-06 17:10:58 +00:00
joerg
98faef6634 Use SUBST framework. 2006-01-06 16:58:32 +00:00
rillig
8005613009 - It is not an error to have symlinks in pkgsrc -- just a warning. Any
directory entry besides regular files, directories and symlinks is still
  an error.
2006-01-06 13:42:47 +00:00
wiz
dc560ec778 Depend on cdrtools instead of cdrecord. Bump PKGREVISION.
Update some messages/comments.
2006-01-05 23:29:04 +00:00
xtraeme
a429287789 Remove GNU Autoconf's configure.lineno file if it's there. 2006-01-05 17:42:24 +00:00
xtraeme
40bf851429 Move the PKGCONFIG_OVERRIDE lines after USE_TOOLS, GNU_CONFIGURE, etc. 2006-01-05 17:32:50 +00:00
xtraeme
6c95a6da67 Update to 1.32:
* Don't use ${WRKSRC} for PKGCONFIG_OVERRIDE (it's assigned automatically)
* If there are pkg-config files, now it will add "USE_TOOLS+= pkg-config".
2006-01-05 17:26:54 +00:00
christos
c6761ed17e Handle newer versions of Berkeley DB. Our algorithm is:
- if you have > db1 the probably you have db_185.h which means
  that dbopen is really __db185_open, and we'll prefer that.
- else if you have db1, then you have db1/db.h and dbopen
- else if you have db.h, then this is either the one from db1 and it will
  work with -ldb having dbopen, or it will not.

Note that the compatibility option on __db185_open() will actually not create
or update db1.85/1.86 files, but it will use the current format of the db
library. This compatibility layer is source code only.
2006-01-04 23:33:23 +00:00
joerg
a485b489e3 Ask for warnings so that e.g. CONFIGURE_DIRS has overrides for
config.guess and config.sub as well.
2006-01-03 20:52:27 +00:00
abs
9ca94e98c0 update pkg_chk to 1.64
- Allow -U of filenames on the commandline
2006-01-03 19:00:09 +00:00
rillig
1c0702676a Cleaned up the TODO list. 2006-01-02 10:12:09 +00:00
rillig
0ff3a14888 - For possibly misquoted variables the current shellword state is
printed (-vv only).
- TODO: Decide which variables may be used in which quoting states.
2006-01-02 10:09:03 +00:00
rillig
862032689f * record with each substring its source location to be able to make
even more precise diagnostics
2006-01-02 09:42:52 +00:00
rillig
83f5dee91f Updated pkglint to 4.51. Welcome to the Fahrenheit release.
Changes since 4.50:
- Extended the quoting checks for make variables to shell commands.
- Added a check for unquoted shell variables (only with -Wextra).
- Some other minor changes.
2006-01-02 08:29:55 +00:00
rillig
11b91ee6d2 - Fixed the wording of the message when CONFIGURE_DIRS and friends are
prefixed with ${WRKSRC}. It had been plainly wrong.
2006-01-02 03:02:29 +00:00
rillig
d3a90242d3 - Removed the type guessing code for variables with unknown type, as
this code has led to duplicate diagnostics. It had been misplaced as
  well.
2006-01-02 01:20:31 +00:00
rillig
b42c46442f - Added MESSAGE_SUBST, PKG_GROUPS, PKG_USERS. 2006-01-02 01:18:24 +00:00
rillig
bc5fc19c6f - Unquoted shell variables may appear in for loops. 2006-01-01 22:08:22 +00:00
rillig
08274c2f69 - Uncommented the note that CONFIGURE_DIRS, BUILD_DIRS and INSTALL_DIRS
don't need to be prefixed with ${WRKSRC}, now that there will be no
  more pullups to 2005Q3.
2006-01-01 21:58:12 +00:00
rillig
2d6877dcb0 - Added a check for unquoted shell variables (only with -Wextra). 2006-01-01 21:55:44 +00:00
rillig
bab261e700 - Integrated checklines_patches_patch back into checkfile_patches_patch. 2006-01-01 19:58:36 +00:00
rillig
54171b1096 - Fixed typo: It's __NetBSD_Version__, not __NetBSD_Version_. 2006-01-01 19:07:20 +00:00
wiz
faf65456ad Remove stuff that was marked for removal after 2005Q4. 2006-01-01 18:53:03 +00:00
rillig
be3a661d5b - Added a parser for shell words.
- Added warnings for imperfect quoting style inside double quotes.
- All shell commands are checked for correct quoting of make(1) variables
  in shell assignments like --prefix=${PREFIX:Q} and TMPDIR=${WRKSRC:Q}.
2006-01-01 18:40:12 +00:00
rillig
ea3cb56d30 - Moved the code that checks for valid shell words into its own subroutine
because it will be extended soon.
2005-12-31 15:00:15 +00:00
rillig
068c3c65d5 Updated pkglint to 4.50.
Changes since 4.49:
- Added checks for shell commands whose exitcodes are ignored.
- Added checks for CFLAGS, CPPFLAGS and CXXFLAGS.
- Improved diagnostics.
- Various bugfixes.

Changes to lintpkgsrc:
- Avoided double occurrence of pkg_install.
2005-12-31 14:09:51 +00:00
rillig
816ce58996 Added some variables, strengthened the checks for some other variables. 2005-12-31 14:02:28 +00:00
rillig
5b0ebb51c6 - Restructured the header comment.
- Rewrote the message formatting.
- The indentation of explanations is changed to be always a tabulator
  character instead of depending on the last message.
- In verbose mode, statistics about the frequency of the individual
  messages are printed before exiting.
- The command line option -Wextra enables additional warnings that are
  not enabled by default because I have been told that Alistair would kill
  me for them. :)
- Improved the shell tokenizer by recognizing parentheses.
- Improved checking of pkgsrc-internal files (mostly in pkgsrc/mk).
- Added a (trivial) spellchecker.
- Added checks for shell code that ignores the exitcode of commands.
- Added checks for CFLAGS, CPPFLAGS and CXXFLAGS.
- Avoided false positive warnings for absolute filenames in AWK code.
- Added checks for .for variables.
- Pkglint can check single files in directories that are three levels deep.
  This is mostly useful for checking patch files.
2005-12-31 14:01:46 +00:00
rillig
7255646a18 Since pkg_install appears in the pkg_info listing, there is no need for
special treatment. Reported by Christoph Egger via private mail.
2005-12-31 09:07:22 +00:00
joerg
ff4b54c998 Index: has sometimes different precedence in patch, avoid problems. 2005-12-30 16:27:13 +00:00
jlam
dc9594e09d Remove USE_PKGINSTALL from pkgsrc now that mk/install/pkginstall.mk
automatically detects whether we want the pkginstall machinery to be
used by the package Makefile.
2005-12-29 06:21:30 +00:00
reed
45d9dae994 Honor PKGMANDIR. 2005-12-27 17:34:53 +00:00
seb
37d945e229 Lower expectations, both others' and mine: relinquish stewardship 2005-12-27 13:54:57 +00:00
rillig
1ddd52875f lintpkgsrc needs pkgtools/digest, so readd it to the DEPENDS. 2005-12-18 15:20:21 +00:00
rillig
b776d7dde2 Synchronized the way the checksum of patch files is computed with the one
that is used in the rest of pkgsrc. This avoids false positive errors.
2005-12-18 14:25:40 +00:00
jlam
2558c0291d Change my MAINTAINER email address to the one I've been using for
pkgsrc work.
2005-12-17 05:20:21 +00:00
dillo
f9639751a9 Fix precedence botch which breaks invocation using source. 2005-12-13 15:26:05 +00:00
wiz
525916457d NetBSD capitalization police. 2005-12-13 12:03:47 +00:00
rillig
18cff5b614 + ERROR: Other Makefiles must not be included. Use Makefile.common instead. 2005-12-12 21:36:45 +00:00
wiz
7923936df5 Sort options in SYNOPSIS, bump date for -S. 2005-12-12 14:03:20 +00:00
dillo
6ff6eb177b Add new option -S to create summary file of binary package directory.
Use this summary file to support using remote binary packages.

Okayed by agc and abs.
2005-12-12 13:36:37 +00:00
rillig
9c2bd09a33 * check quoting in CFLAGS+= -DPREFIX=\"${PREFIX:Q}\" 2005-12-11 22:07:46 +00:00
rillig
80b3d9a596 Improved diagnostic of the warning for @comment in variables. 2005-12-09 08:40:40 +00:00
rillig
5e79129a20 - Improved the wording of the explanation regarding relative directories.
- Fixed a bunch of format string bugs. (As this is not C, these were
  only bugs, not vulnerabilities. ;))
2005-12-08 21:13:49 +00:00
dillo
2b4de40b79 sync with src (revision 1.115):
(pkg_do) When marking already installed package as manually installed,
         only print message if we succeeded.

Noted by wiz.
2005-12-08 19:41:04 +00:00
rillig
a1ff561a90 Updated pkglint to 4.49.
Changes since 4.48:
- 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.
- Extended the --autofix option to all Makefile* and *.mk files. Before, only the
  package Makefile could be fixed.
- Rewrote the detection of direct use of tool names.
- Append-only lists may be initialized using the "?=" operator.
- The typical form of ShellWords for CONFIGURE_ARGS, --foo=${FOODIR}, is checked for
  quoting errors.
- All PKG_OPTIONs are checked whether they are documented in mk/defaults/\
  options.description.
- Many small fixes and improvements.
2005-12-08 10:57:59 +00:00
rillig
ab84b76ce4 Cleaned up the TODO list. 2005-12-08 10:47:38 +00:00
rillig
081ebe2d92 The option names are now checked if they are in
mk/defaults/options.description.
2005-12-08 10:43:04 +00:00
rillig
1f93724529 - Fixed a typo (SUBST_PLIST => PLIST_SUBST) noted by wiz. 2005-12-08 10:07:20 +00:00
rillig
ebba7b0a8c - Added a warning that prevents the quoting issues from the recent
"pkglint --autofix" change. Added a long and detailed explanation for it.
2005-12-08 09:01:08 +00:00
rillig
0ed1c6a38d - All PKG_OPTIONs are checked whether they are documented in mk/defaults/\
options.description.
- Added the checkline_relative_pkgdir() subroutine, as the code is useful
  in two different places.
2005-12-07 21:39:59 +00:00
rillig
45edf96e98 - Fixed a comment. The order of subroutines is no longer historical. 2005-12-07 19:46:51 +00:00
rillig
ddf867e458 I've sent joerg a patch which would fix his TODO item. 2005-12-07 18:47:34 +00:00
rillig
59f4a103be - Added a check that exists if RelativePkgDir exists. Suggested by wiz in
a private mail.
2005-12-07 18:46:28 +00:00
rillig
e55cea632a - Changed the type of PKG_OPTIONS_VAR from Varname to PkgOptionsVar. Added
a check that PKGBASE is not used in PKG_OPTIONS_VAR.
- Added some macros to the list of portable CPP macro names.
2005-12-06 22:07:35 +00:00
rillig
e12c8a5077 - Moved checkline_mk_varassign() below checkline_mk_vartype() to avoid
forward references.
2005-12-06 17:37:06 +00:00
rillig
d526260071 - Improved the heuristics for shell words by allowing pkgsrc variables with
a "$" in the modifier part, as long as they don't contain references to
  other variables.
- Removed checkline_mk_direct_tool_use().
- Renamed checkline_mk_shellcmd() to checkline_mk_shelltext(). This sub-
  routine is also used for checking the right hand side of variable assign-
  ments.
- Renamed direct_tools_ok_vars to non_shellcode_vars, which is more
  appropriate. Added some variables to it that produced false positive
  warnings.
2005-12-06 17:32:12 +00:00
rillig
e3aeff9129 * IMAKE_MANNEWSUFFIX should be deprecated in PLISTs, says Joerg. 2005-12-06 16:42:15 +00:00
rillig
8c635c3030 - Removed the checklines_mk() subroutine and copied the code to
checklines_package_Makefile(). Then, renamed
  checklines_package_Makefile() to checklines_mk(), as it not only
  applies to the main package Makefile.
- Fixed the regular expression for detecting ambiguous variables like
  $f, which could mean either ${f} or $$f.
- When checking for deprecated variables, also mention the ones that
  don't have modifiers.
2005-12-06 16:13:28 +00:00
rillig
e9a455da93 - Integrated the code from checklines_mk_deprecated_variables() into
checkline_mk_text() and checkline_mk_varassign(). This saves 20 lines
  and makes the warnings appear ordered by line number.
2005-12-06 15:47:14 +00:00
rillig
01f34446ba - Improved the heuristics for detecting direct use of ${TOOL}s.
- Moved the whole complicated code from checklines_package_Makefile() to
  checkline_mk_shellcmd() and checkline_mk_varassign().
- Reenabled the -Wdirectcmd options by default.
2005-12-06 15:22:28 +00:00
rillig
4cff6fbbc6 Reordered the complete file. Grouped subroutines by name (checkline_*,
checklines_*, checkfile_*). No functional changes.
2005-12-06 14:15:02 +00:00
rillig
df0a56361d Collected the routines that load pkglint-specific data in one section.
No functional changes.
2005-12-06 13:23:16 +00:00
rillig
2c55734d95 - Renamed get_make_vars_typemap() to get_vartypes_map().
- Added specialized subroutines for checking a single line.
- Removed checklines_Makefile_varuse().
- Removed checklines_direct_tools(), which has been replaced by the
  specialized routines mentioned above.
2005-12-06 13:16:23 +00:00
rillig
6a6a3411e1 - Rewrote the code that checks for direct use of tool names. It is
disabled by default, as I am currently working on it, and neither the
  current nor the previous version is good enough for the end user.
- Pkglint can now distinguish the two kinds of tools: The ones that
  should be used like ${TOOL} and the ones that are provided in the
  .tools/bin directory. The list of the first kind of tools is extracted
  from the mk/tools/ directory instead of being hard-coded. This adds
  a whole lot of new warnings.
2005-12-06 11:41:14 +00:00
ben
d0a9fc6a67 Specify the full path to tar when unpacking a package.
Modify pfcexec so the new process file name can be different from argv[0].
This fix is from Peter Postma, and it addresses PR#32228
2005-12-06 01:08:09 +00:00
rillig
7276fc4b34 - Improved detection of valid shell words once more.
- Rewrote the code for loading the deprecated.map file. It is only
  loaded once now. The code that checks for use of deprecated variables
  can handle multiple variables in a single line now.
2005-12-06 01:07:20 +00:00
rillig
a86447cb07 - Improved the regular expression for shell words by recognizing make(1)
variables that are not nested.
2005-12-05 23:50:16 +00:00
rillig
404ae4e715 - The heuristics for unnecessary .undef directives after .for were
unreliable, hence they are not fixed (deleted) automatically.
2005-12-05 21:56:13 +00:00
rillig
79c16d74db - Allow the "-" character in the "variable name" part of a ShellWord
that is an assignment. This change extends the quoting checks to
  CONFIGURE_ARGS in a usable way.
2005-12-05 21:46:18 +00:00
rillig
b71a1d488b Fixed pkglint warnings. The warnings are mostly quoting issues, for
example MAKE_ENV+=FOO=${BAR} is changed to MAKE_ENV+=FOO=${BAR:Q}. Some
other changes are outlined in

    http://mail-index.netbsd.org/tech-pkg/2005/12/02/0034.html
2005-12-05 20:49:47 +00:00
rillig
624eed5892 Don't fix patch files automatically, since after patching them the checksum
is changed, and the distinfo file is not updated automatically.
2005-12-05 20:23:44 +00:00
rillig
97d5db5a7f Regenerated distinfo to include the latest change to patch-ac. Contrary to
my expectations, NO_CHECKSUM only applies to the downloaded distfiles, not
to pkgsrc patches.
2005-12-04 15:50:30 +00:00
rillig
9470c06fdf - In PLIST files, only suggest replacing @unexec rmdir ... with @dirrm
for directories starting with %D.
- Converted load_make_vars_typemap() to the common form of caching
  subroutine. This makes pkglint about 10 percent faster.
- Added explanations for the :Q and the :M*:Q operators in Makefiles.
2005-12-03 03:16:18 +00:00
rillig
714c2498e8 * check that all values used for the PKG_OPTIONS are documented in
mk/defaults/options.description. Requested by Antoine Reilles via
  private mail.
2005-12-02 22:48:13 +00:00
rillig
e80f0f0519 - Allow the "?" character in Dependency. It is used as a placeholder for
a single character. Seen in some package versions like "pkg-200211??".
- Allow the "," and the "@" in filenames.
- Allow the "gopher" scheme in URLs.
- Don't warn for unexpected PERL5_PACKLIST, bases on PKGNAME, if the latter
  contains references to other variables.
- When PKGNAME is equal to DISTNAME, this is not a warning, only a note.
2005-12-02 20:15:00 +00:00
rillig
255f1d085f Added CONFLICTS, CC and CXX. The latter two are marked as read-only.
(Hi hubertf.)
2005-12-02 18:47:58 +00:00
wiz
f346082599 Mark USE_SOCKS as deprecated. 2005-12-02 17:09:12 +00:00
rillig
1fd599b0f0 Removed the partial RCS Id tag from patch-ac. Didn't update distinfo, as
NO_CHECKSUM is set in the ../digest/Makefile, which is included, so it
won't be checked anyway.
2005-12-02 16:30:07 +00:00
rillig
04433f52be Removed the warning that PKG_JVM was deprecated and PKG_DEFAULT_JVM
should be used instead. The latter has disappeared somewhat surprisingly
from pkgsrc.
2005-12-02 09:44:03 +00:00
rillig
0785914323 Allow append-only lists to be initialized using the "?=" operator, in
addition to initializing them to a commented empty value and using the
"+=" operator. Reenabled the check for BUILDLINK_RECOMMENDED.
2005-12-02 09:01:32 +00:00
rillig
2d6ed0430a Disabled the type check for BUILDLINK_RECOMMENDED, as it has produced
too many false positive warnings. Too bad that make(1) does not have a
"?+=" operator.
2005-12-02 08:56:09 +00:00
rillig
01461882e8 Allow direct use of tool names if the tool name is preceded by "${...}/". 2005-12-02 08:44:23 +00:00
rillig
205684d2a5 Unnecessary .undef directives in Makefiles can be fixed automatically if
all mentioned variables have been used in .for loops before.
2005-12-02 08:26:52 +00:00
rillig
dce6142cda All *.mk and Makefile* files can now be fixed automatically. 2005-12-02 08:08:36 +00:00
wiz
9dba4230f6 Mark USE_RSAREF2 for removal after 2005Q4. 2005-12-01 20:21:55 +00:00
wiz
382d475f21 Move USE_OPENLDAP from makevars.map to deprecated.map. 2005-12-01 20:13:16 +00:00
wiz
8958652d15 Move USE_INN from makevars.map to deprecated.map. 2005-12-01 19:48:05 +00:00
wiz
1c6d543c75 Move USE_OSS from makevars.map to deprecated.map. 2005-12-01 19:20:14 +00:00
wiz
c79f85ac70 Move USE_XFACE from makevars.map to deprecated.map. 2005-12-01 19:11:20 +00:00
wiz
3bfed04ca6 Move USE_SJ3 and USE_WNN4 from makevars.map to deprecated.map. 2005-12-01 19:08:15 +00:00
wiz
7f19d70f3b Move some obsolete variables from makevars.map to deprecated.map. 2005-12-01 18:26:01 +00:00
rillig
0d56f2ccee - RCS tags that appear in the @@ lines of patches in unified diff format
can be fixed automatically.
2005-12-01 17:00:52 +00:00
rillig
b1429f5adb - In resolve_relative_path(), PKGSRCDIR is replaced with $pkgsrcdir.
- In checkline_relative_path(), an info message is generated if a filename
  could not be resolved completely.
2005-12-01 16:11:27 +00:00
rillig
d9fbb06633 Unified the handling of relative pathnames and suppressed an error message
that files containing ${FOO} could not be found.
2005-12-01 15:21:56 +00:00
rillig
6354c2df6d ... and another fix for the same problem ... 2005-12-01 14:31:24 +00:00
rillig
b6c7e3f3b1 Bugfix for revision 1.402, in which the check for relative pathnames has
been rewritten.
2005-12-01 14:14:49 +00:00
rillig
dc15fda19c Adjusted the version number to the one that has been announced. (4.49 =>
4.48.)
2005-12-01 14:07:23 +00:00
rillig
924a4f8968 - Added the subroutine checkline_relative_path().
- 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.
2005-12-01 14:01:59 +00:00
rillig
9d462108c7 Updated pkglint to 4.48.
Changes since 4.47:
- Output warnings for partial RCS tags in patch files.
- Added many warnings concerning Makefile directives and make targets.
2005-12-01 13:44:11 +00:00
rillig
d0c51b549c - Improved coverage of Makefile checks. Now every line of a Makefile or a
*.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.
2005-12-01 13:40:39 +00:00
rillig
18b653a43b - Made the check for spurious RCS tags in patches less strict. Now it finds
partial tags like $NetBSD:... that don't have a trailing "$".
2005-12-01 09:03:00 +00:00
rillig
8db730a262 - Clarified the documentation of the --import command line option. 2005-12-01 08:45:37 +00:00
rillig
8f38ceeec1 Updated pkglint to 4.47.
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.
2005-12-01 04:11:56 +00:00
rillig
b8dbe27051 Replaced the DESCR from the year 2001 with a current one, since pkglint has
changed since that time.
2005-12-01 04:05:36 +00:00
rillig
5336c8a86d Fixed two typos. 2005-12-01 03:12:09 +00:00
rillig
34fc9c76f2 - Reintroduced the check for absolute pathnames in shell commands. This
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.
2005-12-01 03:10:16 +00:00
rillig
36c0219841 - Disabled the check for direct use of tool names completely, as there are
two different kinds of tools in pkgsrc, which need different checks.
2005-12-01 01:45:54 +00:00
rillig
b8deaf4629 - Fixed a bug that had been introduced in revision 1.391, preventing
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.)
2005-12-01 01:19:30 +00:00
rillig
6f1ef6bc47 - Added __STDC__, __GLIBC__ and __INTERIX to the list of known macros.
- The macro __sparc__ should be replaced with __sparc, so that the code
  works with SunPro, too.
2005-11-30 20:16:15 +00:00
rillig
659e0368d9 - Removed the unnecessary constant conf_rcsidstring. 2005-11-30 19:53:37 +00:00
rillig
4f356b467c - Added CFLAGS and CPPFLAGS to the list of variables that may contain the
names of tools instead of the tool variables.
2005-11-30 19:23:43 +00:00
rillig
6009d7d95c - Added an explanation for the warning about MKDIR => INSTALL_*_DIR. 2005-11-30 19:19:25 +00:00
rillig
7ade6c222e Updated pkgse to 0.3.
Update provided by the maintainer in PR 32189. He says that version 0.2
does not work anymore.
2005-11-29 10:21:05 +00:00
schwarz
68b7d980c7 added support for systems such as IRIX 5 that do not have _POSIX2_RE_DUP_MAX
defined. Changes approved by grant.
2005-11-28 20:47:29 +00:00
ben
92973d6092 Correct PAX_CMD to be pax. 2005-11-28 01:50:21 +00:00
rillig
10d9025714 - Restrict the autofix changes to apply only if the whole ShellWord
matches.
2005-11-28 00:33:55 +00:00
rillig
b25d847872 Updated pkglint to 4.46.3.
- 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.
2005-11-27 23:48:01 +00:00
rillig
75e8487cc6 - Renamed the type PlatformTuple into PlatformTriple.
- Added an explanation for invalid PlatformTriples.
2005-11-27 21:18:43 +00:00
rillig
cff72c8550 - Imported the explain() subroutine into ::main.
- Made pkglint's wording more polite ("Use" => "Please use").
2005-11-27 21:10:20 +00:00
rillig
4c81669b0b Updated pkglint to 4.36.2.
- Improved diagnostics for URLs that are not strictly pkgsrc-compliant, as
  requested on tech-pkg.
2005-11-27 20:25:49 +00:00
rillig
d001e9dfc8 Removed trailing white-space. 2005-11-27 20:12:44 +00:00
rillig
3980bc7be6 Updated pkglint to 4.46.1.
- Marked ALLFILES as deprecated.
- Degraded white-space warnings to notes.
- Added many explanations for the diagnostics.
2005-11-24 21:51:10 +00:00
wiz
97a4a4ee6b Update to 1.1: Install manpages 2005-11-24 18:49:07 +00:00
rillig
ddc303f3f9 Bugfix.
- 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".
2005-11-24 10:47:51 +00:00
rillig
f468c4d5c8 Implemented the --explain option and the checks for CPP macros in patch
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
2005-11-24 10:18:50 +00:00
rillig
556eb8885a Updated pkglint to 4.46.
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.
2005-11-24 10:16:54 +00:00