reprepro.1 102 KB
Newer Older
1
.TH REPREPRO 1 "2013-05-04" "reprepro" REPREPRO
Bernhard Link's avatar
Bernhard Link committed
2
.SH NAME
3
reprepro \- produce, manage and sync a local repository of Debian packages
4
.mso www.tmac
Bernhard Link's avatar
Bernhard Link committed
5
.SH SYNOPSIS
6
.B reprepro \-\-help
Bernhard Link's avatar
Bernhard Link committed
7 8 9 10 11 12

.B reprepro
[
\fIoptions\fP
]
\fIcommand\fP
Bernhard Link's avatar
Bernhard Link committed
13 14
[
\fIper\-command\-arguments\fP
Bernhard Link's avatar
Bernhard Link committed
15 16
]
.SH DESCRIPTION
17
reprepro is a tool to manage a repository of Debian packages
Bernhard Link's avatar
Bernhard Link committed
18 19 20 21
(.deb, .udeb, .dsc, ...).
It stores files either being injected manually or
downloaded from some other repository (partially) mirrored
into a pool/ hierarchy.
22 23
Managed packages and checksums of files are stored in a
Berkeley DB database file,
Bernhard Link's avatar
Bernhard Link committed
24
so no database server is needed.
25 26 27 28
Checking signatures of mirrored repositories and creating
signatures of the generated Package indices is supported.

Former working title of this program was mirrorer.
Bernhard Link's avatar
Bernhard Link committed
29
.SH "GLOBAL OPTIONS"
30 31
Options can be specified before the command. Each affects a different
subset of commands and is ignored by other commands.
Bernhard Link's avatar
Bernhard Link committed
32
.TP
33
.B \-h \-\-help
Bernhard Link's avatar
Bernhard Link committed
34 35
Displays a short list of options and commands with description.
.TP
36
.B \-v, \-V, \-\-verbose
37
Be more verbose. Can be applied multiple times. One uppercase
38 39
.B \-V
counts as five lowercase
40
.B \-v.
Bernhard Link's avatar
Bernhard Link committed
41
.TP
42 43 44 45 46 47 48
.B \-\-silent
Be less verbose. Can be applied multiple times. One
.B \-v
and one
.B \-s
cancel each other out.
.TP
49
.B \-f, \-\-force
Bernhard Link's avatar
Bernhard Link committed
50
This option is ignored, as it no longer exists.
Bernhard Link's avatar
Bernhard Link committed
51
.TP
52
.B \-b, \-\-basedir \fIbasedir\fP
53
Sets the base\-dir all other default directories are relative to.
54 55 56 57
If none is supplied and the
.B REPREPRO_BASE_DIR
environment variable is not set either, the current directory
will be used.
Bernhard Link's avatar
Bernhard Link committed
58
.TP
59 60 61 62 63 64
.B \-\-outdir \fIoutdir\fP
Sets the base\-dir of the repository to manage, i.e. where the
.B pool/
subdirectory resides. And in which the
.B dists/
directory is placed by default.
65 66
If this starts with '\fB+b/\fP', it is relative to basedir.

67 68
The default for this is \fIbasedir\fP.
.TP
69
.B \-\-confdir \fIconfdir\fP
Bernhard Link's avatar
Bernhard Link committed
70
Sets the directory where the configuration is searched in.
71

72 73 74
If this starts with '\fB+b/\fP', it is relative to basedir.

If none is given, \fB+b/conf\fP (i.e. \fIbasedir\fP\fB/conf\fP) will be used.
Bernhard Link's avatar
Bernhard Link committed
75
.TP
76
.B \-\-distdir \fIdistdir\fP
Bernhard Link's avatar
Bernhard Link committed
77
Sets the directory to generate index files relatively to. (i.e. things like
78
Packages.gz, Sources.gz and Release.gpg)
Bernhard Link's avatar
Bernhard Link committed
79

80 81 82 83
If this starts with '\fB+b/\fP', it is relative to basedir,
if starting with '\fB+o/\fP' relative to outdir.

If none is given, \fB+o/dists\fP (i.e. \fIoutdir\fP\fB/dists\fP) is used.
84

Bernhard Link's avatar
Bernhard Link committed
85 86
.B Note:
apt has
Bernhard Link's avatar
Bernhard Link committed
87
.B dists
88
hard-coded in it, so this is mostly only useful for testing or when your webserver
Bernhard Link's avatar
Bernhard Link committed
89
pretends another directory structure than your physical layout.
90 91 92 93 94 95 96 97 98 99

.B Warning:
Beware when changing this forth and back between two values not ending
in the same directory.
Reprepro only looks if files it wants are there. If nothing of the content
changed and there is a file it will not touch it, assuming it is the one it
wrote last time, assuming any different \fB\-\-distdir\fP ended in the same
directory.
So either clean a directory before setting \fB\-\-distdir\fP to it or
do an \fBexport\fP with the new one first to have a consistent state.
Bernhard Link's avatar
Bernhard Link committed
100
.TP
Bernhard Link's avatar
Bernhard Link committed
101 102 103 104
.B \-\-logdir \fIlogdir\fP
The directory where files generated by the \fBLog:\fP directive are
stored if they have no absolute path.

105 106 107 108 109
If this starts with '\fB+b/\fP', it is relative to basedir,
if starting with '\fB+o/\fP' relative to outdir,
with '\fB+c/\fP' relative to confdir.

If none is given, \fB+b/logs\fP (i.e. \fIbasedir\fP\fB/logs\fP) is used.
Bernhard Link's avatar
Bernhard Link committed
110
.TP
111
.B \-\-dbdir \fIdbdir\fP
Bernhard Link's avatar
Bernhard Link committed
112 113
Sets the directory where reprepro keeps its databases.

114 115 116 117 118
If this starts with '\fB+b/\fP', it is relative to basedir,
if starting with '\fB+o/\fP' relative to outdir,
with '\fB+c/\fP' relative to confdir.

If none is given, \fB+b/db\fP (i.e. \fIbasedir\fP\fB/db\fP) is used.
119

Bernhard Link's avatar
Bernhard Link committed
120 121 122 123
.B Note:
This is permanent data, no cache. One has almost to regenerate the whole
repository when this is lost.
.TP
124
.B \-\-listdir \fIlistdir\fP
Simon Kainz's avatar
Simon Kainz committed
125
Sets the directory where it downloads indices to when importing
Bernhard Link's avatar
Bernhard Link committed
126 127
from other repositories. This is temporary data and can be safely deleted
when not in an update run.
128

129 130 131 132 133
If this starts with '\fB+b/\fP', it is relative to basedir,
if starting with '\fB+o/\fP' relative to outdir,
with '\fB+c/\fP' relative to confdir.

If none is given, \fB+b/lists\fP (i.e. \fIbasedir\fP\fB/lists\fP) is used.
Bernhard Link's avatar
Bernhard Link committed
134
.TP
Bernhard Link's avatar
Bernhard Link committed
135 136
.B \-\-morguedir \fImorguedir\fP
Files deleted from the pool are stored into \fImorguedir\fP.
137 138 139 140 141 142

If this starts with '\fB+b/\fP', it is relative to basedir,
if starting with '\fB+o/\fP' relative to outdir,
with '\fB+c/\fP' relative to confdir.

If none is given, deleted files are just deleted.
Bernhard Link's avatar
Bernhard Link committed
143
.TP
144
.B \-\-methoddir \fImethoddir\fP
Bernhard Link's avatar
Bernhard Link committed
145 146 147 148
Look in \fImethoddir\fP instead of
.B /usr/lib/apt/methods
for methods to call when importing from other repositories.
.TP
149 150 151 152 153 154
.B \-C, \-\-component \fIcomponents\fP
Limit the specified command to this components only.
This will force added packages to this components,
limit removing packages from this components,
only list packages in this components,
and/or otherwise only look at packages in this components,
155
depending on the command in question.
156 157 158

Multiple components are specified by separating them with \fB|\fP,
as in \fB\-C 'main|contrib'\fP.
Bernhard Link's avatar
Bernhard Link committed
159
.TP
160 161
.B \-A, \-\-architecture \fIarchitectures\fP
Limit the specified command to this architectures only.
162
(i.e. only list such packages,
163 164
only remove packages from the specified architectures,
or otherwise only look at/act on this architectures
165
depending on the specific command).
Bernhard Link's avatar
Bernhard Link committed
166

