portlint.1 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. .\" $MCom$
  2. .\"
  3. .\" Copyright (c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>.
  4. .\" All Rights Reserved. Absolutely no warranty.
  5. .\"
  6. .Dd April 1, 2010
  7. .Dt PORTLINT 1
  8. .Os
  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. This is equivalent to
  74. .Fl abcmNt .
  75. .It Fl C
  76. Pedantic committer flag. This is equivalent to
  77. .Fl abcmt .
  78. .It Fl N
  79. New port flag.
  80. Adds several checks specific to newly submitted port.
  81. If you are willing to submit the directory to be checked as a new port,
  82. use this option.
  83. .It Fl V
  84. Print the portlint version and exit.
  85. .It Fl M Ar ENV
  86. Set make variables to
  87. .Pa ENV
  88. (ex. PORTSDIR=/usr/ports.work).
  89. .It Fl B Ar n
  90. Set the number of contiguous blank lines allowed in
  91. .Pa Makefile
  92. to
  93. .Ar n .
  94. (by default,
  95. .Ar n
  96. is 1)
  97. .It dir
  98. The port directory to be checked.
  99. If omitted, check will be performed over the current directory.
  100. .El
  101. .Sh ENVIRONMENT
  102. The following environment variables affect the execution of
  103. .Nm :
  104. .Bl -tag -width ".Ev PL_GIT_IGNORE"
  105. .It Ev PL_GIT_IGNORE
  106. Set to a Perl-compatible regular expression, of patterns
  107. to ignore when checking to see if files are in the git
  108. repository. For example,
  109. .Li '^\ed+$|^pr-patch$' .
  110. .It Ev PORTSDIR
  111. The fully-qualified path to the ports tree.
  112. For example,
  113. .Dq Li /usr/ports .
  114. .El
  115. .Sh FILES
  116. .Bl -tag -width bsd.port.mkxx -compact
  117. .It Pa bsd.port.mk
  118. master Makefile for ports
  119. .Po
  120. .Pa bsd.pkg.mk
  121. on
  122. .Nx
  123. /
  124. .Ox
  125. .Pc
  126. .It Pa /usr/ports/*
  127. ports collection
  128. .Po
  129. .Pa /usr/pkgsrc/*
  130. on
  131. .Nx
  132. /
  133. .Ox
  134. .Pc ;
  135. can be overriden by setting the
  136. .Va PORTSDIR
  137. environment variable.
  138. .El
  139. .Sh DIAGNOSTICS
  140. Messages will be sent to standard output, not standard error output.
  141. .Bl -tag -width "WARN: foobaa"
  142. .It FATAL: ...
  143. This type of error message suggests that there is some fatal error
  144. in the port directory.
  145. For example, if some files need a rewrite, or if
  146. some inevitable files are missing, this message will show up.
  147. This kind of errors should be avoided BEFORE submitting
  148. a port via send-pr to the committers.
  149. .\"If a submitter submits it without update, committers will need to rewrite
  150. .\"on behalf of the submitters, which may result in delay of
  151. .\"the development of operating system itself.
  152. .It WARN: ...
  153. This type of error message suggests that some files may (or may not)
  154. need some fix.
  155. Basically, warnings are produced when
  156. .Nm
  157. is not completely sure about the result.
  158. For example, complex
  159. .Pa Makefile Ns No s
  160. may need some statements that can match the regular expression
  161. .Nm
  162. uses for sanity checks.
  163. In those cases, the user should evaluate the result manually,
  164. and obey/ignore the result.
  165. .It OK: ...
  166. This types of message is used in verbose mode
  167. .Pq Fl v .
  168. .El
  169. .Sh AUTHORS
  170. .An Joe Marcus Clarke Aq marcus@FreeBSD.org
  171. .An Michael Haro Aq mharo@FreeBSD.org
  172. .An Jun-ichiro Hagino Aq itojun@itojun.org
  173. and
  174. .An Yoshishige Arai Aq ryo2@on.rim.or.jp .
  175. .Pp
  176. Many people have contributed patches and comments/suggestions.
  177. .Sh BUGS
  178. .Nm
  179. is not a magic wand, as described above.