Permalink
Browse files

Merge branch 'master' of https://github.com/adouble42/fuse-ext2 into …

…adouble42-master

Conflicts:
	README.md
  • Loading branch information...
2 parents 1b86fd3 + 4a701f5 commit 4442841c4c6b55f066aaeaa20500b3b5e2640736 @alperakcan committed Nov 29, 2016
Showing with 37 additions and 36 deletions.
  1. +21 −28 README.md
  2. +0 −2 configure.ac
  3. +16 −6 tools/macosx/fuse-ext2.fs/fuse-ext2.util
View
@@ -1,6 +1,14 @@
# Fuse Ext2
> Fuse-ext2 is a EXT2/EXT3/EXT4 Filesystem support for _FUSE_.
+this fork is a build tested under XCode 8.1, OS X 10.11.
+changed to a version of e2fsprogs that builds cleanly following these instructions, and removed offending line from configure.ac that breaks original build.<br>
+this has also had the /Library/Filesystems/fuse-ext2.fs/fuse-ext2.util script adjusted to mount read/write by default, but respect diskutil's rdonly flag.<br>
+write support has been tested and seems to work. using this i'm able to read and write ext3 (no journal) nemesis (http://mrn.sixbit.org) volumes on OS X, providing a common, writable filesystem for the OS X, Linux and FreeBSD versions.<br>
+<b>BINARY PACKAGE for OS X HERE (built on 10.11 with XCode 8.1): http://mrn.sixbit.org/files/fuse-ext2-0.0.9-e2fsprogs-1.43-3.dmg</b><br>
+this distribution includes binary e2fsprogs package 1.43.3, that installs in /opt/gnu by default, as well.<br>
+in order to comply with the license the e2fsprogs source is included in "extras" which makes for a larger download.<br>
+
## Dependencies
@@ -46,29 +54,9 @@ package for your distribution.
### Mac OS:
-Dependecies:
-
-[OSXfuse](https://osxfuse.github.io) io no need to install with MacFuse compatibility.
-
-The easiest way is using [Homebrew](http://brew.sh/):
-
-```shell
-$ brew install e2fsprogs m4 automake autoconf libtool pkg-config
-$ git clone https://github.com/alperakcan/fuse-ext2.git
-$ cd fuse-ext2
-$ ./autogen.sh
-$ ./configure \
- PKG_CONFIG_PATH="$(brew --prefix e2fsprogs)/lib/pkgconfig" \
- CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" \
- LDFLAGS="-L$(brew --prefix e2fsprogs)/lib"
-$ make
-$ sudo make install #<-- To install on the current system
- or
-$ make package #<-- To create an install package in the current directory
-```
+Dependencies:
-Build:
-
+[OSXfuse](https://osxfuse.github.io)
Build **from source** depends on:
* m4
@@ -79,6 +67,7 @@ Build **from source** depends on:
```shell
export PATH=/opt/gnu/bin:$PATH
+export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir gnu
cd gnu
@@ -120,28 +109,32 @@ sudo make install
cd ../
# e2fsprogs
-curl -O https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.12/e2fsprogs-1.42.12.tar.gz
-tar -zxvf e2fsprogs-1.42.12.tar.gz
-cd e2fsprogs-1.42.12
-./configure --prefix=/opt/gnu
+curl -O https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.12/e2fsprogs-1.43.3.tar.gz
+tar -zxvf e2fsprogs-1.43.3.tar.gz
+cd e2fsprogs-1.43.3
+./configure --prefix=/opt/gnu --disable-nls
make
sudo make install
sudo make install-libs
+sudo cp /opt/gnu/lib/pkgconfig/* /usr/local/lib/pkgconfig
cd ../
# fuse-ext2
export PATH=/opt/gnu/bin:$PATH
+export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
+
./autogen.sh
CFLAGS="-idirafter/opt/gnu/include -idirafter/usr/local/include/osxfuse/" LDFLAGS="-L/opt/gnu/lib -L/usr/local/lib" ./configure
make
sudo make install
```
# Test
+the e2fsprogs live in /opt/gnu/bin and /opt/gnu/sbin, fuse-ext2 is in /usr/local/bin
```shell
dd if=/dev/zero of=test/fs.ext2 bs=1024 count=102400
-mkfs.ext4 test/fs.ext2
+/opt/gnu/sbin/mkfs.ext4 test/fs.ext2
fuse-ext2 test/fs.ext2 /mnt/fs.ext2 -o debug,rw+
```
@@ -152,7 +145,7 @@ See [Man page](http://man.cx/fuseext2(1)) for options.
```
Usage: fuse-ext2 <device|image_file> <mount_point> [-o option[,...]]
-Options: ro, force, allow_other
+Options: ro, rw+, force, allow_other
Please see details in the manual.
Example: fuse-ext2 /dev/sda1 /mnt/sda1
View
@@ -183,8 +183,6 @@ AC_SUBST(pkgconfigdir)
AM_CONDITIONAL(LINUX, test "$arch" = linux)
AM_CONDITIONAL(DARWIN, test "$arch" = darwin)
-PKG_CHECK_MODULES([e2fs],[ext2fs >= 1.41.13])
-
AC_CONFIG_FILES([
fuse-ext2.pc
Makefile
@@ -9,7 +9,7 @@
FSNAME=fuse-ext2
# For debugging purposes:
-LOG_ENABLED=1 # 1 = function Log writes to $LOGFILE
+LOG_ENABLED=0 # 1 = function Log writes to $LOGFILE
# 0 = function Log does nothing
LOGFILE=/var/log/fuse-ext2_util.log
# Everybody should be able to write to this file.
@@ -209,7 +209,9 @@ function Mount ()
# https://github.com/osxfuse/osxfuse/wiki/Mount-options#local
# for possible implications.
#OPTIONS="auto_xattr,local"
- OPTIONS="local"
+ OPTIONS="local,allow_other"
+ OPTIONS_ACCESS="rw,force,"
+#,rw,force"
# Assign this volume to currently logged user in the OS X GUI, in order
# to write on the volume without having to be root (sudo), or without
@@ -220,12 +222,20 @@ function Mount ()
OPTIONS="${OPTIONS},uid=${GUI_UID},gid=${GUI_GID}"
# Ignore DiskArb's mount options and possibly copy them
+ # listen to diskutil
while [[ "$1" = "-o" ]]
do
- # OPTIONS="${OPTIONS}${2}," # Copy options?
+ echo {OPTIONS}${2} >>/tmp/loggg
+ if ( [[ "$2" = "rdonly" ]] ) ; then
+ echo readonly >>/tmp/loggg
+ OPTIONS_ACCESS="ro,"
+ fi
+ #OPTIONS="${OPTIONS}${2}," # Copy options?
shift 2 # Forget the -o [option]
done
+ OPTIONS="${OPTIONS_ACCESS},${OPTIONS}"
+
# $# is the argument count, which is decremented when we "shift"
while ( [[ $# -ne 0 ]] ); do
@@ -312,9 +322,9 @@ function Probe ()
PROBE_OUTPUT=`"${PFX}${FUSE_EXT2_PROBE}" "--readonly" "${DEVICE}" 2>&1`
PROBE_RETVAL=$?
PROBE_VOLNAME=`${PFX}${FUSE_EXT2_E2LABEL} "${DEVICE}"`
- LogDebug "[Probe] Return value: ${PROBE_RETVAL}"
- LogDebug "[Probe] Volname : ${PROBE_VOLNAME}"
- LogDebug "[Probe] Output (PROBE_OUTPUT): \"${PROBE_OUTPUT}\""
+ echo ${PROBE_RETVAL} >>/tmp/logg
+ echo ${DEVICE} >>/tmp/logg
+ echo ${PROBE_OUTPUT} >>/tmp/logg
if ( [[ ${PROBE_RETVAL} -eq 0 ]] ); then
echo "${PROBE_VOLNAME}"

0 comments on commit 4442841

Please sign in to comment.