blob: bd8aada7c1ceefe199eaed56cd7eac746db0864e [file] [log] [blame]
Nan Zhou307386e2022-10-12 20:29:34 +00001# 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.enabled())
7enable_redfish_query = get_option('insecure-enable-redfish-query')
8conf_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())
11insecure_push_style_notification = get_option('insecure-push-style-notification')
12conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
13conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
14conf_data.set('HTTPS_PORT', get_option('https_port'))
Willy Tu13451e32023-05-24 16:08:18 -070015conf_data.set('HTTPS_PORT', get_option('https_port'))
16enable_health_populate = get_option('health-populate')
17conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.enabled())
Nan Zhou307386e2022-10-12 20:29:34 +000018
Myung Bae662aa6e2023-01-10 14:20:28 -060019# Logging level
20loglvlopt = get_option('bmcweb-logging')
21if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled'
22 # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled'
23 loglvlopt = 'debug'
24endif
25conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt)
26
Nan Zhou307386e2022-10-12 20:29:34 +000027conf_h_dep = declare_dependency(
28 include_directories: include_directories('.'),
29 sources: configure_file(
30 input: 'bmcweb_config.h.in',
31 output: 'bmcweb_config.h',
32 configuration: conf_data
33 )
34)
35
36# Configure and install systemd unit files
37
38configure_file(input : 'bmcweb.socket.in',
39 output : 'bmcweb.socket',
40 install_dir: systemd_system_unit_dir,
41 configuration: conf_data,
42 install : true)
43
44configure_file(input : 'bmcweb.service.in',
45 output : 'bmcweb.service',
46 install_dir: systemd_system_unit_dir,
47 configuration: conf_data,
48 install : true)
49
50# Copy pam-webserver to etc/pam.d
51configure_file(input : 'pam-webserver',
52 output : 'webserver',
53 copy : true,
54 install_dir: '/etc/pam.d',
Myung Bae662aa6e2023-01-10 14:20:28 -060055 install : true)
56