summaryrefslogtreecommitdiff
path: root/meta-google/recipes-extended
diff options
context:
space:
mode:
authorWilly Tu <wltu@google.com>2021-02-12 23:16:25 +0300
committerWilliam A. Kennington III <wak@google.com>2021-02-17 00:42:17 +0300
commit89505a05d9c00836e3f7834901528f4f63edc289 (patch)
tree76fc37f817a0a3e98853f2d0da67cc6c8a42eae0 /meta-google/recipes-extended
parent74a3a8aef4287dddc77c11d70c0c19401c461991 (diff)
downloadopenbmc-89505a05d9c00836e3f7834901528f4f63edc289.tar.xz
meta-google: recipes-extended: networking: mstpd: Import from gBMC
Initial recipes-extended/networking mstpd code from gBMC. Google-Bug-Id: 179618485 Upstream: 8ac594bdf054082ca6dbe35c4345759fe4c31669 Change-Id: Ia8a39b1f502283c9b0e1273bc28d9b7046a34164 Signed-off-by: Willy Tu <wltu@google.com>
Diffstat (limited to 'meta-google/recipes-extended')
-rw-r--r--meta-google/recipes-extended/networking/files/bridge-stp31
-rw-r--r--meta-google/recipes-extended/networking/files/mstpd.service12
-rw-r--r--meta-google/recipes-extended/networking/mstpd_git.bb29
3 files changed, 72 insertions, 0 deletions
diff --git a/meta-google/recipes-extended/networking/files/bridge-stp b/meta-google/recipes-extended/networking/files/bridge-stp
new file mode 100644
index 000000000..c874f4420
--- /dev/null
+++ b/meta-google/recipes-extended/networking/files/bridge-stp
@@ -0,0 +1,31 @@
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/yrutschle/sslh"
+SRCREV = "de8e5725c27ba6941f47254e6fcb485e94f2de35"
+S = "${WORKDIR}/git"
+
+inherit perlnative
+
+DEPENDS += "conf2struct-native"
+DEPENDS += "libbsd"
+DEPENDS += "libcap"
+DEPENDS += "libconfig"
+DEPENDS += "systemd"
+DEPENDS += "pcre"
+
+EXTRA_OEMAKE += "DESTDIR=${D}"
+EXTRA_OEMAKE += "PREFIX=${prefix}"
+EXTRA_OEMAKE += "USELIBCAP=1"
+EXTRA_OEMAKE += "USELIBBSD=1"
+EXTRA_OEMAKE += "USESYSTEMD=1"
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake install
+}
diff --git a/meta-google/recipes-extended/networking/files/mstpd.service b/meta-google/recipes-extended/networking/files/mstpd.service
new file mode 100644
index 000000000..ef8303416
--- /dev/null
+++ b/meta-google/recipes-extended/networking/files/mstpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Multiple Spanning Tree Protocol Daemon
+Before=network-pre.target
+Wants=network-pre.target
+
+[Service]
+Restart=always
+Type=simple
+ExecStart=/usr/sbin/mstpd -d -v 3
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-google/recipes-extended/networking/mstpd_git.bb b/meta-google/recipes-extended/networking/mstpd_git.bb
new file mode 100644
index 000000000..4c3f4abc2
--- /dev/null
+++ b/meta-google/recipes-extended/networking/mstpd_git.bb
@@ -0,0 +1,29 @@
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4325afd396febcb659c36b49533135d4"
+
+SRC_URI = "git://github.com/mstpd/mstpd"
+SRCREV = "973c403c79f3d419d9e93a242766ddf0099d1299"
+S = "${WORKDIR}/git"
+
+SRC_URI += "file://bridge-stp"
+SRC_URI += "file://mstpd.service"
+
+inherit autotools pkgconfig systemd
+
+PACKAGES =+ "${PN}-mstpd"
+FILES_${PN}-mstpd = "${sbindir}/mstpd ${sbindir}/mstpctl /sbin/bridge-stp"
+
+SYSTEMD_PACKAGES = "${PN}-mstpd"
+SYSTEMD_SERVICE_${PN}-mstpd = "mstpd.service"
+
+do_install_append() {
+ rm -r ${D}${libexecdir}
+
+ install -d -m 0755 ${D}/sbin
+ install -m 0755 ${WORKDIR}/bridge-stp ${D}/sbin
+
+ install -d -m 0755 ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/mstpd.service ${D}${systemd_system_unitdir}/
+}