Nan Zhou | 307386e | 2022-10-12 20:29:34 +0000 | [diff] [blame] | 1 | # Gather the Configuration data |
| 2 | |
| 3 | conf_data = configuration_data() |
| 4 | conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit')) |
| 5 | xss_enabled = get_option('insecure-disable-xss') |
| 6 | conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled()) |
| 7 | enable_redfish_query = get_option('insecure-enable-redfish-query') |
| 8 | conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled()) |
| 9 | # enable_redfish_aggregation = get_option('redfish-aggregation') |
| 10 | # conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled()) |
| 11 | insecure_push_style_notification = get_option('insecure-push-style-notification') |
| 12 | conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled()) |
| 13 | conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix')) |
| 14 | conf_data.set('HTTPS_PORT', get_option('https_port')) |
| 15 | |
Myung Bae | 662aa6e | 2023-01-10 14:20:28 -0600 | [diff] [blame] | 16 | # Logging level |
| 17 | loglvlopt = get_option('bmcweb-logging') |
| 18 | if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled' |
| 19 | # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled' |
| 20 | loglvlopt = 'debug' |
| 21 | endif |
| 22 | conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt) |
| 23 | |
Nan Zhou | 307386e | 2022-10-12 20:29:34 +0000 | [diff] [blame] | 24 | conf_h_dep = declare_dependency( |
| 25 | include_directories: include_directories('.'), |
| 26 | sources: configure_file( |
| 27 | input: 'bmcweb_config.h.in', |
| 28 | output: 'bmcweb_config.h', |
| 29 | configuration: conf_data |
| 30 | ) |
| 31 | ) |
| 32 | |
| 33 | # Configure and install systemd unit files |
| 34 | |
| 35 | configure_file(input : 'bmcweb.socket.in', |
| 36 | output : 'bmcweb.socket', |
| 37 | install_dir: systemd_system_unit_dir, |
| 38 | configuration: conf_data, |
| 39 | install : true) |
| 40 | |
| 41 | configure_file(input : 'bmcweb.service.in', |
| 42 | output : 'bmcweb.service', |
| 43 | install_dir: systemd_system_unit_dir, |
| 44 | configuration: conf_data, |
| 45 | install : true) |
| 46 | |
| 47 | # Copy pam-webserver to etc/pam.d |
| 48 | configure_file(input : 'pam-webserver', |
| 49 | output : 'webserver', |
| 50 | copy : true, |
| 51 | install_dir: '/etc/pam.d', |
Myung Bae | 662aa6e | 2023-01-10 14:20:28 -0600 | [diff] [blame] | 52 | install : true) |
| 53 | |