diff --git a/INSTALL.md b/INSTALL.md index a60e42490652..335d0fdabedb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -101,15 +101,6 @@ sudo apt-get install -y bpftrace Should work on Ubuntu 19.04 and later. -On Ubuntu 16.04 and later, bpftrace is also available as a snap package (https://snapcraft.io/bpftrace), however, the snap provides extremely limited file permissions so the --devmode option should be specified on installation in order avoid file access issues. - -``` -sudo snap install --devmode bpftrace -sudo snap connect bpftrace:system-trace -``` - -The snap package also currently has issues with uprobes ([#829](https://github.com/iovisor/bpftrace/issues/829)). - ## Fedora package For Fedora 28 (and later), bpftrace is already included in the official repo. Just install the package with dnf. diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml deleted file mode 100644 index 21268194b3ad..000000000000 --- a/snap/snapcraft.yaml +++ /dev/null @@ -1,147 +0,0 @@ -# -# To build: -# -# Using multipass, one should enable a large multipass VM using: -# -# SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G snapcraft -# -# Alternatively, one can build in a lxd container using: -# -# snapcraft --use-lxd -# -# Install using something like: -# -# sudo snap install --devmode bpftrace_0.9.4-20200312-1403-11814f2_amd64.snap -# -name: bpftrace -summary: high-level tracing language for Linux eBPF -description: BPFtrace is a high-level tracing language for - Linux enhanced Berkeley Packet Filter available in recent - Linux kernels. BPFtrace uses LLVM as a backend to compile scripts - to BPF-bytecode and makes use of BCC for interacting with the Linux - BPF system, as well as existing Linux tracing capabilities like - kernel dynamic tracing, user-level dynamic tracing and tracepoints. - -confinement: strict -grade: stable -base: core20 -assumes: [snapd2.37] -adopt-info: bpftrace - -architectures: - - build-on: amd64 - - build-on: arm64 - -parts: - bcclibs3: - plugin: cmake - source: https://github.com/iovisor/bcc.git - source-tag: v0.8.0 - cmake-parameters: - - -DLLVM_DEFINITIONS="-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" - - -DREVISION_LAST=v0.21.0 - - -DBCC_KERNEL_HAS_SOURCE_DIR=1 - - -DPYTHON_CMD='python3' - - -DCMAKE_INSTALL_PREFIX=/usr - - override-pull: | - snapcraftctl pull - sed -i "s;if os.environ.get('DESTDIR'):;if \"sdist\" not in sys.argv and os.environ.get('DESTDIR'):;" src/python/setup.py.in - build-packages: - - git - - libc6 - - iperf - - bison - - cmake - - flex - - g++ - - binutils-dev - - libstdc++-dev - - libelf-dev - - zlib1g-dev - - libfl-dev - - clang-7 - - libclang-7-dev - - libclang-common-7-dev - - libclang1-7 - - libllvm7 - - llvm-7 - - llvm-7-dev - - llvm-7-runtime - - systemtap-sdt-dev - - netperf - - python3 - - arping - - clang-format - - ethtool - - inetutils-ping - - libedit-dev - - libzip-dev - - libluajit-5.1-dev - - luajit - - python3-netaddr - - python3-pyroute2 - - python3-distutils - stage: - - usr/lib/$SNAPCRAFT_ARCH_TRIPLET/* - - usr/lib/* - - usr/include/* - - usr/include/bcc/* - stage-packages: - - libbinutils - - libclang1-7 - - libllvm7 - - bpftrace: - after: - - bcclibs3 - source: https://github.com/iovisor/bpftrace.git - source-tag: v0.13.0 - plugin: cmake - cmake-parameters: - - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_LIBRARY_PATH=$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ - - -DLIBBCC_INCLUDE_DIRS=$SNAPCRAFT_STAGE/usr/include/ - - -DCMAKE_INSTALL_PREFIX=/usr - - override-pull: | - snapcraftctl pull - description=$(git describe HEAD --tags) - sha=$(echo $description | tr '-' ' ' | awk '{print $NF}') - version=${description%$sha} - commits=$(git log --oneline | wc -l) - date=$(date +'%Y%m%d') - version=$(echo $version$date-$commits-$sha | cut -c1-32) - snapcraftctl set-version "$version" - build-packages: - - bison - - cmake - - flex - - g++ - - git - - libelf-dev - - zlib1g-dev - - libfl-dev - - systemtap-sdt-dev - - binutils-dev - - llvm-7-dev - - llvm-7-runtime - - libclang-7-dev - - libcereal-dev - - clang-7 - - libgtest-dev - - libgmock-dev - - asciidoctor - stage-packages: - - libbinutils - - libclang1-7 - - libllvm7 - stage: - - usr/bin - - usr/share - -apps: - bpftrace: - command: usr/bin/bpftrace - plugs: [ home, system-trace ] -