~kklimonda/+junk/piuparts

1 by kklimonda at syntaxhighlighted
initial piuparts 0.36 import
1
<?xml version="1.0" encoding="utf-8"?>
2
3
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
4
"file:///usr/share/xml/docbook/schema/dtd/4.1.2/docbookx.dtd"
5
[]>
6
7
<refentry>
8
9
    <refentryinfo>
10
        <title>piuparts(1)</title>
11
        <address>
12
            <email>liw@iki.fi</email>
13
        </address>
14
        <author>
15
            <firstname>Lars</firstname>
16
            <surname>Wirzenius</surname>
17
        </author>
18
        <date>2005-07-10</date>
19
    </refentryinfo>
20
    
21
    <refmeta>
22
        <refentrytitle>piuparts</refentrytitle>
23
        <manvolnum>1</manvolnum>
24
    </refmeta>
25
    
26
    <refnamediv>
27
        <refname>piuparts</refname> 
28
        <refpurpose>.deb installation, upgrade, and removal 
29
                    testing suite</refpurpose>
30
    </refnamediv>
31
    
32
    <refsynopsisdiv>
33
        <cmdsynopsis>
34
            <command>piuparts</command>
35
            <arg><option>-apvV</option></arg>
36
            <arg><option>-d</option> <replaceable>distro</replaceable></arg>
37
            <arg><option>-i</option> <replaceable>filename</replaceable></arg>
38
            <arg><option>-I</option> <replaceable>regexp</replaceable></arg>
39
            <arg><option>-l</option> <replaceable>logfile</replaceable></arg>
40
            <arg><option>-m</option> <replaceable>url</replaceable></arg>
41
            <arg><option>--bindmount</option> <replaceable>dir</replaceable></arg>
42
            <arg><replaceable>package</replaceable></arg>
43
            <arg><replaceable>changes_file</replaceable></arg>
44
        </cmdsynopsis>
45
    </refsynopsisdiv>
46
    
47
    <refsect1>
48
        <title>DESCRIPTION</title>
49
50
        <para><command>piuparts</command> tests that Debian packages
51
        handle installation, upgrading, and removal correctly. It does
52
        this by creating a minimal Debian installation in a chroot, and
53
        installing, upgrading, and removing packages in that
54
        environment, and comparing the state of the directory tree
55
        before and after. <command>piuparts</command> reports any files
56
        that have been added, removed, or modified during this
57
        process.</para>
58
        
59
        <para><command>piuparts</command> is meant as a quality
60
        assurance tool for people who create Debian packages to test
61
        them before they upload them to the Debian package
62
        archive.</para>
63
        
64
        <para>By default, piuparts can do three different tests:</para>
65
        
66
        <orderedlist>
67
        
68
            <listitem><para>A simple install-purge test within one
69
            Debian distribution (chosen with the <option>-d</option>
70
            option, <literal>unstable</literal> by default). It sets up
71
            the chroot with the desired distribution, then installs and
72
            purges the packages, and reports problems.</para></listitem>
73
        
74
            <listitem><para>A simple install-upgrade-purge test within
75
            one Debian distribution. This test is like the install-purge
76
            test, but install the packages first via
77
            <command>apt-get</command> and then from the package files
78
            given on the command line. If the command line has package
79
            names (option <option>-a</option> used), or the packages are
80
            not known to <command>apt-get</command> (new packages), this
81
            test is skipped, otherwise it is performed
82
            automatically.</para></listitem>
83
84
            <listitem><para>An upgrade test between Debian releases.
85
            This test is enabled by using the <option>-d</option> option
86
            multiple times and disables the other two tests. It sets up
87
            the chroot with the first distribution named, then upgrades
88
            it to each successive one, and then remembers the directory
89
            tree state at the end. After this, it starts over with the
90
            chroot of the first distribution, installs the desired
91
            packages (via <command>apt-get</command>), and does the
92
            successive upgrading (via <command>apt-get
93
            dist-upgrade</command>). Then, if package files (and not
94
            just package names) were given on the command line, it
95
            installs them. Finally, it reports problems against the
96
            state of the directory tree at the last distribution
97
            compared with the state without the packages having been
98
            installed. This test can be quite slow to
99
            execute.</para>
100
            
