Exemplo n.º 1
0
def build(module_params):
    fs.remove("log")
    fs.remove("temp")
    shasums_url = "https://nodejs.org/dist/latest/SHASUMS256.txt"
    path_to_shasums = net.download_file(shasums_url)
    with open(path_to_shasums) as shasums_file:
        line = shasums_file.readline()
        match = re.search("node-v((\d.?)+?)-", line)
        latest_version = match.group(1)
        node_archive = net.download_file("https://nodejs.org/dist/latest/node-v{0}.tar.gz".format(latest_version))
        archives.extract_tar(node_archive, "temp")
        fs.rename("./temp/node-*", "./temp/node_src", True)
        assembly.configure("temp/node_src/", {}, [])
        try:
            assembly.make("temp/node_src/")
        except Exception as e:
            exc_type, exc_obj, exc_tb = sys.exc_info()
            fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
            print("Error while building nginx: '{0}' in {1}:{2} ".format(e, fname, exc_tb.tb_lineno), file=sys.stderr)
            print("Make log: ", os.path.abspath('log/make.txt'))
            sys.exit(1)
        try:
            assembly.make_install("temp/node_src/")
        except Exception as e:
            exc_type, exc_obj, exc_tb = sys.exc_info()
            fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
            print("Error while building nginx: '{0}' in {1}:{2} ".format(e, fname, exc_tb.tb_lineno), file=sys.stderr)
            print("Make log: ", os.path.abspath('log/make_install.txt'))
            sys.exit(1)
    fs.remove("temp")
Exemplo n.º 2
0
def configure():
    configure_params = {
        '--conf-path': '/etc/nginx/nginx.conf',
        '--pid-path': '/var/run/nginx.pid',
        '--error-log-path': '/var/log/nginx/error.log',
        '--http-log-path': '/var/log/nginx/access.log',
        '--user': '******',
        '--group': 'www',
        '--with-zlib': '../zlib',
        '--with-pcre': '../pcre',
        '--with-openssl': '../openssl'
    }
    assembly.configure("temp/nginx/", configure_params, [])
Exemplo n.º 3
0
def configure():
    configure_params = {
        '--conf-path': '/etc/nginx/nginx.conf',
        '--pid-path': '/var/run/nginx.pid',
        '--error-log-path': '/var/log/nginx/error.log',
        '--http-log-path': '/var/log/nginx/access.log',
        '--user': '******',
        '--group': 'www',
        '--with-zlib': '../zlib',
        '--with-pcre': '../pcre',

    }
    configure_inline_params = ['--with-http_ssl_module']
    assembly.configure("temp/nginx/", configure_params, configure_inline_params)
Exemplo n.º 4
0
def configure():
    configure_params = {
        '--conf-path': '/etc/nginx/nginx.conf',
        '--pid-path': '/var/run/nginx.pid',
        '--error-log-path': '/var/log/nginx/error.log',
        '--http-log-path': '/var/log/nginx/access.log',
        '--user': '******',
        '--group': 'www',
        '--with-zlib': '../zlib',
        '--with-pcre': '../pcre',
        '--with-openssl': '../openssl'

    }
    assembly.configure("temp/nginx/", configure_params, [])