diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2020-05-27 21:38:50 +0000 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2020-05-27 21:39:38 +0000 |
commit | 462830307ae011ba094533126675d013ea60ae5d (patch) | |
tree | efa3f5356202e4f685dc7059c02f3931440ea066 | |
parent | dd032589d2f4ba54f2686fba9251b36c2292485e (diff) | |
download | alpine_aports-462830307ae011ba094533126675d013ea60ae5d.tar.bz2 alpine_aports-462830307ae011ba094533126675d013ea60ae5d.tar.xz alpine_aports-462830307ae011ba094533126675d013ea60ae5d.zip |
community/containerd: fix compilation on mips64
-rw-r--r-- | community/containerd/APKBUILD | 26 | ||||
-rw-r--r-- | community/containerd/fix-mips64-stat-struct.patch | 13 | ||||
-rw-r--r-- | community/containerd/make-buildmode-configurable.patch | 17 |
3 files changed, 50 insertions, 6 deletions
diff --git a/community/containerd/APKBUILD b/community/containerd/APKBUILD index 0da5150ba0..604f36408f 100644 --- a/community/containerd/APKBUILD +++ b/community/containerd/APKBUILD | |||
@@ -9,12 +9,14 @@ pkgver=1.3.4 | |||
9 | pkgrel=1 | 9 | pkgrel=1 |
10 | pkgdesc="An open and reliable container runtime" | 10 | pkgdesc="An open and reliable container runtime" |
11 | url="https://containerd.io" | 11 | url="https://containerd.io" |
12 | arch="all !mips !mips64" # blocked by runc | 12 | arch="all" |
13 | license="Apache-2.0" | 13 | license="Apache-2.0" |
14 | depends="runc" | 14 | depends="runc" |
15 | makedepends="btrfs-progs-dev go go-md2man libseccomp-dev" | 15 | makedepends="btrfs-progs-dev go go-md2man libseccomp-dev" |
16 | subpackages="$pkgname-doc" | 16 | subpackages="$pkgname-doc" |
17 | source="containerd-$pkgver.tar.gz::https://github.com/containerd/containerd/archive/v$pkgver.tar.gz" | 17 | source="containerd-$pkgver.tar.gz::https://github.com/containerd/containerd/archive/v$pkgver.tar.gz |
18 | make-buildmode-configurable.patch | ||
19 | fix-mips64-stat-struct.patch" | ||
18 | builddir="$srcdir/src/github.com/containerd/containerd" | 20 | builddir="$srcdir/src/github.com/containerd/containerd" |
19 | 21 | ||
20 | # secfixes: | 22 | # secfixes: |
@@ -34,13 +36,23 @@ builddir="$srcdir/src/github.com/containerd/containerd" | |||
34 | # 1.2.6-r0: | 36 | # 1.2.6-r0: |
35 | # - CVE-2019-9946 | 37 | # - CVE-2019-9946 |
36 | 38 | ||
37 | build() { | 39 | prepare() { |
38 | cd "$srcdir" | 40 | cd "$srcdir" |
39 | export GOPATH="$PWD" | 41 | export GOPATH="$PWD" |
40 | mkdir -p $(dirname "$builddir") | 42 | mkdir -p $(dirname "$srcdir/src/github.com/containerd/containerd") |
41 | ln -s "$PWD/$pkgname-$pkgver" "$builddir" | 43 | ln -s "$PWD/$pkgname-$pkgver" "$builddir" |
42 | cd "$builddir" | 44 | cd "$builddir" |
43 | make VERSION="v$pkgver" REVISION="$_commit" | 45 | |
46 | default_prepare | ||
47 | } | ||
48 | |||
49 | build() { | ||
50 | case "$CARCH" in | ||
51 | mips64*) buildmode=exe;; | ||
52 | *) buildmode=pie;; | ||
53 | esac | ||
54 | |||
55 | make VERSION="v$pkgver" REVISION="$_commit" BUILDMODE="$buildmode" | ||
44 | make man | 56 | make man |
45 | } | 57 | } |
46 | 58 | ||
@@ -57,4 +69,6 @@ package() { | |||
57 | install -Dm644 "$builddir"/man/*.8 "$pkgdir"/usr/share/man/man8/ | 69 | install -Dm644 "$builddir"/man/*.8 "$pkgdir"/usr/share/man/man8/ |
58 | } | 70 | } |
59 | 71 | ||
60 | sha512sums="b186d5aef3e5a0d35c12dcc3cfa5d48a9602f6278c4650942859a1ab6abd1299d33a1bc623376955a834a2626491196b604591d92a05d39745dfc33ff51ad5aa containerd-1.3.4.tar.gz" | 72 | sha512sums="b186d5aef3e5a0d35c12dcc3cfa5d48a9602f6278c4650942859a1ab6abd1299d33a1bc623376955a834a2626491196b604591d92a05d39745dfc33ff51ad5aa containerd-1.3.4.tar.gz |
73 | b38ce6d31bfba2e74413887237f5b8abb4fa06d36937d9a73a612a1be10a79927b7f6643f2dd10bee4361b9f5cf11e6349052ab24795ce7d176eae2add3e4d72 make-buildmode-configurable.patch | ||
74 | c591b18386dbf39aff358007bcc4704f8e668e93002c73fd61090f4c6bb5b52ccb84813e9f82136bf4de6531b1404ecea71a05a6af63ba96daa3b354e4a290ab fix-mips64-stat-struct.patch" | ||
diff --git a/community/containerd/fix-mips64-stat-struct.patch b/community/containerd/fix-mips64-stat-struct.patch new file mode 100644 index 0000000000..35fe2597ac --- /dev/null +++ b/community/containerd/fix-mips64-stat-struct.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/vendor/github.com/docker/docker/pkg/system/stat_linux.go b/vendor/github.com/docker/docker/pkg/system/stat_linux.go | ||
2 | index 1939f95..af7af20 100644 | ||
3 | --- a/vendor/github.com/docker/docker/pkg/system/stat_linux.go | ||
4 | +++ b/vendor/github.com/docker/docker/pkg/system/stat_linux.go | ||
5 | @@ -8,7 +8,7 @@ func fromStatT(s *syscall.Stat_t) (*StatT, error) { | ||
6 | mode: s.Mode, | ||
7 | uid: s.Uid, | ||
8 | gid: s.Gid, | ||
9 | - rdev: s.Rdev, | ||
10 | + rdev: uint64(s.Rdev), | ||
11 | mtim: s.Mtim}, nil | ||
12 | } | ||
13 | |||
diff --git a/community/containerd/make-buildmode-configurable.patch b/community/containerd/make-buildmode-configurable.patch new file mode 100644 index 0000000000..25c131d9dd --- /dev/null +++ b/community/containerd/make-buildmode-configurable.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | diff --git a/Makefile.linux b/Makefile.linux | ||
2 | index 7b27008..0afa70c 100644 | ||
3 | --- a/Makefile.linux | ||
4 | +++ b/Makefile.linux | ||
5 | @@ -17,10 +17,11 @@ | ||
6 | WHALE="+" | ||
7 | ONI="-" | ||
8 | COMMANDS += containerd-shim containerd-shim-runc-v1 containerd-shim-runc-v2 | ||
9 | +BUILDMODE := pie | ||
10 | |||
11 | # check GOOS for cross compile builds | ||
12 | ifeq ($(GOOS),linux) | ||
13 | - GO_GCFLAGS += -buildmode=pie | ||
14 | + GO_GCFLAGS += -buildmode=$(BUILDMODE) | ||
15 | endif | ||
16 | |||
17 | # amd64 supports go test -race | ||