• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2016,2020 Canonical
3#
4# This program is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License
6# as published by the Free Software Foundation; either version 2
7# of the License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17#
18name: bcc
19summary: BPF Compiler Collection (BCC)
20description: A toolkit for creating efficient kernel tracing and manipulation programs
21confinement: strict
22grade: stable
23plugs:
24    mount-observe: null
25    system-observe: null
26    system-trace: null
27assumes: [snapd2.37]
28base: core18
29adopt-info: bcc
30
31architectures:
32    - build-on: s390x
33    - build-on: ppc64el
34    - build-on: arm64
35    - build-on: armhf
36    - build-on: amd64
37    - build-on: i386
38
39parts:
40    bcc:
41        plugin: cmake
42        override-pull: |
43            snapcraftctl pull
44
45            find . -type f -exec sed -i 's|^#\!/usr/bin/python|#\!/usr/bin/env python3|' {} \;
46
47            version=$(git tag | sort -V | tail -1 | cut -c2-)
48            commits=$(git log --oneline | wc -l)
49            sha=$(git log -1 --oneline | cut -d' ' -f1)
50            date=$(date +'%Y%m%d')
51            snapcraftctl set-version "$version-$date-$commits-$sha"
52        configflags:
53            - '-DCMAKE_INSTALL_PREFIX=/usr'
54            - '-DPYTHON_CMD=$SNAPCRAFT_STAGE/usr/bin/python3'
55            - '-DCMAKE_VERBOSE_MAKEFILE=ON'
56        source: .
57        build-packages:
58            - bison
59            - build-essential
60            - flex
61            - git
62            - iperf
63            - libclang-4.0-dev
64            - libedit-dev
65            - libelf-dev
66            - libllvm4.0
67            - libfl-dev
68            - llvm-4.0-dev
69            - zlib1g-dev
70        prime:
71            - -usr/share/bcc/tools/doc
72            - usr/lib/*/lib*.so*
73            - usr/lib/python3
74            - usr/lib/python3.6*
75            - usr/share/bcc/tools
76        after:
77          - stage
78
79    stage:
80        plugin: nil
81        stage-packages:
82            - libbz2-1.0
83            - liblzma5
84            - libncursesw5
85            - libtinfo5
86            - libzzip-0-13
87            - python3
88            - python3-packaging
89            - python3-pip
90            - python3-setuptools
91        prime:
92            - -usr/lib/*/perl
93            - -usr/lib/*/perl5
94            - usr/bin
95            - usr/lib
96
97    wrapper:
98        plugin: dump
99        after: [bcc]
100        source: snap/local
101
102apps:
103    argdist:
104        command: bcc-wrapper argdist
105    bashreadline:
106        command: bcc-wrapper bashreadline
107    biolatency:
108        command: bcc-wrapper biolatency
109    biolatpcts:
110        command: bcc-wrapper biolatpcts
111    biosnoop:
112        command: bcc-wrapper biosnoop
113    biotop:
114        command: bcc-wrapper biotop
115    bitesize:
116        command: bcc-wrapper bitesize
117    bpflist:
118        command: bcc-wrapper bpflist
119    btrfsdist:
120        command: bcc-wrapper btrfsdist
121    btrfsslower:
122        command: bcc-wrapper btrfsslower
123    cachestat:
124        command: bcc-wrapper cachestat
125    cachetop:
126        command: bcc-wrapper cachetop
127    capable:
128        command: bcc-wrapper capable
129    cobjnew:
130        command: bcc-wrapper cobjnew
131    compactsnoop:
132        command: bcc-wrapper compactsnoop
133    cpudist:
134        command: bcc-wrapper cpudist
135    cpuunclaimed:
136        command: bcc-wrapper cpuunclaimed
137    criticalstat:
138        command: bcc-wrapper criticalstat
139    dbslower:
140        command: bcc-wrapper dbslower
141    dbstat:
142        command: bcc-wrapper dbstat
143    dcsnoop:
144        command: bcc-wrapper dcsnoop
145    dcstat:
146        command: bcc-wrapper dcstat
147    deadlock:
148        command: bcc-wrapper deadlock
149    dirtop:
150        command: bcc-wrapper dirtop
151    drsnoop:
152        command: bcc-wrapper drsnoop
153    execsnoop:
154        command: bcc-wrapper execsnoop
155    exitsnoop:
156        command: bcc-wrapper exitsnoop
157    ext4dist:
158        command: bcc-wrapper ext4dist
159    ext4slower:
160        command: bcc-wrapper ext4slower
161    filelife:
162        command: bcc-wrapper filelife
163    fileslower:
164        command: bcc-wrapper fileslower
165    filetop:
166        command: bcc-wrapper filetop
167    funccount:
168        command: bcc-wrapper funccount
169    funcinterval:
170        command: bcc-wrapper funcinterval
171    funclatency:
172        command: bcc-wrapper funclatency
173    funcslower:
174        command: bcc-wrapper funcslower
175    gethostlatency:
176        command: bcc-wrapper gethostlatency
177    hardirqs:
178        command: bcc-wrapper hardirqs
179    inject:
180        command: bcc-wrapper inject
181    javacalls:
182        command: bcc-wrapper javacalls
183    javaflow:
184        command: bcc-wrapper javaflow
185    javagc:
186        command: bcc-wrapper javagc
187    javaobjnew:
188        command: bcc-wrapper javaobjnew
189    javastat:
190        command: bcc-wrapper javastat
191    javathreads:
192        command: bcc-wrapper javathreads
193    killsnoop:
194        command: bcc-wrapper killsnoop
195    klockstat:
196        command: bcc-wrapper klockstat
197    llcstat:
198        command: bcc-wrapper llcstat
199    mdflush:
200        command: bcc-wrapper mdflush
201    memleak:
202        command: bcc-wrapper memleak
203    mountsnoop:
204        command: bcc-wrapper mountsnoop
205    mysqld-qslower:
206        command: bcc-wrapper mysqld_qslower
207    netqtop:
208        command: bcc-wrapper netqtop
209    nfsdist:
210        command: bcc-wrapper nfsdist
211    nfsslower:
212        command: bcc-wrapper nfsslower
213    nodegc:
214        command: bcc-wrapper nodegc
215    nodestat:
216        command: bcc-wrapper nodestat
217    offcputime:
218        command: bcc-wrapper offcputime
219    offwaketime:
220        command: bcc-wrapper offwaketime
221    oomkill:
222        command: bcc-wrapper oomkill
223    opensnoop:
224        command: bcc-wrapper opensnoop
225    perlcalls:
226        command: bcc-wrapper perlcalls
227    perlflow:
228        command: bcc-wrapper perlflow
229    perlstat:
230        command: bcc-wrapper perlstat
231    pidpersec:
232        command: bcc-wrapper pidpersec
233    profile:
234        command: bcc-wrapper profile
235    phpcalls:
236        command: bcc-wrapper phpcalls
237    phpflow:
238        command: bcc-wrapper phpflow
239    phpstat:
240        command: bcc-wrapper phpstat
241    pythoncalls:
242        command: bcc-wrapper pythoncalls
243    pythonflow:
244        command: bcc-wrapper pythonflow
245    pythongc:
246        command: bcc-wrapper pythongc
247    pythonstat:
248        command: bcc-wrapper pythonstat
249    readahead:
250        command: bcc-wrapper readahead
251    reset-trace:
252        command: bcc-wrapper reset-trace
253    rubycalls:
254        command: bcc-wrapper rubycalls
255    rubyflow:
256        command: bcc-wrapper rubyflow
257    rubygc:
258        command: bcc-wrapper rubygc
259    rubyobjnew:
260        command: bcc-wrapper rubyobjnew
261    rubystat:
262        command: bcc-wrapper rubystat
263    runqlat:
264        command: bcc-wrapper runqlat
265    runqlen:
266        command: bcc-wrapper runqlen
267    runqslower:
268        command: bcc-wrapper runqslower
269    shmsnoop:
270        command: bcc-wrapper shmsnoop
271    slabratetop:
272        command: bcc-wrapper slabratetop
273    sofdsnoop:
274        command: bcc-wrapper sofdsnoop
275    softirqs:
276        command: bcc-wrapper softirqs
277    solisten:
278        command: bcc-wrapper solisten
279    sslsniff:
280        command: bcc-wrapper sslsniff
281    stackcount:
282        command: bcc-wrapper stackcount
283    statsnoop:
284        command: bcc-wrapper statsnoop
285    swapin:
286        command: bcc-wrapper swapin
287    syncsnoop:
288        command: bcc-wrapper syncsnoop
289    syscount:
290        command: bcc-wrapper syscount
291    tclcalls:
292        command: bcc-wrapper tclcalls
293    tclflow:
294        command: bcc-wrapper tclflow
295    tclobjnew:
296        command: bcc-wrapper tclobjnew
297    tclstat:
298        command: bcc-wrapper tclstat
299    tcpaccept:
300        command: bcc-wrapper tcpaccept
301    tcpconnect:
302        command: bcc-wrapper tcpconnect
303    tcpconnlat:
304        command: bcc-wrapper tcpconnlat
305    tcpdrop:
306        command: bcc-wrapper tcpdrop
307    tcplife:
308        command: bcc-wrapper tcplife
309    tcpretrans:
310        command: bcc-wrapper tcpretrans
311    tcprtt:
312        command: bcc-wrapper tcprtt
313    tcpstates:
314        command: bcc-wrapper tcpstates
315    tcpsubnet:
316        command: bcc-wrapper tcpsubnet
317    tcpsynbl:
318        command: bcc-wrapper tcpsynbl
319    tcptop:
320        command: bcc-wrapper tcptop
321    tcptracer:
322        command: bcc-wrapper tcptracer
323    threadsnoop:
324        command: bcc-wrapper threadsnoop
325    tplist:
326        command: bcc-wrapper tplist
327    trace:
328        command: bcc-wrapper trace
329    ttysnoop:
330        command: bcc-wrapper ttysnoop
331    ucalls:
332        command: bcc-wrapper lib/ucalls
333    uflow:
334        command: bcc-wrapper lib/uflow
335    ugc:
336        command: bcc-wrapper lib/ugc
337    uobjnew:
338        command: bcc-wrapper lib/uobjnew
339    ustat:
340        command: bcc-wrapper lib/ustat
341    uthreads:
342        command: bcc-wrapper lib/uthreads
343    vfscount:
344        command: bcc-wrapper vfscount
345    vfsstat:
346        command: bcc-wrapper vfsstat
347    wakeuptime:
348        command: bcc-wrapper wakeuptime
349    xfsdist:
350        command: bcc-wrapper xfsdist
351    xfsslower:
352        command: bcc-wrapper xfsslower
353    zfsdist:
354        command: bcc-wrapper zfsdist
355    zfsslower:
356        command: bcc-wrapper zfsslower
357
358# vim: set ai et sts=4 tabstop=4 sw=4:
359