As a qemu developer of SUSE and openSUSE, I would like to share some information about maintaining the QEMU package, so you could join us to maintain it together. 

Qemu is probably the second most complicated package in Linux, just less than the kernel, we have three packages together, qemu, qemu-linux-user and qemu-testsuites. And we have different versions to maintain, such as SLE11SP4, SLE12, SLE12SP1-4, SLE15,SLE15SP1-SP3, OpenSUSE tumbleweed and openSUSE 15.1-15.3 and tumbleweed. So make sure which of them needs to be fixed, and forget anyone, sometimes you may need to apply for all of them.

Since SUSE has its own OBS package build system, so we actually have two sections for normal maintenance work. Github(openSUSE) or Gitlab(SUSE) control our source code and OBS/IBS repository for the package.

1. Make sure what you want to do:

1) Bug fixes

Easy, just apply your patch to the repo, write a clear changelog file, do a fair decent test, then you just send out the SR, and you are good to go.

2) Version upgrade

This is usually be done by a senior maintainer or developer. Need start from a new branch of upstream, and then backport downstream patches, remove those already merged, and fix those conflict ones, after sending your SR and a clean changelog file, you are good to go.

3) Some change about maintaining itself or some code about ROMs, nothing related with qemu source code

you can go to obs/ibs package directly, no need to work with git.

 

So, let us start from an example: 

1. Find the branch you want to update,

git checkout SLE12-SP2 -b b-***

2. Apply your patch

1) Cherry-pick from upstream

add below in your git log file

    (cherry picked from commit 2bd3f8998e1e7dcd9afc29fab252fb9936f9e956)
    [LY: BSC#1121600]
    Signed-off-by: Liang Yan <lyan@suse.com>

2) A downstream patch was written by yourself

We usually encourage people to the public to the upstream first, we will be really careful about those maintain.

3. Go to ibs/obs server and find the right branch, we use obs as an example

https://build.opensuse.org/package/show/Virtualization/qemu

4. Make a branch package in your local repository:

osc co Virtualization/qemu

then you will get a local one:

home:lyan:branches:Virtualization/qemu

make sure to do all your dirty work in your workshop, :)

5. Our developer wrote a script to make things issue for you

osc update #make sure you are in the latest status

bash update_git.sh # this will pick up your commit from Github and create a patch automatically for you, even modify spec file for you

4. Write your changelog file, write proper comments to let people understand your changes.

Since there are three packages together here, qemu qemu-linux-user qemu-testsuits, there will be three spec files and changelog files, so make sure what part of the change you made, usually qemu and qemu-testsuits are identical, so "bash pre_stack.sh" will do the work for you. If the code is all about qemu-linux-user, make sure to write explain comment in qemu-linux-user.changelog, leave bug number in qemu.changelog, otherwise, write clean information in qemu.spec file but leave qemu-linux-user.changelog alone

5. Send an SR source request

osc sr -m "comments"

you may get some feedback about re-modification, be patient, and change it properly. 

6.  do not forget your git repo, remember to push back your change to the main git repo

git push

 

Daa..., everything is done here, you can take your reward and rest, :)