dot

packages and services management
Log | Files | Refs | README

commit ddf0910932824748ead214e25d11d32f2b242740
parent a6f3aea178aac81151321387ab88ade2e35fa0d0
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 23 Dec 2018 17:59:51 +0100

write data, not code

Diffstat:
Mbin/git-newrepo | 25+++++--------------------
Mconf/etc | 8+++-----
Mconf/git | 20++++++++++----------
Aconf/profile | 9+++++++++
Aetc/git/public/env/PATH_WWW | 1+
Aetc/git/public/git-daemon-export-ok | 0
Aetc/git/public/hooks/update.d/git-hook-stagit | 40++++++++++++++++++++++++++++++++++++++++
Aetc/git/x/hooks/post-receive | 6++++++
Aetc/git/x/hooks/pre-receive | 6++++++
Aetc/git/x/hooks/update | 5+++++
Metc/profile | 8+-------
Detc/s6-rc/log/run | 5-----
Detc/s6-rc/log/type | 1-
Aetc/s6/acme-client/x/group | 1+
Aetc/s6/axfrdns/x/group | 1+
Aetc/s6/bird/x/group | 1+
Aetc/s6/collectd/x/group | 1+
Aetc/s6/curvevpn/x/group | 1+
Aetc/s6/dnscache/x/group | 1+
Aetc/s6/fossil/x/group | 1+
Aetc/s6/geomyidae/x/group | 1+
Aetc/s6/git-daemon/x/group | 1+
Aetc/s6/git-mirror/x/group | 1+
Aetc/s6/httpfile/x/group | 1+
Aetc/s6/kamailio/x/group | 1+
Retc/s6/monit/run -> etc/s6/monit/x/run | 0
Aetc/s6/ntpclient/x/group | 1+
Aetc/s6/pjsua/x/group | 1+
Aetc/s6/qemu/x/group | 1+
Aetc/s6/qmail-pop3d/x/group | 1+
Retc/s6/qmail-send/josuah.net/conf/locals -> etc/s6/qmail-send/josuah.net/conf/control/locals | 0
Retc/s6/qmail-send/josuah.net/conf/me -> etc/s6/qmail-send/josuah.net/conf/control/me | 0
Aetc/s6/qmail-send/x/group | 1+
Aetc/s6/qmail-smtpd/x/group | 1+
Aetc/s6/tapio/x/group | 1+
Aetc/s6/tinc/x/group | 1+
Aetc/s6/tinydns/x/group | 1+
Aetc/s6/transmission/x/group | 1+
Aetc/s6/u9fs-mount/x/group | 1+
Aetc/s6/u9fs-ssh/x/group | 1+
Aetc/s6/venti/x/group | 1+
Aetc/s6/vsftpd/x/group | 1+
Aetc/s6/vtund/x/group | 1+
Aetc/s6/walldns/x/group | 1+
Aetc/s6/warp-vpn/x/group | 1+
Dhost/kuntur/services | 9---------
Retc/profile.d/dot.sh -> profile.d/dot.sh | 0
Retc/profile.d/go.sh -> profile.d/go.sh | 0
Retc/profile.d/locale.sh -> profile.d/locale.sh | 0
Retc/profile.d/man.sh -> profile.d/man.sh | 0
Retc/profile.d/openbsd.sh -> profile.d/openbsd.sh | 0
Retc/profile.d/pack.sh -> profile.d/pack.sh | 0
Retc/profile.d/plan9.sh -> profile.d/plan9.sh | 0
Retc/profile.d/prompt.sh -> profile.d/prompt.sh | 0
Retc/profile.d/ssh.sh -> profile.d/ssh.sh | 0
Retc/profile.d/umask.sh -> profile.d/umask.sh | 0
56 files changed, 115 insertions(+), 57 deletions(-)

