Skip to content

Instantly share code, notes, and snippets.

@FelixZhang
Last active June 23, 2023 12:59
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save FelixZhang/e35dd4b2c06e18049d6b544ba8b6110b to your computer and use it in GitHub Desktop.
Save FelixZhang/e35dd4b2c06e18049d6b544ba8b6110b to your computer and use it in GitHub Desktop.
osc cheatsheet

osc cheatsheet

configuration

.oscrc

TBD

aliases

$ alias isc="osc -A https://api.suse.de"

$ alias osc="osc -A https://api.opensuse.org"

commands

help

show usage and commands

$ osc help

show command usage

$ osc help command

query on obs

se, sm: search projects and packages

search a project / package

$ osc se prj

$ osc se pkg

only search in officially maintained projects

$ osc sm pkg

ls: list projects and packages

list all projects

$ osc ls

list packages in prj

$ osc ls prj

list inherited

$ osc ls -e prj

list content of PKG

$ osc ls prj pkg

repos: show build targets

$ osc repos prj

repourls: show URLs of .repo metadata files

$ osc repourls prj

dp: show development project

$ osc dp prj pkg

my: list involvement of yourself (or someone else)

show your involvement

$ osc my prj

$ osc my pkg

$ osc my rq

$ osc my sr

show involvement of user

$ osc my -U user prj

$ osc my -U user pkg

$ osc my -U user rq

$ osc my -U user sr

rq: manipulating requests

show a request

$ osc rq show id

fetch from obs

co: checkout

checkout entire project

$ osc co prj

checkout package

$ osc co prj pkg

checkout a file

$ osc co prj pkg file

bco: branch and checkout

branch a package

$ osc bco prj pkg

branch with customized name

$ osc bco prj pkg home:user:branch

up: update

update project / package of current folder

$ osc up

update project

$ osc up prj

update package

$ osc up prj pkg

getbinaries: get rpms from obs

$ osc getbinaries repo arch

$ osc getbinaries standard x86_64 –debug --source

work locally

log: show log of current package

$ osc log

add, rm, ar: add and remove files

$ osc add [file]

$ osc rm [file]

$ osc ar

vc: prepend a new changelog entry

$ osc vc

pull: pull from parent project (in detached mode)

$ osc pull

resolved: mark a file after it's conflict is resolved

$ osc resolved

st: show status of current pkg

$ osc st

diff: show local diff

show uncommitted modifications

$ osc diff

changes introduced by a revision

$ osc diff -c rev

diff between two revisions

$ osc diff -r rev1:rev2

build: build locally

$ osc build

lbl: show local buildlog

$ osc lbl

chroot: chroot to the build root

$ osc chroot

push to obs

ci: commit to obs

$ osc ci

$ osc ci -m “MSG”

r: show build results

$ osc r

bl: show buildlog on obs

$ osc bl repo arch

blt: only show tail of buildlog

$ osc blt repo arch

rebuild: trigger rebuild on obs

$ osc rebuild

pdiff: diff from parent project

$ osc pdiff

sr: submit request to another project

submit to parent project

$ osc sr

$ osc sr -m "msg"

submit to any project

$ osc sr srcprj pkg dstprj

rdelete: delete remote stuff

delete a remote package

$ osc rdelete prj pkg

delete a remote project

$ osc rdelete prj pkg

@gfigueira
Copy link

revert: restore changed files

$ osc revert [file]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment