pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/filesystems/fuse



Module Name:    pkgsrc
Committed By:   vins
Date:           Thu Sep  7 19:38:15 UTC 2023

Modified Files:
        pkgsrc/filesystems/fuse: Makefile PLIST.Linux PLIST.common
            buildlink3.mk builtin.mk distinfo
Added Files:
        pkgsrc/filesystems/fuse/files: config.rpath
        pkgsrc/filesystems/fuse/patches: patch-configure.ac
            patch-doc_Makefile.am patch-lib_mount__bsd.c patch-util_Makefile.am
            patch-util_ulockmgr__server.c

Log Message:
filesystems/fuse: update to fuse-2.9.9.

This is the last and most recent maintainance release for the 2.x
branch.

# Changes (since version 2.9.3)

FUSE 2.9.9 (2019-01-04)
=======================

* Added OpenAFS to whitelist (so users can now mount FUSE filesystems
  on mountpoints within OpenAFS filesystems).
* Added a test of `seekdir` to test_syscalls.
* Fixed `readdir` bug when non-zero offsets are given to filler and the
  filesystem client, after reading a whole directory, re-reads it from a
  non-zero offset e. g. by calling `seekdir` followed by `readdir`.

FUSE 2.9.8 (2018-07-24)
=======================

* SECURITY UPDATE: In previous versions of libfuse it was possible to
  for unprivileged users to specify the `allow_other` option even when
  this was forbidden in `/etc/fuse.conf`.  The vulnerability is
  present only on systems where SELinux is active (including in
  permissive mode).
* libfuse no longer segfaults when fuse_interrupted() is called outside
  the event loop.
* The fusermount binary has been hardened in several ways to reduce
  potential attack surface. Most importantly, mountpoints and mount
  options must now match a hard-coded whitelist. It is expected that
  this whitelist covers all regular use-cases.
* Fixed rename deadlock on FreeBSD.

FUSE 2.9.7 (2016-06-20)
=======================

* Added SELinux support.
* Fixed race-condition when session is terminated right after starting
  a FUSE file system.

FUSE 2.9.6 (2016-04-23)
=======================

* Tarball now includes documentation.
* Shared-object version has now been bumped correctly.

FUSE 2.9.5 (2016-01-14)
=======================

* New maintainer: Nikolaus Rath <Nikolaus%rath.org@localhost>. Many thanks to
  Miklos Szeredi <miklos%szeredi.hu@localhost> for bringing FUSE to where it is
  now!

* fix warning in mount.c:receive_fd().  Reported by Albert Berger

* fix possible memory leak.  Reported by Jose R. Guzman

FUSE 2.9.4 (2015-05-22)
=======================

* fix exec environment for mount and umount.  Found by Tavis Ormandy
  (CVE-2015-3202).

* fix fuse_remove_signal_handlers() to properly restore the default
  signal handler.  Reported by: Chris Johnson

* highlevel API: fix directory file handle passed to ioctl() method.
  Reported by Eric Biggers

* libfuse: document deadlock avoidance for fuse_notify_inval_entry()
  and fuse_notify_delete()

* fusermount, libfuse: send value as unsigned in "user_id=" and
  "group_id=" options.  Uids/gids larger than 2147483647 would result
  in EINVAL when mounting the filesystem.  This also needs a fix in
  the kernel.

* Initilaize stat buffer passed to ->getattr() and ->fgetattr() to
  zero in all cases.  Reported by Daniel Iwan

* libfuse: Add missing includes.  This allows compiling fuse with
  musl.  Patch by Daniel Thau


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/filesystems/fuse/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/filesystems/fuse/PLIST.Linux \
    pkgsrc/filesystems/fuse/PLIST.common
cvs rdiff -u -r1.5 -r1.6 pkgsrc/filesystems/fuse/buildlink3.mk \
    pkgsrc/filesystems/fuse/builtin.mk
cvs rdiff -u -r1.7 -r1.8 pkgsrc/filesystems/fuse/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/filesystems/fuse/files/config.rpath
cvs rdiff -u -r0 -r1.1 pkgsrc/filesystems/fuse/patches/patch-configure.ac \
    pkgsrc/filesystems/fuse/patches/patch-doc_Makefile.am \
    pkgsrc/filesystems/fuse/patches/patch-lib_mount__bsd.c \
    pkgsrc/filesystems/fuse/patches/patch-util_Makefile.am \
    pkgsrc/filesystems/fuse/patches/patch-util_ulockmgr__server.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/filesystems/fuse/Makefile
diff -u pkgsrc/filesystems/fuse/Makefile:1.12 pkgsrc/filesystems/fuse/Makefile:1.13
--- pkgsrc/filesystems/fuse/Makefile:1.12       Mon Jan 27 20:42:55 2020
+++ pkgsrc/filesystems/fuse/Makefile    Thu Sep  7 19:38:14 2023
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.12 2020/01/27 20:42:55 leot Exp $
+# $NetBSD: Makefile,v 1.13 2023/09/07 19:38:14 vins Exp $
 #
 
-DISTNAME=              fuse-2.9.3
-CATEGORIES=            filesystems
-MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=fuse/}
+DISTNAME=      fuse-2.9.9
+CATEGORIES=    filesystems
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=libfuse/}
+GITHUB_PROJECT=        libfuse
+GITHUB_TAG=    refs/tags/${DISTNAME}
 
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=              https://github.com/libfuse/libfuse
@@ -19,11 +21,36 @@ ONLY_FOR_PLATFORM=  Linux-*-* FreeBSD-*-*
 # implementation is not needed. This FUSE implementation can also be
 # used with the perfuse package on NetBSD.
 
-USE_TOOLS+=            gmake pkg-config
-USE_LIBTOOL=           yes
+USE_TOOLS+=    gmake pkg-config
+USE_TOOLS+=    autoconf automake autoreconf
+USE_LIBTOOL=   yes
+
+CONFIGURE_ARGS+=       --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv}
+CONFIGURE_ARGS+=       --with-pkgconfigdir=${PREFIX}/lib/pkgconfig
+
+PKG_DOCS=      doc/how-fuse-works doc/kernel.txt
+DOCDIR=                share/doc/${PKGBASE}
+
+INSTALL_TARGET=                install-strip
+INSTALLATION_DIRS+=    ${DOCDIR}
+
+WRKSRC=        ${WRKDIR}/libfuse-${DISTNAME}
+
+pre-configure:
+       ${RUN}${CP} ${FILESDIR}/config.rpath ${WRKSRC}
+       ${RUN}cd ${WRKSRC} && \
+       ${SETENV} ${CONFIGURE_ENV} ${SH} ./makeconf.sh
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/include/fuse_kernel.h \
+               ${DESTDIR}${PREFIX}/include/fuse
+       ${INSTALL_DATA} ${PKG_DOCS:S|^|${WRKSRC}/|}     \
+               ${DESTDIR}${PREFIX}/${DOCDIR}
 
 .include "../../mk/bsd.prefs.mk"
 .if ${OPSYS} == "NetBSD"
 .include "../../filesystems/perfuse/buildlink3.mk"
 .endif
+
+.include "../../converters/libiconv/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/filesystems/fuse/PLIST.Linux
diff -u pkgsrc/filesystems/fuse/PLIST.Linux:1.2 pkgsrc/filesystems/fuse/PLIST.Linux:1.3
--- pkgsrc/filesystems/fuse/PLIST.Linux:1.2     Sun Oct 16 23:45:45 2011
+++ pkgsrc/filesystems/fuse/PLIST.Linux Thu Sep  7 19:38:14 2023
@@ -1,3 +1,6 @@
-@comment $NetBSD: PLIST.Linux,v 1.2 2011/10/16 23:45:45 sbd Exp $
+@comment $NetBSD: PLIST.Linux,v 1.3 2023/09/07 19:38:14 vins Exp $
 bin/fusermount
 bin/ulockmgr_server
