Skip to content

command-line client for abf.openmandriva.org

License

Notifications You must be signed in to change notification settings

OpenMandrivaAssociation/abb

Repository files navigation

abf local build script

usage:
$ abb <command> [<project name> ...]
$ abb clone <project name> ...
$ abb new <project name>
$ abb store <file name> ...
$ abb status [<project name>]
$ abb view [<project name>|<build_list id>]
$ abb publish <build_list id> ...
$ abb rejectpublish <build_list id> ...

where <command>:
build, builda, buildb, buildp... (see below)
restore

<project name> can be omitted for commands "build*", "restore", "status",
"send" and "view" if we are in the project dir.

commands "build*", "clone", "store", "restore" accepts multiple args.

conffiles:
first script looking for ~/.abbrc
if it not exists, then looking for .abbrc in curdir

examples:
$ abb clone rosa-release
this is equivalent to
1. "git clone https://abf.rosalinux.ru/import/rosa-release.git"
2. "cd rosa-release"
3. "git checkout -t origin/rosa2012.1"
4. "cd .."
all parts of arguments can be overriden via a conffile
default settings:
proto=https
server=abf.rosalinux.ru
owner=import
branch=rosa2012.1
remote=origin
auth=
abfyml=.abf.yml
buildlog=yes
restore=always
rows=4
refresh=120
defaultspec=/usr/share/abb/spek.skel

you can also override any option in command-line
in form <option>=<value> like there:
$ abb branch=import_cooker clone rosa-release
or
$ abb clone branch=import_cooker rosa-release
or
$ abb clone rosa-release branch=import_cooker


$ abb build rosa-release
in this case script tries to determine whether project already clonead
if not - he clones the project.
then he tries to download tarballs from storage.
then he tries to build project.

you can add suffix to command "build":
builda - like -ba option to rpmbuild
buildb - like -bb option to rpmbuild (by default)
buildp - like -bp option to rpmbuild
and so forth

you can specify options, that command "build" transfers to rpmbuild
for example:
$ abb buildi --short-circuit

command "store":
"store" tries to upload file(s) to abf storage: http://file-store.rosalinux.ru.
now this service requires authentication to upload files.
authentication is the same as on the https://abf.rosalinux.ru.
"store" requires one or more arguments - names of files to store.
"store" must be run in the project directory.

command "restore":
"restore" - opposite to "store".
if "restore" is running in the project directory, it does not require any
arguments.
otherwise requires one or more arguments - the names of the projects (or rather
the project directory), similar to "build" or "clone".

command "clone" and option "restore=[always|ask|none|]":
now by default abb tries to download files right after "clone".
you can override this behavior by specifying an option "restore=<condition>"
in the command-line or in the ~/.abbrc (where <condition> can be "always",
"ask", or "none").
for example:
$ abb clone rosa-release restore=ask
...
restore files. is it ok? (Y|n):
...

command "status" displays the status of the build tasks of your project on the
server abf.rosalinux.ru
option "rows" (default value 4) limit server output to specified number of
rows.
option "refresh" (default value 120) sets interval (in seconds) of refreshing
output.
to run "status" only once, without refreshing, specify a value less than 60,
zero for example.
examples:
abb status
abb status rows=1
abb rows=1 refresh=0 status

command "new" creates new project:
invocation: abb new <project>
equivalent shell commands:
1. mkdir <project>
2. cd <project>
3. cp <spec skeleton> <project>.spec
4. git init
5. git remote add origin <url of project git repo>
default path to <spec skeleton> is /usr/share/abb/spek.skel.
you can override it with option defaultspec=/path/to/your/file.
while copying <spec skeleton>, abb replaces substring '@@project@@' with actual
name of project.

command "view" requires zero or one args.
zero: run "w3m http://abf.rosalinux.ru/<owner>/<project>"
one:
if arg is numeric, run "w3m http://abf.rosalinux.ru/build_lists/<arg>"
if arg is not numeric, run "w3m http://abf.rosalinux.ru/<owner>/<arg>"

command "publish" sends to abf.rosalinux.ru request to publish specified build
lists.
see: http://abf-doc.rosalinux.ru/v1/buildlists/#publish-build-list

command "rejectpublish" sends to abf.rosalinux.ru request to reject publishing
specified build lists.
see: http://abf-doc.rosalinux.ru/v1/buildlists/#reject-publish-build-list

command "send" sends to abf.rosalinux.ru request to build project
$ abb send [<project name> ... ]
options (with defaults):
# build arch
arch="i586,x86_64"
# platform
platform="rosa2012.1"
# repos to include from platform (f.e. "repos=main,contrib")
repos=
# update type (security bugfix enhancement recommended newpackage)
updatetype=security
# hash of commit to remote build
commit=
# auto publish (true|false)
publish=false
# rebuild a package with all its reverse dependencies (true|false)
withrequired=false
# repo to save
# in form "platform/repo"
# f.e.:
# "username_personal/main" (simply "personal")
# "rosa2012.1/contrib" (simply "rosa2012.1"
# if project default repo is "contrib" for platform "rosa2012.1")
reposave=
# server api part
serverapi=api/v1