Skip to content

Commit

Permalink
snap-seccomp: statically link embedded libseccomp
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Jul 10, 2017
1 parent e6f0b9b commit f77a386
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/snap-seccomp/main.go
Expand Up @@ -19,6 +19,8 @@

package main

//#cgo LDFLAGS: ${SRCDIR}/libseccomp.upstream/src/.libs/libseccomp.a
//
//#include <asm/ioctls.h>
//#include <ctype.h>
//#include <errno.h>
Expand Down Expand Up @@ -133,6 +135,8 @@ package main
//
import "C"

//go:generate sh -c "(cd libseccomp.upstream ; ./autogen.sh ; ./configure; make)"

import (
"bufio"
"bytes"
Expand Down
1 change: 1 addition & 0 deletions packaging/ubuntu-14.04/rules
Expand Up @@ -98,6 +98,7 @@ override_dh_auto_build:
# Build golang bits
mkdir -p _build/src/$(DH_GOPKG)/cmd/snap/test-data
cp -a cmd/snap/test-data/*.gpg _build/src/$(DH_GOPKG)/cmd/snap/test-data/
cp -a cmd/snap-seccomp/libseccomp.upstream/* _build/src/$(DH_GOPKG)/cmd/snap-seccomp/libseccomp.upstream
dh_auto_build -- $(BUILDFLAGS) $(TAGS) $(GCCGOFLAGS)
# Build C bits, sadly manually
cd cmd && ( autoreconf -i -f )
Expand Down
1 change: 1 addition & 0 deletions packaging/ubuntu-16.04/rules
Expand Up @@ -105,6 +105,7 @@ override_dh_auto_build:
# Build golang bits
mkdir -p _build/src/$(DH_GOPKG)/cmd/snap/test-data
cp -a cmd/snap/test-data/*.gpg _build/src/$(DH_GOPKG)/cmd/snap/test-data/
cp -a cmd/snap-seccomp/libseccomp.upstream/* _build/src/$(DH_GOPKG)/cmd/snap-seccomp/libseccomp.upstream
dh_auto_build -- $(BUILDFLAGS) $(TAGS) $(GCCGOFLAGS)
# Build C bits, sadly manually
cd cmd && ( autoreconf -i -f )
Expand Down

0 comments on commit f77a386

Please sign in to comment.