Diff for "Packaging/DailyBuilds/BzrBuilder/Draft"

Not logged in - Log In / Register

Differences between revisions 1 and 2
Revision 1 as of 2011-03-24 11:02:24
Size: 3179
Editor: host217-44-165-42
Comment:
Revision 2 as of 2020-07-27 10:50:56
Size: 0
Comment: Superseded by https://help.launchpad.net/Packaging/SourceBuilds/BzrBuilder
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
~-[[FrontPage|Launchpad Help]] > [[Packaging]] > [[Packaging/DailyBuilds|Daily builds]] > bzr-build -~

||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>||

= Overview =

bzr-builder is the Bazaar plugin that helps you set up [[Packaging/DailyBuilds|daily builds in Launchpad]]. You need to install it locally to test your recipes and builds before you send them to Launchpad.

= Installation =

The easiest way to install bzr-builder, and keep it updated, is using the PPA at:

  [[https://launchpad.net/~dailydebs-team/+archive/bzr-builder]]

Alternatively, you can pull down the branch from Launchpad and install it in your Bazaar plugins directory:

{{{
$ mkdir -p ~/.bazaar/plugins/
$ bzr branch lp:bzr-builder ~/.bazaar/plugins/builder
}}}

To check if it is install and running, enter:

{{{
$ bzr plugins -v
}}}

Looking for "builder" in the listed plugins.

= Getting help =

Help for the plugin is available by running:

{{{
$ bzr help builder
}}}

Help for the individual commands is available as:

{{{
$ bzr help build
$ bzr help dailydeb
}}}

= Recipes =

bzr-builder works with "recipes" that are descriptions of the steps needed to construct a package from the various Bazaar branches.

[[Packaging/DailyBuilds/Recipes|Read our guide to writing recipes]].

== Running commands in recipes ==

Sometimes you may need run a partircular command in order to prepare a branch for packaging.

bzr-builder supports this through the ```run``` command.

'''Note:''' Launchpad does not support the ```run``` command.

Let's say you need to run ```autoreconf -i``` at some point during the build process. You'd add the following line to your recipe:

{{{
run autoreconf -i
}}}

When bzr-builder reaches that point in the recipe it will run that command.

If you place a ```run``` command in a ```nest``` section of a recipe &mdash; i.e. indented by two spaces below a ```nest``` command &mdash; the command will be run in the nested location.

For example:

{{{
nest packaging lp:~team/project/ubuntu debian
  run cat control
}}}

The command is passed through the shell, so you can use shell constructs, such as:

{{{
run touch a && touch b
}}}

If the command exits with a non-zero error code then it will stop the building of the package.

= Building the recipe =

In order to build the recipe you need to use the `bzr dailydeb` command.

{{{
$ bzr dailydeb package.recipe working-dir
}}}

This will perform the steps specified in `package.recipe`. It will create `working-dir` and put the resulting source tree and the source package there.

You can examine the unpacked source tree and then build the source package and install the results.

= Next steps =

There's more in the [[Packaging/DailyBuildsdaily builds knowledge base]].

||<tablestyle="width: 100%;" style="width: 50%;"> ~-[[Packaging/DailyBuilds/Recipes|< Recipes in detail]] -~ ||<style="width: 50%; text-align: right;"> ~- [[Packaging/DailyBuilds/KnowledgeBase|More help in the daily builds knowledgebase >]] -~ ||