summaryrefslogtreecommitdiff
path: root/filesystems/ext2
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-09-27 12:48:46 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2024-11-06 16:17:35 +0100
commit6e2da9672f79f44048d597f0f61e4646cdeade9d (patch)
treec92e4b3158e3419e8cec38e00227d08dcdaab3e9 /filesystems/ext2
parentmath/sdpa: speed up build (diff)
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988
Diffstat (limited to 'filesystems/ext2')
-rw-r--r--filesystems/ext2/Makefile34
-rw-r--r--filesystems/ext2/distinfo3
-rw-r--r--filesystems/ext2/files/patch-fuse-ext2_fuse-ext2.c61
-rw-r--r--filesystems/ext2/pkg-descr2
4 files changed, 100 insertions, 0 deletions
diff --git a/filesystems/ext2/Makefile b/filesystems/ext2/Makefile
new file mode 100644
index 000000000000..3c3ec5000a85
--- /dev/null
+++ b/filesystems/ext2/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= fusefs-ext2
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.0.11
+PORTREVISION= 2
+CATEGORIES= filesystems
+
+MAINTAINER= ehaupt@FreeBSD.org
+COMMENT= FUSE module to mount ext2, ext3 and ext4 with read write support
+WWW= https://github.com/alperakcan/fuse-ext2
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= mke2fs:filesystems/e2fsprogs-core
+RUN_DEPENDS= mke2fs:filesystems/e2fsprogs-core
+
+USES= autoreconf fuse libtool localbase:ldflags pkgconfig
+USE_GITHUB= yes
+GH_ACCOUNT= alperakcan
+GH_PROJECT= fuse-ext2
+GH_TAGNAME= e8f1063
+
+GNU_CONFIGURE= yes
+
+CPPFLAGS+= -I${LOCALBASE}/include/e2fsprogs
+LDFLAGS+= -L${LOCALBASE}/lib/e2fsprogs -Wl,--rpath \
+ -Wl,${LOCALBASE}/lib/e2fsprogs
+
+PLIST_FILES= bin/fuse-ext2 \
+ bin/fuse-ext2.probe \
+ libdata/pkgconfig/fuse-ext2.pc \
+ share/man/man1/fuse-ext2.1.gz
+
+.include <bsd.port.mk>
diff --git a/filesystems/ext2/distinfo b/filesystems/ext2/distinfo
new file mode 100644
index 000000000000..a1c8808c59aa
--- /dev/null
+++ b/filesystems/ext2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1721752246
+SHA256 (alperakcan-fuse-ext2-v0.0.11-e8f1063_GH0.tar.gz) = 7dcc5be65236f83b121043ce6eae1c56a8658a459f6f4075436e7a9e4176fda9
+SIZE (alperakcan-fuse-ext2-v0.0.11-e8f1063_GH0.tar.gz) = 123443
diff --git a/filesystems/ext2/files/patch-fuse-ext2_fuse-ext2.c b/filesystems/ext2/files/patch-fuse-ext2_fuse-ext2.c
new file mode 100644
index 000000000000..6b12035108f4
--- /dev/null
+++ b/filesystems/ext2/files/patch-fuse-ext2_fuse-ext2.c
@@ -0,0 +1,61 @@
+--- fuse-ext2/fuse-ext2.c.orig 2019-05-09 08:29:33 UTC
++++ fuse-ext2/fuse-ext2.c
+@@ -18,15 +18,14 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
++#include <stdbool.h>
+ #include "fuse-ext2.h"
+
+ static const char *HOME = "http://github.com/alperakcan/fuse-ext2/";
+
+ #if __FreeBSD__ == 10
+-static char def_opts[] = "allow_other,default_permissions,local,";
+ static char def_opts_rd[] = "noappledouble,";
+ #else
+-static char def_opts[] = "allow_other,default_permissions,";
+ static char def_opts_rd[] = "";
+ #endif
+
+@@ -171,8 +170,10 @@ static int parse_options (int argc, char *argv[], stru
+ static char * parse_mount_options (const char *orig_opts, struct extfs_data *opts)
+ {
+ char *options, *s, *opt, *val, *ret;
++ bool allow_other = true;
++ bool default_permissions = true;
+
+- ret = malloc(strlen(def_opts) + strlen(def_opts_rd) + strlen(orig_opts) + 256 + PATH_MAX);
++ ret = malloc(strlen(def_opts_rd) + strlen(orig_opts) + 256 + PATH_MAX);
+ if (!ret) {
+ return NULL;
+ }
+@@ -231,6 +232,14 @@ static char * parse_mount_options (const char *orig_op
+ #if __FreeBSD__ == 10
+ strcat(ret, "force,");
+ #endif
++ } else if (!strcmp(opt, "noallow_other")) {
++ allow_other = false;
++ strcat(ret, opt);
++ strcat(ret, ",");
++ } else if (!strcmp(opt, "nodefault_permissions")) {
++ default_permissions = false;
++ strcat(ret, opt);
++ strcat(ret, ",");
+ } else { /* Probably FUSE option. */
+ strcat(ret, opt);
+ if (val) {
+@@ -246,7 +255,13 @@ static char * parse_mount_options (const char *orig_op
+ opts->readonly = 1;
+ }
+
+- strcat(ret, def_opts);
++ if (allow_other)
++ strcat(ret, "allow_other,");
++ if (default_permissions)
++ strcat(ret, "default_permissions,");
++#if __FreeBSD__ == 10
++ strcat(ret, "local,");
++#endif
+ if (opts->readonly == 1) {
+ strcat(ret, def_opts_rd);
+ strcat(ret, "ro,");
diff --git a/filesystems/ext2/pkg-descr b/filesystems/ext2/pkg-descr
new file mode 100644
index 000000000000..e1d6775cdc20
--- /dev/null
+++ b/filesystems/ext2/pkg-descr
@@ -0,0 +1,2 @@
+Fuse-ext2 is a multi OS FUSE module to mount ext2, ext3 and ext4 file system
+devices and/or images with read write support.