aboutsummaryrefslogtreecommitdiffstats
path: root/testing/singularity/APKBUILD
blob: 9da66943630edfe68bb238ee2cad0dd513082247 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=singularity
pkgver=3.8.3
pkgrel=1
pkgdesc="Application containers focused on reproducibility for scientific computing and HPC world."
url="https://www.sylabs.io/singularity/"
# aarch64: segmentation fault during build
# mips64: fails to build
# ppc64le: produces a non-PIE suid binary
# riscv64 blocked by binutils-gold
arch="all !aarch64 !mips64 !ppc64le !riscv64"
license="BSD-3-Clause AND BSD-3-Clause-LBNL"
options="chmod-clean suid !check" # no test suite from upstream
depends="squashfs-tools"
makedepends="
	go
	linux-headers
	binutils-gold
	openssl-dev
	libuuid
	util-linux-dev
	libseccomp-dev
	cryptsetup
	"
subpackages="$pkgname-doc $pkgname-bash-completion::noarch"
source="https://github.com/hpcng/singularity/releases/download/v$pkgver/singularity-$pkgver.tar.gz"
builddir="$srcdir/src/github.com/hpcng/$pkgname"

# secfixes:
#   3.7.4-r0:
#     - CVE-2021-32635
#   3.7.3-r0:
#     - CVE-2021-29136
#   3.6.4-r0:
#     - CVE-2020-15229
#   3.6.3-r0:
#     - CVE-2020-25039
#     - CVE-2020-25040
#   3.6.0-r0:
#     - CVE-2020-13845
#     - CVE-2020-13846
#     - CVE-2020-13847
#   3.5.2-r0:
#     - CVE-2019-19724

prepare() {
	export GOPATH="$srcdir"

	mkdir -p "$(dirname $builddir)"
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/

	echo "$pkgver" > "$builddir"/VERSION
	default_prepare
}

build() {
	export GOPATH="$srcdir"
	export GOBIN="$GOPATH/bin"

	./mconfig \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/infodir \
		--localstatedir=/var

	make -C builddir
}

package() {
	make -C builddir DESTDIR="$pkgdir" install

	install -m644 -D -t "$pkgdir/usr/share/doc/$pkgname" README.md

	mkdir -p "$pkgdir"/usr/share/bash-completion/completions
	mv "$pkgdir"/etc/bash_completion.d/singularity \
		"$pkgdir"/usr/share/bash-completion/completions
}

sha512sums="
ede69bfa6602d75f67354afc215a1cf51db769df052662b77a8f1ac88cf580f13683190231452611ba618cda0e63af746dcdf59ab41611a9035bd199f8b50ec5  singularity-3.8.3.tar.gz
"