167 168 169
Multiple architectures are specified by separating them with \fB|\fP,
as in \fB\-A 'sparc|i386'\fP.

170 171
Note that architecture \fBall\fP packages can be included to each
architecture but are then handled separately.
Bernhard Link's avatar
Bernhard Link committed
172
Thus by using \fB\-A\fP in a specific way one can have different versions of
173 174
an architecture \fBall\fP package in different architectures of the
same distribution.
Bernhard Link's avatar
Bernhard Link committed
175
.TP
176
.B \-T, \-\-type \fRdsc|deb|udeb
177
Limit the specified command to this packagetypes only.
178 179
(i.e. only list such packages, only remove such packages, only include
such packages, ...)
180
.TP
181
.B \-S, \-\-section \fIsection\fP
Bernhard Link's avatar
Bernhard Link committed
182 183
Overrides the section of inclusions. (Also override possible override files)
.TP
184
.B \-P, \-\-priority \fIpriority\fP
Bernhard Link's avatar
Bernhard Link committed
185
Overrides the priority of inclusions. (Also override possible override files)
Bernhard Link's avatar
Bernhard Link committed
186
.TP
187
.BR \-\-export= ( silent\-never | never | changed | lookedat | force )
Bernhard Link's avatar
Bernhard Link committed
188
This option specify whether and how the high level actions
189
(e.g. install, update, pull, delete)
190 191
should export the index files of the distributions they work with.
.TP
192
.BR \-\-export=lookedat
193 194
In this mode every distribution the action handled will be exported,
unless there was an error possibly corrupting it.
195 196 197 198
.br
\fINote\fP that only missing files and files whose intended content changed
between before and after the action will be written.
To get a guaranteed current export, use the \fBexport\fP action.
199 200 201 202
.br
For backwards compatibility, \fBlookedat\fP is also available under the
old name \fBnormal\fP.
The name \fBnormal\fP is deprecated and will be removed in future versions.
203
.TP
204
.BR \-\-export=changed
205 206 207 208 209 210 211
In this mode every distribution actually changed will be exported,
unless there was an error possibly corrupting it.
(i.e. if nothing changed, not even missing files will be created.)
.br
\fINote\fP that only missing files and files whose intended content changed
between before and after the action will be written.
To get a guaranteed current export, use the \fBexport\fP action.
212 213
.TP
.BR \-\-export=force
214 215
Always export all distributions looked at, even if there was some
error possibly bringing it into a inconsistent state.
216 217 218 219
.TP
.BR \-\-export=never
No index files are exported. You will have to call \fBexport\fP later.
.br
220
\fINote\fP that you most likely additionally need the \fB\-\-keepunreferencedfiles\fP
221
option, if you do not want some of the files pointed to by the untouched index
222
files to vanish.
223
.TP
224
.BR \-\-export=silent-never
225
Like never, but suppress most output about that.
226
.TP
227 228 229 230
.B \-\-ignore=\fIwhat\fP
Ignore errors of type \fIwhat\fP. See the section \fBERROR IGNORING\fP
for possible values.
.TP
231
.B \-\-nolistsdownload
232 233 234 235 236 237
When running \fBupdate\fP, \fBcheckupdate\fP or \fBpredelete\fP do not download
any Release or index files.
This is hardly useful except when you just run one of those
command for the same distributions.
And even then reprepro is usually good in
not downloading except \fBRelease\fP and \fBRelease.gpg\fP files again.
Bernhard Link's avatar
Bernhard Link committed
238
.TP
239 240 241 242 243
.B \-\-nothingiserror
If nothing was done, return with exitcode 1 instead of the usual 0.

Note that "nothing was done" means the primary purpose of the action
in question.
244
Auxiliary actions (opening and closing the database, exporting missing
245
files with \-\-export=lookedat, ...) usually do not count.
246 247 248 249 250 251 252 253 254 255 256 257 258
Also note that this is not very well tested.
If you find an action that claims to have done something in some cases
where you think it should not, please let me know.
.TP
.B \-\-keeptemporaries
Do not delete temporary \fB.new\fP files when exporting a distribution
fails.
(reprepro first create \fB.new\fP files in the \fBdists\fP directory and
only if everything is generated, all files are put into their final place
at once.
If this option is not specified and something fails, all are deleted
to keep \fBdists\fP clean).
.TP
259 260 261 262
.B \-\-keepunreferencedfiles
Do not delete files that are no longer used because the package they
are from is deleted/replaced with a newer version from the last distribution
it was in.
Bernhard Link's avatar
Bernhard Link committed
263
.TP
264 265 266 267 268 269 270
.B \-\-keepunusednewfiles
The include, includedsc, includedeb and processincoming by default delete
any file they added to the pool that is not marked used at the end of the
operation.
While this keeps the pool clean and allows changing before trying to add again,
this needs copying and checksum calculation every time one tries to add a file.
.TP
271 272 273 274 275 276
.B \-\-keepdirectories
Do not try to rmdir parent directories after files or directories
have been removed from them.
(Do this if your directories have special permissions you want keep,
do not want to be pestered with warnings about errors to remove them,
or have a buggy rmdir call deleting non-empty directories.)
Bernhard Link's avatar
Bernhard Link committed
277
.TP
278
.B \-\-ask\-passphrase
279
Ask for passphrases when signing things and one is needed. This is a quick
280 281 282 283 284 285 286 287 288
and dirty and unsafe implementation using the obsolete \fBgetpass(3)\fP
function with the description gpgme is supplying.
So the prompt will look quite funny and support for passphrases with
more than 8 characters depend on your libc.
Use of this option is not recommended. Use gpg-agent with pinentry instead.

(With current versions of gnupg you need to set \fBpinentry-mode loopback\fP
in your .gnupg/gpg.conf file to use \fB\-\-ask\-passphrase\fP.
Without that option gnupg uses the much safer and recommended pinentry instead).
Bernhard Link's avatar
Bernhard Link committed
289
.TP
Bernhard Link's avatar
Bernhard Link committed
290
.B \-\-noskipold
291 292
When updating do not skip targets where no new index files and no files
marked as already processed are available.
Bernhard Link's avatar
Bernhard Link committed
293

