ABF Console Client

From Rosalab Wiki
Revision as of 16:58, 18 October 2012 by Anton.kirilenko (Talk | contribs) (abf rebuild)

This is a page snapshot, showing old (but not deleted) versions of images and templates.
Jump to: navigation, search

Intro

Our team (or just me) is about to start the development of the long-awaited project, console client for ABF!

Firstly we have to make up the list of features. All the demands and proposals are welcome in this mailing list (rosa-devel) or here.


Feature List

abf get

[-h] [-b BRANCH] project

clone a project from ABF

project: project name. ([group/]project). If no group specified, it's assumed to be your default group.


-h, --help: show this help message and exit

-b BRANCH, --branch BRANCH: branch to checkout


abf build

[-h] [-p PROJECT] [-b BRANCH] [-t TAG] [-c COMMIT] [-s SAVE_TO_REPOSITORY] [-a ARCH] [-r REPOSITORY] [--auto-publish] [--update-type {security,bugfix,enhancement,recommended,newpackage}]

-h, --help: show this help message and exit

-p PROJECT, --project PROJECT: project name ([group/]project). If no group specified, it is assumed to be your default group. If the option is not specified and you are in a git repository directory - resolve a project name from it.

-b BRANCH, --branch BRANCH: branch to build.

-t TAG, --tag TAG: tag to build.

-c COMMIT, --commit COMMIT: commit sha hash to build.

-s SAVE_TO_REPOSITORY, --save-to-repository SAVE_TO_REPOSITORY: repository to save results to ([platform/]repository). If no platform part specified, it is assumed to be "<default_group>_personal". If this option is not specified at all, "<default_group>_personal/main" will be used.

-a ARCH, --arch ARCH: architectures to build, can be set more than once. If not set - use all the available architectures.

-r REPOSITORY, --repository REPOSITORY repositories: to build with ([platform/]repository). Can be set more than once. If no platform part specified, it is assumed to be your "<default_build platform>". If no repositories were specified at all, use the "main" repository from save-to platform. enable automatic publishing.

--update-type {security,bugfix,enhancement,recommended,newpackage}: Update type. Default is "security".

NOTES:

API takes git commit hash to build. So client have to resolve it.

  • If you've specified commit hash - it will be used "as is".
  • If you've specified branch or tag name - it will be resolved automatically using ABF API. (the hash of top commit will be used for branch)
  • If you've specified no git commit related options and you've specified a project name - this project's default branch will be used.
  • If you've specified no git commit related options and you've not specified a project name (you have to be in a git repository) - the top remote commit of your current branch will be used.


abf rebuild <not implemented yet>

Execute the last executet abf build ... command for the project specified or to the current project if possible.

abf buildstatus

[ID]

Get the status of the build task with ID.

ID: build list ID

abf localbuild

Build the project from cwd using mock. A set of parameters will be available later.

abf sync

Check and cleanup package sources and patches using current spec as base.

(delete all sources and patches from working directory if they are not listed in spec; inform if any listed patches/sources are missing; create proper file used to store tarballs on file server)

abf backport SRC_BRANCH [DST_BRANCH]

Copy all the files from SRC_BRANCH to DST_BRANCH, or to the current brunch if not specified.

<DONE> abf put -m "commit message"

Commit changes (git commit -am "message") and push (git push origin branch)

abf uploadsrpm SRPM_PATH [GROUP] [-h] [-n NAME] [-d DESCRIPTION]

Create a new project in group GROUP or in your default group and upload the files from srpm file.

-h - makes project hidden.

-n NAME - set the project name. If not specified - get from srpm

-d DESCRIPTION - project description.


abf attach GROUP/PRJ PLAT_TARGET/REPO_TARGET [PLAT_ORIG/REPO_ORIG]

abf detach GROUP/PRJ PLAT_TARGET/REPO_TARGET

Attach the project to the repository, or detach it from repository.

Attaching with PLAT_ORIG/REPO_ORIG will detach project from one repo and attach to another.


For example, two commands:

abf attach import/mc rosa2012lts/contrib abf attach import/mc rosa2012lts/main

equals:

abf move import/mc rosa2012lts/contrib rosa2012lts/main

Workflow

   When you start abf for the first time, it will ask you for your username, 
   password and some other things (if needed), and store it in ~/.abf . Later 
   the password will be stored using python-keyring or python-keyring-kde.
   There will be configuration files for every  in ~/.abf: