From ce319754e26b23ec11423f27366ebaa4a3330bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 30 Jan 2015 15:35:00 +0100 Subject: [PATCH] Preliminary support for building in DispVM --- Makefile | 4 ++++ create_apps_templates.sh | 2 +- scripts_fedora/01_install_core.sh | 14 +++++++++----- templates.spec | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f9f3e50..7bd1f3d 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,10 @@ rpms: ./build_template_rpm $(TEMPLATE_NAME) || exit 1; \ ./create_template_list.sh || : \ +rootimg-build: + sudo -E ./prepare_image prepared_images/$(TEMPLATE_NAME).img && \ + sudo -E ./qubeize_image prepared_images/$(TEMPLATE_NAME).img $(TEMPLATE_NAME) + update-repo-installer: [ -z "$$UPDATE_REPO" ] && UPDATE_REPO=../installer/yum/qubes-dom0;\ ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp_$(DIST))*.noarch.rpm $$UPDATE_REPO/rpm diff --git a/create_apps_templates.sh b/create_apps_templates.sh index c669c57..fccbaa3 100755 --- a/create_apps_templates.sh +++ b/create_apps_templates.sh @@ -9,4 +9,4 @@ fi rm -f $APPSTMPL/* mkdir -p $APPSTMPL -find $APPSORIG -name "*.desktop" -exec ./convert_app2template.sh {} $APPSTMPL \; +find $APPSORIG/ -name "*.desktop" -exec ./convert_app2template.sh {} $APPSTMPL \; diff --git a/scripts_fedora/01_install_core.sh b/scripts_fedora/01_install_core.sh index fb00e71..63e8a46 100755 --- a/scripts_fedora/01_install_core.sh +++ b/scripts_fedora/01_install_core.sh @@ -1,11 +1,15 @@ #!/bin/sh -echo "-> Initializing RPM database..." -rpm --initdb --root=$INSTALLDIR -rpm --import --root=$INSTALLDIR $SCRIPTSDIR/keys/* +if ! [ -f "${INSTALLDIR}/tmp/.prepared_base" ]; then + echo "-> Initializing RPM database..." + rpm --initdb --root=$INSTALLDIR + rpm --import --root=$INSTALLDIR $SCRIPTSDIR/keys/* -echo "-> Installing core RPM packages..." -rpm -i --root=$INSTALLDIR $SCRIPTSDIR/base_rpms/*.rpm || exit 1 + echo "-> Installing core RPM packages..." + rpm -i --root=$INSTALLDIR $SCRIPTSDIR/base_rpms/*.rpm || exit 1 + + touch "${INSTALLDIR}/tmp/.prepared_base" +fi cp $SCRIPTSDIR/resolv.conf $INSTALLDIR/etc cp $SCRIPTSDIR/network $INSTALLDIR/etc/sysconfig diff --git a/templates.spec b/templates.spec index 7c69d16..32a5c4c 100644 --- a/templates.spec +++ b/templates.spec @@ -35,7 +35,7 @@ Qubes template for %{template_name} %build cd qubeized_images rm -f root.img.part.* -tar --sparse -cf - %{template_name}-root.img | split -d -b 1G - root.img.part. +tar --sparse --dereference -cf - %{template_name}-root.img | split -d -b 1G - root.img.part. cd ..