294 295
If you changed a script to preprocess downloaded index files or
changed a Listfilter, you most likely want to call reprepro with \-\-noskipold.
Bernhard Link's avatar
Bernhard Link committed
296 297 298 299 300 301
.TP
.B \-\-waitforlock \fIcount
If there is a lockfile indicating another instance of reprepro is currently
using the database, retry \fIcount\fP times after waiting for 10 seconds
each time.
The default is 0 and means to error out instantly.
302 303 304 305 306 307 308 309 310 311
.TP
.B \-\-spacecheck full\fR|\fPnone
The default is \fBfull\fR:
.br
In the update commands, check for every to be downloaded file which filesystem
it is on and how much space is left.
.br
To disable this behaviour, use \fBnone\fP.
.TP
.BI \-\-dbsafetymargin " bytes-count"
312
If checking for free space, reserve \fIbyte-count\fP bytes on the filesystem
313 314 315
containing the \fBdb/\fP directory.
The default is 104857600 (i.e. 100MB), which is quite large.
But as there is no way to know in advance how large the databases will
316
grow and libdb is extremely touchy in that regard, lower only when you know
317 318 319
what you do.
.TP
.BI \-\-safetymargin " bytes-count"
320
If checking for free space, reserve \fIbyte-count\fP bytes on filesystems
321 322
not containing the \fBdb/\fP directory.
The default is 1048576 (i.e. 1MB).
323 324 325 326 327 328 329
.TP
.B \-\-noguessgpgtty
Don't set the environment variable
.BR GPG_TTY ,
even when it is not set, stdin is terminal and
.B /proc/self/fd/0
is a readable symbolic link.
330
.TP
Bernhard Link's avatar
Bernhard Link committed
331 332 333 334 335 336 337 338 339 340 341
.B \-\-gnupghome
Set the
.B GNUPGHOME
evnironment variable to the given directory as argument to this option.
And your gpg will most likely use the content of this variable
instead of "~/.gnupg".
Take a look at
.BR gpg (1)
to be sure.
This option in the command line is usually not very useful, as it is possible
to set the environment variable directly.
342
Its main reason for existence is that it can be used in \fIconf\fP\fB/options\fP.
Bernhard Link's avatar
Bernhard Link committed
343
.TP
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
.BI \-\-gunzip " gz-uncompressor"
While reprepro links against \fBlibz\fP, it will look for the program given
with this option (or \fBgunzip\fP if not given) and use that when uncompressing
index files while downloading from remote repositories.
(So that downloading and uncompression can happen at the same time).
If the program is not found or is \fBNONE\fP (all-uppercase) then uncompressing
will always be done using the built in uncompression method.
The program has to accept the compressed file as stdin and write
the uncompressed file into stdout.
.TP
.BI \-\-bunzip2 " bz2-uncompressor"
When uncompressing downloaded index files or when not linked against \fBlibbz2\fP
reprepro will use this program to uncompress \fB.bz2\fP files.
The default value is \fBbunzip2\fP.
If the program is not found or is \fBNONE\fP (all-uppercase) then uncompressing
will always be done using the built in uncompression method or not be possible
when not linked against \fBlibbz2\fP.
361
The program has to accept the compressed file as stdin and write
362 363 364 365 366 367 368 369 370 371
the uncompressed file into stdout.
.TP
.BI \-\-unlzma " lzma-uncompressor"
When trying to uncompress or read \fPlzma\fP compressed files, this program
will be used.
The default value is \fBunlzma\fP.
If the program is not found or is \fBNONE\fP (all-uppercase) then uncompressing
lzma files will not be possible.
The program has to accept the compressed file as stdin and write
the uncompressed file into stdout.
Bernhard Link's avatar
Bernhard Link committed
372
.TP
Bernhard Link's avatar
Bernhard Link committed
373 374 375 376 377 378 379 380 381
.BI \-\-unxz " xz-uncompressor"
When trying to uncompress or read \fPxz\fP compressed files, this program
will be used.
The default value is \fBunxz\fP.
If the program is not found or is \fBNONE\fP (all-uppercase) then uncompressing
xz files will not be possible.
The program has to accept the compressed file as stdin and write
the uncompressed file into stdout.
.TP
382 383 384 385 386 387 388 389
.BI \-\-lunzip " lzip-uncompressor"
When trying to uncompress or read \fPlzip\fP compressed files, this program
will be used.
The default value is \fBlunzip\fP.
If the program is not found or is \fBNONE\fP (all-uppercase) then uncompressing
lz files will not be possible.
The program has to accept the compressed file as stdin and write
the uncompressed file into stdout.
Bernhard Link's avatar
Bernhard Link committed
390
Note that .lz support is \fBDEPRECATED\fP and will be removed in the future.
391
.TP
392
.BI \-\-list\-max " count"
393
Limits the output of \fBlist\fP, \fBlistmatched\fP and \fBlistfilter\fP to the first \fIcount\fP
394 395 396 397 398
results.
The default is 0, which means unlimited.
.TP
.BI \-\-list\-skip " count"
Omitts the first \fIcount\fP results from the output of
399
\fBlist\fP, \fBlistmatched\fP and \fBlistfilter\fP.
400
.TP
Bernhard Link's avatar
Bernhard Link committed
401
.BI \-\-list\-format " format"
402
Set the output format of \fBlist\fP, \fBlistmatched\fP and \fBlistfilter\fP commands.
403
The format is similar to dpkg\-query's \fB\-\-showformat\fP:
Bernhard Link's avatar
Bernhard Link committed
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418
fields are specified as
.BI ${ fieldname }
or
.BI ${ fieldname ; length }\fR.\fP
Zero length or no length means unlimited.
Positive numbers mean fill with spaces right, negative fill with spaces left.

.BR \[rs]n ", " \[rs]r ", " \[rs]t ", " \[rs]0
are new-line, carriage-return, tabulator and zero-byte.
Backslash (\fB\[rs]\fP) can be used to escape every non-letter-or-digit.

The special field names
.BR $identifier ", " $architecture ", " $component ", " $type ", " $codename
denote where the package was found.

