From c1898ee996858a94bdaddc3b8a497784bc5d0cc5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Apr 2013 10:39:30 +0100 Subject: [PATCH] appliance: Fix rule for building supermin.d/init.img. Use a temporary directory instead of copy hack. --- appliance/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 88ca53e37..90df4214e 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -93,9 +93,11 @@ supermin.d/daemon.img: ../daemon/guestfsd guestfsd.suppressions mv $@-t $@ supermin.d/init.img: init - cmp -s $(srcdir)/init $(builddir)/init || cp $(srcdir)/init $(builddir)/init - rm -f $@ $@-t - echo "init" | cpio --quiet -o -H newc > $@-t + rm -rf init.tmp $@ $@-t + mkdir init.tmp + cp $< init.tmp + (cd init.tmp; echo "init" | cpio --quiet -o -H newc) > $@-t + rm -r init.tmp mv $@-t $@ # We should put this file in /lib/udev/rules.d, but put it in /etc so