git: fc45d5b3cbcb - main - filesystems/sasquatch: New port: SquashFS extractor with patches for firmware analysis

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Fri, 29 Aug 2025 20:12:51 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fc45d5b3cbcbf6db47c50d157c4ceb835fff02c0

commit fc45d5b3cbcbf6db47c50d157c4ceb835fff02c0
Author:     gatekeeper <tiago.gasiba@gmail.com>
AuthorDate: 2025-08-29 20:10:03 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-08-29 20:10:03 +0000

    filesystems/sasquatch: New port: SquashFS extractor with patches for firmware analysis
    
    The sasquatch project is a set of patches to the standard unsquashfs
    utility (part of squashfs-tools) that attempts to add support for as
    many hacked-up vendor-specific SquashFS implementations as possible.
    
    It can be used in conjunction with binwalk to extract firmware images
    where unsquashfs would fail.
    
    https://gitlab.com/tgasiba/sasquatch/
    
    Original project under: https://github.com/devttys0/sasquatch/
    
    PR:     288914
---
 filesystems/Makefile            |  1 +
 filesystems/sasquatch/Makefile  | 35 +++++++++++++++++++++++++++++++++++
 filesystems/sasquatch/distinfo  |  3 +++
 filesystems/sasquatch/pkg-descr | 16 ++++++++++++++++
 4 files changed, 55 insertions(+)

diff --git a/filesystems/Makefile b/filesystems/Makefile
index 18d57a3d5f91..4f7065513f9a 100644
--- a/filesystems/Makefile
+++ b/filesystems/Makefile
@@ -110,6 +110,7 @@
     SUBDIR += s3backer
     SUBDIR += s3fs
     SUBDIR += sandboxfs
+    SUBDIR += sasquatch
     SUBDIR += scan_ffs
     SUBDIR += securefs
     SUBDIR += simple-mtpfs
diff --git a/filesystems/sasquatch/Makefile b/filesystems/sasquatch/Makefile
new file mode 100644
index 000000000000..71946e990520
--- /dev/null
+++ b/filesystems/sasquatch/Makefile
@@ -0,0 +1,35 @@
+PORTNAME=	sasquatch
+DISTVERSION=	4.3
+CATEGORIES=	filesystems sysutils
+
+MAINTAINER=	tiago.gasiba@gmail.com
+COMMENT=	SquashFS extractor with patches for firmware analysis
+WWW=		https://gitlab.com/tgasiba/sasquatch/
+
+LICENSE=		CPL GPLv2 LGPL21 PUBLIC
+LICENSE_COMB=		multi
+LICENSE_NAME_CPL=	Common Public License V. 1.0
+LICENSE_NAME_PUBLIC=	Public Domain
+LICENSE_FILE_CPL=	${WRKSRC}/LZMA/lzmadaptive/CPL.html
+LICENSE_FILE_GPLv2=	${WRKSRC}/LICENSE
+LICENSE_FILE_LGPL21=	${WRKSRC}/LZMA/lzmadaptive/LGPL.txt
+LICENSE_FILE_PUBLIC=	${WRKSRC}/LZMA/lzma465/lzma.txt
+LICENSE_PERMS_CPL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+LICENSE_PERMS_PUBLIC=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+LIB_DEPENDS=	liblz4.so:archivers/liblz4 \
+		liblzo2.so:archivers/lzo2
+
+USES=		compiler:c++11-lang
+USE_GITLAB=	yes
+GL_ACCOUNT=	tgasiba
+
+MAKE_ENV=	CC="${CC}" \
+		CXX="${CXX}"
+
+PLIST_FILES=	bin/${PORTNAME}
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/filesystems/sasquatch/distinfo b/filesystems/sasquatch/distinfo
new file mode 100644
index 000000000000..fc694081ebee
--- /dev/null
+++ b/filesystems/sasquatch/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1755444495
+SHA256 (sasquatch-4.3.tar.bz2) = 3fa1f0f5be2d9be66e0f4f87f5690e4c770f87718c7861ae59943fe9eb0c585d
+SIZE (sasquatch-4.3.tar.bz2) = 271643
diff --git a/filesystems/sasquatch/pkg-descr b/filesystems/sasquatch/pkg-descr
new file mode 100644
index 000000000000..310014639119
--- /dev/null
+++ b/filesystems/sasquatch/pkg-descr
@@ -0,0 +1,16 @@
+The sasquatch project is a set of patches to the standard unsquashfs utility
+(part of squashfs-tools) that attempts to add support for as many hacked-up
+vendor-specific SquashFS implementations as possible.
+
+It can be used in conjunction with binwalk to extract firmware images where
+unsquashfs would fail, e.g.
+
+  If the vendor has done something simple like just muck a bit with the header
+  fields, sasquatch should sort it out.
+
+  If the vendor has made changes to the underlying LZMA compression options,
+  or to how these options are stored in the compressed data blocks, sasquatch
+  will attempt to automatically resolve such customizations via a brute-force
+  method.
+
+Original project under: https://github.com/devttys0/sasquatch