Difference between revisions of "ABF Console Client"

From Rosalab Wiki
Jump to: navigation, search
(Feature List)
Line 17: Line 17:
  
 
Here is the list of the proposed features.
 
Here is the list of the proposed features.
 
    '''1)''' Set up default ABF user, project group and branch. So it should be enough
 
    to get working git copy with command like:
 
   
 
    abfsys get [project]
 
 
      
 
      
    (git clone https://[user]@abf.rosalinux.ru/import/[project].git
+
=== abfsys get PROJECT [-b BRANCH] ===
    git checkout [branch] (if exists) )
+
  
    '''2)''' Set up default target for build submission. So it should work like:
+
clone git repository, [checkout a branch or tag]
   
+
    abfsys build
+
   
+
    (build current project for default distribution from proper git branch;
+
    for example, build from latest_rosa2012.1 branch to rosa2012.1/main)
+
   
+
    And non-default target:
+
   
+
    abfsys build [-t target] (target: rosa2012lts, rosa2012.1 etc)
+
   
+
    To automatically checkout project, cd to the directory, checkout branch and
+
    build to the correcponding target platform, you can use:
+
   
+
    abfsys build [package] -t [target]
+
  
    '''3)''' Check and cleanup package sources and patches using current spec as base.
+
=== abfsys build [PROJECT] [-t PLATFORM] [-b BRANCH] [-p]===
   
+
    abfsys sync
+
   
+
    (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)
+
  
    '''4)''' Copy latest version of specified branch to current(1) or another(2).
+
Without parameters - build current project for default distribution from proper git branch; For example, build from latest_rosa2012.1 branch to rosa2012.1/main)
    Like:
+
   
+
    abfsys backport import_cooker (1)
+
    abfsys backport import_cooker rosa2012lts (2)
+
  
    '''5)''' Push changes to git with commit
+
With PROJECT - select the project to operate on.
   
+
    abfsys put -m "commit message"
+
   
+
    (git commit -m "message", then git push or git push origin [branch])
+
  
 +
With BRANCH- build the project from that branch.
  
    '''6)''' move/attach from one platform repo to another
+
With PLATFORM - build the project to that platform.
 +
 
 +
If something is not specified - resolve it automatically. For example,
 +
 
 +
''abfsys build mock-urpm -t rosa2012lts''
 +
 
 +
will build mock-urpm from branch latest_rosa2012lts.
 +
 
 +
With -p - automatic publishing.
 +
 
 +
=== abfsys 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)
 +
 
 +
=== abfsys backpor SRC_BRANCH [DST_BRANCH] ===
 +
 
 +
Copy all the files from SRC_BRANCH to DST_BRANCH, or to the current brunch if not specified.
 +
 
 +
=== abfsys put -m "commit message" ===
 +
 
 +
Commit changes (git commit -am "message") and push (git push origin branch)
 +
 
 +
=== abfsys 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.
 +
 
 +
 
 +
=== abfsys attach GROUP/PRJ PLAT_TARGET/REPO_TARGET [PLAT_ORIG/REPO_ORIG]===
 +
=== abfsys 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.
 +
 
 
      
 
      
    abfsys attach groupname/projectname platform/repo
+
For example, two commands:
    abfsys attach groupname/projectname platformorig/repoorig platformtarget/repotarget
+
 
   
+
'''abfsys attach import/mc rosa2012lts/contrib'''
    for example
+
'''abfsys attach import/mc rosa2012lts/main'''
   
+
    abfsys attach import/mc rosa2012lts/main
+
   
+
    abfsys move import/mc rosa2012lts/main rosa2012lts/contrib
+
  
 +
equals:
  
    '''7)''' importing project from src.rpm
+
'''abfsys move import/mc rosa2012lts/contrib rosa2012lts/main'''
    abfsys upload XXX.src.rpm <groupname> <opened/closed status>
+
    abdsys upload mc.src.rpm import opened
+
  
 
= Workflow =
 
= Workflow =

Revision as of 13:48, 6 September 2012

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.

Naming

The name of the tool is not defined yet. You can write you ideas here.

Possible variants:

  1. abfsys
  2. abfcc
  3. ... (add here)

Feature List

Here is the list of the proposed features.

abfsys get PROJECT [-b BRANCH]

clone git repository, [checkout a branch or tag]

abfsys build [PROJECT] [-t PLATFORM] [-b BRANCH] [-p]

Without parameters - build current project for default distribution from proper git branch; For example, build from latest_rosa2012.1 branch to rosa2012.1/main)

With PROJECT - select the project to operate on.

With BRANCH- build the project from that branch.

With PLATFORM - build the project to that platform.

If something is not specified - resolve it automatically. For example,

abfsys build mock-urpm -t rosa2012lts

will build mock-urpm from branch latest_rosa2012lts.

With -p - automatic publishing.

abfsys 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)

abfsys backpor SRC_BRANCH [DST_BRANCH]

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

abfsys put -m "commit message"

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

abfsys 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.


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

abfsys 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:

abfsys attach import/mc rosa2012lts/contrib abfsys attach import/mc rosa2012lts/main

equals:

abfsys move import/mc rosa2012lts/contrib rosa2012lts/main

Workflow

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