VirtualBox

Changeset 86270 in vbox


Ignore:
Timestamp:
Sep 24, 2020 4:05:49 PM (4 years ago)
Author:
vboxsync
Message:

bugref:8527. Added the separate classes for RHEL7/8, OL7/8.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/UnattendedInstaller.h

    r84564 r86270  
    490490
    491491/**
    492  * RHEL 6 and 7 installer.
     492 * RHEL 6 installer.
    493493 *
    494494 * This serves as a base for the kickstart based installers.
    495495 */
    496 class UnattendedRhel6And7Installer : public UnattendedLinuxInstaller
    497 {
    498 public:
    499     UnattendedRhel6And7Installer(Unattended *pParent,
    500                                  const char *pszMainScriptTemplateName = "redhat67_ks.cfg",
    501                                  const char *pszPostScriptTemplateName = "redhat_postinstall.sh",
    502                                  const char *pszMainScriptFilename     = "ks.cfg")
    503           : UnattendedLinuxInstaller(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     496class UnattendedRhel6Installer : public UnattendedLinuxInstaller
     497{
     498public:
     499    UnattendedRhel6Installer(Unattended *pParent,
     500                             const char *pszMainScriptTemplateName = "redhat67_ks.cfg",
     501                             const char *pszPostScriptTemplateName = "redhat_postinstall.sh",
     502                             const char *pszMainScriptFilename     = "ks.cfg")
     503        : UnattendedLinuxInstaller(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
    504504    {
    505505        Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded());
     
    508508        mArrStrRemoveInstallKernelParameters.append("rd.live.check"); /* Disables the checkisomd5 step. Required for VISO. */
    509509    }
    510     ~UnattendedRhel6And7Installer() {}
     510    ~UnattendedRhel6Installer() {}
    511511
    512512    bool isAuxiliaryIsoIsVISO()             { return true; }
     
    518518};
    519519
    520 
    521 /**
    522  * RHEL 5 installer (same as RHEL 6 & 7, except for the kickstart template).
    523  */
    524 class UnattendedRhel5Installer : public UnattendedRhel6And7Installer
    525 {
    526 public:
    527     UnattendedRhel5Installer(Unattended *pParent) : UnattendedRhel6And7Installer(pParent, "rhel5_ks.cfg") {}
     520/**
     521 * RHEL 7 installer (same as RHEL 6).
     522 */
     523class UnattendedRhel7Installer : public UnattendedRhel6Installer
     524{
     525public:
     526    UnattendedRhel7Installer(Unattended *pParent)
     527        : UnattendedRhel6Installer(pParent)
     528    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     529
     530    UnattendedRhel7Installer(Unattended *pParent,
     531                             const char *pszMainScriptTemplateName,
     532                             const char *pszPostScriptTemplateName,
     533                             const char *pszMainScriptFilename)
     534        : UnattendedRhel6Installer(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     535    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     536    ~UnattendedRhel7Installer() {}
     537};
     538
     539
     540/**
     541 * RHEL 8 installer (same as RHEL 7).
     542 */
     543class UnattendedRhel8Installer : public UnattendedRhel7Installer
     544{
     545public:
     546    UnattendedRhel8Installer(Unattended *pParent)
     547        : UnattendedRhel7Installer(pParent)
     548    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     549
     550    UnattendedRhel8Installer(Unattended *pParent,
     551                             const char *pszMainScriptTemplateName,
     552                             const char *pszPostScriptTemplateName,
     553                             const char *pszMainScriptFilename)
     554        : UnattendedRhel7Installer(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     555    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     556    ~UnattendedRhel8Installer() {}
     557};
     558
     559
     560/**
     561 * RHEL 5 installer (same as RHEL 6, except for the kickstart template).
     562 */
     563class UnattendedRhel5Installer : public UnattendedRhel6Installer
     564{
     565public:
     566    UnattendedRhel5Installer(Unattended *pParent) : UnattendedRhel6Installer(pParent, "rhel5_ks.cfg") {}
    528567    ~UnattendedRhel5Installer() {}
    529568};
     
    531570
    532571/**
    533  * RHEL 4 installer (same as RHEL 6 & 7, except for the kickstart template).
    534  */
    535 class UnattendedRhel4Installer : public UnattendedRhel6And7Installer
    536 {
    537 public:
    538     UnattendedRhel4Installer(Unattended *pParent) : UnattendedRhel6And7Installer(pParent, "rhel4_ks.cfg") {}
     572 * RHEL 4 installer (same as RHEL 6, except for the kickstart template).
     573 */
     574class UnattendedRhel4Installer : public UnattendedRhel6Installer
     575{
     576public:
     577    UnattendedRhel4Installer(Unattended *pParent) : UnattendedRhel6Installer(pParent, "rhel4_ks.cfg") {}
    539578    ~UnattendedRhel4Installer() {}
    540579};
     
    542581
    543582/**
    544  * RHEL 3 installer (same as RHEL 6 & 7, except for the kickstart template).
    545  */
    546 class UnattendedRhel3Installer : public UnattendedRhel6And7Installer
    547 {
    548 public:
    549     UnattendedRhel3Installer(Unattended *pParent) : UnattendedRhel6And7Installer(pParent, "rhel3_ks.cfg") {}
     583 * RHEL 3 installer (same as RHEL 6, except for the kickstart template).
     584 */
     585class UnattendedRhel3Installer : public UnattendedRhel6Installer
     586{
     587public:
     588    UnattendedRhel3Installer(Unattended *pParent) : UnattendedRhel6Installer(pParent, "rhel3_ks.cfg") {}
    550589    ~UnattendedRhel3Installer() {}
    551590};
     
    553592
    554593/**
    555  * Fedora installer (same as RHEL 6 & 7, except for the template).
    556  */
    557 class UnattendedFedoraInstaller : public UnattendedRhel6And7Installer
     594 * Fedora installer (same as RHEL 6, except for the template).
     595 */
     596class UnattendedFedoraInstaller : public UnattendedRhel6Installer
    558597{
    559598public:
    560599    UnattendedFedoraInstaller(Unattended *pParent)
    561         : UnattendedRhel6And7Installer(pParent, "fedora_ks.cfg")
     600        : UnattendedRhel6Installer(pParent, "fedora_ks.cfg")
    562601    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
    563602    ~UnattendedFedoraInstaller() {}
     
    566605
    567606/**
    568  * Oracle Linux installer (same as RHEL 6 & 7, except for the template).
    569  */
    570 class UnattendedOracleLinuxInstaller : public UnattendedRhel6And7Installer
    571 {
    572 public:
    573     UnattendedOracleLinuxInstaller(Unattended *pParent)
    574         : UnattendedRhel6And7Installer(pParent, "ol_ks.cfg")
    575     { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
    576     ~UnattendedOracleLinuxInstaller() {}
    577 };
    578 
     607 * Oracle Linux 6 installer.
     608 */
     609class UnattendedOracleLinux6Installer : public UnattendedRhel6Installer
     610{
     611public:
     612    UnattendedOracleLinux6Installer(Unattended *pParent,
     613                                    const char *pszMainScriptTemplateName = "ol_ks.cfg",
     614                                    const char *pszPostScriptTemplateName = "ol_postinstall.sh",
     615                                    const char *pszMainScriptFilename = "ks.cfg")
     616        : UnattendedRhel6Installer(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     617    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     618    ~UnattendedOracleLinux6Installer() {}
     619};
     620
     621
     622/**
     623 * Oracle Linux 7 installer.
     624 */
     625class UnattendedOracleLinux7Installer : public UnattendedOracleLinux6Installer
     626{
     627public:
     628    UnattendedOracleLinux7Installer(Unattended *pParent)
     629        : UnattendedOracleLinux6Installer(pParent)
     630    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     631
     632    UnattendedOracleLinux7Installer(Unattended *pParent,
     633                                    const char *pszMainScriptTemplateName,
     634                                    const char *pszPostScriptTemplateName,
     635                                    const char *pszMainScriptFilename)
     636        : UnattendedOracleLinux6Installer(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     637    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     638    ~UnattendedOracleLinux7Installer() {}
     639};
     640
     641
     642/**
     643 * Oracle Linux 8 installer.
     644 */
     645class UnattendedOracleLinux8Installer : public UnattendedOracleLinux7Installer
     646{
     647public:
     648    UnattendedOracleLinux8Installer(Unattended *pParent)
     649        : UnattendedOracleLinux7Installer(pParent)
     650    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     651
     652    UnattendedOracleLinux8Installer(Unattended *pParent,
     653                                    const char *pszMainScriptTemplateName,
     654                                    const char *pszPostScriptTemplateName,
     655                                    const char *pszMainScriptFilename)
     656        : UnattendedOracleLinux7Installer(pParent, pszMainScriptTemplateName, pszPostScriptTemplateName, pszMainScriptFilename)
     657    { Assert(!isOriginalIsoNeeded()); Assert(isAuxiliaryIsoNeeded()); Assert(!isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); }
     658    ~UnattendedOracleLinux8Installer() {}
     659};
    579660
    580661#if 0 /* fixme */
  • trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp

    r85275 r86270  
    7474        else if (enmOsType >= VBOXOSTYPE_RedHat && enmOsType <= VBOXOSTYPE_RedHat_x64)
    7575        {
    76             if (   strDetectedOSVersion.isEmpty()
    77                 || RTStrVersionCompare(strDetectedOSVersion.c_str(), "6") >= 0)
    78                 pUinstaller = new UnattendedRhel6And7Installer(pParent);
     76            if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "8") >= 0)
     77                pUinstaller = new UnattendedRhel8Installer(pParent);
     78            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "7") >= 0)
     79                pUinstaller = new UnattendedRhel7Installer(pParent);
     80            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "6") >= 0)
     81                pUinstaller = new UnattendedRhel6Installer(pParent);
    7982            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "5") >= 0)
    8083                pUinstaller = new UnattendedRhel5Installer(pParent);
     
    8487                pUinstaller = new UnattendedRhel3Installer(pParent);
    8588            else
    86                 pUinstaller = new UnattendedRhel6And7Installer(pParent);
     89                pUinstaller = new UnattendedRhel6Installer(pParent);
    8790        }
    8891        else if (enmOsType >= VBOXOSTYPE_FedoraCore && enmOsType <= VBOXOSTYPE_FedoraCore_x64)
    8992            pUinstaller = new UnattendedFedoraInstaller(pParent);
    9093        else if (enmOsType >= VBOXOSTYPE_Oracle && enmOsType <= VBOXOSTYPE_Oracle_x64)
    91             pUinstaller = new UnattendedOracleLinuxInstaller(pParent);
     94        {
     95            if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "8") >= 0)
     96                pUinstaller = new UnattendedOracleLinux8Installer(pParent);
     97            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "7") >= 0)
     98                pUinstaller = new UnattendedOracleLinux7Installer(pParent);
     99            else if (RTStrVersionCompare(strDetectedOSVersion.c_str(), "6") >= 0)
     100                pUinstaller = new UnattendedOracleLinux6Installer(pParent);
     101            else
     102                pUinstaller = new UnattendedOracleLinux6Installer(pParent);
     103        }
    92104#if 0 /* doesn't work, so convert later. */
    93105        else if (enmOsType == VBOXOSTYPE_OpenSUSE || enmOsType == VBOXOSTYPE_OpenSUSE_x64)
     
    10771089*
    10781090*
    1079 *  Implementation UnattendedRhel6And7Installer functions
     1091*  Implementation UnattendedRhel6Installer functions
    10801092*
    10811093*/
    10821094//////////////////////////////////////////////////////////////////////////////////////////////////////
    1083 HRESULT UnattendedRhel6And7Installer::addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles,
     1095HRESULT UnattendedRhel6Installer::addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles,
    10841096                                                               RTVFS hVfsOrgIso, bool fOverwrite)
    10851097{
Note: See TracChangeset for help on using the changeset viewer.

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