=== removed directory 'bin' === removed file 'bin/powerbox-menu-list' --- old/bin/powerbox-menu-list 2024-04-11 16:14:41 +0000 +++ new/bin/powerbox-menu-list 1970-01-01 00:00:00 +0000 @@ -1,66 +0,0 @@ -#!/bin/zsh -setopt no_unset warn_create_global extended_glob - -() { - local -a cmds - cmds=( - lock - show-inbox - root-terminal - terminal-wpa_cli - exit - adjust-brightness/{1,2,3,4,5,6,7,8,9,10}0% - ) - cat <<<${(F)cmds} -} - -() { - local svc - for svc in $HOME/chome/ssh/ssh-rc/out/s6-rc-source/*:master(N); do - printf "container-urxvt/ssh.%s/ssh-t %s\n" \ - $USER ${${svc:t}%:master} - done -} - -() { - local svc - for svc in $HOME/chome/rcm-ssh/ssh-rc/out/runimage/*:master(N); do - printf "container-urxvt/rcm-ssh.%s/ssh-t %s\n" \ - $USER ${${${svc:t}%:master}#ssh.} - done -} - -img_has_bins() { - local base p b found - base=$1 - shift - for b in "$@"; do - found=0 - for p in $base/{bin,usr/bin,usr/local/bin}; do - [[ -x $p/$b ]] && found=1 && break - done - ((found)) || return 1 - done - return 0 -} - -(){ - local cntdir imgdir ignored - for cntdir in "$@"; do - if [[ -f $cntdir/data/fstab ]] && read imgdir ignored <$cntdir/data/fstab; then - if img_has_bins $imgdir zsh; then - img_has_bins $imgdir tmux && \ - printf "container-urxvt/%s/tmux -2u new-session -s default -A\n" \ - ${${cntdir:t}#container.} - img_has_bins $imgdir abduco && \ - printf "abduco/%s/shell/zsh -li\n" ${${cntdir:t}#container.} - printf "container-urxvt/%s/zsh -li\n" ${${cntdir:t}#container.} - fi - fi - done -} /run/service/container.*.$USER - -# TODO: change to containerized ssh -#awk '$1 == "Host" && $2 !~ /\*/ {printf "ssh/%s\n", $2; printf "ssh2/%s\n", $2}' ~/.ssh/config - -# vim: ft=zsh sts=4 ts=4 sw=4 noet === removed file 'bin/svstat-all' --- old/bin/svstat-all 2024-04-11 16:14:41 +0000 +++ new/bin/svstat-all 1970-01-01 00:00:00 +0000 @@ -1,19 +0,0 @@ -#!/bin/zsh -setopt extended_glob no_unset -zmodload -F zsh/stat b:zstat -for sv in /run/service/* /run/user/$UID/service/*; do - svstat=- - [[ -r $sv/supervise/lock ]] && svstat=$(s6-svstat $sv) - printf '%s\t%s\n' $sv $svstat - if [[ $sv == /run/service/container.* && -r /run/containers/${sv##*/container.}/run/service/.s6-svscan/lock ]]; then - for sv2 in /run/containers/${sv##*/container.}/run/service/*(N); do - sv_name=${sv2:t} - svstat=- - if zstat -L -A lnk +link $sv2 && [[ $lnk[1] == /run/* ]]; then - sv2=${sv2:h:h:h}${lnk[1]} - fi - [[ -r $sv2/supervise/lock ]] && svstat=$(s6-svstat $sv2) - printf '\t%s\t%s\n' $sv_name $svstat - done - fi -done === modified file 'home/container-setup' (properties changed: +x to -x) --- old/home/container-setup 2024-04-11 16:14:41 +0000 +++ new/home/container-setup 2024-04-05 18:32:10 +0000 @@ -24,12 +24,11 @@ } setup-sndio() { - local sndio_container=sndiod.$USER + local sndio_container=alpine-sndio.$USER local sndio_dir=$DSTROOT/run/inbox/$sndio_container/sndio-$UID s6-svc -wU -T 4000 -o /run/service/container.$sndio_container || exit $? mkdir -p $sndio_dir || exit $? - ln -fv /run/containers/$sndio_container/tmp/sndio-$UID/sock0 $sndio_dir/ || exit $? - #ln -fv /run/containers/$sndio_container/tmp/sndio-$UID/sock{0,1} $sndio_dir/ || exit $? + ln -fv /run/containers/$sndio_container/tmp/sndio-$UID/sock{0,1} $sndio_dir/ || exit $? } setup-gpg-agent() { @@ -48,12 +47,12 @@ done } -setup-pass-show() { +setup-pass() { local -a svc_names local s svc_names=( "${@//\//!}" ) for s in $svc_names; do - to-current-inbox pass.$USER run/pass/show/$s || exit $? + to-current-inbox pass.$USER run/pass/$s || exit $? done } @@ -66,23 +65,16 @@ setup-urxvt case $CONTAINER_NAME in - (ssh|rcm-ssh) + (ssh) setup-gpg-ssh-agent ;; - (pass) - setup-gpg-agent - ;; - (rcm-browser|te2000-browser|recombee-browser|mpd|void-*-browser|void-mpd) + (recombee-browser|mpd|void-recombee-browser|void-mpd) setup-sndio ;; (alpine-recombee) setup-gpg-agent setup-gpg-ssh-agent ;; - (mail) - setup-gpg-agent - setup-pass-show smtp:/te2000.cz/ccx smtp:/disroot.org/ccx - ;; esac return 0 } === modified file 'home/xsession-setup' --- old/home/xsession-setup 2024-04-11 16:14:41 +0000 +++ new/home/xsession-setup 2024-04-05 18:32:10 +0000 @@ -25,18 +25,6 @@ done } -ensure-container-started() { - [[ $1 == */* ]] && die "Invalid container name: ${(qqq)1}" - s6-svc -wU -T 4000 -o /run/service/container.$1 -} - -to-current-inbox() { - local from_container=$1 - shift - ensure-container-started $from_container - link-to-container-inbox $from_container ${DSTROOT:t} "$@" || exit $? -} - setup-x11() { s6-svwait /run/service/container.X$DISPLAYNUM || exit $? @@ -46,46 +34,33 @@ #ln -f /run/Xauthority.$DISPLAYNUM $DSTROOT/run/Xauthority.$DISPLAYNUM || exit $? printf '%s' >$DSTROOT/home/$USER/run/env/XAUTHORITY /run/Xauthority.$DISPLAYNUM || exit $? + local f=/run/containers/X$DISPLAYNUM.xorg/tmp/.X11-unix/X$DISPLAYNUM + until stat $f; do + [[ $f == / ]] && break + f=$f:h + done ln -f /run/containers/X$DISPLAYNUM.xorg/tmp/.X11-unix/X$DISPLAYNUM $DSTROOT/tmp/.X11-unix/X$DISPLAYNUM || exit $? printf '%s' >$DSTROOT/home/$USER/run/env/DISPLAY :$DISPLAYNUM || exit $? } -setup-xpra() { - local svstat xpra_svc xpra_dir - xpra_svc=/run/service/container.xpra.$USER - xpra_dir=/run/containers/xpra.$USER - svstat=$(s6-svstat -ur $xpra_svc) - if (($!)); then - echo >&2 "Warning: could not read status of service: $xpra_svc" - return - fi - if [[ $svstat != 'true true' ]]; then - echo >&2 "Warning: service not up and running: $xpra_svc" - return - fi - - cp -v /run/Xauthority.$DISPLAYNUM $xpra_dir/run/Xauthority.$DISPLAYNUM || exit $? - #printf '%s' >$DSTROOT/home/$USER/run/env/XAUTHORITY /run/Xauthority.$DISPLAYNUM || exit $? - ln -f /run/containers/X$DISPLAYNUM.xorg/tmp/.X11-unix/X$DISPLAYNUM $xpra_dir/tmp/.X11-unix/X$DISPLAYNUM || exit $? -} - setup-i3status() { - #s6-rc -l /run/user/$USER/s6-rc -u change i3status || exit $? - ln -f /run/user/$USER/xsession/i3status $DSTROOT/run/i3status.s || exit $? + s6-rc -l /run/user/$USER/s6-rc -u change i3status || exit $? + ln -f /run/user/$USER/service/i3status/s $DSTROOT/run/i3status.s || exit $? } setup-pass-list() { - to-current-inbox pass.$USER run/pass/list || exit $? + s6-rc -l /run/user/$USER/s6-rc -u change pass-list || exit $? + ln -f /run/user/$USER/service/pass-list/s $DSTROOT/run/pass-list.s || exit $? } setup-powerbox-menu-list() { - #s6-rc -l /run/user/ccx/s6-rc -u change powerbox-menu-list || exit $? - ln -f /run/user/ccx/xsession/powerbox-menu-list $DSTROOT/run/powerbox-menu-list.s || exit $? + s6-rc -l /run/user/ccx/s6-rc -u change powerbox-menu-list || exit $? + ln -f /run/user/ccx/service/powerbox-menu-list/s $DSTROOT/run/powerbox-menu-list.s || exit $? } setup-svstat() { - #s6-rc -l /run/user/ccx/s6-rc -u change svstat || exit $? - ln -f /run/user/ccx/xsession/svstat $DSTROOT/run/svstat.s || exit $? + s6-rc -l /run/user/ccx/s6-rc -u change svstat || exit $? + ln -f /run/user/ccx/service/svstat/s $DSTROOT/run/svstat.s || exit $? } setup-init() { @@ -107,7 +82,6 @@ copy-skel setup-special setup-x11 - s6-rc -l /run/user/$USER/s6-rc -u change xsession || exit $? setup-i3status setup-pass-list setup-powerbox-menu-list === added directory 'service/container.xsession.6.ccx' === added file 'service/container.xsession.6.ccx/clone-newpid' === added file 'service/container.xsession.6.ccx/down' === added directory 'service/container.xsession.6.ccx/event' === added file 'service/container.xsession.6.ccx/finish' --- old/service/container.xsession.6.ccx/finish 1970-01-01 00:00:00 +0000 +++ new/service/container.xsession.6.ccx/finish 2019-05-30 00:41:18 +0000 @@ -0,0 +1,6 @@ +#!/command/execlineb +foreground { umount /mnt/volumes/containers/user/ccx/xsession.6/root/home } +foreground { umount /mnt/volumes/containers/user/ccx/xsession.6/root/run } +foreground { umount /mnt/volumes/containers/user/ccx/xsession.6/root/tmp } +foreground { umount /mnt/volumes/containers/user/ccx/xsession.6/root } +rm -rf /run/containers/xsession.6.ccx === added file 'service/container.xsession.6.ccx/run' --- old/service/container.xsession.6.ccx/run 1970-01-01 00:00:00 +0000 +++ new/service/container.xsession.6.ccx/run 2019-05-30 00:41:18 +0000 @@ -0,0 +1,22 @@ +#!/command/execlineb +if { rm -rf /run/containers/xsession.6.ccx } +if { mkdir -p /run/containers/xsession.6.ccx/home /run/containers/xsession.6.ccx/run /run/containers/xsession.6.ccx/tmp } +if { chmod 1770 /run/containers/xsession.6.ccx/home /run/containers/xsession.6.ccx/run /run/containers/xsession.6.ccx/tmp } +if { chown root:ccx /run/containers/xsession.6.ccx/home /run/containers/xsession.6.ccx/run /run/containers/xsession.6.ccx/tmp } +if { mount -a --fstab /mnt/volumes/containers/user/ccx/xsession.6/fstab } +if { env HOME=/home/ccx s6-applyuidgid -u 1000 -g 100 -G 1000 /home/ccx/xsession-setup /run/containers/xsession.6.ccx 6 } +#if { rm -rf /mnt/volumes/containers/user/ccx/xsession.6/root/home/ccx } +#if { s6-hiercopy /home/ccx/xsession-skel /mnt/volumes/containers/user/ccx/xsession.6/root/home/ccx } +#if { mkdir -p /mnt/volumes/containers/user/ccx/xsession.6/root/tmp/.X11-unix } +#if { touch /mnt/volumes/containers/user/ccx/xsession.6/root/tmp/.X11-unix/X6 /mnt/volumes/containers/user/ccx/xsession.6/root/tmp/.X11-unix/Xauthority.6 } +#if { s6-svwait /run/service/X6 } +#if { ln -f /run/Xauthority.6 /run/containers/xsession.6.ccx/Xauthority.6 } +env + HOST=carbon + NS_EXTRA="if { mount -o bind,ro /etc/passwd etc/passwd } if { mount -o bind,ro /etc/group etc/group }" + /root/ns_run /mnt/volumes/containers/user/ccx/xsession.6/root /mnt/ns/bin/s6-applyuidgid -u 1000 -g 100 -G 1000 /run/init +# NS_EXTRA="if { mount -o bind,ro /tmp/.X11-unix/X6 tmp/.X11-unix/X6 } if { mount -o ro,bind /run/Xauthority.6 tmp/.X11-unix/Xauthority.6 } if { mount -o bind,ro /etc/passwd etc/passwd } if { mount -o bind,ro /etc/group etc/group }" +# DISPLAY=:6 +# HOME=/home/ccx +# XAUTHORITY=/run/Xauthority.6 +# RUN_CHOWN=1000:100 === added directory 'service/container.xsession.6.ccx/supervise' === added file 'service/container.xsession.6.ccx/supervise/death_tally' Binary files old/service/container.xsession.6.ccx/supervise/death_tally and new/service/container.xsession.6.ccx/supervise/death_tally differ === added file 'service/container.xsession.6.ccx/supervise/lock' === added file 'service/container.xsession.6.ccx/supervise/status' Binary files old/service/container.xsession.6.ccx/supervise/status and new/service/container.xsession.6.ccx/supervise/status differ