From d91c2c92b16eded157490dfd551086928297a06d Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 22 Sep 2010 12:18:32 +0200 Subject: [PATCH] [molecules] do not use molecule built-in repository update functionality but rather implement our own (more fault tolerant) --- molecules/corecdx.common | 5 +- molecules/e17.common | 6 ++- molecules/gnome.common | 5 +- molecules/kde.common | 5 +- molecules/lxde.common | 5 +- molecules/sabayon-x86-gforensic.spec | 52 ++----------------- molecules/serverbase.common | 5 +- molecules/xfce.common | 5 +- .../remaster_generic_inner_chroot_script.sh | 3 ++ 9 files changed, 35 insertions(+), 56 deletions(-) create mode 100755 scripts/remaster_generic_inner_chroot_script.sh diff --git a/molecules/corecdx.common b/molecules/corecdx.common index 984c3e0..505c03c 100644 --- a/molecules/corecdx.common +++ b/molecules/corecdx.common @@ -15,6 +15,9 @@ release_file: /etc/sabayon-edition # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh fluxbox @@ -67,4 +70,4 @@ packages_to_add: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +execute_repositories_update: no diff --git a/molecules/e17.common b/molecules/e17.common index c995ebe..d87b7f9 100644 --- a/molecules/e17.common +++ b/molecules/e17.common @@ -15,6 +15,9 @@ iso_title: Sabayon E17 # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh e17 @@ -76,4 +79,5 @@ packages_to_add: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +# done in inner_chroot_script +execute_repositories_update: no diff --git a/molecules/gnome.common b/molecules/gnome.common index d6cd24a..68ea6eb 100644 --- a/molecules/gnome.common +++ b/molecules/gnome.common @@ -15,6 +15,9 @@ iso_title: Sabayon GNOME # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh gnome @@ -222,7 +225,7 @@ packages_to_add: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +execute_repositories_update: no # Directories to remove completely (comma separated) # paths_to_remove: diff --git a/molecules/kde.common b/molecules/kde.common index e1ae5d8..7a1651e 100644 --- a/molecules/kde.common +++ b/molecules/kde.common @@ -15,6 +15,9 @@ iso_title: Sabayon KDE # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh kde @@ -358,7 +361,7 @@ packages_to_add: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +execute_repositories_update: no # Directories to remove completely (comma separated) # paths_to_remove: diff --git a/molecules/lxde.common b/molecules/lxde.common index 639f4e7..438c469 100644 --- a/molecules/lxde.common +++ b/molecules/lxde.common @@ -15,6 +15,9 @@ iso_title: Sabayon LXDE # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh lxde @@ -70,7 +73,7 @@ packages_to_add: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +execute_repositories_update: no # Directories to remove completely (comma separated) # paths_to_remove: diff --git a/molecules/sabayon-x86-gforensic.spec b/molecules/sabayon-x86-gforensic.spec index e9b4da8..0e43dc2 100644 --- a/molecules/sabayon-x86-gforensic.spec +++ b/molecules/sabayon-x86-gforensic.spec @@ -1,15 +1,9 @@ # Sabayon Linux 5 x86 GNOME Molecule remaster spec file - # The aim of this spec file is to add arbitrary applications & misc stuff - # to an already built ISO image via scripting (providing hooks that call - # user-defined scripts). - # squashfs, mkisofs needed - - # Define an alternative execution strategy, in this case, the value must be # "iso_remaster" execution_strategy: iso_remaster @@ -30,98 +24,64 @@ release_desc: x86 Gforensic # have to append "linux32" this is useful for inner_chroot_script prechroot: linux32 - - # Path to source ISO file (MANDATORY) source_iso: /sabayon/iso/Sabayon_Linux_DAILY_x86_G.iso - - # Outer chroot script command, to be executed outside destination chroot before # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh - - # Inner chroot script command, to be executed inside destination chroot before packing it # - kmerge.sh - setup kernel bins # inner_chroot_script: - +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_gforensic_inner_chroot_script_after.sh gnome - - # Outer chroot script command, to be executed outside destination chroot before # before entering it (and AFTER inner_chroot_script) - outer_chroot_script_after: /sabayon/scripts/gforensic_remaster_post.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/cdroot.py - - # Destination directory for the ISO image path (MANDATORY) destination_iso_directory: /sabayon/iso - - # Destination ISO image name, call whatever you want.iso, not mandatory destination_iso_image_name: Sabayon_Linux_Gforensic_5.4_x86.iso - - # Output iso image title iso_title: Sabayon_Linux_Forensic_x86_G - - # Alternative ISO file mount command (default is: mount -o loop -t iso9660) # iso_mounter: - - # Alternative ISO umounter command (default is: umount) # iso_umounter: - - # Alternative squashfs file mount command (default is: mount -o loop -t squashfs) # squash_mounter: - - # Alternative ISO squashfs umount command (default is: umount) # squash_umounter: - - # Merge directory with destination LiveCD root # merge_livecd_root: /put/more/files/onto/CD/root - - # List of packages that would be removed from chrooted system (comma separated) packages_to_remove: gnome-base/gnome-mount, net-dialup/pptpclient, net-dialup/gnome-ppp, net-dialup/globespan-adsl, net-dialup/wvdial, app-office/openoffice-l10n-de, app-office/openoffice-l10n-es, app-office/openoffice-l10n-fr, app-office/openoffice-l10n-it, app-office/openoffice-l10n-nl, app-office/openoffice-l10n-pt, games-puzzle/world-of-goo-demo, media-tv/xbmc, net-irc/xchat, www-client/firefox, x11-wm/fluxbox, x11-libs/compiz-bcop, x11-plugins/compiz-plugins-extra, x11-plugins/compiz-plugins-main, x11-wm/compiz, x11-themes/emerald-themes, x11-themes/emerald-themes, app-emulation/virtualbox-guest-additions, x11-drivers/xf86-input-virtualbox, x11-drivers/xf86-video-virtualbox, x11-terms/guake, gnome-extra/gnome-games, media-tv/linuxtv-dvb-headers, media-tv/ivtv-firmware, media-tv/afatech9005-firmware, www-client/lynx, net-p2p/deluge, media-gfx/gimp - - # Custom shell call to packages removal (default is: equo remove) # custom_packages_remove_cmd: - - # List of packages that would be added from chrooted system (comma separated) packages_to_add: sys-apps/slocate, media-fonts/droid, gnome-base/gvfs, app-misc/sabayon-skel, app-misc/screen, www-client/chromium, app-forensics/cmospwd, app-forensics/rkhunter, app-forensics/sleuthkit, app-antivirus/clamav, app-antivirus/clamtk, app-forensics/autopsy, app-forensics/mac-robber, @@ -129,21 +89,15 @@ app-forensics/aide, app-forensics/rdd, app-crypt/chntpw, media-video/vlc, x11-wm media-gfx/picasa, app-admin/testdisk, app-crypt/fcrackzip, app-crypt/johntheripper, sys-fs/extundelete, app-forensics/magicrescue, app-crypt/ophcrack, app-crypt/ophcrack-tables, net-analyzer/nmap, net-analyzer/netcat6, net-irc/irssi - - # 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: yes +execute_repositories_update: no diff --git a/molecules/serverbase.common b/molecules/serverbase.common index c35d7ba..268cf1d 100644 --- a/molecules/serverbase.common +++ b/molecules/serverbase.common @@ -15,6 +15,9 @@ release_file: /etc/sabayon-edition # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal # inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh fluxbox @@ -40,4 +43,4 @@ packages_to_remove: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +execute_repositories_update: no diff --git a/molecules/xfce.common b/molecules/xfce.common index c3005d4..2c64a1d 100644 --- a/molecules/xfce.common +++ b/molecules/xfce.common @@ -15,6 +15,9 @@ iso_title: Sabayon XFCE # before entering it (and before inner_chroot_script) outer_chroot_script: /sabayon/scripts/remaster_pre.sh +# Execute repositories update here, in a more fault-tolerant flavor +inner_chroot_script: /sabayon/scripts/remaster_generic_inner_chroot_script.sh + # Inner chroot script command, to be executed inside destination chroot after # packages installation and removal inner_chroot_script_after: /sabayon/scripts/remaster_generic_inner_chroot_script_after.sh xfce @@ -76,7 +79,7 @@ packages_to_add: # Determine whether repositories update should be run (if packages_to_add is set) # (default is: no), values are: yes, no. -execute_repositories_update: yes +execute_repositories_update: no # Directories to remove completely (comma separated) # paths_to_remove: diff --git a/scripts/remaster_generic_inner_chroot_script.sh b/scripts/remaster_generic_inner_chroot_script.sh new file mode 100755 index 0000000..f35aa9a --- /dev/null +++ b/scripts/remaster_generic_inner_chroot_script.sh @@ -0,0 +1,3 @@ +#!/bin/sh +export FORCE_EAPI=2 +equo update || ( sleep 1200 && equo update ) || exit 1