diff --git a/bin/git-newrepo b/bin/git-newrepo @@ -1,24 +1,9 @@ #!/usr/bin/env execlineb -importas -i repo 1 +importas -i type 1 +importas -i repo 2 +importas -i desc 3 -define domain git.josuah.net - -# the repo may already exist if { git init --bare /var/git/${repo} } - -# configuration -if { mkdir -p ${repo}/env } -if { redirfd -w 1 ${repo}/env/PATH_WWW echo /var/www/${domain} } - -# hooks -forx x { pre-receive update post-receive } -importas hook x -if { mkdir -p ${repo}/hooks/${hook}.d } -if { redirfd -w 1 ${repo}/hooks/${hook} printf "%s\n" - "#!/usr/bin/env execlineb" - "elglob -0 x hooks/${hook}.d/*" - "forx x { ${x} }" - "importas script x" - "${script}" } -if { chmod +x ${repo}/hooks/${hook} } +if { s6-hiercopy /etc/git/x /var/git/${repo} } +if { s6-hiercopy /etc/git/${type} /var/git/${repo} } diff --git a/conf/etc b/conf/etc @@ -2,8 +2,6 @@ cd "$(dirname "$0")/.." -mkdir -p /etc/profile.d -ln -sf "$PWD/etc/profile.d/"* /etc/profile.d -ln -sf "$PWD/etc/profile" /etc -ln -sf "$PWD/etc/pack" /etc -ln -sf "$PWD/etc/s6" /etc +for path in etc/*; do + ln -sf "${PWD}/${path}" /etc +done diff --git a/conf/git b/conf/git @@ -1,12 +1,12 @@ #!/usr/bin/env execlineb -if { git-newrepo-stagit dot "packages and services management" } -if { git-newrepo-stagit eel "formatter for ii(1) logs" } -if { git-newrepo-stagit ff2txt "display a farbfeld(5)-formatted image as braille or ascii text" } -if { git-newrepo-stagit ics2txt "awk tool for converting ical to a text digest" } -if { git-newrepo-stagit iomenu "interactive text selection menu" } -if { git-newrepo-stagit miniwi "tiny 4x8 bitmapped font" } -if { git-newrepo-stagit ploot "plot images or real-time plain text from a .csv file" } -if { git-newrepo-stagit plstree "display ls or ps output as directory or process trees" } -if { git-newrepo-stagit tttml "tools for formatting a very basic markdown-like format" } -if { git-newrepo-stagit sites "mirror of git://git.suckless.org/sites" } +if { git-newrepo public dot "packages and services management" } +if { git-newrepo public eel "formatter for ii(1) logs" } +if { git-newrepo public ff2txt "display a farbfeld(5) image as text" } +if { git-newrepo public ics2txt "awk tool for converting ical to a text" } +if { git-newrepo public iomenu "interactive text selection menu" } +if { git-newrepo public miniwi "tiny 4x8 bitmapped font" } +if { git-newrepo public ploot "plot images or text from a .csv file" } +if { git-newrepo public plstree "display ls or ps output as a tree" } +if { git-newrepo public tttml "formatter for a very basic markup format" } +if { git-newrepo public sites "mirror of git://git.suckless.org/sites" } diff --git a/conf/profile b/conf/profile @@ -0,0 +1,9 @@ +#!/bin/sh -ex + +cd "$(dirname "${0}")/.." + +mkdir -p /etc/profile.d + +for file in profile.d/*; do + cp "${file}" /etc/profile.d +done diff --git a/etc/git/public/env/PATH_WWW b/etc/git/public/env/PATH_WWW @@ -0,0 +1 @@ +/var/www/git.josuah.net diff --git a/etc/git/public/git-daemon-export-ok b/etc/git/public/git-daemon-export-ok diff --git a/etc/git/public/hooks/update.d/git-hook-stagit b/etc/git/public/hooks/update.d/git-hook-stagit @@ -0,0 +1,40 @@ +#!/usr/bin/env execlineb + +s6-envdir env +importas -D 0 target PATH_WWW + +backtick -n x { basename ${target} } +importas domain x + +backtick -n x { pwd } +importas gitdir x + +backtick -n x { heredoc 0 ${gitdir} sed -r "s,.*/,," } +importas repo x + +if { echo "stagit: ${repo}" } + +if { mkdir -p ${target}/${repo} stagit } +if { + cd ${target}/${repo} + stagit-gopher -b /git/${repo} -c ${gitdir}/stagit/cache-gopher ${gitdir} +} +if { + cd ${target}/${repo} + stagit ${gitdir} -c ${gitdir}/stagit/cache +} +if { ln -sf ../style.css ${target}/${repo}/style.css } + +elglob -0 x ../*/git-daemon-export-ok +backtick x { pipeline { printf "%s\n" ${x} } sed "s/[^/]*$//" } +importas -s -d "\n" repolist x + +if { + redirfd -w 1 ${target}/index.html + stagit-index ${repolist} +} + +if { + redirfd -w 1 ${target}/index.gph + stagit-gopher-index -b /git/${repo} ${repolist} +} diff --git a/etc/git/x/hooks/post-receive b/etc/git/x/hooks/post-receive @@ -0,0 +1,6 @@ +#!/usr/bin/env execlineb + +elglob -0 x hooks/post-receive.d/* +forx x { ${x} } +importas script x +${script} diff --git a/etc/git/x/hooks/pre-receive b/etc/git/x/hooks/pre-receive @@ -0,0 +1,6 @@ +#!/usr/bin/env execlineb + +elglob -0 x hooks/pre-receive.d/* +forx x { ${x} } +importas script x +${script} diff --git a/etc/git/x/hooks/update b/etc/git/x/hooks/update @@ -0,0 +1,5 @@ +#!/usr/bin/env execlineb +elglob -0 x hooks/update.d/* +forx x { ${x} } +importas script x +${script} diff --git a/etc/profile b/etc/profile @@ -1,7 +1 @@ -export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin - -umask 022 - -for f in /etc/profile.d/*.sh; do - . "$f" -done +umask 0022 diff --git a/etc/s6-rc/log/run b/etc/s6-rc/log/run @@ -1,5 +0,0 @@ -#!/usr/bin/env execlineb -fdmove -c 2 1 - -redirfd -rnb 0 /var/s6/.s6-rc/log -s6-log -bp t /var/log/s6 diff --git a/etc/s6-rc/log/type b/etc/s6-rc/log/type @@ -1 +0,0 @@ -longrun diff --git a/etc/s6/acme-client/x/group b/etc/s6/acme-client/x/group @@ -0,0 +1 @@ +ssl diff --git a/etc/s6/axfrdns/x/group b/etc/s6/axfrdns/x/group @@ -0,0 +1 @@ +dns diff --git a/etc/s6/bird/x/group b/etc/s6/bird/x/group @@ -0,0 +1 @@ +bgp diff --git a/etc/s6/collectd/x/group b/etc/s6/collectd/x/group @@ -0,0 +1 @@ +monit diff --git a/etc/s6/curvevpn/x/group b/etc/s6/curvevpn/x/group @@ -0,0 +1 @@ +vpn diff --git a/etc/s6/dnscache/x/group b/etc/s6/dnscache/x/group @@ -0,0 +1 @@ +dns diff --git a/etc/s6/fossil/x/group b/etc/s6/fossil/x/group @@ -0,0 +1 @@ +disk diff --git a/etc/s6/geomyidae/x/group b/etc/s6/geomyidae/x/group @@ -0,0 +1 @@ +gopher diff --git a/etc/s6/git-daemon/x/group b/etc/s6/git-daemon/x/group @@ -0,0 +1 @@ +git diff --git a/etc/s6/git-mirror/x/group b/etc/s6/git-mirror/x/group @@ -0,0 +1 @@ +git diff --git a/etc/s6/httpfile/x/group b/etc/s6/httpfile/x/group @@ -0,0 +1 @@ +www diff --git a/etc/s6/kamailio/x/group b/etc/s6/kamailio/x/group @@ -0,0 +1 @@ +sip diff --git a/etc/s6/monit/run b/etc/s6/monit/x/run diff --git a/etc/s6/ntpclient/x/group b/etc/s6/ntpclient/x/group @@ -0,0 +1 @@ +ntp diff --git a/etc/s6/pjsua/x/group b/etc/s6/pjsua/x/group @@ -0,0 +1 @@ +sip diff --git a/etc/s6/qemu/x/group b/etc/s6/qemu/x/group @@ -0,0 +1 @@ +vm diff --git a/etc/s6/qmail-pop3d/x/group b/etc/s6/qmail-pop3d/x/group @@ -0,0 +1 @@ +qmail diff --git a/etc/s6/qmail-send/josuah.net/conf/locals b/etc/s6/qmail-send/josuah.net/conf/control/locals diff --git a/etc/s6/qmail-send/josuah.net/conf/me b/etc/s6/qmail-send/josuah.net/conf/control/me diff --git a/etc/s6/qmail-send/x/group b/etc/s6/qmail-send/x/group @@ -0,0 +1 @@ +qmail diff --git a/etc/s6/qmail-smtpd/x/group b/etc/s6/qmail-smtpd/x/group @@ -0,0 +1 @@ +qmail diff --git a/etc/s6/tapio/x/group b/etc/s6/tapio/x/group @@ -0,0 +1 @@ +vpn diff --git a/etc/s6/tinc/x/group b/etc/s6/tinc/x/group @@ -0,0 +1 @@ +vpn diff --git a/etc/s6/tinydns/x/group b/etc/s6/tinydns/x/group @@ -0,0 +1 @@ +dns diff --git a/etc/s6/transmission/x/group b/etc/s6/transmission/x/group @@ -0,0 +1 @@ +torrent diff --git a/etc/s6/u9fs-mount/x/group b/etc/s6/u9fs-mount/x/group @@ -0,0 +1 @@ +9p diff --git a/etc/s6/u9fs-ssh/x/group b/etc/s6/u9fs-ssh/x/group @@ -0,0 +1 @@ +9p diff --git a/etc/s6/venti/x/group b/etc/s6/venti/x/group @@ -0,0 +1 @@ +9p diff --git a/etc/s6/vsftpd/x/group b/etc/s6/vsftpd/x/group @@ -0,0 +1 @@ +ftp diff --git a/etc/s6/vtund/x/group b/etc/s6/vtund/x/group @@ -0,0 +1 @@ +vpn diff --git a/etc/s6/walldns/x/group b/etc/s6/walldns/x/group @@ -0,0 +1 @@ +dns diff --git a/etc/s6/warp-vpn/x/group b/etc/s6/warp-vpn/x/group @@ -0,0 +1 @@ +vpn diff --git a/host/kuntur/services b/host/kuntur/services @@ -1,9 +0,0 @@ -geomyidae,ipv4,josuah.net -geomyidae,ipv6,josuah.net -git-daemon -httpfile,tcp -httpfile,tls,h-o.st -qmail-smtpd,tcp,josuah.net -qmail-smtpd,tls,josuah.net -tinysshd -transmission diff --git a/etc/profile.d/dot.sh b/profile.d/dot.sh diff --git a/etc/profile.d/go.sh b/profile.d/go.sh diff --git a/etc/profile.d/locale.sh b/profile.d/locale.sh diff --git a/etc/profile.d/man.sh b/profile.d/man.sh diff --git a/etc/profile.d/openbsd.sh b/profile.d/openbsd.sh diff --git a/etc/profile.d/pack.sh b/profile.d/pack.sh diff --git a/etc/profile.d/plan9.sh b/profile.d/plan9.sh diff --git a/etc/profile.d/prompt.sh b/profile.d/prompt.sh diff --git a/etc/profile.d/ssh.sh b/profile.d/ssh.sh diff --git a/etc/profile.d/umask.sh b/profile.d/umask.sh