diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-03-22 02:08:15 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-03-26 23:46:15 +0300 |
commit | 4eceffc5e563f588b93ef53c7b35dfd83fad35fc (patch) | |
tree | 8131ae8b650f619fc5df70e791db2917e7eb46e8 /meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb | |
parent | 7a367207514092b07989f7ae3ea175169cbc045f (diff) | |
download | openbmc-4eceffc5e563f588b93ef53c7b35dfd83fad35fc.tar.xz |
certificates: clean up config recipes
Since the config recipe packages will create symlinks to the certificate
manager template, RDEPEND rather than RRECOMMEND on the certificate
manager package (which provides the template).
Avoid obmc-phosphor-systemd. Enabling systemd units is the realm of
packaging scripts and the SYSTEMD_LINK feature in obmc-phosphor-systemd
implements this incorrectly. Just directly code install, pkg_postinst
and pkg_prerm here rather than trying to fix obmc-phosphor-systemd - the
extra indirection is more harmful to ease of comprehension for seasoned
Yocto developers than the couple of lines of code it saves.
(From meta-phosphor rev: 1a4e65e5847e299348b5f28ffa2b4b1837769deb)
Change-Id: Ideb12d62461b3b18ff5c92f3a76f1aa20c94a269
Tested: Built witherspoon image and verified rootfs unchanged.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb')
-rw-r--r-- | meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb index 4e240ad38a..d41de2b599 100644 --- a/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-nslcd-authority-cert-config.bb @@ -5,11 +5,24 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/LICENSE;md5=19407077e42b1ba3d653da313f1f5b4e" -RRECOMMENDS_${PN} = "phosphor-certificate-manager" +RDEPENDS_${PN} = "phosphor-certificate-manager" inherit allarch -inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} = "" -SYSTEMD_ENVIRONMENT_FILE_${PN} = "obmc/cert/authority" -SYSTEMD_LINK_${PN} = "../phosphor-certificate-manager@.service:${SYSTEMD_DEFAULT_TARGET}.wants/phosphor-certificate-manager@authority.service" +SRC_URI = "file://env" + +do_install() { + install -D ${WORKDIR}/env ${D}/${sysconfdir}/default/obmc/cert/authority +} + +pkg_postinst_${PN}() { + LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@authority.service" + TARGET="../phosphor-certificate-manager@.service" + mkdir -p $D$systemd_system_unitdir/multi-user.target.wants + ln -s $TARGET $LINK +} + +pkg_prerm_${PN}() { + LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@authority.service" + rm $LINK +} |