Annotation of wikisrc/projects/project/rewrite-pkg_comp.mdwn, revision 1.2
1.1 jmmv 1: [[!template id=project
3: title="Rewrite pkg_comp with portability as a major goal"
10: [Julio Merino](mailto:jmmv@NetBSD.org), [Aleksej Saushev](mailto:asau@NetBSD.org)
1.2 ! jmmv 13: category="pkgsrc"
! 14: difficulty="medium"
1.1 jmmv 15: duration="3 months"
18: pkg_comp is a shell script that allows building packages inside a sandbox in an automated manner. The goal is to allow the user to build packages in a controller manner and to provide a simple mechanism to build packages for a host running a specific NetBSD release (e.g building packages for NetBSD 5.x while running NetBSD-current).
20: The [current version](http://www.netbsd.org/contrib/soc-projects.html) of pkg_comp is written as a pretty big shell script that has grown out of control. It is hard to maintain and hard to extend. And, more importantly, it is not portable at all.
22: The goal of this project is to rewrite pkg_comp from scratch with portability being the main goal: it has to be possible to use the script in different Unix variants (including Mac OS X).
24: The language of choice for the reimplementation will be Python. The code will be hosted outside of pkgsrc to be able to distribute it as a standalone tool.
26: The following items should be accomplished:
28: * Implement a "sandbox" library with an interface to programmatically create and manage a sandboxed file system. The structure of the sandbox has to be configurable through a template, and templates have to be provided for a few systems. The sandbox itself will be constructed either by unpacking tarballs with the system contents (such as the NetBSD distfiles), by null-mounting directories of the host file system, or both.
29: * Implement a command-line frontend utility for the "sandbox" library. This tool is completely unaware of pkgsrc but will be really nice to have (and trivial to write, as all the juicy bits are in the library). Will be useful as part of server administration, as it will allow isolating services in a fairly easy manner.
30: * Implement the "pkg_comp" application, building it on top of the "sandbox" module. It has to provide most of the current functionality, if not all. More specifically, these are a must: unattended builds of a predefined set of packages and use of libkver to override the system version.
31: * Implement detailed unit tests for the modules and integration tests for the front-end tools. At this point, the former will most likely be implemented using JUnit and the latter will be implemented using ATF.
33: As part of this project, the student will get familiar with pkgsrc, construction of sandboxes for different operating systems, unit testing, ATF and Python.
37: [[!tag gsoc]]
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb