[molecules] add amd64+x86 hybrid ISO image example specs

This commit is contained in:
Fabio Erculiani 2012-01-27 22:53:33 +01:00
parent 72821c83d7
commit 9e623107d7
3 changed files with 228 additions and 0 deletions

View File

@ -0,0 +1,76 @@
# Define an alternative execution strategy, in this case, the value must be
# "iso_remaster"
execution_strategy: iso_remaster
# Release string
release_string: Sabayon Linux
# File to write release string
release_file: /etc/sabayon-edition
# ISO Image title
iso_title: Sabayon GNOME
# Outer chroot script command, to be executed outside destination chroot before
# before entering it (and before inner_chroot_script)
# outer_chroot_script:
# Execute repositories update here, in a more fault-tolerant flavor
# inner_chroot_script:
# Inner chroot script command, to be executed inside destination chroot after
# packages installation and removal
# inner_chroot_script_after:
# Outer chroot script command, to be executed outside destination chroot before
# before entering it (and AFTER inner_chroot_script)
# outer_chroot_script_after:
# Used to umount /proc and unbind packages dir
error_script: /sabayon/scripts/remaster_error_script.sh
# Extra mkisofs parameters, perhaps something to include/use your bootloader
extra_mkisofs_parameters: -b isolinux/isolinux.bin -c isolinux/boot.cat
# Pre-ISO building script. Hook to be able to copy kernel images in place, for example
pre_iso_script: /sabayon/scripts/amd64_x86_pre_iso_script.sh GNOME 64 32 /sabayon/iso/Sabayon_Linux_8_x86_G.iso
# Post-ISO building script, called after ISO image generation.
post_iso_script: /sabayon/scripts/generic_post_iso_script.sh
# Destination directory for the ISO image path (MANDATORY)
destination_iso_directory: /sabayon/iso
# List of packages that would be removed from chrooted system (comma separated)
# packages_to_remove:
# List of packages that would be added from chrooted system (comma separated)
# packages_to_add:
# Custom shell call to packages add (default is: equo install)
# custom_packages_add_cmd:
# Custom command for updating repositories (default is: equo update)
# repositories_update_cmd:
# Determine whether repositories update should be run (if packages_to_add is set)
# (default is: no), values are: yes, no.
execute_repositories_update: no
# Directories to remove completely (comma separated)
# paths_to_remove:
# Directories to empty (comma separated)
# paths_to_empty:
# Release Version
release_version: 8
# Release Version string description
release_desc: amd64+x86 GNOME
# Path to source ISO file (MANDATORY)
source_iso: /sabayon/iso/Sabayon_Linux_8_amd64_G.iso
# Destination ISO image name, call whatever you want.iso, not mandatory
destination_iso_image_name: Sabayon_Linux_8_amd64+x86_G.iso

View File

@ -0,0 +1,76 @@
# Define an alternative execution strategy, in this case, the value must be
# "iso_remaster"
execution_strategy: iso_remaster
# Release string
release_string: Sabayon Linux
# File to write release string
release_file: /etc/sabayon-edition
# ISO Image title
iso_title: Sabayon KDE
# Outer chroot script command, to be executed outside destination chroot before
# before entering it (and before inner_chroot_script)
# outer_chroot_script:
# Execute repositories update here, in a more fault-tolerant flavor
# inner_chroot_script:
# Inner chroot script command, to be executed inside destination chroot after
# packages installation and removal
# inner_chroot_script_after:
# Outer chroot script command, to be executed outside destination chroot before
# before entering it (and AFTER inner_chroot_script)
# outer_chroot_script_after:
# Used to umount /proc and unbind packages dir
error_script: /sabayon/scripts/remaster_error_script.sh
# Extra mkisofs parameters, perhaps something to include/use your bootloader
extra_mkisofs_parameters: -b isolinux/isolinux.bin -c isolinux/boot.cat
# Pre-ISO building script. Hook to be able to copy kernel images in place, for example
pre_iso_script: /sabayon/scripts/amd64_x86_pre_iso_script.sh KDE 64 32 /sabayon/iso/Sabayon_Linux_8_x86_K.iso
# Post-ISO building script, called after ISO image generation.
post_iso_script: /sabayon/scripts/generic_post_iso_script.sh
# Destination directory for the ISO image path (MANDATORY)
destination_iso_directory: /sabayon/iso
# List of packages that would be removed from chrooted system (comma separated)
# packages_to_remove:
# List of packages that would be added from chrooted system (comma separated)
# packages_to_add:
# Custom shell call to packages add (default is: equo install)
# custom_packages_add_cmd:
# Custom command for updating repositories (default is: equo update)
# repositories_update_cmd:
# Determine whether repositories update should be run (if packages_to_add is set)
# (default is: no), values are: yes, no.
execute_repositories_update: no
# Directories to remove completely (comma separated)
# paths_to_remove:
# Directories to empty (comma separated)
# paths_to_empty:
# Release Version
release_version: 8
# Release Version string description
release_desc: amd64+x86 KDE
# Path to source ISO file (MANDATORY)
source_iso: /sabayon/iso/Sabayon_Linux_8_amd64_K.iso
# Destination ISO image name, call whatever you want.iso, not mandatory
destination_iso_image_name: Sabayon_Linux_8_amd64+x86_K.iso

