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')) |
Ed Tanous | 6f8273e | 2023-05-31 12:44:26 -0700 | [diff] [blame] | 15 | enable_health_populate = get_option('redfish-health-populate') |
Willy Tu | 13451e3 | 2023-05-24 16:08:18 -0700 | [diff] [blame] | 16 | conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.enabled()) |
Ninad Palsule | 5fd0aaf | 2023-04-20 15:11:21 -0500 | [diff] [blame] | 17 | enable_proc_mem_status = get_option('redfish-enable-proccessor-memory-status') |
| 18 | conf_data.set10('BMCWEB_ENABLE_PROC_MEM_STATUS', enable_proc_mem_status.enabled()) |
Nan Zhou | 307386e | 2022-10-12 20:29:34 +0000 | [diff] [blame] | 19 | |
Myung Bae | 662aa6e | 2023-01-10 14:20:28 -0600 | [diff] [blame] | 20 | # Logging level |
| 21 | loglvlopt = get_option('bmcweb-logging') |
| 22 | if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled' |
| 23 | # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled' |
| 24 | loglvlopt = 'debug' |
| 25 | endif |
| 26 | conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt) |
| 27 | |
Nan Zhou | 307386e | 2022-10-12 20:29:34 +0000 | [diff] [blame] | 28 | conf_h_dep = declare_dependency( |
| 29 | include_directories: include_directories('.'), |
| 30 | sources: configure_file( |
| 31 | input: 'bmcweb_config.h.in', |
| 32 | output: 'bmcweb_config.h', |
| 33 | configuration: conf_data |
| 34 | ) |
| 35 | ) |
| 36 | |
| 37 | # Configure and install systemd unit files |
| 38 | |
| 39 | configure_file(input : 'bmcweb.socket.in', |
| 40 | output : 'bmcweb.socket', |
| 41 | install_dir: systemd_system_unit_dir, |
| 42 | configuration: conf_data, |
| 43 | install : true) |
| 44 | |
| 45 | configure_file(input : 'bmcweb.service.in', |
| 46 | output : 'bmcweb.service', |
| 47 | install_dir: systemd_system_unit_dir, |
| 48 | configuration: conf_data, |
| 49 | install : true) |
| 50 | |
| 51 | # Copy pam-webserver to etc/pam.d |
Ed Tanous | 0a9c11e | 2023-05-25 14:32:49 -0700 | [diff] [blame] | 52 | install_data( |
| 53 | 'pam-webserver', |
| 54 | install_dir: '/etc/pam.d/', |
| 55 | rename: 'webserver', |
| 56 | ) |
Myung Bae | 662aa6e | 2023-01-10 14:20:28 -0600 | [diff] [blame] | 57 | |