-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.html
342 lines (311 loc) · 11.4 KB
/
index.html
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" type="text/css" href="media/style.css?v=2" media="screen">
<title>
travis.debian.net — Easily build and test your Debian packaging on travis-ci.org & GitHub
</title>
</head>
<body>
<a id="github" href="https://github.com/lamby/travis.debian.net"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/567c3a48d796e2fc06ea80409cc9dd82bf714434/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"></a>
<header>
<div class="container">
<h1>travis.debian.net</h1>
<h2>Easily build and test your Debian packaging on travis-ci.org & GitHub</h2>
</div>
</header>
<div class="container">
<section id="main_content">
<h3 id="what">
What is this?
</h3>
<p>
<tt>travis.debian.net</tt> is a hosted service for projects that host
their Debian packaging on <a href="https://github.com/">GitHub</a> to use
the <a href="https://travis-ci.org">Travis CI</a> continuous integration
platform to test builds on every update. Amongst many other advantages,
this helps catch issues as early as possible and avoids having to run
long package builds on one's own computers.
</p>
<p>
Whilst possible without <tt>travis.debian.net</tt>, using this service
not only avoids unwieldy duplication of configuration, it works around
backwards-compatibility issues in supporting tools in older Debian
releases.
</p>
<p>
<tt>travis.debian.net</tt> additionally supports running
<em>autopkgtest</em> tests and disabling network access during builds.
</p>
<p>
The <a href="https://travis-ci.com">travis-ci.com</a> paid-for platform
is also supported.
</p>
<h3 id="quick-setup">
Quick setup
</h3>
<ol>
<li>
Enable builds for your package on
<a href="https://travis-ci.org">travis-ci.org</a>:
<img src="media/images/enable.png">
</li>
<li>
Ensure "<em>Only build if .travis.yml is present</em>" is enabled:
<img src="media/images/settings.png">
</li>
<li>
Add <tt>.travis.yml</tt> to your
<a href="https://honk.sigxcpu.org/piki/projects/git-buildpackage/">git-buildpackage</a>
branches:
<pre>$ wget -O.travis.yml <a href="http://travis.debian.net/travis.yml">http://travis.debian.net/travis.yml</a>
$ git add .travis.yml
$ git commit -m "Add .travis.yml from <http://travis.debian.net>"</pre>
</li>
<li>
If there already exists a <tt>.travis.yml</tt> file, simply override
it; ensuring that subsequent upstream merges retain the
<tt>travis.debian.net</tt> version. Additionally for "3.0 (quilt)"
packages, you will need to:
<pre>$ echo 'extend-diff-ignore = "^\.travis\.yml$"' >> debian/source/options
$ git add debian/source/options
$ git commit -m "Add /.travis.yml to extend-diff-ignore in debian/source/options."</pre>
</pre>
</li>
<li>
You should now be able to build your package:
<br><img src="media/images/log.png">
</li>
</ol>
<h3 id="how">
How it works
</h3>
<p>
At it's core <tt>travis.debian.net</tt> is a hosted POSIX shell script
that is executed within the Travis CI test environment.
</p>
<p>
First, <tt>travis.debian.net</tt> detects which release of Debian
the branch is targeting based on the current branch name. The
<em>experimental</em> suite and all varieties of backports are
intelligently detected. A <tt>debian/changelog</tt> is created if one
does not exist.
</p>
</p>
A throwaway <a href="https://www.docker.com/">Docker</a> image is then
created containing all the required build-dependencies. The package is
then built in this isolated environment with no access to the internet.
</p>
<p>
<a href="https://lintian.debian.org/">Lintian</a> is run on the result
and the binary packages are saved to the parent directory.
</p>
<h3 id="configuration">
Configuration
</h3>
<p>
Configuration is performed by setting environment variables. You can do
this within the Travis CI web interface itself.
</p>
<p>
Please note that the API is currently unstable.
</p>
<dl>
<dt>
DEB_BUILD_OPTIONS
</dt>
<dd>
This variable is passed without modification to the build process and
modifies the build process
<a href="https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options">as outlined in Debian Policy</a>.
</dd>
<dt>
DEB_BUILD_PROFILES
</dt>
<dd>
This variable is passed without modification to the build process and
modifies the build process
<a href="https://wiki.debian.org/BuildProfileSpec">as described in the Build Profile spec</a>.
</dd>
<dt>
TRAVIS_DEBIAN_DISTRIBUTION
</dt>
<dd>
Which distribution of Debian the package should be built in. By
default, this is automatically detected from the branch name.
</dd>
<dt>
TRAVIS_DEBIAN_DERIVATIVE
</dt>
<dd>
Which Debian derivative to use (eg. <tt>debian</tt> or <tt>ubuntu</tt>).
This will use the corresponding
<tt>TRAVIS_DEBIAN_DERIVATIVE:DISTRIBUTION</tt> Docker container
as a base.
Some derivatives are automatically derived from
<tt>TRAVIS_DEBIAN_DISTRIBUTION</tt>, and defaults values for
<tt>TRAVIS_DEBIAN_MIRROR</tt> and <tt>TRAVIS_DEBIAN_COMPONENTS</tt>
are then set. You can still override them as needed.
Note that not all features like backports, autopkgtests or security
updates may be work, depending on your derivative.
</dd>
<dt>
TRAVIS_DEBIAN_COMPONENTS
</dt>
<dd>
Additional archive components used for building and testing this
package.
The components are set in sources.list and should be space-separated.
By default, this is set to <tt>main</tt>.
</dd>
<dt>
TRAVIS_DEBIAN_BACKPORTS
</dt>
<dd>
The corresponding backports repositories will be enabled in
/etc/apt/sources.list. If <tt>TRAVIS_DEBIAN_DISTRIBUTION</tt> is not
set, the value is automatically detected. Multiple repositories can be
specified delimited by spaces, eg. <tt>"stretch-backports stretch-backports-sloppy"</tt>.
</dd>
<dt>
TRAVIS_DEBIAN_SECURITY_UPDATES
</dt>
<dd>
When <tt>true</tt>, the corresponding repository for security updates
will be enabled in /etc/apt/sources.list. If not set, updates are
automatically enabled for the distributions that have security support.
</dd>
<dt>
TRAVIS_DEBIAN_EXPERIMENTAL
</dt>
<dd>
When <tt>true</tt>, Debian's <em>experimental</em> repository will be
enabled. If <tt>TRAVIS_DEBIAN_DISTRIBUTION</tt> is not set, the value
is automatically detected.
</dd>
<dt>
TRAVIS_DEBIAN_MIRROR
</dt>
<dd>
Which Debian mirror to use. By default, <tt>deb.debian.org</tt> is used.
</dd>
<dt>
TRAVIS_DEBIAN_EXTRA_REPOSITORY
</dt>
<dd>
If the package has some dependencies not found in Debian, you can add
your own repository to the build using this variable. The format is
the same as <tt>/etc/apt/sources.list</tt>, for example
<tt>"https://my.repo.net/debian/ stretch main"</tt>. Note that the
double-quotes are required to ensure Travis correctly exports the
variable.
</dd>
<dt>
TRAVIS_DEBIAN_EXTRA_REPOSITORY_GPG_URL
</dt>
<dd>
Location of the public key of the extra repository defined in
<tt>TRAVIS_DEBIAN_EXTRA_REPOSITORY</tt>, so that its packages can be
authenticated.
</dd>
<dt>
TRAVIS_DEBIAN_LINTIAN
</dt>
<dd>
When <tt>true</tt>, install and run the
<a href="https://lintian.debian.org/">Lintian</a> package checker
after the build. By default, Lintian is run.
</dd>
<dt>
TRAVIS_DEBIAN_TARGET_DIR
</dt>
<dd>
Which directory to store the results of the build. By default, the
packages are stored in the parent directory.
</dd>
<dt>
TRAVIS_DEBIAN_BUILD_DIR
</dt>
<dd>
Which directory to build under. By default, <tt>/tmp/buildd</tt> is used.
</dd>
<dt>
TRAVIS_DEBIAN_NETWORK_ENABLED
</dt>
<dd>
By default, the network is disabled during the package build process.
If your build really needs internet access, set this value to
<tt>true</tt>.
</dd>
<dt>
TRAVIS_DEBIAN_AUTOPKGTEST
</dt>
<dd>
When <tt>true</tt>, run <tt>autopkgtest</tt> tests after a successful
build. By default, tests are attempted if a
<tt>debian/tests/control</tt> file exists or <tt>debian/control</tt>
has the <tt>Testsuite: autopkgtest</tt> header.
</dd>
<dt>
TRAVIS_DEBIAN_INCREMENT_VERSION_NUMBER
</dt>
<dd>
When <tt>true</tt>, increment the version number of the package by
appending a new entry to <tt>debian/changelog</tt> to reflect the
Travis CI build number. By default, the package version is left
unchanged.
</dd>
</dl>
<h3 id="faq">
Frequently asked questions (FAQ)
</h3>
<dl>
<dt>
Q: But <tt>wget | sh -</tt> is insecure!
</dt>
<dd>
A: Of course, and you should never run such a command on your own
machine. However, not only does Travis-CI build within throwaway
containers that you are not responsible for, cannot trust, and generally
don't care about, there is zero expectation that the resulting
<tt>.deb</tt> files are to be used or installed anywhere.
</dd>
</dl>
<h3 id="links">
Links
</h3>
<ul>
<li>
<a href="https://github.com/lamby/travis.debian.net">Source</a>
•
<a href="https://github.com/lamby/travis.debian.net/issues">Issues</a>
•
<a href="https://github.com/lamby/travis.debian.net/pulls">Pull requests</a>
</li>
<li>
<a href="https://travis-ci.org">Travis CI</a>
</li>
<li>
<a href="https://honk.sigxcpu.org/piki/projects/git-buildpackage/">git-buildpackage</a>
</li>
</ul>
<h3>
Copyright
</h3>
<p>
Copyright © 2015, 2016, 2017, 2018
<a href="https://chris-lamb.co.uk/">Chris Lamb</a>
<<a href="mailto:[email protected]" class="user-mention">[email protected]</a>>
</p>
<p>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
</p>
</section>
</div>
</body>
</html>