Skip to content

Commit

Permalink
sysutils/bmd: add new ports.
Browse files Browse the repository at this point in the history
PR:		273434
Reported by:	Yuichiro NAITO <naito.yuichiro at gmail.com>
  • Loading branch information
vanillahsu committed Sep 1, 2023
1 parent 4d5ac25 commit c7af9c7
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions sysutils/Makefile
Expand Up @@ -136,6 +136,7 @@
SUBDIR += bksh
SUBDIR += bkt
SUBDIR += blisp
SUBDIR += bmd
SUBDIR += boot-extract
SUBDIR += bottom
SUBDIR += bpytop
Expand Down
21 changes: 21 additions & 0 deletions 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 <bsd.port.mk>
3 changes: 3 additions & 0 deletions 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
24 changes: 24 additions & 0 deletions 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
11 changes: 11 additions & 0 deletions 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
6 changes: 6 additions & 0 deletions 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.
10 changes: 10 additions & 0 deletions 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

0 comments on commit c7af9c7

Please sign in to comment.