-
Notifications
You must be signed in to change notification settings - Fork 85
ABBS Tree
ABBS reads build configurations from a repository, and its content is stored in
a tree. Below is an example showing a simple repository stored at
"$ABBS"/repo
.
$ find "$ABBS"/repo
/usr/lib/abbs/repo
/usr/lib/abbs/repo/base-utils
/usr/lib/abbs/repo/base-utils/screen
/usr/lib/abbs/repo/base-utils/screen/autobuild
/usr/lib/abbs/repo/base-utils/screen/autobuild/defines
/usr/lib/abbs/repo/base-utils/screen/spec
Breaking down the path shows:
-
/usr/lib/abbs/repo -
"$ABBS"/repo
, or the ABBS repository. - base-utils/ - a category/section of packages.
-
screen/ - the
screen
package inside of thebase-util
category. -
spec - base package specifications of
screen
. - autobuild - autobuild configurations, see the Autobuild3 section.
So, to abbs-build
, this is a package named base-utils/screen
. A
two-layer-deep tree repository.
ABBS trees are usually managed with a version control system.
This section discusses some basic management knowledge of an ABBS tree.
Planting an ABBS tree/repository is simple, simply create a "$ABBS"/repo
directory, create different sections, and packages inside of the sections
accompanied with a spec
file and an autobuild/
directory.
For example, if we want to introduce the package atom-editor
to the ABBS tree,
we will first create a category for it, say github-editors
.
cd "$ABBS"/repo
mkdir github-editors/
Then, we will create a directory for atom-editor
itself.
cd github-editors/
mkdir atom-editor/
Then, create a spec
file for atom-editor
. The spec
file contains version
and source information of the package.
VER=1.5.2
SRCTBL="https://github.com/atom/atom/archive/v1.5.2.tar.gz"
SRCTBL
defines the "source tarball" of the package. Other kinds of source are
also supported:
- Git checkouts
-
GITSRC=
defines the Git repository address. -
GITBRCH=
defines the Git branch to use. -
GITCO=
defines the checkout to use.
-
- SVN checkouts
-
SVNSRC=
defines the SVN repository address. -
SVNCO=
defines the SVN checkout to use.
-
- HG/Mercurial checkouts
-
HGSRC=
defines the HG repository address.
-
- BZR/Bazaar checkouts
-
BZRSRC=
defines the BZR repository address. -
BZRCO=
defines the BZR checkout to use.
-
- Dummy sources
-
DUMMYSRC=
expects a binary value (0/1) to decide whether dummy source should be used. Useful when creating dummy/meta packages.
-
Packagers may also specify source subdirectory with the SUBDIR=
option, or
otherwise automatically detected by abbs-build
.
The spec
file is sourced by Bash, therefore you may substitute any variables
to save work in the future. Now, you will introduce the autobuild/
directory
with all necessary Autobuild3 configurations. See the
Autobuild3 section
for information on how to create an Autobuild3 configuration.
Repeat the action for packages you would like to import to the repository.
Building a package from an ABBS tree/repository is as simple as the command below.
abbs-build github-editors/atom-editor
Or by using the short form.
abbs-build atom-editor
Understanding the nature of an ABBS tree/repository, you will see that if a large amount of packages are included in a tree, you may find it difficult to maintain such a tree.
There is nothing wrong with a huge tree, but using a Version Control System (VCS) like Git usually helps.