blob: db775a1e7bde1d970d438d0f6f6e8578833103d2 [file] [log] [blame]
Thomas F Herbert4b0ac822017-08-29 16:07:51 -04001%bcond_without aesni
Renato Botelho do Coutoe266ea32017-11-30 15:41:22 -06002%{!?_topdir:%define _topdir %(pwd)}
Thomas F Herbert20a29c72016-10-13 18:36:50 -04003%define _vpp_build_dir build-tool-native
Ed Warnickecb9cada2015-12-08 15:45:58 -07004%define _unitdir /lib/systemd/system
Ed Warnickecb9cada2015-12-08 15:45:58 -07005%define _builddir %{_topdir}
Thomas F Herbertb42b77b2018-04-06 15:13:41 -04006%define _mu_build_dir %{_topdir}/%{name}-%{_version}/build-root
Igor Mikhailov (imichail)c442e612017-05-18 19:46:17 -07007%define _vpp_tag %{getenv:TAG}
8%if "%{_vpp_tag}" == ""
9%define _vpp_tag vpp
10%endif
11%define _vpp_install_dir install-%{_vpp_tag}-native
Ed Warnickecb9cada2015-12-08 15:45:58 -070012
Ole Troan57c3d662016-09-12 22:00:32 +020013# Failsafe backport of Python2-macros for RHEL <= 6
14%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
15%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
16%{!?python_version: %global python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")}
17%{!?__python2: %global __python2 %{__python}}
18%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
19%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
20%{!?python2_version: %global python2_version %{python_version}}
21
22%{!?python2_minor_version: %define python2_minor_version %(%{__python} -c "import sys ; print sys.version[2:3]")}
23
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +030024%{?systemd_requires}
25
Billy McFall28cf3b72018-01-15 17:54:52 -050026
27# SELinux Related definitions
28%global selinuxtype targeted
29%global moduletype services
30%global modulenames vpp-custom
31
32# Usage: _format var format
33# Expand 'modulenames' into various formats as needed
34# Format must contain '$x' somewhere to do anything useful
35%global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done;
36
37# Relabel files
38%global relabel_files() \ # ADD files in *.fc file
39
40# Version of distribution SELinux policy package
41%global selinux_policyver 3.13.1-128.6.fc22
42
43
Ed Warnickecb9cada2015-12-08 15:45:58 -070044Name: vpp
45Summary: Vector Packet Processing
Billy McFallf6e3ad02017-07-05 09:33:30 -040046License: ASL 2.0
Ed Warnickecb9cada2015-12-08 15:45:58 -070047Version: %{_version}
48Release: %{_release}
Billy McFall28cf3b72018-01-15 17:54:52 -050049Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python
Damjan Mariona1bd0232016-12-19 19:08:11 +010050BuildRequires: systemd, chrpath
Thomas F Herberte4128912017-10-09 15:03:55 -040051BuildRequires: check, check-devel
Thomas F Herbert6eb61632018-11-27 15:57:30 -050052%if 0%{?fedora}
Thomas F Herbert66731782018-03-05 17:21:56 -050053BuildRequires: subunit, subunit-devel
Thomas F Herbert440751b2017-09-11 08:58:23 -040054BuildRequires: compat-openssl10-devel
Thomas F Herbert61686232018-05-03 19:17:13 -040055BuildRequires: python2-devel, python2-virtualenv, python2-ply
Thomas F Herbert5f56c092018-04-05 16:09:58 -040056BuildRequires: mbedtls-devel
Thomas F Herbert6eb61632018-11-27 15:57:30 -050057BuildRequires: cmake
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040058%else
Thomas F Herbert6eb61632018-11-27 15:57:30 -050059%if 0%{rhel} == 7
60BuildRequires: devtoolset-7-toolchain
Thomas F Herbert440751b2017-09-11 08:58:23 -040061BuildREquires: openssl-devel
Thomas F Herbert61686232018-05-03 19:17:13 -040062BuildRequires: python-devel, python-virtualenv, python-ply
Thomas F Herbert6eb61632018-11-27 15:57:30 -050063BuildRequires: cmake3
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040064%endif
65%endif
Thomas F Herbert440751b2017-09-11 08:58:23 -040066BuildRequires: libffi-devel
Michal Cmarada4e633e12019-01-31 10:57:40 +010067BuildRequires: glibc-static, yum-utils, redhat-lsb
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040068BuildRequires: apr-devel
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040069BuildRequires: numactl-devel
70BuildRequires: autoconf automake libtool byacc bison flex
Neale Ranns2ea2e422017-11-07 05:20:16 -080071BuildRequires: boost boost-devel
Billy McFall28cf3b72018-01-15 17:54:52 -050072BuildRequires: selinux-policy selinux-policy-devel
Ed Warnickecb9cada2015-12-08 15:45:58 -070073
Thomas F Herbertb60f4962017-07-19 19:17:15 -040074Source: %{name}-%{_version}-%{_release}.tar.xz
75# Source: vpp-latest.tar.xz
Thomas F Herbert20a29c72016-10-13 18:36:50 -040076
Ed Warnickecb9cada2015-12-08 15:45:58 -070077%description
Damjan Marion08ff7e02016-01-20 13:45:36 +010078This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
79vpp - the vector packet engine
80vpp_api_test - vector packet engine API test tool
81vpp_json_test - vector packet engine JSON test tool
Ed Warnickecb9cada2015-12-08 15:45:58 -070082
83%package lib
84Summary: VPP libraries
85Group: System Environment/Libraries
Billy McFall28cf3b72018-01-15 17:54:52 -050086Requires: vpp-selinux-policy = %{_version}-%{_release}
Ed Warnickecb9cada2015-12-08 15:45:58 -070087
88%description lib
89This package contains the VPP shared libraries, including:
90vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting.
Ed Warnickecb9cada2015-12-08 15:45:58 -070091svm - vm library
92vlib - vector processing library
93vlib-api - binary API library
94vnet - network stack library
95
96%package devel
97Summary: VPP header files, static libraries
98Group: Development/Libraries
99Requires: vpp-lib
100
101%description devel
Thomas F Herbert3977a212016-10-01 18:09:33 -0400102This package contains the header files for VPP.
103Install this package if you want to write a
104program for compilation and linking with vpp lib.
105vlib
106vlibmemory
107vnet - devices, classify, dhcp, ethernet flow, gre, ip, etc.
108vpp-api
109vppinfra
Ed Warnickecb9cada2015-12-08 15:45:58 -0700110
Ed Warnickef5a14362016-09-12 20:40:24 +0000111%package plugins
112Summary: Vector Packet Processing--runtime plugins
113Group: System Environment/Libraries
Gabriel Gannebf246df2018-01-18 11:00:17 +0100114Requires: vpp = %{_version}-%{_release} numactl-libs
Ed Warnickef5a14362016-09-12 20:40:24 +0000115%description plugins
116This package contains VPP plugins
117
Damjan Marioncb034b92016-12-28 18:38:59 +0100118%package api-lua
119Summary: VPP api lua bindings
120Group: Development/Libraries
121Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}
122
123%description api-lua
124This package contains the lua bindings for the vpp api
125
Damjan Marioncb034b92016-12-28 18:38:59 +0100126%package api-python
Ole Troan57c3d662016-09-12 22:00:32 +0200127Summary: VPP api python bindings
128Group: Development/Libraries
Ole Troanc60f5572017-03-17 09:54:51 +0100129Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, python-setuptools libffi-devel
Ole Troan57c3d662016-09-12 22:00:32 +0200130
Damjan Marioncb034b92016-12-28 18:38:59 +0100131%description api-python
Ole Troan57c3d662016-09-12 22:00:32 +0200132This package contains the python bindings for the vpp api
133
Billy McFall28cf3b72018-01-15 17:54:52 -0500134%package selinux-policy
135Summary: VPP Security-Enhanced Linux (SELinux) policy
136Group: System Environment/Base
137Requires(post): selinux-policy-base >= %{selinux_policyver}, selinux-policy-targeted >= %{selinux_policyver}, policycoreutils, policycoreutils-python libselinux-utils
138
139%description selinux-policy
140This package contains a tailored VPP SELinux policy
141
Thomas F Herbert20a29c72016-10-13 18:36:50 -0400142%prep
Thomas F Herbertb42b77b2018-04-06 15:13:41 -0400143%setup -q -n %{name}-%{_version}
Thomas F Herbert20a29c72016-10-13 18:36:50 -0400144
Ed Warnickeec6290a2016-06-08 17:15:08 -0500145%pre
146# Add the vpp group
Ed Warnickeb10427e2016-06-08 19:49:40 -0500147groupadd -f -r vpp
Ed Warnickeec6290a2016-06-08 17:15:08 -0500148
Ole Troanc60f5572017-03-17 09:54:51 +0100149%build
Thomas F Herbert6eb61632018-11-27 15:57:30 -0500150%if 0%{?rhel}
151. /opt/rh/devtoolset-7/enable
152%endif
Thomas F Herbert4b0ac822017-08-29 16:07:51 -0400153%if %{with aesni}
154 make bootstrap
155 make -C build-root PLATFORM=vpp TAG=%{_vpp_tag} install-packages
156%else
157 make bootstrap AESNI=n
158 make -C build-root PLATFORM=vpp AESNI=n TAG=%{_vpp_tag} install-packages
159%endif
Ole Troanc60f5572017-03-17 09:54:51 +0100160cd %{_mu_build_dir}/../src/vpp-api/python && %py2_build
Billy McFall28cf3b72018-01-15 17:54:52 -0500161cd %{_mu_build_dir}/../extras/selinux && make -f %{_datadir}/selinux/devel/Makefile
Ole Troanc60f5572017-03-17 09:54:51 +0100162
Ed Warnickecb9cada2015-12-08 15:45:58 -0700163%install
164#
165# binaries
166#
167mkdir -p -m755 %{buildroot}%{_bindir}
168mkdir -p -m755 %{buildroot}%{_unitdir}
Gabriel Ganne714968b2017-01-26 15:42:39 +0100169install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/bin/* %{buildroot}%{_bindir}
Ole Troanf14e3bf2016-12-01 21:49:03 +0100170
Damjan Marion7cd468a2016-12-19 23:05:39 +0100171# api
Ole Troanf14e3bf2016-12-01 21:49:03 +0100172mkdir -p -m755 %{buildroot}/usr/share/vpp/api
Ole Troanf14e3bf2016-12-01 21:49:03 +0100173
Ed Warnickecb9cada2015-12-08 15:45:58 -0700174#
175# configs
176#
177mkdir -p -m755 %{buildroot}/etc/vpp
Miroslav Miklus8e08e742016-10-11 13:35:26 +0200178mkdir -p -m755 %{buildroot}/etc/sysctl.d
Thomas F Herbert5b75b6b2017-07-23 17:21:46 -0400179install -p -m 644 %{_mu_build_dir}/../extras/rpm/vpp.service %{buildroot}%{_unitdir}
Damjan Mariond0f673e2017-01-31 17:29:33 +0100180install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/startup.conf %{buildroot}/etc/vpp/startup.conf
Damjan Marion7cd468a2016-12-19 23:05:39 +0100181install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
Ed Warnickecb9cada2015-12-08 15:45:58 -0700182#
183# libraries
184#
185mkdir -p -m755 %{buildroot}%{_libdir}
Padraig Connolly69915cb2017-01-10 17:10:39 +0000186mkdir -p -m755 %{buildroot}/etc/bash_completion.d
187mkdir -p -m755 %{buildroot}/usr/share/vpp
Matthew Smithd790c7e2018-09-06 10:59:49 -0500188for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/lib* -type f -name '*.so.*.*' -print )
Ed Warnickecb9cada2015-12-08 15:45:58 -0700189do
190 install -p -m 755 $file %{buildroot}%{_libdir}
191done
192for file in $(cd %{buildroot}%{_libdir} && find . -type f -print | sed -e 's/^\.\///')
193do
194 # make lib symlinks
195 ( cd %{buildroot}%{_libdir} &&
196 ln -fs $file $(echo $file | sed -e 's/\(\.so\.[0-9]\+\).*/\1/') )
Ed Warnickef5a0e732016-09-07 17:12:52 +0000197 ( cd %{buildroot}%{_libdir} &&
198 ln -fs $file $(echo $file | sed -e 's/\(\.so\)\.[0-9]\+.*/\1/') )
Ed Warnickecb9cada2015-12-08 15:45:58 -0700199done
Damjan Marion7cd468a2016-12-19 23:05:39 +0100200for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vpp/share/vpp/api -type f -name '*.api.json' -print )
Ole Troanf14e3bf2016-12-01 21:49:03 +0100201do
202 install -p -m 644 $file %{buildroot}/usr/share/vpp/api
203done
Ed Warnicke406ab9d2016-08-31 18:48:47 -0700204
Damjan Marioncb034b92016-12-28 18:38:59 +0100205# Lua bindings
206mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/cli
207mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/lute
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400208# for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && git ls-files .)
209for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && find . -type f -regex '.*/*.[luteamd]' -print | sed -e 's/^\.\///')
Damjan Marioncb034b92016-12-28 18:38:59 +0100210do
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400211 ( cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && install -p -m 644 $file \
212 %{buildroot}/usr/share/doc/vpp/examples/lua/$file )
Damjan Marioncb034b92016-12-28 18:38:59 +0100213done
214
Ole Troan57c3d662016-09-12 22:00:32 +0200215# Python bindings
Ole Troanc60f5572017-03-17 09:54:51 +0100216cd %{_mu_build_dir}/../src/vpp-api/python && %py2_install
Ole Troan57c3d662016-09-12 22:00:32 +0200217
Billy McFall28cf3b72018-01-15 17:54:52 -0500218# SELinux Policy
219# Install SELinux interfaces
220%_format INTERFACES %{_mu_build_dir}/../extras/selinux/$x.if
221install -d %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
222install -p -m 644 $INTERFACES \
223 %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
224
225# Install policy modules
226%_format MODULES %{_mu_build_dir}/../extras/selinux/$x.pp
227install -d %{buildroot}%{_datadir}/selinux/packages
228install -m 0644 $MODULES \
229 %{buildroot}%{_datadir}/selinux/packages
230
Ed Warnickecb9cada2015-12-08 15:45:58 -0700231#
232# devel
233#
Thomas F Herbert20a29c72016-10-13 18:36:50 -0400234for dir in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/include/ -maxdepth 0 -type d -print | grep -v dpdk)
Ed Warnickecb9cada2015-12-08 15:45:58 -0700235do
236 for subdir in $(cd ${dir} && find . -type d -print)
237 do
238 mkdir -p -m755 %{buildroot}/usr/include/${subdir}
239 done
240 for file in $(cd ${dir} && find . -type f -print)
241 do
242 install -p -m 644 $dir/$file %{buildroot}%{_includedir}/$file
243 done
244done
Ed Warnicke406ab9d2016-08-31 18:48:47 -0700245
Paul Vinciguerra9ce6a212018-09-12 13:40:13 -0700246install -p -m 644 %{_mu_build_dir}/../src/tools/vppapigen/vppapigen_c.py %{buildroot}/usr/share/vpp
247install -p -m 644 %{_mu_build_dir}/../src/tools/vppapigen/vppapigen_json.py %{buildroot}/usr/share/vpp
Jon Loeliger190282c2018-01-31 09:45:11 -0600248
Ed Warnickecb9cada2015-12-08 15:45:58 -0700249# sample plugin
250mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400251#for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && git ls-files .)
252for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && find . -type f -regex '.*/*.[acdhimp]' -print | sed -e 's/^\.\///')
Ed Warnickecb9cada2015-12-08 15:45:58 -0700253do
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400254 ( cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && install -p -m 644 $file \
255 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file )
Ed Warnickecb9cada2015-12-08 15:45:58 -0700256done
257
Billy McFall28cf3b72018-01-15 17:54:52 -0500258# vppctl sockfile directory
259mkdir -p -m755 %{buildroot}%{_localstatedir}/run/vpp
260# vpp.log directory
261mkdir -p -m755 %{buildroot}%{_localstatedir}/log/vpp
Ed Warnickef5a14362016-09-12 20:40:24 +0000262
263#
264# vpp-plugins
Damjan Marion79dcbc72018-09-12 14:01:10 +0200265#
Ed Warnickee7637e72016-09-14 16:58:33 -0700266mkdir -p -m755 %{buildroot}/usr/lib/vpp_plugins
267mkdir -p -m755 %{buildroot}/usr/lib/vpp_api_test_plugins
Damjan Marion79dcbc72018-09-12 14:01:10 +0200268for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_plugins && find -type f -print)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100269do
Damjan Marion79dcbc72018-09-12 14:01:10 +0200270 install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_plugins/$file \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100271 %{buildroot}/usr/lib/vpp_plugins/$file
272done
273
Damjan Marion79dcbc72018-09-12 14:01:10 +0200274for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_api_test_plugins && find -type f -print)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100275do
Damjan Marion79dcbc72018-09-12 14:01:10 +0200276 install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_api_test_plugins/$file \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100277 %{buildroot}/usr/lib/vpp_api_test_plugins/$file
278done
279
Mohsin Kazmi7b2017d2018-09-26 10:49:41 +0200280for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vpp/share/vpp/api/plugins -type f -name '*.api.json' -print )
Ole Troanf14e3bf2016-12-01 21:49:03 +0100281do
282 install -p -m 644 $file %{buildroot}/usr/share/vpp/api
283done
284
Damjan Mariona1bd0232016-12-19 19:08:11 +0100285#
286# remove RPATH from ELF binaries
287#
288%{_mu_build_dir}/scripts/remove-rpath %{buildroot}
289
Ed Warnickecb9cada2015-12-08 15:45:58 -0700290%post
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200291if [ $1 -eq 1 ] ; then
292 sysctl --system
293fi
Ed Warnickecb9cada2015-12-08 15:45:58 -0700294%systemd_post vpp.service
295
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300296%preun
297%systemd_preun vpp.service
298
Billy McFall28cf3b72018-01-15 17:54:52 -0500299%post selinux-policy
300%_format MODULES %{_datadir}/selinux/packages/$x.pp
Billy McFall28cf3b72018-01-15 17:54:52 -0500301if %{_sbindir}/selinuxenabled ; then
Matthew Smith7c172cb2018-02-22 21:12:11 -0600302 %{_sbindir}/semodule -n -X 400 -s %{selinuxtype} -i $MODULES
Billy McFall28cf3b72018-01-15 17:54:52 -0500303 %{_sbindir}/load_policy
304 %relabel_files
305fi
306
307
Ed Warnickecb9cada2015-12-08 15:45:58 -0700308%postun
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300309%systemd_postun
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200310if [ $1 -eq 0 ] ; then
311 echo "Uninstalling, unbind user-mode PCI drivers"
312 # Unbind user-mode PCI drivers
313 removed=
314 pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_generic -o -name vfio-pci`
315 for d in $pci_dirs; do
316 for f in ${d}/*; do
317 [ -e "${f}/config" ] || continue
318 echo ${f##*/} > ${d}/unbind
319 basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
320 removed=y
321 done
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300322 done
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200323 if [ -n "${removed}" ]; then
324 echo "There are changes in PCI drivers, rescaning"
325 echo 1 > /sys/bus/pci/rescan
326 else
327 echo "There weren't PCI devices binded"
328 fi
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300329else
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200330 echo "Upgrading package, dont' unbind interfaces"
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300331fi
Ed Warnickecb9cada2015-12-08 15:45:58 -0700332
Billy McFall28cf3b72018-01-15 17:54:52 -0500333%postun selinux-policy
334if [ $1 -eq 0 ]; then
335 %{_sbindir}/semodule -n -r %{modulenames}
336 if %{_sbindir}/selinuxenabled ; then
337 %{_sbindir}/load_policy
338 %relabel_files
339 fi
340fi
341
Ed Warnickecb9cada2015-12-08 15:45:58 -0700342%files
343%defattr(-,bin,bin)
344%{_unitdir}/vpp.service
Damjan Marion08ff7e02016-01-20 13:45:36 +0100345/usr/bin/vpp*
Ed Warnickecb9cada2015-12-08 15:45:58 -0700346/usr/bin/svm*
Dave Barach0e5e3c32016-01-25 08:28:22 -0500347/usr/bin/elftool
Billy McFallce41a5c2017-09-08 20:11:58 +0000348%config(noreplace) /etc/sysctl.d/80-vpp.conf
349%config(noreplace) /etc/vpp/startup.conf
Ole Troanf14e3bf2016-12-01 21:49:03 +0100350/usr/share/vpp/api/*
Ed Warnickecb9cada2015-12-08 15:45:58 -0700351
Billy McFall28cf3b72018-01-15 17:54:52 -0500352%defattr(-,root,vpp)
353%{_localstatedir}/run/vpp*
354
355%defattr(-,root,root)
356%{_localstatedir}/log/vpp*
357
Ed Warnickecb9cada2015-12-08 15:45:58 -0700358%files lib
359%defattr(-,bin,bin)
Igor Mikhailov (imichail)3b854a52018-05-18 20:08:26 -0700360%global __requires_exclude_from %{_libdir}/librte_pmd_mlx[45]_glue\\.so.*$
Ed Warnickef5a14362016-09-12 20:40:24 +0000361%exclude %{_libdir}/vpp_plugins
362%exclude %{_libdir}/vpp_api_test_plugins
Ed Warnickecb9cada2015-12-08 15:45:58 -0700363%{_libdir}/*
Ole Troanf14e3bf2016-12-01 21:49:03 +0100364/usr/share/vpp/api/*
Ed Warnickecb9cada2015-12-08 15:45:58 -0700365
Damjan Marioncb034b92016-12-28 18:38:59 +0100366%files api-lua
Gabriel Gannef3854e92017-01-17 10:00:54 +0100367%defattr(644,root,root,644)
Damjan Marioncb034b92016-12-28 18:38:59 +0100368/usr/share/doc/vpp/examples/lua
369
Damjan Marioncb034b92016-12-28 18:38:59 +0100370%files api-python
Onong Tayeng9b0ce022018-11-23 15:33:41 +0530371%defattr(644,root,root,755)
Ole Troana7564e82018-06-12 21:06:44 +0200372%{python2_sitelib}/vpp_*
Ole Troan57c3d662016-09-12 22:00:32 +0200373
Billy McFall28cf3b72018-01-15 17:54:52 -0500374%files selinux-policy
375%defattr(-,root,root,0755)
376%attr(0644,root,root) %{_datadir}/selinux/packages/*.pp
377%attr(0644,root,root) %{_datadir}/selinux/devel/include/%{moduletype}/*.if
378
Ed Warnickecb9cada2015-12-08 15:45:58 -0700379%files devel
380%defattr(-,bin,bin)
381/usr/bin/vppapigen
382%{_includedir}/*
383/usr/share/doc/vpp/examples/sample-plugin
Ole Troan9d420872017-10-12 13:06:35 +0200384/usr/share/vpp
Ed Warnicke406ab9d2016-08-31 18:48:47 -0700385
Ed Warnickef5a14362016-09-12 20:40:24 +0000386%files plugins
387%defattr(-,bin,bin)
Ed Warnickee7637e72016-09-14 16:58:33 -0700388/usr/lib/vpp_plugins/*
389/usr/lib/vpp_api_test_plugins/*
Ole Troanf14e3bf2016-12-01 21:49:03 +0100390/usr/share/vpp/api/*