Skip to content

Commit

Permalink
[feature] Add SquashFS support
Browse files Browse the repository at this point in the history
Alleviates #109
  • Loading branch information
mxmlnkn committed Sep 9, 2024
1 parent bfcf2a3 commit 384a9fe
Show file tree
Hide file tree
Showing 12 changed files with 737 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install pip Dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --user fusepy pytest
python3 -m pip install --user fusepy pytest lz4 PySquashfsImage
- name: Style Check With Black
run: |
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
# zstd, may also call external binaries depending on how libarchive was compiled!
# https://github.com/libarchive/libarchive/blob/ad5a0b542c027883d7069f6844045e6788c7d70c/libarchive/
# archive_read_support_filter_lrzip.c#L68
sudo apt-get -y install libfuse2 fuse3 bzip2 pbzip2 pixz zstd unar lrzip lzop
sudo apt-get -y install libfuse2 fuse3 bzip2 pbzip2 pixz zstd unar lrzip lzop gcc liblzo2-dev
set -x
- name: Install Dependencies (MacOS)
Expand All @@ -130,7 +130,7 @@ jobs:
# And the error message is atrocious:
# cmdline.extend(args)
# TypeError: 'NoneType' object is not iterable
brew install macfuse coreutils pixz pbzip2 zstd unar libarchive lrzip lzop
brew install macfuse coreutils pixz pbzip2 zstd unar libarchive lrzip lzop lzo
# Add brew installation binary folder to PATH so that command line tools like zstd can be found
export PATH="$PATH:/usr/local/bin"
Expand Down
7 changes: 5 additions & 2 deletions AppImage/build-ratarmount-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function installSystemRequirements()
# We need to install development dependencies to build Python packages from source and we also need
# to install libraries such as libarchive in order to copy them into the AppImage.
yum install -y fuse fakeroot patchelf fuse-libs libsqlite3x strace desktop-file-utils libzstd-devel \
libarchive libarchive-devel lzop
libarchive libarchive-devel lzop lzo lzo-devel
}

function installAppImageTools()
Expand Down Expand Up @@ -61,7 +61,7 @@ function installAppImagePythonPackages()
"$APP_PYTHON_BIN" -I -m pip install --no-cache-dir rapidgzip
fi
"$APP_PYTHON_BIN" -I -m pip install --no-cache-dir ../core
"$APP_PYTHON_BIN" -I -m pip install --no-cache-dir ..
"$APP_PYTHON_BIN" -I -m pip install --no-cache-dir ..[full]
}

function installAppImageSystemLibraries()
Expand Down Expand Up @@ -96,16 +96,19 @@ function installAppImageSystemLibraries()
libraries+=( $( repoquery -l fuse-libs | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( repoquery -l libarchive | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( repoquery -l libarchive-devel | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( repoquery -l lzo | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( repoquery -l xz-devel | 'grep' 'lib64.*[.]so' ) )
elif commandExists dnf; then
libraries+=( $( dnf repoquery -l fuse-libs | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( dnf repoquery -l libarchive | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( dnf repoquery -l libarchive-devel | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( dnf repoquery -l lzo | 'grep' 'lib64.*[.]so' ) )
libraries+=( $( dnf repoquery -l xz-devel | 'grep' 'lib64.*[.]so' ) )
elif commandExists dpkg; then
libraries+=( $( dpkg -L libfuse2 | 'grep' '/lib.*[.]so' ) )
libraries+=( $( dpkg -L libarchive13 | 'grep' '/lib.*[.]so' ) )
libraries+=( $( dpkg -L libarchive-dev | 'grep' '/lib.*[.]so' ) )
libraries+=( $( dpkg -L lzo | 'grep' '/lib.*[.]so' ) )
libraries+=( $( dpkg -L liblzma5 | 'grep' '/lib.*[.]so' ) )
else
echo -e "\e[31mCannot gather FUSE libs into AppImage without (dnf) repoquery.\e[0m"
Expand Down
10 changes: 10 additions & 0 deletions core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,20 @@ full = [
"python-xz ~= 0.4.0",
"rapidgzip >= 0.13.1",
"rarfile ~= 4.0",
"PySquashfsImage == 0.9.0",
"lz4 ~= 4.0.0",
"python-lzo ~= 1.0",
"zstandard ~= 0.22.0",
]
bzip2 = ["rapidgzip >= 0.13.1"]
gzip = ["indexed_gzip >= 1.6.3, < 2.0"]
rar = ["rarfile ~= 4.0"]
squashfs = [
"PySquashfsImage == 0.9.0",
"lz4 ~= 4.0.0",
"python-lzo ~= 1.0",
"zstandard ~= 0.22.0",
]
xz = ["python-xz ~= 0.4.0"]
zip = []
zstd = [
Expand Down
Loading

0 comments on commit 384a9fe

Please sign in to comment.