419 420 421 422 423 424 425 426 427 428 429
The special field names
.BR $source " and " $sourceversion
denote the source and source version a package belongs to.
(i.e.
.B ${$source}
will either be the same as
.B ${source}
(without a possible version in parentheses at the end)
or the same as
.BR ${package} .

430 431 432 433 434 435 436 437 438
The special field names
.BR $basename ", " $filekey " and " $fullfilename
denote the first package file part of this entry
(i.e. usually the .deb, .udeb or .dsc file)
as basename, as filekey (filename relative to the outdir)
and the full filename with outdir prepended
(i.e. as relative or absolute as your
outdir (or basedir if you did not set outdir) is).

Bernhard Link's avatar
Bernhard Link committed
439 440 441 442 443 444 445 446 447 448
When \fB\-\-list\-format\fP is not given or \fBNONE\fP, then the default
is equivalent to
.br
.BR "${$identifier} ${package} ${version}\[rs]n" .

Escaping digits or letters not in above list,
using dollars not escaped outside specified constructs,
or any field names not listed as special and not consisting entirely out of
letters, digits and minus signs have undefined behaviour
and might change meaning without any further notice.
449 450 451 452 453

If you give this option on the command line,
don't forget that $ is also interpreted by your shell.
So you have to properly escape it.
For example by putting the whole argument to \-\-list\-format in single quotes.
454 455 456 457 458
.TP
.B \-\-show\-percent
When downloading packages, show each completed percent of completed package
downloads together with the size of completely downloaded packages.
(Repeating this option increases the frequency of this output).
Bernhard Link's avatar
Bernhard Link committed
459 460 461 462 463 464 465 466 467 468
.TP
.B \-\-onlysmalldeletes
The pull and update commands will skip every distribution in which one
target loses more than 20% of its packages (and at least 10).

Using this option (or putting it in the options config file) can
avoid removing large quantities of data but means you might often
give
.B \-\-noonlysmalldeletes
to override it.
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485
.TP
.B \-\-restrict \fIsrc\fP\fR[\fP=\fIversion\fP\fR|\fP:\fItype\fP\fR]\fP
Restrict a \fBpull\fP or \fBupdate\fP to only act on packages belonging
to source-package \fIsrc\fP.
Any other package will not be updated (unless it matches a \fB\-\-restrict\-bin\fP).
Only packages that would otherwise be updated or are at least marked with \fBhold\fP
in a \fBFilterList\fP or \fBFilerSrcList\fP will be updated.

The action can be restricted to a source version using a equal sign or
changed to another type (see FilterList) using a colon.

This option can be given multiple times to list multiple packages, but each
package may only be named once (even when there are different versions or types).
.TP
.B \-\-restrict\-binary \fIname\fP\fR[\fP=\fIversion\fP\fR|\fP:\fItype\fP\fR]\fP
Like \fB\-\-restrict\fP but restrict to binary packages (\fB.deb\fP and \fB.udeb\fP).
Source packages are not upgraded unless they appear in a \fB\-\-restrict\fP.
486 487 488 489 490 491
.TP
.B \-\-restrict\-file \fIfilename\fP
Like \fB\-\-restrict\fP but read a whole file in the \fBFilterSrcList\fP format.
.TP
.B \-\-restrict\-file\-bin \fIfilename\fP
Like \fB\-\-restrict\-bin\fP but read a whole file in the \fBFilterList\fP format.
Bernhard Link's avatar
Bernhard Link committed
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516
.TP
.B \-\-endhook \fIhookscript\fP

Run the specified \fIhookscript\fP once reprepro exits.
It will get the usual \fBREPREPRO_\fP* environment variables set (or unset)
and additionally a variable \fBREPREPRO_EXIT_CODE\fP that is the exit code
with which reprepro would have exited (the hook is always called once the
initial parsing of global options and the command name is done, no matter
if reprepro did anything or not).
Reprepro will return to the calling process with the exitcode of this script.
Reprepro has closed all its databases and removed all its locks,
so you can run reprepro again in this script
(unless someone else did so in the same repository before, of course).

The only advantage over running that command always directly after reprepro
is that you can some environment variables set and cannot so easily forget
it if this option is in conf/options.

The script is supposed to be located relative to \fIconfdir\fP, unless its
name starts with \fB/\fP, \fB./\fP, \fB+b/\fP, \fB+o/\fP, or \fB+c/\fP
and the name may not start (except in the cases given before) with a \fB+\fP.

An example script looks like: \fB
 #!/bin/sh
 
517
 if [ "$REPREPRO_EXIT_CODE" \-ne 0 ] ; then
Bernhard Link's avatar
Bernhard Link committed
518 519 520 521 522 523 524 525 526
 	exit "$REPREPRO_EXIT_CODE"
 fi
 
 echo "congratulations, reprepro with arguments: $*"
 echo "seems to have run successfully. REPREPRO_ part of the environment is:"
 set | grep ^REPREPRO_
 
 exit 0
 \fP
Bernhard Link's avatar
Bernhard Link committed
527 528 529 530 531 532 533 534 535 536 537
.TP
.B \-\-outhook \fIhookscript\fP
\fIhookscript\fP is called with a \fB.outlog\fP file as argument (located
in \fIlogdir\fP) containing a description of all changes made to \fIoutdir\fP.

The script is supposed to be located relative to \fIconfdir\fP, unless its
name starts with \fB/\fP, \fB./\fP, \fB+b/\fP, \fB+o/\fP, or \fB+c/\fP
and the name may not start (except in the cases given before) with a \fB+\fP.

For a format of the \fB.outlog\fP files generated for this script see the
\fBmanual.html\fP shiped with reprepro.
Bernhard Link's avatar
Bernhard Link committed
538 539 540
.SH COMMANDS
.TP
.BR export " [ " \fIcodenames\fP " ]"
541 542 543
Generate all index files for the specified distributions.

This regenerates all files unconditionally.
Bernhard Link's avatar
Bernhard Link committed
544
It is only useful if you want to be sure \fBdists\fP is up to date,
545 546 547 548
you called some other actions with \fB\-\-export=never\fP before or
you want to create an initial empty but fully equipped
.BI dists/ codename
directory.
Bernhard Link's avatar
Bernhard Link committed
549
.TP
550
.RB " [ " \-\-delete " ] " createsymlinks " [ " \fIcodenames\fP " ]"
551 552 553 554 555 556 557 558
Creates \fIsuite\fP symbolic links in the \fBdists/\fP-directory pointing
to the corresponding \fIcodename\fP.

It will not create links, when multiple of the given codenames
would be linked from the same suite name, or if the link
already exists (though when \fB\-\-delete\fP is given it
will delete already existing symlinks)
.TP
559
.B list \fIcodename\fP \fR[\fP \fIpackagename\fP \fR]\fP
Bernhard Link's avatar
Bernhard Link committed
560
List all packages (source and binary, except when
Bernhard Link's avatar
Bernhard Link committed
561
.B \-T
562
or
563
.B \-A
Bernhard Link's avatar
Bernhard Link committed
564
is given) with the given name in all components (except when
565
.B \-C
566 567
is given) and architectures (except when
.B \-A
Bernhard Link's avatar
Bernhard Link committed
568
is given) of the specified distribution.
569
If no package name is given, list everything.
Bernhard Link's avatar
Bernhard Link committed
570
The format of the output can be changed with \fB\-\-list\-format\fP.
571 572
To only get parts of the result, use \fB\-\-list\-max\fP and
\fB\-\-list\-skip\fP.
573 574 575 576 577 578 579 580
.TP
.B listmatched \fIcodename\fP \fIglob\fP
as list, but does not list a single package, but all packages
matching the given shell-like \fIglob\fP.
(i.e. \fB*\fP, \fB?\fP and \fB[\fP\fIchars\fP\fB]\fP are allowed).

Examples:

581 582
.B reprepro \-b . listmatched test2 'linux\-*'
lists all packages starting with \fBlinux\-\fP.
583

Bernhard Link's avatar
Bernhard Link committed
584
.TP
585
.B listfilter \fIcodename\fP \fIcondition\fP
586
as list, but does not list a single package, but all packages
587 588
matching the given condition.

589
The format of the formulas is those of the dependency lines in
590
Debian packages' control files with some extras.
591 592 593 594
That means a formula consists of names of fields with a possible
condition for its content in parentheses.
These atoms can be combined with
an exclamation mark '!' (meaning not),
595
a pipe symbol '|' (meaning or) and
Bernhard Link's avatar
Bernhard Link committed
596
a comma ',' (meaning and).
597 598
Additionally parentheses can be used to change binding
(otherwise '!' binds more than '|' than ',').
599

600 601
The values given in the search expression are directly alphabetically
compared to the headers in the respective index file.
602 603 604 605
That means that each part \fIFieldname\fP\fB (\fP\fIcmp\fP\fB \fP\fIvalue\fP\fB)\fP
of the formula will be true for exactly those package that have
in the \fBPackage\fP or \fBSources\fP file a line starting with \fIfieldname\fP
and a value is alphabetically \fIcmp\fP to \fIvalue\fP.
606

Bernhard Link's avatar
Bernhard Link committed
607
Additionally since reprepro 3.11.0, '\fB%\fP' can be used as comparison operator,
608 609
denoting matching a name with shell like wildcard
(with '\fB*\fP', '\fB?\fP' and '\fB[\fP..\fB]\fP').
610

611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638
The special field names starting with '\fB$\fP' have special meaning
(available since 3.11.1):

.B $Version

The version of the package, comparison is not alphabetically, but as
Debian version strings.

.B $Source

The source name of the package.

.B $SourceVersion

The source version of the package.

.B $Architecture

The architecture the package is in (listfilter) or to be put into.

.B $Component

The component the package is in (listfilter) or to be put into.

.B $Packagetype

The packagetype of the package.

639 640 641
Examples:

.B reprepro \-b . listfilter test2 'Section (== admin)'
642
will list all packages in distribution test2 with a Section field and the value
643
of that field being \fBadmin\fP.
644 645

.B reprepro \-b . \-T deb listfilter test2 'Source (== \fIblub\fP) | ( !Source , Package (== \fIblub\fP) )'
646
will find all .deb Packages with either a Source field blub or
647
no Source field and a Package field blub.
648
(That means all package generated by a source package \fIblub\fP,
649
except those also specifying a version number with its Source).
650

651 652 653 654 655 656
.B reprepro \-b . \-T deb listfilter test2 '$Source (==\fIblub\fP)
is the better way to do this (but only available since 3.11.1).

.B reprepro \-b . listfilter test2 '$PackageType (==deb), $Source (==\fIblub\fP)
is another (less efficient) way.

657
.B reprepro \-b . listfilter test2 'Package (% linux\-*\-2.6*)'
658
lists all packages with names starting with \fBlinux\-\fP and later
659
having an \fB\-2.6\fP.
660
.TP
661
.B ls \fIpackage-name\fP
662
List the versions of the specified package in all distributions.
663
.TP
664 665 666
.B lsbycomponent \fIpackage-name\fP
Like ls, but group by component (and print component names).
.TP
667 668 669 670 671
.B remove \fIcodename\fP \fIpackage-names\fP
Delete all packages in the specified distribution,
that have package name listed as argument.
(i.e. remove all packages \fBlist\fP with the same arguments and options
would list, except that an empty package list is not allowed.)
672 673 674 675 676

Note that like any other operation removing or replacing a package,
the old package's files are unreferenced and thus may be automatically
deleted if this was their last reference and no \fB\-\-keepunreferencedfiles\fP
specified.
Bernhard Link's avatar
Bernhard Link committed
677
.TP
678 679 680
.B removematched \fIcodename\fP \fIglob\fP
Delete all packages \fBlistmatched\fP with the same arguments would list.
.TP
Bernhard Link's avatar
Bernhard Link committed
681
.B removefilter \fIcodename\fP \fIcondition\fP
682
Delete all packages \fBlistfilter\fP with the same arguments would list.
Bernhard Link's avatar
Bernhard Link committed
683
.TP
Bernhard Link's avatar
Bernhard Link committed
684 685 686 687 688 689
.B removesrc \fIcodename\fP \fIsource-name\fP \fR[\fP\fIversion\fP\fR]\fP
Remove all packages in distribution \fIcodename\fP belonging to source
package \fIsource-name\fP.
(Limited to those with source version \fIversion\fP if specified).

If package tracking is activated, it will use that information to find the
690
packages, otherwise it traverses all package indices for the distribution.
Bernhard Link's avatar
Bernhard Link committed
691
.TP
Bernhard Link's avatar
Bernhard Link committed
692 693 694 695 696
.B removesrcs \fIcodename\fP \fIsource-name\fP\fR[\fP=\fIversion\fP\fR]\fP \fI...\fP
Like \fBremovesrc\fP, but can be given multiple source names
and source versions must be specified by appending '\fB=\fP' and the version
to the name (without spaces).
.TP
Bernhard Link's avatar
Bernhard Link committed
697 698 699
.BR update " [ " \fIcodenames\fP " ]"
Sync the specified distributions (all if none given) as
specified in the config with their upstreams. See the
Bernhard Link's avatar
Bernhard Link committed
700 701 702
description of
.B conf/updates
below.
Bernhard Link's avatar
Bernhard Link committed
703
.TP
704 705
.BR checkupdate " [ " \fIcodenames\fP " ]"
Same like
706 707 708
.BR update ,
but will show what it will change instead of actually changing it.
.TP
709 710 711 712 713
.BR dumpupdate " [ " \fIcodenames\fP " ]"
Same like
.BR checkupdate ,
but less suiteable for humans and more suitable for computers.
.TP
Bernhard Link's avatar
Bernhard Link committed
714 715 716 717 718 719 720 721 722
.BR predelete " [ " \fIcodenames\fP " ]"
This will determine which packages a \fBupdate\fP would delete or
replace and remove those packages.
This can be useful for reducing space needed while upgrading, but
there will be some time where packages are vanished from the
lists so clients will mark them as obsolete.
Plus if you cannot
download a updated package in the (hopefully) following update
run, you will end up with no package at all instead of an old one.
723
This will also blow up \fB.diff\fP files if you are using the pdiff
Bernhard Link's avatar
Bernhard Link committed
724
example or something similar.
Bernhard Link's avatar
Bernhard Link committed
725 726 727
So be careful when using this option or better get some more space so
that update works.
.TP
728 729 730
.B cleanlists
Delete all files in \fIlistdir\fP (default \fIbasedir\fP\fB/lists\fP) that do not
belong to any update rule for any distribution.
Bernhard Link's avatar
Bernhard Link committed
731
I.e. all files are deleted in that directory that no \fBupdate\fP
732
command in the current configuration can use.
733 734 735
(The files are usually left there, so if they are needed again they
do not need to be downloaded again. Though in many easy cases not
even those files will be needed.)
736
.TP
737 738 739 740 741 742 743 744 745 746
.BR pull " [ " \fIcodenames\fP " ]"
pull in newer packages into the specified distributions (all if none given)
from other distributions in the same repository.
See the description of
.B conf/pulls
below.
.TP
.BR checkpull " [ " \fIcodenames\fP " ]"
Same like
.BR pull ,
747 748
but will show what it will change instead of actually changing it.
.TP
749 750 751 752 753
.BR dumppull " [ " \fIcodenames\fP " ]"
Same like
.BR checkpull ,
but less suiteable for humans and more suitable for computers.
.TP
Bernhard Link's avatar
Bernhard Link committed
754 755
.B includedeb \fIcodename\fP \fI.deb-filename\fP
Include the given binary Debian package (.deb) in the specified
Bernhard Link's avatar
Bernhard Link committed
756
distribution, applying override information and guessing all
Bernhard Link's avatar
Bernhard Link committed
757 758
values not given and guessable.
.TP
Bernhard Link's avatar
Bernhard Link committed
759
.B includeudeb \fIcodename\fP \fI.udeb-filename\fP
760 761
Same like \fBincludedeb\fP, but for .udeb files.
.TP
Bernhard Link's avatar
Bernhard Link committed
762 763 764
.B includedsc \fIcodename\fP \fI.dsc-filename\fP
Include the given Debian source package (.dsc, including other files
like .orig.tar.gz, .tar.gz and/or .diff.gz) in the specified
Bernhard Link's avatar
Bernhard Link committed
765
distribution, applying override information and guessing all values
Bernhard Link's avatar
Bernhard Link committed
766
not given and guessable.
767

768 769 770 771 772 773
Note that .dsc files do not contain section or priority, but the
Sources.gz file needs them.
reprepro tries to parse .diff and .tar files for
it, but is only able to resolve easy cases.
If reprepro fails to extract those automatically,
you have to either specify a DscOverride or give them via
774
.B \-S
775
and
776
.B \-P
Bernhard Link's avatar
Bernhard Link committed
777 778 779
.TP
.B include  \fIcodename\fP \fI.changes-filename\fP
Include in the specified distribution all packages found and suitable
780
in the \fI.changes\fP file, applying override information guessing all
Bernhard Link's avatar
Bernhard Link committed
781 782
values not given and guessable.
.TP
783
.B processincoming \fIrulesetname\fP \fR[\fP\fI.changes-file\fP\fR]\fP
784
Scan an incoming directory and process the .changes files found there.
785
If a filename is supplied, processing is limited to that file.
786 787 788 789 790 791 792
.I rulesetname
identifies which rule-set in
.B conf/incoming
determines which incoming directory to use
and in what distributions to allow packages into.
See the section about this file for more information.
.TP
Bernhard Link's avatar
Bernhard Link committed
793 794 795 796 797 798
.BR check " [ " \fIcodenames\fP " ]"
Check if all packages in the specified distributions have all files
needed properly registered.
.TP
.BR checkpool " [ " fast " ]"
Check if all files believed to be in the pool are actually still there and
Bernhard Link's avatar
Bernhard Link committed
799
have the known md5sum. When
Bernhard Link's avatar
Bernhard Link committed
800 801 802
.B fast
is specified md5sum is not checked.
.TP
803 804
.BR collectnewchecksums
Calculate all supported checksums for all files in the pool.
805
(Versions prior to 3.3 did only store md5sums, 3.3 added sha1, 3.5 added sha256).
806
.TP
807 808 809 810 811 812
.BR translatelegacychecksums
Remove the legacy \fBfiles.db\fP file after making sure all information
is also found in the new \fBchecksums.db\fP file.
(Alternatively you can call \fBcollecnewchecksums\fP and remove the file
on your own.)
.TP
Bernhard Link's avatar
Bernhard Link committed
813 814 815 816 817 818 819 820 821 822 823 824 825
.B rereference
Forget which files are needed and recollect this information.
.TP
.B dumpreferences
Print out which files are marked to be needed by whom.
.TP
.B dumpunreferenced
Print a list of all filed believed to be in the pool, that are
not known to be needed.
.TP
.B deleteunreferenced
Remove all known files (and forget them) in the pool not marked to be
needed by anything.
826
.TP
Bernhard Link's avatar
Bernhard Link committed
827 828 829 830 831 832 833 834 835 836
.BR deleteifunreferenced " [ " \fIfilekeys\fP " ]"
Remove the given files (and forget them) in the pool if they
are not marked to be used by anything.
If no command line arguments are given,
stdin is read and every line treated as one filekey.
This is mostly useful together with \fB\-\-keepunreferenced\fP
in \fBconf/options\fP or in situations where one does not want
to run \fBdeleteunreferenced\fP, which removes all files eligible
to be deleted with this command.
.TP
837 838
.BR reoverride " [ " \fIcodenames\fP " ]"
Reapply the override files to the given distributions (Or only parts
Bernhard Link's avatar
Bernhard Link committed
839
thereof given by \fB\-A\fP,\fB\-C\fP or \fB\-T\fP).
840 841

Note: only the control information is changed. Changing a section
842
to a value, that would cause another component to be guessed, will
843
not cause any warning.
844 845 846 847 848 849 850 851
.TP
.BR redochecksums " [ " \fIcodenames\fP " ]"
Readd the information about file checksums to the package indices.

Usually the package's control information is created at inclusion
time or imported from some remote source and not changed later.
This command modifies it to readd missing checksum types.

852 853 854
Only checksums already known are used.
To update known checkums about files run \fBcollectnewchecksums\fP first.

Bernhard Link's avatar
Bernhard Link committed
855 856 857 858 859 860 861
.TP
.BR dumptracks " [ " \fIcodenames\fP " ]"
Print out all information about tracked source packages in the
given distributions.
.TP
.BR retrack " [ " \fIcodenames\fP " ]"
Recreate a tracking database for the specified distributions.
862 863 864 865
This contains ouf of three steps.
First all files marked as part of a source package are set to
unused.
Then all files actually used are marked as thus.
866
Finally tidytracks is called remove everything no longer needed
867 868 869 870 871 872
with the new information about used files.

(This behaviour, though a bit longsome, keeps even files only
kept because of tracking mode \fBkeep\fP and files not otherwise
used but kept due to \fBincludechanges\fP or its relatives.
Before version 3.0.0 such files were lost by running retrack).
Bernhard Link's avatar
Bernhard Link committed
873
.TP
874
.BR removealltracks " [ " \fIcodenames\fP " ]"
Bernhard Link's avatar
Bernhard Link committed
875 876 877
Removes all source package tracking information for the
given distributions.
.TP
Bernhard Link's avatar
Bernhard Link committed
878
.B removetrack " " \fIcodename\fP " " \fIsourcename\fP " " \fIversion\fP
Bernhard Link's avatar
Bernhard Link committed
879 880 881
Remove the trackingdata of the given version of a given sourcepackage
from a given distribution. This also removes the references for all
used files.
Bernhard Link's avatar
Bernhard Link committed
882
.TP
883 884 885 886
.BR tidytracks " [ " \fIcodenames\fP " ]"
Check all source package tracking information for the given distributions
for files no longer to keep.
.TP
Bernhard Link's avatar
Bernhard Link committed
887
.B copy \fIdestination-codename\fP \fIsource-codename\fP \fIpackages...\fP
888
Copy the given packages from one distribution to another.
889 890 891
The packages are copied verbatim, no override files are consulted.
Only components and architectures present in the source distribution are
copied.
892
.TP
893 894 895 896 897 898 899
.B copysrc \fIdestination-codename\fP \fIsource-codename\fP \fIsource-package\fP \fR[\fP\fIversions\fP\fR]\fP
look at each package
(where package means, as usual, every package be it dsc, deb or udeb)
in the distribution specified by \fIsource-codename\fP
and identifies the relevant source package for each.
All packages matching the specified \fIsource-package\fP name
(and any \fIversion\fP if specified)
900
are copied to the \fIdestination-codename\fP distribution.
901 902 903 904 905 906 907
The packages are copied verbatim, no override files are consulted.
Only components and architectures present in the source distribution are
copied.
.TP
.B copymatched \fIdestination-codename\fP \fIsource-codename\fP \fIglob\fP
Copy packages matching the given glob (see \fBlistmatched\fP).

908 909 910
The packages are copied verbatim, no override files are consulted.
Only components and architectures present in the source distribution are
copied.
911 912 913 914
.TP
.B copyfilter \fIdestination-codename\fP \fIsource-codename\fP \fIformula\fP
Copy packages matching the given formula (see \fBlistfilter\fP).
(all versions if no version is specified).
915 916 917
The packages are copied verbatim, no override files are consulted.
Only components and architectures present in the source distribution are
copied.
Bernhard Link's avatar
Bernhard Link committed
918
.TP
919 920 921 922 923
.B restore \fIcodename\fP \fIsnapshot\fP \fIpackages...\fP
.TP
.B restoresrc \fIcodename\fP \fIsnapshot\fP \fIsource-epackage\fP \fR[\fP\fIversions\fP\fR]\fP
.TP
.B restorefilter \fIdestination-codename\fP \fIsnapshot\fP \fIformula\fP
924 925
.TP
.B restorematched \fIdestination-codename\fP \fIsnapshot\fP \fIglob\fP
926
Like the copy commands, but do not copy from another distribution,
927
but from a snapshot generated with \fBgensnapshot\fP.
928 929 930
Note that this blindly trusts the contents of the files in your \fBdists/\fP
directory and does no checking.
.TP
Bernhard Link's avatar
Bernhard Link committed
931 932 933 934 935 936 937 938 939 940
.B clearvanished
Remove all package databases that no longer appear in \fBconf/distributions\fP.
If \fB\-\-delete\fP is specified, it will not stop if there are still
packages left.
Even without \fB\-\-delete\fP it will unreference
files still marked as needed by this target.
(Use \fB\-\-keepunreferenced\fP to not delete them if that was the last
reference.)

Do not forget to remove all exported package indices manually.
Bernhard Link's avatar
Bernhard Link committed
941 942 943
.TP
.B gensnapshot " " \fIcodename\fP " " \fIdirectoryname\fP
Generate a snapshot of the distribution specified by \fIcodename\fP
944
in the directory \fIdists\fB/\fIcodename\fB/snapshots/\fIdirectoryname\fB/\fR
Bernhard Link's avatar
Bernhard Link committed
945 946 947 948 949 950 951
and reference all needed files in the pool as needed by that.
No Content files are generated and no export hooks are run.

Note that there is currently no automated way to remove that snapshot
again (not even clearvanished will unlock the referenced files after the
distribution itself vanished).
You will have to remove the directory yourself and tell reprepro
952
to \fBunreferencesnapshot \fP\fIcodename\fP\fB \fP\fIdirectoryname\fP before
Bernhard Link's avatar
Bernhard Link committed
953 954 955 956 957 958
\fBdeleteunreferenced\fP will delete the files from the pool locked by this.

To access such a snapshot with apt, add something like the following to
your sources.list file:
.br
\fBdeb method://as/without/snapshot \fIcodename\fB/snapshots/\fIname\fB main\fR
959
.TP
960 961 962 963 964 965
.B unreferencesnapshot " " \fIcodename\fP " " \fIdirectoryname\fP
Remove all references generated by an \fBgenshapshot\fP with the
same arguments.
This allows the next \fBdeleteunferenced\fP call to delete those files.
(The indicies in \fBdists/\fP for the snapshot are not removed.)
.TP
966 967 968
.BR rerunnotifiers " [ " \fIcodenames\fP " ]"
Run all external scripts specified in the \fBLog:\fP options of the
specified distributions.
969
.TP
970 971 972 973 974 975 976
.B build\-needing \fIcodename\fP \fIarchitecture\fP \fR[\fP \fIglob\fP \fR]\fP
List source packages (matching \fIglob\fP) that likely need a build on the
given architecture.

List all source package in the given distribution without a binary package
of the given architecture built from that version of the source,
without a \fB.changes\fP or \fB.log\fP file for the given architecture,
977 978
with an Architecture field including \fBany\fP, \fIos\fP\fB-any\fP (with
\fIos\fP being the part before the hyphen in the architecture or \fBlinux\fP
979
if there is no hyphen) or the architecture and
980
at least one package in the Binary field not yet available.
981 982 983 984

If instead of \fIarchitecture\fP the term \fBany\fP is used,
all architectures are iterated and the architecture is printed as
fourth field in every line.
985 986 987 988 989 990 991 992

If the \fIarchitecture\fP is \fBall\fP, then only source packages
with an Architecture field including \fBall\fP are considered
(i.e. as above with real architectures but \fBany\fP does not suffice).
Note that dpkg\-dev << 1.16.1 does not both set \fBany\fP and \fBall\fP
so source packages building both architecture dependent and independent
packages will never show up unless built with a new enough dpkg\-source).

