aboutsummaryrefslogtreecommitdiffstats
path: root/vpp/build-root/deb/debian
diff options
context:
space:
mode:
authorsreejith <sreejith.surendrannair@linaro.org>2017-03-29 01:15:02 -0400
committersreejith <sreejith.surendrannair@linaro.org>2017-03-29 02:23:59 -0400
commita23197980e40d4d9414bcfaf59005a1dc2a89251 (patch)
treeda3fc5410a9cda99e05d2e0f6dae06072a0c50b8 /vpp/build-root/deb/debian
parent746b57564deede624261ab8a96c94f562f24d22c (diff)
Added vpp intial source code from master branch 17.01.1
Change-Id: I81bdace6f330825a1746a853766779dfb24765fd Signed-off-by: sreejith <sreejith.surendrannair@linaro.org>
Diffstat (limited to 'vpp/build-root/deb/debian')
-rw-r--r--vpp/build-root/deb/debian/.gitignore14
-rwxr-xr-xvpp/build-root/deb/debian/README.vpp56
-rwxr-xr-xvpp/build-root/deb/debian/compat1
-rw-r--r--vpp/build-root/deb/debian/control68
-rw-r--r--vpp/build-root/deb/debian/copyright9
-rwxr-xr-xvpp/build-root/deb/debian/rules31
-rwxr-xr-xvpp/build-root/deb/debian/source/format1
-rw-r--r--vpp/build-root/deb/debian/vpp-bin.README.Debian53
-rw-r--r--vpp/build-root/deb/debian/vpp-python-api.postinst5
-rw-r--r--vpp/build-root/deb/debian/vpp-python-api.prerm8
-rw-r--r--vpp/build-root/deb/debian/vpp.postinst8
-rw-r--r--vpp/build-root/deb/debian/vpp.postrm21
-rw-r--r--vpp/build-root/deb/debian/vpp.preinst4
-rw-r--r--vpp/build-root/deb/debian/vpp.service14
-rw-r--r--vpp/build-root/deb/debian/vpp.upstart21
15 files changed, 314 insertions, 0 deletions
diff --git a/vpp/build-root/deb/debian/.gitignore b/vpp/build-root/deb/debian/.gitignore
new file mode 100644
index 00000000..75d8fbbc
--- /dev/null
+++ b/vpp/build-root/deb/debian/.gitignore
@@ -0,0 +1,14 @@
+changelog
+files
+*debhelper*
+*.substvars
+*.install
+vpp-dpdk-dkms*
+vpp/
+vpp-dev/
+vpp-lib/
+vpp-dpdk-dev/
+vpp-dpdk-dkms/
+vpp-dbg/
+vppctl/
+vpp-python-api/
diff --git a/vpp/build-root/deb/debian/README.vpp b/vpp/build-root/deb/debian/README.vpp
new file mode 100755
index 00000000..b343c786
--- /dev/null
+++ b/vpp/build-root/deb/debian/README.vpp
@@ -0,0 +1,56 @@
+Building DEB packages
+=====================
+
+REQUIREMENTS:
+ You will need a working Internet connection to execute the build, because
+ the build procedure for the included "dpdk" project attempts to contact the
+ Internet host "dpdk.org".
+
+There are three main parts to the process:
+ a) Stage the source tree so that dpkg-source will recognize its organization
+ and create a valid DSC source package for you;
+ b) Ensure that the tools required for building DEB packages are installed;
+ and
+ c) Launch the build.
+
+1) Create, or have on hand, a local clone of the git repository, with no
+untracked files or local modifications pending, up-to-date with the branch or
+commit reference from which you wish to construct the source release.
+
+The branch and repository origins will differ based on local conditions.
+
+Example:
+$ git clone -b master ssh://git@example.com:7999/~username/open-vpp
+
+("-b master" can be omitted since master is the default branch)
+
+2) Rename the checkout with a version number embedded in its name as is
+conventional for code releases. Again, your version number may vary.
+
+Example:
+$ mv open-vpp open-vpp-0.0.0
+
+3) Ensure that the dpkg-buildpackage program is installed.
+
+E.g.,
+
+# apt-get install dpkg-dev
+
+4) From the PARENT directory of the debian/ directory, run:
+
+$ cd open-vpp-0.0.0
+$ dpkg-buildpackage -I .git -us -uc
+
+(The -us and -uc flags omit GPG signatures from the .dsc and .changes files,
+respectively. You can add them later, or if you are preparing a signed release
+and have the signing key on hand, leave off the flags.)
+
+5) Get rid of the source directory; you now either have a source package with
+which you can re-create it at any time, or there were problems with the build,
+and you should go back to your git checkout to fix them.
+
+$ rm -r open-vpp-0.0.0
+
+END
+
+vim:set ai et sw=4 ts=4 tw=80:
diff --git a/vpp/build-root/deb/debian/compat b/vpp/build-root/deb/debian/compat
new file mode 100755
index 00000000..ec635144
--- /dev/null
+++ b/vpp/build-root/deb/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/vpp/build-root/deb/debian/control b/vpp/build-root/deb/debian/control
new file mode 100644
index 00000000..643774e3
--- /dev/null
+++ b/vpp/build-root/deb/debian/control
@@ -0,0 +1,68 @@
+Source: vpp
+Section: net
+Priority: extra
+Maintainer: Cisco OpenVPP Packaging Team <bogus.address@cisco.com>
+Build-Depends: debhelper (>= 9), dkms, dh-systemd, chrpath
+Standards-Version: 3.9.4
+
+Package: vpp
+Architecture: any
+Depends: vpp-lib (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Vector Packet Processing--executables
+ This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
+ vpp - the vector packet engine
+ vpp_api_test - vector packet engine API test tool
+ vpp_json_test - vector packet engine JSON test tool
+
+Package: vpp-dbg
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Vector Packet Processing--debug symbols
+
+Package: vpp-dev
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Vector Packet Processing--development support
+ This package contains development support files for the VPP libraries
+ .
+
+Package: vpp-dpdk-dev
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Vector Packet Processing--development support
+ This package contains dpdk header files which match the dpdk version
+ compiled into the vpp executable
+ .
+
+Package: vpp-lib
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Vector Packet Processing--runtime libraries
+ This package contains the VPP shared libraries, including:
+ .
+ vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting.
+ dpdk - DPDK library
+ svm - vm library
+ vlib - vector processing library
+ vlib-api - binary API library
+ vnet - network stack library
+
+Package: vpp-plugins
+Architecture: any
+Depends: vpp (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Vector Packet Processing--runtime plugins
+ This package contains VPP plugins
+ .
+
+Package: vpp-dpdk-dkms
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: DPDK 2.1 igb_uio_driver
+ This package contains Linux kernel modules distributed with DPDK.
+
+Package: vpp-python-api
+Architecture: any
+Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
+Description: VPP Python API bindings
+ This package contains VPP python api bindings
+ .
diff --git a/vpp/build-root/deb/debian/copyright b/vpp/build-root/deb/debian/copyright
new file mode 100644
index 00000000..f9775c15
--- /dev/null
+++ b/vpp/build-root/deb/debian/copyright
@@ -0,0 +1,9 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: optional.
+Upstream-Contact: optional.
+Source: optional.
+Disclaimer: optional.
+Comment: optional.
+License: Apache-2.0
+Copyright: 2015 Cisco and/or its affiliates and others.
+
diff --git a/vpp/build-root/deb/debian/rules b/vpp/build-root/deb/debian/rules
new file mode 100755
index 00000000..186fa840
--- /dev/null
+++ b/vpp/build-root/deb/debian/rules
@@ -0,0 +1,31 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+# main packaging script based on dh7 syntax
+%:
+ dh $@ --with dkms --with systemd,python2
+
+override_dh_install:
+ dh_install --exclude .git
+ ../scripts/remove-rpath .
+
+override_dh_strip:
+ dh_strip --dbg-package=vpp-dbg
+
+override_dh_dkms:
+ dh_dkms -pvpp-dpdk-dkms
diff --git a/vpp/build-root/deb/debian/source/format b/vpp/build-root/deb/debian/source/format
new file mode 100755
index 00000000..89ae9db8
--- /dev/null
+++ b/vpp/build-root/deb/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/vpp/build-root/deb/debian/vpp-bin.README.Debian b/vpp/build-root/deb/debian/vpp-bin.README.Debian
new file mode 100644
index 00000000..19228969
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp-bin.README.Debian
@@ -0,0 +1,53 @@
+To run vpp with the debug shell:
+
+sudo vpp unix interactive
+
+which will result in a prompt that looks like:
+
+DBGvpd#
+
+To give it a spin, we can create a tap interface and try a simple ping
+(with trace).
+
+To create the tap:
+
+DBGvpd# tap connect foobar
+Created tap-0 for Linux tap 'foobar'
+DBGvpd# show int
+
+To assign it an ip address (and 'up' the interface):
+
+DBGvpd# set int ip address tap-0 192.168.1.1/24
+DBGvpd# set int state tap-0 up
+
+To turn on packet tracing for the tap interface:
+DBGvpd# trace add tapcli-rx 10
+
+Now, to set up and try the other end from the unix prompt:
+vagrant@vagrant-ubuntu-trusty-64:~$ sudo ip addr add 192.168.1.2/24 dev foobar
+vagrant@vagrant-ubuntu-trusty-64:~$ ping -c 3 192.168.1.1
+
+To look at the trace, back in the vpp CLI:
+DBGvpd# show trace
+
+And to stop tracing:
+
+DBGvpd# clear trace
+
+Other fun things to look at:
+
+The vlib packet processing graph:
+DBGvpd# show vlib graph
+
+which will produce output like:
+
+ Name Next Previous
+ip4-icmp-input error-punt [0] ip4-local
+ ip4-icmp-echo-request [1]
+ vpe-icmp4-oam [2]
+
+To read this, the first column (Name) is the name of the node.
+The second column (Next) is the name of the children of that node.
+The third column (Previous) is the name of the parents of this node.
+
+END
diff --git a/vpp/build-root/deb/debian/vpp-python-api.postinst b/vpp/build-root/deb/debian/vpp-python-api.postinst
new file mode 100644
index 00000000..ca1c856f
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp-python-api.postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+# after installing python-api files
+python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+easy_install --install-dir=$python2_sitedir -z $python2_sitedir/vpp_papi/vpp_papi-*.egg
diff --git a/vpp/build-root/deb/debian/vpp-python-api.prerm b/vpp/build-root/deb/debian/vpp-python-api.prerm
new file mode 100644
index 00000000..e6d92df9
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp-python-api.prerm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+# before removing python-api files
+python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+easy_install --install-dir=$python2_sitedir -mxNq vpp_papi
+
+# the egg has been copied during install
+rm $python2_sitedir/vpp_papi-*.egg
diff --git a/vpp/build-root/deb/debian/vpp.postinst b/vpp/build-root/deb/debian/vpp.postinst
new file mode 100644
index 00000000..78fcac22
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp.postinst
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+# try to set the required values now. This may or may not work.
+sysctl --system
+
+#DEBHELPER#
+
+exit 0
diff --git a/vpp/build-root/deb/debian/vpp.postrm b/vpp/build-root/deb/debian/vpp.postrm
new file mode 100644
index 00000000..ac16a459
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp.postrm
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+removed=
+
+# Unbind user-mode PCI drivers
+pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_generic -o -name vfio-pci`
+for d in $pci_dirs; do
+ for f in ${d}/*; do
+ [ -e "${f}/config" ] || continue
+ echo 1 > ${f}/remove
+ basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
+ removed=y
+ done
+done
+if [ -n "${removed}" ]; then
+ echo "There are changes in PCI drivers, rescaning"
+ echo 1 > /sys/bus/pci/rescan
+else
+ echo "There weren't PCI devices binded"
+fi
+
diff --git a/vpp/build-root/deb/debian/vpp.preinst b/vpp/build-root/deb/debian/vpp.preinst
new file mode 100644
index 00000000..d33cacfc
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp.preinst
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+# Add the vpp group
+groupadd -f -r vpp
diff --git a/vpp/build-root/deb/debian/vpp.service b/vpp/build-root/deb/debian/vpp.service
new file mode 100644
index 00000000..40549856
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=vector packet processing engine
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
+ExecStartPre=-/sbin/modprobe igb_uio
+ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf
+ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vpp/build-root/deb/debian/vpp.upstart b/vpp/build-root/deb/debian/vpp.upstart
new file mode 100644
index 00000000..f5908783
--- /dev/null
+++ b/vpp/build-root/deb/debian/vpp.upstart
@@ -0,0 +1,21 @@
+description "vector packet processing engine"
+author "Cisco Systems, Inc <listname@cisco.com>"
+
+manual
+
+respawn
+
+pre-start script
+ rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api || true
+ # should be there via dkms, but if not, start anyway
+ modprobe igb_uio || true
+end script
+
+
+script
+ exec vpp -c /etc/vpp/startup.conf
+end script
+
+post-stop script
+ rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api || true
+end script