Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

chef-base-plans/libseccomp

Repository files navigation

Build Status

libseccomp

An easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism.. See documentation

Maintainers

Type of Package

Library package

Use as Dependency

Library packages can be set as runtime or build time dependencies, however they are typically used as buildtime dependencies. See Defining your dependencies for more information.

To add core/libseccomp as a dependency, you can add one of the following to your plan file.

Buildtime Dependency

pkg_build_deps=(core/libseccomp)

Runtime Dependency

pkg_deps=(core/libseccomp)

Use as a Library

Installation

To install this plan, run the following command:

hab pkg install core/libseccomp

hab pkg install core/libseccomp
» Installing core/libseccomp
☁ Determining latest version of core/libseccomp in the 'stable' channel
→ Found newer installed version (core/libseccomp/2.3.1/20200923152329) than remote version (core/libseccomp/2.3.1/20200404021804)
→ Using core/libseccomp/2.3.1/20200923152329
★ Install of core/libseccomp/2.3.1/20200923152329 complete with 0 new packages installed.

Viewing library files

To view the library files first get the habitat installation directory

hab pkg path core/libseccomp
/hab/pkgs/core/libseccomp/2.3.1/20200923152329

Then list the libraries, for example:

ls -1 $(hab pkg path core/libseccomp)
...
...
bin
include
lib
share

Use as Tool

Although libseccomp is primarily a library, it also includes a single binary that can be installed and used as below.

Installation

To install this plan, you should run the following commands to first install, and then link the binaries this plan creates.

hab pkg install core/libseccomp --binlink

will add the following binary to the PATH:

  • /bin/scmp_sys_resolver

For example:

$ hab pkg install core/libseccomp --binlink
» Installing core/libseccomp
☁ Determining latest version of core/libseccomp in the 'stable' channel
→ Found newer installed version (core/libseccomp/2.3.1/20200923152329) than remote version (core/libseccomp/2.3.1/20200404021804)
→ Using core/libseccomp/2.3.1/20200923152329
★ Install of core/libseccomp/2.3.1/20200923152329 complete with 0 new packages installed.
» Binlinking scmp_sys_resolver from core/libseccomp/2.3.1/20200923152329 into /bin
★ Binlinked scmp_sys_resolver from core/libseccomp/2.3.1/20200923152329 to /bin/scmp_sys_resolver

Using an example binary

You can now use the binary as normal. For example:

/bin/scmp_sys_resolver -h or scmp_sys_resolver -h

$ scmp_sys_resolver -h
usage: scmp_sys_resolver [-h] [-a <arch>] [-t] <name>|<number>