]> git.proxmox.com Git - ovs.git/blame - INSTALL.Debian.rst
ovsschema: Add protected column to Port table
[ovs.git] / INSTALL.Debian.rst
CommitLineData
4a9d9b5b
SF
1..
2 Licensed under the Apache License, Version 2.0 (the "License"); you may
3 not use this file except in compliance with the License. You may obtain
4 a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 License for the specific language governing permissions and limitations
12 under the License.
13
14 Convention for heading levels in Open vSwitch documentation:
15
16 ======= Heading 0 (reserved for the title in a document)
17 ------- Heading 1
18 ~~~~~~~ Heading 2
19 +++++++ Heading 3
20 ''''''' Heading 4
21
22 Avoid deeper levels because they do not render well.
23
24=========================================
25Building Debian Packages for Open vSwitch
26=========================================
27
28This document describes how to build Debian packages for Open vSwitch. To
29install Open vSwitch on Debian without building Debian packages, see the
30`installation guide <INSTALL.rst>`__ instead.
31
32.. note::
33 These instructions should also work on Ubuntu and other Debian derivative
34 distributions.
35
36Before You Begin
37----------------
38
39Before you begin, consider whether you really need to build packages yourself.
40Debian "wheezy" and "sid", as well as recent versions of Ubuntu, contain
41pre-built Debian packages for Open vSwitch. It is easier to install these than
42to build your own. To use packages from your distribution, skip ahead to
43"Installing .deb Packages", below.
44
45Building Open vSwitch Debian packages
46-------------------------------------
47
48You may build from an Open vSwitch distribution tarball or from an Open vSwitch
49Git tree with these instructions.
50
51You do not need to be the superuser to build the Debian packages.
52
dc76953f 531. Install the "build-essential" and "fakeroot" packages. For example::
4a9d9b5b
SF
54
55 $ apt-get install build-essential fakeroot
56
572. Obtain and unpack an Open vSwitch source distribution and ``cd`` into its
58 top level directory.
59
603. Install the build dependencies listed under "Build-Depends:" near the top of
61 ``debian/control``. You can install these any way you like, e.g. with
62 ``apt-get install``.
63
64Check your work by running ``dpkg-checkbuilddeps`` in the top level of your ovs
65directory. If you've installed all the dependencies properly,
66``dpkg-checkbuilddeps`` will exit without printing anything. If you forgot to
67install some dependencies, it will tell you which ones.
68
dc76953f 694. Build the package::
4a9d9b5b
SF
70
71 $ fakeroot debian/rules binary
72
73 This will do a serial build that runs the unit tests. This will take
74 approximately 8 to 10 minutes. If you prefer, you can run a faster parallel
dc76953f 75 build::
4a9d9b5b
SF
76
77 $ DEB_BUILD_OPTIONS='parallel=8' fakeroot debian/rules binary
78
dc76953f 79 If you are in a big hurry, you can even skip the unit tests::
4a9d9b5b
SF
80
81 $ DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
82
83.. note::
84
85 There are a few pitfalls in the Debian packaging building system so that,
86 occasionally, you may find that in a tree that you have using for a while,
87 the build command above exits immediately without actually building anything.
dc76953f 88 To fix the problem, run::
4a9d9b5b
SF
89
90 $ fakeroot debian/rules clean
91
92 or start over from a fresh copy of the source tree.
93
945. The generated .deb files will be in the parent directory of the Open vSwitch
95 source distribution.
96
97Installing .deb Packages
98------------------------
99
100These instructions apply to installing from Debian packages that you built
101yourself, as described in the previous section, or from packages provided by
102Debian or a Debian derivative distribution such as Ubuntu. In the former case,
103use a command such as ``dpkg -i`` to install the .deb files that you build, and
104in the latter case use a program such as ``apt-get`` or ``aptitude`` to
105download and install the provided packages.
106
107.. important::
108 You must be superuser to install Debian packages.
109
1101. Start by installing an Open vSwitch kernel module. See
111 ``debian/openvswitch-switch.README.Debian`` for the available options.
112
1132. Install the ``openvswitch-switch`` and ``openvswitch-common`` packages.
114 These packages include the core userspace components of the switch.
115
116Open vSwitch ``.deb`` packages not mentioned above are rarely useful. Refer to
117their individual package descriptions to find out whether any of them are
118useful to you.
119
120Bug Reporting
121-------------
122
123Please report problems to bugs@openvswitch.org.