gbp.conf.sgml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <refentry id="man.gbp.conf">
  2. <refentryinfo>
  3. <address>
  4. &dhemail;
  5. </address>
  6. <author>
  7. &dhfirstname;
  8. &dhsurname;
  9. </author>
  10. </refentryinfo>
  11. <refmeta>
  12. <refentrytitle>gbp.conf</refentrytitle>
  13. &dhconfsection;
  14. </refmeta>
  15. <refnamediv>
  16. <refname>&gbp.conf;</refname>
  17. <refpurpose>Gbp configuration file</refpurpose>
  18. </refnamediv>
  19. <refsynopsisdiv>
  20. <variablelist>
  21. <varlistentry>
  22. <term>/etc/git-buildpackage/gbp.conf</term>
  23. <listitem><para>system wide</para></listitem>
  24. </varlistentry>
  25. <varlistentry>
  26. <term>~/.gbp.conf</term>
  27. <listitem><para>per user</para></listitem>
  28. </varlistentry>
  29. <varlistentry>
  30. <term>.gbp.conf</term>
  31. <listitem><para>per branch, can be published with the
  32. repository (deprecated)</para></listitem>
  33. </varlistentry>
  34. <varlistentry>
  35. <term>debian/gbp.conf</term>
  36. <listitem><para>per branch, can be published with the
  37. repository</para></listitem>
  38. </varlistentry>
  39. <varlistentry>
  40. <term>.git/gbp.conf</term>
  41. <listitem><para>per repository</para></listitem>
  42. </varlistentry>
  43. </variablelist>
  44. </refsynopsisdiv>
  45. <refsect1>
  46. <title>DESCRIPTION</title>
  47. <para>
  48. The <filename>gbp.conf</filename> configuration files provide
  49. default global options and specific options for individual &gbp;
  50. commands. All files have the same format as described below and
  51. are parsed in the above order from top to bottom with increasing
  52. precedence.
  53. </para>
  54. <para>
  55. Each file consists of either zero or one default section, and
  56. zero or one sections for each &gbp; command. Additionally, there
  57. can be an arbitrary number of
  58. <option>remote-config</option> sections. Comments start with a
  59. hash sign (<option>#</option>). The syntax is:
  60. </para>
  61. <programlisting>
  62. [DEFAULT]
  63. # This section is for global settings. Affects all commands
  64. key = value
  65. [&lt;command&gt;]
  66. # Specific sections for each command, like <command>buildpackage</command>
  67. key = value
  68. [remote-config &lt;name&gt;]
  69. # Specific sections for a remote configuration. This can be used several
  70. # times to set up remote configuration for <command>gbp create-remote-repo</command>
  71. key = value
  72. </programlisting>
  73. <para>
  74. The sections for each command are named like the command (without &gbp;) surrounded
  75. by square brackets (e.g. <option>[buildpackage]</option>).
  76. For backwards compatibility, command sections starting with <filename>git-</filename> or
  77. <filename>gbp-</filename> are also supported but will provoke a warning when parsed by
  78. &gbp;.
  79. </para>
  80. <para>
  81. The <option>key=value</option> pairs of the command sections are
  82. named like the command-line options of the corresponding command
  83. with the '--' stripped off and can hold the same values (but see
  84. below for details). For example,
  85. the <xref linkend="man.gbp.buildpackage"/> manual page documents
  86. the <option>--git-export-dir</option>=<parameter>directory</parameter>
  87. option which can be turned into configuration file setting by
  88. dropping the
  89. <option>--git</option> prefix:
  90. </para>
  91. <programlisting>
  92. [buildpackage]
  93. export-dir = directory
  94. </programlisting>
  95. <para>
  96. Options that can be repeated on the command line take Python-like
  97. lists in the config file. For example,
  98. the <xref linkend="man.gbp.import.orig"/> command has the
  99. <option>--filter</option>=<parameter>pattern</parameter> option
  100. which can be turned into a configuration file option like this:
  101. </para>
  102. <programlisting>
  103. [import-orig]
  104. filter = [ '.svn', '.hg' ]
  105. </programlisting>
  106. <para>
  107. Boolean options can be either <option>True</option> or <option>False</option>. For example,
  108. <xref linkend="man.gbp.import.orig"/> has the <option>--pristine-tar</option> and
  109. <option>--no-pristine-tar</option> options which translate to:
  110. </para>
  111. <programlisting>
  112. [import-orig]
  113. pristine-tar = True
  114. </programlisting>
  115. <para>and</para>
  116. <programlisting>
  117. [import-orig]
  118. pristine-tar = False
  119. </programlisting>
  120. <para>respectively.</para>
  121. <note>
  122. <para>
  123. To see the current set of values that would be applied after parsing the
  124. configuration files, use <xref linkend="man.gbp.config"/>.
  125. </para>
  126. </note>
  127. <note>
  128. <para>
  129. <command>gbp import-dscs</command> and <command>git-pbuilder</command>
  130. can't be configured via <filename>gbp.conf</filename>.
  131. </para>
  132. </note>
  133. <para>
  134. <xref linkend="man.gbp.create.remote.repo"/> can additionally parse remote site
  135. configurations from <filename>gbp.conf</filename>. For example, a configuration like:
  136. </para>
  137. <programlisting>
  138. [remote-config pkg-libvirt]
  139. # Location of the repository
  140. remote-url-pattern = ssh://git.debian.org/git/pkg-libvirt/%(pkg)s
  141. # Template dir to passed to git-init
  142. template-dir = /srv/alioth.debian.org/chroot/home/groups/pkg-libvirt/git-template
  143. </programlisting>
  144. <para>
  145. can be used to create remote repositories for the pkg-libvirt project using:
  146. </para>
  147. <programlisting>
  148. gbp-create-remote-repo --remote-config=pkg-libvirt
  149. </programlisting>
  150. <para>
  151. This can be useful if you're often creating new remote repositories for
  152. different projects.
  153. </para>
  154. </refsect1>
  155. <refsect1>
  156. <title>EXAMPLES</title>
  157. <para>
  158. An example set up for packaging work:
  159. </para>
  160. <programlisting>
  161. # $HOME/.gbp.conf
  162. [DEFAULT]
  163. pristine-tar = True
  164. cleaner = fakeroot debian/rules clean
  165. [buildpackage]
  166. export-dir = ../build-area/
  167. [import-orig]
  168. dch = False
  169. filter = .svn
  170. filter = .hg
  171. filter = .bzr
  172. filter = CVS
  173. filter = debian/*
  174. filter = */debian/*
  175. filter-pristine-tar = True
  176. [import-dsc]
  177. filter = [
  178. 'CVS',
  179. '.cvsignore',
  180. '.hg',
  181. '.hgignore'
  182. '.bzr',
  183. '.bzrignore',
  184. '.gitignore'
  185. ]
  186. # End of file
  187. </programlisting>
  188. </refsect1>
  189. <refsect1>
  190. <title>ENVIRONMENT</title>
  191. <variablelist>
  192. <varlistentry>
  193. <term><envar>GBP_CONF_FILES</envar></term>
  194. <listitem><para>Colon separated list of files to parse. The default is
  195. the above list of configuration files.</para></listitem>
  196. </varlistentry>
  197. <varlistentry>
  198. <term><envar>GBP_DISABLE_SECTION_DEPRECTATION</envar></term>
  199. <listitem><para>Don't print a deprecation warning when &gbp;
  200. encounters a section starting
  201. with <emphasis>git-</emphasis>
  202. or <emphasis>gbp-</emphasis>.
  203. </para></listitem>
  204. </varlistentry>
  205. </variablelist>
  206. </refsect1>
  207. <refsect1>
  208. <title>FILES</title>
  209. <para>
  210. See <filename>/etc/git-buildpackage/gbp.conf</filename> for an example.
  211. </para>
  212. </refsect1>
  213. <refsect1>
  214. <title>SEE ALSO</title>
  215. <para>
  216. <xref linkend="man.gbp.clone"/>,
  217. <xref linkend="man.gbp.create.remote.repo"/>,
  218. <xref linkend="man.gbp.pq"/>,
  219. <xref linkend="man.gbp.pull"/>,
  220. <xref linkend="man.gbp.dch"/>,
  221. <xref linkend="man.gbp.import.dsc"/>,
  222. <xref linkend="man.gbp.import.orig"/>,
  223. <xref linkend="man.gbp.buildpackage"/>,
  224. <ulink url="file:///usr/share/doc/git-buildpackage/manual-html/index.html">
  225. <citetitle>The Git-Buildpackage Manual</citetitle></ulink>
  226. </para>
  227. </refsect1>
  228. <refsect1>
  229. <title>AUTHORS</title>
  230. <para>&dhusername; &dhemail;</para>
  231. <para>This manual page is based on a POD version by Jari Aalto <email>jari.aalto@cante.net</email>.
  232. Released under license GNU GPL version 2 or (at your option) any later.
  233. version.
  234. </para>
  235. </refsect1>
  236. </refentry>