Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(24.04): add squashfs-tools #347

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions slices/liblzo2-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package: liblzo2-2

essential:
- liblzo2-2_copyright

slices:
libs:
essential:
- libc6_libs
contents:
/lib/*-linux-*/liblzo2.so.2*:

copyright:
contents:
/usr/share/doc/liblzo2-2/copyright:
30 changes: 30 additions & 0 deletions slices/squashfs-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package: squashfs-tools

essential:
- squashfs-tools_copyright

slices:
bins:
# adding libgcc-s1 as mksquashfs crashes without
# In practice, libc6 should bring it anyway, BUT, there is a circular
# dependency in the archives, where libc6 depends on libgcc-s1 and
# vice versa. We don't allow that circular dependency to exist in Chisel
# and libgcc-s1 already depends on libc6, so we'll have to include this
# line here, explicitly.
essential:
- libc6_libs
- libgcc-s1_libs
cjdcordeiro marked this conversation as resolved.
Show resolved Hide resolved
- liblz4-1_libs
- liblzma5_libs
- liblzo2-2_libs
- libzstd1_libs
- zlib1g_libs
contents:
/usr/bin/mksquashfs:
/usr/bin/sqfscat:
/usr/bin/sqfstar:
cjdcordeiro marked this conversation as resolved.
Show resolved Hide resolved
/usr/bin/unsquashfs:

copyright:
contents:
/usr/share/doc/squashfs-tools/copyright:
28 changes: 28 additions & 0 deletions tests/spread/integration/squashfs-tools/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
summary: Integration tests for squashfs-tools

execute: |
rootfs="$(install-slices squashfs-tools_bins)"

# create a test folder to squash
mkdir -p "${rootfs}/test/dir1"
mkdir -p "${rootfs}/test/dir2"

echo "test file with some content" > "${rootfs}/test/dir1/text"
echo "second test file with some content" > "${rootfs}/test/dir2/second"

# squash it
chroot "${rootfs}" mksquashfs /test test.sq

# test sqfscat
chroot "${rootfs}" sqfscat test.sq dir1/text | grep "test file"

# unsquash it again
chroot "${rootfs}" unsquashfs test.sq

# compare files inside
cmp "${rootfs}/test/dir1/text" "${rootfs}/squashfs-root/dir1/text"
cmp "${rootfs}/test/dir2/second" "${rootfs}/squashfs-root/dir2/second"

# test sqfstar
tar -cvf test.tar "${rootfs}"/test
chroot "${rootfs}" sqfstar test2.squashfs < test.tar
Loading