993
.TP
994
.B translatefilelists
995
Translate the file list cache within
996 997 998 999 1000 1001
.IB db /contents.cache.db
into the new format used since reprepro 3.0.0.

Make sure you have at least half of the space of the current
.IB db /contents.cache.db
file size available in that partition.
1002
.TP
1003
.B flood \fIdistribution\fP \fR[\fP\fIarchitecture\fP\fR]\fP
1004 1005
For each architecture of \fIdistribution\fP (or for the one specified)
add architecture \fBall\fP packages from other architectures
1006 1007 1008 1009 1010
(but the same component or packagetype) under the following conditions:

 Packages are only upgraded, never downgraded.
 If there is a package not being architecture \fPall\fP,
then architecture \fBall\fP packages of the same source from the same
Bernhard Link's avatar
Bernhard Link committed
1011
source version are preferred over those that have no such binary sibling.
1012 1013 1014 1015 1016
 Otherwise the package with the highest version wins.

You can restrict with architectures are looked for architecture \fPall\fP
packages using \fB\-A\fP and which components/packagetypes are flooded by
\fB\-C\fP/\fB\-T\fP as usual.
1017 1018

There are mostly two use cases for this command:
1019 1020
If you added an new architecture to an distribution and want to copy all
architecture \fBall\fP packages to it.
1021 1022 1023 1024
Or if you included some architecture all packages only to some architectures
using \fB\-A\fP to avoid breaking the other architectures for which the binary
packages were still missing and now want to copy it to those architectures were
they are unlikely to break something (because a newbinary is already available).
1025
.TP
Bernhard Link's avatar
Bernhard Link committed
1026
.B unusedsources \fR[\fP\fIdistributions\fP\fR]\fP
1027 1028 1029 1030 1031 1032
List all source packages for which no binary package build from them is found.
.TP
.B sourcemissing \fR[\fP\fIdistributions\fP\fR]\fP
List all binary packages for which no source package is found
(the source package must be in the same distribution,
but source packages only kept by package tracking is enough).
1033 1034 1035 1036 1037 1038 1039
.TP
.B reportcruft \fR[\fP\fIdistributions\fP\fR]\fP
List all source package versions that either have a source package
and no longer a binary package or binary packages left without
source package in the index. (Unless sourcemissing also list packages
where the source package in only in the pool due to enabled tracking
but no longer in the index).
Bernhard Link's avatar
Bernhard Link committed
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058
.TP
.BR sizes " [ " \fIcodenames\fP " ]"
List the size of all packages in the distributions specified or
in all distributions.

