Page MenuHomeFreeBSD

sylve.diff

Authored By
dtxdf
Sep 7 2025, 8:38 PM
Size
7 KB
Referenced Files
None
Subscribers
None

sylve.diff

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 191d09f0c13a..db45081dcf6e 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1348,6 +1348,7 @@
SUBDIR += swapusage
SUBDIR += sweeper
SUBDIR += swtpm
+ SUBDIR += sylve
SUBDIR += symlinks
SUBDIR += symon
SUBDIR += synergy
diff --git a/sysutils/sylve/Makefile b/sysutils/sylve/Makefile
new file mode 100644
index 000000000000..fb69fea9b41d
--- /dev/null
+++ b/sysutils/sylve/Makefile
@@ -0,0 +1,75 @@
+PORTNAME= sylve
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.0.1
+CATEGORIES= sysutils
+
+MAINTAINER= hayzam@alchemilla.io
+COMMENT= Lightweight GUI for managing Bhyve, Jails, ZFS, networking
+WWW= https://github.com/alchemillahq/sylve
+
+LICENSE= BSD2CLAUSE
+
+ONLY_FOR_ARCHS= aarch64 amd64
+
+BUILD_DEPENDS= npm-node20>0:www/npm-node20
+RUN_DEPENDS= bhyve-firmware>0:sysutils/bhyve-firmware \
+ dnsmasq>0:dns/dnsmasq \
+ samba419>=0:net/samba419 \
+ smartmontools>=0:sysutils/smartmontools \
+ tmux>=0:sysutils/tmux \
+ virsh:devel/libvirt
+
+USES= go:modules nodejs:20,build
+USE_RC_SUBR= ${PORTNAME}
+
+GO_MODULE= github.com/alchemillahq/sylve
+
+GO_TARGET= ./cmd/sylve
+
+NPM_BIN= ${LOCALBASE}/bin/npm
+
+# to rebuild the deps archive:
+# 1. set DEV_UPDATE_MODE=yes
+# 2. make makesum build
+# 3. upload the *-cache archive
+# 4. set DEV_UPDATE_MODE=no
+# 5. make clean makesum
+
+DEV_UPDATE_MODE= no
+DEPS_CACHE_DIR= ${WRKSRC}/web
+
+.if (${DEV_UPDATE_MODE} == "yes")
+NPM_ARGS= install
+post-patch:
+ @${RM} ${WKRSRC}/web/package-lock.json
+
+post-build:
+ @cd ${DEPS_CACHE_DIR} && ${TAR} czf ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-cache-${ARCH}-${DISTVERSION}${EXTRACT_SUFX} node_modules
+ @${ECHO} "(!!!) Please upload the cache archive: ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-cache-${ARCH}-${DISTVERSION}${EXTRACT_SUFX}"
+.else
+MASTER_SITES+= LOCAL/acm/sylve/:npm_cache
+DISTFILES+= ${PORTNAME}-cache-${ARCH}-${DISTVERSION}${EXTRACT_SUFX}:npm_cache
+NPM_ARGS= run build
+
+post-extract:
+ @${MV} ${WRKDIR}/node_modules ${WRKSRC}/web
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/config.example.json
+.endif
+
+pre-build:
+ @${MKDIR} ${WRKSRC}/web/build
+ @cd ${WRKSRC}/web && \
+ ${NPM_BIN} ${NPM_ARGS}
+ @cd ${WRKSRC}/web/build && \
+ ${COPYTREE_SHARE} . ${WRKSRC}/internal/assets/web-files/
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/sbin/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/config.example.json ${STAGEDIR}${ETCDIR}/config.json.sample
+
+.include <bsd.port.mk>
diff --git a/sysutils/sylve/distinfo b/sysutils/sylve/distinfo
new file mode 100644
index 000000000000..feb148dfb528
--- /dev/null
+++ b/sysutils/sylve/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1757118755
+SHA256 (go/sysutils_sylve/sylve-v0.0.1/sylve-cache-amd64-0.0.1.tar.gz) = f5694f744a53f49925dc294ccc88165399b0019ee1b7d00139fd6d8dc39f6e0e
+SIZE (go/sysutils_sylve/sylve-v0.0.1/sylve-cache-amd64-0.0.1.tar.gz) = 52038996
+SHA256 (go/sysutils_sylve/sylve-v0.0.1/sylve-cache-aarch64-0.0.1.tar.gz) = f99c32aaac78499e2b6888c64282eb463861bacfc06de4a44f10241fa884428a
+SIZE (go/sysutils_sylve/sylve-v0.0.1/sylve-cache-aarch64-0.0.1.tar.gz) = 48331293
+SHA256 (go/sysutils_sylve/sylve-v0.0.1/v0.0.1.mod) = 4c781a74a960c9621af9542b317e93b34854e48d9d0e84e2015e00a4dceb5d9e
+SIZE (go/sysutils_sylve/sylve-v0.0.1/v0.0.1.mod) = 4391
+SHA256 (go/sysutils_sylve/sylve-v0.0.1/v0.0.1.zip) = f0ef44138c55d8fafebb665860b64a7cfe7b873f8f35ef4209c5dd891065af64
+SIZE (go/sysutils_sylve/sylve-v0.0.1/v0.0.1.zip) = 2286786
diff --git a/sysutils/sylve/files/patch-config.example.json b/sysutils/sylve/files/patch-config.example.json
new file mode 100644
index 000000000000..2c6597a1c2af
--- /dev/null
+++ b/sysutils/sylve/files/patch-config.example.json
@@ -0,0 +1,10 @@
+--- config.example.json.orig 2025-09-06 01:07:24 UTC
++++ config.example.json
+@@ -6,6 +6,7 @@
+ "email": "admin@sylve.local",
+ "password": "admin"
+ },
++ "DataPath":"%%DATADIR%%",
+ "logLevel": 0,
+ "port": 8181
+ }
diff --git a/sysutils/sylve/files/pkg-message.in b/sysutils/sylve/files/pkg-message.in
new file mode 100644
index 000000000000..9f914ccf93a2
--- /dev/null
+++ b/sysutils/sylve/files/pkg-message.in
@@ -0,0 +1,37 @@
+[
+{ type: install
+ message: <<EOM
+sylve was installed
+
+1) sylve sample config file is located at %%ETCDIR%%/config.json.sample. Make
+ a copy and change it following your own needs.
+
+ # cp %%ETCDIR%%/config.json.sample %%ETCDIR%%/config.json
+
+2) By default, sylve datadir is located at %%DATADIR%% directory. Change it from
+ %%ETCDIR%%/config.json config file.
+
+3) The following is the minimal configuration that you must add to /etc/rc.conf
+
+ ntpd_enable="YES" # Optional
+ ntpd_sync_on_start="YES" # Optional
+ zfs_enable="YES"
+ linux_enable="YES" # Optional
+ libvirtd_enable="YES"
+ dnsmasq_enable="YES"
+ rpcbind_enable="YES"
+ nfs_server_enable="YES"
+ mountd_enable="YES"
+ samba_server_enable="YES"
+
+4) Enable rctl adding the following line to /boot/loader.conf
+
+ kern.racct.enable=1
+
+ Reboot your system after adding those entries to ensure that the services are
+ started correctly and the kernel modules are loaded.
+
+5) Enjoy it ;)
+EOM
+}
+]
diff --git a/sysutils/sylve/files/sylve.in b/sysutils/sylve/files/sylve.in
new file mode 100644
index 000000000000..a88b4e80aebb
--- /dev/null
+++ b/sysutils/sylve/files/sylve.in
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# PROVIDE: sylve
+# REQUIRE: DAEMON NETWORKING
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable sylve:
+#
+# sylve_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable sylve.
+# sylve_user (user): Set to "www" by default.
+# User to run sylve as.
+# sylve_group (group): Set to "www" by default.
+# Group to run sylve as.
+# sylve_args (str): Set to "-config %%ETCDIR%%/config.json" by default.
+# Extra flags passed to sylve.
+
+. /etc/rc.subr
+
+name=sylve
+rcvar=sylve_enable
+
+load_rc_config $name
+
+: ${sylve_enable:="NO"}
+: ${sylve_user:="root"}
+: ${sylve_group:="wheel"}
+: ${sylve_args:="-config %%ETCDIR%%/config.json"}
+
+export PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
+
+pidfile="/var/run/${name}.pid"
+procname="%%PREFIX%%/sbin/sylve"
+command="/usr/sbin/daemon"
+command_args="-f -c -T ${name} -p ${pidfile} ${procname} ${sylve_args}"
+
+start_precmd=sylve_startprecmd
+
+sylve_startprecmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install -o ${sylve_user} -g ${sylve_group} /dev/null ${pidfile};
+ fi
+}
+
+run_rc_command "$1"
diff --git a/sysutils/sylve/pkg-descr b/sysutils/sylve/pkg-descr
new file mode 100644
index 000000000000..e97d487cef06
--- /dev/null
+++ b/sysutils/sylve/pkg-descr
@@ -0,0 +1,5 @@
+Sylve is a lightweight, open-source virtualization platform for FreeBSD,
+leveraging Bhyve for VMs and Jails for containerization, with deep ZFS
+integration. It provides a streamlined, Proxmox-like experience tailored for
+FreeBSD environments. Its backend is written in Go, and the frontend is written
+in Svelte (with Kit), integrated into a single binary for easy deployment.
diff --git a/sysutils/sylve/pkg-plist b/sysutils/sylve/pkg-plist
new file mode 100644
index 000000000000..9813ec1fa50b
--- /dev/null
+++ b/sysutils/sylve/pkg-plist
@@ -0,0 +1,3 @@
+@sample %%ETCDIR%%/config.json.sample
+sbin/sylve
+@dir %%DATADIR%%

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
22229180
Default Alt Text
sylve.diff (7 KB)

Event Timeline

dtxdf changed the visibility from "dtxdf (Jesús Daniel Colmenares Oviedo)" to "Public (No Login Required)".Sep 7 2025, 8:46 PM