doc: Import the "Creating Projects" chapter by Visser & Dolstra.
[?]
Mar 16, 2011, 10:50 PM
PKE6I67S7TDGKEFCKIQZOZ5PSDZXCSPOQGSKDAE5NST3NOOLRUXACDependencies
- [2]
5AKAE3R6start of hydra manual - [3]
FV2M6MOThydra: use autoconf/-make - [4]
CPQQFQMZdoc: Reintegrate the intro by Visser & Dolstra from `manual.html'. - [*]
6A6CZ7SCdraft manual
Change contents
- replacement in doc/manual/Makefile.am at line 1
DOCBOOK_FILES = installation.xml introduction.xml manual.xmlDOCBOOK_FILES = installation.xml introduction.xml manual.xml projects.xml - edit in doc/manual/Makefile.am at line 21
- replacement in doc/manual/manual.xml at line 59
<xi:include href="projects.xml" /> - file addition: projects.xml[6.18]
<chapter xmlns="http://docbook.org/ns/docbook"xmlns:xlink="http://www.w3.org/1999/xlink"xml:id="chap-projects"><title>Creating and Managing Projects</title><para>Once Hydra is installed and running, the next step is to addprojects to the build farm. We follow the example of the <linkxlink:href="http://nixos.org/patchelf.html">Patchelfproject</link>, a software tool written in C and using the GNUBuild System (GNU Autoconf and GNU Automake).</para><para>Log in to the web interface of your Hydra installation using theuser name and password you inserted in the database (by default,Hydra's web server listens on <linkxlink:href="http://localhost:3000/"><literal>localhost:3000</literal></link>).Then follow the "Create Project" link to create a new project.</para><section><title>Project Information</title><para>A project definition consists of some general information and aset of job sets. The general information identifies a project,its owner, and current state of activity.Here's what we fill in for the patchelf project:<screen>Identifier: patchelf</screen>The <emphasis>identifier</emphasis> is the identity of theproject. It is used in URLs and in the names of build results.</para><para>The identifier should be a unique name (it is the primarydatabase key for the project table in the database). If you tryto create a project with an already existing identifier you'dget an error message such as:<screen>I'm very sorry, but an error occurred:DBIx::Class::ResultSet::create(): DBI Exception: DBD::SQLite::st execute failed: column name is not unique(19) at dbdimp.c line 402</screen>So try to create the project after entering just the generalinformation to figure out if you have chosen a unique name.Job sets can be added once the project has been created.<screen>Display name: Patchelf</screen>The <emphasis>display name</emphasis> is used in menus.<screen>Description: A tool for modifying ELF binaries</screen>The <emphasis>description</emphasis> is used as shortdocumentation of the nature of the project.<screen>Owner: eelco</screen>The <emphasis>owner</emphasis> of a project can create and editjob sets.<screen>Enabled: Yes</screen>Only if the project is <emphasis>enabled</emphasis> are buildsperformed.</para><para>Once created there should be an entry for the project in thesidebar. Go to the project page for the <linkxlink:href="http://localhost:3000/project/patchelf">Patchelf</link>project.</para></section><section><title>Job Sets</title><para>A project can consist of multiple <emphasis>job sets</emphasis>(hereafter <emphasis>jobsets</emphasis>), separate tasks thatcan be built separately, but may depend on each other (withoutcyclic dependencies, of course). Go to the <linkxlink:href="http://localhost:3000/project/patchelf/edit">Edit</link>page of the Patchelf project and "Add a new jobset" by providingthe following "Information":<screen>Identifier: trunkDescription: TrunkNix expression: release.nix in input patchelfSrc</screen>This states that in order to build the <literal>trunk</literal>jobset, the Nix expression in the file<filename>release.nix</filename>, which can be obtained frominput <literal>patchelfSrc</literal>, should beevaluated. (We'll have a look at<filename>release.nix</filename> later.)</para><para>To realize a job we probably need a number of inputs, which canbe declared in the table below. As many inputs as required canbe added. For patchelf we declare the following inputs.<screen>patchelfSrc'Subversion checkout' https://svn.nixos.org/repos/nix/patchelf/trunknixpkgs 'Subversion checkout' https://svn.nixos.org/repos/nix/nixpkgs/trunkofficialRelease Boolean falsesystem String value "i686-linux"</screen></para></section><section><title>Release Set</title><!-- TODO -->there must be one primary jobcheck the radio button of exactly one jobhttps://svn.nixos.org/repos/nix/nixpkgs/trunk</section><section><title>Building Jobs</title></section><section><title><filename>release.nix</filename></title>- Voorbeelden van Nix expressies voor Hydra:https://svn.nixos.org/repos/nix/patchelf/trunk/release.nixhttps://svn.nixos.org/repos/nix/nix/trunk/release.nixhttps://svn.nixos.org/repos/nix/hydra/trunk/release.nix</section><section><title>Building on the Command Line</title>Overigens zijn die helemaal niet Hydra-specifiek, je kunt ze gewoon vanaf decommand line bouwen, bijv. als je een patchelf checkout hebt (met een nixpkgscheckout in ../nixpkgs):<screen>$ nix-build release.nix -A rpm_fedora10i386</screen></section></chapter>