dot

packages and services management
Log | Files | Refs | README

commit b780a1b21725eebac5a7c3c9bdf66042eaac7729
parent a6bd3b2383a092c93994a840a805fe5331ff6433
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 18 Nov 2018 12:51:23 +0100

bin/pack-*: visual changes

Diffstat:
MREADME | 37++++++++++++++++++-------------------
Mbin/pack-add | 2+-
Mbin/pack-build | 2+-
Mbin/pack-get | 2+-
Mbin/pack-install | 2+-
Dconf/etc | 4----
Mpack/sqmail/build | 1+
Ms6/qmail-send/x/setup | 3++-
8 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/README b/README @@ -1,33 +1,32 @@ -## s6 ## +## Package management To use the s6-rc setup in this dotfile repository: -Install the following software from https://skarnet.org: skalibs, -execline, s6, s6-rc. +Install the following software from https://skarnet.org: + skalibs, execline, s6, s6-rc -You might do it using the px tool: - # git clone git://josuah.net/px/ /var/px/ - # export PXPATH=/var/px - # px add s6-rc - libskarnet 2.7.0.0 get build install - execline 2.5.0.1 get build install - s6 2.7.2.0 get build install - s6-rc 0.4.0.1 get build install - # export PATH="$PATH:$PXPATH/bin" +You might do it using the pack-add tool: + # export PATH="$PATH:$PWD/bin" + # pack-add s6-rc + libskarnet 2.7.0.0 get build install + execline 2.5.0.1 get build install + s6 2.7.2.0 get build install + s6-rc 0.4.0.1 get build install + # export PATH="$PATH:/var/pack/bin" + + +## Service management Then you can setup the s6-rc directories: - # ./conf-s6 + # ./conf/s6 Setup the initial set of services you want: - # cp -r s6/service-1-* /etc/s6 # service-enable service-1 - # - # cp -r s6/service-2-* /etc/s6 # service-enable service-2 And start the s6 supervision tree: - # ./s6-init + # service-init & -You can then add aditionnal directories: - # cp -r s6/service-* /etc/s6 +You can then add aditionnal services: + # service-enable service-3 # service-load diff --git a/bin/pack-add b/bin/pack-add @@ -2,6 +2,6 @@ test $# -gt 0 pack-dep "$@" | while read -r pack version; do - printf '%-30s %-20s' "$pack" "$version" + printf ' %-30s %-15s' "$pack" "$version" pack-install "$pack" "$version" done diff --git a/bin/pack-build b/bin/pack-build @@ -6,7 +6,7 @@ test ! -d "/var/pack/pkg/$pack/$version" || exit 0 trap "rm -rf '/var/pack/pkg/$pack/$version'" INT TERM EXIT o=$(pack-get "$pack" "$version") || { echo "$o"; exit 1; } -echo "$o build" +echo "$o build" mkdir -p "/var/log/pack/$pack/$version" exec >"/var/log/pack/$pack/$version/build" 2>&1 diff --git a/bin/pack-get b/bin/pack-get @@ -4,7 +4,7 @@ pack=$1 version=${2:-$(sed q "/etc/pack/$1/version")} test ! -d "/var/pack/src/$pack/$version" || exit 0 trap "rm -rf '/var/pack/src/$pack/$version'" INT TERM EXIT -echo ' get' +echo ' get' mkdir -p "/var/log/pack/$pack/$version" exec >"/var/log/pack/$pack/$version/get" 2>&1 diff --git a/bin/pack-install b/bin/pack-install @@ -3,7 +3,7 @@ PACK=${PACK:-/var/pack} pack=$1 version=${2:-$(sed q "/etc/pack/$1/version")} o=$(pack-build "$pack" "$version") || { echo "$o"; exit 1; } -echo "$o install" +echo "$o install" mkdir -p "/var/log/pack/$pack/$version" exec >/var/log/pack/$pack/$version/install 2>&1 diff --git a/conf/etc b/conf/etc @@ -1,4 +0,0 @@ -#!/bin/sh -e - -cd "$(dirname "$0")/.." -ln -sf "$PWD/qmail" "$PWD/s6" /etc diff --git a/pack/sqmail/build b/pack/sqmail/build @@ -17,3 +17,4 @@ for f in ids dir ucspissl compile legacy; do done mv /var/qmail/bin "$PREFIX/bin" +ln -s "$PREFIX/bin" /var/qmail diff --git a/s6/qmail-send/x/setup b/s6/qmail-send/x/setup @@ -1,4 +1,5 @@ #!/usr/bin/env execlineb if { s6-hiercopy alias /var/qmail/alias } -s6-hiercopy conf /var/qmail/control +if { s6-hiercopy conf /var/qmail/control } +chgrp -R sqmail /var/qmail