SlideShare a Scribd company logo
Develop and Maintain a Distro with
              Open Build Service


                      Gary Lin
                      Software Engineer, SUSE Labs
                      glin@suse.com
Open Build Service?



Open Build Service (OBS) is an open source
project initiated by SUSE to create a generic
build system to build and distribute packages
from sources in an automatic, consistent and
reproducible way.
Basic Idea


Source code




Patches                    Package
                   OBS      (RPM,
                           DEB, ...)

Changelog


 Whatever
Supported Distributions
Supported Architectures

●   i586
●   x86-64
●   PowerPC 32
●   PowerPC 64
●   IA64
●   ARMv7
●   ARMv5
How OBS works
Project and Package

●   Project
    –   Each project contains the resources needed to build
        one or more packages.
    –   These resources include source archives, patch files,
        spec files, etc.
    –   The project defines the build architectures and the
        general settings.
●   Package
    –   The packages are the build targets of the project.
    –   The package format could be any supported output
        format, e.g. RPM or DEB.
Frontend – Web UI
Frontend - Commandline
Frontend to Backend

Frontend Requests


   Create a package/project


    Query packages/projects


    Check in/modify sources
                              Backend
                              Servers
       Delete a package
              ...




        Submit changes
Backend Components

          scheduler              scheduler                  publish
            i586                  x86_64

      s                      job descriptions
   nt
eve
                    dispatcher                          srcserver                    publisher
                                                                                 s
                                                rce
                                                   s                       ck age
                    jobs                     sou                      pa

                                                                                     download
                      worker                            rep server
                                                                                      server
           warden




                                      dep packages




                                                                      signer
                           ...




                                                            ...




                                                                                        ...
                                        build results                                download
                      worker                            rep server
                                                                                      server
Collaboration
branch
  Project A               home:userA:branches:ProjectA

 Project Settings
 Project Settings                Project Settings
                                 Project Settings

Build Architectures
Build Architectures             Build Architectures
                                Build Architectures




    Package
    Package                         (Package)




                                       Diff
                                       Diff
submitrequest

Project A           home:userA:branches:ProjectA




 Package
 Package                      Package




   Diff
   Diff                         Diff
                                Diff
Real-life case: openSUSE
Current Release

●   All packages are in the release project and the
    update project, e.g. openSUSE:12.1 and
    openSUSE:12.1:Update.
●   Each package update must be reviewed by
    the maintenance team and then be submitted
    to the update project.
●   In general, every update has to be tracked by
    a bugzilla entry.
Maintenance Process



openSUSE 12.1:Update
 openSUSE 12.1:Update              openSUSE:Maintenance:IDXXX
                                    openSUSE:Maintenance:IDXXX
            packageA               patchInfo          packageA

                        m
                         br                      mr
                           an
                              ch

                                       home:userA:branches:
                                        home:userA:branches:
   openSUSE 12.1
    openSUSE 12.1                     openSUSE:12.1:Update
                                       openSUSE:12.1:Update
            packageA               patchInfo          packageA
Next Release

●   The packages for the next release are in the
    “factory” project, e.g. openSUSE:Factory.
●   All developments are happened in the “devel”
    projects.
●   The package updates are reviewed by the
    devel project maintainers.
●   Any modification is allowed as long as the
    maintainer agrees.
openSUSE Factory
Next Release


                            openSUSE:Factory
                             openSUSE:Factory



Devel Projects



         Base:System
         Base:System   Gnome:Factory
                       Gnome:Factory        Gnome:Apps
                                            Gnome:Apps         X11:XOrg
                                                               X11:XOrg
                                                         ...


User Branches                          sr
                   branch

                               home:userA:branches:
                                home:userA:branches:
                                  Gnome:Factory
                                   Gnome:Factory
Try it!




openSUSE Build Service
http://build.opensuse.org
Questions?
Thank You!
References

Open Build System
http://www.open-build-service.org/

Build system comparison
http://en.opensuse.org/openSUSE:Build_Service_comparison

Build Service Backend Key Components
http://en.opensuse.org/openSUSE:Build_Service_Backend_Key_Components

openSUSE Build System
https://build.opensuse.org/

openSUSE Maintenance Setup
http://doc.opensuse.org/products/draft/OBS/obs-reference-guide_draft/cha.obs.maintenance_setup.html
Backup Slides
Other Build Systems

●   Fedora “Koji”
●   Ubuntu “Launchpad”
●   Mandriva Build System
●   Project Build
●   Build Bot
●   Poky
Comparison
       Name         Multi-      Build for other Package formats Create Images
                 Architecture    distributions

Fedora Koji           N              N        rpm                    Y

Ubuntu
                      Y              N        deb                    N
Launchpad

Mandriva Build
                      Y              N        rpm                  TODO
System
                                              deb, rpm, ebuild,
Project Build         Y              Y                               N
                                              pkg

Build Bot             Y              N        N/A                    N

Poky                  Y              N        rpm, deb, ipg, tgz     Y

Open Build                                    rpm, deb, tgz,
                      Y              Y                               Y
Service                                       exe[*]
* experimental
Package Build

 Build Server             Local Build

   Sources
   Sources                   Sources
                             Sources


Dependencies
Dependencies             Dependencies
                         Dependencies


Base Packages
Base Packages            Base Packages
                         Base Packages


Base System
Base System                  chroot
                              chroot


    qemu
     qemu
copypac

Project A             Project B




 Package
 Package               Package
                       Package



                       Change
linkpac

