From 7d9ec219a8ff6ac073c16f9a6dc699077c168a11 Mon Sep 17 00:00:00 2001 From: Noel Cower Date: Sun, 10 Feb 2019 18:40:38 -0800 Subject: [PATCH] mergerfs: update to 2.25.1. Removes patches that are no longer needed and sets INTERNAL_FUSE=0 so that the Makefile will defer to pkg-config for libfuse. Adds a patch to replace non-portable use of loff_t with int64_t for the copy_file_range syscall. Also adopting the package since it's an orphan. --- .../mergerfs/patches/fix-default_source.patch | 11 --- .../mergerfs/patches/musl-fix-loff_t.patch | 77 +++++++++++++++++++ srcpkgs/mergerfs/patches/system-fuse.patch | 14 ---- srcpkgs/mergerfs/template | 12 +-- 4 files changed, 84 insertions(+), 30 deletions(-) delete mode 100644 srcpkgs/mergerfs/patches/fix-default_source.patch create mode 100644 srcpkgs/mergerfs/patches/musl-fix-loff_t.patch delete mode 100644 srcpkgs/mergerfs/patches/system-fuse.patch diff --git a/srcpkgs/mergerfs/patches/fix-default_source.patch b/srcpkgs/mergerfs/patches/fix-default_source.patch deleted file mode 100644 index 39fa91469ca..00000000000 --- a/srcpkgs/mergerfs/patches/fix-default_source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/readdir.cpp 2016-02-18 19:03:13.000000000 +0100 -+++ src/readdir.cpp 2016-08-06 19:04:39.696672433 +0200 -@@ -14,7 +14,7 @@ - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - --#define _BSD_SOURCE -+#define _DEFAULT_SOURCE - - #include - diff --git a/srcpkgs/mergerfs/patches/musl-fix-loff_t.patch b/srcpkgs/mergerfs/patches/musl-fix-loff_t.patch new file mode 100644 index 00000000000..ac8857a76f1 --- /dev/null +++ b/srcpkgs/mergerfs/patches/musl-fix-loff_t.patch @@ -0,0 +1,77 @@ +From 7779db242ab470053c9da188a639573750587adb Mon Sep 17 00:00:00 2001 +From: Noel Cower +Date: Sun, 10 Feb 2019 20:41:54 -0800 +Subject: [PATCH] musl: use int64_t in place of loff_t + +This replaces the less portable loff_t with int64_t (loff_t is +exclusive to the kernel). This stays compatible with the syscall when +available without modifying + +src/fs_copy_file_range_unsupported.icpp is not updated because I'm not +sure that would apply to musl or glibc targets. +--- + src/fs_copy_file_range.hpp | 4 ++-- + src/fs_copy_file_range_linux.icpp | 14 +++++++------- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git src/fs_copy_file_range.hpp src/fs_copy_file_range.hpp +index 0b8984e..036c0f8 100644 +--- src/fs_copy_file_range.hpp ++++ src/fs_copy_file_range.hpp +@@ -26,9 +26,9 @@ namespace fs + { + ssize_t + copy_file_range(const int fd_in_, +- loff_t *off_in_, ++ int64_t *off_in_, + const int fd_out_, +- loff_t *off_out_, ++ int64_t *off_out_, + const size_t len_, + const unsigned int flags_); + +diff --git src/fs_copy_file_range_linux.icpp src/fs_copy_file_range_linux.icpp +index 4718649..408afb0 100644 +--- src/fs_copy_file_range_linux.icpp ++++ src/fs_copy_file_range_linux.icpp +@@ -28,11 +28,11 @@ + #include + + static +-loff_t ++ssize_t + copy_file_range_(int fd_in_, +- loff_t *off_in_, ++ int64_t *off_in_, + int fd_out_, +- loff_t *off_out_, ++ int64_t *off_out_, + size_t len_, + unsigned int flags_) + { +@@ -53,9 +53,9 @@ namespace fs + { + ssize_t + copy_file_range(const int fd_in_, +- loff_t *off_in_, ++ int64_t *off_in_, + const int fd_out_, +- loff_t *off_out_, ++ int64_t *off_out_, + const size_t len_, + const unsigned int flags_) + { +@@ -73,8 +73,8 @@ namespace fs + const size_t len_, + const unsigned int flags_) + { +- loff_t off_in; +- loff_t off_out; ++ int64_t off_in; ++ int64_t off_out; + + off_in = 0; + off_out = 0; +-- +2.20.1 + diff --git a/srcpkgs/mergerfs/patches/system-fuse.patch b/srcpkgs/mergerfs/patches/system-fuse.patch deleted file mode 100644 index 6d7a1d1ea99..00000000000 --- a/srcpkgs/mergerfs/patches/system-fuse.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- Makefile -+++ Makefile -@@ -84,9 +84,8 @@ help: - @echo "usage: make" - @echo "make XATTR_AVAILABLE=0 - to build program without xattrs functionality (auto discovered otherwise)" - --$(TARGET): version obj/obj-stamp libfuse/lib/.libs/libfuse.a $(OBJ) -- cd libfuse && make -- $(CXX) $(CFLAGS) $(OBJ) -o $@ libfuse/lib/.libs/libfuse.a -ldl $(LDFLAGS) -+$(TARGET): version obj/obj-stamp $(OBJ) -+ $(CXX) $(CFLAGS) $(OBJ) -o $@ -lfuse -ldl $(LDFLAGS) - - mount.mergerfs: $(TARGET) - $(LN) -fs "$<" "$@" diff --git a/srcpkgs/mergerfs/template b/srcpkgs/mergerfs/template index 9f7b3f6f238..f30ab23315f 100644 --- a/srcpkgs/mergerfs/template +++ b/srcpkgs/mergerfs/template @@ -1,16 +1,18 @@ # Template file for 'mergerfs' pkgname=mergerfs -version=2.24.2 +version=2.25.1 revision=1 build_style=gnu-makefile +make_build_args="INTERNAL_FUSE=0" +make_install_args="${make_build_args}" hostmakedepends="automake libtool pandoc pkg-config" -makedepends="attr-devel fuse-devel" +makedepends="fuse-devel" short_desc="FUSE union filesystem" -maintainer="Orphaned " +maintainer="Noel Cower " license="ISC" homepage="https://github.com/trapexit/mergerfs" -distfiles="${homepage}/archive/${version}/${pkgname}-${version}.tar.gz" -checksum=bd0c9e5962361aae1040f341ebe05fe4ceef7c503e17e03d73b572643bfdfbfd +distfiles="${homepage}/releases/download/${version}/${pkgname}-${version}.tar.gz" +checksum=f604ad04aad99983c5f91e50e27275deefab4797c1343d8e0cf3664d1ca53fc5 pre_build() { sed -i 's|^CFLAGS[[:blank:]]*=|override CFLAGS +=|g' Makefile