Skip to content

Commit 4e1bd4b

Browse files
committed
fix(image-factory): install GNU tar
The factory copies updater/*.sh and runs perform_update.sh, which unpacks the exported rootfs with tar --xattrs. Busybox tar does not know that option, so the unpack died on "tar: unrecognized option: xattrs". updater/Dockerfile has installed tar for exactly this reason since it was written, with the reason in a comment. The factory never did - two images running the same script, with dependencies that have to be declared twice. Both lists now point at each other. Without xattrs the unpacked rootfs would lose its file capabilities, so this is not a matter of taste: it is why the comment says GNU tar rather than tar. Signed-off-by: Simon Walz <contact@simonwalz.de>
1 parent cbce508 commit 4e1bd4b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎image-factory/Dockerfile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ ENV container=docker
88

99
ENTRYPOINT ["/create_image.sh"]
1010

11+
# tar: GNU tar, needed to restore xattrs when unpacking the exported rootfs.
12+
# Busybox tar has no xattr support and would silently drop file capabilities.
13+
# This factory runs updater/perform_update.sh, so it needs everything that
14+
# script needs - keep this list and updater/Dockerfile's in step.
1115
RUN apk add --no-cache \
1216
parted dosfstools btrfs-progs \
13-
gptfdisk qemu-img kpartx util-linux jq btrfs-progs bash
17+
gptfdisk qemu-img kpartx util-linux jq btrfs-progs bash tar
1418

1519
RUN apk add --no-cache \
1620
grub-efi grub-bios ovmf || true

‎updater/Dockerfile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ENTRYPOINT ["/usr/local/updater/updater.sh"]
1010

1111
# tar: GNU tar, needed to restore xattrs when unpacking the exported rootfs.
1212
# Busybox tar has no xattr support and would silently drop file capabilities.
13+
# image-factory/Dockerfile runs the same perform_update.sh - keep the two lists
14+
# in step.
1315
RUN apk add --no-cache jq btrfs-progs util-linux bash tar
1416

1517
# Install required packages

0 commit comments

Comments
 (0)