+man/man1/fusermount.1
+man/man1/ulockmgr_server.1
+man/man8/mount.fuse.8
Index: pkgsrc/filesystems/fuse/PLIST.common
diff -u pkgsrc/filesystems/fuse/PLIST.common:1.2 pkgsrc/filesystems/fuse/PLIST.common:1.3
--- pkgsrc/filesystems/fuse/PLIST.common:1.2    Mon Nov 24 13:23:10 2014
+++ pkgsrc/filesystems/fuse/PLIST.common        Thu Sep  7 19:38:14 2023
@@ -1,10 +1,11 @@
-@comment $NetBSD: PLIST.common,v 1.2 2014/11/24 13:23:10 mef Exp $
+@comment $NetBSD: PLIST.common,v 1.3 2023/09/07 19:38:14 vins Exp $
 include/fuse.h
 include/fuse/cuse_lowlevel.h
 include/fuse/fuse.h
 include/fuse/fuse_common.h
 include/fuse/fuse_common_compat.h
 include/fuse/fuse_compat.h
+include/fuse/fuse_kernel.h
 include/fuse/fuse_lowlevel.h
 include/fuse/fuse_lowlevel_compat.h
 include/fuse/fuse_opt.h
@@ -12,6 +13,5 @@ include/ulockmgr.h
 lib/libfuse.la
 lib/libulockmgr.la
 lib/pkgconfig/fuse.pc
-man/man1/fusermount.1
-man/man1/ulockmgr_server.1
-man/man8/mount.fuse.8
+share/doc/fuse/how-fuse-works
+share/doc/fuse/kernel.txt

Index: pkgsrc/filesystems/fuse/buildlink3.mk
diff -u pkgsrc/filesystems/fuse/buildlink3.mk:1.5 pkgsrc/filesystems/fuse/buildlink3.mk:1.6
--- pkgsrc/filesystems/fuse/buildlink3.mk:1.5   Mon Sep  6 12:13:30 2010
+++ pkgsrc/filesystems/fuse/buildlink3.mk       Thu Sep  7 19:38:14 2023
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.5 2010/09/06 12:13:30 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2023/09/07 19:38:14 vins Exp $
 
 BUILDLINK_TREE+=       fuse
 
@@ -6,6 +6,7 @@ BUILDLINK_TREE+=        fuse
 FUSE_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.fuse+=   fuse>=2.5.2
+BUILDLINK_ABI_DEPENDS.fuse+=   fuse>=2.9.9
 BUILDLINK_PKGSRCDIR.fuse?=     ../../filesystems/fuse
 
 .include "../../mk/bsd.fast.prefs.mk"
Index: pkgsrc/filesystems/fuse/builtin.mk
diff -u pkgsrc/filesystems/fuse/builtin.mk:1.5 pkgsrc/filesystems/fuse/builtin.mk:1.6
--- pkgsrc/filesystems/fuse/builtin.mk:1.5      Sun Nov  3 19:26:20 2019
+++ pkgsrc/filesystems/fuse/builtin.mk  Thu Sep  7 19:38:14 2023
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.5 2019/11/03 19:26:20 rillig Exp $
+# $NetBSD: builtin.mk,v 1.6 2023/09/07 19:38:14 vins Exp $
 
 BUILTIN_PKG:=          fuse
 PKGCONFIG_BASE.fuse=   /usr
