| # Gather the Configuration data |
| |
| conf_data = configuration_data() |
| conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit')) |
| xss_enabled = get_option('insecure-disable-xss') |
| conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled()) |
| enable_redfish_query = get_option('insecure-enable-redfish-query') |
| conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled()) |
| # enable_redfish_aggregation = get_option('redfish-aggregation') |
| # conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled()) |
| insecure_push_style_notification = get_option('insecure-push-style-notification') |
| conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled()) |
| conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix')) |
| conf_data.set('HTTPS_PORT', get_option('https_port')) |
| conf_data.set('MTLS_GRPC_PORT', get_option('mtls-grpc-port')) |
| conf_data.set('INSECURE_GRPC_PORT', get_option('insecure-grpc-port')) |
| conf_data.set10('INSECURE_DISABLE_REDFISH_AUTHZ', get_option('insecure-disable-grpc-redfish-authz').enabled()) |
| conf_data.set10('BMCWEB_ENABLE_AMD', get_option('amd').enabled()) |
| conf_data.set10('BMCWEB_ENABLE_RDE_DEVICE', get_option('rde-device').enabled()) |
| |
| # Platform-specific flags |
| conf_data.set10('ENABLE_PLATFORM6', get_option('platform6').enabled()) |
| conf_data.set('PLATFORM6_CHASSIS0', get_option('platform6-chassis0')) |
| conf_data.set('PLATFORM6_CHASSIS1', get_option('platform6-chassis1')) |
| conf_data.set('PLATFORM6_CHASSIS2', get_option('platform6-chassis2')) |
| conf_data.set10('ENABLE_PLATFORM9', get_option('platform9').enabled()) |
| conf_data.set('PLATFORM9_CHASSIS0', get_option('platform9-chassis0')) |
| conf_data.set('PLATFORM9_CHASSIS1', get_option('platform9-chassis1')) |
| conf_data.set('PLATFORM9_CHASSIS2', get_option('platform9-chassis2')) |
| conf_data.set('PLATFORM9_CHASSIS3', get_option('platform9-chassis3')) |
| conf_data.set('PLATFORM9_CHASSIS4', get_option('platform9-chassis4')) |
| conf_data.set('PLATFORM9_CHASSIS5', get_option('platform9-chassis5')) |
| conf_data.set('HOST_CPER_LOGSERVICE_NAME', get_option('HOST_CPER_LOGSERVICE_NAME')) |
| conf_data.set('HOST_CPER_SERVICE', get_option('HOST_CPER_SERVICE')) |
| conf_data.set('HOST_CPER_OBJECT_MANAGER_PATH', get_option('HOST_CPER_OBJECT_MANAGER_PATH')) |
| conf_data.set('HOST_CPER_LOG_PATH', get_option('HOST_CPER_LOG_PATH')) |
| |
| # Custom NVMe Drvice |
| conf_data.set('CUSTOM_NVME', get_option('custom-nvme')) |
| conf_data.set('CUSTOM_NVME_ASSOCIATION', get_option('custom-nvme-association')) |
| |
| # Custom SSD |
| conf_data.set10('ENABLE_CUSTOM_SSD', get_option('custom-ssd-enable').enabled()) |
| conf_data.set('CUSTOM_SSD_NAME', get_option('custom-ssd-name')) |
| conf_data.set('CUSTOM_SSD_CONTROLLER', get_option('custom-ssd-controller')) |
| conf_data.set('CUSTOM_SSD_ODATA_TYPE', get_option('custom-ssd-odata-type')) |
| |
| conf_h_dep = declare_dependency( |
| include_directories: include_directories('.'), |
| sources: configure_file( |
| input: 'bmcweb_config.h.in', |
| output: 'bmcweb_config.h', |
| configuration: conf_data |
| ) |
| ) |
| |
| # Configure and install systemd unit files |
| |
| configure_file(input : 'bmcweb.socket.in', |
| output : 'bmcweb.socket', |
| install_dir: systemd_system_unit_dir, |
| configuration: conf_data, |
| install : true) |
| |
| configure_file(input : 'bmcweb.service.in', |
| output : 'bmcweb.service', |
| install_dir: systemd_system_unit_dir, |
| configuration: conf_data, |
| install : true) |
| |
| # Copy pam-webserver to etc/pam.d |
| configure_file(input : 'pam-webserver', |
| output : 'webserver', |
| copy : true, |
| install_dir: '/etc/pam.d', |
| install : true) |