101
            <para>Note that this does not work with experimental,
102
            because apt-get does not automatically upgrade to packages in
103
            experimental. To test a particular package or group of packages
104
            in experimental, use the second test.</para></listitem>
105
            
106
        </orderedlist>
107
        
108
        <para>Command line arguments are the paths to package files
109
        (e.g., <filename>piuparts_1.0-1_all.deb</filename>), paths to
110
        changes files (e.g., 
111
	<filename>piuparts_1.0-1_i386.changes</filename>),
112
        or names of packages, if the <option>--apt</option> option is
113
        given. </para>
114
115
	<para>When processing changes files, by default, every package in a
116
        changes file will be processed together with all individual packages
117
        given on the command line. Then each package given on the command line
118
        is processed in a single group. If the
119
        <option>--single-changes-list</option> is used, the packages in every
120
        changes file are processed together along with any individual packages
121
        that were given on the command line.</para>
122
        
123
        <para><command>piuparts</command> outputs to the standard output
124
        some log messages to show what is going on. If a
125
        log file is used, the messages go there as well.</para>
126
127
        <para><command>piuparts</command> needs to be run as root.</para>
128
        
129
    </refsect1>
130
131
    <refsect1>
132
        <title>OPTIONS</title>
133
        
134
        <para>Options must come before the other command line
135
        arguments.</para>
136
137
        <variablelist>
138
        
139
            <varlistentry>
140
            
141
                <term><option>-a</option></term>
142
                <term><option>--apt</option></term>
143
                
144
                <listitem>
145
                
146
                    <para>The <replaceable>package</replaceable> arguments
147
                    on the command line are to be treated as package names
148
                    and installed via <command>apt-get</command> instead
149
                    of being names of package files, to be installed
150
                    via <command>dpkg -i</command>.</para>
151
152
                </listitem>
153
            
154
            </varlistentry>
155
        
156
            <varlistentry>
157
            
158
                <term><option>-b</option> <replaceable>tarball</replaceable></term>
159
                <term><option>--basetgz=</option><replaceable>tarball</replaceable></term>
160
                
161
                <listitem>
162
                
163
                    <para>Use <replaceable>tarball</replaceable> as the
164
                    contents of the initial chroot, instead of building
165
                    a new one with <command>debootstrap</command>.</para>
166
                    
167
                    <para>The tarball can be created with the
168
                    <option>-s</option> option, or you can use one that
169
                    pbuilder has created (see <option>-p</option>). If
170
                    you create one manually, make sure the root of the
171
                    chroot is the root of the tarball.</para>
172
173
                </listitem>
174
            
175
            </varlistentry>
176
        
177
            <varlistentry>
178
            
179
                <term><option>-d</option> <replaceable>name</replaceable></term>
180
                <term><option>--distribution=</option><replaceable>name</replaceable></term>
181
                
182
                <listitem>
183
                
184
                    <para>Which Debian distribution to use: a code name
185
                    (etch, lenny, sid) or experimental. The default is
186
                    sid (i.e, unstable).</para>
187
188
                </listitem>
189
            
190
            </varlistentry>
191
        
192
            <varlistentry>
193
            
194
                <term><option>-D</option> <replaceable>flavor</replaceable></term>
195
                <term><option>--defaults</option> <replaceable>flavor</replaceable></term>
196
                
197
                <listitem>
198
                
199
                    <para>Use default settings suitable for a particular
200
                    <replaceable>flavor</replaceable> of Debian: either
201
                    <literal>debian</literal> or <literal>ubuntu</literal>.
202
                    </para>
203
204
                </listitem>
205
            
206
            </varlistentry>
207
        
208
            <varlistentry>
209
            
210
                <term><option>-i</option> <replaceable>filename</replaceable></term>
211
                <term><option>--ignore=</option><replaceable>filename</replaceable></term>
212
                
213
                <listitem>
214
                
215
                    <para>Add a filename to the list of filenames to be
216
                    ignored when comparing changes before and after
217
                    installation. By default,
218
                    <command>piuparts</command> ignores files that
219
                    always change during a package installation and
220
                    uninstallation, such as <command>dpkg</command>
221
                    status files. The filename should be relative to the
222
                    root of the chroot (e.g.,
223
                    <filename>var/lib/dpkg/status</filename>). This
