pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/filesystems/fuse-archivemount Update to archivemount-0...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c82e71b31269
branches:  trunk
changeset: 770468:c82e71b31269
user:      pho <pho%pkgsrc.org@localhost>
date:      Tue Nov 30 17:13:14 2021 +0000

description:
Update to archivemount-0.9.1

* 0.9.1   - Incorporated fixes for compilation problems with newer gcc
            versions. Contributed by Niels de Vos
* 0.9.0   - Make sure the written archive's format is the same or as
            close as possible to the original. Due to a bug written files
            were always in ustar format. Contributed by Jeff Ebert.
          - Add AM_PROG_CC_C_O macro to configure.ac, contributed by
            Jeff Ebert
          - added option -o password, contributed by Scott Worley
          - Pass REG_ENHANCED to regcomp where available (Mac and BSD).
            Otherwise \? has no special meaning. Contributed by Michael
            J. Walsh
          - Removed magic number for block size, it's a constant now.
            Contributed by John Delgado
* 0.8.12  - changed naming scheme of temporary files to avoid running
            into too long names for the filesystem in /tmp
          - fixed renaming a newly created file (it got saved under its
            original name)
          - activated code for creating symlinks; in old versions, symlinks
            were not saved, presumably due to a bug in libarchive, but it
            seems to work now.
* 0.8.11  - fixed accidentally broken renaming of files
* 0.8.10  - fixed renaming of directories, it did not work at all anymore
* 0.8.9   - fixed wrong insert into tree when a subdir had the same name as its
            parent dir
* 0.8.8   - fixed bug when creating a new file and moving it over an old one,
            happens e.g. when saving a file from the geany editor
* 0.8.7   - contribution by KAICHO:
            * fixup to 0.8.6: corrected an ifdef
* 0.8.6   - contribution by KAICHO:
            * adaptions for CentOS, RHEL and Scientific Linux
* 0.8.5   - fixed stat'ing of hardlinks in ar_readdir
          - contributions by Alain Parmentier:
            * FormatRaw optimization
            * bugfix : use of off_t to support 64bits
* 0.8.4   - added option -o formatraw for readonly support of the FormatRaw
            archive files supported by libarchive (kudos to Lee Leahu)
          - bugfix: do not do the fuse mount when the archive cannot be read
            (also kudos to Lee Leahu)
* 0.8.3   - do not call fuse_main anymore
          - force fuse into single-threaded mode due to libarchive not being
            thread-safe
          Both patches contributed by Timothy Hobbs <timothyhobbs%seznam.cz@localhost>,
          who found them in the Fedora RPM.
* 0.8.2   - added nosave option, contributed by
            Timothy Hobbs <timothyhobbs%seznam.cz@localhost>
* 0.8.1   - added missing header file
* 0.8.0   - contributions by Tomáš Čech <sleep_walker%suse.cz@localhost>:
            * Allow mounting only subtree of archive, strip common part of
              path in that case.
* 0.7.0   - contributions by Andrew Brampton:
            * simplifications in the code
            * speedup by using hashes
* 0.6.2   - contributions by Niels de Vos:
            * exchanged posix_rwlocks against mutexes to finally get rid of
              the crashes
            * replaced some accidental indentations with space against proper tabs
* 0.6.1   - clarified licensing issue (thanks to Niels de Vos for pointing it out)
* 0.6.0   - contributions by Thomas J. Duck:
            * autoconf/automake support
            * bug reports and fixes for mac-fuse
            many thanks for this!

diffstat:

 filesystems/fuse-archivemount/Makefile                     |  26 +--
 filesystems/fuse-archivemount/PLIST                        |   3 +-
 filesystems/fuse-archivemount/distinfo                     |  12 +-
 filesystems/fuse-archivemount/patches/patch-aa             |  19 --
 filesystems/fuse-archivemount/patches/patch-ab             |  58 --------
 filesystems/fuse-archivemount/patches/patch-archivemount.c |  98 ++++++++++++++
 filesystems/fuse-archivemount/patches/patch-configure.ac   |  21 +++
 7 files changed, 136 insertions(+), 101 deletions(-)

diffs (279 lines):

diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/Makefile
--- a/filesystems/fuse-archivemount/Makefile    Tue Nov 30 17:08:47 2021 +0000
+++ b/filesystems/fuse-archivemount/Makefile    Tue Nov 30 17:13:14 2021 +0000
@@ -1,29 +1,21 @@
-# $NetBSD: Makefile,v 1.9 2017/08/16 20:45:36 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2021/11/30 17:13:14 pho Exp $
 #
 
-DISTNAME=      archivemount-0.5.3
+DISTNAME=      archivemount-0.9.1
 PKGNAME=       fuse-${DISTNAME}
-PKGREVISION=   5
 CATEGORIES=    filesystems
-#MASTER_SITES= http://www.cybernoia.de/software/archivemount/
+MASTER_SITES=  http://www.cybernoia.de/software/archivemount/
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-#HOMEPAGE=     http://www.cybernoia.de/software/archivemount/
+HOMEPAGE=      http://www.cybernoia.de/software/archivemount/
 COMMENT=       FUSE gateway to libarchive
-
-USE_TOOLS+=    gmake
-NO_CONFIGURE=  yes
-
-.include "../../mk/bsd.prefs.mk"
+LICENSE=       gnu-lgpl-v2
 
-.if exists(/usr/include/sys/statvfs.h)
-CPPFLAGS+=     -DHAVE_STATVFS
-.endif
+USE_TOOLS+=    pkg-config automake autoreconf
+GNU_CONFIGURE= yes
 
-INSTALLATION_DIRS=     bin
-
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/archivemount ${DESTDIR}${PREFIX}/bin
+pre-configure:
+       cd ${WRKSRC} && autoreconf
 
 .include "../../archivers/libarchive/buildlink3.mk"
 .include "../../mk/fuse.buildlink3.mk"
diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/PLIST
--- a/filesystems/fuse-archivemount/PLIST       Tue Nov 30 17:08:47 2021 +0000
+++ b/filesystems/fuse-archivemount/PLIST       Tue Nov 30 17:13:14 2021 +0000
@@ -1,2 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2007/02/20 23:31:40 xtraeme Exp $
+@comment $NetBSD: PLIST,v 1.2 2021/11/30 17:13:14 pho Exp $
 bin/archivemount
+man/man1/archivemount.1
diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/distinfo
--- a/filesystems/fuse-archivemount/distinfo    Tue Nov 30 17:08:47 2021 +0000
+++ b/filesystems/fuse-archivemount/distinfo    Tue Nov 30 17:13:14 2021 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 10:25:26 nia Exp $
+$NetBSD: distinfo,v 1.6 2021/11/30 17:13:14 pho Exp $
 
