Ed Tanous | 2c2a1c5 | 2018-01-29 10:56:52 -0800 | [diff] [blame] | 1 | LICENSE = "Apache-2.0" |
Andrew Geissler | e11f5e2 | 2021-07-20 18:10:59 +0000 | [diff] [blame] | 2 | LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e" |
Ed Tanous | 07f48cc | 2021-02-22 10:49:30 -0800 | [diff] [blame] | 3 | DEPENDS = " \ |
| 4 | openssl \ |
| 5 | zlib \ |
| 6 | boost \ |
Ed Tanous | 07f48cc | 2021-02-22 10:49:30 -0800 | [diff] [blame] | 7 | libpam \ |
| 8 | sdbusplus \ |
| 9 | gtest \ |
| 10 | nlohmann-json \ |
| 11 | libtinyxml2 \ |
Ed Tanous | a994d3a | 2021-06-16 12:44:37 -0700 | [diff] [blame] | 12 | nghttp2 \ |
Ed Tanous | a443c54 | 2021-02-26 13:28:37 -0800 | [diff] [blame] | 13 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'gtest', '', d)} \ |
| 14 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'gmock', '', d)} \ |
Ed Tanous | 07f48cc | 2021-02-22 10:49:30 -0800 | [diff] [blame] | 15 | " |
Andrew Geissler | 37a9f96 | 2024-03-28 11:00:42 -0500 | [diff] [blame] | 16 | SRCREV = "f0b59af46a6aa84890d2181b08d4e1af5ce5002f" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 17 | PV = "1.0+git${SRCPV}" |
Ed Tanous | 2c2a1c5 | 2018-01-29 10:56:52 -0800 | [diff] [blame] | 18 | |
Patrick Williams | 0b73b98 | 2023-01-26 10:24:41 -0600 | [diff] [blame] | 19 | SRC_URI = "git://github.com/openbmc/bmcweb.git;branch=master;protocol=https" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 20 | SRC_URI += " \ |
| 21 | file://run-ptest \ |
Ed Tanous | 07f48cc | 2021-02-22 10:49:30 -0800 | [diff] [blame] | 22 | " |
Adriana Kobylak | 7e0ff54f | 2018-12-13 11:01:05 -0600 | [diff] [blame] | 23 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 24 | S = "${WORKDIR}/git" |
| 25 | SYSTEMD_SERVICE:${PN} += "bmcweb.service bmcweb.socket" |
Ed Tanous | a443c54 | 2021-02-26 13:28:37 -0800 | [diff] [blame] | 26 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 27 | inherit systemd |
| 28 | inherit useradd |
| 29 | inherit pkgconfig meson ptest |
Ed Tanous | 2c2a1c5 | 2018-01-29 10:56:52 -0800 | [diff] [blame] | 30 | |
Patrick Williams | 4b5fdfa | 2024-02-23 09:35:19 -0600 | [diff] [blame] | 31 | PACKAGECONFIG ??= "mutual-tls-auth" |
Patrick Williams | a758752 | 2023-06-13 14:43:24 -0500 | [diff] [blame] | 32 | PACKAGECONFIG[insecure-redfish-expand]="-Dinsecure-enable-redfish-query=enabled" |
Patrick Williams | 4b5fdfa | 2024-02-23 09:35:19 -0600 | [diff] [blame] | 33 | PACKAGECONFIG[mutual-tls-auth]="-Dmutual-tls-auth=enabled,-Dmutual-tls-auth=disabled" |
Patrick Williams | a758752 | 2023-06-13 14:43:24 -0500 | [diff] [blame] | 34 | |
Patrick Williams | de59cd5 | 2024-02-23 09:46:37 -0600 | [diff] [blame] | 35 | MUTUAL_TLS_PARSING="username" |
| 36 | |
Ed Tanous | a443c54 | 2021-02-26 13:28:37 -0800 | [diff] [blame] | 37 | EXTRA_OEMESON = " \ |
| 38 | --buildtype=minsize \ |
| 39 | -Dtests=${@bb.utils.contains('PTEST_ENABLED', '1', 'enabled', 'disabled', d)} \ |
Patrick Williams | de59cd5 | 2024-02-23 09:46:37 -0600 | [diff] [blame] | 40 | ${@bb.utils.contains('PACKAGECONFIG', 'mutual-tls-auth', \ |
| 41 | '-Dmutual-tls-common-name-parsing=' + d.getVar('MUTUAL_TLS_PARSING', True), \ |
| 42 | '', d)} \ |
Ed Tanous | a443c54 | 2021-02-26 13:28:37 -0800 | [diff] [blame] | 43 | " |
Ed Tanous | 2c2a1c5 | 2018-01-29 10:56:52 -0800 | [diff] [blame] | 44 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 45 | do_install_ptest() { |
| 46 | install -d ${D}${PTEST_PATH}/test |
| 47 | cp -rf ${B}/*_test ${D}${PTEST_PATH}/test/ |
| 48 | } |
Ed Tanous | 2c2a1c5 | 2018-01-29 10:56:52 -0800 | [diff] [blame] | 49 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 50 | RDEPENDS:${PN} += " \ |
| 51 | jsnbd \ |
Patrick Williams | 0450a02 | 2022-10-07 21:23:47 -0500 | [diff] [blame] | 52 | phosphor-objmgr \ |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 53 | " |
| 54 | |
| 55 | FILES:${PN} += "${datadir}/** " |
| 56 | |
| 57 | USERADD_PACKAGES = "${PN}" |
| 58 | # add a user called httpd for the server to assume |
| 59 | USERADD_PARAM:${PN} = "-r -s /sbin/nologin bmcweb" |
| 60 | |
Ninad Palsule | 34d2144 | 2023-03-09 10:20:38 -0600 | [diff] [blame] | 61 | GROUPADD_PARAM:${PN} = "web; redfish; hostconsole" |
Andrew Jeffery | 224f26f | 2023-03-10 12:38:57 +1030 | [diff] [blame] | 62 | FULL_OPTIMIZATION:append = " -Os" |