aboutsummaryrefslogtreecommitdiffstats
path: root/main/libseccomp/APKBUILD
blob: 8be0cbfcd7d5835f50b1d2f39b8e327f73b6f1a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Contributor: Dan Williams <dan@ma.ssive.co>
pkgname=libseccomp
pkgver=2.4.2
pkgrel=2
pkgdesc="An interface to the Linux Kernel's syscall filtering mechanism"
url="https://github.com/seccomp/libseccomp"
arch="all"
license="LGPL-2.1"
depends_dev="linux-headers"
makedepends="$depends_dev"
checkdepends="bash"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/seccomp/libseccomp/releases/download/v$pkgver/libseccomp-$pkgver.tar.gz
	remove-redefinition-prctl.patch
	tests-rely-on-__SNR_xxx-instead-of-__NR_xxx-for-syscalls.patch
	"

# secfixes:
#   2.4.0-r0:
#     - CVE-2019-9893

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	# commit be65b26b67099be2b2b4890d736dbd1ad15adf36 adapted to new kernel 5.x syscalls
	# as long as we are at 4.19 kernel, we need this change
	case "$CARCH" in
		ppc64le|s390x) rm -f tests/36-sim-ipc_syscalls.tests \
			             tests/37-sim-ipc_syscalls_be.tests;;
	esac
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="375a3c7c658be6a08b9bb30963e10bb49e8e066119e0be6d3d97faac3db18b8e2c6938d8b5d3874b2f5331ec8295170112fbae83b5a3b5a5bebc0d6705bdfdbb  libseccomp-2.4.2.tar.gz
f2c31dcafdc9a1ad78e32e76b75e1c1603071eaa3f979e1f2483b879a34ad07e0a4ef3642196a695415cdf81e1ed2bf325175872fb4e203ef9d0e668c287493f  remove-redefinition-prctl.patch
e9c6adbc424c310802851ec486df23aedd8121397a9742f3a5ed4754a5eee7ec1701a6f5e220bb37911b8c48626ba00d70943fad43e489d740d0295e6e9b0dff  tests-rely-on-__SNR_xxx-instead-of-__NR_xxx-for-syscalls.patch"