build: (opensuse) Revert build remove opensuse build infra
[vpp.git] / extras / rpm / opensuse / README.md
1 # Build RPM for openSUSE
2
3 ## Introduction
4
5 This is to describe how to compile and create installable RPM packages for openSUSE leap.
6 In general you should visit [Pulling, Building,
7 Running, Hacking, Pushing](https://wiki.fd.io/view/VPP/Pulling,_Building,_Run
8 ning,_Hacking_and_Pushing_VPP_Code) which provides full description for other type of system (Ubuntu,Centos or Redhat).
9
10 ## Get the VPP Sources
11
12 To get the VPP sources that are used to create the build, run the following commands:
13
14 ```bash
15 # git clone https://gerrit.fd.io/r/vpp
16 # cd vpp
17 ```
18
19 There are two ways to continue:
20
21 * Build by docker
22 * Build on your own openSUSE system
23
24 ## Build by Docker
25
26 Run the following docker command:
27
28 ```bash
29 docker build -f extras/rpm/opensuse/Dockerfile .
30 ```
31
32 The packages now can be copied from the docker image and can be installed on openSUSE.
33 An example how to extend the Dockerfile to install vpp:
34
35 '''dockerfile
36 FROM opensuse/leap:${SUSE_VERSION} as vppinstall
37 COPY --from=vppbuild /vpp/build-root/*rpm /rpms/
38 RUN VPP_INSTALL_SKIP_SYSCTL=false zypper install --allow-unsigned-rpm -y --no-recommends /rpms/*.rpm;\
39 ...
40 '''
41
42 ## Build on openSUSE
43
44 ### Build VPP Dependencies
45
46 Before building a VPP image, make sure there are no FD.io VPP or DPDK packages installed, by entering the following commands:
47
48 ```bash
49 # rpm -ql vpp
50 package vpp is not installed
51 # rpm -ql dpdk
52 package dpdk is not installed
53
54 ```
55
56 Run the following make command to install the dependencies for FD.io VPP.
57
58 ```bash
59 make install-dep
60 ```
61
62 Run the following make command to install the external dependencies for FD.io VPP.
63
64 ```bash
65 ln -s /usr/bin/cmake /usr/bin/cmake3 # some thirdparty checking for cmake3 binary
66 make install-ext-dep
67 ```
68
69 ### Build RPM Packages
70
71 Create packages for openSUSE by running:
72
73 ```bash
74 make pkg-rpm
75 ```
76
77 Once the packages are built they can be found in the build-root directory.
78
79 ```bash
80 # ls *.rpm
81 ```
82
83 If the packages are built correctly, then this should be the corresponding output:
84
85 ```bash
86 build-root/libvpp0-21.10-rc0~200_gb89ae9670.x86_64.rpm      build-root/vpp-api-python-21.10-rc0~200_gb89ae9670.x86_64.rpm
87 build-root/vpp-21.10-rc0~200_gb89ae9670.x86_64.rpm          build-root/vpp-devel-21.10-rc0~200_gb89ae9670.x86_64.rpm
88 build-root/vpp-api-lua-21.10-rc0~200_gb89ae9670.x86_64.rpm  build-root/vpp-plugins-21.10-rc0~200_gb89ae9670.x86_64.rpm
89 ```