OBS - OpenSuSE Build Service Lifu Zhang Elektrobit Wireless(2010)
Outline Introduciton Using OBS Getting Started OBS Commandline Client Set up OBS Server software setup Setup meego build projects OBS Maintainance Conclusion
OBS’s Ability What OBS Can Do: Build RPM Packages For diﬀerent platforms with smae copy of code. Publish rpm as ’repository’, easy for package mgmt tools to use What OBS Can NOT: Create MeeGo Image. Testing.
Terms in OBS: Project, Repository, Arch, Package Package: A software package, contains source tarball, spec ﬁle, and (maybe) patches. Project: A group of Package, with conﬁg for build environmet, repositories, and archs. Repository: A place to organize and publish binary/source packages Arch: Architectures, a repo may contains multipule archs
OBS’s Interfaces OBS API, a RESTful web interface. OSC, Command line interface based on API WebUI, Web application based on OBS API Event, obs have a way to generate events
Hello obs - build an Qt Application for MeeGo Prepare an source tarball Create .spec ﬁle Create ”package” on OBS Server Upload sources Monitor Build Process Get Binary Packages(Build results)
Setup OSC tool Install osc Get osc from site http://software.opensuse.org/search/ Script ’oscl’ To operate local obs server, we could use a script ’oscl’ #! / b i n / b a s h API URL=" http :// cnbjas56 . cn . ebgroup . elektrobit . com :81 " e x p o r t h t t p p r o x y=" " o s c −A $API URL $@
Frequent used commands checkout(co): checkout prjoect or package commit(ci): commit local sources to server, must run in a package working directory list(ls): list project in obs or packages in a project rdelete: delete project or package on obs server deleterequest(dr): for common user who didn’t have privileges, could ask for administrator to do the deletion meta: vie or edit meta info of projects or packages, to create a project & package, just edit meta info for not existed items. For more details, please see osc manpage(1) (man osc)
Brief Introduction to OBS Webui The operations we can do in webui: Register & Login Monitor Building process Manage projects & packages Deprecated manage package source ﬁles
Behind the scene: How did obs build packages Create virtual root Do ’rpmbuild’
Setup OBS Softwares obs needs backends & two rails applications they can be installed via zypper
Setup projects for meego build Part1: Create Projects Using oscl meta -e projectname Workﬂow: Set name and description. Add repositories and target archs.
Setup projects for meego build Part 2: Prepare resources I have a script toolkit for setup resources, dowload from http://cnbjas56.cn.ebgroup.elektrobit.com/download/tools/obsmi.tar.bz2 Workﬂow: Install obsmi, sudo ./setup install (./setup –help see more info) Check your repos.conf, to manage resources to download. Sample of repos.conf: [ d a i l y −c o r e −a r m v 7 l ] r e m o t e = h t t p : / / r e p o . meego . com/MeeGo/ b u i l d s / t r u n k / d a i l y / c o r e / r e p o s l o c a l = / m i r r o r / d a i l y / core / armv7l l i n k = meego a r m v 7 l c o r e −a r m v 7 l
Setup projects for meego build Part 3: Make links Now we have all packages ready, if you’re using misched, links would create automatically, if not, you can use the tool ’milink’ sepratedly. USAGE: milink prj repo archﬁle localrepo [-u][-h] An archﬁle is discribing a mapping relation from repo to obs building, here is a sample: armv7l armv7el noarch armv7el
Setup projects for meego build Part 4: Using SubProjects Using subproject can reuse the exsiting projects’ repository, we can setup and conﬁg subproject form the web interface