From 6a795873b45a55b5801f0064206e04ae85fde0ad Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 14 Oct 2018 09:32:00 +0200 Subject: [PATCH] libfuse: downgrade to 2.9.8 encfs is not supporting libfuse3 yet it seems --- root-packages/libfuse/build.sh | 14 +++++++--- .../libfuse/{poll.c.patch => fsel.c.patch} | 6 ++--- root-packages/libfuse/fuse_common.h.patch | 17 ------------ root-packages/libfuse/fuse_loop_mt.c.patch | 12 ++++----- root-packages/libfuse/iconv.c.patch | 25 ++++++++++++++++++ root-packages/libfuse/install_helper.sh.patch | 10 ------- root-packages/libfuse/lib-meson.build.patch | 26 ------------------- root-packages/libfuse/test_setattr.c.patch | 11 -------- 8 files changed, 45 insertions(+), 76 deletions(-) rename root-packages/libfuse/{poll.c.patch => fsel.c.patch} (54%) delete mode 100644 root-packages/libfuse/fuse_common.h.patch create mode 100644 root-packages/libfuse/iconv.c.patch delete mode 100644 root-packages/libfuse/install_helper.sh.patch delete mode 100644 root-packages/libfuse/lib-meson.build.patch delete mode 100644 root-packages/libfuse/test_setattr.c.patch diff --git a/root-packages/libfuse/build.sh b/root-packages/libfuse/build.sh index cb9269905..4999b5b21 100644 --- a/root-packages/libfuse/build.sh +++ b/root-packages/libfuse/build.sh @@ -1,10 +1,18 @@ TERMUX_PKG_MAINTINER="Henrik Grimler @Grimler91" TERMUX_PKG_HOMEPAGE=https://github.com/libfuse/libfuse TERMUX_PKG_DESCRIPTION="FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the Linux kernel" -TERMUX_PKG_VERSION=3.2.6 -TERMUX_PKG_SHA256=686b98afac4ca322498f68d37d598ae3d07919fe21a4700c76572fae59a6256b +TERMUX_PKG_VERSION=2.9.8 +TERMUX_PKG_SHA256=ceadc28f033b29d7aa1d7c3a5a267d51c2b572ed4e7346e0f9e24f4f5889debb TERMUX_PKG_SRCURL=https://github.com/libfuse/libfuse/archive/fuse-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dudevrulesdir=$TERMUX_PREFIX/etc/udev" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +--disable-mtab +MOUNT_FUSE_PATH=$TERMUX_PREFIX/bin +UDEV_RULES_PATH=$TERMUX_PREFIX/etc/udev/rules.d +INIT_D_PATH=$TERMUX_PREFIX/etc/init.d +" # Code uses telldir() and seekdir(): TERMUX_PKG_API_LEVEL=23 # Requires 64bit off_t, we use super-ugly probably none-functioning patch to work around that for now +termux_step_pre_configure () { + ./makeconf.sh +} diff --git a/root-packages/libfuse/poll.c.patch b/root-packages/libfuse/fsel.c.patch similarity index 54% rename from root-packages/libfuse/poll.c.patch rename to root-packages/libfuse/fsel.c.patch index e52400b59..f2dc5561f 100644 --- a/root-packages/libfuse/poll.c.patch +++ b/root-packages/libfuse/fsel.c.patch @@ -1,6 +1,6 @@ ---- ../poll.c.orig 2018-10-13 19:17:31.400255853 +0200 -+++ ./example/poll.c 2018-10-13 19:19:54.007034483 +0200 -@@ -289,7 +289,7 @@ +--- ../fsel.c.orig 2018-10-14 08:16:18.624446614 +0200 ++++ ./example/fsel.c 2018-10-14 08:16:32.676370584 +0200 +@@ -271,7 +271,7 @@ ret = fuse_main(argc, argv, &fsel_oper, NULL); diff --git a/root-packages/libfuse/fuse_common.h.patch b/root-packages/libfuse/fuse_common.h.patch deleted file mode 100644 index 939b24e33..000000000 --- a/root-packages/libfuse/fuse_common.h.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- ../fuse_common.h.orig 2018-10-13 19:54:21.093146271 +0200 -+++ ./include/fuse_common.h 2018-10-13 19:57:05.539651897 +0200 -@@ -759,12 +760,12 @@ - * - * On 32bit systems please add -D_FILE_OFFSET_BITS=64 to your compile flags! - */ -- -+/* This probably introduces problem for arm and i686 - #if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && !defined __cplusplus - _Static_assert(sizeof(off_t) == 8, "fuse: off_t must be 64bit"); - #else - struct _fuse_off_t_must_be_64bit_dummy_struct \ - { unsigned _fuse_off_t_must_be_64bit:((sizeof(off_t) == 8) ? 1 : -1); }; - #endif -- -+*/ - #endif /* FUSE_COMMON_H_ */ diff --git a/root-packages/libfuse/fuse_loop_mt.c.patch b/root-packages/libfuse/fuse_loop_mt.c.patch index 6217be1d2..6c279aeaa 100644 --- a/root-packages/libfuse/fuse_loop_mt.c.patch +++ b/root-packages/libfuse/fuse_loop_mt.c.patch @@ -1,16 +1,16 @@ ---- ../fuse_loop_mt.c.orig 2018-10-13 18:59:55.777282699 +0200 -+++ ./lib/fuse_loop_mt.c 2018-10-13 22:22:25.057485369 +0200 -@@ -120,9 +120,7 @@ - int isforget = 0; +--- ../fuse_loop_mt.c_2.9.8_orig 2018-10-13 22:18:23.067614196 +0200 ++++ ./lib/fuse_loop_mt.c 2018-10-13 22:16:17.256721029 +0200 +@@ -77,9 +77,7 @@ + }; int res; - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - res = fuse_session_receive_buf_int(mt->se, &w->fbuf, w->ch); + res = fuse_session_receive_buf(mt->se, &fbuf, &ch); - pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); if (res == -EINTR) continue; if (res <= 0) { -@@ -330,7 +328,7 @@ +@@ -243,7 +241,7 @@ pthread_mutex_lock(&mt.lock); for (w = mt.main.next; w != &mt.main; w = w->next) diff --git a/root-packages/libfuse/iconv.c.patch b/root-packages/libfuse/iconv.c.patch new file mode 100644 index 000000000..11bc1c7ee --- /dev/null +++ b/root-packages/libfuse/iconv.c.patch @@ -0,0 +1,25 @@ +--- ../iconv.c.orig 2018-10-14 08:11:55.749657033 +0200 ++++ ./lib/modules/iconv.c 2018-10-14 08:15:25.660725566 +0200 +@@ -17,7 +17,9 @@ + #include + #include + #include ++#ifndef __ANDROID__ + #include ++#endif + + struct iconv { + struct fuse_fs *next; +@@ -646,7 +648,11 @@ + static void iconv_help(void) + { + char *old = strdup(setlocale(LC_CTYPE, "")); +- char *charmap = strdup(nl_langinfo(CODESET)); ++ #ifndef __ANDROID__ ++ char *charmap = strdup(nl_langinfo(CODESET)); ++ #else ++ char *charmap = strdup("UTF-8"); ++ #endif + setlocale(LC_CTYPE, old); + free(old); + fprintf(stderr, diff --git a/root-packages/libfuse/install_helper.sh.patch b/root-packages/libfuse/install_helper.sh.patch deleted file mode 100644 index d9a1605bd..000000000 --- a/root-packages/libfuse/install_helper.sh.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ../install_helper.sh.orig 2018-10-13 19:35:25.807091492 +0200 -+++ ./util/install_helper.sh 2018-10-13 19:35:42.210952193 +0200 -@@ -22,7 +22,6 @@ - DESTDIR="${DESTDIR%/}" - fi - --chown root:root "${DESTDIR}${bindir}/fusermount3" - chmod u+s "${DESTDIR}${bindir}/fusermount3" - - install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \ diff --git a/root-packages/libfuse/lib-meson.build.patch b/root-packages/libfuse/lib-meson.build.patch deleted file mode 100644 index c64c8664c..000000000 --- a/root-packages/libfuse/lib-meson.build.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- ../lib-meson.build.orig 2018-10-13 18:50:35.614173402 +0200 -+++ ./lib/meson.build 2018-10-13 19:31:58.316854967 +0200 -@@ -3,11 +3,8 @@ - 'fuse_signals.c', 'buffer.c', 'cuse_lowlevel.c', - 'helper.c', 'modules/subdir.c' ] - --if host_machine.system().startswith('linux') -- libfuse_sources += [ 'mount.c', 'mount_util.c' ] --else -- libfuse_sources += [ 'mount_bsd.c' ] --endif -+libfuse_sources += [ 'mount.c', 'mount_util.c' ] -+ - - if cfg.get('HAVE_ICONV') - libfuse_sources += [ 'modules/iconv.c' ] -@@ -22,9 +19,6 @@ - if host_machine.system().startswith('netbsd') - deps += [ cc.find_library('perfuse'), - cc.find_library('puffs') ] --else -- # Required for clock_gettime before glibc 2.17 -- deps += cc.find_library('rt') - endif - - fusermount_path = join_paths(get_option('prefix'), get_option('bindir')) diff --git a/root-packages/libfuse/test_setattr.c.patch b/root-packages/libfuse/test_setattr.c.patch deleted file mode 100644 index 4c28b47cd..000000000 --- a/root-packages/libfuse/test_setattr.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../test_setattr.c.orig 2018-10-13 19:16:39.896697370 +0200 -+++ ./test/test_setattr.c 2018-10-13 19:19:37.399176638 +0200 -@@ -170,7 +170,7 @@ - test_fs(fuse_opts.mountpoint); - - /* Stop file system */ -- assert(pthread_cancel(fs_thread) == 0); -+ assert(pthread_kill(fs_thread, 0) == 0); - - fuse_session_unmount(se); - assert(got_fh == 1);