vasi / squashfuse Goto Github PK
View Code? Open in Web Editor NEWFUSE filesystem to mount squashfs archives
License: Other
FUSE filesystem to mount squashfs archives
License: Other
squashfuse - Mount SquashFS archives using FUSE https://github.com/vasi/squashfuse Squashfuse lets you mount SquashFS archives in user-space. It supports almost all features of the SquashFS format, yet is still fast and memory-efficient. So that everyone can use it, squashfuse supports many different operating systems and is available under a permissing license. SquashFS is an efficiently compressed, read-only storage format. Support for it has been built into the Linux kernel since 2009. It is very common on Live CDs and embedded Linux distributions. Quick start: $ ./configure && make $ ./squashfuse foo.squashfs mountpoint 1. Table of contents ==================== 0. Introduction 1. Table of contents 2. Getting started - System requirements - Getting the source - Building - Usage 3. About squashfuse - Is squashfuse for you? - What's included? - Features - Known bugs 4. References - Licensing - Acknowledgements - Links 2. Getting started ================== 2a. System requirements ----------------------- To build and use squashfuse, you must be able to use the terminal of your operating system. Runtime requirements: - FUSE 2.5 or later - At least one of the following compression libraries - zlib - lzo2 - xz (aka. liblzma) - lz4 - zstd - (optional) libattr, for better extended attribute support on Linux Build requirements: - A C compiler - make (any variant) - sed - (optional) pkg-config, for detection of dependencies To build from the development repository, rather than a tarball, you'll need: - autoconf 2.60 or later - automake 1.11 or later - libtool 2 Known fully-supported platforms: - Linux - Mac OS X - FreeBSD - NetBSD - OpenIndiana - Android - other platforms may work too! For a precise list of packages you will need on your OS, and other platform notes, please see the file `PLATFORMS'. 2b. Getting the source ---------------------- The squashfuse distribution can be downloaded from SourceForge: https://sourceforge.net/projects/squashfuse/files/ The development repository uses git, at GitHub: http://github.com/vasi/squashfuse 2c. Installation ---------------- Squashfuse is built with the usual `configure && make'. If you need more detailed instructions: 0. Ensure you're at your terminal, in the directory containing this README. 1. (if needed) If the file `configure' is already present, skip this step. Otherwise, run `./autogen.sh' to generate one. 2. Run `./configure' to set up the build. You can find useful configuration options in the file `CONFIGURATION', or by running `./configure --help'. If configure fails, check that you really have all the requirements installed. You may also want to check the `PLATFORMS' file to see if there are any special notes for your operating system. 3. Run `make' to build `squashfuse'. 4. (optional) If you want to use squashfuse in this directory, that's ok. But if you'd rather install it, run `make install'. If you need root privileges, `sudo make install' may work. 2d. Example: Ubuntu ------------------- For example on Ubuntu 22.04: $ sudo apt install gcc make pkg-config libfuse3-dev \ zlib1g-dev liblzo2-dev liblzma-dev liblz4-dev libzstd-dev \ automake autoconf libtool \ fuse3 fio squashfs-tools $ ./autogen.sh $ ./configure $ make -j4 $ make check $ sudo make install 2e. Example: NixOS ------------------ For example on NixOS: $ nix-shell $ ./autogen.sh $ ./configure $ make -j4 To install to your system, a custom Nix package should be built. Otherwise, you can simply move the binaries to `~/.local/bin' 2f. Example: macOS ------------------ On macOS, for example, install macFUSE, and then: $ brew install autoconf automake pkg-config libtool lzo xz $ ./autogen.sh $ ./configure --prefix=/usr/local/ \ --with-lzo=/usr/local/Cellar/lzo/2.10 \ --with-xz=/usr/local/Cellar/xz/5.4.4 $ make -j $ make check $ make install 2g. Usage --------- You'll need a SquashFS archive to use squashfuse. If you don't already have one, you can create one using the `mksquashfs' utility from the squashfs-tools project. To create a SquashFS archive: $ mksquashfs DIRECTORY ARCHIVE To mount a SquashFS archive with squashfuse: $ squashfuse ARCHIVE MOUNTPOINT To unmount when you're done: $ umount MOUNTPOINT # On Mac/BSD $ fusermount -u MOUNTPOINT # On Linux For more options, see the man page squashfuse(1). 3. About squashfuse =================== 3a. Is squashfuse for you? -------------------------- Squashfuse is a great option if you have a SquashFS archive, and: - You're not running Linux, or - You don't have root access, or - You're too concerned about security to use root, or - You find it inconvenient to elevate privileges, or - SquashFS is not built into your kernel, but FUSE is, or - You want to hack on the SquashFS format without risking kernel panics. Squashfuse is probably not the right tool for the job, if: - You don't have FUSE. More and more systems have FUSE, but some don't. Squashfuse requires it. - You have a very old SquashFS archive. Neither squashfuse nor the Linux kernel support SquashFS versions less than 4.0. Use `unsquashfs' from the squashfs-tools project. - You want to create or modify a SquashFS archive. Neither squashfuse nor the Linux kernel support write access, use `mksquashfs' from squashfs-tools. - You want to extract an entire SquashFS archive. If you don't want to mount anything, it's more efficient and convenient to just use unsquashfs. - You want your root filesystem `/' to be SquashFS. This isn't well-tested, though it may be possible. - You're highly concerned about bugs. The SquashFS kernel module has seen much more testing than squashfuse. If you don't yet use SquashFS, consider starting, now that squashfuse exists. For many uses, the chief drawbacks of SquashFS were requiring Linux and root access, but squashfuse has that covered. - Use SquashFS for archival and backup, instead of tar. It offers faster creation (multi-core), and browsing without unpacking. - Use SquashFS instead of zip. It has better compression, and faster directory lookup. - Use SquashFS instead of compressed disk images like DMG, uzip or Partimage. It has better compression and portability. 3b. What's included? -------------------- Squashfuse currently comprises three programs: * squashfuse Allows you to mount a squashfs filesystem. * squashfuse_ll Like `squashfuse', but implemented using the low-level FUSE API. It's a tiny bit faster, but less portable. * squashfuse_ls Lists all the files in a squashfs archive. A demonstration of using the squashfuse core in the absence of FUSE. 3c. Features ------------ Squashfuse supports the following SquashFS features: - zlib, LZO, LZMA2, LZ4 and zstd decompression - Fast, indexed directory lookup - Fast, indexed seeking within files - Caching of decompressed blocks - De-duplicated files - Sparse files - Extended attributes - Files larger than 4GB Squashfuse is missing the following features: - LZMA1 compression (deprecated) - Support for SquashFS versions less than 4.0 - Multi-core decompression 3c. Known bugs -------------- - On 32-bit systems with a large inode cache, when mounting a large SquashFS archive created with the "-no-exports" option, squashfuse_ll may use a large amount of memory. This is due to a bug in the FUSE API, where ino_t is shrunk to 32-bits. 4. References ============= 4a. Licensing ------------- Squashfuse is copyright (c) 2012-2014 Dave Vasilevsky <[email protected]> Squashfuse is distributed under the 2-clause BSD license. See the file LICENSE for details. 4b. Acknowledgements -------------------- Thanks to: * Phillip Lougher, for designing the SquashFS format, and implementing support in the kernel. Also for providing permission to use and distribute squashfs_fs.h under a BSD-style license. * Maël Kerbiriou, for implementing LZ4 support. 4c. Links --------- * SquashFS - SquashFS home page, includeing squashfs-tools: http://squashfs.sourceforge.net/ - squashfs-tools for non-Linux: https://github.com/vasi/squashfs-tools * FUSE - FUSE home page: http://fuse.sourceforge.net/ - OSXFUSE (FUSE for Macs): http://osxfuse.github.io/ * Other implementations of the SquashFS format - Linux kernel: https://github.com/torvalds/linux/tree/master/fs/squashfs - 7-zip / p7zip: http://www.7-zip.org/ - GRUB 2 bootloader: http://www.gnu.org/software/grub/
Full build log here.
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether gcc and cc understand -c and -o together... yes
./configure: line 12055: SQ_PROG_CPP_POSIX_2001: command not found
./configure: line 12056: SQ_PROG_CC_WALL: command not found
./configure: line 12066: SQ_CHECK_DECL_MAKEDEV: command not found
./configure: line 12067: SQ_CHECK_DECL_PREAD: command not found
./configure: line 12068: SQ_CHECK_DECL_S_IFSOCK: command not found
./configure: line 12069: syntax error near unexpected token `:'
./configure: line 12069: `SQ_CHECK_DECL_ENOATTR(:)'
Hi!
I am updating the packaging for debian and I have run into some missing symbols. It seems 2ff837b has removed some functions directly related to these missing symbols. Are these public facing or internal? Thanks for any help you can provide.
Scarlett
Thanks for the library support (PR #59); this helps us a lot!!
One challenge we ran into is that ll.h
includes (via some intermediate headers IIRC) the Autoconf-produced config.h
. This clashes with two things:
config.h
, and_POSIX_C_SOURCE
to a different value than our project.We did find a workaround:
#define SQFS_CONFIG_H
#define FUSE_USE_VERSION 32
#include <squashfuse/ll.h>
(Note that we are libfuse3 only so that's why it seemed OK to define FUSE_USE_VERSION
unconditionally.)
But it would be nice if there were an externally-facing header to include.
Hello, sorry if this is stupid,
I'm trying to run squashfuse on relative path. The absolute path is working but I need it to be relative.
When running on relative it's not detecting the .squashfs file at all.
I have installed all the prerequisites that I can find (openWRT uses OPKG not apt-get) and this is the part it gets stuck on:
configure: checking for definition needed by ENOATTR
checking if ENOATTR works without changes... no
checking if ENOATTR requires changing _DARWIN_C_SOURCE... no
checking if ENOATTR requires changing _NETBSD_SOURCE... no
checking if ENOATTR requires changing _XOPEN_SOURCE... no
checking if ENOATTR requires changing _BSD_SOURCE... no
checking if ENOATTR requires changing _GNU_SOURCE... no
checking if ENOATTR requires changing _POSIX_C_SOURCE... no
checking for library containing uncompress... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for pkgconfig_XZ... no
checking for library containing lzma_stream_buffer_decode... no
checking for library containing lzo1x_decompress_safe... no
checking for library containing LZ4_decompress_safe... no
configure: error: in/root/downloads/squashfuse-master': configure: error: At least one decompression library must exist See
config.log' for more details
but I don't know the lzma files that ./configure is looking for, I don't know if the files are named differently for OPKG so it is not seeing it. I think the file it needs is
/usr/lib/liblzma.so.5
or
/usr/lib/liblzma.so.5.2.2
but the config.log said it needs a .pc file?
I have got squashfuse up and running on kali no problem but I have to install squashfuse on openWRT to mount a file in the filesystem
Any help would be much appreciated!
Thanks
Pretty much every other SquashFS implementation supports zstd compression (squashfs-tools, squashfs-tools-ng, kernel driver) so it would be nice to have it in the FUSE implementation too.
Compiled with
git clone https://github.com/vasi/squashfuse.git
cd squashfuse/
sudo apt install -y autoconf libtool make gcc libtool libtool-bin libfuse-dev liblzma-dev
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --with-xz=/usr/lib/ --without-zlib
seems like it has done what it should, since it is linking to liblzma:
ldd squashfuse
linux-vdso.so.1 => (0x00007ffd6b5fa000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f52d4eb4000)
libfuse.so.2 => /lib/x86_64-linux-gnu/libfuse.so.2 (0x00007f52d4c78000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f52d4a5a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f52d4691000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f52d448d000)
/lib64/ld-linux-x86-64.so.2 (0x0000555fcc21f000)
But still it doesn't mount a lzma squashfs image:
./squashfuse -f -o offset=$((64*1024)) xchat.sai mountpoint/
Squashfs image uses lzma compression, this version supports only xz.
On my MAC, OS X 10.10.1 :
df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 465Gi 453Gi 12Gi 98% 118783927 3053671 97% /
devfs 201Ki 201Ki 0Bi 100% 697 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
squashfuse@osxfuse0 0Bi 0Bi 0Bi 100% 0 0 100% /private/tmp/unsquash
Unless this is a bug/feature of Fuse, it should report appropriate values.
The same squashfs file mounted in Linux reports correct values (last line) :
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 9.0G 6.6G 2.0G 77% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 991M 8.0K 991M 1% /dev
tmpfs 201M 352K 200M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1001M 72K 1001M 1% /run/shm
none 100M 0 100M 0% /run/user
/dev/vda1 236M 38M 186M 17% /boot
/dev/vdb 79G 55G 20G 74% /mnt/dataset
/dev/loop0 5.1G 5.1G 0 100% /mnt/squashed
I have tried squashfs-tools and squashfuse.
No one has the multi-core decompression feature.
Is it impossible to decompress a mounted squashfs with multiple cores?
But unsquashfs does it well, which is pretty confusing for me.
Thanks.
it would be nice creating squashfuse_cat, similar to squashfuse_ls . It should cat/extract all file names applied as parameter or stdin. support for asterisk and question mark is desirable.
This should extract files into physical directory, or into stdount depending on output.
If it is possible, it would be nice extracting multiple files in the same order as placed into squashfuse_cat .
for stdout option, any separator for multiple file content is desirable.
This all is very recommended for using squashfuse_ls & squashfuse_cat inside automation scripts without mounting archive.
I'm trying to use squashfuse with overlay mounts and having a problem with 'openat' and 'AT_FDCWD'.
Real world situation was when trying to run 'apt-get install' where an strace showed:
openat(AT_FDCWD, "/var/lib/dpkg/lock-frontend", O_RDWR|O_CREAT|O_NOFOLLOW, 0640) = -1 ENOSYS (Function not mplemented)
I have a recreate here recreate.zip.
There are 3 files in the zip:
cc -o test-openat test-openat.c
The result is something like this:
% sudo ./test-squash-overlay.sh
$ mkdir -p /tmp/tmp.SqAn7lSrRw/mp /tmp/tmp.SqAn7lSrRw/workd /tmp/tmp.SqAn7lSrRw/upper /tmp/tmp.SqAn7lSrRw/writable
$ squashfuse -f -o debug,allow_other,ro /tmp/testx/simple.squashfs /tmp/tmp.SqAn7lSrRw/mp >/tmp/testx/squashfuse.log &
$ mount -t overlay -olowerdir=/tmp/tmp.SqAn7lSrRw/mp,upperdir=/tmp/tmp.SqAn7lSrRw/upper,workdir=/tmp/tmp.SqAn7lSrRw/workd xx-/tmp/tmp.SqAn7lSrRw/mp /tmp/tmp.SqAn7lSrRw/writable
+ cd /tmp/tmp.SqAn7lSrRw/writable
+ /tmp/testx/test-openat dir1/file2.txt dir1/file-noexist.txt file1.txt file-noexist.txt
dir1/file2.txt: -1: Function not implemented
dir1/file-noexist.txt: 3
file1.txt: 3
file-noexist.txt: 3
You can run test-squash-overlay.sh
with the KERNELMOUNT environment variable set to 'true' and it will do a kernel mount rather than a squashfuse mount. If you do that, the overlay works as desired.
% sudo KERNELMOUNT=true ./test-squash-overlay.sh
$ mkdir -p /tmp/tmp.BKBVLI1z7b/mp /tmp/tmp.BKBVLI1z7b/workd /tmp/tmp.BKBVLI1z7b/upper /tmp/tmp.BKBVLI1z7b/writable
$ mount -o loop,ro /tmp/testx/simple.squashfs /tmp/tmp.BKBVLI1z7b/mp
$ mount -t overlay -olowerdir=/tmp/tmp.BKBVLI1z7b/mp,upperdir=/tmp/tmp.BKBVLI1z7b/upper,workdir=/tmp/tmp.BKBVLI1z7b/workd xx-/tmp/tmp.BKBVLI1z7b/mp /tmp/tmp.BKBVLI1z7b/writable
+ cd /tmp/tmp.BKBVLI1z7b/writable
+ /tmp/testx/test-openat dir1/file2.txt dir1/file-noexist.txt file1.txt file-noexist.txt
dir1/file2.txt: 3
dir1/file-noexist.txt: 3
file1.txt: 3
file-noexist.txt: 3
This feature has been extensively tested already by Apptainer, so I think it is safe to enable by default.
I'm getting crashes with squashfuse on NetBSD. I narrowed it down to prototype mismatch between fuse_parse_cmdline() in this package and in system.
During build:
--- libfuseprivate_la-fuseprivate.lo ---
fuseprivate.c: In function 'sqfs_usage':
fuseprivate.c:105:3: warning: implicit declaration of function 'fuse_parse_cmdline' [-Wimplicit-function-declaration]
fuse_parse_cmdline(&args, NULL, NULL, NULL);
Backtrace
$ gdb --args squashfuse -v
GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from squashfuse...done.
(gdb) r
Starting program: /usr/pkg/bin/squashfuse -v
squashfuse 0.1.100 (c) 2012 Dave Vasilevsky
Usage: /usr/pkg/bin/squashfuse [options] ARCHIVE MOUNTPOINT
Program received signal SIGSEGV, Segmentation fault.
fuse_parse_cmdline (args=0x7f7fff446c90, opts=0x0) at /usr/src/lib/librefuse/refuse_lowlevel.c:125
125 memset(opts, 0, sizeof(*opts));
(gdb) bt
#0 fuse_parse_cmdline (args=0x7f7fff446c90, opts=0x0) at /usr/src/lib/librefuse/refuse_lowlevel.c:125
#1 0x000000000040628e in sqfs_usage (progname=0x7f7fff447470 "/usr/pkg/bin/squashfuse", fuse_usage=true) at fuseprivate.c:105
#2 0x00000000004018da in main (argc=2, argv=0x7f7fff446eb0) at hl.c:305
Browsing libfuse examples they confirm that the function prototype is different out there - with two arguments.
I'm mounting overlay over squashfuse. To do a lchown on a symbolic link, overlay calls copy_up, which calls vfs_fileattr_get.
The overlay code has a special case for:
142 err = ovl_real_fileattr_get(old, &oldfa);
143 if (err) {
144 /* Ntfs-3g returns -EINVAL for "no fileattr support" */
145 if (err == -ENOTTY || err == -EINVAL)
146 return 0;
147 pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n",
148 old->dentry, err);
149 return err;
150 }
However, squashfuse returns not EINVAL or ENOTTY but ENXIO, so overlay fails the copy_up, failing the chown. (I work around this by removing the symlink and recreating it, so that the chown (and fileattr_get) happen on the upperdir, but that's not ideal).
Is there a way that squashfuse could either return -EINVAL or implement the call?
Steps to reproduce:
git clone https://github.com/vasi/squashfuse.git
cd squashfuse/
./autogen.sh
./configure
make
git status
Output:
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
ci/features
tests/lib.sh
tests/ll-smoke.sh
tests/umount-test.sh
nothing added to commit but untracked files present (use "git add" to track)
Expected output:
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
I should have tested -o notify_pipe before merging #110 into the master branch, but I did it afterward. I tried both success and failures of mounts for both squashfuse_ll and squashfuse, and 3 of the combinations worked but squashfuse failures did not; there was no notification. It would be good if the automated tests tried all four combinations.
Reproduce with
$ mknod /tmp/notifypipe p
$ cat </tmp/notifypipe
and in another window do
$ ./squashfuse -o notify_pipe=/tmp/notifypipe /dev/null /mnt
An f
is only sent to the pipe if squashfuse_ll is used, but not if squashfuse is used.
@vasi Please either re-enable github actions or give me the privilege to update the repository settings. I have fixed the github actions in #85 and tested them in DrDaveD#2.
If I had the privilege to update repository settings I would also set up some branch protections, in particular required CI tests.
squashfuse 0.1.104 is in FreeBSD Ports. But I need 0.1.105 so that I can use ll.h
. So I edited the Makefile a bit:
PORTNAME= squashfuse
PORTVERSION= 0.1.105
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB}/vasi/${PORTNAME}/archive/refs/tags/
DISTNAME= ${PORTVERSION}
EXTRACT_SUFX= .tar.gz
PKGNAMEPREFIX= fusefs-
MAINTAINER= [email protected]
COMMENT= Mount a squashfs archive and treat it like a local file system
WWW= https://github.com/vasi/squashfuse
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
# Specify the direct URL to the tarball
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
USES= autoreconf fuse libtool pkgconfig
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
# Set the correct path to the extracted source code directory
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
.include <bsd.port.mk>
But the build fails with:
--- squashfuse_ll-ll_main.o ---
In file included from ll_main.c:25:
--- squashfuse-hl.o ---
In file included from hl.c:26:
./fuseprivate.h:31:10: fatal error: 'fuse3/fuse.h' file not found
#include <fuse3/fuse.h>
^~~~~~~~~~~~~~
--- squashfuse_ll-ll_main.o ---
./ll.h:31:10: fatal error: 'fuse3/fuse_lowlevel.h' file not found
#include <fuse3/fuse_lowlevel.h>
^~~~~~~~~~~~~~~~~~~~~~~
--- squashfuse_extract-nonstd-makedev.o ---
There is no fuse3 in FreeBSD:
# pkg list fusefs-libs
/usr/local/include/fuse.h
/usr/local/include/fuse/cuse_lowlevel.h
/usr/local/include/fuse/fuse.h
/usr/local/include/fuse/fuse_common.h
/usr/local/include/fuse/fuse_common_compat.h
/usr/local/include/fuse/fuse_compat.h
/usr/local/include/fuse/fuse_kernel.h
/usr/local/include/fuse/fuse_lowlevel.h
/usr/local/include/fuse/fuse_lowlevel_compat.h
/usr/local/include/fuse/fuse_opt.h
/usr/local/include/ulockmgr.h
/usr/local/lib/libfuse.a
/usr/local/lib/libfuse.so
/usr/local/lib/libfuse.so.2
/usr/local/lib/libfuse.so.2.9.9
/usr/local/lib/libulockmgr.a
/usr/local/lib/libulockmgr.so
/usr/local/lib/libulockmgr.so.1
/usr/local/lib/libulockmgr.so.1.0.1
/usr/local/libdata/pkgconfig/fuse.pc
/usr/local/share/doc/fusefs/libs/how-fuse-works
/usr/local/share/doc/fusefs/libs/kernel.txt
/usr/local/share/licenses/fusefs-libs-2.9.9_2/LGPL21
/usr/local/share/licenses/fusefs-libs-2.9.9_2/LICENSE
/usr/local/share/licenses/fusefs-libs-2.9.9_2/catalog.mk
Is it true that from 0.1.104 to 0.1.105 libfuse3 became a requirement? This would be a bit unexpected for a patch level release.
cc @Jehops
Using this tool, is it possible to mount a squashfs file (an Android system image) in read-write mode so that I can modify its contents?
Now that squashfuse_ll.a is a library on its own, it can be used to create self-mounting squashfs executables (e.g. appimage / xar). When distributing those, the problem is we don't know whether the target machine has libfuse2 or 3, and right now that is fixed at compile-time.
Can we use dlopen to figure this out at runtime instead?
Hi,
when I try to run autogeh.sh
on my Ubuntu 17.10 machine (autoconf 2.69, automake 1.15) I get the following error:
$ autoreconf -i
Makefile.am:6: error: MAKE_EXPORT does not appear in AM_CONDITIONAL
Makefile.am:36: error: SQ_WANT_HIGHLEVEL does not appear in AM_CONDITIONAL
Makefile.am:48: error: SQ_WANT_LOWLEVEL does not appear in AM_CONDITIONAL
autoreconf: automake failed with exit status: 1
I am facing following error when running command: squashfuse manjeetsinghynr-hello2_2.15_amd64.snap /mnt/r
Squashfs image uses lzo compression, this version supports only xz, zlib, lz4, zstd.
When I run command to mount an xz compressed squashfs image then command run successfully.
On a docker container running ubuntu-20.04 same command run without no error.
[0] arch-desktop:Downloads joey$ ./linux−Miru−4.2.8.AppImage
QSocketNotifier: Can only be used with threads started with QThread
Segmentationfault(coredumped)
[139] arch-desktop:Downloads joey$
I upgraded squashfuse via a system package upgrade (with the arch system repository, dont know which one specific repository the package comes from though), then after that, all appimages failed to run,
It spits out the shell log posted above everytime I attempt to execute a appimage
So I reverted back to squashfuse v0.2.0 and appimages work again, I don't know much about squashfuse itself but it seems the latest update (0.3.0) caused a regression for appimages on my system; I'm on Arch Linux btw,
Please let me know if you can replicate the issue on your side aswell, Cheers.
We have fast byteswapping on Linux, but macOS, FreeBSD, etc also have faster functions for this.
It should report the length of the link target string
I am interested in getting squashfuse working on Windows, and was looking to understand what the status of this effort is.
It looks like there are two more-or-less abandoned branches that were targeting Windows support: dokan and cygwin-dokanx (which appear to be very similar). From what I understand, these efforts hit roadblocks and were pretty much stopped several years back.
I have begun some investigation into using dokany, an actively-maintained and -developed fork of dokanx which seems to have appeared since efforts to port squashfuse to Windows stopped.
A few questions:
Any guidance/tips would be appreciated.
Thanks,
Matthew
I have a SquashFS file that's compressed with LZMA, and I'd love to open it with squashfuse! ;)
Hi Dave
I really like squashfuse and I use it on a Mac, It compiles without problems.
One question: are you planning to make a homebrew recipe for squashfuse as this would make installation and usage even easier?
Thanks,
Rainer
I built & tried to run tests (on FreeBSD-current) but get:
% make check
make check-TESTS
============================================================================
Testsuite summary for squashfuse 0.1.103
============================================================================
# TOTAL: 0
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
Currently the squashfuse_ll help message and the squashfuse_ll man page assume that multithreading is enabled, and that is not necessarily the case and not even the default configuration option.
Hello,
FIYwhen building squasfuse 0.1.105 from source squashfuse_ls
is not installed unless stated by the readme.
3b. What's included?
--------------------
Squashfuse currently comprises three programs:
* squashfuse Allows you to mount a squashfs filesystem.
* squashfuse_ll Like `squashfuse', but implemented using the low-level
FUSE API. It's a tiny bit faster, but less portable.
* squashfuse_ls Lists all the files in a squashfs archive. A demonstration
of using the squashfuse core in the absence of FUSE.
it is built but not installed.
NB squashfuse_extract. same behaviour, generated but not installed
regards
Eric
I have written code that extracts squashfs. When trying to extract some (rare) files, I get:
TODO: Implement inode.base.inode_type 9
TODO: Implement inode.base.inode_type 8
According to squashfs_fs.h,
#define SQUASHFS_LDIR_TYPE 8
#define SQUASHFS_LREG_TYPE 9
Whatever that means.
What are ldir, lreg? Something to do with sparse and xattr?
There is a Debian package called libsquashfuse0 which carries this patch around:
which was used by the appimage team to allow static linking against squashfuse_ll.a instead of calling an executable.
The changes come down to renaming main
to fuse_main
and changing the executable into a library. Would it be a good idea to split the current ll.c into two source files so that we can have both squashfuse_ll and squashfuse_ll.{a,.so}?
If would be nice if there was a tool to extract rather than list the files in a squashfs file, similar to squashfuse_ls
.
https://github.com/xiehuc/squashfuse-mount
i made a simple macos app wrap with Platypus . it can associate .sfs extension and automatic mount by double click.
i think it is useful, please add a link in your readme, to let more people use squashfuse format .
Line 146 of ll_main.c
currently uses the single-threaded fuse_session_loop()
.
libfuse3 seems to have a multi-threaded version fuse_session_loop_mt()
, and there is a "FIXME: multithreading" comment on line 145.
Is there anything blocking use of the multi-threaded loop? I ask because we are using SquashFUSE as a library and it would be simple to just call fuse_session_loop_mt()
instead. I hesitate to do this though because I'm guessing there's a good reason SquashFUSE doesn't.
Or have I misunderstood something?
Thanks for your hard work on SquashFUSE. It's very valuable to us.
There's no download for a release tarball https://github.com/vasi/squashfuse/releases/download/0.1.105/squashfuse-0.1.105.tar.gz
The man page does not list all the options, and there's no squashfuse_ll man page.
I have squashfs files which were created from an overlay upperdir. So inodes have xattrs like trusted.overlay.origin.
When I mount them using 'sudo mount -t squashfs x.squashfs /dest', then listxattr(2) will return 'trusted.overlay.origin'. But when I use squashfuse, even as root, then listxattr(2) will return 'security.overlay.origin'. I can't find where in the squashfuse source or kernel's fs/fuse/ or fs/xattr.c this would be happening. Most importantly - is it by design? Is there a way to change the behavior? I'd prefer they (trusted.* xattrs) show up as user.* or just not show up at all.
Can we get a new tagged release? It's been roughly 3 years and there have been ~50 new commits since. Package managers like to use a tagged release.
The configuration tool complains about missing FUSE while there is evidence in the logs that it was already found above. Notice that I'm trying to use a fuse build installed in a non standard location.
PKG_CONFIG_PATH=../../../deps-prefix/lib/pkgconfig ../squashfuse/configure
....
checking for pkgconfig_fuse... yes
checking for FUSE library... no
configure: error: in `/home/alexis/Workspace/AppImage/appimage-runtime/cmake-build-debug/squashfuse-prefix/src/squashfuse-build':
configure: error: Can't find FUSE with pkgconfig
Hi,
first of all, thanks for your software!
It would be great if squashfuse would have a mode to mount a directory and check whether the magic bytes of any file mark it as a squashfs image - and then transparently decompressing it. Otherwise it would pass through all I/O to the underlying file system.
I know that there are other solutions to mount archive files etc., but as far as I can see they are a) all out of date and b) none of them supports squashfs images.
Cheers!
I've documented some performance issues with squashfuse
here: https://github.com/haampie/squashfs-mount/. I'm observing about a 1.5x increase in compile time of LLVM when mounting compilers from a squashfs file using squashfuse compared to just using (lib)mount.
Is this overhead expected?
configure does not exist. autogen.sh fails printing "Missing autoconf". This is on OSX 10.9.4
It's been a long time since there has been any action on the pull requests in this repository. Is there anything I can do to help? I volunteer to be a co-maintainer, or to take primary responsibility for it, if that helps. It is a vital part of Apptainer now, a project supported by the Linux Foundation. We would be happy to give squashfuse a home under https://github.com/apptainer if @vasi is willing to transfer it.
Hi,
Is there a recommended way to know if the mount is ready once squashfuse starts?
In an application, I'm fork()
ing out to squashfuse (with the -f
option) then trying to use calls like statfs
/getmntent
in a polling loop to check if the mount point is ready to use, so that I don't race ahead and find an empty mountpoint.
Should I skip forking out to squashfuse and just call functions like sqfs_ll_mount
directly?
Thanks
Matthew
hey @vasi ! i'm building on ubuntu, and it looks like pkg-config is not optional (but required) at least per the building steps you outlined for ubuntu:
+ autoconf
configure.ac:39: error: possibly undefined macro: AC_MSG_FAILURE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
So the slight tweak to the install looks like this for me:
apt-get update && apt-get install -y fuse libfuse2 git \
autoconf libtool make gcc pkg-config \
libtool libfuse-dev liblzma-dev
git clone https://github.com/vasi/squashfuse
cd squashfuse
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --with-xz=/usr/lib/
make
Going to be trying it out soon! A random question for you - do you know any tricks to be able to host a squashfs on a server somewhere (FTP?) and the mount it from there? I want to be able to have (pretty large squased) datasets that containers can mount and am testing different ideas.
Pestering for a new minor release now that #59 has been merged. We'd like to use said release in our RPM packaging. Hope all is well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.