From nobody Wed Dec 20 13:12:02 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SwDVW0QrYz54x70; Wed, 20 Dec 2023 13:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SwDVV6mXQz4V3D; Wed, 20 Dec 2023 13:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703077922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2YEJh2bpw5TMKR6En5r71qMMQPnL23zkNGnr0n1//Jw=; b=SfmZbxa+iVp4s9PgWgo6sobNZav7PalwU2yQ2f+dR9kxn0bJoGBuDH1npJpnhw0U8TKpM9 hCV7xZp6ONLGOtns6Gt/moAhc7xfy78Mn5FZ0rNRxPNqk47EKDd96EsUknfKpdvyW1b8zV o5/UT61T2rKlqDcdiI0NjHTcqd6NHwBr6qXXOfR5cknBUhJpVOe6sO14Isv5h91d7/z1VG VB/2DKaye/TWcLTvQZUgP2pE94+YCEwlYBPeNe447YjuTpGDu+hgVVB7qPmvH7wJ2PQjrQ 9YlVF1kYOyObMWbouIpWpZAkMzxyhDqV3YXwr2MUeKITIIr3EifCvO8l3AblKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703077922; a=rsa-sha256; cv=none; b=nyFDcLG7tWR+hyAaiNYoZGH4+vrn334Vm16pvbRjxFTLWvaQvPeQunTt8r6v74oto5+Kh9 hHib1HF5LZi/duJWpfVEdZTWnKHkFHVEfhqrQiBfYHcnWC1g4zsyS0pNU/JOtbHkmTYKC0 MZjxs8hpulZQz+i8QFJSJd5U9Pm6yZQyWRpcepKm/lN+UGqM3Xk6/Lqs6t3YPoAQRYQV7J fzxOpeTGIRJga10j9yL6IbhaLZ+57R6SWpcFkGjUAPkN/Z5yKfqjANJbCRhfdU5O+pSNqP 4logzFoKf/VmW6S0EUkEZtxMo3dllzjVlZ3oaFntYnNGarQ+HCPOvRBT/nHOVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703077922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2YEJh2bpw5TMKR6En5r71qMMQPnL23zkNGnr0n1//Jw=; b=fcX/01VHHl7Jyl+UGYjQ9mSUvSjaybvNz/+y2nmQNepzi/mYJbgV7RmijsudFdpgdlDVf3 zrdGSDgAGL3gaYg0z2d7i7j+sEL+x1fk4/uMitbRh3rmL+7p+h7nq3/594akCcQrgyak+j mGzAtcw7PJDtelo/DmFHwW4V0O/ufXIISatDiivx2Eq4LwAF2/O9HYkfSlcIIanbfqbuS6 fi3bA9j8JlDxwsm1AlkqK39fpgqIdBtFKY40YzBJ/IkCH0EZR1MFser3yHKBd6T12yiwKH TU6PwW3AC+yAc83mmbZfSWGbJvRnzn43Oa1eGF032GiFDbG61xdVVizX+dFj0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SwDVV5qczzqJX; Wed, 20 Dec 2023 13:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BKDC2F2010250; Wed, 20 Dec 2023 13:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BKDC2DC010247; Wed, 20 Dec 2023 13:12:02 GMT (envelope-from git) Date: Wed, 20 Dec 2023 13:12:02 GMT Message-Id: <202312201312.3BKDC2DC010247@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Joel Bodenmann Subject: git: 181bdf41a334 - main - devel/laminar: New port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 181bdf41a334781d1a858ec8f26d679ec9871374 Auto-Submitted: auto-generated The branch main has been updated by jbo: URL: https://cgit.FreeBSD.org/ports/commit/?id=181bdf41a334781d1a858ec8f26d679ec9871374 commit 181bdf41a334781d1a858ec8f26d679ec9871374 Author: Marian Cingel AuthorDate: 2023-09-15 12:27:40 +0000 Commit: Joel Bodenmann CommitDate: 2023-12-20 12:54:26 +0000 devel/laminar: New port Laminar is a lightweight client-server CI service written in C++ and configured by environment variables. It comes with a built-in webserver and uses simple .run shell scripts as jobs. PR: 273827 Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D42877 --- devel/Makefile | 1 + devel/laminar/Makefile | 72 +++++++++++++++++++++++++++++++++++++ devel/laminar/distinfo | 9 +++++ devel/laminar/files/laminard.env.in | 64 +++++++++++++++++++++++++++++++++ devel/laminar/files/laminard.in | 32 +++++++++++++++++ devel/laminar/pkg-descr | 5 +++ devel/laminar/pkg-plist | 10 ++++++ 7 files changed, 193 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 0c6f1a0aea7e..5d9c76e0a56f 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1129,6 +1129,7 @@ SUBDIR += kyua SUBDIR += lab SUBDIR += lager + SUBDIR += laminar SUBDIR += lasi SUBDIR += lattice-ice40-examples-hx1k SUBDIR += lattice-ice40-examples-hx8k diff --git a/devel/laminar/Makefile b/devel/laminar/Makefile new file mode 100644 index 000000000000..e6fbee3ddb28 --- /dev/null +++ b/devel/laminar/Makefile @@ -0,0 +1,72 @@ +PORTNAME= laminar +DISTVERSION= 1.3 +CATEGORIES= devel +MASTER_SITES= GH \ + https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/:vue \ + https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/:chart \ + https://raw.githubusercontent.com/drudru/ansi_up/v4.0.4/:ansi +DISTFILES= ansi_up.js:ansi \ + vue.min.js:vue \ + chart.min.js:chart +DIST_SUBDIR= ${PORTNAME} +EXTRACT_ONLY= ${GH_ACCOUNT}-${PORTNAME}-${DISTVERSION}-${GH_TAGNAME}_GH0${EXTRACT_SUFX} + +MAINTAINER= cingel.marian@gmail.com +COMMENT= Lightweight CI service +WWW= https://laminar.ohwg.net/ + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +ONLY_FOR_ARCHS= aarch64 amd64 armv7 powerpc64 powerpc64le +ONLY_FOR_ARCHS_REASON= "Requires to translate 'uname -m' to linker '-m' flag in CMakeLists.txt" + +BUILD_DEPENDS= ${LOCALBASE}/include/boost/multi_index_container.hpp:devel/boost-libs \ + ${LOCALBASE}/include/rapidjson/rapidjson.h:devel/rapidjson +LIB_DEPENDS= libcapnp.so:devel/capnproto \ + libinotify.so:devel/libinotify + +USES= cmake pkgconfig sqlite + +USE_GITHUB= yes +GH_ACCOUNT= ohwgiles +GH_TAGNAME= 277a59f1cba75fa763e5838b3443f11686dd5ebb + +USERS= ${WWWOWN} +GROUPS= ${WWWGRP} +HOMEDIR= /var/db/${PORTNAME} +LAMINARD= laminard + +USE_RC_SUBR= laminard +SUB_FILES= laminard.env + +SUB_LIST= HOMEDIR=${HOMEDIR} \ + LAMINARD=${LAMINARD} \ + PORTNAME=${PORTNAME} \ + USERS=${USERS} + +PLIST_SUB= GROUPS=${GROUPS} \ + HOMEDIR=${HOMEDIR} \ + LAMINARD=${LAMINARD} \ + PORTNAME=${PORTNAME} \ + USERS=${USERS} + +post-extract: + ${CP} ${DISTDIR}/${DIST_SUBDIR}/ansi_up.js ${WRKDIR}/ + ${CP} ${DISTDIR}/${DIST_SUBDIR}/vue.min.js ${WRKDIR}/ + ${CP} ${DISTDIR}/${DIST_SUBDIR}/chart.min.js ${WRKDIR}/Chart.min.js + +pre-configure: + ${MKDIR} ${CONFIGURE_WRKSRC}/js + ${CP} ${WRKDIR}/ansi_up.js ${CONFIGURE_WRKSRC}/js/ + ${CP} ${WRKDIR}/Chart.min.js ${CONFIGURE_WRKSRC}/js/ + ${CP} ${WRKDIR}/vue.min.js ${CONFIGURE_WRKSRC}/js/ + +post-install: + ${MKDIR} ${STAGEDIR}${HOMEDIR} \ + ${STAGEDIR}${HOMEDIR}/cfg \ + ${STAGEDIR}${HOMEDIR}/cfg/jobs \ + ${STAGEDIR}${PREFIX}/etc/${PORTNAME} + ${INSTALL_DATA} ${WRKDIR}/laminard.env ${STAGEDIR}${ETCDIR}/${LAMINARD}.env.sample + +.include diff --git a/devel/laminar/distinfo b/devel/laminar/distinfo new file mode 100644 index 000000000000..842b5bb4e0c4 --- /dev/null +++ b/devel/laminar/distinfo @@ -0,0 +1,9 @@ +TIMESTAMP = 1699395718 +SHA256 (laminar/ansi_up.js) = 996608ae1a80c64fb2b41e07f3ef1c4fc7ec437746c03867000de98686e5a8b7 +SIZE (laminar/ansi_up.js) = 22159 +SHA256 (laminar/vue.min.js) = 29296ccacaa9ed35ed168fc51e36f54fd6f8db9c7786bbf38cc59a27229ba5c2 +SIZE (laminar/vue.min.js) = 93670 +SHA256 (laminar/chart.min.js) = fbc45926e6b46845a0f905552a0e0b1331049bff1115ecf94dbe0904d895e710 +SIZE (laminar/chart.min.js) = 199560 +SHA256 (laminar/ohwgiles-laminar-1.3-277a59f1cba75fa763e5838b3443f11686dd5ebb_GH0.tar.gz) = 61fa0b17e2515aace7e98ed1f020314163cbbc6212a1fa94437229a78fcaa62f +SIZE (laminar/ohwgiles-laminar-1.3-277a59f1cba75fa763e5838b3443f11686dd5ebb_GH0.tar.gz) = 104295 diff --git a/devel/laminar/files/laminard.env.in b/devel/laminar/files/laminard.env.in new file mode 100644 index 000000000000..ecab24e71f8c --- /dev/null +++ b/devel/laminar/files/laminard.env.in @@ -0,0 +1,64 @@ +### +### LAMINAR_HOME +### +### Root location containing laminar configuration, database, +### build workspaces and archive. +### +### Default: /var/lib/laminar +### +LAMINAR_HOME=%%HOMEDIR%% + +### LAMINAR_BIND_HTTP +### +### Interface on which laminard will bind to serve the Web UI. +### May be of the form IP:PORT, unix:PATH/TO/SOCKET or unix-abstract:NAME +### +### Default: *:8080 +### +LAMINAR_BIND_HTTP="*:8080" + +### LAMINAR_BIND_RPC +### +### Interface on which laminard will bind to accept RPC from laminarc. +### May be of the form IP:PORT, unix:PATH/TO/SOCKET or unix-abstract:NAME +### +### Default: unix-abstract:laminar +LAMINAR_BIND_RPC="*:8081" + +### +### LAMINAR_TITLE +### +### Page title to show in web frontend +### +# LAMINAR_TITLE="" + +### +### LAMINAR_KEEP_RUNDIRS +### +### Setting this prevents the immediate deletion of job rundirs +### $LAMINAR_HOME/run/$JOB/$RUN. Value should be an integer represeting +### the number of rundirs to keep. +### +### Default: 0 +### +# LAMINAR_KEEP_RUNDIRS=0 + +### +### LAMINAR_BASE_URL +### +### Base url for the frontend. This affects the tag and needs +### to be set if Laminar runs behind a reverse-proxy that hosts Laminar +### within a subfolder (rather than at a subdomain root) +### +# LAMINAR_BASE_URL="/"" + +### +### LAMINAR_ARCHIVE_URL +### +### Base url used to request artifacts. Laminar can serve build +### artifacts (and it will if you leave this unset), but it +### uses a very naive and inefficient method. Best to let a real +### webserver handle serving those requests. +### +# LAMINAR_ARCHIVE_URL="http://backbone.example.com/ci/archive/" + diff --git a/devel/laminar/files/laminard.in b/devel/laminar/files/laminard.in new file mode 100755 index 000000000000..83905a227efe --- /dev/null +++ b/devel/laminar/files/laminard.in @@ -0,0 +1,32 @@ +#! /bin/sh + +# PROVIDE: %%LAMINARD%% +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable git_daemon: +# +#laminard_enable="YES" + +. /etc/rc.subr + +name="%%LAMINARD%%" +rcvar="%%LAMINARD%%_enable" + +pidfile="/var/run/${name}.pid" +logfile="/var/log/${name}.log" + +load_rc_config $name + +: ${%%PORTNAME%%d_enable:=NO} +: ${%%PORTNAME%%d_env_file:=%%ETCDIR%%/%%LAMINARD%%.env} + +laminard_cmd=%%PREFIX%%/sbin/${name} +procname=${laminard_cmd} +#laminard_args="-v" +command=/usr/sbin/daemon +command_args="-f -o ${logfile} -p ${pidfile} -u %%USERS%% ${laminard_cmd} ${laminard_args}" + +run_rc_command "$1" + diff --git a/devel/laminar/pkg-descr b/devel/laminar/pkg-descr new file mode 100644 index 000000000000..30a8f2633a39 --- /dev/null +++ b/devel/laminar/pkg-descr @@ -0,0 +1,5 @@ +Laminar is a lightweight client-server CI service written in C++ and +configured by environment variables. It comes with a built-in webserver +and uses simple .run shell scripts as jobs. + +The client-server communication uses the Cap'n Proto format over sockets. diff --git a/devel/laminar/pkg-plist b/devel/laminar/pkg-plist new file mode 100644 index 000000000000..7b865e524010 --- /dev/null +++ b/devel/laminar/pkg-plist @@ -0,0 +1,10 @@ +bin/laminarc +@sample %%ETCDIR%%/%%LAMINARD%%.env.sample +sbin/laminard +share/man/man1/laminarc.1.gz +share/man/man8/laminard.8.gz +usr/share/bash-completion/completions/laminarc +usr/share/zsh/site-functions/_laminarc +@dir(%%USERS%%,%%GROUPS%%) %%HOMEDIR%%/cfg/jobs +@dir(%%USERS%%,%%GROUPS%%) %%HOMEDIR%%/cfg +@dir(%%USERS%%,%%GROUPS%%) %%HOMEDIR%%