-BLAKE2s (archivemount-0.5.3.tar.gz) = 23533f520f7452ce1833f2ed42d770d81d33ae60ac8e48de73cb6b7fc02e4c34
-SHA512 (archivemount-0.5.3.tar.gz) = c2a56205e9ee548cc8ba6c794adc9bf6f296155a78743803bb3b942919e6b21095ef24143546145dcef37dd57f5abb80adae367764463b39a89695981d4d5dd5
-Size (archivemount-0.5.3.tar.gz) = 20267 bytes
-SHA1 (patch-aa) = c5e139ad695d8e6d102e35cd1d8110f3b952de6f
-SHA1 (patch-ab) = 1db9404d0bfc48423e8869858f9d742a78e9a1c2
+BLAKE2s (archivemount-0.9.1.tar.gz) = 43c1c3f3d538bd9440a0a64e116f2833572f1ca46d62b0401f632b397ce69834
+SHA512 (archivemount-0.9.1.tar.gz) = ecfa8abc1dcae34c855f9a2943113ddd3eb1b81011f23ef6a8dddd344c1db44b132683a1181f17b5691a783df764523ee0d2b802202d93890dcbdb78bee53522
+Size (archivemount-0.9.1.tar.gz) = 133251 bytes
+SHA1 (patch-archivemount.c) = 6c1b7336d369473b975239e305419d589f381a9f
+SHA1 (patch-configure.ac) = 954f91c2d75a800a358be994bd93df9bff3b8095
diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/patches/patch-aa
--- a/filesystems/fuse-archivemount/patches/patch-aa    Tue Nov 30 17:08:47 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2007/02/20 23:31:40 xtraeme Exp $
-
---- Makefile.orig      2006-12-28 16:32:47.000000000 +0100
-+++ Makefile   2007-02-21 00:21:27.000000000 +0100
-@@ -9,11 +9,11 @@
- RM = rm -rf
- CP = cp -a
- TAR = tar
--CC = gcc
-+#CC = gcc
- all: $(EXE)
- 
--CFLAGS += -D_FILE_OFFSET_BITS=64
--LDFLAGS = -larchive -lfuse
-+CFLAGS += $(CPPFLAGS) -D_FILE_OFFSET_BITS=64
-+LDFLAGS += -larchive -lfuse
- 
- ifeq ($(DEBUG),1)
-       CFLAGS += -ggdb -O0
diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/patches/patch-ab
--- a/filesystems/fuse-archivemount/patches/patch-ab    Tue Nov 30 17:08:47 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2007/02/21 00:04:30 pooka Exp $
-
---- archivemount.c.orig        2006-12-28 17:32:47.000000000 +0200
-+++ archivemount.c     2007-02-21 02:02:55.000000000 +0200
-@@ -31,7 +31,11 @@
- #include <fcntl.h>
- #include <dirent.h>
- #include <errno.h>
-+#ifdef HAVE_STATVFS
-+#include <sys/statvfs.h>
-+#else
- #include <sys/statfs.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <time.h>
-@@ -1449,11 +1453,24 @@
-               return tmp;
-       }
-       /* create temp file */
--      if( mknod( location, mode, rdev ) == -1 ) {
--              log( "Could not create temporary file %s: %s",
--                              location, strerror( errno ) );
--              free( location );
--              return 0 - errno;
-+      if( S_ISREG(mode) ) {
-+              int fd;
-+
-+              if( fd = ( open( location, O_WRONLY | O_CREAT | O_EXCL,
-+                              mode) == -1 ) ) {
-+                      log( "Could not create temporary file %s: %s",
-+                                      location, strerror( errno ) );
-+                      free( location );
-+                      return 0 - errno;
-+              }
-+              close( fd );
-+      } else {
-+              if( mknod( location, mode, rdev ) == -1 ) {
-+                      log( "Could not create temporary file %s: %s",
-+                                      location, strerror( errno ) );
-+                      free( location );
-+                      return 0 - errno;
-+              }
-       }
-       /* build node */
-       node = ( NODE * )malloc( sizeof( NODE ) );
-@@ -1605,7 +1622,11 @@
- }
- 
- static int
-+#ifdef HAVE_STATVFS
-+ar_statfs( const char *path, struct statvfs *stbuf )
-+#else
- ar_statfs( const char *path, struct statfs *stbuf )
-+#endif
- {
-       /* ENOSYS is ok for this, we have no statistics */
-       ( void )path;
diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/patches/patch-archivemount.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-archivemount/patches/patch-archivemount.c        Tue Nov 30 17:13:14 2021 +0000
@@ -0,0 +1,98 @@
+$NetBSD: patch-archivemount.c,v 1.1 2021/11/30 17:13:14 pho Exp $
+
+Hunk #0:
+  On NetBSD there's no <fuse/fuse_lowlevel.h>. The file has to be
+  #include'd as <fuse_lowlevel.h>.
+
+Hunk #1:
+  Original comment:
+
+  > date: 2007-02-21 09:04:30 +0900;  author: pooka;  state: Exp;  lines: +33 -3;
+  > use open(2) instead of mknod(2) to create regular files.  while
+  > the latter works on the most current NetBSD, I don't feel like running
+  > file systems unnecessarily as the superuser
+
+  But pho@ thinks it doesn't really make any difference, at least on
+  NetBSD, because NetBSD librefuse doesn't support non-root mounting
+  (via setuid'ed fusermount) and therefore running filesystems as root
+  is the only option. Of course filesystems can drop their root
+  privilege after calling fuse_mount(), but nobody actually does that.
+
+Hunk #2, #3:
+  If fuse_main() is available, use it. There's no need to reimplement
+  its functionality, especially since this reimplementation isn't
+  API-compatible with NetBSD librefuse.
+
+--- archivemount.c.orig        2020-04-20 11:27:10.000000000 +0000
++++ archivemount.c
+@@ -29,7 +29,11 @@
+ #include "config.h"
+ 
+ #include <fuse.h>
+-#include <fuse/fuse_lowlevel.h>
++#if defined(HAVE_FUSE_FUSE_LOWLEVEL_H)
++#  include <fuse/fuse_lowlevel.h>
++#elif defined(HAVE_FUSE_LOWLEVEL_H)
++#  include <fuse_lowlevel.h>
++#endif
+ #include <fuse_opt.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -2224,12 +2228,26 @@ ar_mknod(const char *path, mode_t mode, 
+               return tmp;
+       }
+       /* create temp file */
+-      if (mknod(location, mode, rdev) == -1) {
+-              log("Could not create temporary file %s: %s",
+-                      location, strerror(errno));
+-              free(location);
+-              pthread_mutex_unlock(&lock);
+-              return 0 - errno;
++      if (S_ISREG(mode)) {
++              int fd = open(location, O_WRONLY | O_CREAT | O_EXCL, mode);
++
++              if (fd == -1) {
++                      log("Could not create temporary file %s: %s",
++                              location, strerror(errno));
++                      free(location);
++                      pthread_mutex_unlock(&lock);
++                      return 0 - errno;
++              }
++              close(fd);
++      }
++      else {
++              if (mknod(location, mode, rdev) == -1) {
++                      log("Could not create temporary file %s: %s",
++                              location, strerror(errno));
++                      free(location);
++                      pthread_mutex_unlock(&lock);
++                      return 0 - errno;
++              }
+       }
+       /* build node */
+       if ((node = init_node()) == NULL) {
+@@ -2912,7 +2930,7 @@ main(int argc, char **argv)
+        */
+       fuse_opt_add_arg(&args, "-s");
+ 
+-#if FUSE_VERSION >= 26
++#if defined(HAVE_FUSE_CHAN_FD)
+       {
+               struct fuse *fuse;
+               struct fuse_chan *ch;
+@@ -2974,13 +2992,13 @@ main(int argc, char **argv)
+               fuse_destroy(fuse);
+               free(mountpoint);
+       }
+-#else
++#else /* defined(HAVE_FUSE_CHAN_FD) */
+       {
+               /* now do the real mount */
+               int fuse_ret;
+               fuse_ret = fuse_main(args.argc, args.argv, &ar_oper, NULL);
+       }
+-#endif
++#endif /* defined(HAVE_FUSE_CHAN_FD) */
+ 
+       /* go back to saved dir */
+       {
diff -r f1a7bcd2e4aa -r c82e71b31269 filesystems/fuse-archivemount/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-archivemount/patches/patch-configure.ac  Tue Nov 30 17:13:14 2021 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-configure.ac,v 1.1 2021/11/30 17:13:14 pho Exp $
+
+On NetBSD there's no <fuse/fuse_lowlevel.h>. The file has to be
+#include'd as <fuse_lowlevel.h>.
+
+--- configure.ac.orig  2020-04-20 11:28:23.000000000 +0000
++++ configure.ac
+@@ -23,6 +23,13 @@ PKG_CHECK_MODULES([FUSE], [fuse >= 2.6],
+ AC_SUBST([FUSE_LIBS])
+ AC_SUBST([FUSE_CFLAGS])
+ 
++CPPFLAGS_saved="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS $FUSE_CFLAGS"
++AC_CHECK_HEADERS([fuse/fuse_lowlevel.h fuse_lowlevel.h])
++AC_CHECK_LIB([fuse], [fuse_mount])
++AC_CHECK_FUNCS([fuse_chan_fd])
++CPPFLAGS="$CPPFLAGS_saved"
++
+ 
+ # Check for libarchive (no pkg-config support)
+ AC_CHECK_LIB([archive], [archive_read_new], [ARCHIVE_LIBS=-larchive],


Home | Main Index | Thread Index | Old Index