Controlling the package build process: Difference between revisions
m (start) |
m (more) |
||
Line 1: | Line 1: | ||
This page contains a brief overview of how to build Debian packages from the source for the iHRIS Suite. The package building scripts are bootstrapped when the I2CE package is built. The packaging scripts reside in [http://bazaar.launchpad.net/~intrahealth%2Binformatics/i2ce/trunk/files/head%3A/modules/PackageUtils modules/PackageUtils/]. | This page contains a brief overview of how to build Debian packages from the source for the iHRIS Suite. The package building scripts are bootstrapped when the I2CE package is built. The packaging scripts reside in [http://bazaar.launchpad.net/~intrahealth%2Binformatics/i2ce/trunk/files/head%3A/modules/PackageUtils modules/PackageUtils/]. | ||
= | = Goals of PackageUtils = | ||
The <tt>PackageUtils</tt> module was designed with a few goals in mind. These are | |||
* One module, one package | |||
* Minimize configuration information | |||
* Ease of invocation | |||
* Compatibility with Launchpad's PPA service | |||
== One Module, One Package == | |||
For this reason, PackageUtils relies on a modules XML configuration for all of its information. This information is put into some templates (which are found in the | There is a one-to-one correspondence between modules and debian packages. The package name corresponds to the name attribute of the I2CEConfiguration element in the XML file. An “i2ce-” prefix is given to each generated package to reduce the changes of naming conflicts. (The only exception to this is the I2CE package itself which is named simply “i2ce”.) In this way, dependencies between packages mirror the dependencies between modules. | ||
== Minimize configuration information == | |||
Another goal of the current design was to eliminate the need to maintain dozens of different configuration files for each module. The information needed was (mostly) already found in the XML configuration file. | |||
For this reason, <tt>PackageUtils</tt> relies on a modules XML configuration for all of its information. This information is put into some templates (which are found in the <tt>templates/</tt> subdirectory of the <tt>PackageUtils</tt> module) to produce a <tt>debian/</tt> directory that is used to build the entire package. Source packages are also produced during the build process. The source packages are needed so that Launchpad can build the packages using standard Debian tools. | |||
== Ease of invocation == | |||
The <tt>PackageUtils</tt> module (<tt>i2ce-package-utils</tt>) is set up so that it could be run from the root of a checkout of I2CE code (e.g. the results of <tt>bzr co lp:i2ce</tt> or <tt>bzr co lp:ihris-manage</tt>) and, from a single command, create packages for all modules in that source tree. | |||
== Compatibility with Launchpad's PPA service == | |||
During the build process, the modules are put into a conventional layout so that conventional tools (such as <tt>dpkg-source</tt> and <tt>debuild</tt>) can be used to manipulate the packages. | |||
Part of the build process is to run <tt>debuild -S</tt> to produce a <tt>_source.changes</tt> file that can be used with <tt>dput</tt> to upload to Launchpad's build service. |
Revision as of 16:24, 21 July 2009
This page contains a brief overview of how to build Debian packages from the source for the iHRIS Suite. The package building scripts are bootstrapped when the I2CE package is built. The packaging scripts reside in modules/PackageUtils/.
Goals of PackageUtils
The PackageUtils module was designed with a few goals in mind. These are
- One module, one package
- Minimize configuration information
- Ease of invocation
- Compatibility with Launchpad's PPA service
One Module, One Package
There is a one-to-one correspondence between modules and debian packages. The package name corresponds to the name attribute of the I2CEConfiguration element in the XML file. An “i2ce-” prefix is given to each generated package to reduce the changes of naming conflicts. (The only exception to this is the I2CE package itself which is named simply “i2ce”.) In this way, dependencies between packages mirror the dependencies between modules.
Minimize configuration information
Another goal of the current design was to eliminate the need to maintain dozens of different configuration files for each module. The information needed was (mostly) already found in the XML configuration file.
For this reason, PackageUtils relies on a modules XML configuration for all of its information. This information is put into some templates (which are found in the templates/ subdirectory of the PackageUtils module) to produce a debian/ directory that is used to build the entire package. Source packages are also produced during the build process. The source packages are needed so that Launchpad can build the packages using standard Debian tools.
Ease of invocation
The PackageUtils module (i2ce-package-utils) is set up so that it could be run from the root of a checkout of I2CE code (e.g. the results of bzr co lp:i2ce or bzr co lp:ihris-manage) and, from a single command, create packages for all modules in that source tree.
Compatibility with Launchpad's PPA service
During the build process, the modules are put into a conventional layout so that conventional tools (such as dpkg-source and debuild) can be used to manipulate the packages.
Part of the build process is to run debuild -S to produce a _source.changes file that can be used with dput to upload to Launchpad's build service.