1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

- Take maintainership

- Use unmount(2) instead of exec umount -f
- update to 2.9.3
This commit is contained in:
Baptiste Daroussin 2013-07-24 14:42:52 +00:00
parent ea8e7855e3
commit d1523e64f1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323599
3 changed files with 76 additions and 12 deletions

View File

@ -2,15 +2,17 @@
# $FreeBSD$
PORTNAME= fusefs
PORTVERSION= 2.9.2
PORTVERSION= 2.9.3
CATEGORIES= sysutils
MASTER_SITES= SF/fuse/fuse-2.X/${PORTVERSION}
PKGNAMESUFFIX= -libs
DISTNAME= fuse-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
MAINTAINER= bapt@FreeBSD.org
COMMENT= FUSE allows filesystem implementation in userspace
OPTIONS_DEFINE= DOCS
GNU_CONFIGURE= yes
CONFIGURE_ENV= MOUNT_FUSE_PATH=${PREFIX}/sbin
USE_LDCONFIG= yes
@ -20,18 +22,21 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \
TXT_DOCS= how-fuse-works \
kernel.txt
MAN1= fusermount.1 \
ulockmgr_server.1
MAN8= mount.fuse.8
.include <bsd.port.options.mk>
post-install:
${INSTALL_DATA} ${WRKSRC}/include/fuse_kernel.h ${PREFIX}/include/fuse
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}/libs
.for i in ${TXT_DOCS}
@${INSTALL_DATA} ${WRKSRC}/doc/$i ${DOCSDIR}/libs
.endfor
.endif
MAN1= fusermount.1 \
ulockmgr_server.1
MAN8= mount.fuse.8
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (fuse-2.9.2.tar.gz) = 81a728fb3f87da33063068735e2fb7e2cd89df207d32687d3d3278385279cefc
SIZE (fuse-2.9.2.tar.gz) = 560123
SHA256 (fuse-2.9.3.tar.gz) = 0beb83eaf2c5e50730fc553406ef124d77bc02c64854631bdfc86bfd6437391c
SIZE (fuse-2.9.3.tar.gz) = 572044

View File

@ -1,10 +1,69 @@
--- lib/mount_bsd.c.orig 2008-07-07 08:01:09.000000000 +0200
+++ lib/mount_bsd.c 2008-07-07 08:01:59.000000000 +0200
@@ -10,6 +10,7 @@
--- lib/mount_bsd.c.orig 2013-07-01 09:40:53.000000000 +0200
+++ lib/mount_bsd.c 2013-07-24 16:20:34.533073286 +0200
@@ -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 @@
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);
}