From 7af33bd4079b1ccea362d6e32729d7ba3ea0df99 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 16 Nov 2026 04:59:50 +0100 Subject: Add rc.zot registry service --- rc.zot/zot-log/consumer-for | 1 + rc.zot/zot-log/dependencies | 4 ++++ rc.zot/zot-log/env/CMD | 1 + rc.zot/zot-log/env/CMD_OPTS | 1 + rc.zot/zot-log/env/LOGDIR_GROUP | 2 ++ rc.zot/zot-log/env/LOGDIR_OWNER | 2 ++ rc.zot/zot-log/env/LOGDIR_PATH | 2 ++ rc.zot/zot-log/env/LOGDIR_PERMS | 2 ++ rc.zot/zot-log/env/LOG_SCRIPT | 2 ++ rc.zot/zot-log/notification-fd | 1 + rc.zot/zot-log/pipeline-name | 1 + rc.zot/zot-log/run | 24 ++++++++++++++++++++++++ rc.zot/zot-log/type | 1 + rc.zot/zot-srv/dependencies | 5 +++++ rc.zot/zot-srv/env/CMD | 1 + rc.zot/zot-srv/env/CMD_OPTS | 1 + rc.zot/zot-srv/producer-for | 1 + rc.zot/zot-srv/run | 14 ++++++++++++++ rc.zot/zot-srv/type | 1 + 19 files changed, 67 insertions(+) create mode 100644 rc.zot/zot-log/consumer-for create mode 100644 rc.zot/zot-log/dependencies create mode 100644 rc.zot/zot-log/env/CMD create mode 100644 rc.zot/zot-log/env/CMD_OPTS create mode 100644 rc.zot/zot-log/env/LOGDIR_GROUP create mode 100644 rc.zot/zot-log/env/LOGDIR_OWNER create mode 100644 rc.zot/zot-log/env/LOGDIR_PATH create mode 100644 rc.zot/zot-log/env/LOGDIR_PERMS create mode 100644 rc.zot/zot-log/env/LOG_SCRIPT create mode 100644 rc.zot/zot-log/notification-fd create mode 100644 rc.zot/zot-log/pipeline-name create mode 100644 rc.zot/zot-log/run create mode 100644 rc.zot/zot-log/type create mode 100644 rc.zot/zot-srv/dependencies create mode 100644 rc.zot/zot-srv/env/CMD create mode 100644 rc.zot/zot-srv/env/CMD_OPTS create mode 100644 rc.zot/zot-srv/producer-for create mode 100644 rc.zot/zot-srv/run create mode 100644 rc.zot/zot-srv/type (limited to 'rc.zot') diff --git a/rc.zot/zot-log/consumer-for b/rc.zot/zot-log/consumer-for new file mode 100644 index 0000000..4d580fb --- /dev/null +++ b/rc.zot/zot-log/consumer-for @@ -0,0 +1 @@ +zot-srv diff --git a/rc.zot/zot-log/dependencies b/rc.zot/zot-log/dependencies new file mode 100644 index 0000000..dc2488d --- /dev/null +++ b/rc.zot/zot-log/dependencies @@ -0,0 +1,4 @@ +# Comment out remount-root and uncomment local-fs +# if you use separate partition for /var/log +remount-root +#local-fs diff --git a/rc.zot/zot-log/env/CMD b/rc.zot/zot-log/env/CMD new file mode 100644 index 0000000..9d5239c --- /dev/null +++ b/rc.zot/zot-log/env/CMD @@ -0,0 +1 @@ +s6-log diff --git a/rc.zot/zot-log/env/CMD_OPTS b/rc.zot/zot-log/env/CMD_OPTS new file mode 100644 index 0000000..00d672e --- /dev/null +++ b/rc.zot/zot-log/env/CMD_OPTS @@ -0,0 +1 @@ +-d3 diff --git a/rc.zot/zot-log/env/LOGDIR_GROUP b/rc.zot/zot-log/env/LOGDIR_GROUP new file mode 100644 index 0000000..3794bcd --- /dev/null +++ b/rc.zot/zot-log/env/LOGDIR_GROUP @@ -0,0 +1,2 @@ +root +# Logging directory group ownership diff --git a/rc.zot/zot-log/env/LOGDIR_OWNER b/rc.zot/zot-log/env/LOGDIR_OWNER new file mode 100644 index 0000000..9f9fd12 --- /dev/null +++ b/rc.zot/zot-log/env/LOGDIR_OWNER @@ -0,0 +1,2 @@ +root +# Logging directory owner diff --git a/rc.zot/zot-log/env/LOGDIR_PATH b/rc.zot/zot-log/env/LOGDIR_PATH new file mode 100644 index 0000000..0bc04e8 --- /dev/null +++ b/rc.zot/zot-log/env/LOGDIR_PATH @@ -0,0 +1,2 @@ +/var/log/zot +# Logging directory path diff --git a/rc.zot/zot-log/env/LOGDIR_PERMS b/rc.zot/zot-log/env/LOGDIR_PERMS new file mode 100644 index 0000000..ccece6e --- /dev/null +++ b/rc.zot/zot-log/env/LOGDIR_PERMS @@ -0,0 +1,2 @@ +750 +# Logging directory access rights in octal diff --git a/rc.zot/zot-log/env/LOG_SCRIPT b/rc.zot/zot-log/env/LOG_SCRIPT new file mode 100644 index 0000000..948a563 --- /dev/null +++ b/rc.zot/zot-log/env/LOG_SCRIPT @@ -0,0 +1,2 @@ +n4 s500000 T $LOGDIR_PATH +# Logging script used by s6-log diff --git a/rc.zot/zot-log/notification-fd b/rc.zot/zot-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/rc.zot/zot-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/rc.zot/zot-log/pipeline-name b/rc.zot/zot-log/pipeline-name new file mode 100644 index 0000000..341ae87 --- /dev/null +++ b/rc.zot/zot-log/pipeline-name @@ -0,0 +1 @@ +zot diff --git a/rc.zot/zot-log/run b/rc.zot/zot-log/run new file mode 100644 index 0000000..25d71ae --- /dev/null +++ b/rc.zot/zot-log/run @@ -0,0 +1,24 @@ +#!/bin/execlineb -P + +############################################### +# Start a logging daemon for the zot registry # +############################################### + +s6-envdir env +multisubstitute { + importas -iu LOGDIR_OWNER LOGDIR_OWNER + importas -iu LOGDIR_GROUP LOGDIR_GROUP + importas -iu LOGDIR_PERMS LOGDIR_PERMS + importas -iu CMD CMD + importas -usCd" " CMD_OPTS CMD_OPTS + importas -iusCd" " LOG_SCRIPT LOG_SCRIPT +} +s6-envuidgid -Bi ${LOGDIR_OWNER}:${LOGDIR_GROUP} +multisubstitute { + importas -iu LOGDIR_PATH LOGDIR_PATH + importas -iu UID UID + importas -iu GID GID +} +if { install -dm $LOGDIR_PERMS -o $UID -g $GID $LOGDIR_PATH } +s6-setuidgid ${UID}:${GID} +exec -c $CMD $CMD_OPTS -- $LOG_SCRIPT diff --git a/rc.zot/zot-log/type b/rc.zot/zot-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rc.zot/zot-log/type @@ -0,0 +1 @@ +longrun diff --git a/rc.zot/zot-srv/dependencies b/rc.zot/zot-srv/dependencies new file mode 100644 index 0000000..a262a61 --- /dev/null +++ b/rc.zot/zot-srv/dependencies @@ -0,0 +1,5 @@ +tmpfs-run +# Comment out "remount-root" and uncomment "local-fs" +# if you use separate partition for /var +remount-root +#local-fs diff --git a/rc.zot/zot-srv/env/CMD b/rc.zot/zot-srv/env/CMD new file mode 100644 index 0000000..2652f8a --- /dev/null +++ b/rc.zot/zot-srv/env/CMD @@ -0,0 +1 @@ +/usr/bin/zot diff --git a/rc.zot/zot-srv/env/CMD_OPTS b/rc.zot/zot-srv/env/CMD_OPTS new file mode 100644 index 0000000..30ec6d0 --- /dev/null +++ b/rc.zot/zot-srv/env/CMD_OPTS @@ -0,0 +1 @@ +serve /etc/zot/config.yaml diff --git a/rc.zot/zot-srv/producer-for b/rc.zot/zot-srv/producer-for new file mode 100644 index 0000000..3a1c37e --- /dev/null +++ b/rc.zot/zot-srv/producer-for @@ -0,0 +1 @@ +zot-log diff --git a/rc.zot/zot-srv/run b/rc.zot/zot-srv/run new file mode 100644 index 0000000..44c40c7 --- /dev/null +++ b/rc.zot/zot-srv/run @@ -0,0 +1,14 @@ +#!/bin/execlineb -P + +###################### +# Start zot registry # +###################### + +fdmove -c 2 1 +s6-setuidgid zot +s6-envdir env +multisubstitute { + importas -iu CMD CMD + importas -usCd" " CMD_OPTS CMD_OPTS +} +exec -c $CMD $CMD_OPTS diff --git a/rc.zot/zot-srv/type b/rc.zot/zot-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rc.zot/zot-srv/type @@ -0,0 +1 @@ +longrun -- cgit v1.2.3