224
                    option can be used as many times as
225
                    necessary.</para>
226
227
                </listitem>
228
            
229
            </varlistentry>
230
        
231
            <varlistentry>
232
            
233
                <term><option>-I</option> <replaceable>regexp</replaceable></term>
234
                <term><option>--ignore-regexp=</option><replaceable>regexp</replaceable></term>
235
                
236
                <listitem>
237
                
238
                    <para>Add a regular expression pattern to the list
239
                    of patterns for filenames to be ignored when
240
                    comparing changes before and after installation.
241
                    This option can be used as many times as
242
                    necessary.</para>
243
244
                </listitem>
245
            
246
            </varlistentry>
247
        
248
            <varlistentry>
249
            
250
                <term><option>-k</option></term>
251
                <term><option>--keep-tmpdir</option></term>
252
                
253
                <listitem>
254
                
255
                    <para>Don't remove the temporary directory for
256
		    the chroot when the program ends.</para>
257
258
                </listitem>
259
            
260
            </varlistentry>
261
        
262
            <varlistentry>
263
            
264
                <term><option>--keep-sources-list</option></term>
265
                
266
                <listitem>
267
                
268
                    <para>Don't modify the chroot's etc/apt/sources.list (only
269
                    makes sense with <option>--basetgz</option>).</para>
270
271
                </listitem>
272
            
273
            </varlistentry>
274
            
275
            <varlistentry>
276
            
277
                <term><option>--warn-on-others</option></term>
278
                
279
                <listitem>
280
                
281
                    <para>Print a warning rather than failing if files are 
282
                    left behind, modified, or removed by a package that was
283
                    not given on the command-line.</para>
284
285
                    <para>This way, you can basically isolate the purge test
286
                    to your own packages.  If a package that is brought in as
287
                    a dependency doesn't purge cleanly, the test will not
288
                    fail because of it (but a warning message will be
289
                    printed).</para>
290
291
                    <para>Behavior with multple packages given on the
292
                    command-line could be problematic, particularly if the
293
                    dependency tree of one package in the list includes
294
                    another in the list.  Therefore, it is recommended to
295
                    use this option with one package at a time.</para>
296
297
                </listitem>
298
            
299
            </varlistentry>
300
            <varlistentry>
301
            
302
                <term><option>--skip-minimize</option></term>
303
                
304
                <listitem>
305
                
306
                    <para>Allow skip minimize chroot step. This is useful when 
307
                    you want to test several packages with piuparts. You can 
308
                    prepare a tarball already minimized and skip this step in all the 
309
                    tests.</para>
310
311
                </listitem>
312
            
313
            </varlistentry>
314
            <varlistentry>
315
            
316
                <term><option>--list-installed-files</option></term>
317
                
318
                <listitem>
319
                
320
                    <para>List the files added to the chroot after the installation
321
                        of the package and after the installation of the package 
322
                        dependencies.</para>
323
324
                </listitem>
325
            
326
            </varlistentry> 
327
            <varlistentry>
328
            
329
                <term><option>--no-upgrade-test</option></term>
330
                
331
                <listitem>
332
                    <para>Skip testing upgrade from an existing version in the
333
                        archive.</para>
334
                </listitem>
335
            
336
            </varlistentry>  
337
            <varlistentry>
338
            
339
                <term><option>--skip-cronfiles-test</option></term>
340
                
341
                <listitem>
342
                    <para>Skip testing the output from the cron files left in the
343
                    system after remove a package.</para>
344
                </listitem>
345
            
346
            </varlistentry>  
347
            <varlistentry>
348
            
349
                <term><option>---scriptsdir=<replaceable>DIR</replaceable></option></term>
350
                
351
                <listitem>
352
                    <para>Directory where are placed the custom scripts. For more information
353
                    about this, read custom-scripts.txt</para>
354
                </listitem>
355
            
356
            </varlistentry>  
357
            <varlistentry>
358
            
359
                <term><option>-l</option> <replaceable>filename</replaceable></term>
360
                <term><option>--log-file=</option><replaceable>filename</replaceable></term>
361
                
362
                <listitem>
363
                
364
                    <para>Write log file to
365
                    <replaceable>filename</replaceable> in addition to
