From b773b13e9b04f3bb7da50fd571f1dc97d05db804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 16 Mar 2011 22:50:09 +0000 Subject: [PATCH] doc: Import the "Creating Projects" chapter by Visser & Dolstra. --- doc/manual/Makefile.am | 5 +- doc/manual/manual.xml | 2 +- doc/manual/projects.xml | 176 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 178 insertions(+), 5 deletions(-) create mode 100644 doc/manual/projects.xml diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index 6d648c64..e10efb05 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -1,4 +1,4 @@ -DOCBOOK_FILES = installation.xml introduction.xml manual.xml +DOCBOOK_FILES = installation.xml introduction.xml manual.xml projects.xml EXTRA_DIST = $(DOCBOOK_FILES) manual.pdf @@ -18,6 +18,3 @@ manual.pdf : $(DOCBOOK_FILES) install-data-local: $(INSTALL) -d $(DESTDIR)$(datadir)/doc/hydra/manual $(INSTALL_DATA) manual.pdf $(DESTDIR)$(datadir)/doc/hydra/manual - - - diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index f20ce34f..e0f5ba43 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -56,7 +56,7 @@ - + diff --git a/doc/manual/projects.xml b/doc/manual/projects.xml new file mode 100644 index 00000000..d3224215 --- /dev/null +++ b/doc/manual/projects.xml @@ -0,0 +1,176 @@ + + + Creating and Managing Projects + + + Once Hydra is installed and running, the next step is to add + projects to the build farm. We follow the example of the Patchelf + project, a software tool written in C and using the GNU + Build System (GNU Autoconf and GNU Automake). + + + + Log in to the web interface of your Hydra installation using the + user name and password you inserted in the database (by default, + Hydra's web server listens on localhost:3000). + Then follow the "Create Project" link to create a new project. + + +
+ Project Information + + + A project definition consists of some general information and a + set 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: + + + Identifier: patchelf + + + The identifier is the identity of the + project. It is used in URLs and in the names of build results. + + + + The identifier should be a unique name (it is the primary + database key for the project table in the database). If you try + to create a project with an already existing identifier you'd + get an error message such as: + + +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 + + + So try to create the project after entering just the general + information to figure out if you have chosen a unique name. + Job sets can be added once the project has been created. + + + Display name: Patchelf + + + The display name is used in menus. + + + Description: A tool for modifying ELF binaries + + + The description is used as short + documentation of the nature of the project. + + + Owner: eelco + + + The owner of a project can create and edit + job sets. + + + Enabled: Yes + + + Only if the project is enabled are builds + performed. + + + + Once created there should be an entry for the project in the + sidebar. Go to the project page for the Patchelf + project. + +
+ +
+ Job Sets + + + A project can consist of multiple job sets + (hereafter jobsets), separate tasks that + can be built separately, but may depend on each other (without + cyclic dependencies, of course). Go to the Edit + page of the Patchelf project and "Add a new jobset" by providing + the following "Information": + + + Identifier: trunk + Description: Trunk + Nix expression: release.nix in input patchelfSrc + + + This states that in order to build the trunk + jobset, the Nix expression in the file + release.nix, which can be obtained from + input patchelfSrc, should be + evaluated. (We'll have a look at + release.nix later.) + + + + + To realize a job we probably need a number of inputs, which can + be declared in the table below. As many inputs as required can + be added. For patchelf we declare the following inputs. + + + patchelfSrc + 'Subversion checkout' https://svn.nixos.org/repos/nix/patchelf/trunk + + nixpkgs 'Subversion checkout' https://svn.nixos.org/repos/nix/nixpkgs/trunk + + officialRelease Boolean false + + system String value "i686-linux" + + +
+ +
+ Release Set + + + there must be one primary job + + check the radio button of exactly one job + + https://svn.nixos.org/repos/nix/nixpkgs/trunk +
+ +
+ Building Jobs +
+ +
+ <filename>release.nix</filename> + +- Voorbeelden van Nix expressies voor Hydra: + + + +https://svn.nixos.org/repos/nix/patchelf/trunk/release.nix +https://svn.nixos.org/repos/nix/nix/trunk/release.nix +https://svn.nixos.org/repos/nix/hydra/trunk/release.nix +
+ +
+ Building on the Command Line + +Overigens zijn die helemaal niet Hydra-specifiek, je kunt ze gewoon vanaf de +command line bouwen, bijv. als je een patchelf checkout hebt (met een nixpkgs +checkout in ../nixpkgs): + + +$ nix-build release.nix -A rpm_fedora10i386 + + +
+