Академический Документы
Профессиональный Документы
Культура Документы
Home
ABS overview
'ABS' may be used as an umbrella term since it includes and relies on several other components;
therefore, though not technically accurate, 'ABS' can refer to the following tools as a complete
toolkit:
SVN tree
The directory structure containing files needed to build all official packages but not the packages
themselves nor the source files of the software. It is available in svn and git repositories.
PKGBUILD
A Bash script that contains the URL of the source code along with the compilation and
packaging instructions.
makepkg
shell command tool which reads the PKGBUILDs, automatically downloads and compiles the
sources and creates a .pkg.tar* according to the PKGEXT array in makepkg.conf . You
may also use makepkg to make your own custom packages from the AUR or third-party
sources. See Creating packages for more information.
pacman
pacman is completely separate, but is necessarily invoked either by makepkg or manually, to
install and remove the built packages and for fetching dependencies.
AUR
The Arch User Repository is separate from ABS but AUR (unsupported) PKGBUILDs are built
using makepkg to compile and package up software. In contrast to the ABS tree on your local
machine, the AUR exists as a website interface. It contains many thousands of user-contributed
PKGBUILDs for software which is unavailable as an official Arch package. If you need to build a
package outside the official Arch tree, chances are it is in the AUR.
Warning: Official PKGBUILDs assume that packages are built in a clean chroot. Building
software on a dirty build system may fail or cause unexpected behaviour at runtime, because if
the build system detects dependencies dynamically, the result depends on what packages are
available on the build system.
SVN tree
The core, extra, and testing repositories are in the packages SVN respository for checkout.
The community and multilib repositories are in the community SVN repository.
Each package has its own subdirectory. Within it there
are repos and trunk directories. repos is further broken down by repository name (e.g., core)
and architecture. PKGBUILD's and files found in repos are used in official builds. Files found
in trunk are used by developers in preparation before being copied to repos .
acl
acl/repos
acl/repos/core-i686
acl/repos/core-i686/PKGBUILD
acl/repos/core-x86_64
acl/repos/core-x86_64/PKGBUILD
acl/trunk
acl/trunk/PKGBUILD
The source code for the package is not present in the ABS directory. Instead,
the PKGBUILD contains a URL that will download the source code when the package is built.
Tip: An alternative method is to install and use the asp package which is a thin wrapper
around the svntogit repositories.
Prerequisites
Install the subversion package.
Non-recursive checkout
Warning: Do not download the whole repository; only follow the instructions below. The entire
SVN repository is huge. Not only will it take an obscene amount of disk space, but it will also tax
the archlinux.org server for you to download it. If you abuse this service, your address may be
blocked. Never use the public SVN for any sort of scripting.
In both cases, it simply creates an empty directory, but it does know that it is an svn checkout.
Checkout a package
In the directory containing the svn repository you checked out (i.e., packages or community), do:
This will pull the package you requested into your checkout. From now on, any time you svn
updateat the top level, this will be updated as well.
If you specify a package that does not exist, svn will not warn you. It will just print something like "At
revision 115847", without creating any files. If that happens, check your spelling of the package
name and that the package has not been moved to another repository (i.e. from community to the
main repository).
Tip: To checkout an older version of a package, see #Checkout an older version of a package.
You should periodically update all of your checked out packages if you wish to perform rebuilds on
more recent revisions of the repositories. To do so, do:
$ svn update
Configure makepkg
See makepkg#Configuration on how to configure makepkg for building packages from
the PKGBUILD's you have checked out.
Build package
Copy the directory containing the PKGBUILD you wish to modify to a new location. Then make the
desired modifications. From there, use makepkg as described in makepkg#Usage to create and
install the new package.
Insert a group array into the PKGBUILD, and add the package to a group called modified .
PKGBUILD
groups=('modified')
/etc/pacman.conf
IgnoreGroup = modified
If new versions are available in the official repositories during a system update, pacman prints a
note that it is skipping this update because it is in the IgnoreGroup section. At this point the
modified package should be rebuilt from ABS to avoid partial upgrades.
Find out the revision you want by examining the history, then specify the revision you wish to
checkout. For example, to checkout revision r1729 you would do:
This will update an existing working copy of package-name to the chosen revision.
You can also specify a date. If no revision on that day exists, svn will grab the most recent package
before that time. The following example checks out the revision from 2009-03-03:
It is possible to checkout packages at versions before they were moved to another repository as
well; check the logs thoroughly for the date they were moved or the last revision number.
Other tools
pbget - retrieve PKGBUILDs for individual packages directly from the web interface. Includes
AUR support.
asp - a tool to manage the build source files used to create Arch Linux packages. Uses the git
interface which offers more up to date sources.