aboutsummaryrefslogtreecommitdiff
path: root/docs/manpages/gbp.conf.sgml
blob: a0228759d32f6446a71d56c7d203ae3622713127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<refentry id="man.gbp.conf">
  <refentryinfo>
    <address>
      &dhemail;
    </address>
    <author>
      &dhfirstname;
      &dhsurname;
    </author>
  </refentryinfo>
  <refmeta>
   <refentrytitle>gbp.conf</refentrytitle>
    &dhconfsection;
  </refmeta>
  <refnamediv>
    <refname>&gbp.conf;</refname>
    <refpurpose>Gbp configuration file</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
   <variablelist>
      <varlistentry>
      <term>/etc/git-buildpackage/gbp.conf</term>
      <listitem><para>system wide</para></listitem>
      </varlistentry>
      <varlistentry>
      <term>~/.gbp.conf</term>
      <listitem><para>per user</para></listitem>
      </varlistentry>
      <varlistentry>
      <term>.gbp.conf</term>
      <listitem><para>per branch, can be published with the
      repository (deprecated)</para></listitem>
      </varlistentry>
      <varlistentry>
      <term>debian/gbp.conf</term>
      <listitem><para>per branch, can be published with the
      repository</para></listitem>
      </varlistentry>
      <varlistentry>
      <term>.git/gbp.conf</term>
      <listitem><para>per repository</para></listitem>
      </varlistentry>
    </variablelist>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      The <filename>gbp.conf</filename> provides default global options and specific options
      for &gbp; commands. All have the same format and are parsed in the above order. The
      file consists of several sections, one for each command. Comments start with a hash sign
      (<option>#</option>). The generic file syntax is:
    </para>
<programlisting>
    [DEFAULT]
    # This is section for global settings. Affects all commands
    key = value

    [&lt;command&gt;]
    # Specific sections for each command, like &gbp-buildpackage;
    key = value

    [remote-config &lt;name&gt;]
    # Specific sections for a remote configuration. This can be used several
    # times to set up remote configuration for gbp-create-remote-repo
    key = value
</programlisting>
<para>
For backwards compatibility sections starting with <filename>git-</filename> or
<filename>gbp-</filename> are still supported.
</para>

<para>

<option>key=value</option> pairs of the command sections reflect the command line
options and their settings. For example <xref linkend="man.gbp.buildpackage">
manualpage contains the <option>--git-export-dir</option>=<parameter>diirectory</parameter>
option which can be turned into configuration file setting by dropping the
<option>--git</option> prefix with:
</para>

<programlisting>
    [buildpackage]
    export-dir = directory
</programlisting>

<para>
Notice that some option can take Python like lists.
For example the <xref linkend="man.gbp.import.orig"> commmand has the
<option>--filter</option>=<parameter>pattern</parameter> option which can
be truned into a configuration file option like this:
</para>

<programlisting>
    [import-orig]
    filter = [ '.svn', '.hg' ]
</programlisting>

<para>
Boolean options can be either <option>True</option> or <option>False</option>. For example
<xref linkend="man.gbp.import.orig">; has the <option>--pristine-tar</option> and
<option>--no-pristine-tar</option> options which translate to:
</para>
<programlisting>
    [import-orig]
    pristine-tar = True
</programlisting>

<para>and</para>

<programlisting>
    [import-orig]
    pristine-tar = False
</programlisting>
<para>respectively.</para>
<note>
<para>
To see the current set of values that would be applied after parsing the
configuration files run the command with <option>--help</option> and check it's
output.
</para>
</note>
<note>
<para>
 <command>gbp import-dscs</command> and <command>git-pbuilder</command>
can't be configured via gbp.conf.
</para>
</note>

<para>
<xref linkend="man.gbp.create.remote.repo"> can additionally parse remote site
configurations from <filename>gbp.conf</filename>. For example a configration like:
</para>

<programlisting>
[remote-config pkg-libvirt]
# Location of the repository
remote-url-pattern = ssh://git.debian.org/git/pkg-libvirt/%(pkg)s
# Template dir to passed to git-init
template-dir = /srv/alioth.debian.org/chroot/home/groups/pkg-libvirt/git-template
</programlisting>

<para>
Can be used to create remote repositories for the pkg-libvirt project using:
</para>

<programlisting>
gbp-create-remote-repo --remote-config=pkg-libvirt
</programlisting>

<para>
This can be useful if you're often creating new remote repositores for
different projects.
</para>

  </refsect1>
  <refsect1>
    <title>EXAMPLES</title>
<para>
An example set up for packaging work:
</para>

<programlisting>
 # $HOME/.gbp.conf

 [DEFAULT]
 pristine-tar = True
 cleaner = fakeroot debian/rules clean

 [buildpackage]
 export-dir  = ../build-area/

 [import-orig]
 dch = False
 filter = .svn
 filter = .hg
 filter = .bzr
 filter = CVS
 filter = debian/*
 filter = */debian/*
 filter-pristine-tar = True

 [import-dsc]
 filter = [
        'CVS',
        '.cvsignore',
        '.hg',
        '.hgignore'
        '.bzr',
        '.bzrignore',
        '.gitignore'
        ]

 # End of file
</programlisting>
</refsect1>

<refsect1>
  <title>ENVIRONMENT</title>
   <variablelist>
      <varlistentry>
      <term>GBP_CONF_FILES</term>
      <listitem><para>Colon separated list of files to parse. The default is
the above list of configuration files.</para></listitem>
      </varlistentry>
   </variablelist>
</refsect1>

<refsect1>
  <title>FILES</title>
  <para>
    See See <filename>/etc/git-buildpackage/gbp.conf</filename> for an example.
  </para>
</refsect1>

<refsect1>
  <title>SEE ALSO</title>
  <para>
    <xref linkend="man.gbp.clone">,
    <xref linkend="man.gbp.create.remote.repo">,
    <xref linkend="man.gbp.pq">,
    <xref linkend="man.gbp.pull">,
    <xref linkend="man.gbp.dch">,
    <xref linkend="man.gbp.import.dsc">,
    <xref linkend="man.gbp.import.orig">,
    <xref linkend="man.gbp.buildpackage">,
    <ulink url="file:///usr/share/doc/git-buildpackage/manual-html/index.html">
    <citetitle>The Git-Buildpackage Manual</citetitle></ulink>
  </para>
</refsect1>
<refsect1>
  <title>AUTHORS</title>
  <para>&dhusername; &dhemail;</para>
  <para>This manual page is based on a POD version by Jari Aalto <email>jari.aalto@cante.net</email>.
	Released under license GNU GPL version 2 or (at your option) any later.
    version.
  </para>
  </refsect1>
</refentry>