PKGD(1) PKGD(1) NAME pkgd - share your pacman packages over your lan SYNOPSIS pkgd [options] DESCRIPTION PkgD (Package Daemon) is intended to facilitate package sharing over a LAN to avoid unnecessary downloads from the external network. By run‐ ning a network of pkgds you can create the equivalent of a shared cache. CONFIGURING PKGD Select at least one computer on which to run a "master" pkgd. This will be the server that you connect to when attempting to retrieve packages. A master pkgd does not require any special configuration to make it a master. Master status is determined by how other "slave" pkgds are configured. Once the master pkgd is set up, you should start a "slave" pkgd on the other computers in your network. You should configure each slave to point to the master by adding a "Master = " line to the slave's configuration file, e.g. "Master = 192.168.0.1:14687". When the master pkgd is queried for a package, it will first check its own cache. If the package is not found then it will check each slave pkgd that it knows about for the package until either the package is found or it has queried all of the slaves. If the package cannot be found, the master pkgd will return a "404 Not Found"error. Alternative network topologies are supported, including cyclical mas‐ ter-slave relationships. Pkgd should detect and prevent infinite-loop queries so you should experiment with other setups to find one which works for you. ARCHITECTURES It may be necessary to take system architecture into account when run‐ ning PkgD. Previously, packages in the community repo had the architec‐ ture stripped from the package filename which created overlapping namespaces between different architectures. This is no longer done but there may still be some packages which have not yet been updated to the current naming scheme. In the event that a package for the wrong archi‐ tecture is downloaded, Pacman should detect a mismatched checksum and refuse to install the package. PORTS AND SECURITY You must open a port for PkgD when running it on a computer with a firewall or other computers in your LAN will not be able to connect to it (yes, I realize that if you have a firewall on Arch Linux, then you probably don't need to be told this, but it's better to be too clear than not clear enough). However, you do not need to, nor should you open ports in your router's firewall or any other firewall which stands between your LAN and an external network. PkgD is only intended to be used on a LAN to avoid downloads from the external network. Although the author has tried to avoid potential security exploits while writing the code, this has not been a primary focus nor is the author a security expert. As the license states, PkgD comes with NO WARRANTY whatsoever. If you wish to deploy it in an unsafe environment, you are advised to review the code yourself. PACMAN To use PkgD with Pacman, simply specify the PkgD master servers the same way that you specify other http servers in the Pacman configura‐ tion file, e.g. [core] Server = http://192.168.0.1:14687/$repo Place the master PkgD server(s) at the top of each repo section or at the top of your mirrorlist to make sure that Pacman checks them before downloading from an external server. Note that pacman will report an error when a PkgD server cannot find a package. It will then move on to the next server in the list. This is due to the way pacman handle's 404 errors. Despite the errors, pacman will continue to retrieve packages as expected. Note that these errors can be avoided by using Powerpill. OPTIONS PkgD recognizes the following options: --address, -a
Bind PkgD to this address, e.g. "-a 192.168.0.1". Leave it blank to allow access to PkgD through all interfaces. --cachedir The path to the package cache. Multiple may be specified and they will be checked in that order. This option may be repeated to pass multiple values. --config The path to the PkgD configuration file. --get-config-template Display a configuration file template and exit. --get-pid Return the pid of a running PkgD. This is mostly for handling PkgD daemons. --help, -h Display the help message and exit. --interval, -i The PkgD master notification interval (in seconds), i.e. how often PkgD should inform master PkgDs that it is available. The default is five minutes (300 s). --log, -l The PkgD log file. --man Display the man page and exit. --man-nroff Display the man page in nroff format and exit. --master, -m An address and port of a master PkgD. Multiple may be specified. This option may be repeated to pass multiple values. --max-depth The maximum number of nodes in each query path, e.g. each imme‐ diate slave is the first node, each slave of a slave is a second node, etc. --port, -p The port on which to listen, e.g. "-p 44567". The default port is 14687 --quiet, -q Suppress console output (this has no effect on logging). AUTHORS Xyne January 2010 PKGD(1)