VirtualBox

Changeset 68057 in vbox for trunk/src


Ignore:
Timestamp:
Jul 20, 2017 10:38:12 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117087
Message:

Unattended: Moved the unattended templates into Main where they belong and renamed their installation directory to 'UnattendedTemplates' (was 'unattended_templates'). Added them to the solaris and darwin installers. Corrected the ubuntu template to with a ubiquity/success_command line duplicating preseed/late_command so the commands actually get executed.

Location:
trunk/src/VBox
Files:
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/Config.kmk

    r62487 r68057  
    5454
    5555#
     56# List of unattended installation script templates (lives in
     57# src/VBox/Main/UnattendedTemplates).
     58#
     59ifdef VBOX_WITH_UNATTENDED
     60 VBOX_UNATTENDED_TEMPLATES := \
     61        debian_preseed.cfg \
     62        ubuntu_preseed.cfg \
     63        fedora_ks.cfg \
     64        ol_ks.cfg \
     65        redhat67_ks.cfg \
     66        win_nt5_unattended.sif \
     67        win_nt6_unattended.xml
     68else
     69 VBOX_UNATTENDED_TEMPLATES :=
     70endif
     71
     72
     73#
    5674# DTrace globals.
    5775#
  • trunk/src/VBox/Installer/common/Makefile.kmk

    r65050 r68057  
    3535endif # VBOX_WITH_PYTHON
    3636
    37 ifdef VBOX_WITH_UNATTENDED
    38 
    39 INSTALLS += VBox-unattended-templates
    40 
    41 VBox-unattended-templates_INST = bin/unattended_templates/
    42 VBox-unattended-templates_MODE = a+r,u+w
    43 VBox-unattended-templates_SOURCES = $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/debian_preseed.cfg \
    44         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/ubuntu_preseed.cfg \
    45         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/redhat67_ks.cfg \
    46         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/ol_ks.cfg \
    47         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/fedora_ks.cfg \
    48         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/suse_autoinstall.xml \
    49         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/win_nt5_unattended.sif \
    50         $(VBOX_PATH_INST_COMMON_SRC)/unattended_templates/win_nt6_unattended.xml
    51 
    52 endif # VBOX_WITH_UNATTENDED
    53 
    5437include $(FILE_KBUILD_SUB_FOOTER)
    5538
  • trunk/src/VBox/Installer/darwin/Makefile.kmk

    r67067 r68057  
    567567                $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
    568568                $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
     569                $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UnattendedTemplates/, $(VBOX_UNATTENDED_TEMPLATES)) \
    569570                $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
    570571                $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
     
    700701                        $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) )
    701702endif
     703ifdef VBOX_UNATTENDED_TEMPLATES
     704# Unattended installation template scripts.
     705        $(MKDIR) -p -m 0755 -- $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/UnattendedTemplates)
     706        $(foreach file, $(VBOX_UNATTENDED_TEMPLATES) \
     707                ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UnattendedTemplates/$(file) \
     708                        $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/UnattendedTemplates/$(file)$(NLTAB))
     709endif
    702710ifdef VBOX_WITH_DTRACE
    703         @# DTrace library, testcases and scripts.
     711# DTrace library, testcases and scripts.
    704712        $(MKDIR) -p -m 0755 -- \
    705713                $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/ \
     
    712720                        $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/$(file)$(NLTAB))
    713721endif
    714 
    715722        @# Signed the binaries and the application bundle.
    716723ifdef VBOX_SIGNING_MODE
  • trunk/src/VBox/Installer/linux/Makefile.kmk

    r67782 r68057  
    241241        vboxweb-service.sh \
    242242        VBox.png \
    243         $(if $(VBOX_WITH_UNATTENDED), \
    244           unattended_templates/debian_preseed.cfg \
    245           unattended_templates/ubuntu_preseed.cfg \
    246           unattended_templates/fedora_ks.cfg \
    247           unattended_templates/ol_ks.cfg \
    248           unattended_templates/redhat67_ks.cfg \
    249           unattended_templates/win_nt5_unattended.sif \
    250           unattended_templates/win_nt6_unattended.xml,)
     243        $(addprefix UnattendedInstall/,$(VBOX_UNATTENDED_TEMPLATES))
    251244
    252245ifdef VBOX_WITH_EXTPACK
  • trunk/src/VBox/Installer/solaris/Makefile.kmk

    r67782 r68057  
    500500endif
    501501
     502# Unattended installation template scripts.
     503ifdef VBOX_UNATTENDED_TEMPLATES
     504 SOLARIS_COMMON += $(addprefix UnattendedTemplates/,$(VBOX_UNATTENDED_TEMPLATES))
     505endif
     506
    502507# DTrace library, testcase and scripts (as the rest of this file, this makes bold
    503508# ASSUMPTIONS about VBPX_INST_XXX variable values).
  • trunk/src/VBox/Installer/win/Makefile.kmk

    r67067 r68057  
    168168        $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
    169169        $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
     170        $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
    170171        $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
    171172                $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
     
    503504        $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
    504505        $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
    505         $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi
     506        $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
     507        $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi
    506508
    507509#
     
    520522                                $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
    521523                                $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
     524                                $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
    522525                                $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
    523526                                $(VBOX_MSI_DEPENDENCIES)) \
     
    580583                -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
    581584                -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
    582                 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
    583585                -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
    584586                -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
     
    614616                $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
    615617                $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
     618                $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
    616619                $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
    617620                $(VBOX_MSI_DEPENDENCIES) \
     
    671674                -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
    672675                -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
    673                 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
    674676                -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
    675677                -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
     
    718720#
    719721include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
    720 $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
     722$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi)
     723$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@)
    721724        $(APPEND) -t $@ '<?xml version="1.0" ?>'
    722725        $(APPEND) $@ '<Include>'
     
    729732# Edit the version stored in the registry.
    730733#
     734$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi)
    731735$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
    732736        $(SED)  -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
    733737                -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
    734738                --output $@ $<
     739
     740#
     741# Generate the list of unattended template script files.
     742#
     743$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
     744$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
     745        $(APPEND) -t -n $@ \
     746                '<?xml version="1.0" ?>' \
     747                '<Include>'
     748ifdef VBOX_UNATTENDED_TEMPLATES
     749        $(APPEND) -n $@ \
     750                '  <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
     751                '    <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Win64="$$(var.Property_Win64)">' \
     752                $@ $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
     753                '      <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
     754                '    </Component>' \
     755                '  </Directory>'
     756endif
     757        $(APPEND) $@ '</Include>'
     758
    735759
    736760#
  • trunk/src/VBox/Installer/win/VBoxMergeApp.wxi

    r67067 r68057  
    423423    </Component>
    424424
    425 <?if $(env.VBOX_WITH_UNATTENDED) = "yes" ?>
    426     <!-- Unattended templates -->
    427     <Directory Id="dir_VBoxUnattendedTemplates" Name="unattended_templates">
    428         <Component Id="cp_UnattendedTemplates" Guid="8f89ec7e-ae83-490d-a293-c7ab276c5678" Win64="$(var.Property_Win64)">
    429             <!-- VBox unattended template files -->
    430             <File Id="file_debian_preseed.cfg" Name="debian_preseed.cfg"
    431                   Source="$(env.PATH_OUT)\bin\unattended_templates\debian_preseed.cfg" />
    432             <File Id="file_fedora_ks.cfg" Name="fedora_ks.cfg"
    433                   Source="$(env.PATH_OUT)\bin\unattended_templates\fedora_ks.cfg" />
    434             <File Id="file_ol_ks.cfg" Name="ol_ks.cfg"
    435                   Source="$(env.PATH_OUT)\bin\unattended_templates\ol_ks.cfg" />
    436             <File Id="file_redhat67_ks.cfg" Name="redhat67_ks.cfg"
    437                   Source="$(env.PATH_OUT)\bin\unattended_templates\redhat67_ks.cfg" />
    438             <File Id="file_ubuntu_preseed.cfg" Name="ubuntu_preseed.cfg"
    439                   Source="$(env.PATH_OUT)\bin\unattended_templates\ubuntu_preseed.cfg" />
    440             <File Id="file_win_nt6_unattended.xml" Name="win_nt6_unattended.xml"
    441                   Source="$(env.PATH_OUT)\bin\unattended_templates\win_nt6_unattended.xml" />
    442             <File Id="file_win_nt5_unattended.sif" Name="win_nt5_unattended.sif"
    443                   Source="$(env.PATH_OUT)\bin\unattended_templates\win_nt5_unattended.sif" />
    444         </Component>
    445     </Directory>
     425    <!-- Unattended installation template scripts if enabled -->
     426    <?include $(env.PATH_TARGET)\VBoxUnattendedTemplateComponent.wxi ?>
     427
    446428<?endif?>
    447429
  • trunk/src/VBox/Main/Makefile.kmk

    r67753 r68057  
    3434include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
    3535include $(PATH_SUB_CURRENT)/cbinding/Makefile.kmk
     36include $(PATH_SUB_CURRENT)/UnattendedTemplates/Makefile.kmk
    3637
    3738
  • trunk/src/VBox/Main/UnattendedTemplates/debian_preseed.cfg

    r67882 r68057  
    6363# Custom Commands
    6464d-i preseed/late_command string \
    65 mkdir /target/postinstall; \
    66 cd /target/postinstall; \
    67 touch post-install.sh; \
    68 echo '#!/bin/bash' >> post-install.sh; \
    69 echo 'apt-get -y install build-essential' >> post-install.sh; \
    70 echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh; \
    71 @@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'mkdir /mnt/cdrom' >> post-install.sh; \
    72 echo 'echo' >> post-install.sh; \
    73 echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh; \
    74 echo 'mount -t iso9660 -o ro /dev/sr1 /mnt/cdrom' >> post-install.sh; \
    75 echo 'bash /mnt/cdrom/VBoxLinuxAdditions.run' >> post-install.sh; \
    76 echo 'usermod -a -G vboxsf @@VBOX_INSERT_USER_LOGIN@@' >> post-install.sh; \
    77 echo 'eject /dev/sr0' >> post-install.sh; \
    78 @@VBOX_COND_END@@echo 'exit 0' >> post-install.sh; \
    79 chroot /target chmod +x /postinstall/post-install.sh; \
     65mkdir -p /target/postinstall && \
     66cd /target/postinstall && \
     67echo '#!/bin/bash' > post-install.sh && \
     68echo 'apt-get -y install build-essential' >> post-install.sh && \
     69echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh && \
     70@@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'echo' >> post-install.sh && \
     71echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh && \
     72echo 'bash /cdrom/VBoxAdditions/VBoxLinuxAdditions.run' >> post-install.sh && \
     73echo 'usermod -a -G vboxsf "@@VBOX_INSERT_USER_LOGIN@@"' >> post-install.sh && \
     74@@VBOX_COND_END@@@@VBOX_COND_IS_INSTALLING_TEST_EXEC_SERVICE@@echo 'echo' >> post-install.sh && \
     75echo 'echo "TODO: Installing Test Execution Service..."' >> post-install.sh && \
     76@@VBOX_COND_END@@echo exit 0' >> post-install.sh && \
     77chmod +x /target/postinstall/post-install.sh && \
    8078chroot /target /bin/bash /postinstall/post-install.sh
     79
  • trunk/src/VBox/Main/UnattendedTemplates/ubuntu_preseed.cfg

    r67882 r68057  
    6363# Custom Commands
    6464d-i preseed/late_command string \
    65 mkdir /target/postinstall; \
    66 cd /target/postinstall; \
    67 touch post-install.sh; \
    68 echo '#!/bin/bash' >> post-install.sh; \
    69 echo 'apt-get -y install build-essential' >> post-install.sh; \
    70 echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh; \
    71 @@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'mkdir /mnt/cdrom' >> post-install.sh; \
    72 echo 'echo' >> post-install.sh; \
    73 echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh; \
    74 echo 'mount -t iso9660 -o ro /dev/sr1 /mnt/cdrom' >> post-install.sh; \
    75 echo 'bash /mnt/cdrom/VBoxLinuxAdditions.run' >> post-install.sh; \
    76 echo 'usermod -a -G vboxsf @@VBOX_INSERT_USER_LOGIN@@' >> post-install.sh; \
    77 echo 'eject /dev/sr0' >> post-install.sh; \
    78 @@VBOX_COND_END@@echo 'exit 0' >> post-install.sh; \
    79 chroot /target chmod +x /postinstall/post-install.sh; \
     65mkdir -p /target/postinstall && \
     66cd /target/postinstall && \
     67echo '#!/bin/bash' > post-install.sh && \
     68echo 'apt-get -y install build-essential' >> post-install.sh && \
     69echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh && \
     70@@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'echo' >> post-install.sh && \
     71echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh && \
     72echo 'bash /cdrom/VBoxAdditions/VBoxLinuxAdditions.run' >> post-install.sh && \
     73echo 'usermod -a -G vboxsf "@@VBOX_INSERT_USER_LOGIN@@"' >> post-install.sh && \
     74@@VBOX_COND_END@@@@VBOX_COND_IS_INSTALLING_TEST_EXEC_SERVICE@@echo 'echo' >> post-install.sh && \
     75echo 'echo "TODO: Installing Test Execution Service..."' >> post-install.sh && \
     76@@VBOX_COND_END@@echo exit 0' >> post-install.sh && \
     77chmod +x /target/postinstall/post-install.sh && \
    8078chroot /target /bin/bash /postinstall/post-install.sh
     79
     80# Same as above, but for ubiquity.
     81ubiquity ubiquity/success_command string \
     82mkdir -p /target/postinstall && \
     83cd /target/postinstall && \
     84echo '#!/bin/bash' > post-install.sh && \
     85echo 'apt-get -y install build-essential' >> post-install.sh && \
     86echo 'apt-get -y install linux-headers-$(uname -r)' >> post-install.sh && \
     87@@VBOX_COND_IS_INSTALLING_ADDITIONS@@echo 'echo' >> post-install.sh && \
     88echo 'echo "Installing VirtualBox Guest Additions..."' >> post-install.sh && \
     89echo 'bash /cdrom/VBoxAdditions/VBoxLinuxAdditions.run' >> post-install.sh && \
     90echo 'usermod -a -G vboxsf "@@VBOX_INSERT_USER_LOGIN@@"' >> post-install.sh && \
     91@@VBOX_COND_END@@@@VBOX_COND_IS_INSTALLING_TEST_EXEC_SERVICE@@echo 'echo' >> post-install.sh && \
     92echo 'echo "TODO: Installing Test Execution Service..."' >> post-install.sh && \
     93@@VBOX_COND_END@@echo exit 0' >> post-install.sh && \
     94chmod +x /target/postinstall/post-install.sh && \
     95chroot /target /bin/bash /postinstall/post-install.sh
     96
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette