Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
openSUSE.org Build ServiceMaintain One Source for all Linux Platforms
Adrian Schröter [email protected]
Klaas [email protected]
© Novell Inc. All rights reserved
2
Challenges
• Open source communities provide lots of source code, but building & installation is often hard for unexperienced users.
• User challenges:
– Find additional software
– Judge about the quality and trust of provided software
– Find developer to give feedback
• Developer challenges:
– Maintain sources for different target platforms
– Maintain patches during upstream updates
– Integrate contributions
– No version updates for released distributions
– Deal with differences on various distributions
© Novell Inc. All rights reserved
3
Goals of the Build Service
• Make it simple to provide binary packages of software
• Support the “Release early, Release often” approach
• Involve and connect the open source communities
• Make it easy and secure to install new software
•
• Open the openSUSE distribution development
© Novell Inc. All rights reserved
4
What Does it Do ?
OBSdeveloperinterface
End-Userinterface
Software:•Packages•Solution Stacks•Distribution Images
Feedback:•Download Numbers•Votes•Bug reports
QA checks
Modifications
(upstream)Sources
Distributiondefinition
DownloadSoftware
Find out how well maintained
or trustable
Findnew/exciting
stuff
Upgradesoftware
© Novell Inc. All rights reserved
5
What is the Build Service ?
• Infrastructure
– Software search interface
– Build systems to create packages
– Download and mirror infrastructure for packages
– Collaboration framework
• Tools
– Tools are used for local operations on the workstation or for
remote operations on the Build Service server.
© Novell Inc. All rights reserved
6
The Open Design of the Build Service
• Everyone is able to use the Build Service.
• The Build Service is 100% free software (GPL).
• The Build Service provides a public API.
• Multiple Build Service instances can get connected
• The Build Service can be integrated into existing tools.
• The Build Service is not limited to openSUSE.
• Integration with existing web pages is possible.
© Novell Inc. All rights reserved
7
Components Overview
Web ClientCommand
LineClient
Installer(YaST,etc.)
openSUSE API
Frontend
Storage
BuildHost
MirrorInterface
BuildHost
BuildHost
BuildHost
BuildHost
BuildHost
Backend
Software search &installationWeb client
© Novell Inc. All rights reserved
8
Backend
• Building Packages
• Storage for sources (version controlled)
• Farm of build hosts for building packages
• Run build in specified environment
• Build for multiple hardware architectures (currently i586, x86_64)
• Storage for built packages
• Provide build status and logs
© Novell Inc. All rights reserved
9
BinaryServer
Scheduler
Build Process Implementation
SourceServer
API
Build job pool Dispatcher
Build JobWorkers
•Build script•KIWI•...
FtpServer
Publisher• Repo generation
© Novell Inc. All rights reserved
10
Software Search and Installation
• Software can be– Package (deb or rpm)
– Solution Stack (aka patterns)
– Images (for example Lime JeOS, Live CD, Installation DVD)
– More can be supported in future
• http://software.opensuse.org/search/
• “1-Click” Installation on openSUSE
© Novell Inc. All rights reserved
11
Client Tools
• User Interface for Developers and Packagers
• Web Client– Easy browsing and project administration
– Editing and uploading of sources
– Downloading of built packages
• Command Line Client– Editing and uploading of sources
– Start local build for debugging
© Novell Inc. All rights reserved
12
Notifications (WIP)
• You decide which messages when and how!
Project Model
© Novell Inc. All rights reserved
14
Project Model 1/2
• A project is a workspace which can be created by any
user. It may contain:
– A list of users with write access to it
– Sources or a description how to download them
– Link to existing sources to be built in a different enviroment
– Changes for existing packages
– A list of build targets to build binary packages for
• The result will be one or more package repositories.
© Novell Inc. All rights reserved
15
Project Model 2/2
•
KDE 4 Projectqt
kdelibskdebasekdepim
...
amaroK HEAD Project
amaroK
DebianSL 10.1 SL Factory klik image?
© Novell Inc. All rights reserved
16
Trust Model
• The Build Service does guarantee that the binary package got build from the sources, but it can't judge about the sources itself.
• Everyone can submit source, this causes a potential security problem.
• The decision to trust a package or not is up to the end-user.
• The trust level of a project depends on the trust level of its contributors.
This is currently researched by Marko Jung <[email protected]>
Collaboration
© Novell Inc. All rights reserved
18
Collaboration Features
Project or package owners can grant write access to others. This is the fastest way to collaborate for a group working close together. However this works not in all cases:
• Unknown contributors have no write access.
• Trust is decreased to the person of lowest trust.
• Even people with write access might want a review of their changes before checkin.
• All people with write access can trigger or block package build of others.
© Novell Inc. All rights reserved
19
High Level Distribution Build Process
Definedand
reviewedsources
ExternalCommunities
Sources
Configuration• External Sources• Package selections• Media configs• Translations• Build time checks
Buildpackages
Distribution• ftp tree• iso images• Lived Medias• Driver Kit •...
Release
QA• Consistency checks• Runtime tests• Manual Tests
© Novell Inc. All rights reserved
20
Factory Source Submissions
openSUSE:Factory
gcc Package
devel project: home:matz:Factory
home:matz:factory
© Novell Inc. All rights reserved
21
Factory Source Submissions
openSUSE:Factory
gcc Package
devel project: home:matz:Factory
home:matz:factory
gcc Package
may exist, maybe as source link toopenSUSE:Factory with changes.
© Novell Inc. All rights reserved
22
Factory Source Submissions
openSUSE:Factory
gcc Package
devel project: home:matz:Factory
home:matz:factory
gcc Package
may exist, maybe as source link toopenSUSE:Factory with changes.
home:somebody(wants to “edit Factory gcc”)
gcc Package
Got expanded sources from home:matz:factory.
OBS stored his changes on server.
© Novell Inc. All rights reserved
23
Factory Source Submissions
openSUSE:Factory
gcc Package
devel project: home:matz:Factory
home:matz:factory
gcc Package
may exist, maybe as source link toopenSUSE:Factory with changes.
home:somebody(wants to “edit Factory gcc”)
gcc Package
Got expanded sources from home:matz:factory.
OBS stored his changes on server.
SubmitRequest
© Novell Inc. All rights reserved
24
Factory Source Submissions
openSUSE:Factory
gcc Package
devel project: home:matz:Factory
home:matz:factory
gcc Package
Matz accepted changes, the OBSmerged the changes.
home:somebody(wants to “edit Factory gcc”)
© Novell Inc. All rights reserved
25
Factory Source Submissions
openSUSE:Factory
gcc Package
devel project: home:matz:Factory
home:matz:factory
gcc Package
Matz asks to copy all changesinto openSUSE:Factory
home:somebody(wants to “edit Factory gcc”)
SubmitRequest
© Novell Inc. All rights reserved
26
Collaboration Improvements
•Submissions can come via the OBS instead via bugzilla only
•Maintainers can see build success or failure before merged into project
•Extended responsibility for the contributor until acceptance of changes
•Transparent responsibilities and contributor log
© Novell Inc. All rights reserved
27
Next steps
• We prepare “best practice” examples and Documentation during “1.0” development.http://en.opensuse.org/Build_Service/Collaboration
• Participation and feedback is explicitly welcome!
• Create your home account and join us.
© Novell Inc. All rights reserved
28
What is missing ?
•Internal STABLE checkin tool based on submissions from OBS •Branch command in api.o.o and osc
•Factory ftp tree generation with OBS
•Lots of small improvements to make it nice usable. This depends on feedback :)
Advanced Packaging
© Novell Inc. All rights reserved
30
Setting Up the Build Environment
• The build service parses BuildRequires / Build-Depends from spec file / dsc file.
– These packages get added to a “base system”
– Packages get automatically added so that all of the run-time dependencies are met
Build Requires
SpecRequires
Requires
Pkg APkg C
Pkg B Pkg D
© Novell Inc. All rights reserved
31
Breaking Dependencies
• To get rid of excess packages one can break the unwanted dependencies.
• Dependencies can be broken on the project level (affects every package of the project) or on the package level:
– project level: by adding “Ignore:” lines to the project configuration
Ignore: tetex:xorgx11libs
– package level: by adding “#!BuildIgnore” lines to the specfile#!BuildIgnore: xorgx11libs
© Novell Inc. All rights reserved
32
Dealing with Ambiguities
• Ambiguities can happen if two packages provide the same functionality.
• The system treats ambiguities as errors:
• Specfile:BuildRequires: apache2
•
expansion errors: have choice for apache2MPM needed by apache2: apache2prefork apache2worker
© Novell Inc. All rights reserved
33
Dealing with Ambiguities
• To solve ambiguities, either select one of the choices or deselect all unwanted ones:
– project level: “Prefer” linesPrefer: apache2preforkPrefer: apache2worker
– package level: “BuildRequires” / “#!BuildIgnores”BuildRequires: apache2prefork#!BuildIgnore: apache2worker
© Novell Inc. All rights reserved
34
Automatic Dependency Rewriting
• Problem: packages get renamed or are named different for different distributions.
– Example: package containing shared libraries for canna
SUSE: canna-libsFedora: Canna-libsMandriva: libcanna1Debian: libcanna1g
•
Project can specify per repository dependency rewrite rules:
Substitute: <package> <replacement packages>
© Novell Inc. All rights reserved
35
Project Specific Build Data
• A project consists of:– A number of packages and repositories
– Macros for the project
– Information for setting up the build environment
• The build process concatenates the configuration of every involved project.
– The repository search path defines which projects to use
KDE4 SL10.0 Standard
AmarokMacros
KDEMacros
SuSEMacros
Amarok4 KDE4 SL10.0Concat
© Novell Inc. All rights reserved
36
Adding a Service
• openSUSE:postinstall:
%{fillup_and_insserv -f <srv>}preuninstall:
%stop_on_removal <srv>postuninstall:
%restart_on_update <srv>%insserv_cleanup
• Mandriva:postinstall:
%_post_service <srv>preuninstall:
%_preun_service <srv>
© Novell Inc. All rights reserved
37
Adding a service (cont.)
• Fedora:postinstall:
/sbin/chkconfig --add <srv> preuninstall:
if [ “$1” = 0 ] ; thenservice <srv> stop >/dev/null 2>&1/sbin/chkconfig --del <srv>
fipostuninstall:
if [ “$1” -ge 1 ] ; thenservice <srv> condrestart >/dev/null
2>&1fi
© Novell Inc. All rights reserved
38
Adding a Service (cont.)
• Proposed macros:
postinstall:%service_add <srv>
preuninstall:%service_del_preun <srv>
postuninstall:%service_del_postun <srv>
© Novell Inc. All rights reserved
39
Adding Specials to Spec Files
• Used statements:
%if 0%{?suse_version} < 1010do something
%endif
%if 0%{?mandriva_version}Name: libopensync
%else Name: opensync %endif
•
Build Service Inter-Connect
© Novell Inc. All rights reserved
41
Inter-Connect
• Projects on remote build service instance gets accessable.
• Automatic event handling on changes
• Easy setup of own instance
openSuSEPackages
openSuSESource
openSuSE.org
MyLinux.org
openSuSE.orgProjects
My Sources My
Packages
OBSInter-Connect
Build
© Novell Inc. All rights reserved
42
Possible Use Cases
• Reuse Base Projects from openSUSE.org
• Recompile with different compile flags
• Compile for new hardware architecture
• Replace base components (other compiler for example)
• Compile more and more often with own build power
Distribution Generation
© Novell Inc. All rights reserved
44
Goals of the Image Building in OBS
• Have all related input data in one place
• Same interface for all kind of data
• Focused on clean and reproducable builds from scratch
• Allow easy creatable derivates of our distribution medias
• No space for a high number of forks on our server and mirrors, but we can host a nearly unlimited number of configurations.
• Allow client side building and debugging
© Novell Inc. All rights reserved
45
Batch Job Processing
• The job scheduling via dependencies leads to batch job processing.
• Advantages– Consistency
– Earliest possible job start
– Scalability
• Disadvantages– Job start is not defined by user
– No user interactivity with batch job
© Novell Inc. All rights reserved
46
Dependency Calculation
• Binary Builds
– RPM: Requires: / Provides: / BuildRequires:
– DEB: Requires / Provides / BuildRequires
– Images: Package & Pattern definition from KIWI config
– QA: TBD
– Windows Binaries: TBD
– MacOS-X Binaries: TBD
© Novell Inc. All rights reserved
47
Skipped Topics
• So much to tell and
• Multi-Distribution/Architecture Add-On Builds
• Interfaces of OBS
• Collaboration Concepts
– Derivate setup
– Developer Interaction
• Trust handling
– Trust in sources
© Novell Inc. All rights reserved
48
Current Status
• Implementation supporting KIWI is WIP
• Additional support of other imaging tools should be easy afterwards
• Problems / Limitations:– KIWI lacks currently support for installation medias (WIP)
– Conflicting definitions of source repos in project definition and kiwi config
– Only repos from OBS are allowed to keep reproducable results and trust concept
Current State / Next Steps
© Novell Inc. All rights reserved
50
Current State
• Everybody can register at build.opensuse.org
• Everybody can setup an own instance
• Package building for openSUSE, Mandriva, Fedora,
Debian, Ubuntu, SLE and RHEL works
• Software is accessable via
http://software.opensuse.org/search
© Novell Inc. All rights reserved
51
Current WIP
• New software portal gets developed
• Developer collaboration (enables Factory contribution)
– Merge request and execution
• Notifications
• Version 1.0 is coming up.
© Novell Inc. All rights reserved
52
Outlook
• Complete the distribution build support
– Maintanance handling
– Hidden builds (needed for security fixes)
• Trust system to rate developers
• LSB conform builds
• QA and automated test case framework
© Novell Inc. All rights reserved
53
Future Topics
• Future ideas are collected at
• http://www.opensuse.org/Build_Service/Future_Ideas
• Template based package creating
• Translation framework
© Novell Inc. All rights reserved
54
Resources
• http://build.opensuse.org
• A running instance of the Build Service.
• Contains links to documentation and source.
• The mailing list for discussing the Build Service.
• #opensuse-buildservice on freenode
• Our IRC channel
© Novell Inc. All rights reserved
55
Join the Lizard Blizzard!
... Questions?
Unpublished Work of Novell, Inc. All Rights Reserved.This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc. Access to this work is restricted to Novell employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of Novell, Inc. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General DisclaimerThis document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. Novell, Inc. makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for Novell products remains at the sole discretion of Novell. Further, Novell, Inc. reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.