Each row contains 4 numbers, each being a number of bytes in a set
of packages, which are:
The packages in this distribution
(including anything only kept because of tracking),
the packages only in this distribution
(anything in this distribution and a snapshot of this distribution
counts as only in this distribution),
the packages in this distribution and its snapshots,
the packages only in this distribution or its snapshots.

If more than one distribution is selected, also list a sum of those
(in which 'Only' means only in selected ones, and not only only in
one of the selected ones).

1059 1060 1061 1062 1063
.TP
.BR repairdescriptions " [ " \fIcodenames\fP " ]"
Look for binary packages only having a short description
and try to get the long description from the .deb file
(and also remove a possible Description-md5 in this case).
Bernhard Link's avatar
Bernhard Link committed
1064 1065 1066 1067 1068 1069 1070
.SS internal commands
These are hopefully never needed, but allow manual intervention.
.B WARNING:
Is is quite easy to get into an inconsistent and/or unfixable state.
.TP
.BR _detect " [ " \fIfilekeys\fP " ]"
Look for the files, which \fIfilekey\fP
Bernhard Link's avatar
Bernhard Link committed
1071
is given as argument or as a line of the input
Bernhard Link's avatar
Bernhard Link committed
1072 1073
(when run without arguments), and calculate
their md5sum and add them to the list of known files.
1074
(Warning: this is a low level operation, no input validation
Bernhard Link's avatar
Bernhard Link committed
1075
or normalization is done.)
Bernhard Link's avatar
Bernhard Link committed
1076 1077 1078 1079 1080 1081
.TP
.BR _forget " [ " \fIfilekeys\fP " ]"
Like
.B _detect
but remove the given \fIfilekey\fP from the list of known
files.
1082
(Warning: this is a low level operation, no input validation
Bernhard Link's avatar
Bernhard Link committed
1083
or normalization is done.)
Bernhard Link's avatar
Bernhard Link committed
1084
.TP
1085
.B _listmd5sums
Bernhard Link's avatar
Bernhard Link committed
1086 1087
Print a list of all known files and their md5sums.
.TP
1088 1089 1090
.B _listchecksums
Print a list of all known files and their recorded checksums.
.TP
Bernhard Link's avatar
Bernhard Link committed
1091
.B _addmd5sums
1092 1093 1094
alias for the newer
.TP
.B _addchecksums
Bernhard Link's avatar
Bernhard Link committed
1095
Add information of known files (without any check done)
1096
in the strict format of _listchecksums output (i.e. don't dare to
Bernhard Link's avatar
Bernhard Link committed
1097
use a single space anywhere more than needed).
Bernhard Link's avatar
Bernhard Link committed
1098 1099 1100 1101
.TP
.BI _dumpcontents " identifier"
Printout all the stored information of the specified
part of the repository. (Or in other words, the content
1102
the corresponding Packages or Sources file would get)
Bernhard Link's avatar
Bernhard Link committed
1103 1104 1105 1106
.TP
.BI "_addreference " filekey " " identifier
Manually mark \fIfilekey\fP to be needed by \fIidentifier\fP
.TP
1107 1108 1109 1110 1111
.BI "_addreferences " identifier " \fR[\fR " filekeys " \fR]\fR"
Manually mark one or more \fIfilekeys\fP to be needed by \fIidentifier\fP.
If no command line arguments are given,
stdin is read and every line treated as one filekey.
.TP
1112 1113 1114
.BI "_removereference " identifier " " filekey
Manually remove the given mark that the file is needed by this identifier.
.TP
1115 1116 1117 1118
.BI "_removereferences " identifier
Remove all references what is needed by
.I identifier.
.TP
Bernhard Link's avatar
Bernhard Link committed
1119
.BI __extractcontrol " .deb-filename"
Bernhard Link's avatar
Bernhard Link committed
1120 1121 1122
Look what reprepro believes to be the content of the
.B control
file of the specified .deb-file.
Bernhard Link's avatar
Bernhard Link committed
1123 1124 1125 1126 1127
.TP
.BI __extractfilelist " .deb-filename"
Look what reprepro believes to be the list of files
of the specified .deb-file.
.TP
1128
.BI _fakeemptyfilelist " filekey"
Bernhard Link's avatar
Bernhard Link committed
1129 1130
Insert an empty filelist for \fIfilekey\fP. This is a evil
hack around broken .deb files that cannot be read by reprepro.
1131 1132 1133
.TP
.B _addpackage \fIcodenam\fP \fIfilename\fP \fIpackages...\fP
Add packages from the specified filename to part specified
1134
by \fB\-C\fP \fB\-A\fP and \fB\-T\fP of the specified distribution.
1135
Very strange things can happen if you use it improperly.
1136 1137 1138 1139 1140 1141 1142
.TP
.B __dumpuncompressors
List what compressions format can be uncompressed and how.
.TP
.BI __uncompress " format compressed-file uncompressed-file"
Use builtin or external uncompression to uncompress the specified
file of the specified format into the specified target.
1143
.TP
1144 1145 1146
.BR _listcodenames
Print - on per line - the codenames of all configured distributions.
.TP
Bernhard Link's avatar
Bernhard Link committed
1147
.B _listconfidentifiers  \fIidentifier\fP \fR[\fP \fIdistributions...\fP \fR]\fP
1148 1149 1150 1151 1152
Print - one per line - all identifiers of subdatabases as derived from the
configuration.
If a list of distributions is given, only identifiers of those are printed.

