Re: [vpp-dev] Building DPDK Packages

2017-01-31 Thread Damjan Marion

> On 30 Jan 2017, at 22:03, Jon Loeliger  wrote:
> 
> Hi Folks,
> 
> So, I recently used the "make dpdk-install-dev" target at the top
> of the VPP build and was surprised to see:
> 
> ==
>  Up-to-date DPDK package already installed
> ==
> 
> But I shouldn't have been surprised.  The word "install" is in the target 
> name.
> 
> What I really wanted was "make dpdk-build-rpms", expecting a bunch of RPM
> packages to be left at the top next to vpp-*.rpms.
> 
> I need to build an installable set of packages.  Not install a set of 
> packages.
> 
> So, is there a way to get to the "build-rpm" target in that DPDK Makefile?
> That is, like "dpdk-install-dev", but "dpdk-build-rpms"
> 
> I did this obvious patch to the top-level Makefile:
> 
> $ git diff
> diff --git a/Makefile b/Makefile
> index 2af6340..8776af5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -91,6 +91,7 @@ help:
> @echo " pkg-deb - build DEB packages"
> @echo " pkg-rpm - build RPM packages"
> @echo " dpdk-install-dev- install DPDK development packages"
> +   @echo " dpdk-build-pkg  - build DPDK development packages”

I was thinking about adding this one, but finally i decided not to, mainly to 
avoid bloating the toplevel Makefile.
As you noticed, you can simply do “make -C dpdk build-rpm” 

> @echo " ctags   - (re)generate ctags database"
> @echo " gtags   - (re)generate gtags database"
> @echo " cscope  - (re)generate cscope database"
> @@ -305,6 +306,9 @@ pkg-rpm: dist
>  dpdk-install-dev:
> make -C dpdk install-$(PKG)
> 
> +dpdk-build-pkg:
> +   make -C dpdk build-$(PKG)
> +
>  ctags: ctags.files
> @ctags --totals --tag-relative -L $<
> @rm $<
> 
> But that *rebuilt* the DPDK a second time.  Can it instead be
> integrated into a notion of the top-level "pkg-rpm" target so that
> it is built only once, and also collects the built package,
> ./dpdk/vpp-dpdk-devel-16.11-vpp1.x86_64.rpm
> and copies it up to build-root/ with the rest of the *.rpm files?

This dpdk packages are development package, and they should not be the part of 
“official” distribution.
End users should not install them, as they will collide with official DPDK 
packages.
That’s why they are not in the same place with VPP packages.



___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Building DPDK Packages

2017-01-30 Thread Jon Loeliger
Hi Folks,

So, I recently used the "make dpdk-install-dev" target at the top
of the VPP build and was surprised to see:

==
 Up-to-date DPDK package already installed
==

But I shouldn't have been surprised.  The word "install" is in the target
name.

What I really wanted was "make dpdk-build-rpms", expecting a bunch of RPM
packages to be left at the top next to vpp-*.rpms.

I need to build an installable set of packages.  Not install a set of
packages.

So, is there a way to get to the "build-rpm" target in that DPDK Makefile?
That is, like "dpdk-install-dev", but "dpdk-build-rpms"

I did this obvious patch to the top-level Makefile:

$ git diff
diff --git a/Makefile b/Makefile
index 2af6340..8776af5 100644
--- a/Makefile
+++ b/Makefile
@@ -91,6 +91,7 @@ help:
@echo " pkg-deb - build DEB packages"
@echo " pkg-rpm - build RPM packages"
@echo " dpdk-install-dev- install DPDK development packages"
+   @echo " dpdk-build-pkg  - build DPDK development packages"
@echo " ctags   - (re)generate ctags database"
@echo " gtags   - (re)generate gtags database"
@echo " cscope  - (re)generate cscope database"
@@ -305,6 +306,9 @@ pkg-rpm: dist
 dpdk-install-dev:
make -C dpdk install-$(PKG)

+dpdk-build-pkg:
+   make -C dpdk build-$(PKG)
+
 ctags: ctags.files
@ctags --totals --tag-relative -L $<
@rm $<

But that *rebuilt* the DPDK a second time.  Can it instead be
integrated into a notion of the top-level "pkg-rpm" target so that
it is built only once, and also collects the built package,
./dpdk/vpp-dpdk-devel-16.11-vpp1.x86_64.rpm
and copies it up to build-root/ with the rest of the *.rpm files?

Thanks,
jdl
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev