Puritan: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Software}}
{{Software}}
{{Build system}}
{{Build system}}
[http://dev.laptop.org/git/users/mstone/puritan Source code]. [http://dev.laptop.org/git?p=users/mstone/puritan;f=README;hb=master README].
[http://dev.laptop.org/git/users/mstone/puritan Source code]. [http://dev.laptop.org/git?p=users/mstone/puritan;f=README;hb=ui README].


Puritan is a minimal tool 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 a minimal tool 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]].


In the puritan framework, each and every build configuration is described by a git commit and can be authoritatively identified by a git tag pointing to that commit. Relationships between builds are recorded in the git version graph.
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 'master' puritan branch. Build-specific configuration and instructions should go in other branches and these other branches should be regularly rebased on top of 'master' in order to produce highly readable history graphs.
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 puritan snapshot that combined them by including the sources as a git submodule in the puritan commit that performs the build.
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.


The dependencies of puritan vary from branch to branch; however,
The raw dependencies of puritan consist of:


git-core
git-core python-2.5 mock
python-2.5 [[Msutils|python-msutils]]
mtd-utils e2fsprogs [http://dev.laptop.org/~mstone/releases/RPMS/i386/olpc-crcimg-1.0-1.olpc2.i386.rpm olpc-crcimg]
rpm yum
coreutils findutils util-linux wget gzip bzip2 cpio tar hardlink


Mock is used to construct a build root with packages described by the compilation's <tt>dependencies</tt> file.
should cover you.


The Puritan UI is invoked by installing a [http://dev.laptop.org/~mstone/releases/RPMS/noarch/puritan puritan rpm] (built from the [http://dev.laptop.org/git?p=users/mstone/puritan;hb=ui;a=summary ui branch])
Puritan is invoked as follows:


git clone git://dev.laptop.org/users/mstone/puritan
wget -O puritan.rpm http://teach.laptop.org/~mstone/releases/RPMS/noarch/puritan-0.2-1.olpc2.noarch.rpm
cd puritan/puritan
sudo rpm -Uvh puritan.rpm
git checkout devel_jffs2
sudo python main.py


then by checking out a 'puritan compilation' to be run by <tt>/usr/bin/puritan</tt>
Results are currently produced in <tt>puritan/puritan/jobdir</tt>. This is one of several options that are controlled by the per-branch puritan [http://dev.laptop.org/git?p=users/mstone/puritan;f=puritan/config.py;hb=devel_jffs2 configuration file].


$(git clone git://dev.laptop.org/users/mstone/puritan compilation; cd compilation; git checkout devel_jffs2)
Clever suggestions on what a packaged version of puritan ought to install would be most welcome. (The build-instructions <-> git commit methodology makes for comprehensible source code but it does not clearly explain how to deploy the software.)
puritan ./compilation HEAD ./results

Revision as of 04:54, 7 March 2008

Template:Build system Source code. README.

Puritan is a minimal tool 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.

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.

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 dependencies file.

The Puritan UI is invoked by installing a puritan rpm (built from the ui branch)

 wget -O puritan.rpm http://teach.laptop.org/~mstone/releases/RPMS/noarch/puritan-0.2-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 devel_jffs2)
 puritan ./compilation HEAD ./results