portlint.1 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. .\" $FreeBSD$
  2. .\" $MCom$
  3. .\"
  4. .\" Copyright (c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>.
  5. .\" All Rights Reserved. Absolutely no warranty.
  6. .\"
  7. .Dd April 1, 2010
  8. .Dt PORTLINT 1
  9. .Sh NAME
  10. .Nm portlint
  11. .Nd a verifier for port directories
  12. .Sh SYNOPSIS
  13. .Nm portlint
  14. .Op Fl abcghvtACNV
  15. .Op Fl M Ar ENV
  16. .Op Fl B Ar n
  17. .Op Ar dir
  18. .Sh DESCRIPTION
  19. .Nm
  20. tries to verify the content of a port directory.
  21. The purpose of
  22. .Nm
  23. can be separated into two parts:
  24. .Pq 1
  25. to let the submitters easily polish their own port directory, and
  26. .Pq 2
  27. to decrease the labor of the committers.
  28. .Pp
  29. .Nm
  30. uses very simple regular-expression matching for verifying
  31. files that make up a port directory.
  32. Note that it does NOT implement a complete parser for those files.
  33. Because of this the user may see some extra warnings,
  34. especially when checking complex
  35. .Pa Makefile Ns No s .
  36. .Pp
  37. .Sy Options
  38. .Bl -tag -width Fl
  39. .It Fl a
  40. Perform additional checks for extra files, such as
  41. .Pa scripts/*
  42. and
  43. .Pa pkg-* .
  44. .It Fl b
  45. Warn the use of
  46. .Pa $(VARIABLE) .
  47. Some of the committers prefer
  48. .Pa ${VARIABLE}
  49. instead of
  50. .Pa $(VARIABLE) ,
  51. even though they are semantically the same.
  52. .It Fl c
  53. Committer flag.
  54. It will add several checks useful only for committers.
  55. If you are a committer and performing check just before committing a port,
  56. use this option.
  57. .It Fl g
  58. Group and consolidate errors so that redundant error messages are rolled
  59. up into one line with a list of all affected line numbers (where
  60. appropriate). This option is disabled if
  61. .Fl v
  62. is specified.
  63. .It Fl h
  64. Show the summary of command line options, then exit.
  65. .It Fl m
  66. Adds checks for $PORTSDIR/MOVED, $PORTSDIR/UIDs, and $PORTSDIR/GIDs.
  67. .It Fl v
  68. Be verbose.
  69. Show the progress report for items that are being checked.
  70. .It Fl t
  71. Nit pick about use of spaces.
  72. .It Fl A
  73. Turn on all additional checks.
  74. .It Fl C
  75. Pedantic committer flag. This is equivalent to
  76. .Fl abcmt .
  77. .It Fl N
  78. New port flag.
  79. Adds several checks specific to newly submitted port.
  80. If you are willing to submit the directory to be checked as a new port,
  81. use this option.
  82. .It Fl V
  83. Print the portlint version and exit.
  84. .It Fl M Ar ENV
  85. Set make variables to
  86. .Pa ENV
  87. (ex. PORTSDIR=/usr/ports.work).
  88. .It Fl B Ar n
  89. Set the number of contiguous blank lines allowed in
  90. .Pa Makefile
  91. to
  92. .Ar n .
  93. (by default,
  94. .Ar n
  95. is 1)
  96. .It dir
  97. The port directory to be checked.
  98. If omitted, check will be performed over the current directory.
  99. .El
  100. .Sh DIAGNOSTICS
  101. Messages will be sent to standard output, not standard error output.
  102. .Bl -tag -width "WARN: foobaa"
  103. .It FATAL: ...
  104. This type of error message suggests that there is some fatal error
  105. in the port directory.
  106. For example, if some files need a rewrite, or if
  107. some inevitable files are missing, this message will show up.
  108. This kind of errors should be avoided BEFORE submitting
  109. a port via send-pr to the committers.
  110. .\"If a submitter submits it without update, committers will need to rewrite
  111. .\"on behalf of the submitters, which may result in delay of
  112. .\"the development of operating system itself.
  113. .It WARN: ...
  114. This type of error message suggests that some files may (or may not)
  115. need some fix.
  116. Basically, warnings are produced when
  117. .Nm
  118. is not completely sure about the result.
  119. For example, complex
  120. .Pa Makefile Ns No s
  121. may need some statements that can match the regular expression
  122. .Nm
  123. uses for sanity checks.
  124. In those cases, the user should evaluate the result manually,
  125. and obey/ignore the result.
  126. .It OK: ...
  127. This types of message is used in verbose mode
  128. .Pq Fl v .
  129. .El
  130. .Sh ENVIRONMENT
  131. The following environment variables affect the execution of
  132. .Nm :
  133. .Bl -tag -width ".Ev PL_CVS_IGNORE"
  134. .It Ev PL_CVS_IGNORE
  135. Set to a Perl-compatible regular expression, of patterns
  136. to ignore when checking to see if files are in the CVS
  137. repository. For example,
  138. .Li '^\ed+$|^pr-patch$' .
  139. .It Ev PORTSDIR
  140. The fully-qualified path to the ports tree.
  141. For example,
  142. .Dq Li /usr/ports .
  143. .El
  144. .Sh FILES
  145. .Bl -tag -width bsd.port.mkxx -compact
  146. .It Pa bsd.port.mk
  147. master Makefile for ports
  148. .Po
  149. .Pa bsd.pkg.mk
  150. on
  151. .Nx
  152. /
  153. .Ox
  154. .Pc
  155. .It Pa /usr/ports/*
  156. ports collection
  157. .Po
  158. .Pa /usr/pkgsrc/*
  159. on
  160. .Nx
  161. /
  162. .Ox
  163. .Pc ;
  164. can be overriden by setting the
  165. .Va PORTSDIR
  166. environment variable.
  167. .El
  168. .Sh AUTHORS
  169. .An Joe Marcus Clarke Aq marcus@FreeBSD.org
  170. .An Michael Haro Aq mharo@FreeBSD.org
  171. .An Jun-ichiro Hagino Aq itojun@itojun.org
  172. and
  173. .An Yoshishige Arai Aq ryo2@on.rim.or.jp .
  174. .Pp
  175. Many people have contributed patches and comments/suggestions.
  176. .Sh BUGS
  177. .Nm
  178. is not a magic wand, as described above.