示例#1
0
def create_poudriere_config():
    sh('mkdir -p ${DISTFILES_CACHE}')
    setfile('${POUDRIERE_ROOT}/etc/poudriere.conf', template('${BUILD_CONFIG}/templates/poudriere.conf', {
        'ports_repo': config['repos'].where(name='ports')['path'],
        'ports_branch': config['repos'].where(name='ports')['branch'],
    }))

    tree = e('${POUDRIERE_ROOT}/etc/poudriere.d/ports/p')
    sh('mkdir -p', tree)
    setfile(pathjoin(tree, 'mnt'), e('${PORTS_OVERLAY}'))
    setfile(pathjoin(tree, 'method'), 'git')
示例#2
0
def create_poudriere_config():
    sh('mkdir -p ${DISTFILES_CACHE}')
    setfile('${POUDRIERE_ROOT}/etc/poudriere.conf', template('${BUILD_CONFIG}/templates/poudriere.conf', {
        'ports_repo': config['repos'].where(name='ports')['path'],
        'ports_branch': config['repos'].where(name='ports')['branch'],
    }))

    tree = e('${POUDRIERE_ROOT}/etc/poudriere.d/ports/p')
    sh('mkdir -p', tree)
    setfile(pathjoin(tree, 'mnt'), e('${PORTS_OVERLAY}'))
    setfile(pathjoin(tree, 'method'), 'git')
示例#3
0
def create_kernel_config():
    with open(kernconf, 'w') as f:
        with open(pathjoin('${PROFILE_ROOT}', config['kernel_config']), 'r') as f2:
            f.write(f2.read())

    with open(kernconf_debug, 'w') as f:
        with open(pathjoin('${PROFILE_ROOT}', config['kernel_config']), 'r') as f2:
            f.write(f2.read())

        with open(os.path.join(
            os.path.dirname(pathjoin('${PROFILE_ROOT}', config['kernel_config'])),
            'DEBUG'
        ), 'r') as f2:
            f.write(f2.read())
示例#4
0
def create_kernel_config():
    conf = open(kernconf, 'w')
    for i in config['kernel_config']:
        f = open(pathjoin('${PROFILE_ROOT}', i), 'r')
        conf.write(f.read())
        f.close()

    conf.close()
示例#5
0
def create_ports_list():
    info('Creating ports list')
    sh('rm -rf', portoptions)

    f = open(portslist, 'w')
    for port in installer_ports['ports'] + config['ports']:
        name = port['name'] if isinstance(port, dict) else port
        name_und = name.replace('/', '_')
        options_path = pathjoin(portoptions, name_und)
        f.write('{0}\n'.format(name))

        sh('mkdir -p', options_path)
        if isinstance(port, dict) and 'options' in port:
            opt = open(pathjoin(options_path, 'options'), 'w')
            for o in port['options']:
                opt.write('{0}\n'.format(o))

            opt.close()

    f.close()
示例#6
0
def create_ports_list():
    info('Creating ports list')
    sh('rm -rf', portoptions)

    f = open(portslist, 'w')
    for port in installer_ports['ports'] + config['ports']:
        name = port['name'] if isinstance(port, dict) else port
        name_und = name.replace('/', '_')
        options_path = pathjoin(portoptions, name_und)
        f.write('{0}\n'.format(name))

        sh('mkdir -p', options_path)
        if isinstance(port, dict) and 'options' in port:
            opt = open(pathjoin(options_path, 'options'), 'w')
            for o in port['options']:
                opt.write('{0}\n'.format(o))

            opt.close()

    f.close()