Tito Miroslav Suchý Red Hat 17. 9. 2010
Common cases one product one package one repository pack everything in one tar.gz
Spacewalk 84 packages 10-20 new releases of packages each day plus testing rpms not possible to do it manualy create tar reproducible way
History Makefile - too much escaping, hard to read Tito - in python, plugins...
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
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.
Quick start $ tito tag $ tito build --rpm --test $ tito build --release
Initialization $ tito init Create files: ./rel-eng ./rel-eng/packages ./rel-eng/tito.props
Project props $ cat ./rel-eng/tito.props [globalconfig] default_builder = tito.builder.Builder default_tagger = tito.tagger.VersionTagger
Package overrides $ cat ./selinux/oracle- selinux/build.py.props [buildconfig] builder = tito.builder.NoTgzBuilder tagger = tito.tagger.ReleaseTagger #builder = tito.builder.YourOwnBuilder
Tito config $ cat ~/.titorc RPMBUILD_BASEDIR=/tmp/spacewalk-build KOJI_OPTIONS=-c ~/.koji/spacewalkproject.org-config build --nowait
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.
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.
Test builds [msuchy@dri/~/rhn/spacewalk.pub/client/rhel/rhn-client-tools]$ tito build --srpm --test Building package [rhn-client-tools-1.2.7-1] Wrote: /tmp/spacewalk-build/rhn-client-tools-git-0.48f88ed.tar.gz Wrote: /tmp/spacewalk-build/rhn-client-tools-1.2.7-1.git.0.48f88ed.el6.src.rpm
Tagging [msuchy@dri/~/rhn/spacewalk.pub/client/rhel/rhn-client-tools]$ tito tag Tagging new version of rhn-client-tools: 1.2.6-1 -> 1.2.7-1 Created tag: rhn-client-tools-1.2.7-1 View: git show HEAD Undo: tito tag -u Push: git push && git push --tags [msuchy@dri/~/rhn/spacewalk.pub/client/rhel/rhn-client-tools]$ 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 ssh://msuchy@git.fedorahosted.org/git/spacewalk.git/ 5947535..48f88ed master -> master [msuchy@dri/~/rhn/spacewalk.pub/client/rhel/rhn-client-tools]$ 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-1.2.7-1 -> rhn-client-tools-1.2.7-1
Author: Miroslav Suchý <msuchy@redhat.com> 2010-09-14 11:34:29 Committer: Miroslav Suchý <msuchy@redhat.com> 2010-09-14 11:34:29 Tags: rhn-client-tools-1.2.7-1 Parent: 5947535a0377ebe16785a6a60201ef311afc85dd (Automatic commit of package [spacewalk-schema] release [1.2.20-1].) Child: 48e1bf038584ae4414a35a3cbbc24ac1bd71cb91 (foo) Branches: master, remotes/origin/master Follows: spacewalk-schema-1.2.20-1 Precedes: Automatic commit of package [rhn-client-tools] release [1.2.7-1]. -------------- client/rhel/rhn-client-tools/rhn-client-tools.spec -------------- index 046ecbf..70adbe3 100644 @@ -4,7 +4,7 @@ Group: System Environment/Base Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz URL: https://fedorahosted.org/spacewalk 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 14 2010 Miroslav Suchý <msuchy@redhat.com> 1.2.7-1 +- 632203 - fix comment to corespond with code, decoding unicode to unicode + produce traceback (msuchy@redhat.com) +- l10n: Updates to Oriya (or) translation (mgiri@fedoraproject.org) +- l10n: Updates to Russian (ru) translation (ypoyarko@fedoraproject.org) + * Tue Aug 31 2010 Jan Pazdziora 1.2.6-1 - 603028 - when checking package architecture during errata update, allow transition to and from noarch. ---------------------- rel-eng/packages/rhn-client-tools ---------------------- index d495483..aafef8a 100644 @@ -1 +1 @@ -1.2.6-1 client/rhel/rhn-client-tools/ +1.2.7-1 client/rhel/rhn-client-tools/
Building [msuchy@dri/~/rhn/spacewalk.pub/client/rhel/rhn-client-tools]$ tito build --koji-release Checking for tag [rhn-client-tools-1.2.7-1] in git repo [ssh://msuchy@git.fedorahosted.org/git/spacewalk.git/] WARNING: rpmbuild directory already exists, removing... Building package [rhn-client-tools-1.2.7-1] Building release in Koji... Wrote: /tmp/spacewalk-build/rhn-client-tools-1.2.7.tar.gz Wrote: /tmp/spacewalk-build/rhn-client-tools-1.2.7-1.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-1.2.7-1.el5.src.rpm Uploading srpm: /tmp/spacewalk-build/rhn-client-tools-1.2.7-1.el5.src.rpm [====================================] 100% 00:00:10 1.87 MiB 175.59 KiB/sec Created task: 46707 Task info: http://koji.spacewalkproject.org/koji/taskinfo?taskID=46707 Wrote: /tmp/spacewalk-build/rhn-client-tools-1.2.7-1.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-1.2.7-1.fc12.src.rpm Uploading srpm: /tmp/spacewalk-build/rhn-client-tools-1.2.7-1.fc12.src.rpm [====================================] 100% 00:00:11 1.87 MiB 163.02 KiB/sec Created task: 46708 Task info: http://koji.spacewalkproject.org/koji/taskinfo?taskID=46708
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
Get it http://github.com/dgoodwin/tito available at Fedora and Epel yum install tito
Questions?
How does Tito looks like?