Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tito Miroslav Suchý Red Hat 17. 9. 2010.

Similar presentations


Presentation on theme: "Tito Miroslav Suchý Red Hat 17. 9. 2010."— Presentation transcript:

1 Tito Miroslav Suchý Red Hat

2 Common cases one product one package one repository
pack everything in one tar.gz

3 Spacewalk 84 packages 10-20 new releases of packages each day
plus testing rpms not possible to do it manualy create tar reproducible way

4 History Makefile - too much escaping, hard to read
Tito - in python, plugins...

5 What Tito does? Tag new releases with incremented RPM version or release. Auto-generate spec file changelog based on git history since last tag. Create reliable tar.gz's with consistent checksums from any tag. Build source and binary rpms off any tag. Build source and binary "test" rpms off most recently committed code. Build multiple source rpms with appropriate disttag's for submission to the Koji build system

6 What Tito do? (cont.) Vary the way packages are built/tagged.
Report on any diffs or commits messages missing since last tag. Build packages off an "upstream" git repository, where modifications in the "downstream" git repository will be applied as a patch in the source rpm. Manage all of the above for a git repository with many disjoint packages within it.

7 Quick start $ tito tag $ tito build --rpm --test
$ tito build --release

8 Initialization $ tito init Create files: ./rel-eng ./rel-eng/packages
./rel-eng/tito.props

9 Project props $ cat ./rel-eng/tito.props [globalconfig]
default_builder = tito.builder.Builder default_tagger = tito.tagger.VersionTagger

10 Package overrides $ cat ./selinux/oracle- selinux/build.py.props
[buildconfig] builder = tito.builder.NoTgzBuilder tagger = tito.tagger.ReleaseTagger #builder = tito.builder.YourOwnBuilder

11 Tito config $ cat ~/.titorc RPMBUILD_BASEDIR=/tmp/spacewalk-build
KOJI_OPTIONS=-c ~/.koji/spacewalkproject.org-config build --nowait

12 Builders Builder Includes functionality for a standard package build. Packages which require other unusual behavior can subclass this to inject the desired behavior. NoTgzBuilder Builder for packages that do not require the creation of a tarball. Usually these packages have source tarballs checked directly into git. i.e. most of the packages in spec-tree.

13 Taggers VersionTagger
Standard Tagger class, used for tagging packages built from source in git. (as opposed to packages which commit a tarball directly into git). Releases will be tagged by incrementing the package version, and the actual RPM "release" will always be set to 1. ReleaseTagger Tagger which increments the spec file release instead of version. Used for: Packages we build from a tarball checked directly into git. Satellite packages built on top of Spacewalk tarballs.

14 Test builds tito build --srpm --test Building package [rhn-client-tools ] Wrote: /tmp/spacewalk-build/rhn-client-tools-git-0.48f88ed.tar.gz Wrote: /tmp/spacewalk-build/rhn-client-tools git.0.48f88ed.el6.src.rpm

15 Tagging tito tag Tagging new version of rhn-client-tools: > Created tag: rhn-client-tools View: git show HEAD Undo: tito tag -u Push: git push && git push --tags git push Counting objects: 16, done. Delta compression using up to 2 threads. Compressing objects: 100% (8/8), done. Writing objects: 100% (9/9), 920 bytes, done. Total 9 (delta 6), reused 0 (delta 0) To f88ed master -> master git push --tags Counting objects: 1, done. Writing objects: 100% (1/1), 228 bytes, done. Total 1 (delta 0), reused 0 (delta 0) * [new tag] rhn-client-tools > rhn-client-tools

16 Author: Miroslav Suchý <msuchy@redhat.com> 2010-09-14 11:34:29
Committer: Miroslav Suchý :34:29 Tags: rhn-client-tools Parent: a0377ebe16785a6a60201ef311afc85dd (Automatic commit of package [spacewalk-schema] release [ ].) Child: 48e1bf038584ae4414a35a3cbbc24ac1bd71cb91 (foo) Branches: master, remotes/origin/master Follows: spacewalk-schema Precedes: Automatic commit of package [rhn-client-tools] release [ ]. client/rhel/rhn-client-tools/rhn-client-tools.spec index 046ecbf..70adbe -4,7 +4,7 Group: System Environment/Base Source0: URL: Name: rhn-client-tools -Version: 1.2.6 +Version: 1.2.7 Release: 1%{?dist} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -281,6 +281,12 make -f Makefile.rhn-client-tools test %endif %changelog +* Tue Sep Miroslav Suchý fix comment to corespond with code, decoding unicode to unicode + produce traceback +- l10n: Updates to Oriya (or) translation +- l10n: Updates to Russian (ru) translation + * Tue Aug Jan Pazdziora when checking package architecture during errata update, allow transition to and from noarch. rel-eng/packages/rhn-client-tools index d aafef8a client/rhel/rhn-client-tools/ client/rhel/rhn-client-tools/

17 Building tito build --koji-release Checking for tag [rhn-client-tools ] in git repo WARNING: rpmbuild directory already exists, removing... Building package [rhn-client-tools ] Building release in Koji... Wrote: /tmp/spacewalk-build/rhn-client-tools tar.gz Wrote: /tmp/spacewalk-build/rhn-client-tools el5.src.rpm Submitting build with: koji -c ~/.koji/spacewalkproject.org-config build --nowait dist-5E-sw-1.2-candidate /tmp/spacewalk-build/rhn-client-tools el5.src.rpm Uploading srpm: /tmp/spacewalk-build/rhn-client-tools el5.src.rpm [====================================] 100% 00:00: MiB KiB/sec Created task: 46707 Task info: Wrote: /tmp/spacewalk-build/rhn-client-tools fc12.src.rpm Submitting build with: koji -c ~/.koji/spacewalkproject.org-config build --nowait dist-f12-sw-1.2-candidate /tmp/spacewalk-build/rhn-client-tools fc12.src.rpm Uploading srpm: /tmp/spacewalk-build/rhn-client-tools fc12.src.rpm [====================================] 100% 00:00: MiB KiB/sec Created task: 46708 Task info:

18 Real life props $ cat rel-eng/tito.props [globalconfig]
default_builder = spacewalk.releng.builder.Builder default_tagger = spacewalk.releng.tagger.VersionTagger [koji] autobuild_tags = dist-5E-sw-1.2-candidate dist-f12-sw-1.2-candidate dist-f13-sw-1.2-candidate [dist-5E-sw-1.2-candidate] disttag = .el5 [dist-f12-sw-1.2-candidate] disttag = .fc12 blacklist=jabberd-selinux [dist-f13-sw-1.2-candidate] disttag = .fc13 [cvs] cvsroot = :gserver:your.dist-cvs.server.com:/cvs/dist branches = SATELLITE-5_4-RHEL-5

19 Get it http://github.com/dgoodwin/tito available at Fedora and Epel
yum install tito

20 Questions?

21 How does Tito looks like?


Download ppt "Tito Miroslav Suchý Red Hat 17. 9. 2010."

Similar presentations


Ads by Google