76 Commits

Author SHA1 Message Date
Laszlo Kiraly
6b4aa2b7f4 build: generate debug info rpm packages for opensuse
Enabling debug info RPM creation in spec file.

Type: fix

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: Id284b135ec4125905145f7902a6e1cf42ba65aa4
2023-07-06 14:46:41 +00:00
Christian Svensson
184a70a58c build: add Rocky Linux 9 support
Currently only RHEL/CentOS 8 and Fedora are supported.
EL9 is a middle ground and thus require some different dependencies.

Type: feature

Signed-off-by: Christian Svensson <blue@cmd.nu>
Change-Id: I7be79e61994800bb796d4e9141f0ff6ad8bdead2
2023-03-06 14:22:36 +00:00
Huawei LI
abf81c3add build: fix lib install dir and add vat2 lib install when build rpm.
Type: fix

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I5ac557756ff2b3de13ce328a27ffdd289ab3173e
2022-11-13 01:29:07 +00:00
Laszlo Kiraly
987318e0d1 build: Cleanup python2 from suse build and uplift opensuse version
- default to opensuse-leap 15.4, no python2 support in this version
 - deprecate version openSUSE 15.0, openSUSE 15.3 still supported

Type: make

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: Ic7178ff5238e2669bc45166c1f13d3f077f6069b
Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
2022-09-07 13:04:14 +00:00
Florin Coras
66d6146ad5 rpm-packaging: remove mbedtls dependency
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idf325b7f1ce75e973dbea4d5836609590c85dc38
2022-04-18 16:22:15 +00:00
Laszlo Kiraly
bf91b48cbb build: opensuse: remove nasm, change to clang
Type: make

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: I3951be5be95a7fb76f54c4ce0daab0748cb8419c
2022-04-08 16:16:19 +00:00
Florin Coras
91a46cb1ff tls: remove pkg dependencies on mbedtls
The tlsmbedtls plugin should only be built if mbedtls libraries are
present.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I24364177d24ea744f24f808f492be08adff3690b
2022-03-11 19:04:46 +00:00
Dave Wallace
bfcd239682 build rpm-packaging: Remove boost dependencies from VOM
- VOM was deprecated in VPP 21.06, but the boost library
  dependencies did not get cleaned up.

Type: make

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I0fb860a7a37676c1a1a0981c91f383882d9a820a
2021-11-30 19:59:02 +00:00
Laszlo Kiraly
e56008519b build: (opensuse) Revert build remove opensuse build infra
Added missing deps
Removed Thumbleweed support
Changed python2 to python3
Added Dockerfile for suse-leap build

Type: make
Change-Id: Ie73d2382a73ebc9d4475ace1a8f818fe38cf40c0
Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
2021-11-19 15:06:08 +00:00
Tianyu Li
fa6e7aacfc build: fix centos rpm build
When build vpp-plugins rpm package, found

/home/vpp/build-root/rpmbuild/vpp-21.10/build-root/\
install-vpp-native/vpp/lib/vpp_plugins: No such file or directory