366
                    the standard output.</para>
367
368
                </listitem>
369
            
370
            </varlistentry>
371
        
372
            <varlistentry>
373
            
374
                <term><option>-m</option> <replaceable>url</replaceable></term>
375
                <term><option>--mirror=</option><replaceable>url</replaceable></term>
376
                
377
                <listitem>
378
                
379
                    <para>Which Debian mirror to use. The default is the
380
                    first mirror named in
381
                    <filename>/etc/apt/sources.list</filename> or
382
                    <filename>http://ftp.debian.org/</filename> if none is
383
                    found. This option may be used multiple times to use
384
                    multiple mirrors. Only the first mirror is used with
385
                    <command>debootstrap</command>.</para>
386
                    
387
                    <para>The 'components' that are used for a mirror
388
                    can also be set with this option: a space separated
389
                    list within the same argument (so you need to quote
390
                    the entire argument in the shell). If no components
391
                    are given explicitly, the usual Debian components
392
                    are used (<literal>main</literal>,
393
                    <literal>contrib</literal>, and
394
                    <literal>non-free</literal>). For the mirrors read from
395
                    <filename>/etc/apt/sources.list</filename>, the 
396
                    components are read from the same place.</para>
397
                    
398
                    <para>Note that <literal>file:</literal> addresses
399
                    works if the directories are made accessible from within
400
                    the chroot with <option>--bindmount</option>.</para>
401
402
                </listitem>
403
            
404
            </varlistentry>
405
406
            <varlistentry>
407
408
                <term><option>--bindmount=</option><replaceable>dir</replaceable></term>
409
410
                <listitem>
411
412
                    <para>Bind-mount a directory inside the chroot.</para>
413
414
                </listitem>
415
416
            </varlistentry>
417
418
            <varlistentry>
419
            
420
                <term><option>-n</option></term>
421
                <term><option>--no-ignores</option></term>
422
                
423
                <listitem>
424
                
425
                    <para>Forget all built-in and other ignores that
426
                    have been set so far. Any <option>-i</option> or
427
                    <option>-I</option> arguments that come after
428
                    this one will be obeyed, but none of the ones
429
                    that come before.</para>
430
431
                </listitem>
432
            
433
            </varlistentry>
434
        
435
            <varlistentry>
436
            
437
                <term><option>-N</option></term>
438
                <term><option>--no-symlinks</option></term>
439
                
440
                <listitem>
441
                
442
                    <para>Don't check for broken symlinks.</para>
443
444
                </listitem>
445
            
446
            </varlistentry>
447
        
448
            <varlistentry>
449
            
450
                <term><option>-p</option></term>
451
                <term><option>--pbuilder</option></term>
452
                
453
                <listitem>
454
                
455
                    <para>Use
456
                    <filename>/var/cache/pbuilder/base.tgz</filename> as
457
                    the base tarball. This is a shorthand so that you
458
                    don't need to use <option>-b</option> for it.</para>
459
460
                </listitem>
461
            
462
            </varlistentry>
463
        
464
            <varlistentry>
465
            
466
                <term><option>-s</option> <replaceable>filename</replaceable></term>
467
                <term><option>--save=</option><replaceable>filename</replaceable></term>
468
                
469
                <listitem>
470
                
471
                    <para>Save the chroot, after it has been set up, as
472
                    a tarball into <replaceable>filename</replaceable>.
473
                    It can then be used with <option>-b</option>.</para>
474
475
                </listitem>
476
            
477
            </varlistentry>
478
        
479
            <varlistentry>
480
            
481
                <term><option>-t</option> <replaceable>directory</replaceable></term>
482
                <term><option>--tmpdir=</option><replaceable>directory</replaceable></term>
483
                
484
                <listitem>
485
                
486
                    <para>Use <replaceable>directory</replaceable> as the place
487
                    where temporary files and directories are created. The
488
                    default is the environment variable <envar>TMPDIR</envar>,
489
                    or <filename>/tmp</filename> if not set.</para>
490
491
                </listitem>
492
            
493
            </varlistentry>
494
        
495
            <varlistentry>
496
            
497
                <term><option>--single-changes-list</option></term>
498
                
499
                <listitem>
500
                
501
                    <para>When processing changes files, piuparts will process
