Skip to content

Commit 0f48648

Browse files
committed
Adding bpfcc package
1 parent e9b4da8 commit 0f48648

2 files changed

Lines changed: 100 additions & 1 deletion

File tree

lib/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ function set_changelog() {
11501150
function dpkg_buildpackage_default() {
11511151
logmust cd "$WORKDIR/repo"
11521152
logmust set_changelog
1153-
logmust dpkg-buildpackage -b -us -uc
1153+
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -d -b -us -uc
11541154
logmust cd "$WORKDIR/"
11551155
logmust mv ./*deb artifacts/
11561156
}

packages/bpfcc-tools/config.sh

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2018 Delphix
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# shellcheck disable=SC2034
18+
19+
#
20+
# This file is a reference config.sh to use when adding a new package.
21+
#
22+
23+
#
24+
# Git URL for where your package is to be found
25+
#
26+
DEFAULT_PACKAGE_GIT_URL="https://github.com/tonynguien/bcc.git"
27+
28+
#
29+
# If you are adding a third-package from an upstream git project, uncomment
30+
# and fill the two lines below.
31+
#
32+
UPSTREAM_GIT_URL=https://github.com/iovisor/bcc.git
33+
UPSTREAM_GIT_BRANCH=master
34+
35+
#
36+
# If you are adding a third-party package based on an existing Ubuntu package,
37+
# find the source package and fill the line below. Hint: the source package
38+
# name is either the same as the package or will appear under "Source:" when
39+
# running "apt show <package>"
40+
#
41+
#UPSTREAM_SOURCE_PACKAGE=bpfcc
42+
43+
#
44+
# Install build dependencies for the package.
45+
# (Optional function)
46+
#
47+
function prepare() {
48+
#
49+
# Useful helper functions:
50+
#
51+
#logmust install_pkgs build-dep-pkg1 build-dep-pkg2 ...
52+
#logmust install_build_deps_from_control_file
53+
# For Noble Numbat (24.04)
54+
# sudo apt install -y zip bison build-essential cmake flex git libedit-dev \
55+
# libllvm18 llvm-18-dev libclang-18-dev python3 zlib1g-dev libelf-dev libfl-dev python3-setuptools \
56+
# liblzma-dev libdebuginfod-dev arping netperf iperf libpolly-18-dev
57+
58+
echo 'Install build dependencies'
59+
logmust install_pkgs zip bison build-essential cmake flex git libedit-dev \
60+
libllvm18 llvm-18-dev libclang-18-dev python3 zlib1g-dev libelf-dev libfl-dev python3-setuptools \
61+
liblzma-dev libdebuginfod-dev arping netperf iperf libpolly-18-dev dh-python debhelper python3-pyroute2
62+
}
63+
64+
#
65+
# Build the package.
66+
# (Mandatory function)
67+
#
68+
function build() {
69+
#
70+
# This is the default functions to build the package:
71+
#
72+
#git clone https://github.com/iovisor/bcc.git
73+
#mkdir bcc/build; cd bcc/build
74+
#cmake ..
75+
#make
76+
#sudo make install
77+
#cmake -DPYTHON_CMD=python3 .. # build python3 binding
78+
#pushd src/python/
79+
#make
80+
#sudo make install
81+
#popd
82+
#
83+
echo "Remove bcc-lua"
84+
logmust grep -RIl "usr/bin/bcc-lua" workdir/repo/debian | xargs -r rm -f
85+
logmust dpkg_buildpackage_default
86+
}
87+
88+
#
89+
# Hook to fetch upstream package changes and merge into our tree.
90+
# (Optional function, only applies to third-party packages)
91+
#
92+
function update_upstream() {
93+
#
94+
# Useful helper functions:
95+
#
96+
#logmust update_upstream_from_source_package
97+
#logmust update_upstream_from_git
98+
echo 'update_upstream() - insert code here'
99+
}

0 commit comments

Comments
 (0)