From c7af9c73998dfa653e03a3f3e002fb88e9252339 Mon Sep 17 00:00:00 2001 From: "Vanilla I. Shu" Date: Fri, 1 Sep 2023 10:49:42 +0800 Subject: [PATCH] sysutils/bmd: add new ports. PR: 273434 Reported by: Yuichiro NAITO --- sysutils/Makefile | 1 + sysutils/bmd/Makefile | 21 +++++++++++++++++++++ sysutils/bmd/distinfo | 3 +++ sysutils/bmd/files/patch-Makefile | 24 ++++++++++++++++++++++++ sysutils/bmd/files/patch-rc.d_Makefile | 11 +++++++++++ sysutils/bmd/pkg-descr | 6 ++++++ sysutils/bmd/pkg-plist | 10 ++++++++++ 7 files changed, 76 insertions(+) create mode 100644 sysutils/bmd/Makefile create mode 100644 sysutils/bmd/distinfo create mode 100644 sysutils/bmd/files/patch-Makefile create mode 100644 sysutils/bmd/files/patch-rc.d_Makefile create mode 100644 sysutils/bmd/pkg-descr create mode 100644 sysutils/bmd/pkg-plist diff --git a/sysutils/Makefile b/sysutils/Makefile index bcdd582816b2d..6444f5258e499 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -136,6 +136,7 @@ SUBDIR += bksh SUBDIR += bkt SUBDIR += blisp + SUBDIR += bmd SUBDIR += boot-extract SUBDIR += bottom SUBDIR += bpytop diff --git a/sysutils/bmd/Makefile b/sysutils/bmd/Makefile new file mode 100644 index 0000000000000..e0fb2e1a2c117 --- /dev/null +++ b/sysutils/bmd/Makefile @@ -0,0 +1,21 @@ +PORTNAME= bmd +DISTVERSION= 1.0 +CATEGORIES= sysutils + +MAINTAINER= naito.yuichiro@gmail.com +COMMENT= Bhyve Management Daemon +WWW= https://github.com/yuichiro-naito/bmd + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +# Because bhyve runs on amd64 only. +ONLY_FOR_ARCHS= amd64 + +RUN_DEPENDS= bhyve-firmware>0:sysutils/bhyve-firmware \ + grub2-bhyve>0:sysutils/grub2-bhyve + +USE_GITHUB= yes +GH_ACCOUNT= yuichiro-naito + +.include diff --git a/sysutils/bmd/distinfo b/sysutils/bmd/distinfo new file mode 100644 index 0000000000000..d695dc2a37fe2 --- /dev/null +++ b/sysutils/bmd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1692064885 +SHA256 (yuichiro-naito-bmd-1.0_GH0.tar.gz) = b4bda2a9b334e7e76528e7567f44b311dce42f66517ffa4558c343c32ebe874e +SIZE (yuichiro-naito-bmd-1.0_GH0.tar.gz) = 56450 diff --git a/sysutils/bmd/files/patch-Makefile b/sysutils/bmd/files/patch-Makefile new file mode 100644 index 0000000000000..f55cdd8d0099a --- /dev/null +++ b/sysutils/bmd/files/patch-Makefile @@ -0,0 +1,24 @@ +--- Makefile.orig 2023-08-13 14:58:56 UTC ++++ Makefile +@@ -1,11 +1,21 @@ LOCALBASE?= /usr/local + MK_DEBUG_FILES?= no + LOCALBASE?= /usr/local ++BINOWN!= id -u ++BINGRP!= id -g ++DIROWN= $(BINOWN) ++DIRGRP= $(BINGRP) ++SHAREOWN= $(BINOWN) ++SHAREGRP= $(BINGRP) + SUBDIR= rc.d + BINDIR= $(LOCALBASE)/sbin + MANDIR= $(LOCALBASE)/man/man + DIRS= UEFIVARDIR PLUGINDIR + UEFIVARDIR= $(LOCALBASE)/var/cache/bmd ++UEFIVARDIR_OWN= $(BINOWN) ++UEFIVARDIR_GRP= $(BINGRP) + PLUGINDIR= $(LOCALBASE)/libexec/bmd ++PLUGINDIR_OWN= $(BINOWN) ++PLUGINDIR_GRP= $(BINGRP) + PROG= bmd + MAN= bmd.8 bmdctl.8 bmd.conf.5 + LINKS= ${BINDIR}/bmd ${BINDIR}/bmdctl diff --git a/sysutils/bmd/files/patch-rc.d_Makefile b/sysutils/bmd/files/patch-rc.d_Makefile new file mode 100644 index 0000000000000..3551d9dce548b --- /dev/null +++ b/sysutils/bmd/files/patch-rc.d_Makefile @@ -0,0 +1,11 @@ +--- rc.d/Makefile.orig 2023-08-08 05:39:45 UTC ++++ rc.d/Makefile +@@ -2,6 +2,8 @@ SCRIPTSDIR= $(LOCALBASE)/etc/rc.d + SCRIPTS= bmd + SCRIPTSNAME_bmd=bmd + SCRIPTSDIR= $(LOCALBASE)/etc/rc.d ++SCRIPTSOWN!= id -u ++SCRIPTSGRP!= id -g + + bmd: bmd.in + sed 's|%%LOCALBASE%%|$(LOCALBASE)|' < bmd.in > bmd diff --git a/sysutils/bmd/pkg-descr b/sysutils/bmd/pkg-descr new file mode 100644 index 0000000000000..377312715276c --- /dev/null +++ b/sysutils/bmd/pkg-descr @@ -0,0 +1,6 @@ +The bmd is a light-weight bhyve management daemon that handles bhyve processes +according to the configuration file. And also includes a command line tool that +supports booting VM, shutdown VM, connecting to com console, listing VMs. +The configuration file syntax looks similar to jail.conf(5) and extends +template feature that contains a part of VM configurations common to multiple +VMs. The bmd supports plugins to extend the functionality. diff --git a/sysutils/bmd/pkg-plist b/sysutils/bmd/pkg-plist new file mode 100644 index 0000000000000..95fec6b2de11a --- /dev/null +++ b/sysutils/bmd/pkg-plist @@ -0,0 +1,10 @@ +etc/rc.d/bmd +etc/bmd.conf.example +include/bmd_plugin.h +man/man5/bmd.conf.5.gz +man/man8/bmd.8.gz +man/man8/bmdctl.8.gz +sbin/bmd +sbin/bmdctl +@dir libexec/bmd +@dir var/cache/bmd