gbp-rpm-ch.sgml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <refentry id="man.gbp.rpm.ch">
  2. <refentryinfo>
  3. <address>
  4. &rpm-email;
  5. </address>
  6. <author>
  7. &rpm-firstname;
  8. &rpm-surname;
  9. </author>
  10. </refentryinfo>
  11. <refmeta>
  12. <refentrytitle>gbp-rpm-ch</refentrytitle>
  13. &rpm-mansection;
  14. </refmeta>
  15. <refnamediv>
  16. <refname>gbp-rpm-ch;</refname>
  17. <refpurpose>Generate the RPM changelog from git commit messages</refpurpose>
  18. </refnamediv>
  19. <refsynopsisdiv>
  20. <cmdsynopsis>
  21. &gbp-rpm-ch;
  22. &man.common.options.synopsis;
  23. <arg><option>--tmp-dir</option>=<replaceable>DIRECTORY</replaceable></arg>
  24. <arg><option>--vendor</option>=<replaceable>VENDOR</replaceable></arg>
  25. <arg><option>--packaging-branch=</option><replaceable>BRANCH-NAME</replaceable></arg>
  26. <arg><option>--packaging-tag=</option><replaceable>TAG-FORMAT</replaceable></arg>
  27. <arg><option>--ignore-branch</option></arg>
  28. <arg><option>--packaging-dir=</option><replaceable>DIRECTORY</replaceable></arg>
  29. <arg><option>--changelog-file=</option><replaceable>FILEPATH</replaceable></arg>
  30. <arg><option>--spec-file=</option><replaceable>FILEPATH</replaceable></arg>
  31. <arg><option>--since=</option><replaceable>COMMITISH</replaceable></arg>
  32. <arg><option>--no-release</option></arg>
  33. <arg><option>--[no-]git-author</option></arg>
  34. <arg><option>--[no-]full</option></arg>
  35. <arg><option>--id-length=</option><replaceable>NUMBER</replaceable></arg>
  36. <arg><option>--ignore-regex=</option><replaceable>REGEX</replaceable></arg>
  37. <arg><option>--changelog-revision=</option><replaceable>REV-FORMAT</replaceable></arg>
  38. <arg><option>--git-log=</option><replaceable>GIT-LOG-OPTIONS</replaceable></arg>
  39. <arg><option>--spawn-editor=<replaceable>[always|release|no]</replaceable></option></arg>
  40. <arg><option>--editor-cmd=</option><replaceable>EDITOR</replaceable></arg>
  41. <arg><option>--customizations=</option><replaceable>CUSTOMIZATION-FILE</replaceable></arg>
  42. <arg choice="plain"><replaceable>[PATH1 PATH2]</replaceable></arg>
  43. </cmdsynopsis>
  44. </refsynopsisdiv>
  45. <refsect1>
  46. <title>DESCRIPTION</title>
  47. <para>
  48. &gbp-rpm-ch; reads git commit messages up to the current tip of the current
  49. branch and updates the RPM changelog from them.
  50. </para>
  51. <para>
  52. By default, &gbp-rpm-ch; tries to guess the last &git; commit documented in
  53. the changelog. Alternatively, <option>--since</option> can be used to
  54. tell &gbp-rpm-ch; at which point it should start in the &git; history, or,
  55. <option>--all</option> to use all commits from the &git; history.
  56. </para>
  57. <para>
  58. The additional path arguments can be used to restrict the repository paths
  59. &gbp-rpm-ch; looks at. For even more detailed control, you can use
  60. <option>--git-log</option> to restrict the generated changelog entries
  61. further. E.g. by using
  62. <option>--git-log=</option><replaceable>"--author=Foo Bar"</replaceable>.
  63. </para>
  64. </refsect1>
  65. <refsect1>
  66. <title>OPTIONS</title>
  67. <variablelist>
  68. &man.common.options.description;
  69. <varlistentry>
  70. <term><option>--git-tmp-dir</option>=<replaceable>DIRECTORY</replaceable>
  71. </term>
  72. <listitem>
  73. <para>
  74. Base directory under which temporary directories are created.
  75. </para>
  76. </listitem>
  77. </varlistentry>
  78. <varlistentry>
  79. <term><option>--vendor</option>=<replaceable>VENDOR</replaceable>
  80. </term>
  81. <listitem>
  82. <para>
  83. Distribution vendor name.
  84. </para>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry>
  88. <term><option>--packaging-branch</option>=<replaceable>BRANCH-NAME</replaceable>
  89. </term>
  90. <listitem>
  91. <para>
  92. The branch in the Git repository the package is being developed on,
  93. default is <replaceable>master</replaceable>.
  94. </para>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry>
  98. <term><option>--ignore-branch</option>
  99. </term>
  100. <listitem>
  101. <para>
  102. Don't check if the current branch matches
  103. <replaceable>PACKAGING-BRANCH</replaceable>.
  104. </para>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry>
  108. <term><option>--packaging-tag=</option><replaceable>TAG-FORMAT</replaceable>
  109. </term>
  110. <listitem>
  111. <para>
  112. Tag format used, when tagging releases,
  113. default is <replaceable>%(vendor)s/%(version)s</replaceable>
  114. </para>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry>
  118. <term><option>--packaging-dir=</option><replaceable>DIRECTORY</replaceable>
  119. </term>
  120. <listitem>
  121. <para>
  122. Subdirectory that contains the RPM packaging files.
  123. </para>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry>
  127. <term><option>--changelog-file=</option><replaceable>FILEPATH</replaceable>
  128. </term>
  129. <listitem>
  130. <para>
  131. Relative path to the changelog file to use. Special value
  132. <replaceable>auto</replaceable> causes &gbp; to guess,
  133. <replaceable>SPEC</replaceable> uses the spec file,
  134. <replaceable>CHANGES</replaceable> uses a separate changelog file
  135. (name derived spec file name with .spec suffix replaced by .changes).
  136. Guessing logic is simple: use separate changelog file if it is found,
  137. otherwise use the spec file.
  138. </para>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry>
  142. <term><option>--spec-file=</option><replaceable>FILEPATH</replaceable>
  143. </term>
  144. <listitem>
  145. <para>
  146. Relative path to the spec file to use. Special value
  147. <replaceable>auto</replaceable> causes &gbp; to search and guess.
  148. Other values cause the <option>--packaging-dir</option> option to be
  149. ignored: the directory of the spec file is used, instead.
  150. </para>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry>
  154. <term><option>--since=</option><replaceable>COMMITTISH</replaceable>
  155. </term>
  156. <listitem>
  157. <para>
  158. Start reading commit messages at
  159. <replaceable>COMMITTISH</replaceable>.
  160. </para>
  161. </listitem>
  162. </varlistentry>
  163. <varlistentry>
  164. <term><option>--no-release</option>
  165. </term>
  166. <listitem>
  167. <para>
  168. Do not create a new changelog section, just update the last
  169. changelog section.
  170. </para>
  171. </listitem>
  172. </varlistentry>
  173. <varlistentry>
  174. <term><option>--[no-]full</option>
  175. </term>
  176. <listitem>
  177. <para>
  178. Include the full commit message in the changelog output.
  179. </para>
  180. </listitem>
  181. </varlistentry>
  182. <varlistentry>
  183. <term><option>--git-log=</option><replaceable>GIT-LOG-OPTIONS</replaceable>
  184. </term>
  185. <listitem>
  186. <para>
  187. Options passed on verbatim to git-log(1).
  188. </para>
  189. </listitem>
  190. </varlistentry>
  191. <varlistentry>
  192. <term><option>--id-length=</option><replaceable>N</replaceable>
  193. </term>
  194. <listitem>
  195. <para>
  196. Include <replaceable>N</replaceable> digits of the commit id in the
  197. changelog entry. Default is to not include any commit ids at all.
  198. </para>
  199. </listitem>
  200. </varlistentry>
  201. <varlistentry>
  202. <term><option>--ignore-regex=</option><replaceable>REGEX</replaceable>
  203. </term>
  204. <listitem>
  205. <para>
  206. Ignore lines in commit message matching
  207. <replaceable>REGEX</replaceable> when generating the changelog.
  208. </para>
  209. </listitem>
  210. </varlistentry>
  211. <varlistentry>
  212. <term><option>--changelog-revision=</option><replaceable>REV-FORMAT</replaceable>
  213. </term>
  214. <listitem>
  215. <para>
  216. Format string to use for revision field in the changelog header. The
  217. following string fields are accepted:
  218. <replaceable>%(upstreamversion)s</replaceable> the upstream version;
  219. <replaceable>%(release)s</replaceable> the rpm patchlevel, i.e.
  220. Release; <replaceable>%(version)s</replaceable> full rpm package
  221. version; <replaceable>%(tagname)s</replaceable> tag/commit, i.e.
  222. basically what <command>git-describe</command> would give.
  223. If empty or not defined the default from packaging policy is used.
  224. </para>
  225. </listitem>
  226. </varlistentry>
  227. <varlistentry>
  228. <term><option>--ignore-regex=</option><replaceable>REGEX</replaceable>
  229. </term>
  230. <listitem>
  231. <para>
  232. Ignore commit lines matching <replaceable>REGEX</replaceable>
  233. when generating the changelog.
  234. </para>
  235. </listitem>
  236. </varlistentry>
  237. <varlistentry>
  238. <term><option>--[no-]git-author</option>
  239. </term>
  240. <listitem>
  241. <para>
  242. Use user.name and user.email from
  243. <application>git-config</application>(1) for the changelog header.
  244. </para>
  245. </listitem>
  246. </varlistentry>
  247. <varlistentry>
  248. <term><option>--spawn-editor=<replaceable>[always|release|no]</replaceable></option>
  249. </term>
  250. <listitem>
  251. <para>
  252. Whether to spawn an editor: always, when doing a release or never.
  253. </para>
  254. </listitem>
  255. </varlistentry>
  256. <varlistentry>
  257. <term><option>--editor-cmd=<replaceable>EDITOR</replaceable></option>
  258. </term>
  259. <listitem>
  260. <para>
  261. The editor to use for editing the changelog.
  262. </para>
  263. </listitem>
  264. </varlistentry>
  265. <varlistentry>
  266. <term><option>--customizations=</option><replaceable>CUSTOMIZATION-FILE</replaceable>
  267. </term>
  268. <listitem>
  269. <para>
  270. Load Python code from <replaceable>CUSTOMIZATION-FILE</replaceable>.
  271. At the moment, the only useful thing the code can do is define a
  272. custom ChangelogEntryFormatter class.
  273. </para>
  274. </listitem>
  275. </varlistentry>
  276. </variablelist>
  277. </refsect1>
  278. <refsect1>
  279. <title>META TAGS</title>
  280. <para>
  281. Additional to the above options the formatting of the new changelog entries
  282. (one-per-commit) in the changelog can be modified by special tags (called
  283. Meta Tags) given in the git commit message. The tags must start at the
  284. first column of a commit message but can appear on any line. They are of
  285. the form <option>Tagname</option>: <replaceable>VALUE</replaceable>. Valid
  286. Meta Tags are:
  287. </para>
  288. <variablelist>
  289. <varlistentry>
  290. <term><option>Git-Rpm-Ch</option>: <replaceable>ACTION</replaceable>
  291. </term>
  292. <listitem>
  293. <para>
  294. Supported actions are: <replaceable>Ignore</replaceable> which will
  295. ignore this commit when generating new changelog entries.
  296. <replaceable>Short</replaceable> which will only use the description
  297. (the first line) of the commit message when generating the changelog
  298. entry (useful when <option>--full</option> is given) and
  299. <replaceable>Full</replaceable> which will use the full commit
  300. message when generating the changelog entry (useful when
  301. <option>--full</option> is not given).
  302. </para>
  303. </listitem>
  304. </varlistentry>
  305. <varlistentry>
  306. <term><option>[Close|Closes|...]</option>: <replaceable>BUGNUMBER</replaceable>
  307. </term>
  308. <listitem>
  309. <para>
  310. Indicate in the changelog entry that bug
  311. <replaceable>BUGNUMBER</replaceable> was addressed in this commit.
  312. </para>
  313. </listitem>
  314. </varlistentry>
  315. </variablelist>
  316. <para>
  317. The following git commit message:
  318. </para>
  319. <screen>
  320. Document meta tags
  321. so one doesn't have to consult the manual
  322. Git-Rpm-Ch: Short
  323. Closes: #636088
  324. </screen>
  325. <para>
  326. Results in this changelog entry:
  327. </para>
  328. <screen>
  329. - Document meta tags (Closes: #636088)
  330. </screen>
  331. </refsect1>
  332. <refsect1>
  333. &man.gbp.config-files;
  334. </refsect1>
  335. <refsect1>
  336. <title>SEE ALSO</title>
  337. <para>
  338. <xref linkend="man.gbp.buildpackage.rpm">,
  339. <xref linkend="man.gbp.import.srpm">,
  340. <xref linkend="man.gbp.conf">,
  341. &man.seealso.common;
  342. <ulink url="https://honk.sigxcpu.org/cl2vcs">
  343. <citetitle>Cl2vcs</citetitle></ulink>,
  344. </para>
  345. </refsect1>
  346. <refsect1>
  347. <title>AUTHOR</title>
  348. <para>
  349. &rpm-username; &rpm-email;
  350. </para>
  351. </refsect1>
  352. </refentry>