gbp.conf.sgml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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 overall layout is:
  60. </para>
  61. <programlisting>
  62. [DEFAULT]
  63. # This section is for global settings. Affects all commands.
  64. # Options set here have the lowest priority.
  65. key = value
  66. [&lt;command&gt;]
  67. # Specific sections for each command, like <command>buildpackage</command>
  68. # Options set here have lower priority than command line options
  69. key = value
  70. [remote-config &lt;name&gt;]
  71. # Specific sections for a remote configuration. This can be used several
  72. # times to set up remote configuration for <command>gbp create-remote-repo</command>
  73. key = value
  74. </programlisting>
  75. <para>
  76. The sections for each command are named like the command (without &gbp;) surrounded
  77. by square brackets (e.g. <option>[buildpackage]</option>).
  78. For backwards compatibility, command sections starting with <filename>git-</filename> or
  79. <filename>gbp-</filename> are also supported but will provoke a warning when parsed by
  80. &gbp;.
  81. </para>
  82. <para>
  83. The keys in the
  84. <option>key</option>=<parameter>value</parameter> pairs are named
  85. like the command-line options of the corresponding command (with the
  86. '--' stripped off) and can hold the same values, but see below for
  87. details. In case of &gbp-buildpackage; and &gbp-buildpackage-rpm;
  88. the key needs '--git-' instead of '--' stripped off.
  89. </para>
  90. <para>
  91. For example,
  92. the <xref linkend="man.gbp.buildpackage"/> manual page documents
  93. the <option>--git-export-dir</option>=<parameter>directory</parameter>
  94. option which can be turned into configuration file setting by
  95. dropping the
  96. <option>--git-</option> prefix:
  97. </para>
  98. <programlisting>
  99. [buildpackage]
  100. export-dir = directory
  101. </programlisting>
  102. <para>
  103. Options that can be repeated on the command line take Python-like
  104. lists in the config file. For example,
  105. the <xref linkend="man.gbp.import.orig"/> command has the
  106. <option>--filter</option>=<parameter>pattern</parameter> option
  107. which can be turned into a configuration file option like this:
  108. </para>
  109. <programlisting>
  110. [import-orig]
  111. filter = [ '.svn', '.hg' ]
  112. </programlisting>
  113. <para>
  114. Boolean options can be either <option>True</option> or <option>False</option>. For example,
  115. <xref linkend="man.gbp.import.orig"/> has the <option>--pristine-tar</option> and
  116. <option>--no-pristine-tar</option> options which translate to:
  117. </para>
  118. <programlisting>
  119. [import-orig]
  120. pristine-tar = True
  121. </programlisting>
  122. <para>and</para>
  123. <programlisting>
  124. [import-orig]
  125. pristine-tar = False
  126. </programlisting>
  127. <para>respectively.</para>
  128. <note>
  129. <para>
  130. To see the current set of values that would be applied after parsing the
  131. configuration files, use <xref linkend="man.gbp.config"/>.
  132. </para>
  133. </note>
  134. <note>
  135. <para>
  136. <command>gbp import-dscs</command> and <command>git-pbuilder</command>
  137. can't be configured via <filename>gbp.conf</filename>.
  138. </para>
  139. </note>
  140. <para>
  141. <xref linkend="man.gbp.create.remote.repo"/> can additionally parse remote site
  142. configurations from <filename>gbp.conf</filename>. For example, a configuration like:
  143. </para>
  144. <programlisting>
  145. [remote-config pkg-libvirt]
  146. # Location of the repository
  147. remote-url-pattern = ssh://git.debian.org/git/pkg-libvirt/%(pkg)s
  148. # Template dir to passed to git-init
  149. template-dir = /srv/alioth.debian.org/chroot/home/groups/pkg-libvirt/git-template
  150. </programlisting>
  151. <para>
  152. can be used to create remote repositories for the pkg-libvirt project using:
  153. </para>
  154. <programlisting>
  155. gbp-create-remote-repo --remote-config=pkg-libvirt
  156. </programlisting>
  157. <para>
  158. This can be useful if you're often creating new remote repositories for
  159. different projects.
  160. </para>
  161. </refsect1>
  162. <refsect1>
  163. <title>EXAMPLES</title>
  164. <para>
  165. An example set up for packaging work:
  166. </para>
  167. <programlisting>
  168. # $HOME/.gbp.conf
  169. [DEFAULT]
  170. pristine-tar = True
  171. cleaner = fakeroot debian/rules clean
  172. [buildpackage]
  173. export-dir = ../build-area/
  174. [import-orig]
  175. dch = False
  176. filter = [
  177. '.svn',
  178. '.hg',
  179. '.bzr',
  180. 'CVS',
  181. 'debian/*',
  182. '*/debian/*'
  183. ]
  184. filter-pristine-tar = True
  185. [import-dsc]
  186. filter = [
  187. 'CVS',
  188. '.cvsignore',
  189. '.hg',
  190. '.hgignore'
  191. '.bzr',
  192. '.bzrignore',
  193. '.gitignore'
  194. ]
  195. # End of file
  196. </programlisting>
  197. </refsect1>
  198. <refsect1>
  199. <title>ENVIRONMENT</title>
  200. <variablelist>
  201. <varlistentry>
  202. <term><envar>GBP_CONF_FILES</envar></term>
  203. <listitem><para>Colon separated list of files to parse. The default is
  204. the above list of configuration files.</para></listitem>
  205. </varlistentry>
  206. <varlistentry>
  207. <term><envar>GBP_DISABLE_SECTION_DEPRECTATION</envar></term>
  208. <listitem><para>Don't print a deprecation warning when &gbp;
  209. encounters a section starting
  210. with <emphasis>git-</emphasis>
  211. or <emphasis>gbp-</emphasis>.
  212. </para></listitem>
  213. </varlistentry>
  214. </variablelist>
  215. </refsect1>
  216. <refsect1>
  217. <title>FILES</title>
  218. <para>
  219. See <filename>/etc/git-buildpackage/gbp.conf</filename> for an example.
  220. </para>
  221. </refsect1>
  222. <refsect1>
  223. <title>SEE ALSO</title>
  224. <para>
  225. <xref linkend="man.gbp.clone"/>,
  226. <xref linkend="man.gbp.create.remote.repo"/>,
  227. <xref linkend="man.gbp.pq"/>,
  228. <xref linkend="man.gbp.pull"/>,
  229. <xref linkend="man.gbp.dch"/>,
  230. <xref linkend="man.gbp.import.dsc"/>,
  231. <xref linkend="man.gbp.import.orig"/>,
  232. <xref linkend="man.gbp.buildpackage"/>,
  233. <ulink url="file:///usr/share/doc/git-buildpackage/manual-html/index.html">
  234. <citetitle>The Git-Buildpackage Manual</citetitle></ulink>
  235. </para>
  236. </refsect1>
  237. <refsect1>
  238. <title>AUTHORS</title>
  239. <para>&dhusername; &dhemail;</para>
  240. <para>This manual page is based on a POD version by Jari Aalto <email>jari.aalto@cante.net</email>.
  241. Released under license GNU GPL version 2 or (at your option) any later.
  242. version.
  243. </para>
  244. </refsect1>
  245. </refentry>