Puritan: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
Puritan is an MIT-licensed disk-image compiler for constructing OLPC disk images from sources including RPM repositories and build-stream descriptions. It is loosely derived from a similar tool, [[Pilgrim]], written by David Zeuthen, John Palmieri, C. Scott Ananian, Dennis Gilmore, and Michael Stone and is being considered to replace [[Pilgrim]], along with [[livecd-tools]]. |
Puritan is an MIT-licensed disk-image compiler for constructing OLPC disk images from sources including RPM repositories and build-stream descriptions. It is loosely derived from a similar tool, [[Pilgrim]], written by David Zeuthen, John Palmieri, C. Scott Ananian, Dennis Gilmore, and Michael Stone and is being considered to replace [[Pilgrim]], along with [[livecd-tools]]. |
||
==== Design ==== |
==== Design ==== |
||
Line 12: | Line 14: | ||
If desired, the RPM and activity sources for each build can be archived in a separate git repository and can be strongly versioned along with the compilation that used them by including the sources as a git submodule in the compilation commit. |
If desired, the RPM and activity sources for each build can be archived in a separate git repository and can be strongly versioned along with the compilation that used them by including the sources as a git submodule in the compilation commit. |
||
==== Use ==== |
==== Use ==== |
||
Line 20: | Line 24: | ||
Mock is used to construct a build root with packages described by the compilation's <tt>bootstrap</tt> and <tt>dependencies</tt> files. |
Mock is used to construct a build root with packages described by the compilation's <tt>bootstrap</tt> and <tt>dependencies</tt> files. |
||
===== On Fedora ===== |
===== On Fedora ===== |
||
Line 25: | Line 31: | ||
The Puritan UI is invoked by installing a [http://dev.laptop.org/~mstone/releases/RPMS/ puritan rpm] (built from the [http://dev.laptop.org/git?p=users/mstone/puritan;a=shortlog;h=ui ui branch]) |
The Puritan UI is invoked by installing a [http://dev.laptop.org/~mstone/releases/RPMS/ puritan rpm] (built from the [http://dev.laptop.org/git?p=users/mstone/puritan;a=shortlog;h=ui ui branch]) |
||
wget -O puritan.rpm http://dev.laptop.org/~mstone/releases/RPMS/puritan-0. |
wget -O puritan.rpm http://dev.laptop.org/~mstone/releases/RPMS/puritan-0.4-1.olpc2.noarch.rpm |
||
sudo rpm -Uvh puritan.rpm |
sudo rpm -Uvh puritan.rpm |
||
Line 31: | Line 37: | ||
$(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout origin/devel_jffs2) |
$(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout origin/devel_jffs2) |
||
puritan ./compilation HEAD ./results |
puritan -v ./compilation HEAD ./results build |
||
If you want to download a set of RPMs for post-processing (for example, because you want to layer a risky feature on top of them), you can also run |
|||
puritan -v ./compilation HEAD ./results download |
|||
Your results should appear in ./results. |
|||
===== On Debian ===== |
===== On Debian ===== |
||
Line 42: | Line 56: | ||
$(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout origin/devel_jffs2) |
$(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout origin/devel_jffs2) |
||
/usr/bin/python2.5 ui/puritan/main.py ./compilation HEAD ./results |
/usr/bin/python2.5 ui/puritan/main.py ./compilation HEAD ./results |
||
==== Help Out ==== |
==== Help Out ==== |
Revision as of 20:27, 23 May 2008
Puritan
Puritan is an MIT-licensed disk-image compiler for constructing OLPC disk images from sources including RPM repositories and build-stream descriptions. It is loosely derived from a similar tool, Pilgrim, written by David Zeuthen, John Palmieri, C. Scott Ananian, Dennis Gilmore, and Michael Stone and is being considered to replace Pilgrim, along with livecd-tools.
Design
In the puritan framework, each and every compilation (build configuration) is described by a git commit and can be authoritatively identified by a git tag pointing to that commit. Relationships between compilations are recorded in the git version graph.
In the present layout, changes that are suitable for all builds should be included in the 'compiler' puritan branch. Build-specific configuration and instructions should go in other branches and these other branches should be regularly rebased on top of 'compiler' in order to produce highly readable history graphs.
If desired, the RPM and activity sources for each build can be archived in a separate git repository and can be strongly versioned along with the compilation that used them by including the sources as a git submodule in the compilation commit.
Use
The raw dependencies of puritan consist of:
git-core python-2.5 mock
Mock is used to construct a build root with packages described by the compilation's bootstrap and dependencies files.
On Fedora
The Puritan UI is invoked by installing a puritan rpm (built from the ui branch)
wget -O puritan.rpm http://dev.laptop.org/~mstone/releases/RPMS/puritan-0.4-1.olpc2.noarch.rpm sudo rpm -Uvh puritan.rpm
then by checking out a 'puritan compilation' to be run by /usr/bin/puritan
$(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout origin/devel_jffs2) puritan -v ./compilation HEAD ./results build
If you want to download a set of RPMs for post-processing (for example, because you want to layer a risky feature on top of them), you can also run
puritan -v ./compilation HEAD ./results download
Your results should appear in ./results.
On Debian
Note: yum seems to be broken on Debian at the moment, which is preventing this recipe from working. :( --Michael Stone 03:02, 7 March 2008 (EST)
sudo apt-get install mock git-core sudo usermod -a -G mock $USERNAME git clone git://dev.laptop.org/users/mstone/puritan ui $(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout origin/devel_jffs2) /usr/bin/python2.5 ui/puritan/main.py ./compilation HEAD ./results
Help Out
Finally, please help improve puritan by
- making it work on your platform
- fixing the devel_ext3 compilation
- adding some reasonable package or buildroot caching system so that it runs faster without impairing build repeatability
- improving the UI with commands for manipulating compilations, or for diffing builds, or for profiling compilations, or ...