1# Gather the Configuration data 2 3conf_data = configuration_data() 4conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit')) 5xss_enabled = get_option('insecure-disable-xss') 6conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.allowed()) 7enable_redfish_query = get_option('insecure-enable-redfish-query') 8conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.allowed()) 9# enable_redfish_aggregation = get_option('redfish-aggregation') 10# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.allowed()) 11insecure_push_style_notification = get_option('insecure-push-style-notification') 12conf_data.set10( 13 'BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', 14 insecure_push_style_notification.allowed(), 15) 16conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix')) 17conf_data.set('HTTPS_PORT', get_option('https_port')) 18enable_multi_host = get_option('experimental-redfish-multi-computer-system') 19conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.allowed()) 20enable_http2 = get_option('experimental-http2') 21conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.allowed()) 22 23enable_tls = get_option('insecure-disable-ssl') 24conf_data.set10('BMCWEB_ENABLE_TLS', enable_tls.disabled()) 25 26conf_data.set10( 27 'BMCWEB_ENABLE_MTLS_COMMON_NAME_PARSING_META', 28 get_option('mutual-tls-common-name-parsing') == 'meta', 29) 30 31# Logging level 32loglvlopt = get_option('bmcweb-logging') 33if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled' 34 # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled' 35 loglvlopt = 'debug' 36endif 37loglvlopt = loglvlopt.to_upper() 38conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt) 39 40conf_h_dep = declare_dependency( 41 include_directories: include_directories('.'), 42 sources: configure_file( 43 input: 'bmcweb_config.h.in', 44 output: 'bmcweb_config.h', 45 configuration: conf_data, 46 ), 47) 48 49# Configure and install systemd unit files 50 51configure_file( 52 input: 'bmcweb.socket.in', 53 output: 'bmcweb.socket', 54 install_dir: systemd_system_unit_dir, 55 configuration: conf_data, 56 install: true, 57) 58 59configure_file( 60 input: 'bmcweb.service.in', 61 output: 'bmcweb.service', 62 install_dir: systemd_system_unit_dir, 63 configuration: conf_data, 64 install: true, 65) 66 67# Copy pam-webserver to etc/pam.d 68install_data( 69 'pam-webserver', 70 install_dir: '/etc/pam.d/', 71 rename: 'webserver', 72) 73