-
Notifications
You must be signed in to change notification settings - Fork 0
/
rockcraft.yaml
203 lines (196 loc) · 4.67 KB
/
rockcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
---
name: sdcore-upf-bess
base: [email protected]
version: '1.4.0'
summary: SD-Core UPF BESS
description: SD-Core UPF BESS
license: Apache-2.0
platforms:
amd64:
environment:
LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/local/lib"
parts:
xdp:
plugin: autotools
source: https://github.com/xdp-project/xdp-tools.git
source-tag: v1.2.2
build-packages:
- clang
- gcc-multilib
- libelf-dev
- libpcap-dev
- linux-headers-generic
- linux-libc-dev
- llvm
prime:
- usr/local/lib/x86_64-linux-gnu/*
cndp:
after:
- xdp
plugin: meson
source: https://github.com/CloudNativeDataPlane/cndp.git
source-commit: d5ce4b9edc2e7ddb46a61b395deffafaf11a0500
build-packages:
- clang
- golang
- libbpf-dev
- libbsd-dev
- libnl-3-dev
- libnl-cli-3-dev
- libnuma-dev
- lld
stage-packages:
- libnuma1
meson-parameters:
- -Dbuildtype=release
- -Dmachine=haswell
- -Ddefault_library=both
prime:
- usr/local/lib/x86_64-linux-gnu/*
- usr/local/bin/cndpfwd
dpdk:
plugin: meson
after:
- cndp
source: https://fast.dpdk.org/rel/dpdk-22.11.4.tar.gz
source-type: tar
build-packages:
- ca-certificates
- libbenchmark-dev
- libbpf0
- libc-ares-dev
- libelf-dev
- libgflags2.2
- libgoogle-glog-dev
- libgrpc++-dev
- libgtest-dev
- libjson-c-dev
- libnuma-dev
- libpcap-dev
- libprotobuf-dev
- libunwind-dev
- meson
- protobuf-compiler
- protobuf-compiler-grpc
- python3
- python3-pyelftools
meson-parameters:
- --buildtype=release
- -Denable_driver_sdk=true
- -Dmachine=haswell
override-pull: |
craftctl default
for file in ${CRAFT_PROJECT_DIR}/local/patches/*
do
patch -i $file -p 1
done
prime:
- usr/local/lib/x86_64-linux-gnu/*
bess:
plugin: nil
after:
- dpdk
source: https://github.com/omec-project/bess.git
source-commit: dc7ef58702b3013a0b149b113340082dfbdca7cd
source-type: git
build-packages:
- ca-certificates
- libbenchmark-dev
- libbpf0
- libc-ares-dev
- libelf-dev
- libgflags2.2
- libgoogle-glog-dev
- libgrpc++-dev
- libgtest-dev
- libjson-c-dev
- libnuma-dev
- libpcap-dev
- libprotobuf-dev
- libssl-dev
- libunwind-dev
- meson
- pkg-config
- protobuf-compiler
- protobuf-compiler-grpc
- python3
stage-packages:
- libatomic1
- libbenchmark1
- libbpf0
- libbsd0
- libc-ares2
- libelf1
- libgflags2.2
- libgoogle-glog0v5
- libgraph-easy-perl
- libgrpc++1
- libjson-c5
- libnl-3-200
- libnl-cli-3-200
- libnuma1
- libpcap0.8
- libprotobuf-c1
- libssl3
- libunwind8
- iproute2
- iptables
- iputils-ping
- tcpdump
- ethtool
build-environment:
- BESS_LINK_DYNAMIC: 1
- CPU: x86-64-v3
- CXXFLAGS: "-Wno-error=nonnull -Wno-error=maybe-uninitialized"
override-build: |
for file in $(find ./protobuf -name *.proto -print)
do
protoc "$file" --proto_path=protobuf --python_out=pybess/builtin_pb --grpc_out=pybess/builtin_pb --plugin=protoc-gen-grpc=$(which grpc_python_plugin)
done
make -j $(nproc) -C core bessd modules
mkdir -p $CRAFT_PART_INSTALL/bin
cp bin/bessd $CRAFT_PART_INSTALL/bin/bessd
mkdir -p $CRAFT_PART_INSTALL/opt/bess/bessctl
mkdir -p $CRAFT_PART_INSTALL/opt/bess/pybess
cp -r bessctl/* $CRAFT_PART_INSTALL/opt/bess/bessctl/
cp -r pybess/* $CRAFT_PART_INSTALL/opt/bess/pybess/
overlay-script: |
useradd -R $CRAFT_OVERLAY -M -r tcpdump
bess-python-deps:
plugin: python
after:
- bess
source: .
python-packages:
- flask
- grpcio
- iptools
- jsoncomment
- mitogen
- protobuf==3.20.0
- psutil
- pyroute2
- scapy
stage-packages:
- python3-venv
override-build: |
craftctl default
ln -srf $CRAFT_PART_INSTALL/bin/python3 $CRAFT_PART_INSTALL/bin/python
config:
plugin: dump
after:
- bess
source: https://github.com/omec-project/upf.git
source-tag: v${CRAFT_PROJECT_VERSION}
source-subdir: conf
organize:
"*": opt/bess/bessctl/conf/
version:
plugin: nil
override-build: |
mkdir -p ${CRAFT_PART_INSTALL}/etc/
echo ${CRAFT_PROJECT_VERSION} > ${CRAFT_PART_INSTALL}/etc/workload-version
organize:
"*": etc/
stage:
- etc/