User:Olh

Jump to: navigation, search

How to maintain the qemu package in the buildservice

The qemu package is maintained in a buildservice project, the patches
which get applied on top of the base version are maintained in an
expanded source tree. See update_git.sh for the URL of the git repo and
the branch name within that git repo. The basic workflow is like this:

  - branch the qemu pkg in the buildservice
  - clone the qemu repo mentioned in update_git.sh
  - commit changes to the cloned git repo
  - update the branched qemu pkg with update_git.sh
  - submit the branched qemu pkg to the devel repo
  - once the submit request got accepted push changes to the git repo

Detailed step by step instructions, OBS username is assumed to be "olh".
1. Prepare work environment
2. Apply a new patch
3. Update an existing patch
4. Remove an existing patch
5. Rebase to a new qemu release candidate
6. Upgrade to a new qemu branch

1. Prepare
# USR=olh
# GIT=qemu-opensuse
# BRANCH=opensuse-2.6
# TAG=v2.6.0-rc3
#
# mkdir ~/git/${GIT}
# pushd ~/git/${GIT}
# git init
# git remote add --tags -f upstream git://git.qemu-project.org/qemu.git
# git remote add        -f github   git://github.com/openSUSE/qemu.git
# git remote add        -f w_github git@github.com:openSUSE/qemu.git
# git fetch --all
# git checkout -b ${BRANCH} github/${BRANCH}


2. Apply
# osc bco qemu
# pushd home:${USR}:branches:Virtualization/qemu
# osc up -u
# pushd ~/git/${GIT}  
# git am < ~/qemu.patch
# popd
# bash update_git.sh  
# osc st
# osc commit
# osc sr
#
# osc rq accept <RQ_id>
# pushd ~/git/${GIT}  
# git push ${BRANCH} w_github


3. Update
# osc bco qemu
# pushd home:${USR}:branches:Virtualization/qemu
# osc up -u
# pushd ~/git/${GIT}  
# git rebase -i ${TAG}
#  # for the patch in question, replace the 'pick' command with 'edit'
#  # rebase will stop at the given patch
#  # adjust files as needed
#  # use 'git add $file' to readd modified files to the patch
#  # use 'git commit --amend' to update the patch
#  # use 'git rebase --continue' to proceed
#  # in case of conflicts in later patches, resolve and use 'git add $file'
# popd
# bash update_git.sh  
# osc st
# osc commit
# osc sr
#
# osc rq accept <RQ_id>
# pushd ~/git/${GIT}  
# git push ${BRANCH} w_github


4. Remove
# osc bco qemu
# pushd home:${USR}:branches:Virtualization/qemu
# osc up -u
# pushd ~/git/${GIT}  
# git rebase -i ${TAG}
#  # for the patch in question, remove the entire line with 'pick'
#  # in case of conflicts in later patches, resolve and use 'git add $file'
#  # use 'git rebase --continue' to proceed
# popd
# bash update_git.sh  
# osc st
# osc commit
# osc sr
#
# osc rq accept <RQ_id>
# pushd ~/git/${GIT}  
# git push ${BRANCH} w_github


5. Rebase
# osc bco qemu
# pushd home:${USR}:branches:Virtualization/qemu
# osc up -u
# pushd ~/git/${GIT}  
# git rebase -i ${TAG}
#  # in case of conflicts in patches, resolve and use 'git add $file'
#  # use 'git rebase --continue' to proceed
# popd
# bash update_git.sh  
# osc st
# osc commit
# osc sr
#
# osc rq accept <RQ_id>
# pushd ~/git/${GIT}  
# git push ${BRANCH} w_github


6. Upgrade
# osc bco qemu
# pushd home:${USR}:branches:Virtualization/qemu
# osc up -u
# pushd ~/git/${GIT}  
# git checkout -b opensuse-2.6 github/opensuse-2.5
# git rebase -i v2.6.0-rc0
#  # in case of conflicts in patches, resolve and use 'git add $file'
#  # use 'git rebase --continue' to proceed
# popd
# # adjust TAG and BRANCH in update_git.sh
# bash update_git.sh  
# osc st
# osc commit
# osc sr
#
# osc rq accept <RQ_id>
# pushd ~/git/${GIT}  
# git push opensuse-2.6 w_github






# vim: tw=72 ts=2 shiftwidth=2 et