diff options
| author | Anton Antonov <Anton.Antonov@arm.com> | 2022-05-20 14:41:32 +0100 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2022-05-23 07:11:55 -0700 |
| commit | 17d7ad92eaad54d2d977e5a08dffb369cf2e61a4 (patch) | |
| tree | c209113966e37fcf5d009099deeaacc164f72ad9 | |
| parent | 8be830dd85846a1a7da18a1a4adb2aa87cba5c78 (diff) | |
| download | meta-security-17d7ad92eaad54d2d977e5a08dffb369cf2e61a4.tar.gz | |
Parsec-service: Update installation procedure
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-parsec/recipes-parsec/parsec-service/files/parsec-tmpfiles.conf | 1 | ||||
| -rw-r--r-- | meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb | 16 |
2 files changed, 10 insertions, 7 deletions
diff --git a/meta-parsec/recipes-parsec/parsec-service/files/parsec-tmpfiles.conf b/meta-parsec/recipes-parsec/parsec-service/files/parsec-tmpfiles.conf index fe576a2..954bfa3 100644 --- a/meta-parsec/recipes-parsec/parsec-service/files/parsec-tmpfiles.conf +++ b/meta-parsec/recipes-parsec/parsec-service/files/parsec-tmpfiles.conf | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | #Type Path Mode User Group Age Argument | 1 | #Type Path Mode User Group Age Argument |
| 2 | d /run/parsec 755 parsec parsec - - | 2 | d /run/parsec 755 parsec parsec - - |
| 3 | d /var/lib/parsec 700 parsec parsec - - | ||
diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb index d1d6c07..ad7e560 100644 --- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb +++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb | |||
| @@ -15,8 +15,8 @@ PACKAGECONFIG ??= "PKCS11 MBED-CRYPTO" | |||
| 15 | have_TPM = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'TPM', '', d)}" | 15 | have_TPM = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'TPM', '', d)}" |
| 16 | PACKAGECONFIG:append = " ${@bb.utils.contains('BBFILE_COLLECTIONS', 'tpm-layer', '${have_TPM}', '', d)}" | 16 | PACKAGECONFIG:append = " ${@bb.utils.contains('BBFILE_COLLECTIONS', 'tpm-layer', '${have_TPM}', '', d)}" |
| 17 | 17 | ||
| 18 | PACKAGECONFIG[ALL] = "all-providers cryptoki/generate-bindings tss-esapi/generate-bindings,,tpm2-tss libts,libts" | 18 | PACKAGECONFIG[ALL] = "all-providers cryptoki/generate-bindings tss-esapi/generate-bindings,,tpm2-tss libts,tpm2-tss libtss2-tcti-device libts" |
| 19 | PACKAGECONFIG[TPM] = "tpm-provider tss-esapi/generate-bindings,,tpm2-tss" | 19 | PACKAGECONFIG[TPM] = "tpm-provider tss-esapi/generate-bindings,,tpm2-tss,tpm2-tss libtss2-tcti-device" |
| 20 | PACKAGECONFIG[PKCS11] = "pkcs11-provider cryptoki/generate-bindings," | 20 | PACKAGECONFIG[PKCS11] = "pkcs11-provider cryptoki/generate-bindings," |
| 21 | PACKAGECONFIG[MBED-CRYPTO] = "mbed-crypto-provider," | 21 | PACKAGECONFIG[MBED-CRYPTO] = "mbed-crypto-provider," |
| 22 | PACKAGECONFIG[CRYPTOAUTHLIB] = "cryptoauthlib-provider," | 22 | PACKAGECONFIG[CRYPTOAUTHLIB] = "cryptoauthlib-provider," |
| @@ -25,6 +25,9 @@ PACKAGECONFIG[TS] = "trusted-service-provider,,libts,libts" | |||
| 25 | PARSEC_FEATURES = "${@d.getVar('PACKAGECONFIG_CONFARGS',True).strip().replace(' ', ',')}" | 25 | PARSEC_FEATURES = "${@d.getVar('PACKAGECONFIG_CONFARGS',True).strip().replace(' ', ',')}" |
| 26 | CARGO_BUILD_FLAGS += " --features ${PARSEC_FEATURES}" | 26 | CARGO_BUILD_FLAGS += " --features ${PARSEC_FEATURES}" |
| 27 | 27 | ||
| 28 | export BINDGEN_EXTRA_CLANG_ARGS | ||
| 29 | BINDGEN_EXTRA_CLANG_ARGS = "--sysroot=${WORKDIR}/recipe-sysroot -I${WORKDIR}/recipe-sysroot/usr/include" | ||
| 30 | |||
| 28 | inherit systemd | 31 | inherit systemd |
| 29 | SYSTEMD_SERVICE:${PN} = "parsec.service" | 32 | SYSTEMD_SERVICE:${PN} = "parsec.service" |
| 30 | 33 | ||
| @@ -35,7 +38,7 @@ INITSCRIPT_NAME = "parsec" | |||
| 35 | # The file should also be included into SRC_URI then | 38 | # The file should also be included into SRC_URI then |
| 36 | PARSEC_CONFIG ?= "${S}/config.toml" | 39 | PARSEC_CONFIG ?= "${S}/config.toml" |
| 37 | 40 | ||
| 38 | do_install:append () { | 41 | do_install () { |
| 39 | # Binaries | 42 | # Binaries |
| 40 | install -d -m 700 -o parsec -g parsec "${D}${libexecdir}/parsec" | 43 | install -d -m 700 -o parsec -g parsec "${D}${libexecdir}/parsec" |
| 41 | install -m 700 -o parsec -g parsec "${WORKDIR}/build/target/${CARGO_TARGET_SUBDIR}/parsec" ${D}${libexecdir}/parsec/parsec | 44 | install -m 700 -o parsec -g parsec "${WORKDIR}/build/target/${CARGO_TARGET_SUBDIR}/parsec" ${D}${libexecdir}/parsec/parsec |
| @@ -44,9 +47,6 @@ do_install:append () { | |||
| 44 | install -d -m 700 -o parsec -g parsec "${D}${sysconfdir}/parsec" | 47 | install -d -m 700 -o parsec -g parsec "${D}${sysconfdir}/parsec" |
| 45 | install -m 400 -o parsec -g parsec "${PARSEC_CONFIG}" ${D}${sysconfdir}/parsec/config.toml | 48 | install -m 400 -o parsec -g parsec "${PARSEC_CONFIG}" ${D}${sysconfdir}/parsec/config.toml |
| 46 | 49 | ||
| 47 | # Data dir | ||
| 48 | install -d -m 700 -o parsec -g parsec "${D}${localstatedir}/lib/parsec" | ||
| 49 | |||
| 50 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 50 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 51 | install -d ${D}${systemd_unitdir}/system | 51 | install -d ${D}${systemd_unitdir}/system |
| 52 | install -m 644 ${S}/systemd-daemon/parsec.service ${D}${systemd_unitdir}/system | 52 | install -m 644 ${S}/systemd-daemon/parsec.service ${D}${systemd_unitdir}/system |
| @@ -58,6 +58,8 @@ do_install:append () { | |||
| 58 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 58 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 59 | install -d ${D}${sysconfdir}/init.d | 59 | install -d ${D}${sysconfdir}/init.d |
| 60 | install -m 755 ${WORKDIR}/parsec_init ${D}${sysconfdir}/init.d/parsec | 60 | install -m 755 ${WORKDIR}/parsec_init ${D}${sysconfdir}/init.d/parsec |
| 61 | # Data dir | ||
| 62 | install -d -m 700 -o parsec -g parsec "${D}${localstatedir}/lib/parsec" | ||
| 61 | fi | 63 | fi |
| 62 | } | 64 | } |
| 63 | 65 | ||
| @@ -65,12 +67,12 @@ inherit useradd | |||
| 65 | USERADD_PACKAGES = "${PN}" | 67 | USERADD_PACKAGES = "${PN}" |
| 66 | USERADD_PARAM:${PN} = "-r -g parsec -s /bin/false -d ${localstatedir}/lib/parsec parsec" | 68 | USERADD_PARAM:${PN} = "-r -g parsec -s /bin/false -d ${localstatedir}/lib/parsec parsec" |
| 67 | GROUPADD_PARAM:${PN} = "-r parsec" | 69 | GROUPADD_PARAM:${PN} = "-r parsec" |
| 70 | GROUPMEMS_PARAM:${PN} = "${@bb.utils.contains('PACKAGECONFIG_CONFARGS', 'tpm-provider', '-a parsec -g tss', '', d)}" | ||
| 68 | 71 | ||
| 69 | FILES:${PN} += " \ | 72 | FILES:${PN} += " \ |
| 70 | ${sysconfdir}/parsec/config.toml \ | 73 | ${sysconfdir}/parsec/config.toml \ |
| 71 | ${libexecdir}/parsec/parsec \ | 74 | ${libexecdir}/parsec/parsec \ |
| 72 | ${systemd_unitdir}/system/parsec.service \ | 75 | ${systemd_unitdir}/system/parsec.service \ |
| 73 | ${localstatedir}/lib/parsec \ | ||
| 74 | ${libdir}/tmpfiles.d/parsec-tmpfiles.conf \ | 76 | ${libdir}/tmpfiles.d/parsec-tmpfiles.conf \ |
| 75 | ${sysconfdir}/init.d/parsec \ | 77 | ${sysconfdir}/init.d/parsec \ |
| 76 | " | 78 | " |
