| # 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()) |
| conf_data.set('BMCWEB_MAIN_CHASSIS_ID', get_option('main-chassis-id')) |
| conf_data.set10('ENABLE_MULTI_THREAD_GET', get_option('multi-thread-get').enabled()) |
| conf_data.set10('ENABLE_TLBMC', get_option('tlbmc').enabled()) |
| conf_data.set10('ENABLE_TLBMC_TRACE', get_option('tlbmc-trace').enabled()) |
| conf_data.set10('ENABLE_FAST_SANITY', get_option('fast-sanity').enabled()) |
| conf_data.set('ENTITY_CONFIG_LOCATION', get_option('entity-config-location')) |
| |
| # 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.set10('ENABLE_PLATFORM22', get_option('platform22').enabled()) |
| 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')) |
| conf_data.set('RASMANAGER_LOG_PATH', get_option('rasmanager-log-path')) |
| conf_data.set10('ENABLE_GOOGLE_BAREMETAL', get_option('google-baremetal').allowed()) |
| |
| # Custom NVMe Drvice |
| conf_data.set10('ENABLE_CUSTOM_NVME', get_option('custom-nvme-enable').enabled()) |
| 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')) |
| |
| # gBMCweb Snapshot |
| conf_data.set('SNAPSHOT_FILEPATH', get_option('snapshot-filepath')) |
| conf_data.set('SNAPSHOT_FILEPATH_PLATFORM22', get_option('snapshot-filepath-platform22')) |
| conf_data.set('SNAPSHOT_FILEPATH_PLATFORM23', get_option('snapshot-filepath-platform23')) |
| conf_data.set('SNAPSHOT_FILEPATH_CABLEFRU', get_option('snapshot-filepath-cableFru')) |
| conf_data.set('SNAPSHOT_FILEPATH_PLATFORM11_CONFIG4', get_option('snapshot-filepath-platform11-config4')) |
| conf_data.set('SNAPSHOT_FILEPATH_PLATFORM5_CONFIG7', get_option('snapshot-filepath-platform5-config7')) |
| conf_data.set('SNAPSHOT_FILEPATH_PLATFORM5_CONFIG0', get_option('snapshot-filepath-platform5-config0')) |
| |
| # gBMCweb sysfs UT |
| conf_data.set('SYSFS_BASE_PATH_UT', get_option('sysfs-base-path-ut')) |
| |
| # BMCNet metric interface |
| conf_data.set('BMC_DIRECT_PATH_INTF', get_option('bmc-direct-path-intf')) |
| conf_data.set('BMC_SIDE_PATH_INTF', get_option('bmc-side-path-intf')) |
| |
| 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) |