This small cheat sheet has been created by me after duing the OBS training with mpluskal. Hope it is of help to anybody that is starting with obs :-)
First, let's set some aliases for the shell
$ vim ~/.bashrc
alias osc="osc --apiurl=https://api.opensuse.org"
alias oscb="osc build --ccache --cpio-bulk-download --download-api-only "
alias oscsd="osc service localrun download_files"
And configure aliases for osc as well
$ vim ~/.oscrc
build-jobs = 4 # value for buildjobs
extra-pkgs = vim gdb strace mc less unzip # some tools
no_verify = 1 # local verification only
[https://api.opensuse.org]
user = grisu48
aliases = obs
The most important of all commands
osc help COMMAND
# Search for project and/or package
osc search 'search term'
--description search for matches in the 'description' element
--title search for matches in the 'title' element
--project search for a project
--package search for a package
-s, --substring Show also results where the search term is a substring (slower search)
--binary search binary packages
--csv generate output in CSV (separated by |)
-i, --involved show projects/packages where given person (or myself) is involved as bugowner or maintainer
-V, --version show package version, revision, and srcmd5. CAUTION: Slow and unreliable
-v, --verbose show more information
--repos-baseurl show base URLs of download repositories
# Search for maintained status (i.e. if a package is in a flavour)
osc maintained PACKAGE
osc sm PACKAGE
# Branch ("fork") existing project
osc branch SOURCEPROJECT SOURCEPACKAGE [TARGETPROJECT] [TARGETPACKAG]
# Checkout
osc co PROJECT [PACKAGE] [FILE]
# Mark files to be added on next checkin
# URL will be downloaded
osc add URL|FILE
# Mark files as deleted on next checkin
osc rm FILE
# Delete project/packages on server
osc rdelete PROJECT [PACKAGES]
# Checkin ("commit")
osc ci
# Remove untracked files from current local repo
osc clean
# Edit the changes file
osc vc [-m MESSAGE]
# Local build
oscb
# Set alias oscb='osc build --ccache --cpio-bulk-download --download-api-only'
# Re-trigger remote builds (happens after each checkin)
osc rebuild
# Show the build results
osc r
osc results PROJECT [PACKAGE]
-w, --watch watch the results until all finished building
# Show build log
osc bl
osc blt - show only tail of buildlog
# Create request to submit source into another Project
osc sr [OPTIONS]
osc submitreq [OPTIONS] DESTPRJ [DESTPKG]
osc submitreq [OPTIONS] SOURCEPRJ SOURCEPKG DESTPRJ [DESTPKG]
--cleanup remove package if submission gets accepted (default for home:<id>:branch projects)
-d, --diff show diff only instead of creating the actual request
Let's update tar
osc co Base:System/tar # Checkout
cd Base:System/tar
vim tar.spec # << Apply our edits and stuff
osc vc # << ChangeLog
oscb # Build locally (test if it builds before pushing)
osc ci # Checkin ("commit & push")
osc r -w
If you want to push your changes to the original repo, create a submit request
osc sr
# Update package meta information from a specfile
osc updatepacmetafromspec