REPREPRO(1)
๐ REPREPRO(1) ๐
Okay bestie, this is reprepro โ the manual page for the tool that produces, manages and syncs a local repository of Debian packages. Itโs giving repository main character energy, and weโre gonna get through it together. ๐
๐ธ NAME ๐ธ
reprepro โ produce, manage and sync a local repository of Debian packages.
โจ SYNOPSIS โจ
reprepro --help
reprepro [ options ] command [ per-command-arguments ]
๐ฆ DESCRIPTION ๐ฆ
Okay so reprepro is a tool to manage a repository of Debian packages (.deb, .udeb, .dsc, ...). It stores files either being injected manually or downloaded from some other repository (partially) mirrored into a pool/ hierarchy. Managed packages and checksums of files are stored in a Berkeley DB database file, so no database server is needed. Checking signatures of mirrored repositories and creating signatures of the generated Package indices is supported.
Former working title of this program was mirrorer. Lore unlocked, I guess. ๐
๐ GLOBAL OPTIONS ๐
Options can be specified before the command. Each affects a different subset of commands and is ignored by other commands. So yes, some of these are lowkey picky about which command they hang out with โ thatโs just the vibe. ๐ซถ
-h,--helpโ Displays a short list of options and commands with description.-v,-V,--verboseโ Be more verbose. Can be applied multiple times. One uppercase-Vcounts as five lowercase-v. Highkey a volume knob for your terminal. ๐-s,--silentโ Be less verbose. Can be applied multiple times. One-vand one-scancel each other out.-f,--forceโ This option is ignored, as it no longer exists. Not me looking for a button thatโs literally gone. ๐-b,--basedirbasedir โ Sets the base-dir all other default directories are relative to. If none is supplied and theREPREPRO_BASE_DIRenvironment variable is not set either, the current directory will be used.--outdiroutdir โ Sets the base-dir of the repository to manage, i.e. where thepool/subdirectory resides. And in which thedists/directory is placed by default. If this starts with+b/, it is relative to basedir.
The default for this is basedir.
--confdirconfdir โ Sets the directory where the configuration is searched in. If this starts with+b/, it is relative to basedir. If none is given,+b/conf(i.e.basedir/conf) will be used.--distdirdistdir โ Sets the directory to generate index files relatively to. (i.e. things likePackages.gz,Sources.gzandRelease.gpg.) If this starts with+b/, it is relative to basedir, if starting with+o/relative to outdir. If none is given,+o/dists(i.e.outdir/dists) is used.
Note: apt has dists hard-coded in it, so this is mostly only useful for testing or when your webserver pretends another directory structure than your physical layout.
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--distdirended in the same directory. So either clean a directory before setting--distdirto it or do an export with the new one first to have a consistent state.
--logdirlogdir โ The directory where files generated by theLog:directive are stored if they have no absolute path. If this starts with+b/, it is relative to basedir, if starting with+o/relative to outdir, with+c/relative to confdir. If none is given,+b/logs(i.e.basedir/logs) is used.--dbdirdbdir โ Sets the directory where reprepro keeps its databases. If this starts with+b/, it is relative to basedir, if starting with+o/relative to outdir, with+c/relative to confdir. If none is given,+b/db(i.e.basedir/db) is used.
Note: This is permanent data, no cache. One has almost to regenerate the whole repository when this is lost.
--listdirlistdir โ Sets the directory where it downloads indices to when importing from other repositories. This is temporary data and can be safely deleted when not in an update run. If this starts with+b/, it is relative to basedir, if starting with+o/relative to outdir, with+c/relative to confdir. If none is given,+b/lists(i.e.basedir/lists) is used.--morguedirmorguedir โ Files deleted from the pool are stored into morguedir. If this starts with+b/, it is relative to basedir, if starting with+o/relative to outdir, with+c/relative to confdir. If none is given, deleted files are just deleted.--methoddirmethoddir โ Look in methoddir instead of/usr/lib/apt/methodsfor methods to call when importing from other repositories.-C,--componentcomponents โ 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, depending on the command in question. Multiple components are specified by separating them with|, as in-C 'main|contrib'.-A,--architecturearchitectures โ Limit the specified command to this architectures only. (i.e. only list such packages, only remove packages from the specified architectures, or otherwise only look at/act on this architectures depending on the specific command.) Multiple architectures are specified by separating them with|, as in-A 'sparc|i386'. Note that architecture all packages can be included to each architecture but are then handled separately. Thus by using-Ain a specific way one can have different versions of an architecture all package in different architectures of the same distribution.-T,--typedsc|deb|udebโ Limit the specified command to this packagetypes only. (i.e. only list such packages, only remove such packages, only include such packages, ...)-S,--sectionsection โ Overrides the section of inclusions. (Also override possible override files.)-P,--prioritypriority โ Overrides the priority of inclusions. (Also override possible override files.)--export=(silent-never|never|changed|lookedat|force)โ This option specify whether and how the high level actions (e.g.install,update,pull,delete) should export the index files of the distributions they work with.--export=lookedatโ In this mode every distribution the action handled will be exported, unless there was an error possibly corrupting it. Note 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 theexportaction. For backwards compatibility,lookedatis also available under the old namenormal. The namenormalis deprecated and will be removed in future versions.--export=changedโ 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.) Note 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 theexportaction.--export=forceโ Always export all distributions looked at, even if there was some error possibly bringing it into a inconsistent state.--export=neverโ No index files are exported. You will have to callexportlater. Note that you most likely additionally need the--keepunreferencedfilesoption, if you do not want some of the files pointed to by the untouched index files to vanish.--export=silent-neverโ Likenever, but suppress most output about that.--ignore=what โ Ignore errors of type what. See the section ERROR IGNORING for possible values.--nolistsdownloadโ When runningupdate,checkupdateorpredeletedo 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 exceptReleaseandRelease.gpgfiles again.--nothingiserrorโ If nothing was done, return with exitcode1instead of the usual0. Note that "nothing was done" means the primary purpose of the action in question. Auxiliary actions (opening and closing the database, exporting missing files with--export=lookedat, ...) usually do not count. 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.--keeptemporariesโ Do not delete temporary.newfiles when exporting a distribution fails. (reprepro first create.newfiles in the dists 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 dists clean).--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.--keepunusednewfilesโ Theinclude,includedsc,includedebandprocessincomingby 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.--keepdirectoriesโ Do not try tormdirparent 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 buggyrmdircall deleting non-empty directories.)--ask-passphraseโ Ask for passphrases when signing things and one is needed. This is a quick and dirty and unsafe implementation using the obsoletegetpass(3)function with the description gpgme is supplying. So the prompt will look quite funny and support for passphrases with more than8characters depend on your libc. Use of this option is not recommended. Usegpg-agentwith pinentry instead.
...and yeah, real talk about --ask-passphrase: with current versions of gnupg you need to set pinentry-mode loopback in your .gnupg/gpg.conf file to use it. Without that option, gnupg uses the much safer and recommended pinentry instead. ๐
Like, gnupg is being the responsible friend here, ok?
--noskipoldโ when updating, don't skip targets where no new index files and no files marked as already processed are available. If you changed a script to preprocess downloaded index files, or changed aListfilter, you most likely want to call reprepro with--noskipold. so basically: you touched the recipe, now re-run the whole thing bestie.--waitforlockcount โ if there's a lockfile saying another reprepro instance is currently using the database, retry count times after waiting for 10 seconds each time. Default is0, which means error out instantly. ๐ค no patience, no waiting, just vibes and an error.--spacecheckfull|noneโ default isfull: in the update commands, check for every to-be-downloaded file which filesystem it's on and how much space is left. To disable this behaviour, usenone.--dbsafetymarginbytes-count โ if checking for free space, reserve bytes-count bytes on the filesystem containing thedb/directory. Default is104857600(i.e. 100MB), which is quite large. But as there's no way to know in advance how large the databases will grow and libdb is extremely touchy in that regard, lower only when you know what you do. ๐ lower only when you know what you do โ she means it.--safetymarginbytes-count โ if checking for free space, reserve bytes-count bytes on filesystems not containing thedb/directory. Default is1048576(i.e. 1MB).--noguessgpgttyโ don't set the environment variableGPG_TTY, even when it's not set, stdin is a terminal and/proc/self/fd/0is a readable symbolic link. โจ--gnupghomeโ set theGNUPGHOMEenvironment 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 atgpg(1)to be sure. This option in the command line is usually not very useful, as it's possible to set the environment variable directly. Its main reason for existence is that it can be used inconf/options. ๐ง it's giving "I exist for the config file girlies".--list-maxcount โ limits the output oflist,listmatchedandlistfilterto the first count results. Default is0, which means unlimited.--list-skipcount โ omits the first count results from the output oflist,listmatchedandlistfilter.--list-formatformat โ set the output format of thelist,listmatchedandlistfiltercommands. The format is similar to dpkg-query's--showformat: fields are specified as${fieldname}or${fieldname;length}. Zero length or no length means unlimited. Positive numbers mean fill with spaces right, negative fill with spaces left.
\n, \r, \t, \0 are new-line, carriage-return, tabulator and zero-byte. Backslash (\) can be used to escape every non-letter-or-digit. ๐
The special field names $identifier, $architecture, $component, $type, $codename denote where the package was found.
The special field names $source and $sourceversion denote the source and source version a package belongs to. (i.e. ${$source} will either be the same as ${source} (without a possible version in parentheses at the end) or the same as ${package}.)
The special field names $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).
When --list-format is not given or NONE, then the default is equivalent to ${$identifier} ${package} ${version}\n.
no cap, this part is a whole warning section: escaping digits or letters not in the 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. ๐ undefined behaviour, bestie โ do not test her.
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. ๐
the shell is NOT your friend here.
--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.) ๐ฅ--onlysmalldeletesโ thepullandupdatecommands 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--noonlysmalldeletesto override it. safety rails on, queen.--restrictsrc[=version|:type]โ restrict apullorupdateto only act on packages belonging to source-package src. Any other package will not be updated (unless it matches a--restrict-bin). Only packages that would otherwise be updated or are at least marked withholdin aFilterListorFilterSrcListwill be updated.
The action can be restricted to a source version using an 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). โญ
--restrict-binaryname[=version|:type]โ like--restrictbut restrict to binary packages (.deband.udeb). Source packages are not upgraded unless they appear in a--restrict.--restrict-filefilename โ like--restrictbut read a whole file in theFilterSrcListformat. ๐--restrict-file-binfilename โ like--restrict-binbut read a whole file in theFilterListformat.--endhookhookscript โ run the specified hookscript once reprepro exits. It will get the usualREPREPRO_*environment variables set (or unset) and additionally a variableREPREPRO_EXIT_CODEthat 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 exit code 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 have 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 confdir, unless its name starts with /, ./, +b/, +o/, or +c/ and the name may not start (except in the cases given before) with a +.
An example script looks like:
#!/bin/sh
if [ "$REPREPRO_EXIT_CODE" -ne 0 ] ; then
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
--outhookhookscript โ hookscript is called with a.outlogfile as argument (located in logdir) containing a description of all changes made to outdir. ๐ซถ
The script is supposed to be located relative to confdir, unless its name starts with /, ./, +b/, +o/, or +c/ and the name may not start (except in the cases given before) with a +.
For a format of the .outlog files generated for this script, see the manual.html shipped with reprepro.
๐ COMMANDS ๐
finally, the actual verbs. the things she can DO.
- ### ๐ฆ
export [ codenames ]
Generate all index files for the specified distributions.
This regenerates all files unconditionally. It is only useful if you want to be sure dists is up to date, you called some other actions with --export=never before, or you want to create an initial empty but fully equipped dists/codename directory. โจ
- ### ๐
[ --delete ] createsymlinks [ codenames ]
Creates suite symbolic links in the dists/-directory pointing to the corresponding codename.
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 --delete is given it will delete already existing symlinks). ๐
- ### ๐
list codename [ packagename ]
List all packages (source and binary, except when -T or -A is given) with the given name in all components (except when -C is given) and architectures (except when -A is given) of the specified distribution. If no package name is given, list everything. The format of the output can be changed with --list-format. To only get parts of the result, use --list-max and --list-skip. ๐
- ### ๐ธ
listmatched codename glob
As list, but does not list a single package, but all packages matching the given shell-like glob. (i.e. *, ? and [chars] are allowed.)
Examples:
reprepro -b . listmatched test2 'linux-*'
...lists all packages starting with linux-. globbing is so iconic of her tbh.
- ### ๐ง
listfilter codename condition
As list, but does not list a single package, but all packages matching the given condition.
The format of the formulas is those of the dependency lines in Debian packages' control files with some extras. 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), a pipe symbol '|' (meaning or) and a comma ',' (meaning and). Additionally parentheses can be used to change binding (otherwise '!' binds more than '|' than ','). ๐
๐ฅ
and that's the commands so far โ keep reading, there's more coming, don't you DARE close the tab ๐ซถ
Okay so real talk about how the comparing actually works: the values you put in your search expression get compared alphabetically to the headers in the respective index file. Translation? Each little Fieldname (cmp value) chunk of your formula is true for exactly those packages that have, in the Package or Sources file, a line starting with fieldname and a value that is alphabetically cmp to value. Simple as that ๐
And since reprepro 3.11.0, plot twist: you can use % as your comparison operator, and it means "match this name with shell-style wildcards" (so *, ? and [..] all work). Iconic.
Now, the special field names that start with $? They mean special things (available since 3.11.1, bestie, don't @ me if you're on something ancient):
$Versionโ the version of the package, and heads up: the comparison here is not alphabetical, it's as Debian version strings ๐$Sourceโ the source name of the package$SourceVersionโ the source version of the package$Architectureโ the architecture the package is in (listfilter) or is to be put into$Componentโ the component the package is in (listfilter) or is to be put into$Packagetypeโ the packagetype of the package
๐ธ Examples ๐ธ
reprepro -b . listfilter test2 'Section (== admin)' โ this will list all packages in distribution test2 with a Section field, where the value of that field is admin. Slay.
reprepro -b . -T deb listfilter test2 'Source (== blub) | ( !Source , Package (== blub) )' โ this finds all .deb Packages with either a Source field of blub, or no Source field and a Package field of blub. (So like, all packages generated by a source package blub, except those that also specify a version number with their Source.) Lowkey a mouthful.
reprepro -b . -T deb listfilter test2 '$Source (==blub)' โ this is the better way to do the above (but only available since 3.11.1, so mind the version ๐).
reprepro -b . listfilter test2 '$PackageType (==deb), $Source (==blub)' โ another way to do it, though it's the less efficient one. Still valid though ๐ซถ
reprepro -b . listfilter test2 'Package (% linux-*-2.6*)' โ lists all packages with names starting with linux- and later on having an -2.6 in there. Wildcards doing the absolute most, we love to see it โจ
๐ COMMANDS (continued) ๐
lspackage-name โ lists the versions of the specified package across all distributions.lsbycomponentpackage-name โ likels, but grouped by component (and yes, it prints the component names too).removecodename package-names[=version] ... โ deletes packages in the specified distribution that have a package name listed as an argument. You must specify package versions by appending=and the version to the name (no spaces, bestie, none). If you don't give a version, the latest package version gets removed.
โ ๏ธ Heads up: like literally any other operation that removes or replaces a package, the old package's files get unreferenced and may therefore be automatically deleted if that was their last reference and you didn't specify --keepunreferencedfiles. So likeโฆ be aware ๐ญ
removematchedcodename glob โ deletes all packages thatlistmatchedwith the same arguments would list. Matchy matchy, deletie deletie.removefiltercodename condition โ deletes all packages thatlistfilterwith the same arguments would list.removesrccodename source-name [version] โ removes all packages in distribution codename belonging to source package source-name. (Limited to those with source version version if you specify it.) If package tracking is activated, it'll use that info to find the packages; otherwise it just traverses all package indices for the distribution. No shortcuts, just vibes ๐งremovesrcscodename source-name[=version] ... โ likeremovesrc, but you can hand it multiple source names, and source versions must be specified by appending=and the version to the name (again: without spaces).update[ codenames ] โ syncs the specified distributions (all of them if none given) as specified in the config with their upstreams. See the description ofconf/updatesbelow. This is the main character of the whole sync operation ๐ฅcheckupdate[ codenames ] โ same asupdate, but shows you what it would change instead of actually changing it. A vibe check, basically.dumpupdate[ codenames ] โ same ascheckupdate, but less suitable for humans and more suitable for computers. Robot mode ๐คpredelete[ codenames ] โ this figures out which packages anupdatewould delete or replace, and removes those packages. Useful for reducing the space needed while upgrading, but there'll be some time where packages are vanished from the lists, so clients will mark them as obsolete. Plus, if you can't download an updated package in the (hopefully) following update run, you'll end up with no package at all instead of an old one. It will also blow up.difffiles if you're using thepdiffexample or something similar.
๐ So be careful with this one, or better yet โ just get some more space so that update works properly. No cap.
cleanlistsโ deletes all files inlistdir(defaultbasedir/lists) that don't belong to any update rule for any distribution. I.e. all files in that directory that noupdatecommand in the current configuration can use get deleted. (The files are usually left there, so if they're needed again they don't need to be downloaded again. Though in many easy cases, not even those files will be needed.)pull[ codenames ] โ pulls in newer packages into the specified distributions (all if none given) from other distributions in the same repository. See the description ofconf/pullsbelow.checkpull[ codenames ] โ same aspull, but shows you what it'd change instead of actually changing it.dumppull[ codenames ] โ same ascheckpull, but less suitable for humans and more suitable for computers.includedebcodename.deb-filename โ includes the given binary Debian package (.deb) in the specified distribution, applying override information and guessing all values that aren't given and are guessable. The โจ include โจ of the binary world.includeudebcodename.udeb-filename โ same asincludedeb, but for.udebfiles.includedsccodename.dsc-filename โ includes the given Debian source package (.dsc, including other files like.orig.tar.gz,.tar.gzand/or.diff.gz) in the specified distribution, applying override information and guessing all values that aren't given and guessable.
๐ธ Note that.dscfiles do not contain section or priority, but theSources.gzfile needs them.repreprotries to parse.diffand.tarfiles for it, but is only able to resolve easy cases. Ifrepreprofails to extract those automatically, you have to either specify aDscOverrideor give them via-Sand-P. Sorry bestie, it can only do so much ๐ญ
includecodename.changes-filename โ includes in the specified distribution all packages found and suitable in the.changesfile, applying override information and guessing all values that aren't given and guessable.processincomingrulesetname [.changes-file] โ scans an incoming directory and processes the.changesfiles found there. If a filename is supplied, processing is limited to that file. rulesetname identifies which rule-set inconf/incomingdetermines which incoming directory to use and in what distributions to allow packages into. See the section about this file for more info ๐check[ codenames ] โ checks if all packages in the specified distributions have all the files they need properly registered. A lil wellness check for your repo ๐ฉบcheckpool[ fast ] โ checks if all files believed to be in the pool are actually still there and have the knownmd5sum. When fast is specified,md5sumis not checked. Speed over thoroughness, we respect the choice.collectnewchecksumsโ calculates all supported checksums for all files in the pool. (Versions prior to3.3only stored md5sums,3.3added sha1,3.5added sha256.) Evolution, honestly ๐translatelegacychecksumsโ removes the legacyfiles.dbfile after making sure all information is also found in the newchecksums.dbfile. (Alternatively, you can callcollectnewchecksumsand remove the file on your own. DIY queen behavior ๐ )rereferenceโ forgets which files are needed and recollects that information. A little memory wipe, a little fresh start โจdumpreferencesโ prints out which files are marked to be needed by whom.dumpunreferencedโ prints a list of all files believed to be in the pool that aren't known to be needed. The lonely files ๐ฅบdeleteunreferencedโ removes all known files (and forgets them) in the pool that aren't marked to be needed by anything.deleteifunreferenced[ filekeys ] โ removes the given files (and forgets them) in the pool if they're not marked to be used by anything. If no command line arguments are given,stdinis read and every line is treated as one filekey. This is mostly useful together with--keepunreferencedinconf/options, or in situations where you don't want to rundeleteunreferenced, which removes all files eligible to be deleted with this command.reoverride[ codenames ] โ reapplies the override files to the given distributions (or only parts thereof given by-A,-Cor-T).
๐ Note: only the control information is changed. Changing a section to a value that would cause another component to be guessed will not cause any warning. Sneaky like that.
redochecksums[ codenames ] โ re-adds 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 isn't changed later โ this command modifies it to re-add missing checksum types. Only checksums already known are used. To update known checksums about files, runcollectnewchecksumsfirst. Order matters, bestie ๐dumptracks[ codenames ] โ prints out all information about tracked source packages in the given distributions.retrack[ codenames ] โ recreates a tracking database for the specified distributions. This is a three-step situation: first, all files marked as part of a source package are set to unused. Then all files actually used are marked as such. Finally,tidytracksis called to remove everything no longer needed with the new info about used files. Beautiful little pipeline, honestly ๐ฆ
(This behaviour, though a bit cumbersome, keeps even files only kept because of tracking mode keep and files not otherwise used but kept due to includechanges or its relatives. Before version 3.0.0, such files were lost when running retrack. We do not miss those days ๐ญ)
removealltracks [ codenames ]
Wipes all the source package tracking information for the distributions you name. Like, all of it, gone, no take-backs ๐
removetrack codename sourcename version
Removes the trackingdata of that one version of that one sourcepackage from that one distribution. It also nukes the references for every file that was used. Bye bestie ๐
tidytracks [ codenames ]
Goes through all the source package tracking info for the distributions you list and checks it for files that are no longer meant to be kept. A little cleanup vibe check โจ
copy destination-codename source-codename package[=version] ...
Copies packages from one distribution to another. The deets:
- They're copied verbatim โ no override files are consulted, periodt.
- Only components and architectures present in the source distribution get copied.
- Want a specific version? Append
=and the version to the name (no spaces, okay?). When no version is specified, the latest package version is the one that gets copied.
copysrc destination-codename source-codename source-package [versions]
Okay so this one looks at each package โ and yeah, "package" means every package as usual, be it dsc, deb or udeb โ in the distribution named by source-codename, and figures out the relevant source package for each one. Everything matching the given source-package name (and any version, if you gave one) gets copied over to the destination-codename distribution.
Same rules as ever: copied verbatim, no override files consulted, only components and architectures present in the source distribution. ๐ซถ
copymatched destination-codename source-codename glob
Copies packages matching the given glob (check listmatched for how globs work, iykyk).
Copied verbatim, no override files consulted, only components and architectures present in the source distribution get copied.
copyfilter destination-codename source-codename formula
Copies packages matching the given formula (see listfilter). All versions if no version is specified. And yeah โ copied verbatim, no override files consulted, only components and architectures present in the source distribution.
move destination-codename source-codename package[=version] ...
Moves packages from one distribution to another. Note the move energy ๐ฅ
- Moved verbatim โ no override files consulted.
- Only components and architectures present in the source distribution get moved.
- Version pinning works like
copy: append=and the version to the name (no spaces). No version given โ the latest package version is what moves.
movesrc destination-codename source-codename source-package [versions]
Same detective work as copysrc: it looks at every package (and yep, dsc, deb, udeb โ the whole crew) in the distribution named by source-codename and identifies the relevant source package for each. All packages matching the given source-package name (plus any version, if specified) get moved to the destination-codename distribution.
Moved verbatim, no override files consulted, only components and architectures present in the source distribution. ๐ฆ
movematched destination-codename source-codename glob
Moves packages matching the given glob (see listmatched).
Moved verbatim, no override files consulted, only components and architectures present in the source distribution get moved.
movefilter destination-codename source-codename formula
Moves packages matching the given formula (see listfilter). All versions if no version is specified. Moved verbatim, no override files consulted, only components and architectures present in the source distribution.
restore codename snapshot packages...
restoresrc codename snapshot source-epackage [versions]
restorefilter destination-codename snapshot formula
restorematched destination-codename snapshot glob
These four are like the copy commands, but plot twist: they don't copy from another distribution โ they copy from a snapshot generated with gensnapshot. ๐
Heads up bestie: this blindly trusts the contents of the files in your dists/ directory and does no checking. Trust falls only, apparently ๐ญ
clearvanished
Removes all package databases that no longer appear in conf/distributions.
- If
--deleteis specified, it will not stop if there are still packages left. - Even without
--delete, it will unreference files still marked as needed by this target. - Use
--keepunreferencedto not delete them if that was the last reference.
And don't forget the manual labor part: remove all exported package indices by hand. No cap, it's on you ๐ซก
gensnapshot codename directoryname
Generates a snapshot of the distribution named by codename, living at dists/codename/snapshots/directoryname/, and references all needed files in the pool as needed by that snapshot. No Content files are generated, and no export hooks are run. Keep it simple, keep it chill โจ
Big warning: there's currently no automated way to remove that snapshot again โ not evenclearvanishedwill unlock the referenced files after the distribution itself vanished ๐ซ You have to remove the directory yourself and tell reprepro tounreferencesnapshot codename directorynamebeforedeleteunreferencedwill delete the files from the pool locked by this.
Wanna hit that snapshot with apt? Add something like this to your sources.list file:
deb method://as/without/snapshot codename/snapshots/name main
unreferencesnapshot codename directoryname
Removes all references generated by a genshapshot with the same arguments. This lets the next deleteunferenced call delete those files. (The indices in dists/ for the snapshot are not removed โ those stay exactly where they are.)
rerunnotifiers [ codenames ]
Runs all the external scripts specified in the Log: options of the distributions you specify. Go little scripts go ๐โโ๏ธ๐จ
build-needing codename architecture [ glob ]
Lists source packages (matching glob, if you gave one) that likely need a build on the given architecture.
So it lists all source packages in the given distribution that hit these conditions:
- no binary package of the given architecture built from that version of the source
- no
.changesor.logfile for the given architecture - an
Architecturefield includingany,os-any(with os being the part before the hyphen in the architecture, orlinuxif there is no hyphen), or the architecture itself - and at least one package in the
Binaryfield not yet available
If you use the term any instead of an architecture, all architectures are iterated, and the architecture gets printed as the fourth field in every line.
If the architecture is all, then only source packages with an Architecture field including all are considered (so, like, same deal as above with real architectures, except any does not suffice). Heads up: dpkg-dev << 1.16.1 does not both set any and all, so source packages building both architecture dependent and independent packages will never show up unless built with a new enough dpkg-source.
translatefilelists
Translates the file list cache within 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 db/contents.cache.db file size available in that partition. Don't skip the space check bestie ๐
translatelegacyreferences
Translates the references within db/references.db into the new format used since reprepro 5.4.0.
Make sure you have at least the same space as the current db/references.db file size available in that partition. Yep, the whole thing. Plan accordingly ๐ธ
flood distribution [architecture]
For each architecture of distribution (or just the one you specified), adds architecture all packages from other architectures โ same component or packagetype only โ under these conditions:
- Packages are only upgraded, never downgraded.
- If there's a package that is not architecture
all, then architectureallpackages of the same source from the same source version are preferred over those that have no such binary sibling. - Otherwise, the package with the highest version wins. ๐
You can restrict which architectures are looked at for architecture all packages using -A, and which components/packagetypes get flooded using -C/-T, as usual.
Two main use cases, iykyk:
- You added a new architecture to a distribution and wanna copy all the architecture
allpackages onto it. - You included some architecture
allpackages only for some architectures using-A(to avoid breaking the other architectures where the binary packages were still missing), and now you wanna copy it to those architectures where they're unlikely to break anything (because anewbinaryis already available).
unusedsources [distributions]
Lists all source packages for which no binary package built from them is found. Lonely little sources ๐ฅบ
sourcemissing [distributions]
Lists all binary packages for which no source package is found. The source package has to be in the same distribution โ but source packages only kept around by package tracking are enough. ๐
reportcruft [distributions]
Lists all source package versions that either have a source package and no longer a binary package, or binary packages left without a source package in the index. (Unless sourcemissing also lists packages where the source package is only in the pool due to enabled tracking but no longer in the index.) Cruft report, but make it fashion ๐
sizes [ codenames ]
Lists the size of all packages in the distributions you specify โ or in all distributions if you don't specify any.
Each row has 4 numbers, each one being a number of bytes in a set of packages, and those sets 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, it also lists a sum of those โ and in that sum, Only means only in the selected ones, not only in just one of the selected ones. Math but make it cute ๐งฎโจ
repairdescriptions [ codenames ]โ looks for binary packages that only have a short description and tries to grab the long description from the.debfile (and also removes a possibleDescription-md5in this case). ๐
๐ ๏ธ internal commands ๐ ๏ธ
These are, like, hopefully never needed, but they allow manual intervention.
โ ๏ธ WARNING: Is is quite easy to get into an inconsistent and/or unfixable state.
_detect [ filekeys ]โ looks for the files whose filekey is given as an argument or as a line of input (when run without arguments), calculates their md5sum, and adds them to the list of known files. (Warning: this is a low level operation, no input validation or normalization is done.)_forget [ filekeys ]โ like_detectbut removes the given filekey from the list of known files. (Warning: this is a low level operation, no input validation or normalization is done.)_listmd5sumsโ prints a list of all known files and their md5sums._listchecksumsโ prints a list of all known files and their recorded checksums._addmd5sumsโ alias for the newer one._addchecksumsโ adds information of known files (without any check done) in the strict format of_listchecksumsoutput (i.e. don't dare to use a single space anywhere more than needed)._dumpcontents identifierโ prints out all the stored information of the specified part of the repository. (Or, in other words, the content the correspondingPackagesorSourcesfile would get.)
This command is deprecated and will be removed in a future version.
_addreference filekey identifierโ manually marksfilekeyas needed byidentifier._addreferences identifier [ filekeys ]โ manually marks one or more filekeys as needed byidentifier. If no command line arguments are given, stdin is read and every line is treated as one filekey._removereference identifier filekeyโ manually removes the given mark that the file is needed by thisidentifier._removereferences identifierโ removes all references for what is needed byidentifier.__extractcontrol .deb-filenameโ looks at what reprepro believes to be the content of the control file of the specified.debfile.__extractfilelist .deb-filenameโ looks at what reprepro believes to be the list of files of the specified.debfile._fakeemptyfilelist filekeyโ inserts an empty filelist forfilekey. This is an evil hack around broken.debfiles that cannot be read by reprepro._addpackage codenam filename packages...โ adds packages from the specified filename to the part specified by-C,-Aand-Tof the specified distribution. Very strange things can happen if you use it improperly.__dumpuncompressorsโ lists what compression formats can be uncompressed and how.__uncompress format compressed-file uncompressed-fileโ uses builtin or external uncompression to uncompress the specified file of the specified format into the specified target._listcodenamesโ prints the codenames of all configured distributions, one per line._listconfidentifiers identifier [ distributions... ]โ prints, 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._listdbidentifiers identifier [ distributions... ]โ prints, one per line, all identifiers of subdatabases in the current database. This will be a subset of the ones printed by_listconfidentifiersor most commands, butclearvanishedwill refuse to run, and depending on the database compatibility version, will include all those if reprepro was run since the config was last changed.
๐ฆ CONFIG FILES ๐ฆ
reprepro uses three config files, which are searched in the directory specified with --confdir or in the conf/ subdirectory of the basedir.
If a file options exists, it is parsed line by line. Each line can be the long name of a command line option (without the --) 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 --no.
(The only exception is when the path to look for config files changes: the options file will only be opened once, and of course before any options within the options file are parsed.)
The file distributions is always needed and describes what distributions to manage, while updates is only needed when syncing with external repositories, and pulls is only needed when syncing with repositories in the same reprepro database.
The last three are in the format control files in Debian are in, i.e. paragraphs separated by empty lines consisting of fields. Each field consists of a fieldname, followed by a colon, possible whitespace and the data. A field ends with a newline not followed by a space or tab.
Lines starting with # as first character are ignored, while in other lines the # character and everything after it till the newline character are ignored.
A paragraph can also consist of only a single field !include: which causes the named file (relative to confdir unless starting with ~/, +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 .conf and not starting with . are read.
๐ conf/distributions ๐
Codenameโ this required field is the unique identifier of a distribution and is used as a directory name withindists/. It is also copied into the Release files.
Note that this name is not supposed to change. You most likely never ever want a name like testing or stable here (those are suite names and supposed to point to another distribution later).
Suiteโ this optional field is simply copied into the Release files. In Debian it contains names likestable,testingorunstable. To create symlinks from the Suite to the Codename, use thecreatesymlinkscommand of reprepro.FakeComponentPrefixโ if this field is present, its argument is added โ separated by a slash โ before every Component written to the main Release file (unless the component already starts with it), and removed from the end of theCodenameandSuitefields in that file. Also, if a component starts with it, its directory in thedistsdir is shortened by this.
So
Codename: bla/updates
Suite: foo/updates
FakeComponentPrefix: updates
Components: main bad
will create a Release file with
Codename: bla
Suite: foo
Components: updates/main updates/bad
in it, but otherwise nothing is changed, while
Codename: bla/updates
Suite: foo/updates
FakeComponentPrefix: updates
Components: updates/main updates/bad
will also create a Release file with
Codename: bla
Suite: foo
Components: updates/main updates/bad
but the packages will actually be in the components updates/main and updates/bad, most likely causing the same file using duplicate storage space.
This makes the distribution look more like Debian's security archive, thus work around problems with apt's workarounds for that.
AlsoAcceptForโ a list of distribution names. When a.changesfile is told to be included into this distribution with theincludecommand and the distribution header of that file is neither the codename, nor the suite name, nor any name from the list, awrongdistributionerror is generated. Theprocessincomingcommand will also use this field, see the description ofAllowandDefaultfrom theconf/incomingfile for more information.Versionโ this optional field is simply copied into the Release files.Originโ this optional field is simply copied into the Release files.Labelโ this optional field is simply copied into the Release files.NotAutomaticโ this optional field is simply copied into the Release files. (The value is handled as an arbitrary string, though anything butyesdoes not make much sense right now.)ButAutomaticUpgradesโ this optional field is simply copied into the Release files. (The value is handled as an arbitrary string, though anything butyesdoes not make much sense right now.)Descriptionโ this optional field is simply copied into the Release files.Changelogsโ this optional field is simply copied into the Release files. It is used to signal apt's changelog command where to find package changelogs. Example:
Changelogs:
https://apt.postgresql.org/pub/repos/apt/pool/@CHANGEPATH@.changelog
See apt.conf(5) for how @CHANGEPATH@ is expanded by apt.
Architecturesโ this required field lists the binary architectures within this distribution, and if it containssource(i.e. if there is an itemsourcein this line this Distribution has source. All other items specify things to be put after"binary-"to form directory names and be checked against"Architecture:"fields.)
This will also be copied into the Release files. (With exception of the source item, which will not occur in the topmost Release file whether it is present here or not.)
Componentsโ this required field lists the component of a distribution. See GUESSING for rules which component packages are included into by default. This will also be copied into the Release files.DDebComponentsโ list of components containing.ddebs.UDebComponentsโ components with a debian-installer subhierarchy containing.udebs. (E.g. simply"main".)Updateโ 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.
๐ Pull ๐
okay so when this field shows up, it's telling you which pull rules this distribution uses. Pull rules are like Update rules, except they get their stuff from other distributions and not from external sources. for the deets, go look at conf/pulls. iykyk ๐ซถ
๐ SignWith ๐
when this field is present, a Release.gpg file will be generated. here's the tea on the values:
- if the value is
"yes"or"default", the default key of gpg is used. - if the field starts with an exclamation mark (
"!"), the given script is executed to do the signing. - otherwise, the value gets handed to libgpgme to figure out which key to use.
ngl, if you're having signing problems, try this to see how gpg might interpret the value:
gpg --list-secret-keys value
if that command lists no keys โ or like, multiple ones ๐ญ โ try to find some other value (like the keyid) that gpg can more easily associate with a unique key. slay.
if this key has a passphrase, you need to use gpg-agent or the insecure option --ask-passphrase. bestie, i said insecure, so be careful ๐
a '!' hook script is looked for in the confdir, unless it starts with ~/, ./, +b/, +o/, +c/ or /. it gets three command line arguments:
- the filename to sign
- an empty argument or the filename to create with an inline signature (i.e.
InRelease) - an empty argument or the filename to create a detached signature (i.e.
Release.gpg)
the script may generate no Release.gpg file if it chooses to (in that case the repository will look like unsigned for older clients), but generating empty files is not allowed. reprepro waits for the script to finish and will abort the exporting of the distribution this signing is part of unless the script returns normally with exit code 0. and put a space after ! โ it's recommended to avoid incompatibilities with possible future extensions โจ
๐ฆ DebOverride ๐ฆ
when this field is present, it describes the override file used when including .deb files.
๐ง UDebOverride ๐ง
when this field is present, it describes the override file used when including .udeb files.
๐ DscOverride ๐
when this field is present, it describes the override file used when including .dsc files.
๐๏ธ DebIndices, UDebIndices, DscIndices ๐๏ธ
these pick what kind of Index files to export. the first part describes what the Index file shall be called. the second argument determines the name of a Release file to generate โ or not to generate if it's missing. then comes at least one of ".", ".gz", ".xz" or ".bz2", specifying whether to generate uncompressed output, gzipped output, bzip2ed output, or any combination of those. (heads up: bzip2 is only available when compiled with bzip2 support, so it might not be available if you compiled it on your own โ same deal for xz and liblzma ๐ซ ) and if an argument not starting with a dot follows, it will be executed after all index files are generated (check the examples for what argument this gets).
the default is:
DebIndices: Packages Release . .gz
UDebIndices: Packages . .gz
DscIndices: Sources Release .gz
โ๏ธ ExportOptions โ๏ธ
options to modify how โ and whether โ exporting is done:
noexportโ never export this distribution. meaning there'll be no directory belowdists/generated, and the distribution is only useful for copying packages to other distributions.keepunknownโ ignore unknown files and directories in the exported directory. this is currently the only available option and the default, but that might change in the future, so you can already request it explicitly. love that for us ๐
๐ Contents ๐
turns on creation of Contents files listing all the files inside the binary packages of a distribution. it's quite slow โ you have been warned ๐ญ
in earlier versions, the first argument was a rate at which to extract file lists. as this did not work and was no longer easily possible after some factorisation, it's no longer supported. rip.
the arguments of this field are a space separated list of options:
- if there's a
udebskeyword,.udebsare also listed (in a file calleduContents-architecture). - if there's a
nodebskeyword,.debsare not listed. (only useful together withudebs) - if there's at least one of the keywords
.,.gz,.xzand/or.bz2, the Contents files are written uncompressed, gzipped and/or bzip2ed instead of only gzipped. - if there's a
percomponent, then oneContents-archfile per component is created. - if there's an
allcomponents, then one globalContents-archfile is generated. - if both are given, both are created. if neither is specified,
percomponentis taken as default (earlier versions had other defaults ๐). - the switches
compatsymlinkornocompatsymlink(only possible ifallcomponentswas not specified explicitly) control whether a compatibility symlink is created so old versions of apt-file looking for the component independent filenames at least see the contents of the first component.
unless allcomponents is given, compatsymlinks currently is the default, but that will change in some future (current estimate: after wheezy was released). so like, get ready for that ๐ฆ
๐๏ธ ContentsArchitectures ๐๏ธ
limits generation of Contents files to the architectures given. if this field isn't there, all architectures are processed. an empty field means no architectures are processed โ thus not very useful ๐
๐ ContentsComponents ๐
limits what components are processed for the Contents-arch files to the components given. if this field isn't there, all components are processed. an empty field is equivalent to specifying nodebs in the Contents field, while a non-empty field overrides a nodebs there. icon behavior โจ
๐ง ContentsUComponents ๐ง
limits what components are processed for the uContents files to the components given. if this field isn't there and there is the udebs keyword in the Contents field, all .udebs of all components are put in the uContents.arch files. if this field isn't there and there's no udebs keyword in the Contents field, no uContents-arch files are generated at all. a non-empty field implies generation of uContents-arch files (just like the udebs keyword in the Contents field), while an empty one causes no uContents-arch files to be generated. periodt.
๐ซถ Uploaders ๐ซถ
specifies a file (relative to confdir if not starting with ~/, +b/, +c/ or /) to specify who is allowed to upload packages. without this there are no limits, and this file can be ignored via --ignore=uploaders. see the section UPLOADERS FILES below ๐
๐ Tracking ๐
enables the (experimental) tracking of source packages. the argument list needs to contain exactly one of the following:
keepโ keeps all files of a given source package, until that is deleted explicitly viaremovetrack. this is currently the only possibility to keep older packages around when all indices contain newer files.allโ keep all files belonging to a given source package until the last file of it is no longer used within that distribution.minimalโ remove files no longer included in the tracked distribution. (remove changes, logs and includebyhand files once no file is in any part of the distribution.)
and any number of the following (or none):
includechangesโ add the.changesfile to the tracked files of a source package. thus it is also put into the pool.includebyhandโ add byhand andraw-*files to the tracked files and thus in the pool.includebuildinfosโ add buildinfo files to the tracked files and thus in the pool.includelogsโ add log files to the tracked files and thus in the pool. (note that putting log files in changes files is a reprepro extension not found in normal changes files ๐)embargoallsโ not yet implemented.keepsourcesโ even when using minimal mode, do not remove source files until no file is needed any more.needsourcesโ not yet implemented.
๐ข Limit ๐ข
set this to an integer greater than one to keep multiple versions of a package per distribution, architecture, component, and type. all old package versions that exceed this limit will be removed or archived (see the Archive option) when a new package version is added. if the number is zero or negative, all package versions will be kept. by default only one package version will be kept. main character energy fr fr ๐
๐๏ธ Archive ๐๏ธ
specify a codename which must be declared before (to avoid loops). when packages exceed the version count limit (specified in Limit), these packages will be moved to the specified distribution instead of being removed. no losses, only relocation ๐ฆ
๐ Log ๐
specify a file to log additions and removals of this distribution into and/or external scripts to call when something is added or removed. the rest of the Log: line is the filename, and every following line (as usual, they have to begin with a single space) is the name of a script to call.
the name of the script may be preceded with options of the form --type=(dsc|deb|udeb), --architecture=name or --component=name to only call the script for some parts of the distribution. a script with argument --changes is called when a .changes file was accepted by include or processincoming (and with other arguments). both type of scripts can have a --via=command specified, in which case it is only called when caused by reprepro command command.
for information on how it's called and some examples, take a look at manual.html in reprepro's source or /usr/share/doc/reprepro/.
if the filename for the log files does not start with a slash, it's relative to the directory specified with --logdir; the scripts are relative to --confdir unless starting with ~/, +b/, +c/ or /. got it? slay ๐
โณ ValidFor โณ
if this field exists, a Valid-Until field is put into generated Release files for this distribution with a date as much in the future as the argument specifies.
the argument has to be a number followed by one of the units d, m or y, where d means days, m means 31 days and y means 365 days. so ValidFor: 1m 11 d causes the generation of a Valid-Until: header in Release files that points 42 days into the future. math! we love her ๐งฎโจ
ReadOnlyโ no touching, bestie ๐ . This disallows all modifications of this distribution or its directory indists/codename(with the exception of snapshot subdirectories).ByHandHooksโ this one specifies hooks to call for handlingbyhand/rawfiles byprocessincoming(and in future versions perhaps byinclude). Each line consists of 4 arguments: a glob pattern for the section (classicallybyhand, though Ubuntu usesraw-*), a glob pattern for the priority (not usually used), and a glob pattern for the filename. The 4th argument is the script to be called when all of the above match. That script gets 5 arguments: the codename of the distribution, the section (usuallybyhand), the priority (usually only-), the filename in the changes file, and the full filename (withprocessincomingin the secure TempDir).Signed-Byโ optional field, simply copied into theReleasefiles. It's used to tell apt which keys to trust for this Release in the future. (SeeSignWithfor how to tell reprepro whether and how to sign.) ๐
๐๏ธ conf/updates ๐๏ธ
Nameโ the name of this update-upstream, as it can be used in theUpdatefield inconf/distributions.Methodโ a URI as one could also give it apt, e.g.http://ftp.debian.de/debian, which is simply given to the correspondingapt-getmethod. (So eitherapt-gethas to be installed, or you have to point with--methoddirto a place where such methods are found.)Fallbackโ (still experimental ๐) a fallback URI, where all files are tried that failed the first one. They're given to the same method as the previous URI (e.g. bothhttp://), and the fallback-server must have everything at the same place. No recalculation is done, but single files are just retried from this location.Configโ can contain any number of lines, each in the formatapt-get --optionwould expect. (Multiple lines โ as always โ marked with leading spaces.) For example:
Config: Acquire::Http::Proxy=http://proxy.yours.org:8080
Fromโ the name of another update rule this rule derives from. The rule containing theFrommay not containMethod,FallbackorConfig. All other fields are used from the rule referenced inFrom, unless found in this one containing theFrom. The rule referenced inFrommay itself contain aFrom. Reprepro will only assume two remote index files are the same, if both get theirMethodinformation from the same rule.Suiteโ the suite to update from. If this is not present, the codename of the distribution using this one is used. Also*/whateveris replaced by<codename>/whatever.Componentsโ the components to update. Each item can be either the name of a component or a pair of an upstream component and a local component separated with>(e.g.main>all contrib>all non-free>notall). If this field is not there, all components from the distribution to update are tried. An empty field means no source or.debpackages are updated by this rule, but only.udebpackages, if there are any. A rule might list components not available in all distributions using this rule. In this case unknown components are silently ignored. (Unless you start reprepro with the--fastoption, it will warn about components unusable in all distributions using that rule. As exceptions, unusable components callednoneare never warned about, for compatibility with versions prior to3.0.0where an empty field had a different meaning.)Architecturesโ the architectures to update. If omitted, all from the distribution to update from. (As with components, you can use>to download from one architecture and add into another one. This only determines in whichPackagelist they land; it neither overwrites theArchitectureline in its description, nor the one in the filename determined from this one. In other words, it is no really useful without additional filtering.)UDebComponentsโ likeComponentsbut for the udebs.VerifyReleaseโ download theRelease.gpgfile and check if it is a signature of theReleasefile with the key given here. (In the formatgpg --with-colons --list-keyprints it, i.e. the last 16 hex digits of the fingerprint.) Multiple keys can be specified by separating them with a|sign. Then finding a signature from one of them will suffice. To allow revoked or expired keys, add a!behind a key. (But to accept such signatures, the appropriate--ignoreis also needed.) To also allow subkeys of a specified key, add a+behind a key.IgnoreRelease: yesโ if this is present, noInReleaseorReleasefile will be downloaded and thus themd5sumsof the other index files will not be checked. ๐GetInRelease: noโ if this is present, noInReleasefile is downloaded but onlyRelease(andRelease.gpg) are tried.Flatโ if this field is in an update rule, it is supposed to be a flat repository, i.e. a repository without adistsdir and no subdirectories for the index files. (If the correspondingsources.listline has the suite end with a slash, then you might need this one.) The argument for theFlat:field is theComponentto put those packages into. NoComponentsorUDebComponentsfields are allowed in a flat update rule. If theArchitecturefield has any>items, the part left of the>is ignored. For example, thesources.listline
deb http://cran.r-project.org/bin/linux/debian etch-cran/
would translate to
Name: R
Method: http://cran.r-project.org/bin/linux/debian
Suite: etch-cran
Flat: whatevercomponentyoudlikethepackagesin
IgnoreHashesโ tells reprepro to not check the listed hashes in the downloadedReleasefile (and only in theReleasefile). Possible values are currentlymd5,sha1andsha256. Note that this does not speed anything up in any measurable way. The only reason to specify this is if theReleasefile of the distribution you want to mirror from uses a faulty algorithm implementation. Otherwise you will gain nothing and only lose security. ๐จFilterFormulaโ can be a formula to specify which packages to accept from this source. The format misuses the parser intended forDependencylines. To get only architecture all packages usearchitecture (== all), to get only at least important packages usepriority (==required) | priority (==important). See the description of thelistfiltercommand for the semantics of formulas.FilterList,FilterSrcListโ these two options each take at least two arguments: the first argument is the fallback (default) action. All following arguments are treated as file names of lists. The filenames are considered to be relative to--confdir, if not starting with~/,+b/,+c/or/. Each list file consists of lines with a package name followed by whitespace followed by an action. Each list may only contain a single line for a given package name. The action to be taken is the action specified by the first file mentioning that package. If no list file mentions a package, the fallback action is used instead. This format is inspired bydpkg --get-selectionsbefore multiarch, and the names of the actions likely only make sense if you imagine the file to be the output of this command of an existing system. For each package available in the distribution to be updated from/pulled from, this action is determined and affects the current decision what to do to the target distribution. (Only after all update/pull rules for a given target distribution have been processed is something actually done.) The possible action keywords are:installโ mark the available package to be added to the target distribution unless the same version or a higher version is already marked as to be added/kept. (Note that without a prior delete rule (-) or supersede action, this will never downgrade a package, as the already existing version is marked to be kept.)upgradeonlyโ likeinstallbut will not add new packages to a distribution.supersedeโ unless the current package version is higher than the available package version, mark the package to be deleted in the target distribution. (Useful to remove packages in add-on distributions once they reached the base distribution.)deinstallorpurgeโ ignore the newly available package.warningโ print a warning message tostderrif a new package/newer version is available. Otherwise ignore the new package (like withdeinstallorpurge).holdโ the new package is ignored, but every previous decision to downgrade or delete the package in the target distribution is reset.errorโ abort the whole upgrade/pull if a new package/newer version is available.= versionโ if the candidate package has the given version, behave likeinstall. Otherwise continue as if this list file did not mention this package (i.e. look in the remaining list files or use the fallback action). Only one such entry per package is currently supported and the version is currently compared as string.
If there is both FilterList and FilterSrcList then the first is used for .deb and .udeb and the second for .dsc packages.
If there is only FilterList that is applied to everything.
If there is only FilterSrcList that is applied to everything, too, but the source package name (and source version) is used to do the lookup.
OmitExtraSourceOnlyโ controls whether source packages that haveExtra-Source-Onlyset get ignored when reprepro is grabbing source packages. If this field isn't there, or if it's set to true, those source packages get ignored, periodt. But if you set it tonoorfalse, they're also candidates โ as long as no other filter shuts them out first. (Heads up: the default is true, but that's probably gonna change once reprepro supports multiple versions of a package or finds some other way to keep source packages around.)ListHookโ if you give this one, it gets executed for every downloaded index file. It receives the downloaded list as its first argument, plus a filename that'll be used instead of it. Like,ListHook: /bin/cptechnically works but does absolutely nothing โ iconic but useless, we love that for her. ๐
If a file gets read multiple times, it gets processed multiple times too, with these env vars set: REPREPRO_FILTER_CODENAME, REPREPRO_FILTER_PACKAGETYPE, REPREPRO_FILTER_COMPONENT and REPREPRO_FILTER_ARCHITECTURE, all pointing at where this file will be added โ and REPREPRO_FILTER_PATTERN set to the name of the update rule causing it. ๐
ListShellHookโ same energy asListHook, except the whole argument gets handed to the shell as an argument, and the input and output file are stdin and stdout.
i.e.:
ListShellHook: cat
works but does nothing except be a useless use of a shell and cat, whereas:
ListShellHook: grep-dctrl -X -S apt -o -X -S dpkg || [ $? -eq 1 ]
will limit the update rule to packages from the specified source packages. now THAT'S a slay โจ
DownloadListsAsโ the arguments here tell reprepro which index files to download.
Allowed values are ., .gz, .bz2, .lzma, .xz, .diff, force.gz, force.bz2, force.lzma, force.xz, and force.diff.
Reprepro tries the first supported variant in the list you give it: only compressions that were compiled in, or for which an uncompressor was found, actually get used. And unless the value starts with force., it's only tried if it's found in the Release or InRelease file. ๐
The default value is .diff .xz .lzma .bz2 .gz . โ i.e. download Packages.diff if it's listed in the Release file, otherwise (or if it's not usable) download .xz if it's listed in the Release file and there's a way to uncompress it, then .lzma if usable, then .bz2 if usable, then .gz, and finally uncompressed. ๐ซถ
Warning bestie: there is literally no way to see if an uncompressed variant of the file is available (because the Release file always lists their checksums, even if the file isn't there ๐ญ). So putting . anywhere except as the last argument can mean trying to download a file that does not exist. Don't do that to yourself.
Together with IgnoreRelease, reprepro will download the first one in this list that could be unpacked (i.e. force is always assumed) and the default value is .gz .bzip2 . .lzma .xz. โญ
๐ฆ conf/pulls ๐ฆ
This file is where the rules live for pulling packages from one distribution to another. Yes, you could also do this with update rules using the file or copy method and using the exported indices of that other distribution โ but this way is faster. ๐ It also ensures the current files are used and no copies are made. (Which also leads to the limitation that pulling from one component to another is not possible โ sorry babe, that's just how it is.)
Each rule consists out of the following fields:
Nameโ the name of this pull rule, as it can be used in thePullfield inconf/distributions. ๐Fromโ the codename of the distribution to pull packages from.Componentsโ the components of the distribution to get from.
If this field is not there, all components from the distribution to update are tried.
A rule might list components that aren't available in all distributions using this rule. In that case, unknown components are silently ignored. (Unless you start reprepro with the --fast option, in which case it'll warn about components unusable in all distributions using that rule. As an exception, unusable components called none are never warned about, for compatibility with versions prior to 3.0.0 where an empty field had a different meaning.) ๐
Architecturesโ the architectures to update. If omitted, all from the distribution to pull from. As inconf/updates, you can use>to download from one architecture and add into another one. (And again, that's only useful with filtering to avoid packages not architecture all migrating.) ๐UDebComponentsโ likeComponentsbut for the udebs. ๐FilterFormulaFilterListFilterSrcListโ the same as with update rules. โจ
๐ OVERRIDE FILES ๐
Okay so override files, bestie โ they let you rewrite the fields of a package without touching the package itself. Iconic. The format is supposed to resemble the extended ftp-archive format, and specifically it's this:
packagename field name new value
Like, for example:
kernel-image-2.4.31-yourorga Section protected/base
kernel-image-2.4.31-yourorga Priority standard
kernel-image-2.4.31-yourorga Maintainer That's me <me@localhost>
reprepro Priority required
The way it works is: all fields of a given package get replaced by the new value you specified in the override file โ with one little exception, the special fields starting with a dollar sign ($), those are different vibes entirely (more on them below ๐
).
So the field name is compared case-insensitive, but it gets copied into the output in exactly the form it appears in the override file. So yeah โ keep to the exact case it's normally found in index files, because some other tool out there might get confused otherwise. Not me being dramatic, that's just how it is. ๐ซถ
Also, the Section header does more than just get copied (unless -S is supplied, that is) โ it's also used to guess the component (unless -C is there). Sneaky little multitasker.
Some values are straight-up forbidden, bestie โ like Package, Filename, Size or MD5sum. Using those would severely confuse reprepro, and we do NOT want to confuse the icon. ๐
--- โจ ---
As an extension, reprepro also supports patterns instead of packagenames. So if a package name contains *, [ or ?, it's considered a pattern and gets applied to each package that is not matched by any non-pattern override, nor by any previous pattern. (Order matters, iykyk.)
Fieldnames starting with a dollar ($) are not placed in the exported control data โ they have special meaning instead. Unknown ones are loudly ignored. ๐ The special fields are:
$Componentโincludedeb,includedsc,includeandprocessincomingwill put the package in the component given as value (unless it's itself overridden with-C). Note that the proper way to specify the component is by setting the section field, and using this extension will most likely confuse people and/or tools.$Deleteโ the value is treated as a fieldname, and fields of that name are removed. (This way you can remove fields previously added without removing and re-adding the package. And fields already included in the package can be removed, too.) Slay.
conf/incoming
Every chunk here is a rule set for the processincoming command. The possible fields are:
Nameโ the name of the rule-set, used as the argument to thescancommand to specify which rule to use.IncomingDirโ the name of the directory to scan for.changesfiles.TempDirโ a directory where the files listed in the processed.changesfiles are copied into before they're read. Fun optimization: you can avoid some copy operations by placing this directory within the same mount point the pool hierarchy is (at least partially) in. ๐LogDirโ a directory where.changesfiles,.logfiles,.buildinfofiles and otherwise unused.byhandfiles are stored upon procession.Allowโ each argument is either a pairname1>name2or simplyname, which is short forname>name. Eachname2must identify a distribution โ either by beingCodename, a uniqueSuite, or a uniqueAlsoAcceptForfromconf/distributions. Each upload has each item in itsDistribution:header compared, first to last, with eachname1in the rules, and it's put in the first one accepting this package. e.g.:
Allow: local unstable>sid
or
Allow: stable>security-updates stable>proposed-updates
(Note that this only makes sense if Multiple is set to true, or if there are people only allowed to upload to proposed-updates but not to security-updates.)
Default distributionโ every upload not put into any other distribution because of anAllowargument is put into distribution, if that accepts it.Multipleโ old form ofOptions: multiple_distributions.Optionsโ a list of options:multiple_distributionsโ allow including an upload in multiple distributions. If a.changesfile lists multiple distributions, then reprepro will start with the first name given, check allAcceptandDefaultoptions till it finds a distribution this upload can go into. If this found no distribution, or if this option was given, reprepro will then do the same with the second distribution name given in the.changesfile, and so on.limit_arch_allโ if an upload contains binaries from some architecture and architecture-all packages, the architecture-all packages are only put into the architectures within this upload. Useful to combine with thefloodcommand.
Permitโ a list of options to allow things otherwise causing errors:unused_filesโ don't stop with an error if there are files listed in the.changesfile that don't belong to any package in it.older_versionโ ignore a package not added because there already is a strictly newer version available, instead of treating this as an error.unlisted_binariesโ don't abort with an error if a.changesfile contains.debfiles that aren't listed in theBinariesheader.
Cleanup optionsโ a list of options to cause more files in the incoming directory to be deleted:unused_filesโ if there'sunused_filesinPermit, then also delete those files when the package is deleted after successful processing.unused_buildinfo_filesโ if.buildinfofiles of processed.changesfiles aren't used (neither stored byLogDirnor withTracking: includebuildinfos), then delete them from the incoming dir. (This option has no additional effect ifunused_filesis already used.)on_denyโ if a.changesfile is denied processing because of missing signatures or allowed distributions to be put in, delete it and all the files it references.on_errorโ if a.changesfile causes errors while processing, delete it and the files it references.
Okay bestie, real talk โ ๏ธ โ allowing cleanup in publicly accessible incoming queues allows a denial of service by sending in.changesfiles that delete other people's files before they're completed. Especially when.changesfiles are handled directly (e.g. byinoticoming). Be careful out there. ๐ญ
MorgueDirโ if files are to be deleted byCleanup, they're instead moved to a subdirectory of the directory given as the value to this field. This directory has to be on the same partition as the incoming directory, and files are moved (i.e. owner and permission stay the same) and never copied. ๐ฆ
๐ UPLOADERS FILES ๐
Okay bestie, so this whole file is set by the Uploaders header in the distribution definition (the one we talked about earlier, remember? ๐ซถ). What it does is describe what key a .changes file has to be signed with to be let into that distribution. Like a bouncer at the club, but for signatures. โจ
Empty lines? Ignored. Lines starting with a hash? Also ignored. Every other line has to be one of the following nine forms, or an include directive. Nine, bestie, count 'em:
allow condition by anybodyโ this one lets literally everyone upload packages matching condition. No key needed, no vibes checked, come on in ๐allow condition by unsignedโ lets through everything matching that has no pgp/gpg header. Yeah. Unsigned. Iconic of you to allow that.allow condition by any keyโ lets through everything matching with any valid signature in orallow condition by key key-idโ lets through everything matching that's signed by this key-id (and it's got to be written with no spaces at all, fr fr). If the key-id ends with a+(plus), then a signature with a subkey of this primary key also suffices. Slay, subkeys get in too ๐allow condition by group groupnameโ lets in every member of the group called groupname
The key-id has to be a suffix of the id that libgpgme uses to identify this key โ i.e. a bunch of hex digits from the end of the fingerprint of the key, but not more than what libgpgme uses. (The max number should be what gpg --list-key --with-colons prints, and as of the time of this writing that's at most 16 hex-digits. History, bestie ๐)
Groups can be manipulated with these โ yes, these are also part of the nine, they've got their own little family:
group groupname add key-idโ adds a key-id (see above for the details, go look ๐) to this groupgroup groupname contains groupnameโ adds a whole entire group to a group. Group-ception, we love it ๐
And to avoid warnings in incomplete config files there's also:
group groupname emptyโ declares a group has no members (this avoids the warnings that it is used without those)group groupname unusedโ declares that a group is not yet used (this avoids the warnings that it is not used)
A line starting with include makes the rest of the line get interpreted as a filename โ that file gets opened and processed before the rest of the file is processed. Sneaky little prequel moment ๐
๐ The conditions that are currently supported ๐
These are the actual vibes you can match on, bestie:
*โ which means any package. The wildcard of wildcards. Main character energy ๐source 'name'โ means any package with that source name. ('*','?'and'[..]'are treated as in shell wildcards, so go wild)sections 'name'('|'name')*โ matches an upload in which each section matches one of the names given. Heads up tho: because upload conditions are checked very early, this is the section listed in the.changesfile, not the one from the override file. (But this might change in the future โ if you have the need for one behavior or the other, let me know ๐ญ)sections contain 'name'('|'name')*โ the same thing, except not all sections must be from the given set; at least one source or binary package needs to have one of those given. Loosened the grip, we stan ๐ธbinaries 'name'('|'name')*โ matches an upload in which each binary (type deb or udeb) matches one of the names givenbinaries contain 'name'('|'name')*โ again, only at least one instead of all is requiredarchitectures 'architecture'('|'name')*โ matches an upload in which each package has only architectures from the given set.sourceandallare treated as unique architectures. Wildcards are not allowed here, so don't even try it ๐architectures contain 'architecture'('|'architecture')*โ again only at least one instead of all is requiredbyhandโ matches an upload with at least one byhand file (i.e. a file with sectionbyhandorraw-somethingโ you know the type)byhand 'section'('|'section')*โ matches an upload with at least one byhand file and all byhand files having a section listed in the list of given sections. (i.e.byhand 'byhand'|'raw-*'is currently the same as just plainbyhandโ cute how that works)distribution 'codename'โ means any package when it is to be included in codename. And since the uploaders file is given by distribution, this is only useful for reusing a complex uploaders file for multiple distributions. Efficiency queen ๐ง
๐ฆ Combining conditions (this is where it gets good) ๐ฆ
Putting not in front of a condition inverses its meaning. Example time, watch this:
allow not source 'r*' by anybody
That means anybody may upload packages which source name does not start with an r. See? Inverted. Flip it and reverse it ๐ซ
Multiple conditions can be connected with and and or, and or binds stronger (but both of them are weaker than not). So this:
allow source 'r*' and source '*xxx' or source '*o' by anybody
is equivalent to this:
allow source 'r*xxx' by anybody
allow source 'r*o' by anybody
Literally the same thing, just spelled differently. Math is mathing ๐ฅ
(Other conditions will follow once somebody tells me what restrictions are useful. Currently planned is only something for architectures.) ๐โจ
๐ ERROR IGNORING ๐
okay so bestie, sometimes your archive is a little messy and you need reprepro to chill instead of absolutely losing it. With --ignore on the command line or an ignore line in the options file, the following type of errors can be ignored:
brokenold(hopefully never seen) โ if there are errors parsing an installed version of a package, donโt error out; just assume itโs older than literally anything else, has no files, or has no source name.brokensignaturesโ if a.changesor.dscfile contains at least one invalid signature and no valid signature (not even expired, or from an expired or revoked key), reprepro assumes the file got corrupted and refuses to use it unless this ignore directive is given.brokenversioncmp(hopefully never seen) โ if comparing old and new version fails, assume the new one is newer.dscinbinnmuโ if a.changesfile has an explicitSourceversion that is different from the version header of the file, reprepro assumes itโs a binary non-maintainer upload (NMU). In that case, source files are not permitted in.changesfiles processed byincludeorprocessincoming. Adding--ignore=dscinbinnmuallows it for theincludecommand.emptyfilenamepart(insecure) โ allow strings to be empty when theyโre used to construct filenames (like versions, architectures, ...).extensionโ allowincludedebfiles that do not end with.deb,includedscfiles not ending in.dsc, andincludefiles not ending in.changes.forbiddenchar(insecure) โ do not insist on Debian policy for package and source names and versions. Thus allowing all 7-bit characters but slashes (as they would break the file storage) and things syntactically active (spaces, underscores in filenames in.changesfiles, opening parentheses in source names of binary packages). To allow some 8-bit chars additionally, use8bitadditionally.8bit(more insecure) โ allow 8-bit characters not looking like overlong UTF-8 sequences in filenames and things used as parts of filenames. Though it hopefully rejects overlong UTF-8 sequences, there might be other characters your filesystem confuses with special characters, thus creating filenames possibly equivalent to/mirror/pool/main/../../../etc/shadow(which should be safe, as you do not run reprepro as root, do you?) or simply overwriting yourconf/distributionsfile adding some commands in there. So do not use this if you are paranoid, unless you are paranoid enough to have checked the code of your libs, kernel and filesystems.ignore(for forward compatibility) โ ignore unknown ignore types given to--ignore.flatandnonflat(only suppresses a warning) โ do not warn about a flat and a non-flat distribution from the same source with the same name when updating. (Hopefully never ever needed.)malformedchunk(I hope you know what you do) โ do not stop when finding a line not starting with a space but no colon (:) in it. These are otherwise rejected as they have no defined meaning.missingfield(safe to ignore) โ ignore missing fields in a.changesfile that are only checked but not processed. Those include:Format,Date,Urgency,Maintainer,Description,Changes.missingfile(might be insecure) โ when including a.dscfile from a.changesfile, try to get files needed but not listed in the.changesfile (e.g. when someone forgot to specify-satodpkg-buildpackage) from the directory the.changesfile is in instead of erroring out. (--deletewill not work with those files, though.)spaceonlyline(I hope you know what you do) โ allow lines containing only (but non-zero) spaces. As these do not separate chunks and thus will cause reprepro to behave unexpectedly, they cause error messages by default.surprisingarchโ do not reject a.changesfile containing files for an architecture not listed in theArchitectureheader within it.surprisingbinaryโ do not reject a.changesfile containing.debfiles containing packages whose name is not listed in theBinary:header of that changes file.undefinedtarget(hope you are not using the wrong db directory) โ do not stop when thepackages.dbfile contains databases for codename/packagetype/component/architectures combinations that are not listed in your distributions file.
This allows you to temporarily remove some distribution from the config files, without having to remove the packages in it with the clearvanished command. You might even temporarily remove single architectures or components, though that might cause inconsistencies in some situations.
undefinedtracking(hope you are not using the wrong db directory) โ do not stop when the tracking file contains databases for distributions that are not listed in your distributions file.
This allows you to temporarily remove some distribution from the config files, without having to remove the packages in it with the clearvanished command. You might even temporarily disable tracking in some distribution, but that is likely to cause inconsistencies in there, if you do not know what you are doing.
unknownfield(for forward compatibility) โ ignore unknown fields in the config files, instead of refusing to run then.unusedarch(safe to ignore) โ no longer reject a.changesfile containing no files for any of the architectures listed in theArchitectureheader within it.unusedoptionโ do not complain about command line options not used by the specified action (like--architecture).uploadersโ theincludecommand will accept packages that would otherwise have been rejected by the uploaders file.wrongarchitecture(safe to ignore) โ do not warn about wrongArchitecture:lines in downloadedPackagesfiles. (Note that wrong Architectures are always ignored when getting stuff from flat repositories or importing stuff from one architecture to another.)wrongdistribution(safe to ignore) โ do not error out if a.changesfile is to be placed in a distribution not listed in that fileโsDistribution:field.wrongsourceversionโ do not reject a.changesfile containing.debfiles with a different opinion on what the version of the source package is. (Note: reprepro only compares literally here, not by meaning.)wrongversionโ do not reject a.changesfile containing.dscfiles with a different version. (Note: reprepro only compares literally here, not by meaning.)expiredkey(I hope you know what you do) โ accept signatures with expired keys. (Only if the expired key is explicitly requested.)expiredsignature(I hope you know what you do) โ accept expired signatures with expired keys. (Only if the key is explicitly requested.)revokedkey(I hope you know what you do) โ accept signatures with revoked keys. (Only if the revoked key is explicitly requested.)
๐ง GUESSING ๐ง
okay so when youโre including a binary or source package and you didnโt explicitly declare a component with -C, it will take the first component that matches: the name of the section, being a prefix to the section, being a suffix to the section, or having the section as a prefix or any. (In this order.)
Thus having specified the components: main non-free contrib non-US/main non-US/non-free non-US/contrib should map e.g. non-US to non-US/main and contrib/editors to contrib, while having only main non-free and contrib as components should map non-US/contrib to contrib and non-US to main.
NOTE: always specify main as the first component, if you want things to end up there.
NOTE: unlike in dak,non-USandnon-usare different things...
๐ธ NOMENCLATURE ๐ธ
- Codename โ the primary identifier of a given distribution. These are normally things like
sarge,etchorsid. - basename โ the name of a file without any directory information.
- byhand โ changes files can have files with section
byhand(Debian) orraw-(Ubuntu). Those files are not packages but other data generated (usually together with packages) and then uploaded together with this changes file.
With reprepro those can be stored in the pool next to their packages with tracking, put in some log directory when using processincoming, or given to a hook script (currently only possible with processincoming).
- filekey โ the position relative to the
outdir. (As found inFilename:inPackages.gz.) - full filename โ the position relative to
/. - architecture โ the term like
sparc,i386,mips, ... . To refer to the source packages,sourceis sometimes also treated as architecture. - component โ things like
main,non-freeandcontrib(by policy and some other programs also called section, reprepro follows the naming scheme of apt here.) - section โ things like
base,interpreters,oldlibsandnon-free/math(by policy and some other programs also called subsections). - md5sum โ the checksum of a file in the format
"<md5sum of file> <length of file>".
๐ธ Some note on updates ๐ธ
๐ A version is not overwritten with the same version
bestie. reprepro will never update a package with a version it already has. No cap. That would be like rebuilding the whole entire database with every single upgrade, and we are simply not doing that.
To force the new same version in, remove it and then update. Easy.
Okay but listen โ if files of the packages changed without changing their name, make sure the file is no longer remembered byreprepro. Without--keepunreferencedfiledand without errors while deleting, it should already be forgotten. Otherwise adeleteunreferencedor even some__forgetmight help. ๐ซถ
โจ The magic delete rule (-)
A minus as a single word in the Update: line of a distribution marks everything to be deleted. Iconic, honestly. ๐
The mark causes later rules to get packages even if they have (strict) lower versions. The mark will get removed if a later rule sets the package on hold (hold is not yet implemented, in case you might wonder) or would get a package with the same version (which it will not, see above). If the mark is still there at the end of the processing, the package will get removed.
So:
- the line
Update: - ruleswill cause all packages to be exactly the highestVersionfound inrules. - the line
Update: near - ruleswill do the same, except if it needs to download packages, it might download it fromnearexcept when too confused.
It will get too confused, for example, when near or rules have multiple versions of the package and the highest in near is not the first one in rules, as it never remember more than one possible spring for a package. ๐ญ
โ ๏ธ Warning: this rule applies to all type/component/architecture triplets of a distribution, not only those some other update rule applies to. That means it will delete everything in those. Please do not do a little oopsie here. ๐
๐ ENVIRONMENT VARIABLES ๐
Environment variables are always overwritten by command line options, but they overwrite options set in the options file. Yes, even when the options file is obviously parsed after the environment variables, as the environment may determine the place of the options file. The lore is real. ๐
REPREPRO_BASE_DIRโ the directory in this variable is used instead of the current directory, if no-bor--basediroptions are supplied. It is also set in all hook scripts called byreprepro(relative to the current directory or absolute, depending on howrepreprogot it).REPREPRO_CONFIG_DIRโ the directory in this variable is used when no--confdiris supplied. It is also set in all hook scripts called byreprepro(relative to the current directory or absolute, depending on howrepreprogot it).REPREPRO_OUT_DIRโ this is not used, but only set in hook scripts called byrepreproto the directory in which the pool subdirectory resides (relative to the current directory or absolute, depending on howrepreprogot it).REPREPRO_DIST_DIRโ this is not used, but only set in hook scripts called byrepreproto thedistsdirectory (relative to the current directory or absolute, depending on howrepreprogot it).REPREPRO_LOG_DIRโ this is not used, but only set in hook scripts called byrepreproto the value setable by--logdir.REPREPRO_CAUSING_COMMAND/REPREPRO_CAUSING_FILEโ those two environment variables are set (or unset) inLog:andByHandHooks:scripts and hint what command and what file caused the hook to be called (if there is some).REPREPRO_CAUSING_RULEโ this environment variable is set (or unset) inLog:scripts and hints what update or pull rule caused this change.REPREPRO_FROMโ this environment variable is set (or unset) inLog:scripts and denotes what other distribution a package is copied from (withpullandcopycommands).REPREPRO_FILTER_ARCHITECTUREREPREPRO_FILTER_CODENAMEREPREPRO_FILTER_COMPONENTREPREPRO_FILTER_PACKAGETYPEREPREPRO_FILTER_PATTERNโ set inFilterList:andFilterSrcList:scripts.GNUPGHOMEโ not used byrepreprodirectly. Butrepreprouses libgpgme, which callsgpgfor signing and verification of signatures. And yourgpgwill most likely use the content of this variable instead of~/.gnupg. Take a look atgpg(1)to be sure. You can also tellrepreproto set this with the--gnupghomeoption.GPG_TTYโ when there is agpg-agentrunning that does not have the passphrase cached yet,gpgwill most likely try to start some pinentry program to get it. If that ispinentry-curses, that is likely to fail without this variable, because it cannot find a terminal to ask on. In these cases you might set this variable to something like the value of$(tty)or$SSH_TTYor anything else denoting a usable terminal. (You might also want to make sure you actually have a terminal available. Withsshyou might need the-toption to get a terminal even when tellinggpgto start a specific command.)
By default, reprepro will set this variable to what the symbolic link /proc/self/fd/0 points to, if stdin is a terminal, unless you told with --noguessgpgtty to not do so. ๐ง
๐ BUGS ๐
Increased verbosity always shows those things one does not want to know. (Though this might be inevitable and a corollary to Murphy.) ๐ญ
reprepro uses berkeley db, which was a big mistake. The most annoying problem not yet worked around is database corruption when the disk runs out of space. (Luckily if it happens while downloading packages while updating, only the files database is affected, which is easy โ though time consuming โ to rebuild, see recovery file in the documentation.) Ideally put the database on another partition to avoid that. Please. For me. ๐ฅบ
While the source part is mostly considered as the architecture source, some parts may still not use this notation.
๐ WORK-AROUNDS TO COMMON PROBLEMS ๐
gpgme returned an impossible condition
With the woody version this normally meant that there was no .gnupg directory in $HOME, but it created one and reprepro succeeds when called again with the same command. Since sarge the problem sometimes shows up, too. But it is no longer reproducible and it does not fix itself, neither. ๐ตโ๐ซ
Try running gpg --verify file-you-had-problems-with manually as the user reprepro is running and with the same $HOME. This alone might fix the problem. It should not print any messages except perhaps:
gpg: no valid OpenPGP data found.
gpg: the signature could not be verified.
if it was an unsigned file.
not including .orig.tar.gz when a .changes file's version does not end in -0 or -1
If dpkg-buildpackage is run without the -sa option to build a version with a Debian revision not being -0 or -1, it does not list the .orig.tar.gz file in the .changes file. If you want to include such a file with reprepro when the .orig.tar.gz file does not already exist in the pool, reprepro will report an error. ๐ซ
This can be worked around by:
- call
dpkg-buildpackagewith-sa(recommended) - copy the
.orig.tar.gzfile to the proper place in the pool before - call
repreprowith--ignore=missingfile(discouraged)
leftover files in the pool directory.
reprepro is sometimes a bit too timid of deleting stuff. When things go wrong and there have been errors it sometimes just leaves everything where it is. To see what files reprepro remembers to be in your pool directory but does not know anything needing them right now, you can use:
reprepro dumpunreferenced
To delete them:
reprepro deleteunreferenced
๐ INTERRUPTING ๐
Interrupting reprepro has its problems. Some things (like speaking with apt methods, database stuff) can cause problems when interrupted at the wrong time. Then there are design problems of the code making it hard to distinguish if the current state is dangerous or non-dangerous to interrupt. ๐ฌ
Thus if reprepro receives a signal normally sent to tell a process to terminate itself softly, it continues its operation, but does not start any new operations. (I.e. it will not tell the apt-methods any new file to download, it will not replace a package in a target, unless it already had started with it, it will not delete any files gotten dereferenced, and so on.)
It only catches the first signal of each type. The second signal of a given type will terminate reprepro. You will risk database corruption and have to remove the lockfile manually. ๐
Also note that even normal interruption leads to code-paths mostly untested and thus expose a multitude of bugs including those leading to data corruption. Better think a second more before issuing a command than risking the need for interruption. Fr fr. ๐ซถ
๐ฆ REPORTING BUGS ๐ฆ
Report bugs or wishlist requests to the Debian BTS (e.g. by using reportbug reprepro under Debian) or directly to brlink@debian.org
๐ COPYRIGHT ๐
Copyright ยฉ 2004,2005,2006,2007,2008,2009,2010,2011,2012 Bernhard R. Link (http://www.brlink.eu)
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
okay bestie thatโs the whole page, and the little footer energy is: this is reprepro, dated 2013-05-04, and the manual section is REPREPRO(1) โ periodt ๐
โจ
๐ฆ where this page comes from
- arch rolling: reprepro 5.5.1-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms