Puritan: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 3: Line 3:
[http://dev.laptop.org/git/users/mstone/puritan Source code]. [http://dev.laptop.org/git?p=users/mstone/puritan;f=README;hb=ui README]. Latest version: '''0.4'''.
[http://dev.laptop.org/git/users/mstone/puritan Source code]. [http://dev.laptop.org/git?p=users/mstone/puritan;f=README;hb=ui README]. Latest version: '''0.4'''.


Puritan is a disk-image compiler which converts source material including [http://dev.laptop.org/git?p=users/mstone/puritan;f=config.py;hb=devel_jffs2#l32 packages], [http://dev.laptop.org/git?p=users/mstone/puritan;f=config.py;hb=devel_jffs2#l163 activities], and [http://dev.laptop.org/git?p=users/mstone/puritan;f=install_hacks.py;hb=devel_jffs2 hacks] into installable disk images. It consists of two pieces: a [http://dev.laptop.org/git?p=users/mstone/puritan;f=puritan/main.py;hb=ui UI] and a family of '''compilations''' ([http://dev.laptop.org/git?p=users/mstone/puritan;f=main.py;hb=devel_jffs2 example]). The compilations are simple Python programs which populate a filesystem with the materials you supply, then format it distribution. The UI runs the compilations in a controlled environment created by [http://fedoraproject.org/wiki/Projects/Mock Mock] and configured according to the compilation's [http://dev.laptop.org/git?p=users/mstone/puritan;f=bootstrap;hb=devel_jffs2 bootstrap] and [http://dev.laptop.org/git?p=users/mstone/puritan;f=dependencies;hb=devel_jffs2 dependencies] files.
Puritan is a disk-image compiler which converts source material including [http://dev.laptop.org/git?p=users/mstone/puritan;f=config.py;hb=devel_jffs2#l32 packages], [http://dev.laptop.org/git?p=users/mstone/puritan;f=config.py;hb=devel_jffs2#l163 activities], and [http://dev.laptop.org/git?p=users/mstone/puritan;f=install_hacks.py;hb=devel_jffs2 hacks] into installable disk images. It consists of two pieces: a [http://dev.laptop.org/git?p=users/mstone/puritan;f=puritan/main.py;hb=ui UI] and a family of '''compilations''' ([http://dev.laptop.org/git?p=users/mstone/puritan;f=main.py;hb=devel_jffs2 example]). The compilations are simple Python programs which populate a filesystem with the materials you supply, then format it for distribution. The UI runs the compilations in a controlled environment created by [http://fedoraproject.org/wiki/Projects/Mock Mock] and configured according to the compilation's [http://dev.laptop.org/git?p=users/mstone/puritan;f=bootstrap;hb=devel_jffs2 bootstrap] and [http://dev.laptop.org/git?p=users/mstone/puritan;f=dependencies;hb=devel_jffs2 dependencies] files.




Line 9: Line 9:
===== Fedora Instructions =====
===== Fedora Instructions =====


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])
'''NB: These instructions refer to out-of-date code; for the newest code, check out the 'ui', '767', and 'dev' branches of [http://dev.laptop.org/git/users/mstone/puritan puritan] ([git://dev.laptop.org/users/mstone/puritan anon. clone])


The Puritan UI is invoked by yum-installing puritan, then by checking out a 'puritan compilation' to be run by <tt>/usr/bin/puritan</tt>
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 <tt>/usr/bin/puritan</tt>


$(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 -v ./compilation HEAD ./results build
puritan # read help
sudo 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
Some puritan compilations now feature both 'download' operations:


sudo puritan -v ./compilation HEAD ./results download
Your results should appear in ./results.


and 'interactive' error-handling:


sudo puritan -v ./compilation HEAD ./results build -- -i


===== Debian Instructions =====
===== Debian Instructions =====

Revision as of 18:05, 12 December 2008

Puritan

Source code. README. Latest version: 0.4.

Puritan is a disk-image compiler which converts source material including packages, activities, and hacks into installable disk images. It consists of two pieces: a UI and a family of compilations (example). The compilations are simple Python programs which populate a filesystem with the materials you supply, then format it for distribution. The UI runs the compilations in a controlled environment created by Mock and configured according to the compilation's bootstrap and dependencies files.


Fedora Instructions

NB: These instructions refer to out-of-date code; for the newest code, check out the 'ui', '767', and 'dev' branches of puritan (anon. clone)

The Puritan UI is invoked by yum-installing puritan, 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     # read help
 sudo puritan -v ./compilation HEAD ./results build

Some puritan compilations now feature both 'download' operations:

 sudo puritan -v ./compilation HEAD ./results download

and 'interactive' error-handling:

 sudo puritan -v ./compilation HEAD ./results build -- -i
Debian Instructions

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 puritan work on your platform - it's only dependencies are python2.5, git-core, and mock!
  • Maintaining 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 ...