From ac856cca70351e26436930c9a948343ae5d3921c Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 19 Feb 2013 22:33:03 +0100 Subject: [PATCH] iso build: keep intermediate files in "work" dir and clean it up Also take care to set right owner of result files. Commend about method: pungi have --destdir option, but apparently it break whole build process. So change directory just before build --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 91cd945..5545026 100644 --- a/Makefile +++ b/Makefile @@ -136,15 +136,18 @@ update-repo-unstable: iso: ln -sf `pwd` /tmp/qubes-installer - pungi --name=Qubes $(PUNGI_OPTS) -c $(PWD)/conf/qubes-kickstart.cfg - ./rpm_verify $(ISO_VERSION)/x86_64/os/Packages/*/*.rpm + mkdir -p work + pushd work; pungi --name=Qubes $(PUNGI_OPTS) -c $(PWD)/conf/qubes-kickstart.cfg; popd + ./rpm_verify work/$(ISO_VERSION)/x86_64/os/Packages/*/*.rpm # Currently netinstall not supported - rm $(ISO_VERSION)/x86_64/iso/*-netinst.iso + rm work/$(ISO_VERSION)/x86_64/iso/*-netinst.iso # Move result files to known-named directories mkdir -p build/ISO/qubes-x86_64/iso build/work - mv $(ISO_VERSION)/x86_64/iso/*-DVD.iso build/ISO/qubes-x86_64/iso/ + mv work/$(ISO_VERSION)/x86_64/iso/*-DVD.iso build/ISO/qubes-x86_64/iso/ rm -rf build/work/$(ISO_VERSION) - mv $(ISO_VERSION)/x86_64/os build/work/$(ISO_VERSION) + mv work/$(ISO_VERSION)/x86_64/os build/work/$(ISO_VERSION) + chown --reference=Makefile -R build + rm -rf work clean-repos: @echo "--> Removing old rpms from the installer repos..."