From 38d0be38240dd2a5a8ba721e21d29cc19ec20f0e Mon Sep 17 00:00:00 2001 From: Shile Zhang Date: Wed, 4 Dec 2019 09:27:07 +0800 Subject: [PATCH] make: use `cd` instead of '--directory' option of `cpio` Due to the option '--directory' just added from 'cpio' v2.12, so the osbuilder will failed with old version 'cpio' before v2.12, such as in Centos 7 with v2.11. Fix it by replacing this option with '(cd ...; cat ...)'. Fixes: #384 Signed-off-by: Shile Zhang --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d9bdda032e..15e57b9b77 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ $(ROOTFS_BUILD_DEST)/.%$(ROOTFS_MARKER_SUFFIX):: rootfs-builder/% .PRECIOUS: $(ROOTFS_BUILD_DEST)/.dracut$(ROOTFS_MARKER_SUFFIX) $(ROOTFS_BUILD_DEST)/.dracut$(ROOTFS_MARKER_SUFFIX): $(TARGET_INITRD) mkdir -p $(TARGET_ROOTFS) - cat $< | cpio --extract --preserve-modification-time --make-directories --directory=$(TARGET_ROOTFS) + (cd $(TARGET_ROOTFS); cat $< | cpio --extract --preserve-modification-time --make-directories) @touch $@ image-%: $(IMAGES_BUILD_DEST)/kata-containers-image-%.img