]>
Commit | Line | Data |
---|---|---|
542cc9bb TG |
1 | How to Build Debian Packages for Open vSwitch |
2 | ============================================= | |
6494ea4c BP |
3 | |
4 | This document describes how to build Debian packages for Open vSwitch. | |
5 | To install Open vSwitch on Debian without building Debian packages, | |
9feb1017 | 6 | see [INSTALL.md] instead. |
6494ea4c BP |
7 | |
8 | These instructions should also work on Ubuntu and other Debian | |
9 | derivative distributions. | |
10 | ||
11 | ||
12 | Before You Begin | |
13 | ---------------- | |
14 | ||
15 | Before you begin, consider whether you really need to build packages | |
16 | yourself. Debian "wheezy" and "sid", as well as recent versions of | |
17 | Ubuntu, contain pre-built Debian packages for Open vSwitch. It is | |
18 | easier to install these than to build your own. To use packages from | |
19 | your distribution, skip ahead to "Installing .deb Packages", below. | |
20 | ||
21 | ||
22 | Building Open vSwitch Debian packages | |
23 | ------------------------------------- | |
24 | ||
25 | You may build from an Open vSwitch distribution tarball or from an | |
26 | Open vSwitch Git tree with these instructions. | |
27 | ||
28 | You do not need to be the superuser to build the Debian packages. | |
29 | ||
30 | 1. Install the "build-essential" and "fakeroot" packages, e.g. with | |
542cc9bb | 31 | `apt-get install build-essential fakeroot`. |
6494ea4c | 32 | |
542cc9bb | 33 | 2. Obtain and unpack an Open vSwitch source distribution and `cd` into |
6494ea4c BP |
34 | its top level directory. |
35 | ||
36 | 3. Install the build dependencies listed under "Build-Depends:" near | |
a5d3041c | 37 | the top of debian/control. You can install these any way you like, |
542cc9bb | 38 | e.g. with `apt-get install`. |
6494ea4c | 39 | |
542cc9bb | 40 | Check your work by running `dpkg-checkbuilddeps` in the top level of |
a5d3041c KS |
41 | your ovs directory. If you've installed all the dependencies |
42 | properly, dpkg-checkbuilddeps will exit without printing anything. | |
43 | If you forgot to install some dependencies, it will tell you which ones. | |
6494ea4c BP |
44 | |
45 | 4. Run: | |
46 | ||
542cc9bb | 47 | `fakeroot debian/rules binary` |
6494ea4c | 48 | |
a5d3041c KS |
49 | This will do a serial build that runs the unit tests. This will take |
50 | approximately 8 to 10 minutes. If you prefer, you can run a faster | |
51 | parallel build, e.g.: | |
6494ea4c | 52 | |
542cc9bb | 53 | `DEB_BUILD_OPTIONS='parallel=8' fakeroot debian/rules binary` |
6494ea4c BP |
54 | |
55 | If you are in a big hurry, you can even skip the unit tests: | |
56 | ||
542cc9bb | 57 | `DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary` |
6494ea4c | 58 | |
6dcc2d0b BP |
59 | (There are a few pitfalls in the Debian packaging building system |
60 | so that, occasionally, you may find that in a tree that you have | |
61 | using for a while, the build command above exits immediately | |
62 | without actually building anything. To fix the problem, run | |
63 | ||
64 | `fakeroot debian/rules clean` | |
65 | ||
66 | or start over from a fresh copy of the source tree.) | |
67 | ||
6494ea4c BP |
68 | 5. The generated .deb files will be in the parent directory of the |
69 | Open vSwitch source distribution. | |
70 | ||
71 | ||
72 | Installing .deb Packages | |
73 | ------------------------ | |
74 | ||
75 | These instructions apply to installing from Debian packages that you | |
76 | built yourself, as described in the previous section, or from packages | |
77 | provided by Debian or a Debian derivative distribution such as Ubuntu. | |
542cc9bb | 78 | In the former case, use a command such as `dpkg -i` to install the |
6494ea4c | 79 | .deb files that you build, and in the latter case use a program such |
542cc9bb | 80 | as `apt-get` or `aptitude` to download and install the provided |
6494ea4c BP |
81 | packages. |
82 | ||
83 | You must be superuser to install Debian packages. | |
84 | ||
f085ba1e BP |
85 | 1. Start by installing an Open vSwitch kernel module. See |
86 | debian/openvswitch-switch.README.Debian for the available options. | |
6494ea4c | 87 | |
ff23db30 GS |
88 | 2. Install the "openvswitch-switch" and "openvswitch-common" packages. |
89 | These packages include the core userspace components of the switch. | |
90 | ||
6494ea4c BP |
91 | Open vSwitch .deb packages not mentioned above are rarely useful. |
92 | Please refer to their individual package descriptions to find out | |
93 | whether any of them are useful to you. | |
94 | ||
95 | ||
96 | Bug Reporting | |
97 | ------------- | |
98 | ||
99 | Please report problems to bugs@openvswitch.org. | |
100 | ||
9feb1017 | 101 | [INSTALL.md]:INSTALL.md |