Skip to content

Commit

Permalink
fix: mksquashfs copied incorrectly
Browse files Browse the repository at this point in the history
we copied the wrong mksquashfs file into the snapd snap.
  • Loading branch information
lucyllewy committed Oct 26, 2024
1 parent e9e5bd6 commit 5ca1b68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ RUN apt-get update -qq && \
# Fetch and compile squashfs-tools
RUN git clone https://github.com/plougher/squashfs-tools.git
RUN cd squashfs-tools && \
git checkout 4.5.1 && \
git checkout 4.6.1 && \
sed -Ei 's/#(XZ_SUPPORT.*)/\1/' squashfs-tools/Makefile && \
sed -Ei 's/#(LZO_SUPPORT.*)/\1/' squashfs-tools/Makefile && \
sed -Ei 's/#(LZ4_SUPPORT.*)/\1/' squashfs-tools/Makefile && \
sed -Ei 's/#(ZSTD_SUPPORT.*)/\1/' squashfs-tools/Makefile && \
sed -Ei 's|(INSTALL_PREFIX = ).*|\1 /usr|' squashfs-tools/Makefile && \
sed -Ei 's/\$\(INSTALL_DIR\)/$(DESTDIR)$(INSTALL_DIR)/g' squashfs-tools/Makefile && \
cd squashfs-tools && \
Expand All @@ -46,8 +47,8 @@ RUN snap download snapd
RUN unsquashfs -f -d /snap/snapd/current snapd_*.snap

# Replace mksquashfs and unsqusahfs with our own
RUN cp /usr/bin/mksquashfs /snap/snapd/current/usr/bin
RUN cp /usr/bin/unsquashfs /snap/snapd/current/usr/bin
RUN cp /usr/local/bin/mksquashfs /snap/snapd/current/usr/bin
RUN cp /usr/local/bin/unsquashfs /snap/snapd/current/usr/bin

# Repack snapd
RUN mksquashfs /snap/snapd/current /snapd.snap
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@ if grep -q securityfs /proc/filesystems; then
mount -o rw,nosuid,nodev,noexec,relatime securityfs -t securityfs /sys/kernel/security
fi
mount -t tmpfs tmpfs /run
mkdir -p /run/lock
mount -t tmpfs tmpfs /run/lock
exec /lib/systemd/systemd --system --system-unit docker-exec.service

0 comments on commit 5ca1b68

Please sign in to comment.