blob: 9533bd6b46927bc91a2b71a64bb850f05ce4dfbe [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'))
Nan Zhou307386e2022-10-12 20:29:34 +00005enable_redfish_query = get_option('insecure-enable-redfish-query')
Patrick Williams549bed22023-11-29 06:45:06 -06006conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +00007# enable_redfish_aggregation = get_option('redfish-aggregation')
Patrick Williams549bed22023-11-29 06:45:06 -06008# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.allowed())
Nan Zhou307386e2022-10-12 20:29:34 +00009insecure_push_style_notification = get_option('insecure-push-style-notification')
Ed Tanousf2caadc2024-01-02 18:34:36 -080010conf_data.set10(
11 'BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING',
12 insecure_push_style_notification.allowed(),
13)
Nan Zhou307386e2022-10-12 20:29:34 +000014conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
15conf_data.set('HTTPS_PORT', get_option('https_port'))
Ed Tanous7f3e84a2022-12-28 16:22:54 -080016enable_multi_host = get_option('experimental-redfish-multi-computer-system')
Patrick Williams549bed22023-11-29 06:45:06 -060017conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.allowed())
Ed Tanousfca2cbe2021-01-28 14:49:59 -080018enable_http2 = get_option('experimental-http2')
Patrick Williams549bed22023-11-29 06:45:06 -060019conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.allowed())
Ed Tanous8db83742024-04-13 09:11:15 -070020
21enable_tls = get_option('insecure-disable-ssl')
22conf_data.set10('BMCWEB_ENABLE_TLS', enable_tls.disabled())
23
Ed Tanousf2caadc2024-01-02 18:34:36 -080024conf_data.set10(
25 'BMCWEB_ENABLE_MTLS_COMMON_NAME_PARSING_META',
26 get_option('mutual-tls-common-name-parsing') == 'meta',
27)
Nan Zhou307386e2022-10-12 20:29:34 +000028
Ed Tanous36c0f2a2024-02-09 13:50:26 -080029conf_data.set10('BMCWEB_VIRTUAL_MEDIA_VM', get_option('vm-websocket').allowed())
30conf_data.set10('BMCWEB_VIRTUAL_MEDIA_NBD', false)
31
Myung Bae662aa6e2023-01-10 14:20:28 -060032# Logging level
33loglvlopt = get_option('bmcweb-logging')
34if get_option('buildtype').startswith('debug') and loglvlopt == 'disabled'
Ed Tanousf2caadc2024-01-02 18:34:36 -080035 # Override logging level as 'debug' if 'bmcweb-logging' is set as 'dsiabled'
36 loglvlopt = 'debug'
Myung Bae662aa6e2023-01-10 14:20:28 -060037endif
Ed Tanouse7245fe2023-07-24 17:01:38 -070038loglvlopt = loglvlopt.to_upper()
Myung Bae662aa6e2023-01-10 14:20:28 -060039conf_data.set('BMCWEB_LOGGING_LEVEL', loglvlopt)
40
Nan Zhou307386e2022-10-12 20:29:34 +000041conf_h_dep = declare_dependency(
42 include_directories: include_directories('.'),
43 sources: configure_file(
44 input: 'bmcweb_config.h.in',
45 output: 'bmcweb_config.h',
Ed Tanousf2caadc2024-01-02 18:34:36 -080046 configuration: conf_data,
47 ),
Nan Zhou307386e2022-10-12 20:29:34 +000048)
49
50# Configure and install systemd unit files
51
Ed Tanousf2caadc2024-01-02 18:34:36 -080052configure_file(
53 input: 'bmcweb.socket.in',
54 output: 'bmcweb.socket',
55 install_dir: systemd_system_unit_dir,
56 configuration: conf_data,
57 install: true,
58)
Nan Zhou307386e2022-10-12 20:29:34 +000059
Ed Tanousf2caadc2024-01-02 18:34:36 -080060configure_file(
61 input: 'bmcweb.service.in',
62 output: 'bmcweb.service',
63 install_dir: systemd_system_unit_dir,
64 configuration: conf_data,
65 install: true,
66)
Nan Zhou307386e2022-10-12 20:29:34 +000067
68# Copy pam-webserver to etc/pam.d
Ed Tanous0a9c11e2023-05-25 14:32:49 -070069install_data(
Ed Tanousf2caadc2024-01-02 18:34:36 -080070 'pam-webserver',
71 install_dir: '/etc/pam.d/',
72 rename: 'webserver',
Ed Tanous0a9c11e2023-05-25 14:32:49 -070073)