portlint.1 4.4 KB

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