blob: 8b8f10e774acf570545b1cdca32001a22c7d2a7e [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
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +030013%{?systemd_requires}
14
Billy McFall28cf3b72018-01-15 17:54:52 -050015
16# SELinux Related definitions
17%global selinuxtype targeted
18%global moduletype services
19%global modulenames vpp-custom
20
21# Usage: _format var format
22# Expand 'modulenames' into various formats as needed
23# Format must contain '$x' somewhere to do anything useful
24%global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done;
25
26# Relabel files
27%global relabel_files() \ # ADD files in *.fc file
28
29# Version of distribution SELinux policy package
30%global selinux_policyver 3.13.1-128.6.fc22
31
32
Ed Warnickecb9cada2015-12-08 15:45:58 -070033Name: vpp
34Summary: Vector Packet Processing
Billy McFallf6e3ad02017-07-05 09:33:30 -040035License: ASL 2.0
Ed Warnickecb9cada2015-12-08 15:45:58 -070036Version: %{_version}
37Release: %{_release}
Damjan Mariona1bd0232016-12-19 19:08:11 +010038BuildRequires: systemd, chrpath
Thomas F Herberte4128912017-10-09 15:03:55 -040039BuildRequires: check, check-devel
Thomas F Herbertca3d38a2019-04-22 17:35:03 -040040BuildRequires: mbedtls-devel mbedtls
Thomas F Herbert6eb61632018-11-27 15:57:30 -050041%if 0%{?fedora}
Thomas F Herbertca3d38a2019-04-22 17:35:03 -040042Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python3
43Requires: compat-openssl10
44Requires: boost-filesystem mbedtls libffi-devel
Thomas F Herbert66731782018-03-05 17:21:56 -050045BuildRequires: subunit, subunit-devel
Thomas F Herbert440751b2017-09-11 08:58:23 -040046BuildRequires: compat-openssl10-devel
Thomas F Herbertca3d38a2019-04-22 17:35:03 -040047BuildRequires: python3-devel, python3-virtualenv
Thomas F Herbert6eb61632018-11-27 15:57:30 -050048BuildRequires: cmake
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040049%else
Thomas F Herbert6eb61632018-11-27 15:57:30 -050050%if 0%{rhel} == 7
Thomas F Herbertca3d38a2019-04-22 17:35:03 -040051Requires: epel-release
52Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python36
53Requires: boost-filesystem mbedtls libffi-devel
54BuildRequires: epel-release
55BuildRequires: mbedtls-devel mbedtls
Thomas F Herbert6eb61632018-11-27 15:57:30 -050056BuildRequires: devtoolset-7-toolchain
Thomas F Herbert440751b2017-09-11 08:58:23 -040057BuildREquires: openssl-devel
Thomas F Herbertca3d38a2019-04-22 17:35:03 -040058BuildRequires: python36-devel
Thomas F Herbert6eb61632018-11-27 15:57:30 -050059BuildRequires: cmake3
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040060%endif
61%endif
Thomas F Herbert440751b2017-09-11 08:58:23 -040062BuildRequires: libffi-devel
Michal Cmarada4e633e12019-01-31 10:57:40 +010063BuildRequires: glibc-static, yum-utils, redhat-lsb
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040064BuildRequires: apr-devel
Thomas F Herbertbd8e2422017-08-03 11:04:24 -040065BuildRequires: numactl-devel
66BuildRequires: autoconf automake libtool byacc bison flex
Neale Ranns2ea2e422017-11-07 05:20:16 -080067BuildRequires: boost boost-devel
Billy McFall28cf3b72018-01-15 17:54:52 -050068BuildRequires: selinux-policy selinux-policy-devel
Ed Warnickecb9cada2015-12-08 15:45:58 -070069
Thomas F Herbertb60f4962017-07-19 19:17:15 -040070Source: %{name}-%{_version}-%{_release}.tar.xz
71# Source: vpp-latest.tar.xz
Thomas F Herbert20a29c72016-10-13 18:36:50 -040072
Ed Warnickecb9cada2015-12-08 15:45:58 -070073%description
Damjan Marion08ff7e02016-01-20 13:45:36 +010074This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
75vpp - the vector packet engine
76vpp_api_test - vector packet engine API test tool
77vpp_json_test - vector packet engine JSON test tool
Ed Warnickecb9cada2015-12-08 15:45:58 -070078
79%package lib
80Summary: VPP libraries
81Group: System Environment/Libraries
Billy McFall28cf3b72018-01-15 17:54:52 -050082Requires: vpp-selinux-policy = %{_version}-%{_release}
Ed Warnickecb9cada2015-12-08 15:45:58 -070083
84%description lib
85This package contains the VPP shared libraries, including:
86vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting.
Ed Warnickecb9cada2015-12-08 15:45:58 -070087svm - vm library
88vlib - vector processing library
89vlib-api - binary API library
90vnet - network stack library
91
92%package devel
93Summary: VPP header files, static libraries
94Group: Development/Libraries
95Requires: vpp-lib
96
97%description devel
Thomas F Herbert3977a212016-10-01 18:09:33 -040098This package contains the header files for VPP.
99Install this package if you want to write a
100program for compilation and linking with vpp lib.
101vlib
102vlibmemory
103vnet - devices, classify, dhcp, ethernet flow, gre, ip, etc.
104vpp-api
105vppinfra
Ed Warnickecb9cada2015-12-08 15:45:58 -0700106
Ed Warnickef5a14362016-09-12 20:40:24 +0000107%package plugins
108Summary: Vector Packet Processing--runtime plugins
109Group: System Environment/Libraries
Gabriel Gannebf246df2018-01-18 11:00:17 +0100110Requires: vpp = %{_version}-%{_release} numactl-libs
Ed Warnickef5a14362016-09-12 20:40:24 +0000111%description plugins
112This package contains VPP plugins
113
Damjan Marioncb034b92016-12-28 18:38:59 +0100114%package api-lua
115Summary: VPP api lua bindings
116Group: Development/Libraries
117Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}
118
119%description api-lua
120This package contains the lua bindings for the vpp api
121
Damjan Marioncb034b92016-12-28 18:38:59 +0100122%package api-python
Ole Troan57c3d662016-09-12 22:00:32 +0200123Summary: VPP api python bindings
124Group: Development/Libraries
Thomas F Herbertca3d38a2019-04-22 17:35:03 -0400125Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, libffi-devel
126Requires: python-setuptools
Ole Troan57c3d662016-09-12 22:00:32 +0200127
Damjan Marioncb034b92016-12-28 18:38:59 +0100128%description api-python
Ole Troan57c3d662016-09-12 22:00:32 +0200129This package contains the python bindings for the vpp api
130
Billy McFall28cf3b72018-01-15 17:54:52 -0500131%package selinux-policy
132Summary: VPP Security-Enhanced Linux (SELinux) policy
133Group: System Environment/Base
134Requires(post): selinux-policy-base >= %{selinux_policyver}, selinux-policy-targeted >= %{selinux_policyver}, policycoreutils, policycoreutils-python libselinux-utils
135
136%description selinux-policy
137This package contains a tailored VPP SELinux policy
138
Thomas F Herbert20a29c72016-10-13 18:36:50 -0400139%prep
Thomas F Herbertb42b77b2018-04-06 15:13:41 -0400140%setup -q -n %{name}-%{_version}
Thomas F Herbert20a29c72016-10-13 18:36:50 -0400141
Ed Warnickeec6290a2016-06-08 17:15:08 -0500142%pre
143# Add the vpp group
Ed Warnickeb10427e2016-06-08 19:49:40 -0500144groupadd -f -r vpp
Ed Warnickeec6290a2016-06-08 17:15:08 -0500145
Ole Troanc60f5572017-03-17 09:54:51 +0100146%build
Thomas F Herbert6eb61632018-11-27 15:57:30 -0500147%if 0%{?rhel}
148. /opt/rh/devtoolset-7/enable
149%endif
Thomas F Herbert4b0ac822017-08-29 16:07:51 -0400150%if %{with aesni}
151 make bootstrap
152 make -C build-root PLATFORM=vpp TAG=%{_vpp_tag} install-packages
153%else
154 make bootstrap AESNI=n
155 make -C build-root PLATFORM=vpp AESNI=n TAG=%{_vpp_tag} install-packages
156%endif
Thomas F Herbertca3d38a2019-04-22 17:35:03 -0400157cd %{_mu_build_dir}/../src/vpp-api/python && %py3_build
Billy McFall28cf3b72018-01-15 17:54:52 -0500158cd %{_mu_build_dir}/../extras/selinux && make -f %{_datadir}/selinux/devel/Makefile
Ole Troanc60f5572017-03-17 09:54:51 +0100159
Ed Warnickecb9cada2015-12-08 15:45:58 -0700160%install
161#
162# binaries
163#
164mkdir -p -m755 %{buildroot}%{_bindir}
165mkdir -p -m755 %{buildroot}%{_unitdir}
Gabriel Ganne714968b2017-01-26 15:42:39 +0100166install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/bin/* %{buildroot}%{_bindir}
Ole Troanf14e3bf2016-12-01 21:49:03 +0100167
Damjan Marion7cd468a2016-12-19 23:05:39 +0100168# api
Ole Troanf14e3bf2016-12-01 21:49:03 +0100169mkdir -p -m755 %{buildroot}/usr/share/vpp/api
Ole Troanf14e3bf2016-12-01 21:49:03 +0100170
Ed Warnickecb9cada2015-12-08 15:45:58 -0700171#
172# configs
173#
174mkdir -p -m755 %{buildroot}/etc/vpp
Miroslav Miklus8e08e742016-10-11 13:35:26 +0200175mkdir -p -m755 %{buildroot}/etc/sysctl.d
Thomas F Herbert5b75b6b2017-07-23 17:21:46 -0400176install -p -m 644 %{_mu_build_dir}/../extras/rpm/vpp.service %{buildroot}%{_unitdir}
Damjan Mariond0f673e2017-01-31 17:29:33 +0100177install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/startup.conf %{buildroot}/etc/vpp/startup.conf
Damjan Marion7cd468a2016-12-19 23:05:39 +0100178install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
Ed Warnickecb9cada2015-12-08 15:45:58 -0700179#
180# libraries
181#
182mkdir -p -m755 %{buildroot}%{_libdir}
Padraig Connolly69915cb2017-01-10 17:10:39 +0000183mkdir -p -m755 %{buildroot}/etc/bash_completion.d
184mkdir -p -m755 %{buildroot}/usr/share/vpp
Matthew Smithd790c7e2018-09-06 10:59:49 -0500185for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/lib* -type f -name '*.so.*.*' -print )
Ed Warnickecb9cada2015-12-08 15:45:58 -0700186do
187 install -p -m 755 $file %{buildroot}%{_libdir}
188done
189for file in $(cd %{buildroot}%{_libdir} && find . -type f -print | sed -e 's/^\.\///')
190do
191 # make lib symlinks
192 ( cd %{buildroot}%{_libdir} &&
193 ln -fs $file $(echo $file | sed -e 's/\(\.so\.[0-9]\+\).*/\1/') )
Ed Warnickef5a0e732016-09-07 17:12:52 +0000194 ( cd %{buildroot}%{_libdir} &&
195 ln -fs $file $(echo $file | sed -e 's/\(\.so\)\.[0-9]\+.*/\1/') )
Ed Warnickecb9cada2015-12-08 15:45:58 -0700196done
Damjan Marion7cd468a2016-12-19 23:05:39 +0100197for 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 +0100198do
199 install -p -m 644 $file %{buildroot}/usr/share/vpp/api
200done
Ed Warnicke406ab9d2016-08-31 18:48:47 -0700201
Damjan Marioncb034b92016-12-28 18:38:59 +0100202# Lua bindings
203mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/cli
204mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/lute
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400205# for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && git ls-files .)
206for 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 +0100207do
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400208 ( cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && install -p -m 644 $file \
209 %{buildroot}/usr/share/doc/vpp/examples/lua/$file )
Damjan Marioncb034b92016-12-28 18:38:59 +0100210done
211
Ole Troan57c3d662016-09-12 22:00:32 +0200212# Python bindings
Thomas F Herbertca3d38a2019-04-22 17:35:03 -0400213cd %{_mu_build_dir}/../src/vpp-api/python && %py3_install
Ole Troan57c3d662016-09-12 22:00:32 +0200214
Billy McFall28cf3b72018-01-15 17:54:52 -0500215# SELinux Policy
216# Install SELinux interfaces
217%_format INTERFACES %{_mu_build_dir}/../extras/selinux/$x.if
218install -d %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
219install -p -m 644 $INTERFACES \
220 %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
221
222# Install policy modules
223%_format MODULES %{_mu_build_dir}/../extras/selinux/$x.pp
224install -d %{buildroot}%{_datadir}/selinux/packages
225install -m 0644 $MODULES \
226 %{buildroot}%{_datadir}/selinux/packages
227
Ed Warnickecb9cada2015-12-08 15:45:58 -0700228#
229# devel
230#
Benoît Gannef0917bd2019-05-14 11:11:16 +0200231for dir in %{_mu_build_dir}/%{_vpp_install_dir}/{vom,vpp}/include/
Ed Warnickecb9cada2015-12-08 15:45:58 -0700232do
233 for subdir in $(cd ${dir} && find . -type d -print)
234 do
235 mkdir -p -m755 %{buildroot}/usr/include/${subdir}
236 done
237 for file in $(cd ${dir} && find . -type f -print)
238 do
239 install -p -m 644 $dir/$file %{buildroot}%{_includedir}/$file
240 done
241done
Ed Warnicke406ab9d2016-08-31 18:48:47 -0700242
Paul Vinciguerra9ce6a212018-09-12 13:40:13 -0700243install -p -m 644 %{_mu_build_dir}/../src/tools/vppapigen/vppapigen_c.py %{buildroot}/usr/share/vpp
244install -p -m 644 %{_mu_build_dir}/../src/tools/vppapigen/vppapigen_json.py %{buildroot}/usr/share/vpp
Jon Loeliger190282c2018-01-31 09:45:11 -0600245
Ed Warnickecb9cada2015-12-08 15:45:58 -0700246# sample plugin
247mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400248#for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && git ls-files .)
249for 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 -0700250do
Thomas F Herbertbd8e2422017-08-03 11:04:24 -0400251 ( cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && install -p -m 644 $file \
252 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file )
Ed Warnickecb9cada2015-12-08 15:45:58 -0700253done
254
Billy McFall28cf3b72018-01-15 17:54:52 -0500255# vppctl sockfile directory
256mkdir -p -m755 %{buildroot}%{_localstatedir}/run/vpp
257# vpp.log directory
258mkdir -p -m755 %{buildroot}%{_localstatedir}/log/vpp
Ed Warnickef5a14362016-09-12 20:40:24 +0000259
260#
261# vpp-plugins
Damjan Marion79dcbc72018-09-12 14:01:10 +0200262#
Ed Warnickee7637e72016-09-14 16:58:33 -0700263mkdir -p -m755 %{buildroot}/usr/lib/vpp_plugins
264mkdir -p -m755 %{buildroot}/usr/lib/vpp_api_test_plugins
Damjan Marion79dcbc72018-09-12 14:01:10 +0200265for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_plugins && find -type f -print)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100266do
Matthew Smith4ed00392019-03-05 09:28:48 -0600267 install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_plugins/$file \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100268 %{buildroot}/usr/lib/vpp_plugins/$file
269done
270
Damjan Marion79dcbc72018-09-12 14:01:10 +0200271for 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 +0100272do
Matthew Smith4ed00392019-03-05 09:28:48 -0600273 install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib/vpp_api_test_plugins/$file \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100274 %{buildroot}/usr/lib/vpp_api_test_plugins/$file
275done
276
Mohsin Kazmi7b2017d2018-09-26 10:49:41 +0200277for 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 +0100278do
Matthew Smith4ed00392019-03-05 09:28:48 -0600279 install -p -m 755 $file %{buildroot}/usr/share/vpp/api
Ole Troanf14e3bf2016-12-01 21:49:03 +0100280done
281
Damjan Mariona1bd0232016-12-19 19:08:11 +0100282#
283# remove RPATH from ELF binaries
284#
285%{_mu_build_dir}/scripts/remove-rpath %{buildroot}
286
Ed Warnickecb9cada2015-12-08 15:45:58 -0700287%post
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200288if [ $1 -eq 1 ] ; then
289 sysctl --system
290fi
Ed Warnickecb9cada2015-12-08 15:45:58 -0700291%systemd_post vpp.service
292
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300293%preun
294%systemd_preun vpp.service
295
Billy McFall28cf3b72018-01-15 17:54:52 -0500296%post selinux-policy
297%_format MODULES %{_datadir}/selinux/packages/$x.pp
Billy McFall28cf3b72018-01-15 17:54:52 -0500298if %{_sbindir}/selinuxenabled ; then
Matthew Smith7c172cb2018-02-22 21:12:11 -0600299 %{_sbindir}/semodule -n -X 400 -s %{selinuxtype} -i $MODULES
Billy McFall28cf3b72018-01-15 17:54:52 -0500300 %{_sbindir}/load_policy
301 %relabel_files
302fi
303
304
Ed Warnickecb9cada2015-12-08 15:45:58 -0700305%postun
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300306%systemd_postun
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200307if [ $1 -eq 0 ] ; then
308 echo "Uninstalling, unbind user-mode PCI drivers"
309 # Unbind user-mode PCI drivers
310 removed=
311 pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_generic -o -name vfio-pci`
312 for d in $pci_dirs; do
313 for f in ${d}/*; do
314 [ -e "${f}/config" ] || continue
315 echo ${f##*/} > ${d}/unbind
316 basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
317 removed=y
318 done
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300319 done
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200320 if [ -n "${removed}" ]; then
321 echo "There are changes in PCI drivers, rescaning"
322 echo 1 > /sys/bus/pci/rescan
323 else
324 echo "There weren't PCI devices binded"
325 fi
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300326else
Kristina Nevolnikova8ae18732017-06-21 14:20:42 +0200327 echo "Upgrading package, dont' unbind interfaces"
Peter Ginchevdfa9c5b2016-10-11 15:34:24 +0300328fi
Ed Warnickecb9cada2015-12-08 15:45:58 -0700329
Billy McFall28cf3b72018-01-15 17:54:52 -0500330%postun selinux-policy
331if [ $1 -eq 0 ]; then
332 %{_sbindir}/semodule -n -r %{modulenames}
333 if %{_sbindir}/selinuxenabled ; then
334 %{_sbindir}/load_policy
335 %relabel_files
336 fi
337fi
338
Ed Warnickecb9cada2015-12-08 15:45:58 -0700339%files
340%defattr(-,bin,bin)
341%{_unitdir}/vpp.service
Damjan Marion08ff7e02016-01-20 13:45:36 +0100342/usr/bin/vpp*
Ed Warnickecb9cada2015-12-08 15:45:58 -0700343/usr/bin/svm*
Dave Barach0e5e3c32016-01-25 08:28:22 -0500344/usr/bin/elftool
Billy McFallce41a5c2017-09-08 20:11:58 +0000345%config(noreplace) /etc/sysctl.d/80-vpp.conf
346%config(noreplace) /etc/vpp/startup.conf
Ole Troanf14e3bf2016-12-01 21:49:03 +0100347/usr/share/vpp/api/*
Ed Warnickecb9cada2015-12-08 15:45:58 -0700348
Billy McFall28cf3b72018-01-15 17:54:52 -0500349%defattr(-,root,vpp)
350%{_localstatedir}/run/vpp*
351
352%defattr(-,root,root)
353%{_localstatedir}/log/vpp*
354
Ed Warnickecb9cada2015-12-08 15:45:58 -0700355%files lib
356%defattr(-,bin,bin)
Igor Mikhailov (imichail)3b854a52018-05-18 20:08:26 -0700357%global __requires_exclude_from %{_libdir}/librte_pmd_mlx[45]_glue\\.so.*$
Ed Warnickef5a14362016-09-12 20:40:24 +0000358%exclude %{_libdir}/vpp_plugins
359%exclude %{_libdir}/vpp_api_test_plugins
Ed Warnickecb9cada2015-12-08 15:45:58 -0700360%{_libdir}/*
Ole Troanf14e3bf2016-12-01 21:49:03 +0100361/usr/share/vpp/api/*
Ed Warnickecb9cada2015-12-08 15:45:58 -0700362
Damjan Marioncb034b92016-12-28 18:38:59 +0100363%files api-lua
Gabriel Gannef3854e92017-01-17 10:00:54 +0100364%defattr(644,root,root,644)
Damjan Marioncb034b92016-12-28 18:38:59 +0100365/usr/share/doc/vpp/examples/lua
366
Damjan Marioncb034b92016-12-28 18:38:59 +0100367%files api-python
Onong Tayeng9b0ce022018-11-23 15:33:41 +0530368%defattr(644,root,root,755)
Thomas F Herbertca3d38a2019-04-22 17:35:03 -0400369%{python3_sitelib}/vpp_*
Ole Troan57c3d662016-09-12 22:00:32 +0200370
Billy McFall28cf3b72018-01-15 17:54:52 -0500371%files selinux-policy
372%defattr(-,root,root,0755)
373%attr(0644,root,root) %{_datadir}/selinux/packages/*.pp
374%attr(0644,root,root) %{_datadir}/selinux/devel/include/%{moduletype}/*.if
375
Ed Warnickecb9cada2015-12-08 15:45:58 -0700376%files devel
377%defattr(-,bin,bin)
378/usr/bin/vppapigen
379%{_includedir}/*
380/usr/share/doc/vpp/examples/sample-plugin
Ole Troan9d420872017-10-12 13:06:35 +0200381/usr/share/vpp
Ed Warnicke406ab9d2016-08-31 18:48:47 -0700382
Ed Warnickef5a14362016-09-12 20:40:24 +0000383%files plugins
384%defattr(-,bin,bin)
Ed Warnickee7637e72016-09-14 16:58:33 -0700385/usr/lib/vpp_plugins/*
386/usr/lib/vpp_api_test_plugins/*
Ole Troanf14e3bf2016-12-01 21:49:03 +0100387/usr/share/vpp/api/*