diff options
author | Maciek Borzecki | 2018-01-22 17:08:35 +0100 |
---|---|---|
committer | aimileus | 2018-01-23 06:54:20 +0100 |
commit | 548bfd609ac911ff14d9ddeb800d1d1dd9a74c60 (patch) | |
tree | 3024c3c9737a1cb5d64d0a3dfd97518e1ed76166 /PKGBUILD | |
parent | 80e30afdce38cb3b95580f179fe3ac59f58c2c68 (diff) | |
download | aur-548bfd609ac911ff14d9ddeb800d1d1dd9a74c60.tar.gz |
snapd: build snap-update-ns, snap-exec statically
Both tools may be executed in a different mount space (chroot) where the
libraries could not be resolved.
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -8,7 +8,7 @@ pkgdesc="Service and tools for management of snap packages." depends=('squashfs-tools' 'libseccomp' 'libsystemd') pkgver=2.30 arch=('i686' 'x86_64' 'armv7h' 'aarch64') -pkgrel=5 +pkgrel=6 url="https://github.com/snapcore/snapd" license=('GPL3') makedepends=('git' 'go-pie' 'go-tools' 'bzr' 'libcap' 'python-docutils' 'systemd' 'xfsprogs') @@ -52,12 +52,13 @@ build() { XDG_CONFIG_HOME="$srcdir" ./get-deps.sh # Build go binaries - go install "${_gourl}/cmd/snap" - go install "${_gourl}/cmd/snapctl" - go install "${_gourl}/cmd/snapd" - go install "${_gourl}/cmd/snap-seccomp" - go install "${_gourl}/cmd/snap-update-ns" - go install "${_gourl}/cmd/snap-exec" + go build -o $GOPATH/bin/snap "${_gourl}/cmd/snap" + go build -o $GOPATH/bin/snapctl "${_gourl}/cmd/snapctl" + go build -o $GOPATH/bin/snapd "${_gourl}/cmd/snapd" + go build -o $GOPATH/bin/snap-seccomp "${_gourl}/cmd/snap-seccomp" + # build snap-exec and snap-update-ns completely static for base snaps + go build -o $GOPATH/bin/snap-update-ns -ldflags '-extldflags "-static"' "${_gourl}/cmd/snap-update-ns" + CGO_ENABLED=0 go build -o $GOPATH/bin/snap-exec "${_gourl}/cmd/snap-exec" # Generate the real systemd units out of the available templates make -C data/systemd |