On Wed, 15 Nov 2017 11:17:42 -0500 Aaron Conole <[email protected]> wrote:
> Flavio Leitner <[email protected]> writes: > > > On Wed, 15 Nov 2017 02:20:16 -0500 > > Aaron Conole <[email protected]> wrote: > > > >> Flavio Leitner <[email protected]> writes: > >> > >> > Instead of listing all the dependencies, use the RPM group > >> > 'Development Tools' and the builddep tool to find specific > >> > ones. > >> > > >> > Signed-off-by: Flavio Leitner <[email protected]> > >> > --- > >> > Documentation/intro/install/fedora.rst | 54 > >> > +++++++++++++++++++++++----------- > >> > Documentation/intro/install/rhel.rst | 34 +++++++++++++++------ > >> > 2 files changed, 62 insertions(+), 26 deletions(-) > >> > > >> > diff --git a/Documentation/intro/install/fedora.rst > >> > b/Documentation/intro/install/fedora.rst > >> > index 3119bd9aa..70cebfb16 100644 > >> > --- a/Documentation/intro/install/fedora.rst > >> > +++ b/Documentation/intro/install/fedora.rst > >> > @@ -36,23 +36,43 @@ RHEL 7.x and its derivatives, including CentOS 7.x > >> > and Scientific Linux 7.x. > >> > Build Requirements > >> > ------------------ > >> > > >> > -To build packages for a Fedora Linux host, you will need the > >> > packages described > >> > -in the :doc:`general`. Specific packages (by package name) include: > >> > - > >> > -- rpm-build > >> > -- autoconf automake libtool > >> > -- systemd-units openssl openssl-devel > >> > -- python2-devel python3-devel > >> > -- python2 python2-twisted python2-zope-interface python2-six > >> > python2-sphinx > >> > -- desktop-file-utils > >> > -- groff graphviz > >> > -- procps-ng > >> > -- checkpolicy selinux-policy-devel > >> > - > >> > -And (optionally): > >> > - > >> > -- libcap-ng libcap-ng-devel > >> > -- dpdk-devel > >> > +You will need to install all required packages to build the RPMs. > >> > +Newer distributions use ``dnf`` but if it's not available, then use > >> > +``yum`` instructions. > >> > + > >> > +The command below will install RPM tools and generic build dependencies. > >> > +And (optionally) include these packages: libcap-ng > >> > libcap-ng-devel dpdk-devel. > >> > + > >> > +DNF: > >> > +:: > >> > + > >> > + $ dnf install @'Development Tools' rpm-build dnf-plugins-core > >> > + > >> > +YUM: > >> > +:: > >> > + > >> > + $ yum install @'Development Tools' rpm-build yum-utils > >> > + > >> > +Then it is necessary to install Open vSwitch specific build > >> > dependencies. > >> > +The dependencies are listed in the SPEC file, but first it is necessary > >> > +to replace the VERSION tag to be a valid SPEC. > >> > + > >> > +The command below will create a temporary SPEC file: > >> > +:: > >> > + $ sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in \ > >> > + > /tmp/ovs.spec > >> > + > >> > +And to install specific dependencies, use the corresponding tool below. > >> > > >> > >> Is there any reason we can't `make rhel/openvswitch-fedora.spec` for > >> this? I think ./boot && ./configure would work with Development Tools > >> installed, and then the only thing left is let the make system create > >> just that file? > > > > It doesn't work due to missing dependencies, like libssl-devel. > > > > I thought about having the minimum set of dependencies listed > > in the documentation and then do: > > $ ./boot > > $ ./configure > > $ make rpm > > > > which would prep the spec and run builddep and then run rpmbuild, > > but then we are back to maintain the list of packages in the doc > > and it is not that different from the steps in this patch and it > > requires root. > > > > And the other option is to provide a rhel/ script to do what this > > patch is explaining to do, but obviously it would require root too. > > Right. Well, I'm okay with either approach: the tmp file as documented > or a script. If you decide to change it, no problems. Otherwise: > > Acked-by: Aaron Conole <[email protected]> I will leave as is. Thanks for reviewing it! fbl > > > fbl > > > >> > +DNF: > >> > +:: > >> > + $ dnf builddep /tmp/ovs.spec > >> > + > >> > +YUM: > >> > +:: > >> > + $ yum-builddep /tmp/ovs.spec > >> > + > >> > +Once that is completed, remove the file ``/tmp/ovs.spec``. > >> > > >> > Bootstraping > >> > ------------ > >> > diff --git a/Documentation/intro/install/rhel.rst > >> > b/Documentation/intro/install/rhel.rst > >> > index 0ef6f55a3..184089e89 100644 > >> > --- a/Documentation/intro/install/rhel.rst > >> > +++ b/Documentation/intro/install/rhel.rst > >> > @@ -70,17 +70,33 @@ directory is ``/usr/src/redhat/SOURCES``. On RHEL > >> > 6, the default ``_topdir`` is > >> > Build Requirements > >> > ------------------ > >> > > >> > -To compile the RPMs, you will need to install the packages described in > >> > the > >> > -:doc:`general` along with some additional packages. These can be > >> > installed with > >> > -the below command:: > >> > +You will need to install all required packages to build the RPMs. > >> > +The command below will install RPM tools and generic build dependencies: > >> > +:: > >> > + $ yum install @'Development Tools' rpm-build yum-utils > >> > > >> > - $ yum install gcc make python-devel openssl-devel kernel-devel > >> > graphviz \ > >> > - kernel-debug-devel autoconf automake rpm-build > >> > redhat-rpm-config \ > >> > - libtool checkpolicy selinux-policy-devel python-sphinx > >> > +Then it is necessary to install Open vSwitch specific build > >> > dependencies. > >> > +The dependencies are listed in the SPEC file, but first it is necessary > >> > +to replace the VERSION tag to be a valid SPEC. > >> > > >> > -.. note:: > >> > - If python-sphinx package is not available in your version of > >> > RHEL, you can > >> > - install it via pip with 'pip install sphinx'. > >> > +The command below will create a temporary SPEC file: > >> > +:: > >> > + $ sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch.spec.in > > >> > /tmp/ovs.spec > >> > + > >> > +And to install specific dependencies, use yum-builddep tool: > >> > +:: > >> > + $ yum-builddep /tmp/ovs.spec > >> > + > >> > +Once that is completed, remove the file ``/tmp/ovs.spec``. > >> > + > >> > +If python-sphinx package is not available in your version of RHEL, you > >> > can > >> > +install it via pip with 'pip install sphinx'. > >> > + > >> > +Open vSwitch requires python 2.7 or newer which is not available in > >> > older > >> > +distributions. In the case of RHEL 6.x and its derivatives, one option > >> > is > >> > +to install python34 and python34-six from `EPEL`_. > >> > + > >> > +.. _EPEL: https://fedoraproject.org/wiki/EPEL > >> > > >> > .. _rhel-bootstrapping: -- Flavio _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
