This wiki was updated to MediaWiki 1.37. If you notice any issues, please report them to admin[at]

openSUSE:Fixing bugs

Jump to: navigation, search
Everybody can improve the openSUSE distribution with fixing bugs in packages. Packages might have quite some bugs and many of them are easy to fix. This page describes the steps you need to take to fix a bug in a package!
Note: The following might not be detailed enough for new packagers and needs some more explanation. See also openSUSE:Build_Service_Tutorial - openSUSE:Package maintenance

See the links above for more information about handling bugs. For documentation about packaging read the Packaging documentation!

Workflow: how to fix a bug in a package

package = name of the package you want to work on

  • Create your own branch you will work on
    osc branch openSUSE:Factory package
  • Checkout the sources
    osc co home:login:branches:project/package
  • Get to the right directory ;-)
    cd home:login:branches:project/package
  • If you need to patch anything, quilt may be useful
    • Unpack source
      quilt setup package.spec
    • Get to the right directory again ;-)
      cd unpacked_package_directory
    • Apply all existing patches
      quilt push -a
    • Create new patch
      quilt new package-version-brief-description.patch
    • Add files to be modified
      quilt add file
    • Modify files (this and the previous task could be done together with quilt edit file)
    • Create final patch
      quilt refresh -p0 package-version-brief-description.patch
  • Add the patch to the package.spec file using your editor
    • If there are other Patch files already referenced add your patch on the next line as PatchX: package-version-brief-description.patch where X is 1 number higher then the previous patch.
    • If there are no other patch files in the package.spec file after the last SourceX: line add Patch0: package-version-brief-description.patch
    • after %setup add %patchX -pN where X is the patch number you specified above and N is the -p number you specified above.
  • Do a test build osc build
  • Don't forget to mark all new patches and add entry to the .changes file using osc vc. Be sure to mention the bug in this format: 'boo#1234' so OBS can parse the bug refrence.
  • After fixing everything and reporting things upstream, all that is left is to submit the changes to the build service:
    • run first - only if you added or removed files
      osc addremove
    • then commit the changes
      osc commit
    • and send a submit request to the maintainer
      osc sr -m 'Fixed bug #1234'
  • And of course report to the bugzilla that bug is fixed in request
    • Something like "Fix sent as sr#456, reported upstream"
  • After acceptance, maintainer reassign bug report to the community member who actually fixed the bug