.TP
Bernhard Link's avatar
Bernhard Link committed
1153
.B _listdbidentifiers  \fIidentifier\fP \fR[\fP \fIdistributions...\fP \fR]\fP
1154 1155
Print - one per line - all identifiers of subdatabases in the current
database.
Bernhard Link's avatar
Bernhard Link committed
1156
This will be a subset of the ones printed by \fB_listconfidentifiers\fP or
1157 1158 1159 1160
most commands but \fBclearvanished\fP will refuse to run, and depending
on the database compatibility version, will include all those if reprepro
was run since the config was last changed.

Bernhard Link's avatar
Bernhard Link committed
1161
.SH "CONFIG FILES"
Bernhard Link's avatar
Bernhard Link committed
1162
.B reprepo
1163
uses three config files, which are searched in
Bernhard Link's avatar
Bernhard Link committed
1164
the directory specified with
1165
.B \-\-confdir
Bernhard Link's avatar
Bernhard Link committed
1166 1167
or in the
.B conf/
1168 1169
subdirectory of the \fIbasedir\fP.

1170
If a file
1171
.B options
Bernhard Link's avatar
Bernhard Link committed
1172
exists, it is parsed line by line.
1173
Each line can be the long
1174
name of a command line option (without the \-\-)
1175 1176 1177 1178 1179 1180 1181 1182 1183
plus an argument, where possible.
Those are handled as if they were command line options given before
(and thus lower priority than) any other command line option.
(and also lower priority than any environment variable).

