blob: 10ddb2dff20ff148c49ac4645ec54018676bd3a6 [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')
Patrick Williams549bed22023-11-29 06:45:06 -06006conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +00007enable_redfish_query = get_option('insecure-enable-redfish-query')
Patrick Williams549bed22023-11-29 06:45:06 -06008conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +00009# enable_redfish_aggregation = get_option('redfish-aggregation')
Patrick Williams549bed22023-11-29 06:45:06 -060010# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +000011insecure_push_style_notification = get_option('insecure-push-style-notification')
Patrick Williams549bed22023-11-29 06:45:06 -060012conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +000013conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
14conf_data.set('HTTPS_PORT', get_option('https_port'))
Ed Tanous6f8273e2023-05-31 12:44:26 -070015enable_health_populate = get_option('redfish-health-populate')
Patrick Williams549bed22023-11-29 06:45:06 -060016conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.allowed())
Ninad Palsule5fd0aaf2023-04-20 15:11:21 -050017enable_proc_mem_status = get_option('redfish-enable-proccessor-memory-status')
Patrick Williams549bed22023-11-29 06:45:06 -060018conf_data.set10('BMCWEB_ENABLE_PROC_MEM_STATUS', enable_proc_mem_status.allowed())
Ed Tanous7f3e84a2022-12-28 16:22:54 -080019enable_multi_host = get_option('experimental-redfish-multi-computer-system')
Patrick Williams549bed22023-11-29 06:45:06 -060020conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.allowed())
Ed Tanousfca2cbe2021-01-28 14:49:59 -080021enable_http2 = get_option('experimental-http2')
Patrick Williams549bed22023-11-29 06:45:06 -060022conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +000023
Myung Bae662aa6e2023-01-10 14:20:28 -060024# Logging level
25loglvlopt = get_option('bmcweb-logging')
26if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled'
27 # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled'
28 loglvlopt = 'debug'
29endif
Ed Tanouse7245fe2023-07-24 17:01:38 -070030loglvlopt = loglvlopt.to_upper()
Myung Bae662aa6e2023-01-10 14:20:28 -060031conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt)
32
Nan Zhou307386e2022-10-12 20:29:34 +000033conf_h_dep = declare_dependency(
34 include_directories: include_directories('.'),
35 sources: configure_file(
36 input: 'bmcweb_config.h.in',
37 output: 'bmcweb_config.h',
38 configuration: conf_data
39 )
40)
41
42# Configure and install systemd unit files
43
44configure_file(input : 'bmcweb.socket.in',
45 output : 'bmcweb.socket',
46 install_dir: systemd_system_unit_dir,
47 configuration: conf_data,
48 install : true)
49
50configure_file(input : 'bmcweb.service.in',
51 output : 'bmcweb.service',
52 install_dir: systemd_system_unit_dir,
53 configuration: conf_data,
54 install : true)
55
56# Copy pam-webserver to etc/pam.d
Ed Tanous0a9c11e2023-05-25 14:32:49 -070057install_data(
58 'pam-webserver',
59 install_dir: '/etc/pam.d/',
60 rename: 'webserver',
61)
Myung Bae662aa6e2023-01-10 14:20:28 -060062