cfgfile.sgml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <chapter id="gbp.cfgfile">
  2. <title>Configuration files</title>
  3. <para>The configuration files are parsed in this order:
  4. <variablelist>
  5. <varlistentry>
  6. <term>/etc/git-buildpackage/gbp.conf</term>
  7. <listitem><para>system wide configuration</para></listitem>
  8. </varlistentry>
  9. <varlistentry>
  10. <term>~/.gbp.conf</term>
  11. <listitem><para>per user configuration</para></listitem>
  12. </varlistentry>
  13. <varlistentry>
  14. <term>.gbp.conf</term>
  15. <listitem><para>per repository/branch configuration (deprecated)</para></listitem>
  16. </varlistentry>
  17. <varlistentry>
  18. <term>debian/gbp.conf</term>
  19. <listitem><para>per repository/branch configuration</para></listitem>
  20. </varlistentry>
  21. <varlistentry>
  22. <term>.git/gbp.conf</term>
  23. <listitem><para>per (local) repository configuration</para></listitem>
  24. </varlistentry>
  25. </variablelist>
  26. All have the same format. They consist of several sections, all of them are optional:
  27. <variablelist>
  28. <varlistentry>
  29. <term>[DEFAULT]</term>
  30. <listitem><para>Options in this section apply to &gbp-buildpackage;,
  31. &gbp-import-orig;, &gbp-import-dsc; and &gbp-dch;.</para></listitem>
  32. </varlistentry>
  33. <varlistentry>
  34. <term>[buildpackage]</term>
  35. <listitem><para>Options in this section apply to &gbp-buildpackage; only and override options from the
  36. [DEFAULT] section.</para></listitem>
  37. </varlistentry>
  38. <varlistentry>
  39. <term>[import-orig]</term>
  40. <listitem><para>Options in this section apply to &gbp-import-orig; only and override options from the
  41. [DEFAULT] section.</para></listitem>
  42. </varlistentry>
  43. <varlistentry>
  44. <term>[import-dsc]</term>
  45. <listitem><para>Options in this section apply to &gbp-import-dsc; only and override options from the
  46. [DEFAULT] section.</para></listitem>
  47. </varlistentry>
  48. <varlistentry>
  49. <term>[dch]</term>
  50. <listitem><para>Options in this section apply to &gbp-dch; only and override options from the
  51. [DEFAULT] section.</para></listitem>
  52. </varlistentry>
  53. <varlistentry>
  54. <term>...</term>
  55. <listitem><para>Same for the other &gbp; commands</para></listitem>
  56. </varlistentry>
  57. </variablelist>
  58. The actual options in these sections are the command line options without
  59. the '--' prefix. So <option>--upstream-branch=</option><replaceable>dfsgfree</replaceable> would read:
  60. </para>
  61. <screen>
  62. <option>upstream-branch</option>=<replaceable>dfsgfree</replaceable>
  63. </screen>
  64. <para>
  65. in the config file. In the special case of &gbp-buildpackage;, the stripped
  66. prefix is not '--' but '--git-'. Here's a more complete example:
  67. </para>
  68. <programlisting>
  69. [DEFAULT]
  70. # the default build command
  71. builder=debuild -i\.git -I.git
  72. # the default branch for upstream sources
  73. upstream-branch=upstream
  74. # the default branch for the debian patch
  75. debian-branch=master
  76. [buildpackage]
  77. upstream-branch=dfsgclean
  78. # Sign tags with GPG:
  79. sign-tags = True
  80. # Keyid to sign tags with
  81. #keyid = 0xdeadbeef
  82. [import-orig]
  83. upstream-branch=notdfsgclean
  84. [import-dsc]
  85. upstream-branch=notdfsgclean
  86. [dch]
  87. git-log=--no-merges
  88. </programlisting>
  89. <para>
  90. For more details, see the <xref linkend="man.gbp.conf"/> manual page.
  91. </para>
  92. </chapter>