Custom local repository

From ArchWiki

Jump to: navigation, search


i18n
English
Русский
简体中文

[edit] Using repo-add

Pacman 3 introduced a new script named repo-add which makes generating your own repository much easier. Use repo-add --help for more details on its usage.

This script is very easy to run, and also very easy to keep your DB up to date. Simply store all of the built packages you want in your repository in one directory, and execute the following command:

repo-add /path/to/repo.db.tar.gz *.pkg.tar.gz

where 'repo' is the name of your custom repository. The last argument will add all pkg.tar.gz files to your repository, so be careful- if you have multiple versions of a package in your directory, it is unclear which one will take precedence and end up in the repository.

To add a new package (and remove the old if it exists, simply run

repo-add /path/to/repo.db.tar.gz packagetoadd-1.0-1-i686.pkg.tar.gz

If there is a package that you do not want in your repository any longer, read up on repo-remove.

[edit] Final note

Once you have made a local repository, add the repository to your pacman.conf. The name of the db.tar.gz file is the repository name. You can reference it directly using a file:// url, or you can access it via ftp using ftp://localhost/path/to/directory.

If you can and are willing, add your user-repository to our list of unofficial user repositories, so that all other users can find and install your packages.

Personal tools