@@ -7,7 +7,7 @@ PKGCONFIG_FILE.fuse+=   /usr/lib${LIBABISU
 
 .include "../../mk/buildlink3/pkgconfig-builtin.mk"
 
-.if !empty(USE_BUILTIN.fuse:M[yY][eE][sS])
+.if ${USE_BUILTIN.fuse:tl} == yes
 BUILDLINK_FILES.fuse+= lib/pkgconfig/fuse.pc
 BUILDLINK_FILES.fuse+= lib${LIBABISUFFIX}/pkgconfig/fuse.pc
 .endif

Index: pkgsrc/filesystems/fuse/distinfo
diff -u pkgsrc/filesystems/fuse/distinfo:1.7 pkgsrc/filesystems/fuse/distinfo:1.8
--- pkgsrc/filesystems/fuse/distinfo:1.7        Tue Oct 26 10:25:26 2021
+++ pkgsrc/filesystems/fuse/distinfo    Thu Sep  7 19:38:14 2023
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.7 2021/10/26 10:25:26 nia Exp $
+$NetBSD: distinfo,v 1.8 2023/09/07 19:38:14 vins Exp $
 
-BLAKE2s (fuse-2.9.3.tar.gz) = eefde91db5b8ea798f1ee31da31afa5b9930a791c202126d2426b83cf487d6e5
-SHA512 (fuse-2.9.3.tar.gz) = 03f43f88694ec7e039ff3579a8e76349b5a5a05872c55901fc1d9ee53dbb6b1e69f6dd0005b620f3b5ead0b14da8eeb31d46b922d10f88f4e3f830aa47e8162c
-Size (fuse-2.9.3.tar.gz) = 572044 bytes
-SHA1 (patch-aa) = 1179876c7a4f230d8df8a7a6724b90779c9fa0e3
+BLAKE2s (fuse-2.9.9.tar.gz) = 5b851aa97441a9e13a4718a0775e01cbfff8020d7f4a0656adfca439f8d42d95
+SHA512 (fuse-2.9.9.tar.gz) = 1acd51a647ec3dbf9eaafb80cec92bd8542bcbb2cf4510fc8b079b4f8aaa8f4b301e469ddefe4f1cc4ae2bf941e028077601c20d97f187cc618cea8710cbe331
+Size (fuse-2.9.9.tar.gz) = 212017 bytes
+SHA1 (patch-configure.ac) = 1e8d0081c8dc48e126d1cde856178c39f358ee37
+SHA1 (patch-doc_Makefile.am) = ffe16fc87e03772ca2e1124549177e999806dbd9
+SHA1 (patch-lib_mount__bsd.c) = 6b00d0950e0146321a575a2f90c83d8aa7d3cc07
+SHA1 (patch-util_Makefile.am) = 9c1361a489203dc7a7cd09289b2a15189a82c030
+SHA1 (patch-util_ulockmgr__server.c) = 2ec86dc8eca5e24952738171eb0937d822b8c657

Added files:

Index: pkgsrc/filesystems/fuse/files/config.rpath
diff -u /dev/null pkgsrc/filesystems/fuse/files/config.rpath:1.1
--- /dev/null   Thu Sep  7 19:38:15 2023
+++ pkgsrc/filesystems/fuse/files/config.rpath  Thu Sep  7 19:38:15 2023
@@ -0,0 +1,684 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2023 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord%gnu.ai.mit.edu@localhost>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+        ecc*)
+          wl='-Wl,'
+          ;;
+        icc* | ifort*)
+          wl='-Wl,'
+          ;;
+        lf95*)
+          wl='-Wl,'
+          ;;
+        nagfor*)
+          wl='-Wl,-Wl,,'
+          ;;
+        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        xl* | bgxl* | bgf* | mpixl*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ F* | *Sun*Fortran*)
+              wl=
+              ;;
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    newsos6)
+      ;;
+    *nto* | *qnx*)
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    rdos*)
+      ;;
+    solaris*)
+      case $cc_basename in
+        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+          wl='-Qoption ld '
+          ;;
+        *)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      wl='-Wl,'
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    haiku*)
+      ;;
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            :
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd2.[01]*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | dragonfly* | midnightbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    *nto* | *qnx*)
+      ;;
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+        hardcode_direct=yes
+        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        else
+          case "$host_os" in
+            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+              hardcode_libdir_flag_spec='-R$libdir'
+              ;;
+            *)
+              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+              ;;
+          esac
+        fi
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec=      # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    library_names_spec='$libname.a'
+    ;;
+  aix[4-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  amigaos*)
+    case "$host_cpu" in
+      powerpc*)
+        library_names_spec='$libname$shrext' ;;
+      m68k)
+        library_names_spec='$libname.a' ;;
+    esac
+    ;;
+  beos*)
+    library_names_spec='$libname$shrext'
+    ;;
+  bsdi[45]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  cygwin* | mingw* | pw32* | cegcc*)
+    shrext=.dll
+    library_names_spec='$libname.dll.a $libname.lib'
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    library_names_spec='$libname$shrext'
+    ;;
+  dgux*)
+    library_names_spec='$libname$shrext'
+    ;;
+  freebsd[23].*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  freebsd* | dragonfly* | midnightbsd*)
+    library_names_spec='$libname$shrext'
+    ;;
+  gnu*)
+    library_names_spec='$libname$shrext'
+    ;;
+  haiku*)
+    library_names_spec='$libname$shrext'
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    library_names_spec='$libname$shrext'
+    ;;
+  interix[3-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  irix5* | irix6* | nonstopux*)
+    library_names_spec='$libname$shrext'
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  knetbsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  netbsd*)
+    library_names_spec='$libname$shrext'
+    ;;
+  newsos6)
+    library_names_spec='$libname$shrext'
+    ;;
+  *nto* | *qnx*)
+    library_names_spec='$libname$shrext'
+    ;;
+  openbsd*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    library_names_spec='$libname.a'
+    ;;
+  osf3* | osf4* | osf5*)
+    library_names_spec='$libname$shrext'
+    ;;
+  rdos*)
+    ;;
+  solaris*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sunos4*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  sysv4 | sysv4.3*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv4*MP*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    library_names_spec='$libname$shrext'
+    ;;
+  tpf*)
+    library_names_spec='$libname$shrext'
+    ;;
+  uts4*)
+    library_names_spec='$libname$shrext'
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF

Index: pkgsrc/filesystems/fuse/patches/patch-configure.ac
diff -u /dev/null pkgsrc/filesystems/fuse/patches/patch-configure.ac:1.1
--- /dev/null   Thu Sep  7 19:38:15 2023
+++ pkgsrc/filesystems/fuse/patches/patch-configure.ac  Thu Sep  7 19:38:15 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-configure.ac,v 1.1 2023/09/07 19:38:15 vins Exp $
+
+Check for closefrom(). 
+
+--- configure.ac.orig  2019-01-04 13:38:34.000000000 +0000
++++ configure.ac
+@@ -55,6 +55,7 @@ fi
+ 
+ AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])
+ AC_CHECK_FUNCS([posix_fallocate])
++AC_CHECK_FUNCS([closefrom])
+ AC_CHECK_MEMBERS([struct stat.st_atim])
+ AC_CHECK_MEMBERS([struct stat.st_atimespec])
+ 
Index: pkgsrc/filesystems/fuse/patches/patch-doc_Makefile.am
diff -u /dev/null pkgsrc/filesystems/fuse/patches/patch-doc_Makefile.am:1.1
--- /dev/null   Thu Sep  7 19:38:15 2023
+++ pkgsrc/filesystems/fuse/patches/patch-doc_Makefile.am       Thu Sep  7 19:38:15 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-doc_Makefile.am,v 1.1 2023/09/07 19:38:15 vins Exp $
+
+Do not install manuals for Linux only binaries on *BSD.
+
+--- doc/Makefile.am.orig       2019-01-04 13:38:34.000000000 +0000
++++ doc/Makefile.am
+@@ -1,5 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+ 
++if LINUX
+ dist_man_MANS = fusermount.1 mount.fuse.8 ulockmgr_server.1
++endif
+ 
+ EXTRA_DIST = how-fuse-works kernel.txt Doxyfile html
Index: pkgsrc/filesystems/fuse/patches/patch-lib_mount__bsd.c
diff -u /dev/null pkgsrc/filesystems/fuse/patches/patch-lib_mount__bsd.c:1.1
--- /dev/null   Thu Sep  7 19:38:15 2023
+++ pkgsrc/filesystems/fuse/patches/patch-lib_mount__bsd.c      Thu Sep  7 19:38:15 2023
@@ -0,0 +1,73 @@
+$NetBSD: patch-lib_mount__bsd.c,v 1.1 2023/09/07 19:38:15 vins Exp $
+
+Use unmount() instead of defining a local function.
+
+--- lib/mount_bsd.c.orig       2019-01-04 13:38:34.000000000 +0000
++++ lib/mount_bsd.c
+@@ -10,6 +10,8 @@
+ #include "fuse_misc.h"
+ #include "fuse_opt.h"
+ 
++#include <sys/param.h>
++#include <sys/mount.h>
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <sys/sysctl.h>
+@@ -192,56 +194,12 @@ void fuse_unmount_compat22(const char *m
+       free(umount_cmd);
+ }
+ 
+-static void do_unmount(char *dev, int fd)
+-{
+-      char device_path[SPECNAMELEN + 12];
+-      const char *argv[4];
+-      const char umount_cmd[] = "/sbin/umount";
+-      pid_t pid;
+-
+-      snprintf(device_path, SPECNAMELEN + 12, _PATH_DEV "%s", dev);
+-
+-      argv[0] = umount_cmd;
+-      argv[1] = "-f";
+-      argv[2] = device_path;
+-      argv[3] = NULL;
+-
+-      pid = fork();
+-
+-      if (pid == -1)
+-              return;
+-
+-      if (pid == 0) {
+-              close(fd);
+-              execvp(umount_cmd, (char **)argv);
+-              exit(1);
+-      }
+-
+-      waitpid(pid, NULL, 0);
+-}
+-
+ void fuse_kern_unmount(const char *mountpoint, int fd)
+ {
+       char *ep, dev[128];
+       struct stat sbuf;
+ 
+-      (void)mountpoint;
+-
+-      if (fstat(fd, &sbuf) == -1)
+-              goto out;
+-
+-      devname_r(sbuf.st_rdev, S_IFCHR, dev, 128);
+-
+-      if (strncmp(dev, "fuse", 4))
+-              goto out;
+-
+-      strtol(dev + 4, &ep, 10);
+-      if (*ep != '\0')
+-              goto out;
+-
+-      do_unmount(dev, fd);
+-
+-out:
++      unmount(mountpoint, MNT_FORCE);
+       close(fd);
+ }
+ 
Index: pkgsrc/filesystems/fuse/patches/patch-util_Makefile.am
diff -u /dev/null pkgsrc/filesystems/fuse/patches/patch-util_Makefile.am:1.1
--- /dev/null   Thu Sep  7 19:38:15 2023
+++ pkgsrc/filesystems/fuse/patches/patch-util_Makefile.am      Thu Sep  7 19:38:15 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-util_Makefile.am,v 1.1 2023/09/07 19:38:15 vins Exp $
+
+mount.fuse is a script, not a binary.
+
+--- util/Makefile.am.orig      2019-01-04 13:38:34.000000000 +0000
++++ util/Makefile.am
+@@ -36,7 +36,7 @@ INIT_D_PATH = @INIT_D_PATH@
+ 
+ install-exec-local:
+       $(MKDIR_P) $(DESTDIR)$(MOUNT_FUSE_PATH)
+-      $(INSTALL_PROGRAM) $(builddir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse
++      $(INSTALL_SCRIPT) $(builddir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse
+       $(MKDIR_P) $(DESTDIR)$(INIT_D_PATH)
+       $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
+       @if test -x /usr/sbin/update-rc.d; then \
Index: pkgsrc/filesystems/fuse/patches/patch-util_ulockmgr__server.c
diff -u /dev/null pkgsrc/filesystems/fuse/patches/patch-util_ulockmgr__server.c:1.1
--- /dev/null   Thu Sep  7 19:38:15 2023
+++ pkgsrc/filesystems/fuse/patches/patch-util_ulockmgr__server.c       Thu Sep  7 19:38:15 2023
@@ -0,0 +1,33 @@
+$NetBSD: patch-util_ulockmgr__server.c,v 1.1 2023/09/07 19:38:15 vins Exp $
+
+Do not define closefrom() if libc provides it.
+
+--- util/ulockmgr_server.c.orig        2019-01-04 13:38:34.000000000 +0000
++++ util/ulockmgr_server.c
+@@ -22,6 +22,10 @@
+ #include <sys/socket.h>
+ #include <sys/wait.h>
+ 
++#ifdef HAVE_CONFIG_H
++      #include "config.h"
++#endif
++
+ struct message {
+       unsigned intr : 1;
+       unsigned nofd : 1;
+@@ -124,6 +128,7 @@ static int receive_message(int sock, voi
+       return res;
+ }
+ 
++#if !defined(HAVE_CLOSEFROM)
+ static int closefrom(int minfd)
+ {
+       DIR *dir = opendir("/proc/self/fd");
+@@ -141,6 +146,7 @@ static int closefrom(int minfd)
+       }
+       return 0;
+ }
++#endif
+ 
+ static void send_reply(int cfd, struct message *msg)
+ {



Home | Main Index | Thread Index | Old Index