summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2020-06-02 21:18:36 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2020-08-14 17:11:45 +0300
commit15a8b0e39a5f4a52702a57fe6df48dc1dd45d812 (patch)
tree90963aeeee82d987804612793c5a73ca652c020f /meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
parent9f7ce7d15b9baf16baaa52878eeff68087eb5b0c (diff)
downloadopenbmc-15a8b0e39a5f4a52702a57fe6df48dc1dd45d812.tar.xz
phosphor-misc: Create recipe
Create a recipe for the phosphor-misc repo that creates PACKAGES based on supported configuration options. This allows individual packages to be added to an image such as phosphor-misc-usb-ctrl, phosphor-misc-http-redirect-awk, etc. Tested: - Verified that adding the misc packages to a packagegroup recipe built the desired misc package and the binaries and system service files (if applicable) were installed in the rootfs. Tried different combinations of misc packages such as: phosphor-misc-usb-ctrl phosphor-misc-first-boot-set-mac phosphor-misc-http-redirect-awk - Built an image that included the phosphor-misc-http-redirect-awk package and verified that http://bmc got redirected to https://bmc to the GUI homepage. Masking out the IP addresses: Aug 06 14:31:36 witherspoon-YL10UF78A0H4 systemd[1]: Started Redirect HTTP to HTTPS Per-connection (xxx.xxx.xxx.xxx:62348). Aug 06 14:31:36 witherspoon-YL10UF78A0H4 systemd[1]: http-redirect@1-yyy.yyy.yyy.yyy:80-xxx.xxx.xxx.xxx:62348.service: Succeeded. (From meta-phosphor rev: 9fca92d034489d4179450317e08f1913f30373ab) Change-Id: Ib0d162215c588b1c3e4a29969c4d2178db32eb14 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb')
-rw-r--r--meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb b/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
new file mode 100644
index 000000000..8ad0dae55
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/misc/phosphor-misc_git.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Miscellaneous OpenBMC functions"
+HOMEPAGE = "https://github.com/openbmc/phosphor-misc"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/openbmc/phosphor-misc"
+SRCREV = "aeacd252676fffa9eb8a5dc50f54b923855bd5b2"
+
+S = "${WORKDIR}/git"
+
+inherit meson
+inherit pkgconfig
+inherit systemd
+
+DEPENDS = "systemd"
+
+PHOSPHOR_MISC_PACKAGES = " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'first-boot-set-hostname', '${PN}-first-boot-set-hostname', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'first-boot-set-mac', '${PN}-first-boot-set-mac', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'http-redirect-awk', '${PN}-http-redirect-awk', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'usb-ctrl', '${PN}-usb-ctrl', '', d)} \
+ "
+
+PACKAGES_remove = "${PN}"
+RDEPENDS_${PN}-dev = ""
+
+PACKAGE_BEFORE_PN += "${PHOSPHOR_MISC_PACKAGES}"
+SYSTEMD_PACKAGES = "${PHOSPHOR_MISC_PACKAGES}"
+
+PACKAGECONFIG ??= " \
+ first-boot-set-hostname \
+ first-boot-set-mac \
+ http-redirect-awk \
+ usb-ctrl \
+ "
+
+PACKAGECONFIG[first-boot-set-hostname] = "-Dfirst-boot-set-hostname=enabled, -Dfirst-boot-set-hostname=disabled"
+PACKAGECONFIG[first-boot-set-mac] = "-Dfirst-boot-set-mac=enabled, -Dfirst-boot-set-mac=disabled"
+PACKAGECONFIG[http-redirect-awk] = "-Dhttp-redirect=enabled, -Dhttp-redirect=disabled"
+PACKAGECONFIG[usb-ctrl] = "-Dusb-ctrl=enabled, -Dusb-ctrl=disabled"
+
+# first-boot-set-hostname
+FILES_${PN}-first-boot-set-hostname = "${bindir}/first-boot-set-hostname.sh"
+SYSTEMD_SERVICE_${PN}-first-boot-set-hostname = "first-boot-set-hostname.service"
+
+# first-boot-set-mac
+FILES_${PN}-first-boot-set-mac = "${bindir}/first-boot-set-mac.sh"
+SYSTEMD_SERVICE_${PN}-first-boot-set-mac = "first-boot-set-mac@.service"
+
+# http-redirect-awk
+FILES_${PN}-http-redirect-awk = "${bindir}/http-redirect.awk"
+SYSTEMD_SERVICE_${PN}-http-redirect-awk = " \
+ http-redirect@.service \
+ http-redirect.socket \
+ "
+RDEPENDS_${PN}-http-redirect-awk = "${VIRTUAL-RUNTIME_base-utils}"
+
+# usb-ctrl
+FILES_${PN}-usb-ctrl = "${bindir}/usb-ctrl"