Project A             Project B




 Package
 Package               (Package)




                          Diff
                          Diff
Tumbleweed

●   Tumbleweed is a project based on the current
    release and the “stable” projects.
●   Tumbleweed is initiated and maintained by
    Greg KH.
Tumbleweed

Tumbleweed


                        openSUSE:Tumbleweed
                         openSUSE:Tumbleweed




Stable Projects                                        Current Release



Gnome:Stable:3.2 KDE:Release:48 ...
Gnome:Stable:3.2 KDE:Release:48       Virtualization
                                      Virtualization   openSUSE:12.1
                                                        openSUSE:12.1

More Related Content

Develop and Maintain a Distro with Open Build Service

  • 1. Develop and Maintain a Distro with Open Build Service Gary Lin Software Engineer, SUSE Labs glin@suse.com
  • 2. Open Build Service? Open Build Service (OBS) is an open source project initiated by SUSE to create a generic build system to build and distribute packages from sources in an automatic, consistent and reproducible way.
  • 3. Basic Idea Source code Patches Package OBS (RPM, DEB, ...) Changelog Whatever
  • 5. Supported Architectures ● i586 ● x86-64 ● PowerPC 32 ● PowerPC 64 ● IA64 ● ARMv7 ● ARMv5
  • 7. Project and Package ● Project – Each project contains the resources needed to build one or more packages. – These resources include source archives, patch files, spec files, etc. – The project defines the build architectures and the general settings. ● Package – The packages are the build targets of the project. – The package format could be any supported output format, e.g. RPM or DEB.
  • 10. Frontend to Backend Frontend Requests Create a package/project Query packages/projects Check in/modify sources Backend Servers Delete a package ... Submit changes
  • 11. Backend Components scheduler scheduler publish i586 x86_64 s job descriptions nt eve dispatcher srcserver publisher s rce s ck age jobs sou pa download worker rep server server warden dep packages signer ... ... ... build results download worker rep server server
  • 13. branch Project A home:userA:branches:ProjectA Project Settings Project Settings Project Settings Project Settings Build Architectures Build Architectures Build Architectures Build Architectures Package Package (Package) Diff Diff
  • 14. submitrequest Project A home:userA:branches:ProjectA Package Package Package Diff Diff Diff Diff
  • 16. Current Release ● All packages are in the release project and the update project, e.g. openSUSE:12.1 and openSUSE:12.1:Update. ● Each package update must be reviewed by the maintenance team and then be submitted to the update project. ● In general, every update has to be tracked by a bugzilla entry.
  • 17. Maintenance Process openSUSE 12.1:Update openSUSE 12.1:Update openSUSE:Maintenance:IDXXX openSUSE:Maintenance:IDXXX packageA patchInfo packageA m br mr an ch home:userA:branches: home:userA:branches: openSUSE 12.1 openSUSE 12.1 openSUSE:12.1:Update openSUSE:12.1:Update packageA patchInfo packageA
  • 18. Next Release ● The packages for the next release are in the “factory” project, e.g. openSUSE:Factory. ● All developments are happened in the “devel” projects. ● The package updates are reviewed by the devel project maintainers. ● Any modification is allowed as long as the maintainer agrees.
  • 19. openSUSE Factory Next Release openSUSE:Factory openSUSE:Factory Devel Projects Base:System Base:System Gnome:Factory Gnome:Factory Gnome:Apps Gnome:Apps X11:XOrg X11:XOrg ... User Branches sr branch home:userA:branches: home:userA:branches: Gnome:Factory Gnome:Factory
  • 20. Try it! openSUSE Build Service http://build.opensuse.org
  • 23. References Open Build System http://www.open-build-service.org/ Build system comparison http://en.opensuse.org/openSUSE:Build_Service_comparison Build Service Backend Key Components http://en.opensuse.org/openSUSE:Build_Service_Backend_Key_Components openSUSE Build System https://build.opensuse.org/ openSUSE Maintenance Setup http://doc.opensuse.org/products/draft/OBS/obs-reference-guide_draft/cha.obs.maintenance_setup.html
  • 25. Other Build Systems ● Fedora “Koji” ● Ubuntu “Launchpad” ● Mandriva Build System ● Project Build ● Build Bot ● Poky
  • 26. Comparison Name Multi- Build for other Package formats Create Images Architecture distributions Fedora Koji N N rpm Y Ubuntu Y N deb N Launchpad Mandriva Build Y N rpm TODO System deb, rpm, ebuild, Project Build Y Y N pkg Build Bot Y N N/A N Poky Y N rpm, deb, ipg, tgz Y Open Build rpm, deb, tgz, Y Y Y Service exe[*] * experimental
  • 27. Package Build Build Server Local Build Sources Sources Sources Sources Dependencies Dependencies Dependencies Dependencies Base Packages Base Packages Base Packages Base Packages Base System Base System chroot chroot qemu qemu
  • 28. copypac Project A Project B Package Package Package Package Change
  • 29. linkpac Project A Project B Package Package (Package) Diff Diff
  • 30. Tumbleweed ● Tumbleweed is a project based on the current release and the “stable” projects. ● Tumbleweed is initiated and maintained by Greg KH.
  • 31. Tumbleweed Tumbleweed openSUSE:Tumbleweed openSUSE:Tumbleweed Stable Projects Current Release Gnome:Stable:3.2 KDE:Release:48 ... Gnome:Stable:3.2 KDE:Release:48 Virtualization Virtualization openSUSE:12.1 openSUSE:12.1