diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2023-01-27 13:30:47 +0100 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2023-01-28 10:22:30 -0500 |
commit | 7eed4a60f594a1a90906acf3b3416d16c53bc72a (patch) | |
tree | e6050e37f1b3da731bd51f853d08e396df136d47 | |
parent | 92f04c78f0ed202b14e274367bec3fbc12cc0305 (diff) | |
download | meta-security-7eed4a60f594a1a90906acf3b3416d16c53bc72a.tar.gz |
samhain: rework due to changed cache handling
OE-Core changed the cache handling which made the use of ${BPN} no fail.
| Parsing recipes...WARNING: .../samhain-standalone.bb: Exception during build_dependencies for do_configure
| WARNING: .../samhain-standalone.bb: Error during finalise of .../samhain-standalone.bb
| ERROR: ExpansionError during parsing .../samhain-standalone.bb
| Traceback (most recent call last):
| File "Var <MODE_NAME>", line 1, in <module>
| bb.data_smart.ExpansionError: Failure expanding variable MODE_NAME, expression was ${@d.getVar('BPN').split('-')[1]} which triggered exception IndexError: list index out of range
| The variable dependency chain for the failure is: MODE_NAME -> SAMHAIN_MODE -> do_configure
Simplify the setting of MODE_NAME and SAMHAIN_MODE by setting them
in the recipe files where we know their values.
bitbake:
ee89ade5 cache/codeparser: Switch to a new BB_CACHEDIR variable for cache location
oe-core:
7c15e03dd3 bitbake.conf: Add BB_HASH_CODEPARSER_VALS
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | recipes-ids/samhain/samhain-client.bb | 3 | ||||
-rw-r--r-- | recipes-ids/samhain/samhain-server.bb | 3 | ||||
-rw-r--r-- | recipes-ids/samhain/samhain-standalone.bb | 3 | ||||
-rw-r--r-- | recipes-ids/samhain/samhain.inc | 8 |
4 files changed, 9 insertions, 8 deletions
diff --git a/recipes-ids/samhain/samhain-client.bb b/recipes-ids/samhain/samhain-client.bb index 2b99e20..0de9c34 100644 --- a/recipes-ids/samhain/samhain-client.bb +++ b/recipes-ids/samhain/samhain-client.bb | |||
@@ -8,5 +8,8 @@ EXTRA_OECONF += " \ | |||
8 | --with-port=${SAMHAIN_PORT} \ | 8 | --with-port=${SAMHAIN_PORT} \ |
9 | " | 9 | " |
10 | 10 | ||
11 | MODE_NAME = "client" | ||
12 | SAMHAIN_MODE = "client" | ||
13 | |||
11 | RDEPENDS:${PN} = "acl zlib attr bash" | 14 | RDEPENDS:${PN} = "acl zlib attr bash" |
12 | RCONFLICTS:${PN} = "samhain-standalone" | 15 | RCONFLICTS:${PN} = "samhain-standalone" |
diff --git a/recipes-ids/samhain/samhain-server.bb b/recipes-ids/samhain/samhain-server.bb index 51bce07..8bae2d2 100644 --- a/recipes-ids/samhain/samhain-server.bb +++ b/recipes-ids/samhain/samhain-server.bb | |||
@@ -8,6 +8,9 @@ SRC_URI += "file://samhain-server-volatiles \ | |||
8 | file://samhain-server-volatiles.conf \ | 8 | file://samhain-server-volatiles.conf \ |
9 | " | 9 | " |
10 | 10 | ||
11 | MODE_NAME = "server" | ||
12 | SAMHAIN_MODE = "server" | ||
13 | |||
11 | TARGET_CC_ARCH += "${LDFLAGS}" | 14 | TARGET_CC_ARCH += "${LDFLAGS}" |
12 | 15 | ||
13 | do_install:append() { | 16 | do_install:append() { |
diff --git a/recipes-ids/samhain/samhain-standalone.bb b/recipes-ids/samhain/samhain-standalone.bb index b832dc8..ae9ed2b 100644 --- a/recipes-ids/samhain/samhain-standalone.bb +++ b/recipes-ids/samhain/samhain-standalone.bb | |||
@@ -7,6 +7,9 @@ SRC_URI += "file://samhain-not-run-ptest-on-host.patch \ | |||
7 | 7 | ||
8 | PROVIDES += "samhain" | 8 | PROVIDES += "samhain" |
9 | 9 | ||
10 | MODE_NAME = "standalone" | ||
11 | SAMHAIN_MODE = "no" | ||
12 | |||
10 | SYSTEMD_SERVICE:${PN} = "samhain.service" | 13 | SYSTEMD_SERVICE:${PN} = "samhain.service" |
11 | 14 | ||
12 | inherit ptest | 15 | inherit ptest |
diff --git a/recipes-ids/samhain/samhain.inc b/recipes-ids/samhain/samhain.inc index eb8592d..8967d72 100644 --- a/recipes-ids/samhain/samhain.inc +++ b/recipes-ids/samhain/samhain.inc | |||
@@ -40,14 +40,6 @@ SYSTEMD_PACKAGES = "${PN}" | |||
40 | SYSTEMD_SERVICE:${PN} = "${INITSCRIPT_NAME}.service" | 40 | SYSTEMD_SERVICE:${PN} = "${INITSCRIPT_NAME}.service" |
41 | SYSTEMD_AUTO_ENABLE = "disable" | 41 | SYSTEMD_AUTO_ENABLE = "disable" |
42 | 42 | ||
43 | # mode mapping: | ||
44 | # BPN MODE_NAME SAMHAIN_MODE | ||
45 | # samhain-standalone standalone no | ||
46 | # samhain-client client client | ||
47 | # samhain-server server server | ||
48 | MODE_NAME = "${@d.getVar('BPN').split('-')[1]}" | ||
49 | SAMHAIN_MODE = "${@oe.utils.ifelse(d.getVar('MODE_NAME') == 'standalone', 'no', '${MODE_NAME}')}" | ||
50 | |||
51 | # supports mysql|postgresql|oracle|odbc but postgresql is the only one available | 43 | # supports mysql|postgresql|oracle|odbc but postgresql is the only one available |
52 | 44 | ||
53 | PACKAGECONFIG ??= "postgresql ps \ | 45 | PACKAGECONFIG ??= "postgresql ps \ |