summaryrefslogtreecommitdiff
path: root/sysutils/zot
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/zot')
-rw-r--r--sysutils/zot/Makefile34
-rw-r--r--sysutils/zot/distinfo5
-rw-r--r--sysutils/zot/files/config-minimal.json13
-rw-r--r--sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__32bit.go8
-rw-r--r--sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__64bit.go8
-rw-r--r--sysutils/zot/files/zot.in30
-rw-r--r--sysutils/zot/pkg-descr2
-rw-r--r--sysutils/zot/pkg-message12
8 files changed, 112 insertions, 0 deletions
diff --git a/sysutils/zot/Makefile b/sysutils/zot/Makefile
new file mode 100644
index 000000000000..ffc4458005c7
--- /dev/null
+++ b/sysutils/zot/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= zot
+DISTVERSIONPREFIX=v
+DISTVERSION= 2.1.8
+CATEGORIES= sysutils
+
+MAINTAINER= decke@FreeBSD.org
+COMMENT= Production ready and vendor neutral OCI image registry
+WWW= https://zotregistry.dev/
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+USE_GITHUB= yes
+GH_ACCOUNT= project-zot
+
+GO_MODULE= zotproject.dev/zot
+GO_MOD_DIST= https://raw.githubusercontent.com/project-zot/zot/refs/tags/v${DISTVERSION}/
+GO_TARGET= ./cmd/zot
+GO_BUILDFLAGS= -ldflags " \
+ -X zotregistry.dev/zot/pkg/api/config.ReleaseTag=${DISTVERSION} \
+ -X zotregistry.dev/zot/pkg/api/config.BinaryType=minimal \
+ -X zotregistry.dev/zot/pkg/api/config.GoVersion=${GO_VERSION}"
+
+USE_RC_SUBR= zot
+
+PLIST_FILES= bin/zot \
+ etc/zot/config-minimal.json.sample
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_DATA} ${PATCHDIR}/config-minimal.json ${STAGEDIR}${ETCDIR}/config-minimal.json.sample
+
+.include <bsd.port.mk>
diff --git a/sysutils/zot/distinfo b/sysutils/zot/distinfo
new file mode 100644
index 000000000000..4adf57630dc1
--- /dev/null
+++ b/sysutils/zot/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1758907509
+SHA256 (go/sysutils_zot/project-zot-zot-v2.1.8_GH0/go.mod) = 62e652f73d60e5edb6a8a0aacc3d3d5f907f16a5066799869348aef02075ac4c
+SIZE (go/sysutils_zot/project-zot-zot-v2.1.8_GH0/go.mod) = 29780
+SHA256 (go/sysutils_zot/project-zot-zot-v2.1.8_GH0/project-zot-zot-v2.1.8_GH0.tar.gz) = cd04f1eebd1157d6e6041d5c4369c27d3b03c3eb6d3d8e8e34014bd24712e9b4
+SIZE (go/sysutils_zot/project-zot-zot-v2.1.8_GH0/project-zot-zot-v2.1.8_GH0.tar.gz) = 1215366
diff --git a/sysutils/zot/files/config-minimal.json b/sysutils/zot/files/config-minimal.json
new file mode 100644
index 000000000000..6483077a542b
--- /dev/null
+++ b/sysutils/zot/files/config-minimal.json
@@ -0,0 +1,13 @@
+{
+ "distSpecVersion": "1.1.1",
+ "storage": {
+ "rootDirectory": "/var/db/zot"
+ },
+ "http": {
+ "address": "127.0.0.1",
+ "port": "8080"
+ },
+ "log": {
+ "level": "debug"
+ }
+}
diff --git a/sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__32bit.go b/sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__32bit.go
new file mode 100644
index 000000000000..379ebf587cbb
--- /dev/null
+++ b/sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__32bit.go
@@ -0,0 +1,8 @@
+--- vendor/github.com/distribution/distribution/v3/registry/storage/driver/s3-aws/s3_32bit.go.orig 2025-09-27 12:09:03 UTC
++++ vendor/github.com/distribution/distribution/v3/registry/storage/driver/s3-aws/s3_32bit.go
+@@ -1,4 +1,4 @@
+-//go:build arm
++//go:build arm || 386
+
+ package s3
+
diff --git a/sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__64bit.go b/sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__64bit.go
new file mode 100644
index 000000000000..b3a66059aed1
--- /dev/null
+++ b/sysutils/zot/files/patch-vendor_github.com_distribution_distribution_v3_registry_storage_driver_s3-aws_s3__64bit.go
@@ -0,0 +1,8 @@
+--- vendor/github.com/distribution/distribution/v3/registry/storage/driver/s3-aws/s3_64bit.go.orig 2025-09-27 12:09:03 UTC
++++ vendor/github.com/distribution/distribution/v3/registry/storage/driver/s3-aws/s3_64bit.go
+@@ -1,4 +1,4 @@
+-//go:build !arm
++//go:build !arm && !386
+
+ package s3
+
diff --git a/sysutils/zot/files/zot.in b/sysutils/zot/files/zot.in
new file mode 100644
index 000000000000..9c3fddca39a5
--- /dev/null
+++ b/sysutils/zot/files/zot.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: zot
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable zot daemon:
+#
+# zot_enable="YES"
+# zot_config="/usr/local/etc/zot/config.json"
+#
+
+. /etc/rc.subr
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
+
+name="zot"
+rcvar=zot_enable
+
+load_rc_config ${name}
+
+: ${zot_enable:="NO"}
+: ${zot_config:="/usr/local/etc/zot/config.json"}
+
+command="/usr/sbin/daemon"
+procname="/usr/local/bin/${name}"
+pidfile="/var/run/${name}.pid"
+command_args="-S -p ${pidfile} ${procname} serve ${zot_config}"
+
+run_rc_command "$1"
diff --git a/sysutils/zot/pkg-descr b/sysutils/zot/pkg-descr
new file mode 100644
index 000000000000..3362d8ef0de0
--- /dev/null
+++ b/sysutils/zot/pkg-descr
@@ -0,0 +1,2 @@
+zot is an OCI image registry that allows you to store, manage, and share
+container images.
diff --git a/sysutils/zot/pkg-message b/sysutils/zot/pkg-message
new file mode 100644
index 000000000000..f0f892cf38d7
--- /dev/null
+++ b/sysutils/zot/pkg-message
@@ -0,0 +1,12 @@
+[
+{ type: install
+ message: <<EOM
+ A minimum configuration for zot has been installed but please
+ check out their various examples and the documentation on how
+ to create a proper config:
+
+ https://github.com/project-zot/zot/tree/main/examples
+ https://zotregistry.dev/v2.1.8/admin-guide/admin-configuration/
+EOM
+}
+]