Re: [PATCH rdma-core v1 11/14] redhat: Add pyverbs to RedHat specification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 28, 2018 at 09:25:35PM +0000, Jason Gunthorpe wrote:
> On Wed, Nov 28, 2018 at 03:57:09PM +0200, Leon Romanovsky wrote:
> > From: Noa Osherovich <noaos@xxxxxxxxxxxx>
> >
> > Update spec file and cbuild dependencies to allow pyverbs to be
> > included in RedHat-based distributions.
> >
> > Signed-off-by: Noa Osherovich <noaos@xxxxxxxxxxxx>
> > Signed-off-by: Alaa Hleihel <alaa@xxxxxxxxxxxx>
> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >  README.md             |  2 +-
> >  buildlib/cbuild       | 11 +++++++++--
> >  redhat/rdma-core.spec | 25 +++++++++++++++++++++++++
> >  3 files changed, 35 insertions(+), 3 deletions(-)
> >
> > diff --git a/README.md b/README.md
> > index 0594272f..d72b408e 100644
> > +++ b/README.md
> > @@ -58,7 +58,7 @@ $ apt-get install build-essential cmake gcc libudev-dev libnl-3-dev libnl-route-
> >  ### Fedora
> >
> >  ```sh
> > -$ dnf install cmake gcc libnl3-devel libudev-devel pkgconfig valgrind-devel ninja-build
> > +$ dnf install cmake gcc libnl3-devel libudev-devel pkgconfig valgrind-devel ninja-build python3-devel python3-Cython
> >  ```
> >
> >  NOTE: Fedora Core uses the name 'ninja-build' for the 'ninja' command.
> > diff --git a/buildlib/cbuild b/buildlib/cbuild
> > index 492eee7f..adbe4482 100755
> > +++ b/buildlib/cbuild
> > @@ -78,6 +78,7 @@ class Environment(object):
> >      aliases = set();
> >      use_make = False;
> >      proxy = True;
> > +    build_pyverbs = False;
> >
> >      def image_name(self):
> >          return "build-%s/%s"%(project,self.name);
> > @@ -110,6 +111,7 @@ class centos6(YumEnvironment):
> >      use_make = True;
> >      pandoc = False;
> >      is_rpm = False;
> > +    python_cmd = "python";
>
> Why? The default is "python"

I missed one hunk in rebase, while rearrange the patches.
I changed to point to python3 in default Environment.
>
> >  class centos7(YumEnvironment):
> >      docker_parent = "centos:7";
> > @@ -118,9 +120,10 @@ class centos7(YumEnvironment):
> >      use_make = True;
> >      pandoc = False;
> >      specfile = "redhat/rdma-core.spec";
> > +    python_cmd = "python";
>
> Same
>
> >  class centos7_epel(centos7):
> > -    pkgs = (centos7.pkgs - {"cmake","make"}) | {"ninja-build","cmake3","pandoc"};
> > +    pkgs = (centos7.pkgs - {"cmake","make"}) | {"ninja-build","cmake3","pandoc", 'python3-Cython', 'python3-devel'};
> >      name = "centos7_epel";
> >      use_make = False;
> >      pandoc = True;
>
> missing build_pyverbs=true?

Less critical, I focused on the distro which supports packaging, but I'll check.

>
> > @@ -136,12 +139,13 @@ class centos7_epel(centos7):
> >
> >  class fc29(Environment):
> >      docker_parent = "fedora:29";
> > -    pkgs = (centos7.pkgs - {"make", "python-argparse" }) | {"ninja-build","pandoc","perl-generators"};
> > +    pkgs = (centos7.pkgs - {"make", "python-argparse" }) | {"ninja-build","pandoc","perl-generators","python3-Cython","python3-devel"};
> >      name = "fc29";
> >      specfile = "redhat/rdma-core.spec";
> >      ninja_cmd = "ninja-build";
> >      is_rpm = True;
> >      aliases = {"fedora"};
> > +    build_pyverbs = True;
>
> What about the other distros? debian, suse, etc?

debian is handled with EXTRA_CMAKE_FLAGS and suse is supposed to use
build_pyverbs directive in suse related patch.

>
> > @@ -244,6 +258,12 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand.
> >           -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir} \
> >  %if %{with_static}
> >           -DENABLE_STATIC=1 \
> > +%endif
> > +%if %{with_pyverbs}
> > +         -DPYTHON_EXECUTABLE:PATH=%{__python3} \
>
> It would be useful to always set this, at least on FC as we now get
> warnings from the build about invoking naked python.

I'll take a look on it.

Thanks

>
> Jason

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux