If you did not migrate your account yet, visit https://idp-portal-info.suse.com/
openSUSE:Build Service Git
|This article is being considered for deletion!|
The content of this page is outdated and not referenced in the OBS docu anymore.
Please do not blank, merge, or move this article, or remove this notice. Refer to this article's discussion page and our deletion policy for more information.
Get Build Service Code
Deploy needed parts from github
The Build Service is hosted in the openSUSE github project in multiple repositories:
The following pieces are not officially part of OBS, but may be helpfull for certain tasks:
- yabsc -- A GUI Client, reusing osc libs.
The clone can be done by everyone via the following command. Replace $MODULE for example with osc, build or build-service:
git clone git://github.com/openSUSE/$MOBDULE.git
Some of the repositories incorporate further repos, so you should also run
git submodule init git submodule update
inside of the pulled directory.
Client components, like osc or build will work directly after pulling. To run server components you need to continue to read.
Run webui only
This tutorial explains step by step how to check out the webui code, how to get it running locally, and how to contribute back source code changes to the main project.
Run the entire server
Example git commands for developers
Some useful settings that get written to your ~/.gitconfig:
git config --global branch.master.merge refs/heads/master git config --global branch.master.remote origin
git config --global user.name "FirstName LastName" git config --global user.email "email@example.com"
Some example commands to work on the code. Local commits even work when you have no push rights.
git clone git://github.com/openSUSE/osc.git cd osc ./osc-wrapper.py -h
Checkout read/write (needs ssh-key uploaded):
git clone firstname.lastname@example.org/openSUSE/osc.git
Commit to your repository:
git commit -a # -a for all files
Upload your changes (needs remote write access):
Show the last commit:
git show HEAD
Show all branches:
coolo@desdemona#osc>git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/jw remotes/origin/master
Checkout a branch (first time):
# note that this is all locally, no server contacted git checkout -t origin/jw
Switch between branches:
# all inplace git checkout master git checkout jw
Merge another branch (the short way):
git merge origin/master
Merge another branch (the long way):
coolo@desdemona#osc>git merge origin/jw Auto-merging NEWS CONFLICT (content): Merge conflict in NEWS coolo@desdemona#osc>eclipse NEWS coolo@desdemona#osc>git diff NEWS # see diffs against merge point coolo@desdemona#osc>git add NEWS # mark as resolved coolo@desdemona#osc>git commit # commit manual merge
Note the "origin", every remote repository has a name. There can be more than one. As you can clone repositories, you can also register more than one repository "clone" and then merge the changes locally in your repository and push it to a 3rd repository - as I said in the beginning: git is powerful and complex. So start with simple things and get used to the commands. You can also clone the repositories on gitorious and play around as much as you like in those clones - they can be discarded in a second if something went wrong :)
git diff questions
- how do I make sure, I do not revert a fix in origin/master?
- Should not happen unless you explicitly do git revert.
- diff point of my last merge with current branch head
- git diff abcdef1234 using the commit id of last merge from git log
- diff point of my last merge with origin/master head
- git diff abcdef1234..origin/master using the commit id of last merge from git log
- diff current branch head against current origin/master head
- just git diff origin/master