Exemple #1
0
def installPrerequisites(source_dir):
    win_files_dir = os.path.join(source_dir, "os", Const.getDistribWinDir())
    installJDK(win_files_dir)
    installVCRedistX64(win_files_dir)
    installWinFile(win_files_dir, "vcredist-2005-x86-8.0.50727.6195.exe")
    installWinFile(win_files_dir, "sql-native-client-driver-x86-10.0.exe")
    installWinFile(win_files_dir, "sql-native-client-driver-x64-10.0.exe")
Exemple #2
0
def installPOACoreBinaries(config, progress, build_rpms):
    """
    build_rpms needed just for keep the call signature
    build_rpms used in uLinux, where it's a list of new rpm's to install
    """
    win_files_dir = os.path.abspath(os.path.join(config.source_dir, "os", Const.getDistribWinDir()))
    progress.set_progress(75, "Installing POA MSI")
    logfile = os.environ['SYSTEMDRIVE'] + "\\poacore-install.log"
    uUtil.execCommand(["msiexec", "/i", os.path.join(win_files_dir, "poa-core.msi"), "/l*v",
                       logfile, "POA_INSTALL=1", "FULL_COMPUTER_NAME=" + config.hostname])
Exemple #3
0
def createPPMSite(config):
    progress.do("creating ppm site")
    system_root = os.environ['SystemRoot']
    appcmd = os.path.join(system_root, 'System32', 'inetsrv', 'appcmd.exe')
    source_dir = config.source_dir
    tarball_dir = os.path.join(config.rootpath.replace('/', '\\'), 'install', 'tarballs')
    if not os.path.exists(appcmd):
        uLogging.debug("IIS 6")
        out, err, status = uUtil.readCmdExt(
            [os.path.join(source_dir, 'os', Const.getDistribWinDir(), 'IISAdministrationTools', '_install.bat')])
        uLogging.debug("%s %s %s", out, err, status)
        iis_web = os.path.join(system_root, 'System32', 'iisweb.vbs')
        out, err, status = uUtil.readCmdExt(['cscript', iis_web, '/delete', site_name])
        uLogging.debug("%s %s %s", out, err, status)
        out, err, status = uUtil.readCmdExt(
            ['cscript', iis_web, '/create', tarball_dir, site_name, '/i', config.communication_ip])
        uLogging.debug("%s %s %s", out, err, status)
        out, err, status = uUtil.readCmdExt(
            ['cscript', os.path.join(system_root, 'System32', 'iisvdir.vbs'), '/create', site_name, 'tarballs',  tarball_dir])
        uLogging.debug("%s %s %s", out, err, status)
    else:
        uLogging.debug("IIS 7")
        out, err, status = uUtil.readCmdExt('%s delete site /site.name:"%s"' % (appcmd, site_name))
        uLogging.debug("%s %s %s", out, err, status)
        out, err, status = uUtil.readCmdExt(
            '%s add site "/name:%s" /bindings:"http://%s:80" "/physicalPath:%s"' % (appcmd, site_name, config.communication_ip, tarball_dir))
        uLogging.debug("%s %s %s", out, err, status)
        out, err, status = uUtil.readCmdExt(
            '%s add vdir "/app.name:%s/" "/physicalPath:%s" /path:/tarballs' % (appcmd, site_name, tarball_dir))
        uLogging.debug("%s %s %s", out, err, status)

    try:
        os.makedirs(tarball_dir)
    except:
        pass
    out, err, status = uUtil.readCmdExt(
        ["cscript", os.path.join(config.rootpath, 'install', 'tarball_storage_config.vbs'), site_name])
    uLogging.debug("%s %s %s", out, err, status)
    progress.done()

    progress.do("copying tarballs")
    os.path.walk(source_dir, uPackaging.copy_tarballs, tarball_dir)
    progress.done()
Exemple #4
0
        elif manifest_pattern.match(fn):
            try:
                pkg_info = get_package(fullname)
            except Exception, e:
                uLogging.err("%s while processing %s", e, fullname)
                raise
            pkg_info.manifest_file = fullname
            pkg_info.topdir = build.topdir
            build.add_package(pkg_info, build.fail_on_duplicates)
        elif tarball_pattern.match(fn):
            if not fn in build.tarballs_locations:
                build.tarballs_locations[fn] = []
            build.tarballs_locations[fn].append(dirname)
        elif fn == 'PAgent.exe':
            build.windows_update.sn_installer_path = os.path.abspath(fullname)
            build.add_file(Const.getDistribWinDir(), fn, dirname)
        elif fn.lower() == 'asyncexec.exe':
            build.windows_update.async_exec_path = os.path.abspath(fullname)
            build.add_file(Const.getDistribWinDir(), fn, dirname)
        elif rpm_pattern.match(fn):
            build.add_rpm(guessed_platform, os.path.abspath(fullname))
            if not guessed_platform:
                uLogging.info("Assuming any-any-any platform for %s", fullname)
            build.add_file(guessed_platform, fn, dirname)
        elif fn == 'update.udl2':
            build.udl2_file = os.path.abspath(fullname)
        elif exe_pattern.match(fn):
            build.add_file(Const.getDistribWinDir(), fn, dirname)
        elif mdl_pattern.match(fn):
            build.add_module(MDLReader.readModule(fullname))