diff --git a/sysutils/cbsd/Makefile b/sysutils/cbsd/Makefile index 5d3c69a5cd85..e86df2c437da 100644 --- a/sysutils/cbsd/Makefile +++ b/sysutils/cbsd/Makefile @@ -1,58 +1,59 @@ PORTNAME= cbsd DISTVERSION= 13.0.14 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= olevole@olevole.ru COMMENT= Yet another FreeBSD Jail, XEN and Bhyve Management Utility LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libsqlite3.so:databases/sqlite3 \ libssh2.so:security/libssh2 RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss \ rsync:net/rsync \ sqlite3:databases/sqlite3 \ sudo:security/sudo USES= compiler:c++11-lang libedit pkgconfig:both USE_GITHUB= yes USE_RC_SUBR= cbsdd cbsdrsyncd cbsd-statsd-bhyve cbsd-statsd-hoster \ cbsd-statsd-jail MAKE_JOBS_UNSAFE= yes SUB_FILES= pkg-deinstall pkg-message USERS= ${PORTNAME} GROUPS= ${PORTNAME} CBSD_HOME?= ${PREFIX}/cbsd .include .if ${ARCH} == amd64 || ${ARCH} == i386 PLIST_SUB= X86="" .else PLIST_SUB= X86="@comment " .endif do-install: @${ECHO} "Installing in ${CBSD_HOME}" ${MKDIR} ${STAGEDIR}${CBSD_HOME} ${CP} -a ${WRKSRC}/ ${STAGEDIR}${CBSD_HOME} ${INSTALL_PROGRAM} -s ${WRKSRC}/bin/cbsdsh/cbsd ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} -s ${WRKSRC}/misc/src/sipcalc/sipcalc \ ${STAGEDIR}${PREFIX}/cbsd/misc/sipcalc ${RM} -rf ${STAGEDIR}${PREFIX}/cbsd/bin/cbsdsh \ ${STAGEDIR}${PREFIX}/cbsd/bin/src \ ${STAGEDIR}${PREFIX}/cbsd/lib \ ${STAGEDIR}${PREFIX}/cbsd/misc/src \ ${STAGEDIR}${PREFIX}/cbsd/sbin/src \ ${STAGEDIR}${PREFIX}/cbsd/tools/src ${INSTALL_MAN} ${WRKSRC}/man/cbsd.8 ${STAGEDIR}${PREFIX}/man/man8/cbsd.8 post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/bsdconfig @${LN} -sf ${CBSD_HOME}/share/bsdconfig/cbsd ${STAGEDIR}${PREFIX}/libexec/bsdconfig/cbsd .include diff --git a/sysutils/cbsd/files/patch-sudoexec_initenv b/sysutils/cbsd/files/patch-sudoexec_initenv new file mode 100644 index 000000000000..2d7d12b09058 --- /dev/null +++ b/sysutils/cbsd/files/patch-sudoexec_initenv @@ -0,0 +1,13 @@ +--- sudoexec/initenv.orig 2021-09-05 15:55:48 UTC ++++ sudoexec/initenv +@@ -683,6 +683,10 @@ phase5() + env workdir=${workdir} /usr/local/bin/cbsd ${miscdir}/updatesql ${dbdir}/inv.${nodename}.sqlite ${distdir}/share/local-xen.schema xen + env workdir=${workdir} /usr/local/bin/cbsd ${miscdir}/updatesql ${dbdir}/inv.${nodename}.sqlite ${distdir}/share/local-vnetnic.schema vnetnic + env workdir=${workdir} /usr/local/bin/cbsd ${miscdir}/updatesql ${dbdir}/inv.${nodename}.sqlite ${distdir}/share/local-vmpackages.schema vmpackages ++ _tmpval=$( ${miscdir}/sqlcli ${dbdir}/local.sqlite "SELECT name FROM vmpackages WHERE name=\"small1\" LIMIT 1" ) ++ if [ -z "${_tmpval}" ]; then ++ ${miscdir}/sqlcli ${dbdir}/local.sqlite "INSERT INTO vmpackages ( name, pkg_vm_cpus, pkg_vm_ram, pkg_vm_disk, owner ) VALUES ( 'small1', '1', '1g', '10g', 'admin' )" ++ fi + env workdir=${workdir} /usr/local/bin/cbsd ${miscdir}/updatesql ${dbdir}/inv.${nodename}.sqlite ${distdir}/share/local-vm_cpu_topology.schema vm_cpu_topology + env workdir=${workdir} /usr/local/bin/cbsd ${miscdir}/updatesql ${dbdir}/cbsdtaskd.sqlite ${distdir}/share/cbsdtaskd-taskd.schema taskd + env workdir=${workdir} /usr/local/bin/cbsd ${miscdir}/updatesql ${dbdir}/vpnet.sqlite ${distdir}/share/vpnet-vpnet.schema vpnet