From 4d2f86a1ebcfc952080386603354c4767d2c8825 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Fri, 18 Jan 2019 13:28:22 +0100 Subject: Rework of debian packaging Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb Signed-off-by: Damjan Marion Signed-off-by: Dave Barach --- Makefile | 7 ++- build-data/packages/vpp.mk | 7 +++ build-data/platforms.mk | 83 ------------------------- build-root/deb/debian/.gitignore | 14 ----- build-root/deb/debian/README.vpp | 56 ----------------- build-root/deb/debian/compat | 1 - build-root/deb/debian/control | 67 -------------------- build-root/deb/debian/copyright | 9 --- build-root/deb/debian/rules | 38 ----------- build-root/deb/debian/source/format | 1 - build-root/deb/debian/vpp-bin.README.Debian | 53 ---------------- build-root/deb/debian/vpp.postinst | 8 --- build-root/deb/debian/vpp.postrm | 21 ------- build-root/deb/debian/vpp.preinst | 4 -- build-root/deb/debian/vpp.service | 13 ---- build-root/deb/debian/vpp.upstart | 20 ------ build-root/scripts/csit-test-branch | 16 ----- build-root/scripts/find-api-core-contents | 23 ------- build-root/scripts/find-api-lib-contents | 19 ------ build-root/scripts/find-dev-contents | 49 --------------- build-root/scripts/find-plugins-contents | 28 --------- build-root/scripts/find-vpp-api-java-contents | 21 ------- build-root/scripts/find-vpp-api-lua-contents | 19 ------ build-root/scripts/find-vpp-api-python-contents | 21 ------- build-root/scripts/generate-deb-changelog | 50 --------------- build-root/scripts/remove-rpath | 38 +---------- src/CMakeLists.txt | 2 +- src/cmake/plugin.cmake | 3 +- src/pkg/CMakeLists.txt | 43 +++++++++++++ src/pkg/debian/changelog.in | 6 ++ src/pkg/debian/control | 75 ++++++++++++++++++++++ src/pkg/debian/copyright | 9 +++ src/pkg/debian/rules.in | 45 ++++++++++++++ src/pkg/debian/vpp.postinst | 8 +++ src/pkg/debian/vpp.postrm | 21 +++++++ src/pkg/debian/vpp.preinst | 4 ++ src/pkg/debian/vpp.service | 13 ++++ src/scripts/remove-rpath | 37 +++++++++++ src/vat/main.c | 34 ++++++++++ 39 files changed, 309 insertions(+), 677 deletions(-) delete mode 100644 build-root/deb/debian/.gitignore delete mode 100755 build-root/deb/debian/README.vpp delete mode 100755 build-root/deb/debian/compat delete mode 100644 build-root/deb/debian/control delete mode 100644 build-root/deb/debian/copyright delete mode 100755 build-root/deb/debian/rules delete mode 100755 build-root/deb/debian/source/format delete mode 100644 build-root/deb/debian/vpp-bin.README.Debian delete mode 100644 build-root/deb/debian/vpp.postinst delete mode 100644 build-root/deb/debian/vpp.postrm delete mode 100644 build-root/deb/debian/vpp.preinst delete mode 100644 build-root/deb/debian/vpp.service delete mode 100644 build-root/deb/debian/vpp.upstart delete mode 100755 build-root/scripts/csit-test-branch delete mode 100755 build-root/scripts/find-api-core-contents delete mode 100755 build-root/scripts/find-api-lib-contents delete mode 100755 build-root/scripts/find-dev-contents delete mode 100755 build-root/scripts/find-plugins-contents delete mode 100755 build-root/scripts/find-vpp-api-java-contents delete mode 100755 build-root/scripts/find-vpp-api-lua-contents delete mode 100755 build-root/scripts/find-vpp-api-python-contents delete mode 100755 build-root/scripts/generate-deb-changelog mode change 100755 => 120000 build-root/scripts/remove-rpath create mode 100644 src/pkg/CMakeLists.txt create mode 100644 src/pkg/debian/changelog.in create mode 100644 src/pkg/debian/control create mode 100644 src/pkg/debian/copyright create mode 100755 src/pkg/debian/rules.in create mode 100644 src/pkg/debian/vpp.postinst create mode 100644 src/pkg/debian/vpp.postrm create mode 100644 src/pkg/debian/vpp.preinst create mode 100644 src/pkg/debian/vpp.service create mode 100755 src/scripts/remove-rpath diff --git a/Makefile b/Makefile index 53cff856dd2..59f1a76b852 100644 --- a/Makefile +++ b/Makefile @@ -489,7 +489,10 @@ run-vat: @$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test pkg-deb: - $(call make,$(PLATFORM),install-deb) + $(call make,$(PLATFORM),vpp-package-deb) + +pkg-deb-debug: + $(call make,$(PLATFORM)_debug,vpp-package-deb) pkg-rpm: dist make -C extras/rpm @@ -575,5 +578,3 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-18.04) $(call banner,"Running tests") @make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test endif - - diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk index 2a1b9a77de9..9ce557a9946 100644 --- a/build-data/packages/vpp.mk +++ b/build-data/packages/vpp.mk @@ -44,3 +44,10 @@ vpp_configure = \ #vpp_make_args = --no-print-directory vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path' + +vpp-package-deb: vpp-install + @$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vpp -- package-deb + @find $(PACKAGE_BUILD_DIR) \ + -maxdepth 1 \ + \( -name '*.changes' -o -name '*.deb' -o -name '*.buildinfo' \) \ + -exec mv {} $(CURDIR) \; diff --git a/build-data/platforms.mk b/build-data/platforms.mk index d06720272c6..bc794ff48eb 100644 --- a/build-data/platforms.mk +++ b/build-data/platforms.mk @@ -15,86 +15,3 @@ $(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS), \ $(eval -include $(d)/platforms/*.mk)) -.PHONY: install-deb -install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES)) - @$(BUILD_ENV) ; \ - set -eu$(BUILD_DEBUG) ; \ - $(MAKE) -C $(MU_BUILD_ROOT_DIR) \ - $(patsubst %,%-install, \ - $(ROOT_PACKAGES)) || exit 1; \ - \ - : generate file manifests ; \ - find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \ - | sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \ - > deb/debian/vpp.install ; \ - \ - : core api definitions ; \ - ./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \ - deb/debian/vpp.install ; \ - \ - : need symbolic links in the lib pkg ; \ - find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \ - -print | egrep -e '*\.so\.*\.*\.*' \ - | grep -v plugins\/ \ - | sed -e 's:.*:../& /usr/lib/$(MACHINE)-linux-gnu:' \ - > deb/debian/vpp-lib.install ; \ - \ - : vnet api definitions ; \ - ./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \ - deb/debian/vpp-lib.install ; \ - \ - : dev package ; \ - ./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \ - deb/debian/vpp-dev.install ; \ - \ - : plugins package ; \ - ./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \ - deb/debian/vpp-plugins.install ; \ - \ - : vpp-api-lua package ; \ - ./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \ - deb/debian/vpp-api-lua.install ; \ - \ - : vpp-api-java package ; \ - ./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \ - deb/debian/vpp-api-java.install ; \ - \ - : bin package needs startup config ; \ - echo ../../src/vpp/conf/startup.conf /etc/vpp \ - >> deb/debian/vpp.install ; \ - \ - : and sysctl config ; \ - echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \ - >> deb/debian/vpp.install ; \ - \ - : bash completion for vppctl ; \ - echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \ - >> deb/debian/vpp.install ; \ - \ - : add log directory ; \ - echo /var/log/vpp/ \ - >> deb/debian/vpp.dirs ; \ - \ - : dev package needs a couple of additions ; \ - echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \ - >> deb/debian/vpp-dev.install ; \ - echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/vppapigen_c.py /usr/share/vpp \ - >> deb/debian/vpp-dev.install ; \ - echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/vppapigen_json.py /usr/share/vpp \ - >> deb/debian/vpp-dev.install ; \ - echo ../../extras/japi/java/jvpp/gen/jvpp_gen.py /usr/bin \ - >> deb/debian/vpp-dev.install ; \ - for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \ - echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \ - >> deb/debian/vpp-dev.install; \ - done; \ - \ - : generate changelog; \ - ./scripts/generate-deb-changelog \ - \ - : Go fabricate the actual Debian packages ; \ - ( \ - cd deb && \ - dpkg-buildpackage -us -uc -b \ - ) - diff --git a/build-root/deb/debian/.gitignore b/build-root/deb/debian/.gitignore deleted file mode 100644 index 489f8eb2c33..00000000000 --- a/build-root/deb/debian/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -changelog -files -*debhelper* -*.substvars -*.install -*.dirs -vpp/ -vpp-dev/ -vpp-lib/ -vpp-dbg/ -vppctl/ -vpp-api-lua/ -vpp-api-java/ -vpp-api-python/ diff --git a/build-root/deb/debian/README.vpp b/build-root/deb/debian/README.vpp deleted file mode 100755 index b343c786823..00000000000 --- a/build-root/deb/debian/README.vpp +++ /dev/null @@ -1,56 +0,0 @@ -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/build-root/deb/debian/compat b/build-root/deb/debian/compat deleted file mode 100755 index ec635144f60..00000000000 --- a/build-root/deb/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/build-root/deb/debian/control b/build-root/deb/debian/control deleted file mode 100644 index 4ed42b36e7d..00000000000 --- a/build-root/deb/debian/control +++ /dev/null @@ -1,67 +0,0 @@ -Source: vpp -Section: net -Priority: extra -Maintainer: Cisco OpenVPP Packaging Team -Build-Depends: debhelper (>= 9), dh-systemd, dh-python, chrpath, python-all -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: ${misc:Depends} -Description: Vector Packet Processing--debug symbols - -Package: vpp-dev -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} -Description: Vector Packet Processing--development support - This package contains development support files for the VPP libraries - . - -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. - 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-api-lua -Architecture: any -Depends: ${misc:Depends}, vpp (= ${source:Version}) -Description: VPP LUA API bindings - This package contains VPP lua api bindings - . - -Package: vpp-api-java -Architecture: any -Depends: ${misc:Depends}, vpp (= ${source:Version}) -Description: VPP Java API bindings - This package contains VPP java api bindings - . - -Package: vpp-api-python -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/build-root/deb/debian/copyright b/build-root/deb/debian/copyright deleted file mode 100644 index f9775c158f9..00000000000 --- a/build-root/deb/debian/copyright +++ /dev/null @@ -1,9 +0,0 @@ -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/build-root/deb/debian/rules b/build-root/deb/debian/rules deleted file mode 100755 index 39be1b57e04..00000000000 --- a/build-root/deb/debian/rules +++ /dev/null @@ -1,38 +0,0 @@ -#!/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 - -export PYBUILD_NAME = vpp-api-python -export PYBUILD_DIR = ../../src/vpp-api/python -export PYBUILD_DESTDIR_python2=debian/vpp-api-python/ -export PYBUILD_DISABLE_python2=test -export PYBUILD_SYSTEM=distutils - -# main packaging script based on dh7 syntax -%: - dh $@ --with systemd,python2 --buildsystem=pybuild - -override_dh_install: - dh_install --exclude .git - ../scripts/remove-rpath . - -override_dh_shlibdeps: - @dh_shlibdeps 2>&1 \ - | { grep -v -e "probably a plugin" -e "similar warnings have been skipped" || true; } - -override_dh_strip: - dh_strip --dbg-package=vpp-dbg diff --git a/build-root/deb/debian/source/format b/build-root/deb/debian/source/format deleted file mode 100755 index 89ae9db8f88..00000000000 --- a/build-root/deb/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/build-root/deb/debian/vpp-bin.README.Debian b/build-root/deb/debian/vpp-bin.README.Debian deleted file mode 100644 index 192289696ef..00000000000 --- a/build-root/deb/debian/vpp-bin.README.Debian +++ /dev/null @@ -1,53 +0,0 @@ -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/build-root/deb/debian/vpp.postinst b/build-root/deb/debian/vpp.postinst deleted file mode 100644 index 78fcac226a8..00000000000 --- a/build-root/deb/debian/vpp.postinst +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e - -# try to set the required values now. This may or may not work. -sysctl --system - -#DEBHELPER# - -exit 0 diff --git a/build-root/deb/debian/vpp.postrm b/build-root/deb/debian/vpp.postrm deleted file mode 100644 index 24b4842fd0a..00000000000 --- a/build-root/deb/debian/vpp.postrm +++ /dev/null @@ -1,21 +0,0 @@ -#!/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 ${f##*/} > ${d}/unbind - 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/build-root/deb/debian/vpp.preinst b/build-root/deb/debian/vpp.preinst deleted file mode 100644 index d33cacfc3fa..00000000000 --- a/build-root/deb/debian/vpp.preinst +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -e - -# Add the vpp group -groupadd -f -r vpp diff --git a/build-root/deb/debian/vpp.service b/build-root/deb/debian/vpp.service deleted file mode 100644 index 2e86941de8b..00000000000 --- a/build-root/deb/debian/vpp.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=vector packet processing engine -After=network.target - -[Service] -Type=simple -ExecStartPre=-/sbin/modprobe uio_pci_generic -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/build-root/deb/debian/vpp.upstart b/build-root/deb/debian/vpp.upstart deleted file mode 100644 index 4a451dd45d0..00000000000 --- a/build-root/deb/debian/vpp.upstart +++ /dev/null @@ -1,20 +0,0 @@ -description "vector packet processing engine" -author "Cisco Systems, Inc " - -manual - -respawn - -pre-start script - # should be there via dkms, but if not, start anyway - modprobe uio_pci_generic || 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 diff --git a/build-root/scripts/csit-test-branch b/build-root/scripts/csit-test-branch deleted file mode 100755 index 23cfae1e1b7..00000000000 --- a/build-root/scripts/csit-test-branch +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -echo latest diff --git a/build-root/scripts/find-api-core-contents b/build-root/scripts/find-api-core-contents deleted file mode 100755 index 8e24584be39..00000000000 --- a/build-root/scripts/find-api-core-contents +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -for i in $(find ${1}/vpp/share/vpp/api/core -name *.api.json -type f -print); do - echo ../${i} /usr/share/vpp/api/ >> ${2} -done -for i in $(find ${1}/vlib-api -name *.api.json -type f -print); do - echo ../${i} /usr/share/vpp/api/ >> ${2} -done - diff --git a/build-root/scripts/find-api-lib-contents b/build-root/scripts/find-api-lib-contents deleted file mode 100755 index b0742662415..00000000000 --- a/build-root/scripts/find-api-lib-contents +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -for i in $(find ${1}/vnet -name *.api.json -type f -print); do - echo ../${i} /usr/share/vpp/api/ >> ${2} -done - diff --git a/build-root/scripts/find-dev-contents b/build-root/scripts/find-dev-contents deleted file mode 100755 index 0f1104591b8..00000000000 --- a/build-root/scripts/find-dev-contents +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# includes -paths=`find $1/*/include -type f -print | grep -v '/dpdk/include/'` -rm -f $2 - -for path in $paths -do - relpath=`echo $path | sed -e 's:.*/include/::'` - dir=`dirname $relpath` - if [ $dir = "." ] ; then - echo ../$path /usr/include >> $2 - else - echo ../$path /usr/include/$dir >> $2 - fi -done - -# Perf monitor .json tarball -for i in $(find ${1}/vpp/share/vpp/plugins/perfmon -name *.tar.xz -type f -print); do - echo ../${i} /usr/share/vpp/plugins/perfmon >> ${2} -done - -# sample plugin -paths=`(cd ..; find src/examples/sample-plugin -type f -print | grep -v autom4te)` - -for path in $paths -do - relpath=`echo $path | sed -e 's:.*src/examples/::'` - dir=`dirname $relpath` - if [ $dir = "sample-plugin" ] ; then - echo ../../$path /usr/share/doc/vpp/examples/sample-plugin/ >> $2 - else - echo ../../$path \ - /usr/share/doc/vpp/examples/$dir >> $2 - fi -done diff --git a/build-root/scripts/find-plugins-contents b/build-root/scripts/find-plugins-contents deleted file mode 100755 index 9b39cc88e60..00000000000 --- a/build-root/scripts/find-plugins-contents +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -rm -f $2 - -for i in ${1}/vpp/lib/vpp_plugins/*.so; do - echo ../${i} /usr/lib/vpp_plugins >> ${2} -done - -for i in ${1}/vpp/lib/vpp_api_test_plugins/*.so; do - echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2} -done - -for i in $(find ${1}/plugins ${1}/vpp/share/vpp/api/plugins/ -name *.api.json -type f -print); do - echo ../${i} /usr/share/vpp/api/ >> ${2} -done diff --git a/build-root/scripts/find-vpp-api-java-contents b/build-root/scripts/find-vpp-api-java-contents deleted file mode 100755 index b4cf52fcf58..00000000000 --- a/build-root/scripts/find-vpp-api-java-contents +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -rm -f $2 - -for i in $(find ${1}/japi/share/java/ -type f -print); do - echo ../${i} /usr/share/java >> ${2} -done - diff --git a/build-root/scripts/find-vpp-api-lua-contents b/build-root/scripts/find-vpp-api-lua-contents deleted file mode 100755 index 576bbb82562..00000000000 --- a/build-root/scripts/find-vpp-api-lua-contents +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#i for now put everything into examples directory - -echo ../../src/vpp-api/lua /usr/share/vpp/examples > ${2} - diff --git a/build-root/scripts/find-vpp-api-python-contents b/build-root/scripts/find-vpp-api-python-contents deleted file mode 100755 index f6de6f2fffa..00000000000 --- a/build-root/scripts/find-vpp-api-python-contents +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -rm -f $2 - -for i in $(find ${1}/vpp/lib/python2.7/site-packages/ -type f -print); do - echo ../${i} /usr/lib/python2.7/site-packages/vpp_papi >> ${2} -done - diff --git a/build-root/scripts/generate-deb-changelog b/build-root/scripts/generate-deb-changelog deleted file mode 100755 index d3112f778ac..00000000000 --- a/build-root/scripts/generate-deb-changelog +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -CHANGELOG=deb/debian/changelog -DIST=unstable -FIRST=1 - -print_changelog_item() { - DATE=$(git log -1 --format=%cD ${TAG}) - DEBFULLNAME=$(git log -1 --format=%an ${TAG}) - DEBEMAIL=$(git log -1 --format=%ae ${TAG}) - - if [ ${FIRST} = 0 ]; then echo >> ${CHANGELOG}; fi - FIRST=0 - - echo "vpp (${VER}) ${DIST}; urgency=low" >> ${CHANGELOG} - echo >> ${CHANGELOG} - echo "${DESC}" >> ${CHANGELOG} - echo >> ${CHANGELOG} - echo " -- ${DEBFULLNAME} <${DEBEMAIL}> ${DATE}" >> ${CHANGELOG} -} - -VER=$(scripts/version) -TAG=HEAD -ADDS=$(echo ${VER} | sed -e 's/~.*//'| cut -s -d- -f2) - -rm -f ${CHANGELOG} - -if [ -n "${ADDS}" ]; then - DESC=" * includes ${ADDS} commits after $(echo ${VER}| cut -d- -f1) release" - print_changelog_item -fi - -for TAG in $(git tag -l 'v[0-9][0-9].[0-9][0-9]' | sort -r ); do - VER=$(echo ${TAG}| sed -e 's/^v//') - DESC=$(git tag -l -n20 ${TAG} | tail -n+2 | sed -e 's/^ */ /') - print_changelog_item -done diff --git a/build-root/scripts/remove-rpath b/build-root/scripts/remove-rpath deleted file mode 100755 index 3e20b06dbfa..00000000000 --- a/build-root/scripts/remove-rpath +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -if [ -z $1 ]; then - echo "Please specify path" - exit 1 -fi - -which chrpath &> /dev/null - -if [ $? -ne 0 ] ; then - echo "Please install chrpath tool" - exit 1 -fi - -libs=$(find $1 -type f -name \*.so\*) -execs=$(find $1 -type f -path \*/bin/\* ) - -for i in $libs $execs; do - chrpath $i 2> /dev/null | grep -q build-root - if [ $? -eq 0 ] ; then - chrpath -d $i - fi -done - diff --git a/build-root/scripts/remove-rpath b/build-root/scripts/remove-rpath new file mode 120000 index 00000000000..f7c05f1e908 --- /dev/null +++ b/build-root/scripts/remove-rpath @@ -0,0 +1 @@ +../../src/scripts/remove-rpath \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 09d132ad2ca..05ecd0b4e4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -97,7 +97,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") find_package(OpenSSL REQUIRED) set(SUBDIRS vppinfra svm vlib vlibmemory vlibapi vnet vpp vat vcl plugins - vpp-api tools/vppapigen tools/g2 tools/elftool tools/perftool cmake + vpp-api tools/vppapigen tools/g2 tools/elftool tools/perftool cmake pkg ) elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") set(SUBDIRS vppinfra) diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake index 1cff910db5f..af3033f0cbd 100644 --- a/src/cmake/plugin.cmake +++ b/src/cmake/plugin.cmake @@ -21,7 +21,7 @@ macro(add_vpp_plugin name) set(plugin_name ${name}_plugin) set(api_includes) if(NOT PLUGIN_COMPONENT) - set(PLUGIN_COMPONENT vpp-plugin-misc) + set(PLUGIN_COMPONENT vpp-plugin-core) endif() if(NOT PLUGIN_DEV_COMPONENT) if(NOT VPP_EXTERNAL_PROJECT) @@ -92,4 +92,3 @@ macro(add_vpp_plugin name) COMPONENT ${PLUGIN_COMPONENT} ) endmacro() - diff --git a/src/pkg/CMakeLists.txt b/src/pkg/CMakeLists.txt new file mode 100644 index 00000000000..a725e668405 --- /dev/null +++ b/src/pkg/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +get_cmake_property(VPP_COMPONENTS COMPONENTS) +string(REPLACE ";" " " VPP_COMPONENTS "${VPP_COMPONENTS}") + +execute_process( + COMMAND date -R + OUTPUT_VARIABLE TIMESTAMP + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +foreach(f rules changelog) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/debian/${f}.in + ${CMAKE_BINARY_DIR}/debian/${f} + ) +endforeach() + +foreach(f control copyright vpp.postinst vpp.postrm vpp.postinst vpp.service) + file(COPY + ${CMAKE_CURRENT_SOURCE_DIR}/debian/${f} + DESTINATION ${CMAKE_BINARY_DIR}/debian + ) +endforeach() + +file(WRITE ${CMAKE_BINARY_DIR}/debian/compat "9\n") + +add_custom_target(package-deb + COMMENT "Building .deb packages..." + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMAND "dpkg-buildpackage" "-us" "-uc" "-b" +) diff --git a/src/pkg/debian/changelog.in b/src/pkg/debian/changelog.in new file mode 100644 index 00000000000..4d9b87ab553 --- /dev/null +++ b/src/pkg/debian/changelog.in @@ -0,0 +1,6 @@ +vpp (@VPP_VERSION@) unstable; urgency=low + + * no description + + -- fd.io VPP @TIMESTAMP@ + diff --git a/src/pkg/debian/control b/src/pkg/debian/control new file mode 100644 index 00000000000..c9d4c4642de --- /dev/null +++ b/src/pkg/debian/control @@ -0,0 +1,75 @@ +Source: vpp +Section: net +Priority: extra +Maintainer: fd.io VPP Packaging Team +Build-Depends: debhelper (>= 9), + dh-systemd, + dh-python, + python-all +Standards-Version: 3.9.4 + +Package: vpp +Architecture: any +Depends: libvppinfra (= ${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: ${misc:Depends} +Description: Vector Packet Processing--debug symbols + +Package: vpp-dev +Architecture: any +Depends: libvppinfra-dev (= ${source:Version}), + ${misc:Depends}, + ${python:Depends} +Description: Vector Packet Processing--development support + This package contains development support files for the VPP libraries + . + +Package: libvppinfra +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: Vector Packet Processing--runtime libraries + This package contains the VPP shared libraries, including: + . + +Package: libvppinfra-dev +Architecture: any +Depends: ${misc:Depends} +Description: Vector Packet Processing--runtime libraries + This package contains the VPP shared libraries, including: + . + +Package: vpp-plugin-core +Architecture: any +Depends: vpp (= ${source:Version}), + ${misc:Depends} +Description: Vector Packet Processing--runtime core plugins + This package contains VPP core plugins + . + +Package: vpp-plugin-dpdk +Architecture: any +Depends: vpp (= ${source:Version}), + ${misc:Depends} +Description: Vector Packet Processing--runtime dpdk plugin + This package contains the VPP dpdk plugin + . + +Package: vpp-api-python +Architecture: any +Depends: vpp (= ${source:Version}), + ${python2:Depends}, + ${misc:Depends} +Description: VPP Python API bindings + This package contains VPP python api bindings + . diff --git a/src/pkg/debian/copyright b/src/pkg/debian/copyright new file mode 100644 index 00000000000..f9775c158f9 --- /dev/null +++ b/src/pkg/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/src/pkg/debian/rules.in b/src/pkg/debian/rules.in new file mode 100755 index 00000000000..4d2bb408116 --- /dev/null +++ b/src/pkg/debian/rules.in @@ -0,0 +1,45 @@ +#!/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 + +export PYBUILD_NAME = vpp-api-python +export PYBUILD_DIR = @CMAKE_SOURCE_DIR@/vpp-api/python +export PYBUILD_DESTDIR_python2=debian/vpp-api-python/ +export PYBUILD_DISABLE_python2=test +export PYBUILD_SYSTEM=distutils + +# main packaging script based on dh7 syntax +%: + dh $@ --with systemd,python2 --buildsystem=pybuild + +override_dh_shlibdeps: + @dh_shlibdeps -X_plugin 2>&1 \ + | { grep -v -e "probably a plugin" || true; } + +override_dh_strip: + dh_strip --dbg-package=vpp-dbg + +DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +override_dh_install: + for c in @VPP_COMPONENTS@; do \ + @CMAKE_COMMAND@ \ + -D CMAKE_INSTALL_CONFIG_NAME=@CMAKE_BUILD_TYPE@ \ + -D CMAKE_INSTALL_COMPONENT=$$c \ + -D CMAKE_INSTALL_PREFIX=@CMAKE_BINARY_DIR@/debian/$$c \ + -P @CMAKE_BINARY_DIR@/cmake_install.cmake ; \ + if [ -d debian/$$c/lib ] ; then \ + mv debian/$$c/lib debian/$$c/$(DEB_HOST_MULTIARCH) ; \ + mkdir -p debian/$$c/usr/lib ; \ + mv debian/$$c/$(DEB_HOST_MULTIARCH) debian/$$c/usr/lib ; \ + fi ; \ + if [ -d debian/$$c/bin ] ; then \ + mv debian/$$c/bin debian/$$c/usr/bin ; \ + fi ; \ + @CMAKE_SOURCE_DIR@/scripts/remove-rpath debian/$$c ; \ + done diff --git a/src/pkg/debian/vpp.postinst b/src/pkg/debian/vpp.postinst new file mode 100644 index 00000000000..78fcac226a8 --- /dev/null +++ b/src/pkg/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/src/pkg/debian/vpp.postrm b/src/pkg/debian/vpp.postrm new file mode 100644 index 00000000000..24b4842fd0a --- /dev/null +++ b/src/pkg/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 ${f##*/} > ${d}/unbind + 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/src/pkg/debian/vpp.preinst b/src/pkg/debian/vpp.preinst new file mode 100644 index 00000000000..d33cacfc3fa --- /dev/null +++ b/src/pkg/debian/vpp.preinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +# Add the vpp group +groupadd -f -r vpp diff --git a/src/pkg/debian/vpp.service b/src/pkg/debian/vpp.service new file mode 100644 index 00000000000..2e86941de8b --- /dev/null +++ b/src/pkg/debian/vpp.service @@ -0,0 +1,13 @@ +[Unit] +Description=vector packet processing engine +After=network.target + +[Service] +Type=simple +ExecStartPre=-/sbin/modprobe uio_pci_generic +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/src/scripts/remove-rpath b/src/scripts/remove-rpath new file mode 100755 index 00000000000..3e20b06dbfa --- /dev/null +++ b/src/scripts/remove-rpath @@ -0,0 +1,37 @@ +#!/bin/bash + +# Copyright (c) 2015 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ -z $1 ]; then + echo "Please specify path" + exit 1 +fi + +which chrpath &> /dev/null + +if [ $? -ne 0 ] ; then + echo "Please install chrpath tool" + exit 1 +fi + +libs=$(find $1 -type f -name \*.so\*) +execs=$(find $1 -type f -path \*/bin/\* ) + +for i in $libs $execs; do + chrpath $i 2> /dev/null | grep -q build-root + if [ $? -eq 0 ] ; then + chrpath -d $i + fi +done + diff --git a/src/vat/main.c b/src/vat/main.c index 295ccec2515..a5421140fb3 100644 --- a/src/vat/main.c +++ b/src/vat/main.c @@ -15,6 +15,7 @@ #include "vat.h" #include "plugin.h" #include +#include vat_main_t vat_main; @@ -283,6 +284,37 @@ setup_signal_handlers (void) } } +static void +vat_find_plugin_path () +{ + extern char *vat_plugin_path; + char *p, path[PATH_MAX]; + int rv; + u8 *s; + + /* find executable path */ + if ((rv = readlink ("/proc/self/exe", path, PATH_MAX - 1)) == -1) + return; + + /* readlink doesn't provide null termination */ + path[rv] = 0; + + /* strip filename */ + if ((p = strrchr (path, '/')) == 0) + return; + *p = 0; + + /* strip bin/ */ + if ((p = strrchr (path, '/')) == 0) + return; + *p = 0; + + s = format (0, "%s/lib/" CLIB_TARGET_TRIPLET "/vpp_api_test_plugins:" + "%s/lib/vpp_api_test_plugins", path, path); + vec_add1 (s, 0); + vat_plugin_path = (char *) s; +} + int main (int argc, char **argv) { @@ -309,6 +341,8 @@ main (int argc, char **argv) vec_validate (vam->cmd_reply, 0); vec_reset_length (vam->cmd_reply); + vat_find_plugin_path (); + unformat_init_command_line (a, argv); while (unformat_check_input (a) != UNFORMAT_END_OF_INPUT) -- cgit 1.2.3-korg