From 7c37e25aa161643d48b1a35059972e5e0feb9bf6 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Sat, 2 Jul 2011 14:34:17 +0200 Subject: [PATCH] Use a script for filling the rpms_to_install symlinks automatically The actual version of core, gui, and xen packages to use are given in version_{core,gui,xen} files --- README | 7 +++++-- create_symlinks_in_rpms_to_install_dir.sh | 17 +++++++++++++++++ rpms_to_install | 1 - rpms_to_install/.gitignore | 1 + rpms_to_install_x64/qubes-core-appvm | 1 - rpms_to_install_x64/qubes-core-appvm-libs | 1 - rpms_to_install_x64/qubes-core-commonvm | 1 - rpms_to_install_x64/qubes-core-netvm | 1 - rpms_to_install_x64/qubes-core-proxyvm | 1 - rpms_to_install_x64/qubes-gui-vm | 1 - rpms_to_install_x64/xen-libs | 1 - rpms_to_install_x64/xen-licenses | 1 - rpms_to_install_x64/xen-qubes-vm-essentials | 1 - templates.spec | 2 +- version_appvm => version | 0 version_core | 1 + version_gui | 1 + version_xen | 1 + 18 files changed, 27 insertions(+), 13 deletions(-) create mode 100755 create_symlinks_in_rpms_to_install_dir.sh delete mode 120000 rpms_to_install create mode 100644 rpms_to_install/.gitignore delete mode 120000 rpms_to_install_x64/qubes-core-appvm delete mode 120000 rpms_to_install_x64/qubes-core-appvm-libs delete mode 120000 rpms_to_install_x64/qubes-core-commonvm delete mode 120000 rpms_to_install_x64/qubes-core-netvm delete mode 120000 rpms_to_install_x64/qubes-core-proxyvm delete mode 120000 rpms_to_install_x64/qubes-gui-vm delete mode 120000 rpms_to_install_x64/xen-libs delete mode 120000 rpms_to_install_x64/xen-licenses delete mode 120000 rpms_to_install_x64/xen-qubes-vm-essentials rename version_appvm => version (100%) create mode 100644 version_core create mode 100644 version_gui create mode 100644 version_xen diff --git a/README b/README index 600aefe..69cb0fe 100644 --- a/README +++ b/README @@ -9,8 +9,11 @@ fedorize_image NOTE: The fedorize_image script can be also used to update an image -- it automatically assumes the update mode if the already exists. -2) Update symlinks in rpms_to_install_XXX/ so that they point to the current version -of Qubes-specific rpms to install you want to use (e.g. qubes-gui-vm, etc). +2) Update symlinks in rpms_to_install/ using the create_symlinks_in_rpms_to_install_dir.sh script. The script +reads the core, gui, and xen packages versions from version_{core,gui,xen} files and creates appropriate symlinks +in rpms_to_install/ dir. + +Verify that all symlinks are correct. 3) Now, you can "qubeize" the image. This must be done as root. E.g.: diff --git a/create_symlinks_in_rpms_to_install_dir.sh b/create_symlinks_in_rpms_to_install_dir.sh new file mode 100755 index 0000000..b683f6c --- /dev/null +++ b/create_symlinks_in_rpms_to_install_dir.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +rm -fr rpms_to_install/* +VERSION_CORE=$(cat version_core) +ln -s ../../core/rpm/x86_64/qubes-core-appvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-appvm +ln -s ../../core/rpm/x86_64/qubes-core-appvm-libs-$VERSION_CORE.rpm rpms_to_install/qubes-core-appvm-libs +ln -s ../../core/rpm/x86_64/qubes-core-commonvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-commonvm +ln -s ../../core/rpm/x86_64/qubes-core-netvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-netvm +ln -s ../../core/rpm/x86_64/qubes-core-proxyvm-$VERSION_CORE.rpm rpms_to_install/qubes-core-proxyvm + +VERSION_GUI=$(cat version_gui) +ln -s ../../gui/rpm/x86_64/qubes-gui-vm-$VERSION_GUI.rpm rpms_to_install/qubes-gui-vm + +VERSION_XEN=$(cat version_xen) +ln -s ../../xen/rpm/x86_64/xen-libs-$VERSION_XEN.rpm rpms_to_install/xen-libs +ln -s ../../xen/rpm/x86_64/xen-licenses-$VERSION_XEN.rpm rpms_to_install/xen-licenses +ln -s ../../xen/rpm/x86_64/xen-qubes-vm-essentials-$VERSION_XEN.rpm rpms_to_install/xen-qubes-vm-essentials diff --git a/rpms_to_install b/rpms_to_install deleted file mode 120000 index 785994a..0000000 --- a/rpms_to_install +++ /dev/null @@ -1 +0,0 @@ -rpms_to_install_x64 \ No newline at end of file diff --git a/rpms_to_install/.gitignore b/rpms_to_install/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/rpms_to_install/.gitignore @@ -0,0 +1 @@ +* diff --git a/rpms_to_install_x64/qubes-core-appvm b/rpms_to_install_x64/qubes-core-appvm deleted file mode 120000 index de5a0b5..0000000 --- a/rpms_to_install_x64/qubes-core-appvm +++ /dev/null @@ -1 +0,0 @@ -../../core/rpm/x86_64/qubes-core-appvm-1.6.4-1.fc14.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/qubes-core-appvm-libs b/rpms_to_install_x64/qubes-core-appvm-libs deleted file mode 120000 index dc85f9d..0000000 --- a/rpms_to_install_x64/qubes-core-appvm-libs +++ /dev/null @@ -1 +0,0 @@ -../../core/rpm/x86_64/qubes-core-appvm-libs-1.6.4-1.fc14.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/qubes-core-commonvm b/rpms_to_install_x64/qubes-core-commonvm deleted file mode 120000 index 8c32847..0000000 --- a/rpms_to_install_x64/qubes-core-commonvm +++ /dev/null @@ -1 +0,0 @@ -../../core/rpm/x86_64/qubes-core-commonvm-1.6.4-1.fc14.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/qubes-core-netvm b/rpms_to_install_x64/qubes-core-netvm deleted file mode 120000 index 6f61710..0000000 --- a/rpms_to_install_x64/qubes-core-netvm +++ /dev/null @@ -1 +0,0 @@ -../../core/rpm/x86_64/qubes-core-netvm-1.6.4-1.fc14.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/qubes-core-proxyvm b/rpms_to_install_x64/qubes-core-proxyvm deleted file mode 120000 index a5ea963..0000000 --- a/rpms_to_install_x64/qubes-core-proxyvm +++ /dev/null @@ -1 +0,0 @@ -../../core/rpm/x86_64/qubes-core-proxyvm-1.6.4-1.fc14.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/qubes-gui-vm b/rpms_to_install_x64/qubes-gui-vm deleted file mode 120000 index dba5dea..0000000 --- a/rpms_to_install_x64/qubes-gui-vm +++ /dev/null @@ -1 +0,0 @@ -../../gui/rpm/x86_64/qubes-gui-vm-1.3.1-2.fc14.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/xen-libs b/rpms_to_install_x64/xen-libs deleted file mode 120000 index d245b09..0000000 --- a/rpms_to_install_x64/xen-libs +++ /dev/null @@ -1 +0,0 @@ -../../xen/rpm//x86_64/xen-libs-4.1.0-4.qubes.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/xen-licenses b/rpms_to_install_x64/xen-licenses deleted file mode 120000 index ac9ad1f..0000000 --- a/rpms_to_install_x64/xen-licenses +++ /dev/null @@ -1 +0,0 @@ -../../xen/rpm//x86_64/xen-licenses-4.1.0-4.qubes.x86_64.rpm \ No newline at end of file diff --git a/rpms_to_install_x64/xen-qubes-vm-essentials b/rpms_to_install_x64/xen-qubes-vm-essentials deleted file mode 120000 index a2cc188..0000000 --- a/rpms_to_install_x64/xen-qubes-vm-essentials +++ /dev/null @@ -1 +0,0 @@ -../../xen/rpm/x86_64/xen-qubes-vm-essentials-4.1.0-4.qubes.x86_64.rpm \ No newline at end of file diff --git a/templates.spec b/templates.spec index 39bb213..6255eb6 100644 --- a/templates.spec +++ b/templates.spec @@ -3,7 +3,7 @@ # This includes the VM's root image, patched with all qubes rpms, etc # -%{!?version: %define version %(cat version_appvm)} +%{!?version: %define version %(cat version)} Name: qubes-template-%{template_name} Version: %{version} diff --git a/version_appvm b/version similarity index 100% rename from version_appvm rename to version diff --git a/version_core b/version_core new file mode 100644 index 0000000..de3c306 --- /dev/null +++ b/version_core @@ -0,0 +1 @@ +1.6.6-1.fc14.x86_64 diff --git a/version_gui b/version_gui new file mode 100644 index 0000000..5df105d --- /dev/null +++ b/version_gui @@ -0,0 +1 @@ +1.3.1-2.fc14.x86_64 diff --git a/version_xen b/version_xen new file mode 100644 index 0000000..78da0f9 --- /dev/null +++ b/version_xen @@ -0,0 +1 @@ +4.1.0-4.qubes.x86_64