pacopts 0.3.1 released
Dear Obarun Community,
A new release of pacopts is available in the obextra repository. pacopts is rewritten
in Python: it reads the pacman databases through pyalpm, talks directly to the AUR, no longer
needs cower nor expac, and can now build any PKGBUILD in a rootless sandbox without
installing anything on your host. Below is what you have to do to upgrade, followed by an
overview of the changes.
Upgrading
Synchronize and upgrade:
# pacman -Syu
The configuration file
The configuration file /etc/obarun/pacopts.conf is now in TOML format, and every key is
required.
- If you never edited it, pacman replaces it and nothing is expected from you.
- If you edited it, pacman keeps your file and installs the new one as
/etc/obarun/pacopts.conf.pacnew.pacoptsrefuses the old file withinvalid configuration file. Move your values into the.pacnewfile, then put it in place:
# mv /etc/obarun/pacopts.conf.pacnew /etc/obarun/pacopts.conf
The old keys translate as follows:
| 0.2.2 | 0.3.1 |
|---|---|
OPTS_COWER |
removed |
OPTS_MAKEPKG="-Cs --noconfirm --nosign" |
makepkg_opts = ["--noconfirm", "--nosign"] |
OPTS_PACMAN="-U --noconfirm" |
pacman_opts = ["-U", "--noconfirm"] |
TargetDir of ~/.config/cower/config |
workdir = "~/.cache/pacopts" |
[sandbox] section, new |
makepkg_opts now only holds the options added to the ones pacopts always gives to
makepkg. The options running pacman, -s, -i, -r and their long forms, are refused.
The command line
The command line is now made of subcommands. Update your scripts and aliases:
| 0.2.2 | 0.3.1 |
|---|---|
pacopts origin repo package... |
pacopts origin -r repo package... |
pacopts aur -s term... |
pacopts aur search term... |
pacopts aur -m maintainer... |
pacopts aur search -b maintainer maintainer... |
pacopts aur -i package... |
pacopts aur info package... |
pacopts aur -d package... |
pacopts aur download package... |
pacopts aur -u |
pacopts aur outdated |
pacopts aur -U |
pacopts aur upgrade |
pacopts aur -b package... |
pacopts aur build package... |
pacopts aur -I package... |
pacopts aur install package... |
-z |
-c, --color |
-v 4 |
-v, --verbose |
Warning
pacopts origin foo now checks the package foo against obcore. It no longer takes
foo as a repository, use -r for that.
The complete list is in the rosetta page.
What's new
Building in a sandbox
The new build command builds a PKGBUILD in a rootless
66-ns sandbox. As your regular user, from
the directory holding the PKGBUILD:
$ pacopts build
The sandbox runs on a build root, created at the first build with pacman -r and base-devel,
then kept up to date from the databases of your host. The dependencies of the PKGBUILD are
installed in the build root, never on the host, and removed once the build is done. The sources
are downloaded with network access, then the package is built without it, unless you give -n.
The packages built land next to the PKGBUILD.
By default, pacopts aur build, install and upgrade use the same sandbox. Only install
and upgrade install the resulting packages on your host. Set enable = false in the
[sandbox] section of the configuration to build on the host as before.
The AUR
pacopts aur downloadclones the git repository of the package. An update follows the AUR exactly, a local change of a tracked file is lost.pacopts aur buildresolves the AUR dependencies: they are built and installed first.build,installandupgradego on after a failure, skip the packages that depend on it, and end with a summary of what was done, failed and skipped.pacoptsoffers to import the PGP keys needed to check the sources.
origin and service
pacopts originfinds the repository of an installed package even when two repositories provide the same version, or when the package is outdated, and reports local builds.pacopts serviceonly looks at theobservicerepository and ignores the66runtime shared by every service.
Fixes of 0.3.1
0.3.1 makes the sandbox work on a basic setup:
aur build,installandupgradeno longer crash on the first use of the sandbox, when the build root does not exist yet.- The sandbox ignores the
DownloadUserof the hostpacman.conf, set by default since pacman 7, which prevented the build root from being created. - A build root whose creation was interrupted is completed on the next run.
- A PKGBUILD whose
package()copies files with their owner,cp -afor instance, builds in the sandbox.
Documentation
- The command line: pacopts
- From 0.2.2 to 0.3.x: pacopts-rosetta
Feedback is welcome. Report anything that went wrong on the forum or on git.obarun.org.
Thank you for your continued support of Obarun.
Eric Vidal: [email protected]