View File

@ -0,0 +1,76 @@
#!/bin/bash
# example call:
# amd64_x86_pre_iso_script.sh GNOME 64 32 /path/to/Sabayon_Linux_DAILY_x86_G.iso
remaster_type="${1}"
current_arch="${2}"
other_arch="${3}"
other_iso_path="${4}"
/usr/sbin/env-update
. /etc/profile
pre_iso_signal_handler() {
if [ -d "${tmp_dir}" ] && [ -n "${tmp_dir}" ]; then
umount -f "${tmp_dir}"
umount -f "${tmp_dir}"
rmdir "${tmp_dir}"
fi
}
trap "pre_iso_signal_handler" EXIT SIGINT SIGQUIT SIGILL SIGTERM SIGHUP
if [ ! -f "${other_iso_path}" ]; then
echo "${other_iso_path} not found"
exit 1
fi
isolinux_destination="${CDROOT_DIR}/isolinux/txt.cfg"
isolinux_source="/sabayon/remaster/minimal_amd64_x86_isolinux.cfg"
cp "${isolinux_source}" "${isolinux_destination}" || exit 1
ver=${RELEASE_VERSION}
[[ -z "${ver}" ]] && ver=${CUR_DATE}
[[ -z "${ver}" ]] && ver="6"
sed -i "s/__VERSION__/${ver}/g" "${isolinux_destination}"
sed -i "s/__FLAVOUR__/${remaster_type}/g" "${isolinux_destination}"
kms_string=""
# should KMS be enabled?
if [ -f "${CHROOT_DIR}/.enable_kms" ]; then
rm "${CHROOT_DIR}/.enable_kms"
kms_string="radeon.modeset=1"
else
# enable vesafb-tng then
kms_string="video=vesafb:ywrap,mtrr:3"
fi
sed -i "s/__KMS__/${kms_string}/g" "${isolinux_destination}"
# setup squashfs loop files
mv "${CDROOT_DIR}/livecd.squashfs" "${CDROOT_DIR}/livecd${current_arch}.squashfs" || exit 1
# mount other iso image and steal livecd.squashfs
tmp_dir=$(mktemp -d --suffix=amd64_x86_pre_iso --tmpdir=/var/tmp 2> /dev/null)
if [ -z "${tmp_dir}" ]; then
echo "Cannot create temporary directory"
exit 1
fi
# also rename kernel and initramfs inside the CDROOT dir
mv "${CDROOT_DIR}/boot/sabayon" "${CDROOT_DIR}/boot/sabayon${current_arch}" || exit 1
mv "${CDROOT_DIR}/boot/sabayon.igz" "${CDROOT_DIR}/boot/sabayon${current_arch}.igz" || exit 1
mount -o loop "${other_iso_path}" "${tmp_dir}" || exit 1
other_squashfs_path="${tmp_dir}/livecd.squashfs"
if [ ! -f "${other_squashfs_path}" ]; then
echo "Cannot find ${other_squashfs_path}"
exit 1
fi
cp "${other_squashfs_path}" "${CDROOT_DIR}/livecd${other_arch}.squashfs" || exit 1
# copy kernel and initramfs
cp "${tmp_dir}/boot/sabayon" "${CDROOT_DIR}/boot/sabayon${other_arch}" || exit 1
cp "${tmp_dir}/boot/sabayon.igz" "${CDROOT_DIR}/boot/sabayon${other_arch}.igz" || exit 1
# copy back.jpg to proper location
isolinux_img="${CHROOT_DIR}/usr/share/backgrounds/isolinux/back.jpg"
if [ -f "${isolinux_img}" ]; then
cp "${isolinux_img}" "${CDROOT_DIR}/isolinux/" || exit 1
fi