From fbc25100cc92f1d33df57d2bea97df6705873c24 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 3 Aug 2013 07:35:12 +0200 Subject: [PATCH] [molecules] move post_iso_script to amd64.common and x86.common This way isohybrid can be called without --uefi on x86 --- molecules/amd64.common | 3 +++ molecules/awesome.common | 3 --- molecules/e17.common | 3 --- molecules/forensicxfce.common | 3 --- molecules/gaming.common | 3 --- molecules/gnome.common | 3 --- molecules/kde.common | 3 --- molecules/lxde.common | 3 --- molecules/mate.common | 3 --- molecules/minimal.common | 3 --- molecules/spinbase.common | 3 --- molecules/x86.common | 5 ++++- molecules/xfce.common | 3 --- scripts/generic_post_iso_script.sh | 11 ++++++++++- 14 files changed, 17 insertions(+), 35 deletions(-) diff --git a/molecules/amd64.common b/molecules/amd64.common index 2c99222..91e5c67 100644 --- a/molecules/amd64.common +++ b/molecules/amd64.common @@ -1,2 +1,5 @@ # Extra mkisofs parameters, enable EFI support extra_mkisofs_parameters: -b isolinux/isolinux.bin -c isolinux/boot.cat -eltorito-alt-boot -no-emul-boot -eltorito-platform efi -eltorito-boot boot/grub/efi.img + +# Post-ISO building script, called after ISO image generation. +%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh amd64 diff --git a/molecules/awesome.common b/molecules/awesome.common index 59df556..db1c34a 100644 --- a/molecules/awesome.common +++ b/molecules/awesome.common @@ -35,9 +35,6 @@ iso_title: Sabayon Awesome # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh Awesome -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/e17.common b/molecules/e17.common index f4bd664..2307481 100644 --- a/molecules/e17.common +++ b/molecules/e17.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh E17 -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/forensicxfce.common b/molecules/forensicxfce.common index 67a7a5f..5ede8b5 100644 --- a/molecules/forensicxfce.common +++ b/molecules/forensicxfce.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/xfceforensic_pre_iso_script.sh -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/gaming.common b/molecules/gaming.common index a39b0ef..4e1fd4b 100644 --- a/molecules/gaming.common +++ b/molecules/gaming.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh "Gaming Edition" -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/gnome.common b/molecules/gnome.common index 6b8aec5..7b250c9 100644 --- a/molecules/gnome.common +++ b/molecules/gnome.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh GNOME -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/kde.common b/molecules/kde.common index 8bd4a53..060a3f8 100644 --- a/molecules/kde.common +++ b/molecules/kde.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh KDE -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/lxde.common b/molecules/lxde.common index d80ec8a..e9f21a9 100644 --- a/molecules/lxde.common +++ b/molecules/lxde.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh LXDE -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/mate.common b/molecules/mate.common index 25befe6..cafa91a 100644 --- a/molecules/mate.common +++ b/molecules/mate.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh MATE -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/minimal.common b/molecules/minimal.common index dea86cc..5f2f2ac 100644 --- a/molecules/minimal.common +++ b/molecules/minimal.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh Minimal -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/spinbase.common b/molecules/spinbase.common index 36230fa..f7c0cef 100644 --- a/molecules/spinbase.common +++ b/molecules/spinbase.common @@ -32,9 +32,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/spinbase_pre_iso_script.sh -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/molecules/x86.common b/molecules/x86.common index 6463ae5..c88c90c 100644 --- a/molecules/x86.common +++ b/molecules/x86.common @@ -1,2 +1,5 @@ -# Extra mkisofs parameters, enable EFI support +# Extra mkisofs parameters, disable EFI support extra_mkisofs_parameters: -b isolinux/isolinux.bin -c isolinux/boot.cat + +# Post-ISO building script, called after ISO image generation. +%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh x86 diff --git a/molecules/xfce.common b/molecules/xfce.common index 7432fb8..ff48591 100644 --- a/molecules/xfce.common +++ b/molecules/xfce.common @@ -35,9 +35,6 @@ extra_mksquashfs_parameters: -comp xz -Xbcj x86 # Pre-ISO building script. Hook to be able to copy kernel images in place, for example %env pre_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_pre_iso_script.sh Xfce -# Post-ISO building script, called after ISO image generation. -%env post_iso_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/generic_post_iso_script.sh - # Destination directory for the ISO image path (MANDATORY) %env destination_iso_directory: ${SABAYON_MOLECULE_HOME:-/sabayon}/iso diff --git a/scripts/generic_post_iso_script.sh b/scripts/generic_post_iso_script.sh index 6b83e90..47cff7f 100755 --- a/scripts/generic_post_iso_script.sh +++ b/scripts/generic_post_iso_script.sh @@ -11,13 +11,22 @@ /usr/sbin/env-update . /etc/profile +ISO_ARCH="${1}" +shift + echo echo "Spawning isohybrid for:" echo "ISO_PATH = ${ISO_PATH}" echo "ISO_CHECKSUM_PATH = ${ISO_CHECKSUM_PATH}" +echo "ISO_ARCH = ${ISO_ARCH}" echo -isohybrid --uefi "${ISO_PATH}" || exit 1 +ih_args="" +if [ "${ISO_ARCH}" = "amd64" ]; then + ih_args+=" --uefi" +fi +isohybrid ${ih_args} "${ISO_PATH}" || exit 1 + cd "$(dirname "${ISO_PATH}")" || exit 1 iso_name=$(basename "${ISO_PATH}") md5sum "${iso_name}" > "${ISO_CHECKSUM_PATH}"