wiki:CLI
Last modified 3 years ago Last modified on 10/25/10 20:29:05

Using the bodhi command-line interface

Installing the client

# yum install bodhi-client

Client usage

Usage: bodhi [options] [build...|package]

Command line tool for interacting with Bodhi

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -n, --new             Submit a new update
  -e, --edit            Edit an existing update
  -M, --masher          Display the status of the Masher (releng only)
  -P, --push            Display and push any pending updates (releng only)
  --push-type=PUSH_TYPE
                        Types of updates to push (releng only)
  --push-release=PUSH_RELEASE
                        Types of updates to push (releng only)
  --push-request=PUSH_REQUEST
                        Requests of updates to push (stable or testing)
                        (releng only)
  --push-build=PUSH_BUILD
                        Push a specific builds (releng only)
  --resume-push         Resume an unfinished push (releng only)
  -d, --delete          Delete an update
  --file=INPUT_FILE     Get update details from a file
  -m, --mine            Display a list of your updates
  -C, --candidates      Display a list of your update candidates
  -T, --testable        Display a list of installed updates that you could
                        test and provide feedback for
  -c COMMENT, --comment=COMMENT
                        Comment on an update
  -k [+1|-1], --karma=[+1|-1]
                        Give karma to a specific update (default: 0)
  -R STATE, --request=STATE
                        Request that an action be performed on an update
                        [testing|stable|unpush|obsolete]
  -D UPDATE, --download=UPDATE
                        Download an update
  --critpath            Display a list of pending critical path updates
  --untested            Display a list of untested critical path updates
  -s STATUS, --status=STATUS
                        List [pending|testing|stable|obsolete] updates
  -b BUGS, --bugs=BUGS  Specify any number of Bugzilla IDs (--bugs=1234,5678)
  -r RELEASE, --release=RELEASE
                        Specify a release [F12|F13|F14] (optional)
  -N NOTES, --notes=NOTES
                        Update notes
  -t TYPE, --type=TYPE  Update type [bugfix|security|enhancement|newpackage]
  -u USERNAME, --username=USERNAME
                        Login username for bodhi
  -L LATEST, --latest=LATEST
                        List the latest builds of a specific package across
                        all releases
  --disable-autokarma   Disable karma automatism
  -S STABLEKARMA, --stablekarma=STABLEKARMA
                        Stable karma threshold
  -U UNSTABLEKARMA, --unstablekarma=UNSTABLEKARMA
                        Unstable karma threshold
  -v, --verbose         Show debugging messages
  -l LIMIT, --limit=LIMIT
                        Maximum number of updates to return (default: 60)
  --bodhi-url=BODHI_URL
                        Bodhi url to use for testing purposes (default:
                        https://admin.fedoraproject.org/updates/)

Submitting a new update

$ bodhi --new --type bugfix bodhi-0.4.2-1.fc7
Creating new update for bodhi-0.4.2-1.fc7
Update successfully created
================================================================================
     bodhi-0.4.2-1.fc7
================================================================================
    Release: Fedora 7
     Status: pending
       Type: bugfix
      Karma: 0
    Request: testing
  Submitter: lmacken
  Submitted: 2007-11-12 21:34:02

  http://admin.fedoraproject.org/updates/F7/pending/bodhi-0.4.2-1.fc7

Submitting a new update for multiple builds

$ bodhi --n -t bugfix bodhi-0.4.2-1.fc7,python-fedora-0.2.90.21-1.fc8
Creating new update for bodhi-0.4.2-1.fc7,python-fedora-0.2.90.21-1.fc8
Update successfully created
================================================================================
     bodhi-0.4.2-1.fc7, python-fedora-0.2.90.21-1.fc8
================================================================================
    Release: Fedora 7
     Status: pending
       Type: bugfix
      Karma: 0
    Request: testing
  Submitter: lmacken
  Submitted: 2007-11-12 21:34:02

  http://admin.fedoraproject.org/updates/F7/pending/bodhi-0.4.2-1.fc7,python-fedora-0.2.90.21-1.fc8

Changing the state of an update

Pushing an update to stable

$ bodhi --request stable bodhi-0.4.2-1.fc7
bodhi-0.4.2-1.fc7 has been submitted for stable

Unpushing an update

$ bodhi -R unpush bodhi-0.4.2-1.fc7

Marking an update as obsolete

$ bodhi -R obsolete bodhi-0.4.2-1.fc7

Deleting an update

$ bodhi --delete bodhi-0.4.2-1.fc7
Deleted bodhi-0.4.2-1.fc7

Viewing your update candidates

$ bodhi --candidates
bodhi-0.4.2-1.fc8                        dist-f8-updates-candidate
bodhi-0.4.2-1.fc7                        dist-fc7-updates-candidate
deskbar-applet-2.19.3-4.fc7              dist-fc7-updates-candidate

Viewing what testing updates you have installed

$ bodhi --testable
================================================================================
     mercurial-0.9.5-6.fc8
================================================================================
  Update ID: FEDORA-2007-3164
    Release: Fedora 8
     Status: testing
       Type: enhancement
      Karma: 0
  Submitter: nbecker
  Submitted: 2007-11-10 01:02:37
   Comments: bodhi - 2007-11-10 05:59:33 (karma 0)
             This update has been pushed to testing

  http://admin.fedoraproject.org/updates/F8/FEDORA-2007-3164

Providing feedback for an update

$ bodhi --comment "This is a comment" --karma +1 bodhi-0.4.2-1.fc7
================================================================================
     bodhi-0.4.2-1.fc7
================================================================================
    Release: Fedora 7
     Status: pending
       Type: bugfix
      Karma: 1
    Request: testing
  Submitter: lmacken
  Submitted: 2007-11-12 21:38:12
   Comments: lmacken - 2007-11-12 21:38:46 (karma 1)
             This is a comment

  http://admin.fedoraproject.org/updates/F7/pending/bodhi-0.4.2-1.fc7

Querying updates

View all security updates for Fedora 8

$ bodhi --type security --release F8
 php-Smarty-2.6.20-1.fc8                      security     pending   2008-10-13 
 cups-1.3.9-1.fc8                             security     pending   2008-10-10 
 drupal-5.11-1.fc8                            security     pending   2008-10-09 
 ruby-1.8.6.287-2.fc8                         security     stable    2008-10-09 
 mediawiki-1.13.2-40.99.fc8                   security     stable    2008-10-07 
 libxml2-2.7.1-2.fc8                          security     stable    2008-10-03 
 pam_krb5-2.2.18-2.fc8                        security     stable    2008-10-03 
 squirrelmail-1.4.16-1.fc8                    security     pending   2008-10-01 
 ...

View all updates for a given package

$ bodhi mutt
 mutt-1.5.18-2.fc9                            bugfix       stable    2008-06-16 
 mutt-1.5.18-2.fc8                            bugfix       stable    2008-06-16 
 mutt-1.5.18-1.fc8                            bugfix       obsolete  2008-05-21 
 mutt-1.5.18-1.fc9                            bugfix       obsolete  2008-05-21 
 mutt-1.5.17-2.fc8                            bugfix       stable    2007-12-06 
 mutt-1.5.17-1.fc8                            bugfix       stable    2007-11-16 
6 updates found (6 shown)

View all kernel security updates

$ bodhi --type security kernel

View update by bug number

$ bodhi --bugs 12345

View updates by status

$ bodhi --status testing --release F8

Viewing the latest builds for every tags across all releases

$ bodhi --latest kernel
   dist-f8-updates-testing  kernel-2.6.26.5-28.fc8
           dist-f8-updates  kernel-2.6.26.5-28.fc8
 dist-f8-updates-candidate  kernel-2.6.26.6-39.fc8
 dist-f9-updates-candidate  kernel-2.6.26.6-67.fc9
           dist-f9-updates  kernel-2.6.26.5-45.fc9
   dist-f9-updates-testing  kernel-2.6.26.5-45.fc9