To allow command line options to override options file options,
most boolean options also have a corresponding form starting with \fB\-\-no\fP.

(The only exception is when the path to look for config files
Bernhard Link's avatar
Bernhard Link committed
1184 1185
changes, the options file will only opened once and of course
before any options within the options file are parsed.)
1186 1187

The file
Bernhard Link's avatar
Bernhard Link committed
1188 1189 1190 1191
.B distributions
is always needed and describes what distributions
to manage, while
.B updates
Bernhard Link's avatar
Bernhard Link committed
1192 1193 1194
is only needed when syncing with external repositories and
.B pulls
is only needed when syncing with repositories in the same reprepro database.
Bernhard Link's avatar
Bernhard Link committed
1195

Bernhard Link's avatar
Bernhard Link committed
1196 1197
The last three are in the format control files in Debian are in,
i.e. paragraphs separated by empty lines consisting of
1198
fields. Each field consists of a fieldname, followed
Bernhard Link's avatar
Bernhard Link committed
1199 1200
by a colon, possible whitespace and the data. A field
ends with a newline not followed by a space or tab.
Bernhard Link's avatar
Bernhard Link committed
1201 1202 1203 1204

Lines starting with # as first character are ignored,
while in other lines the # character and
everything after it till the newline character are ignored.
1205 1206

A paragraph can also consist of only a single field
1207
.RB \(dq !include: \(dq
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
which causes the named file (relative to confdir unless starting
with
.BR ~/ ", " +b/ ", " +c/ " or " / " )"
to be read as if it was found at this place.

Each of the three files or a file included as described above
can also be a directory, in which case all files it contains
with a filename ending in
.B .conf
and not starting with
.B .
are read.
Bernhard Link's avatar
Bernhard Link committed
1220 1221 1222 1223
.SS conf/distributions
.TP
.B Codename
This required field is the unique identifier of a distribution
Bernhard Link's avatar
Bernhard Link committed
1224
and used as directory name within
Bernhard Link's avatar
Bernhard Link committed
1225 1226
.B dists/
It is also copied into the Release files.
1227 1228 1229 1230 1231

Note that this name is not supposed to change.
You most likely \fBnever ever\fP want a name like \fBtesting\fP
or \fBstable\fP here (those are suite names and supposed to point
to another distribution later).
Bernhard Link's avatar
Bernhard Link committed
1232 1233
.TP
.B Suite
1234
This optional field is simply copied into the
Bernhard Link's avatar
Bernhard Link committed
1235
Release files. In Debian it contains names like
Bernhard Link's avatar
Bernhard Link committed
1236 1237 1238
stable, testing or unstable. To create symlinks
from the Suite to the Codename, use the
\fBcreatesymlinks\fP command of reprepro.
Bernhard Link's avatar
Bernhard Link committed
1239
.TP
Bernhard Link's avatar
Bernhard Link committed
1240 1241
.B FakeComponentPrefix
If this field is present,
Bernhard Link's avatar
Bernhard Link committed
1242
its argument is added - separated by a slash -  before every
1243 1244
Component written to the main Release file
(unless the component already starts with it),
Bernhard Link's avatar
Bernhard Link committed
1245
and removed from the end of the Codename and Suite fields in that file.
1246 1247
Also if a component starts with it, its directory in the dists dir
is shortened by this.
Bernhard Link's avatar
Bernhard Link committed
1248 1249
.br
So \fB
1250

Bernhard Link's avatar
Bernhard Link committed
1251 1252 1253
 Codename: bla/updates
 Suite: foo/updates
 FakeComponentPrefix: updates
1254 1255 1256 1257
 Components: main bad\fP

will create a Release file with \fB

Bernhard Link's avatar
Bernhard Link committed
1258 1259
 Codename: bla
 Suite: foo
1260 1261 1262 1263
 Components: updates/main updates/bad\fP

in it, but otherwise nothing is changed, while\fB

1264 1265 1266
 Codename: bla/updates
 Suite: foo/updates
 FakeComponentPrefix: updates
1267 1268 1269 1270
 Components: updates/main updates/bad\fP

will also create a Release file with \fB

1271 1272
 Codename: bla
 Suite: foo
1273 1274 1275
 Components: updates/main updates/bad\fP

but the packages will actually be in the components
1276 1277 1278
\fBupdates/main\fP and \fBupdates/bad\fP,
most likely causing the same file using duplicate storage space.

Bernhard Link's avatar
Bernhard Link committed
1279 1280 1281
This makes the distribution look more like Debian's security archive,
thus work around problems with apt's workarounds for that.
.TP
Bernhard Link's avatar
Bernhard Link committed
1282 1283 1284 1285
.B AlsoAcceptFor
A list of distribution names.
When a \fB.changes\fP file is told to be included
into this distribution with the \fBinclude\fP command
1286
and the distribution header of that file is neither
Bernhard Link's avatar
Bernhard Link committed
1287 1288
the codename, nor the suite name, nor any name from the
list, a \fBwrongdistribution\fP error is generated.
1289
The \fBprocess_incoming\fP command will also use this field,
Bernhard Link's avatar
Bernhard Link committed
1290
see the description of \fBAllow\fP and \fBDefault\fP
1291
from the \fBconf/incoming\fP file for more information.
Bernhard Link's avatar
Bernhard Link committed
1292
.TP
Bernhard Link's avatar
Bernhard Link committed
1293
.B Version
1294
This optional field is simply copied into the
Bernhard Link's avatar
Bernhard Link committed
1295 1296 1297
Release files.
.TP
.B Origin
1298
This optional field is simply copied into the
Bernhard Link's avatar
Bernhard Link committed
1299 1300 1301
Release files.
.TP
.B Label
1302
This optional field is simply copied into the
Bernhard Link's avatar
Bernhard Link committed
1303 1304
Release files.
.TP
1305 1306
.B NotAutomatic
This optional field is simply copied into the
Bernhard Link's avatar
Bernhard Link committed
1307
Release files.
Bernhard Link's avatar
Bernhard Link committed
1308 1309
(The value is handled as an arbitrary string,
though anything but \fByes\fP does not make much
1310 1311
sense right now.)
.TP
1312 1313 1314
.B ButAutomaticUpgrades
This optional field is simply copied into the
Release files.
Bernhard Link's avatar
Bernhard Link committed
1315 1316
(The value is handled as an arbitrary string,
though anything but \fByes\fP does not make much
1317 1318
sense right now.)
.TP
Bernhard Link's avatar
Bernhard Link committed
1319
.B Description
1320
This optional field is simply copied into the
Bernhard Link's avatar
Bernhard Link committed
1321 1322
Release files.
.TP
1323
.B Architectures
1324
This required field lists the binary architectures within
1325 1326 1327 1328 1329
this distribution and if it contains
.B source
(i.e. if there is an item
.B source
in this line this Distribution has source. All other items
1330
specify things to be put after "binary\-" to form directory names
1331 1332 1333 1334 1335
and be checked against "Architecture:" fields.)

This will also be copied into the Release files. (With exception
of the
.B source
1336
item, which will not occur in the topmost Release file whether
1337
it is present here or not)
1338
.TP
Bernhard Link's avatar
Bernhard Link committed
1339 1340
.B Components
This required field lists the component of a
Bernhard Link's avatar
Bernhard Link committed
1341
distribution. See
Bernhard Link's avatar
Bernhard Link committed
1342 1343 1344 1345
.B GUESSING
for rules which component packages are included into
by default. This will also be copied into the Release files.
.TP
1346
.B UDebComponents
1347
Components with a debian\-installer subhierarchy containing .udebs.
1348 1349
(E.g. simply "main")
.TP
Bernhard Link's avatar
Bernhard Link committed
1350
.B Update
1351 1352 1353
When this field is present, it describes which update rules are used
for this distribution. There also can be a magic rule minus ("\-"),
see below.
Bernhard Link's avatar
Bernhard Link committed
1354
.TP
1355 1356 1357 1358 1359 1360 1361
.B Pull
When this field is present, it describes which pull rules are used
for this distribution.
Pull rules are like Update rules,
but get their stuff from other distributions and not from external sources.
See the description for \fBconf/pulls\fP.
.TP
Bernhard Link's avatar
Bernhard Link committed
1362
.B SignWith