pacopts¶
pacopts finds the repository an installed package comes from, finds the 66 frontend service packages available for installed software, builds a PKGBUILD in a rootless sandbox and maintains packages coming from the AUR. It reads the pacman databases through libalpm and talks directly to the AUR RPC interface.
The general options come before the command, e.g. pacopts -c aur search foo.
Interface¶
pacopts [ -h ] [ -v ] [ -q ] [ -c ] command [ args ]
pacopts origin [ -h ] [ -r repo ] package...
pacopts service [ -h ] package...
pacopts build [ -h ] [ -n ] [ -m options ] [ -R ] directory
pacopts aur search [ -h ] [ -b name|name-desc|maintainer ] term...
pacopts aur info [ -h ] package...
pacopts aur download [ -h ] [ -f ] package...
pacopts aur outdated [ -h ] package...
pacopts aur build [ -h ] package...
pacopts aur install [ -h ] package...
pacopts aur upgrade [ -h ] package...
Exit codes¶
- 0 success
- 100 wrong usage
- 111 system call failed
Options¶
-
-h, --help: prints this help. After a command, prints the help of the command.
-
-v, --verbose: also prints the debugging messages, and the output of pacman on the build root of the sandbox.
-
-q, --quiet: only prints the error messages. It can not be used with -v.
-
-c, --color: enables the colorization of the output. Without it, the results are colorized when the standard output is a terminal and the messages when the standard error is one.
origin¶
Finds the installed packages which do not come from a repository. Must be run with root privileges.
Interface¶
pacopts origin [ -h ] [ -r repo ] package...
Obarun repositories come before the Arch ones in pacman.conf and provide packages with the same name, often with the same version. origin finds the installed packages which do not come from repo.
The installed package is first compared to the package of each repository on its version, build date and packager, so the origin is found even when two repositories provide the same version. An outdated package matches no repository anymore: its packager then tells the side it comes from, Arch packagers always use an archlinux.org address, and repo is the origin when it is on that side. A package without packager (Unknown Packager) comes from a repository shipping such packages, e.g. archzfs, or else is reported as a local build. A package only provided by repo is never reported.
Without package, every installed package of repo is checked. The packages found are listed with their detected origin, then pacopts asks to replace them with the repo ones through pacman -S.
Options¶
-
-h, --help: prints this help.
-
-r, --repo repo: repository to check against,
obcoreby default.
service¶
Finds the 66 frontend services of the installed packages. Must be run with root privileges.
Interface¶
pacopts service [ -h ] package...
Finds the frontend service packages of the observice repository, the xxx-66serv packages, which depend on package. The dependencies on the runtime shared by every service (66, 66-tools, 66-tools-basu, execline, s6-linux-utils, s6-portable-utils) and on other xxx-66serv packages are not taken into account. Without package, every installed package is checked.
The services are listed as pacman -Ss does, [installed] marking the installed ones and [installed: version] the ones installed with another version. pacopts then asks to install the ones not installed yet through pacman -S.
Options¶
- -h, --help: prints this help.
build¶
Builds a PKGBUILD in a rootless 66-ns sandbox. Must be run without root privileges.
Interface¶
pacopts build [ -h ] [ -n ] [ -m options ] [ -R ] directory
Builds the PKGBUILD of directory, the current one by default. The packages built are copied next to the PKGBUILD and their path is printed. Nothing is installed on the host.
The sandbox runs on a build root, created at the first build with pacman -r and base-devel, then updated at each build from the sync databases of the host. The build root receives the pacman.conf, pacman.d/ and makepkg.conf of the host and an account for the user. The locales generated on the host (/usr/lib/locale/locale-archive) are given read-only to the sandbox.
The dependencies, make dependencies and check dependencies of the PKGBUILD, plus the client of its VCS sources (git, subversion, mercurial, breezy, fossil) as makepkg -s does, missing from the build root are installed in it: from the repositories, or built in the sandbox when only available on the AUR. They are removed from the build root once the build is done, even when it fails.
Each package base has a box in the box directory of the configuration, the only place writable from the sandbox, where the build root is read-only and $HOME empty. The sources are downloaded first with network access, they are kept in the box from a build to the other. The package is then built without network access, unless -n is given or network is true in the configuration. makepkg runs with --cleanbuild --holdver followed by the makepkg_opts of the configuration.
The PGP keys listed by validpgpkeys are copied from the keyring of the user into the box, pacopts offers to import the missing ones first.
Options¶
-
-h, --help: prints this help.
-
-n, --network: allows the network while the package is built.
-
-m, --makepkg-opts options: makepkg options added to the makepkg_opts of the configuration for this build, split as a shell does, e.g.
-m '--nocheck -L'. A value starting with a dash and holding a single option needs the attached form,-m--nocheckor--makepkg-opts=--nocheck. The options running pacman are refused. With--nocheck, from here or from the configuration, the check dependencies are not installed in the build root. -
-R, --reset-root: removes the build root and creates it again.
aur¶
Main subcommands to manage the AUR packages. Must be run without root privileges, the packages are built as the current user. The install and upgrade subcommands install the packages through su -c, which asks for the root password.
Interface¶
pacopts aur [ -h ] command [ args ]
With enable true in the sandbox section of the configuration, the default, the build, install and upgrade subcommands build the packages in the sandbox of the build command. The AUR dependencies needed by a build then go to the build root, and only install and upgrade install packages on the host. With enable false, they run makepkg directly on the host, with --cleanbuild --syncdeps --rmdeps followed by the makepkg_opts of the configuration.
For build, install and upgrade, a package which fails does not stop the others, the packages depending on it are skipped. A summary lists the packages done, failed and skipped, the exit code is 111 if a package failed or was skipped.
Options¶
- -h, --help: prints this help.
search¶
pacopts aur search [ -h ] [ -b name|name-desc|maintainer ] term...
Searches the AUR.
- -b, --by name|name-desc|maintainer: field to search. name-desc, the default, searches the name and the description, maintainer searches the packages maintained by term.
info¶
pacopts aur info [ -h ] package...
Displays information about packages.
download¶
pacopts aur download [ -h ] [ -f ] package...
Clones the git repository of the packages into the workdir of the configuration, or updates it when it already exists. An update follows the AUR exactly: any local change of the tracked files, e.g. a PKGBUILD edited by hand or rewritten by makepkg for a VCS package, is lost. Downloaded sources and built packages are kept.
- -f, --force: removes the existing repository and clones it again.
outdated¶
pacopts aur outdated [ -h ] package...
Lists the foreign packages, packages found in no sync database, with a newer version on the AUR. Without package, every foreign package is checked.
build¶
pacopts aur build [ -h ] package...
Downloads then builds the packages, without installing them. Their dependencies and make dependencies only available on the AUR are downloaded, built and installed first, recursively, since makepkg needs them installed: in the build root with the sandbox, on the host without it. pacopts offers to import the PGP keys listed by validpgpkeys and missing from the keyring of the user, unless makepkg_opts holds --skippgpcheck or --skipinteg. Without the sandbox, it also asks to rebuild a package already built.
install¶
pacopts aur install [ -h ] package...
Downloads, builds and installs the packages. The dependencies and make dependencies satisfied neither by an installed package nor by a repository are searched on the AUR, then downloaded, built and installed first, recursively. A package already up to date is skipped.
upgrade¶
pacopts aur upgrade [ -h ] package...
Installs the outdated foreign packages, as install does. Without package, every foreign package is upgraded.
Files¶
-
/etc/obarun/pacopts.conf: configuration file of pacopts, TOML format, used by the build command and the aur download, build, install and upgrade subcommands. Every key is required.- workdir: directory where the AUR git repositories are cloned, the built packages land in them. A leading
~is expanded. - makepkg_opts: list of options added to the ones pacopts always gives to
makepkg:--cleanbuild --syncdeps --rmdepson the host,--cleanbuild --holdverin the sandbox, where pacopts installs then removes the dependencies in the build root itself. The options running pacman (-s,-i,-rand their long forms) are therefore refused. - pacman_opts: list of options given to
pacmanto install a built package. - sandbox: section of the sandbox.
- enable: also builds the AUR packages in the sandbox,
trueby default. - root: the build root, a leading
~is expanded. - box: directory of the boxes, one per package base, a leading
~is expanded. - network: allows the network while the package is built, the sources are always downloaded with network access.
- tmp_size: size of the
/tmpof the sandbox. - packager:
PACKAGERgiven to makepkg, empty keeps the one ofmakepkg.conf.
- enable: also builds the AUR packages in the sandbox,
- workdir: directory where the AUR git repositories are cloned, the built packages land in them. A leading
-
/etc/pacman.conf: the pacman configuration, read to find the databases, and copied into the build root.