502
                    the packages in each individual changes file seperately.
503
                    This option will set piuparts to scan the packages of all
504
                    changes files together along with any individual package
505
                    files that may have been given on the command line.</para>
506
507
                </listitem>
508
            
509
            </varlistentry>
510
511
            <varlistentry>
512
            
513
                <term><option>-v</option></term>
514
                <term><option>--verbose</option></term>
515
                
516
                <listitem>
517
                
518
                    <para>This option no longer has any meaning, but it
519
                    is still accepted for backwards compatibility.</para>
520
521
                </listitem>
522
            
523
            </varlistentry>
524
       
525
            <varlistentry>
526
            
527
                <term><option>-V</option></term>
528
                <term><option>--version</option></term>
529
                
530
                <listitem>
531
                
532
                    <para>Write out the version number of the 
533
                    program.</para>
534
535
                </listitem>
536
            
537
            </varlistentry>
538
        
539
        </variablelist>
540
541
    </refsect1>
542
543
    <refsect1>
544
        <title>EXAMPLES</title>
545
546
            <para>Assume that you have just built a new version of your
547
            Debian package, to be uploaded to Debian unstable. It is in
548
            <filename>../foo_1.0-2_i386.deb</filename> and you would
549
            like to know whether it installs and uninstalls properly.
550
            Here's what you would do:</para>
551
552
            <programlisting>piuparts ../foo_1.0-2_i386.deb</programlisting>
553
554
            <para>If the package exists in the Debian archive already,
555
            the above command also tests that it upgrades properly.</para>
556
            
557
            <para>To do the same test, but using a particular mirror,
558
            and only the <literal>main</literal> component, you would
559
            do this:</para>
560
            
561
            <programlisting
562
            >piuparts -m 'http://gytha/debian main' ../foo_1.0-2_i386.deb</programlisting>
563
564
            <para>If you want to do the same as above but for your changes
565
            files, pass in your changes files when running piuparts, and
566
            piuparts will process each package in the changes files as though
567
            you had passed all those packages on the command line to piuparts
568
            yourself. For example:</para>
569
570
            <programlisting>piuparts ../foo_1.0-2_i386.changes</programlisting>
571
            <programlisting
572
            >piuparts -m 'http://gytha/debian main' ../foo_1.0-2_i386.changes</programlisting>
573
574
575
            <para>If you want to test that a package installs properly
576
            in the stable (etch) Debian release, then can be upgraded
577
            to the testing (lenny) and unstable (sid) versions, and then
578
            uninstalled without problems, you would give the following
579
            command:</para>
580
581
            <programlisting
582
            >piuparts -a -d etch -d lenny -d sid foo</programlisting>
583
584
    </refsect1>
585
586
    <refsect1>
587
        <title>ENVIRONMENT</title>
588
        
589
        <variablelist>
590
            <varlistentry>
591
                <term><envar>TMPDIR</envar></term>
592
                <listitem>
593
594
                    <para>Location for temporary files and directories.
595
                    If not set, use <filename>/tmp</filename>. See
596
                    also the <option>-t</option> (<option>--tmpdir</option>)
597
                    option.</para>
598
599
                </listitem>
600
            
601
            </varlistentry>
602
        </variablelist>
603
        
604
    </refsect1>
605
606
    <refsect1>
607
        <title>NOTES</title>
608
        
609
        <para>Outputs of commands run by <command>piuparts</command>
610
        are limited to the last megabyte. To change this limit, the
611
        source code needs to be edited.</para>
612
613
    </refsect1>
614
615
    <refsect1>
616
        <title>SEE ALSO</title>
617
        
618
        <para>
619
            <citerefentry>
620
                <refentrytitle>pbuilder</refentrytitle>
621
                <manvolnum>1</manvolnum>
622
            </citerefentry>,
623
            <citerefentry>
624
                <refentrytitle>debootstrap</refentrytitle>
625
                <manvolnum>8</manvolnum>
626
            </citerefentry>
627
        </para>
628
629
    </refsect1>
630
631
    <refsect1>
632
        <title>AUTHOR</title>
633
        
634
        <para>Lars Wirzenius (liw@iki.fi).</para>
635
636
    </refsect1>
637
638
</refentry>