summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/fuse3/APKBUILD77
-rw-r--r--user/fuse3/fix-realpath.patch28
-rw-r--r--user/fuse3/fuse.initd35
-rw-r--r--user/py3-attrs/APKBUILD32
-rw-r--r--user/py3-more-itertools/APKBUILD33
-rw-r--r--user/py3-pytest/APKBUILD4
-rw-r--r--user/py3-six/APKBUILD3
-rw-r--r--user/sshfs/APKBUILD45
8 files changed, 254 insertions, 3 deletions
diff --git a/user/fuse3/APKBUILD b/user/fuse3/APKBUILD
new file mode 100644
index 000000000..dd03d34e2
--- /dev/null
+++ b/user/fuse3/APKBUILD
@@ -0,0 +1,77 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=fuse3
+_pkgname=fuse
+pkgver=3.2.6
+pkgrel=0
+pkgdesc="The reference implementation of the Linux FUSE (Filesystem in Userspace) interface"
+url="https://github.com/libfuse/libfuse"
+arch="all"
+options="suid !check" # Requires fuse kernel module to be loaded
+license="GPL-2.0-only AND LGPL-2.1-only AND BSD-2-Clause"
+depends="fuse-common"
+makedepends="linux-headers meson eudev-dev python3 py3-six py3-pluggy
+ py3-attrs py3-py"
+#checkdepends="py3-pytest debianutils-which"
+subpackages="$pkgname-dev $pkgname-doc
+ $_pkgname-common:common:noarch $_pkgname-openrc:openrc:noarch"
+source="https://github.com/libfuse/libfuse/releases/download/fuse-$pkgver/fuse-$pkgver.tar.xz
+ fix-realpath.patch
+ fuse.initd"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+# secfixes:
+# 3.2.5-r0:
+# - CVE-2018-10906
+
+build() {
+ cd "$builddir"
+ meson \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --buildtype=release \
+ . output
+ ninja -C output
+}
+
+check() {
+ cd "$builddir"/output
+ python3 -m pytest test/
+}
+
+package() {
+ cd "$builddir"
+ DESTDIR="$pkgdir" ninja -C output install
+ rm -r "$pkgdir"/dev "$pkgdir"/etc/init.d
+
+ install -Dm755 "$srcdir"/fuse.initd "$pkgdir"/etc/init.d/fuse
+ 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="3a1ef77ab4c79a24aad0b259e17f568a30a5faf53ac17eb25d05f30dc7423f0081583f5b3c284ca9196a01885843e97c323a84231272b7e2b55c8e73848a61b8 fuse-3.2.6.tar.xz
+1a9e1d1e8a7b0778ffde328e4322c73b5d57ec98d52767c846d755cce861ab27989823a75b6c5f994432ddb77fa351dfa4a8f948c9467c5f7d5f471e4608358b fix-realpath.patch
+7f6a503ef23cfa8b809c544375c2d83ad56525269b48ad1a7dff0ce36f4bf2f2a3fafed9dc70a71ff6281b261db5f01829e16c06f041921a5d8c8d715a04a8c1 fuse.initd"
diff --git a/user/fuse3/fix-realpath.patch b/user/fuse3/fix-realpath.patch
new file mode 100644
index 000000000..375bedc96
--- /dev/null
+++ b/user/fuse3/fix-realpath.patch
@@ -0,0 +1,28 @@
+--- fuse-3.1.0.orig/util/fusermount.c
++++ fuse-3.1.0/util/fusermount.c
+@@ -1200,19 +1200,16 @@
+
+ origmnt = argv[optind];
+
+- drop_privs();
+ mnt = fuse_mnt_resolve_path(progname, origmnt);
+- if (mnt != NULL) {
+- res = chdir("/");
+- if (res == -1) {
+- fprintf(stderr, "%s: failed to chdir to '/'\n", progname);
+- goto err_out;
+- }
+- }
+- restore_privs();
+ if (mnt == NULL)
+ exit(1);
+
++ res = chdir("/");
++ if (res == -1) {
++ fprintf(stderr, "%s: failed to chdir to '/'\n", progname);
++ exit(1);
++ }
++
+ umask(033);
+ if (unmount)
+ goto do_unmount;
diff --git a/user/fuse3/fuse.initd b/user/fuse3/fuse.initd
new file mode 100644
index 000000000..6c99929c2
--- /dev/null
+++ b/user/fuse3/fuse.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MOUNTPOINT=/sys/fs/fuse/connections
+
+depend() {
+ need localmount
+}
+
+start() {
+
+ ebegin "Starting fuse"
+ if ! grep -qw fuse /proc/filesystems; then
+ modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
+ fi
+ if grep -qw fusectl /proc/filesystems && \
+ ! grep -qw $MOUNTPOINT /proc/mounts; then
+ mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \
+ eerror $? "Error mounting control filesystem"
+ fi
+ eend ${?}
+
+}
+
+stop() {
+
+ ebegin "Stopping fuse"
+ if grep -qw $MOUNTPOINT /proc/mounts; then
+ umount $MOUNTPOINT >/dev/null 2>&1 || \
+ eerror $? "Error unmounting control filesystem"
+ fi
+ eend ${?}
+
+}
diff --git a/user/py3-attrs/APKBUILD b/user/py3-attrs/APKBUILD
new file mode 100644
index 000000000..fad246453
--- /dev/null
+++ b/user/py3-attrs/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Jean-Louis Fuchs <ganwell@fangorn.ch>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=py3-attrs
+pkgver=18.2.0
+pkgrel=0
+pkgdesc="Python classes without boilerplate"
+url="https://www.attrs.org"
+arch="noarch"
+options="!check" # Circular dependency with py3-pytest. Passes on x86_64
+license="MIT"
+depends="python3"
+makedepends="python3-dev"
+#checkdepends="py3-tox"
+source="py3-attrs-$pkgver.tar.gz::https://github.com/python-attrs/attrs/archive/$pkgver.tar.gz"
+builddir="$srcdir/attrs-$pkgver"
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ tox -e py36
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="01bcd8d492f0b7e64ae42e311b0e443d2b365d98021d8c15f8003da084f48cd20456c12defd734d3386979bb69ac2bebafa1d14692c6dad69b084929992b2c2d py3-attrs-18.2.0.tar.gz"
diff --git a/user/py3-more-itertools/APKBUILD b/user/py3-more-itertools/APKBUILD
new file mode 100644
index 000000000..46baffedb
--- /dev/null
+++ b/user/py3-more-itertools/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Max Rees <maxcrees@me.com>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=py3-more-itertools
+_pkgname=more-itertools
+pkgver=4.3.0
+pkgrel=0
+pkgdesc="More routines for operating on iterables, beyond itertools"
+url="https://pypi.org/project/more-itertools"
+options="!check" # Circular dependency with py3-pytest. Passes on x86_64
+arch="noarch"
+license="MIT"
+depends="python3"
+makedepends=""
+#checkdepends="py3-tox"
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/m/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ tox -e py36
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="5fee3d99fd796b0f0f6b5aa99a8db22e219d3dced71fef6f4b16286fe67061dce280389b3638c55c6e5f6c828ef1286cee845d76a6861d2af66d90e995d5aa4e py3-more-itertools-4.3.0.tar.gz"
diff --git a/user/py3-pytest/APKBUILD b/user/py3-pytest/APKBUILD
index 30a26fb30..8d720971e 100644
--- a/user/py3-pytest/APKBUILD
+++ b/user/py3-pytest/APKBUILD
@@ -3,13 +3,13 @@
pkgname=py3-pytest
_pkgname=pytest
pkgver=3.5.1
-pkgrel=0
+pkgrel=1
pkgdesc="A python test library"
url="https://pypi.python.org/pypi/pytest"
arch="noarch"
options="net !check" # Circular dependency with py3-tox. Passes on x86_64
license="MIT"
-depends="python3 py3-py"
+depends="python3 py3-py py3-more-itertools py3-six py3-pluggy py3-attrs"
makedepends="python3-dev"
#checkdepends="py3-tox"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
diff --git a/user/py3-six/APKBUILD b/user/py3-six/APKBUILD
index 7c001b2a9..3b5c00d34 100644
--- a/user/py3-six/APKBUILD
+++ b/user/py3-six/APKBUILD
@@ -7,10 +7,11 @@ pkgrel=1
pkgdesc="Python 2 compatibility library"
url="https://pypi.python.org/pypi/six"
arch="noarch"
+options="!check" # Circular dependency with py3-pytest
license="MIT"
depends=""
makedepends="python3-dev"
-checkdepends="py3-pluggy py3-pytest"
+#checkdepends="py3-pluggy py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/benjaminp/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
diff --git a/user/sshfs/APKBUILD b/user/sshfs/APKBUILD
new file mode 100644
index 000000000..404c077be
--- /dev/null
+++ b/user/sshfs/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=sshfs
+pkgver=3.5.0
+pkgrel=0
+pkgdesc="FUSE client based on the SSH File Transfer Protocol"
+url="https://github.com/libfuse/sshfs"
+arch="all"
+options="!check" # Requires fuse kernel module to be loaded and local ssh server
+license="GPL-2.0-only AND GPL-2.0+ AND LGPL-2.1-only"
+depends="openssh-client"
+makedepends="fuse3-dev glib-dev meson coreutils py3-docutils"
+#checkdepends="py3-pytest debianutils-which"
+subpackages="$pkgname-doc"
+source="https://github.com/libfuse/$pkgname/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.xz"
+
+build() {
+ cd "$builddir"
+ # NOTE: --prefix=/ is intentional. If --prefix=/usr, mount(8) will not be
+ # able to find mount.fuse.sshfs or mount.sshfs - it only looks in /sbin, not
+ # /usr/sbin. The omission of the absolute slash in --mandir=usr/share/man is
+ # also intentional - otherwise ninja tries to install the manpage to
+ # "/sr/share/man/man1" (???)
+
+ meson \
+ --prefix=/ \
+ --sysconfdir=/etc \
+ --mandir=usr/share/man \
+ --localstatedir=/var \
+ --buildtype=release \
+ . output
+ ninja -C output
+}
+
+check() {
+ cd "$builddir"/output
+ python3 -m pytest test/
+}
+
+package() {
+ cd "$builddir"
+ DESTDIR="$pkgdir" ninja -C output install
+}
+
+sha512sums="6ba7be4bcad401d99fb864f105a6c8fc8b7c832d5b25f18cba27eee422fe65ee7bda8982466d624792a1fb21528c0cb078a59db48e93da4880a36aad7b506b0c sshfs-3.5.0.tar.xz"