RPM build errors:
File not found: /home/vpp/build-root/rpmbuild/../usr/lib/vpp_plugins/*

After e3cf4d0 ("build: use GNUInstallDirs install destinations")
vpp_plugins on centos src path changed from lib to lib64
Update RPM spec file accordingly.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I9c4d91f97f2faa474bce28893ab763b414f759b8
2021-10-08 11:15:51 +08:00
Matthew Smith
48a13f38fa build: include vat2 in RPM file list
Type: fix

Building an RPM with 'make pkg-rpm' fails because /usr/bin/vat2 is
installed but is not included in %files. Add it.

Change-Id: I686b291e4419d39141f0f87da963b413d11ab0f8
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-08-20 11:37:19 +00:00
Paul Vinciguerra
49d601a70f build: stop trying to build py2 versions of vpp_papi
Python2 was EOL's in Jan 2020.
RHEL6 was EOL'd in Nov 2020.

Type: fix

Change-Id: Id6910258cfe808c1e6a8fe16334c23d7991509dc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-14 21:54:17 +00:00
Ole Troan
df87f8092f api: vat2 and json autogeneration for api messages
VAT2: A completely auto-generated replacement of VAT.
Reads input message in JSON from stdin and outputs received messages in JSON.

A VAT2 plugin is automatically built for a .api file.
There no longer a need for a separate _test.c.

Example:
vat2 show_version {}
{
        "_msgname":     "show_version_reply",
        "retval":       0,
        "program":      "vpe",
        "version":      "21.01-rc0~411-gf6eb348a6",
        "build_date":   "2020-11-19T09:49:25",
        "build_directory":      "/vpp/autogen3"
}

vat2 sw_interface_dump '{"sw_if_index": -1,
                         "name_filter_valid": 0,
                         "name_filter": ""}'
[{
                "_msgname":     "sw_interface_details",
                "sw_if_index":  0,
                "sup_sw_if_index":      0,
                "l2_address":   "00:00:00:00:00:00",
                "flags":        "Invalid ENUM",
                "type": "IF_API_TYPE_HARDWARE",
                "link_duplex":  "LINK_DUPLEX_API_UNKNOWN",
                "link_speed":   0,
                "link_mtu":     0,
                "mtu":  [0, 0, 0, 0],
                "sub_id":       0,
                "sub_number_of_tags":   0,
                "sub_outer_vlan_id":    0,
                "sub_inner_vlan_id":    0,
                "sub_if_flags": "Invalid ENUM",
                "vtr_op":       0,
                "vtr_push_dot1q":       0,
                "vtr_tag1":     0,
                "vtr_tag2":     0,
                "outer_tag":    0,
                "b_dmac":       "00:00:00:00:00:00",
                "b_smac":       "00:00:00:00:00:00",
                "b_vlanid":     0,
                "i_sid":        0,
                "interface_name":       "local0",
                "interface_dev_type":   "local",
                "tag":  ""
        }]

This is the first phase and vat2 is not integrated in packaging yet.

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib45ddeafb180ea7da8c5dc274a9274d7a4edc876
Signed-off-by: Ole Troan <ot@cisco.com>
2020-11-25 08:25:50 +00:00
Damjan Marion
8c1afb56b6 misc: deprecate VOM
Type: make
Change-Id: Ifb3e52af93d24fcc2f2e6a0c408e16902a2fe553
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-16 15:33:18 +02:00
Dave Wallace
27b50fea14 build: touch files when extracting rpm tarballs
Type: fix

- Long story short, intermittently centos jobs have been
  failing with clock skew issues. When someone commits a
  patch on a machine with the date ahead of UTC, then clock
  skew will be encountered when extracting the RPM source
  tarball. See [0] and [1] for details.

- Replace 'make bootstrap' with 'make install-dep' in
  RPM package build specfile.

[0] https://unix.stackexchange.com/questions/164807/does-git-archive-use-the-wrong-file-timestamp
[1] https://git.fd.io/vpp/tree/Makefile#n380

Change-Id: Iebfb9eb2e26c1f2e4488e871da86d0c60b9f4048
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-09-21 07:00:26 +00:00
Dave Wallace
bc35f469c8 build: remove opensuse build infra
- VPP on opensuse has not been supported
  for several releases.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I2b5316ad5c20a843b8936f4ceb473f932a5338d9
2020-09-21 06:59:48 +00:00
Yichen Wang
466872f089 build: fix the the build on centos/rhel 8
1. Remove uncessary runtime dependency;
2. Add missing build dependency;
3. Fix runtime dependency for api-python3 RPM;

Type: make

Change-Id: I2700f1a15112effba8d1527aca6467158f81f486
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2020-09-15 00:19:47 -07:00
Damjan Marion
5505ee8904 misc: deprecate elftool
Type: make

Change-Id: I34fec1c40ef660177c266517eaf41d60827609f4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-07 16:47:33 +00:00
Damjan Marion
162330f25a build: rework x86 CPU variants
Type: improvement
Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30 13:25:29 +02:00
Renato Botelho do Couto
1d94ab5f1b misc: Fix vpp-selinux-policy dependency on CentOS 8
policycoreutils-python is now called python3-policycoreutils on
CentOS 8.

Type: fix

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: I46264c66a2a719d546e0926f3bd716e986461963
2020-03-06 14:15:18 -06:00
Renato Botelho do Couto
c025329bb2 misc: Add CentOS 8 package support
Type: feature

Added missing dependencies on RPM spec file and install-dep

Ticket: VPP-1800

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: I91d39c94b3f03c213249dff42b264718ef772bdb
2019-12-17 18:23:43 +00:00
Oliver Giles
dc20371f83 build: export vapi generation in vpp-dev
Adds the higher-level vapi generation to cmake/api.cmake and exposes
the necessary python scripts in vpp-dev, so that out-of-tree/downstream
plugins can also leverage the more convenient API.

Type: feature

Signed-off-by: Oliver Giles <oliver_g@radwin.com>
Change-Id: I8c40a14d27ba3cb972c6907632e03c0e7b0ce982
2019-12-17 18:05:15 +00:00
Ian Wells
13cef0cc2c papi: Revert vpp-api-python to py2, add py3 pkg
A previous commit, ca3d38ae18c21ce37212f0d5d5f4a1702429e70c, converts
the vpp-api-python package from a python2 library to a python3 one.
This changes the behaviour of the package and breaks anything that
uses it as a dependency.

This change reverts the package behaviour to a python2 package, and
additionally adds a *separate* python3 package for correct python3
behaviour.

Type: fix
Fixes: VPP-1738
Signed-Off-By: Ian Wells <iawells@cisco.com>
Change-Id: I54eb45156eb6e00fc4cd5b48e7a0aa17fd2f43f7
Signed-off-by: Dave Barach <dave@barachs.net>
2019-08-12 23:39:40 +00:00
Benoît Ganne
6d72c175ed docs: how to enable coredump with systemd
Type: docs

Change-Id: I1f657389fec716cc6cdc942803e65f861ffea5f5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 01:51:59 +00:00
Benoît Ganne
f0917bd5a7 rpm: VPP-1674: exclude external headers from rpm
External libraries headers such as DPDK, libibverb, quicly, etc. should
not be packaged in vpp-dev RPM.
Only package headers from vpp/ and vom/ subdirs.

Change-Id: Ief1454bd1261c8cf4dcd3b105e28f6852439e896
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-23 16:31:27 +02:00
Thomas F Herbert
ca3d38ae18 Freshen RPM dependencies in vpp specfile.
VPP-1650

Also update specfile for fedora. Also update and
rationalize python3 and python2 dependencies
for CentOS.

Change-Id: Ia87abfe7b7080ecd07e485e6c32270fda56a496a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2019-05-01 18:58:33 +00:00
Matthew Smith
4ed003958f rpm: set exec bits on plugins
Install plugin shared libraries with permissions set to 0755
instead of 0644 during RPM builds.

When building with rpmbuild, if a compiled file is not executable,
it's source files and symbols are not included in the vpp-debuginfo RPM.
This makes debugging problems with DPDK (and other plugins probably)
difficult unless you are running on the machine where the build
was generated.

Change-Id: I9cc92af855a66366ec3b81a87b82bfd9994bc180
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-03-06 11:36:34 +00:00
Michal Cmarada
4e633e1043 VPP-1504: Remove JVPP
As part of JVPP migration this removes JVPP completely from VPP.

Change-Id: I6b74e7961aa474ae471e63fe43a624cd9fc3659b
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2019-02-19 15:14:02 +00:00
Thomas F Herbert
6eb61639de Build changes required for Fedora and CentOS
VPP-1511

cmake is the dep for Fedora but cmake3 is for CentOS 7.
Centos: explicitly install epel-release on Centos.
Epel requirement is now explicit for cmake3, and ninja-build.
Remove references to Fedora 25 which is EOL.

Change-Id: I1548ddf2e5421097ac0ddc2d99abce7582d0d593
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2018-12-18 12:43:33 +00:00
Onong Tayeng
9b0ce0215b Fix permission for vpp_papi
The permission for the top-level vpp_papi dir under
/usr/lib/python2.7/site-packages is set to 644 which means that
non-root users cannot import vpp_papi. As a result, devstack setup
with VPP/networking-vpp fails since it is run as non-root user.

Change-Id: Id85b468b2dcc92efb3a64c51ffb23ef6d596e4ad
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
2018-11-23 11:43:46 +00:00
Mohsin Kazmi
7b2017ddf7 rpm: Fix the spec file to look into right directories
Change-Id: If526e9f17226d7c371a8a98b9ac932196dab547a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-26 15:50:09 +00:00
Paul Vinciguerra
9ce6a21aaa Fix: vppapigen make build fails on fresh install
Steps to reproduce:
  vagrant@localhost:/vagrant$ build-root/vagrant/build.sh
  ...
  @@@@ Building vpp in /vagrant/build-root/build-vpp-native/vpp @@@@
  [51/1169] Generating API header /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
  FAILED: cd /vagrant/build-root/build-vpp-native/vpp/vlibmemory && mkdir -p /vagrant/build-root/build-vpp-native/vpp/vlibmemory && /vagrant/src/tools/vppapigen/vppapigen --includedir /vagrant/src --input /vagrant/src/vlibmemory/memclnt.api JSON --output /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
  AttributeError: 'module' object has no attribute 'dumps'

  This seems to be due to JSON.py namespace colliding with the standard lib json.py

Change-Id: If389e4e05ef0c166b0c2b3bef7ec0185298679a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-13 00:32:35 +00:00
Damjan Marion
79dcbc74cd Always use 'lib' instead of 'lib64'
It is packaging responsibility to put libs in the right place.
Use of lib64 resulted in huge amount of files with hardcoded lib64.
This patch simplifies things...

Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 16:38:59 +00:00
Matthew Smith
d790c7e1fa update regex used by rpm build to find lib files
The old expression was '*.so.*.*.*' to find shared library
files with 3 components in the version.

Building from master gives you files with 2 components in
the version (e.g. libvnet.so.18.10). So most libs were not
getting included in vpp-lib.

Change-Id: Ib89d2f5aeb2417eed1b6b851089b9d22f540a226
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-09-07 19:39:54 +00:00
Damjan Marion
855e26868f Switch to cmake
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-02 11:24:12 +02:00
Marco Varlese
70fee2df33 SUSE: fix spec to generate RPMs
Change-Id: I36ec5136d0f100c8277a19f89c8f6c9640e0614e
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-08-30 15:45:06 +00:00
Marco Varlese
aa839cab98 SUSE: rpm-packaging fixes
Change-Id: Ic7ddc34bbb2fe414d41a083efd8caf35a12488ab
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-08-21 14:46:28 +00:00
Ole Troan
1d20f4748c PAPI: Move unit tests to fix packaging issues.
Change-Id: I67a0f168254367c657eb11d4413f9dc0c5356b3c
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-07 11:47:35 +02:00
Ole Troan
b199e98fef PAPI: Union pad at the end of short fields instead of at head.
Hopefully that's going to be consistent across platforms, compilers and ABI.

Change-Id: I0b82565288d88fd046278d4d8288ec1488273ba5
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-03 15:44:46 +00:00
Damjan Marion
c76d6e2c4a Temporrary disable japi packaging for opensuse
To unbreak verify job, caused by following message:

19:06:58 RPM build errors:
19:06:58     File not found: /w/workspace/vpp-verify-master-osleap15/build-root/rpmbuild/BUILDROOT/vpp-18.10-rc0~105_g0578e3f9~b1992.x86_64/usr/share/java/*
19:06:58 make[2]: *** [Makefile:50: RPM] Error 1
19:06:58 make[2]: Leaving directory '/w/workspace/vpp-verify-master-osleap15/extras/rpm'
19:06:58 make[1]: *** [Makefile:476: pkg-rpm] Error 2
19:06:58 make[1]: Leaving directory '/w/workspace/vpp-verify-master-osleap15'
19:06:58 make: *** [Makefile:541: verify] Error 2
19:06:58 Build step 'Execute shell' marked build as failure

Change-Id: Ie1300cbf70bedb9dd861a3f31feeddf1eb810eaf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-02 23:39:18 +02:00
Damjan Marion
cc4a5e8089 Move java api to extras/
Change-Id: Ibd5cbbdfb22a235442cddaebc9eae9a3c4e35ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-01 20:28:53 +00:00
Marco Varlese
abec942075 openSUSE: spec file update to reflect latest deps
Change-Id: I3c04956400a2e88d331f43d1b4865ee2c75e7bc9
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-07-10 10:12:38 +00:00
Ole Troan
a7564e8004 Python API: Add enum and union support.
As well as a rewrite of the encoders/decoders to make it more readable and extensible.
(Re-commit after fix to verify build.)

Change-Id: Ic244d3cebe070bb2570491f8a24f4a1e203f889a
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22 03:00:45 +00:00
Ole Trøan
61debaaaf2 Revert "Python API: Add enum and union support."
This reverts commit a5ee900fb75201bbfceaf13c8bc57a13ed094988.

Some of the unit tests breaks. Backing out until fixed.

Change-Id: I1846fb417db44a2a772f7b59cda8bcfe6d39f8c3
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-18 18:30:09 +00:00
Ole Troan
a5ee900fb7 Python API: Add enum and union support.
As well as a rewrite of the encoders/decoders to make it more readable and extensible.

Change-Id: I253369ac76303922bf9c11377622c8974fa92f19
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-17 15:21:00 +00:00
Igor Mikhailov (imichail)
3b854a5cb8 MLX DPDK glue: exclude dependency on OFED libraries
MLX DPDK mlx5_glue.so, compiled under RTE_LIBRTE_MLX5_DLOPEN_DEPS,
provides a run-time check for OFED libraries.
To do so, it links with -libverbs -lmlx5 so that the binding could
occur or fail at runtime (see DPDK 59b91be and VPP 59b91be).
However RPM install fails on systems without OFED installed since
RPM spec has an entry "Requires: libmlx5".
To overcome this, exclude such requirement from the spec.

Same applies to mlx4_glue.so, compiled under RTE_LIBRTE_MLX4_DLOPEN_DEPS

Change-Id: I0ff6efc49581104743cc7e5b1f7cdbc1665ce9ba
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-05-19 11:25:09 +00:00
Thomas F Herbert
6168623290 Add python lex and yacc to spec file build requirements.
Change-Id: Icf1a30c9df4d3298407c00383020debe99acdbff
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2018-05-04 21:53:09 +00:00
Thomas F Herbert
b42b77b31c Restore building of debuginfo RPMs
JIRA: VPP-1227

Remove rpm tmp dir build debuginfo rpms.
Reverses commits to fix a build problem with old versions of rpmbuild
that prevented builds in chrooted environments with short paths
and short project names.

Change-Id: I852696dccc984bf4882fd3ca9ec4c8da080bdb41
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2018-04-08 13:34:45 +00:00
Thomas F Herbert
6673178d48 Remove subunit from Centos requirements.
JIRA: VPP-1229

Subunit and Subunit-devel in Fedora and Epel but not Centos.
This patch moves the Fedora from the Centos specific requirements.

Change-Id: I093a4571cddf14af5ee2827ba8ee00c7bcbe6fc0
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2018-04-08 13:34:07 +00:00
Thomas F Herbert
5f56c091ce Remove mbedtls from build requirement for Centos
Although mbedtls is in Fedora and Epel, it is not
in Centos yet. It is not strictly necessary for TLS
which also can use openssl.

Change-Id: Id62d52000f9ecda2fc10d1938f02be1142fa5bdb
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2018-04-06 02:56:03 +00:00