From 7987c16828cb2a54ce0062f88b08029df82e8505 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Thu, 23 Jun 2011 23:31:12 +0200 Subject: [PATCH] Do not include xen config files in template package There are autogenerated at VM start by Qubes core scripts. --- templates.spec | 15 --------------- vm_conf_files/appvm-template.conf | 22 ---------------------- vm_conf_files/netvm-template.conf | 24 ------------------------ vm_conf_files/standalone-template.conf | 22 ---------------------- vm_conf_files/templatevm.conf | 22 ---------------------- 5 files changed, 105 deletions(-) delete mode 100644 vm_conf_files/appvm-template.conf delete mode 100644 vm_conf_files/netvm-template.conf delete mode 100644 vm_conf_files/standalone-template.conf delete mode 100644 vm_conf_files/templatevm.conf diff --git a/templates.spec b/templates.spec index 2fd2ad9..d24ec48 100644 --- a/templates.spec +++ b/templates.spec @@ -42,13 +42,6 @@ touch $RPM_BUILD_ROOT/%{dest_dir}/private.img # we will create the real file in cp clean_images/clean-volatile.img.tar $RPM_BUILD_ROOT/%{dest_dir}/clean-volatile.img.tar -cp vm_conf_files/appvm-template.conf $RPM_BUILD_ROOT/%{dest_dir}/appvm-template.conf -cp vm_conf_files/standalone-template.conf $RPM_BUILD_ROOT/%{dest_dir}/standalone-template.conf -cp vm_conf_files/netvm-template.conf $RPM_BUILD_ROOT/%{dest_dir}/netvm-template.conf -cp vm_conf_files/templatevm.conf $RPM_BUILD_ROOT/%{dest_dir}/templatevm.conf -sed -e s/%TEMPLATENAME%/%{template_name}/g < vm_conf_files/templatevm.conf >\ - $RPM_BUILD_ROOT/%{dest_dir}/%{template_name}.conf - cp vm_conf_files/dispvm-prerun.sh $RPM_BUILD_ROOT/%{dest_dir}/ mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/kernels @@ -110,9 +103,6 @@ if [ "$1" = 1 ] ; then qvm-add-template --rpm %{template_name} fi -echo "--> Recreating VM conf files..." -/usr/lib/qubes/reset_vm_configs.py %{template_name} - qvm-template-commit %{template_name} %preun @@ -145,11 +135,6 @@ rm -rf $RPM_BUILD_ROOT %{dest_dir}/clean-volatile.img.tar %ghost %{dest_dir}/volatile.img %ghost %{dest_dir}/private.img -%{dest_dir}/appvm-template.conf -%{dest_dir}/netvm-template.conf -%{dest_dir}/standalone-template.conf -%{dest_dir}/templatevm.conf -%{dest_dir}/%{template_name}.conf %{dest_dir}/dispvm-prerun.sh %dir %{dest_dir}/kernels %{dest_dir}/kernels/vmlinuz diff --git a/vm_conf_files/appvm-template.conf b/vm_conf_files/appvm-template.conf deleted file mode 100644 index 4301188..0000000 --- a/vm_conf_files/appvm-template.conf +++ /dev/null @@ -1,22 +0,0 @@ -# -# This is a Xen VM config file for AppVMs -# - -kernel="%TEMPLATEDIR%/kernels/vmlinuz" -ramdisk="%TEMPLATEDIR%/kernels/initramfs" -extra="ro nomodeset xencons=hvc rd_NO_PLYMOUTH 3" -root="/dev/mapper/dmroot" - -memory = %MEM% -name = "%VMNAME%" - -disk = [ 'snapshot:%TEMPLATEDIR%/root.img:%TEMPLATEDIR%/root-cow.img,xvda,r', - 'file:%VMDIR%/private.img,xvdb,w', - 'file:%VMDIR%/volatile.img,xvdc,w', - ] - -vcpus = %VCPUS% - -on_poweroff = 'destroy' -on_reboot = 'destroy' -on_crash = 'destroy' diff --git a/vm_conf_files/netvm-template.conf b/vm_conf_files/netvm-template.conf deleted file mode 100644 index 59a726f..0000000 --- a/vm_conf_files/netvm-template.conf +++ /dev/null @@ -1,24 +0,0 @@ -# -# This is a Xen VM config file for AppVMs -# - -kernel="%TEMPLATEDIR%/kernels/vmlinuz" -ramdisk="%TEMPLATEDIR%/kernels/initramfs" -extra="ro nomodeset xencons=hvc swiotlb=force pci=nomsi rd_NO_PLYMOUTH 3" -root="/dev/mapper/dmroot" - -memory = %MEM% -name = "%VMNAME%" - -pci = [ %PCIDEVS% ] - -disk = [ 'snapshot:%TEMPLATEDIR%/root.img:%TEMPLATEDIR%/root-cow.img,xvda,r', - 'file:%VMDIR%/private.img,xvdb,w', - 'file:%VMDIR%/volatile.img,xvdc,w', - ] - -vcpus = %VCPUS% - -on_poweroff = 'destroy' -on_reboot = 'destroy' -on_crash = 'destroy' diff --git a/vm_conf_files/standalone-template.conf b/vm_conf_files/standalone-template.conf deleted file mode 100644 index 61834bd..0000000 --- a/vm_conf_files/standalone-template.conf +++ /dev/null @@ -1,22 +0,0 @@ -# -# This is a Xen VM config file for AppVMs -# - -kernel="%VMDIR%/kernels/vmlinuz" -ramdisk="%VMDIR%/kernels/initramfs" -extra="ro nomodeset xencons=hvc rd_NO_PLYMOUTH 3" -root="/dev/mapper/dmroot" - -memory = %MEM% -name = "%VMNAME%" - -disk = [ 'file:%VMDIR%/root.img,xvda,w', - 'file:%VMDIR%/private.img,xvdb,w', - 'file:%VMDIR%/volatile.img,xvdc,w' - ] - -vcpus = %VCPUS% - -on_poweroff = 'destroy' -on_reboot = 'destroy' -on_crash = 'destroy' diff --git a/vm_conf_files/templatevm.conf b/vm_conf_files/templatevm.conf deleted file mode 100644 index f4ae0e4..0000000 --- a/vm_conf_files/templatevm.conf +++ /dev/null @@ -1,22 +0,0 @@ -# -# This is a Xen VM config file for the Template VM -# - -kernel="/var/lib/qubes/vm-templates/%TEMPLATENAME%/kernels/vmlinuz" -ramdisk="/var/lib/qubes/vm-templates/%TEMPLATENAME%/kernels/initramfs" -extra="ro nomodeset xencons=hvc rd_NO_PLYMOUTH 3" -root="/dev/mapper/dmroot" - -memory = 400 -name = "%TEMPLATENAME%" - -disk = [ 'origin:/var/lib/qubes/vm-templates/%TEMPLATENAME%/root.img:/var/lib/qubes/vm-templates/%TEMPLATENAME%/root-cow.img,xvda,w', - 'file:/var/lib/qubes/vm-templates/%TEMPLATENAME%/private.img,xvdb,w', - 'file:/var/lib/qubes/vm-templates/%TEMPLATENAME%/volatile.img,xvdc,w', - ] - -vcpus = 1 - -on_poweroff = 'destroy' -on_reboot = 'destroy' -on_crash = 'destroy'