aboutsummaryrefslogtreecommitdiffstats
path: root/main/fuse3/APKBUILD
blob: d88fa5247cd0e777c92dbe098d359e4b0a87466a (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fuse3
_pkgname=fuse
pkgver=3.10.2
pkgrel=0
pkgdesc="The reference implementation of the Linux FUSE (Filesystem in Userspace) interface"
url="https://github.com/libfuse/libfuse"
arch="all"
license="GPL-2.0-only LGPL-2.1-only"
depends="fuse-common"
makedepends="gettext-dev linux-headers meson eudev-dev python3
	py3-six py3-pluggy py3-attrs py3-py"
checkdepends="py3-pytest"
subpackages="$pkgname-dev $pkgname-doc fuse-common:_common fuse-openrc:_openrc $pkgname-libs"
source="https://github.com/libfuse/libfuse/releases/download/fuse-$pkgver/fuse-$pkgver.tar.xz
	fix-realpath.patch
	fuse.initd
	"
options="suid !check" # check is currently broken: https://github.com/libfuse/libfuse/issues/293

builddir="$srcdir"/$_pkgname-$pkgver

# secfixes:
#   3.2.5-r0:
#     - CVE-2018-10906

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	python3 -m pytest test/
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	rm -r "$pkgdir"/dev "$pkgdir"/etc/init.d

	install -Dm755 "$srcdir"/fuse.initd "$pkgdir"/etc/init.d/fuse
	# create config
	install -d "$pkgdir"/etc
	cat >"$pkgdir"/etc/fuse.conf << _EOF_
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
#user_allow_other
_EOF_
}

_common() {
	pkgdesc="Common files for fuse2 and fuse3"
	mkdir -p "$subpkgdir"/etc/
	mv "$pkgdir"/etc/fuse.conf "$subpkgdir"/etc/
}

_openrc() {
	default_openrc
	install_if="openrc fuse-common=$pkgver-r$pkgrel"
}

sha512sums="8a306f69662126747321144b9e62fe43496ee2b5e96ba6094b7756a365205aefea477f39407c3d2b27528fae773a0662130de9d41503da630e17df564ce76260  fuse-3.10.2.tar.xz
1a9e1d1e8a7b0778ffde328e4322c73b5d57ec98d52767c846d755cce861ab27989823a75b6c5f994432ddb77fa351dfa4a8f948c9467c5f7d5f471e4608358b  fix-realpath.patch
7f6a503ef23cfa8b809c544375c2d83ad56525269b48ad1a7dff0ce36f4bf2f2a3fafed9dc70a71ff6281b261db5f01829e16c06f041921a5d8c8d715a04a8c1  fuse.initd"