=== modified file 'home/container-setup' (properties changed: -x to +x) --- old/home/container-setup 2024-04-05 18:32:10 +0000 +++ new/home/container-setup 2024-03-21 16:50:43 +0000 @@ -13,14 +13,7 @@ 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 $CONTAINER_NAME.$USER "$@" || exit $? + s6-svc -wU -T 4000 -o /run/service/container.$1.$USER } setup-sndio() { @@ -32,48 +25,38 @@ } setup-gpg-agent() { - to-current-inbox gpg.$USER run/gnupg/gpg-agent.sock -} - -setup-gpg-ssh-agent() { - to-current-inbox gpg.$USER run/gnupg/gpg-agent-ssh.sock -} - -setup-urxvt() { - local sock session - for sock in /run/containers/xsession.*.$USER/run/exec/urxvt(N); do - session=${sock:h:h:h:t} - link-to-container-inbox $session $CONTAINER_NAME.$USER run/exec/urxvt || exit $? - done + s6-rc -v2 -u -l /run/user/${UID}/s6-rc change fdholder + ln -fv /run/user/$UID/gpg-agent-ssh.sock $DSTROOT/run/inbox/ || exit $? + ln -fv /run/user/$UID/gpg-agent.sock $DSTROOT/run/inbox/ || exit $? } setup-pass() { local -a svc_names local s svc_names=( "${@//\//!}" ) + s6-rc -v2 -u -l /run/user/${UID}/s6-rc change pass-show-"$^svc_names" || exit $? + mkdir -p $DSTROOT/run/inbox/pass || exit $? for s in $svc_names; do - to-current-inbox pass.$USER run/pass/$s || exit $? + ln -fv /run/user/$UID/service/pass-show-$s/s $DSTROOT/run/inbox/pass/$s || exit $? done } main() { if ! [[ -d $DSTROOT ]]; then - echo >&2 "Destination root not a directory: $DSTROOT" + echo >&2 "Destination root not a directory: $DSTROOT" exit 2 fi - setup-urxvt - case $CONTAINER_NAME in - (ssh) - setup-gpg-ssh-agent - ;; - (recombee-browser|mpd|void-recombee-browser|void-mpd) + (void-recombee-browser|void-te2000-browser|void-mpd|twitch) setup-sndio ;; - (alpine-recombee) - setup-gpg-agent - setup-gpg-ssh-agent + (alpine-recombee|recombee-k8s) + setup-gpg-agent + ;; + (mail) + setup-gpg-agent + setup-pass smtp:/te2000.cz/ccx ;; esac return 0 === modified file 'home/xsession-setup' --- old/home/xsession-setup 2024-04-05 18:32:10 +0000 +++ new/home/xsession-setup 2024-03-21 16:50:43 +0000 @@ -1,7 +1,7 @@ #!/bin/zsh setopt no_unset extended_glob warn_create_global typeset -g DSTROOT DISPLAYNUM REPO_ROOT -set -x +#set -x DSTROOT=$1 DISPLAYNUM=$2 REPO_ROOT=${0:P:h:h} @@ -26,31 +26,23 @@ } setup-x11() { - s6-svwait /run/service/container.X$DISPLAYNUM || exit $? - - #ls -lhA --full-time /run /run/containers /run/containers/X$DISPLAYNUM.xorg/tmp /run/containers/X$DISPLAYNUM.xorg/tmp/.X11-unix $DSTROOT $DSTROOT/run - - cp -v /run/Xauthority.$DISPLAYNUM $DSTROOT/run/Xauthority.$DISPLAYNUM || exit $? - #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 $? + s6-svwait /run/service/X$DISPLAYNUM || exit $? + + ln -f /run/Xauthority.$DISPLAYNUM $DSTROOT/run/Xauthority.$DISPLAYNUM || exit $? + printf '%s' >$DSTROOT/home/ccx/run/env/XAUTHORITY /run/Xauthority.$DISPLAYNUM || exit $? + + ln -f /run/X11/X$DISPLAYNUM $DSTROOT/tmp/.X11-unix/X$DISPLAYNUM || exit $? + printf '%s' >$DSTROOT/home/ccx/run/env/DISPLAY :$DISPLAYNUM || exit $? } setup-i3status() { - 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 $? + s6-rc -l /run/user/ccx/s6-rc -u change i3status || exit $? + ln -f /run/user/ccx/service/i3status/s $DSTROOT/run/i3status.s || exit $? } setup-pass-list() { - 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 $? + s6-rc -l /run/user/ccx/s6-rc -u change pass-list || exit $? + ln -f /run/user/ccx/service/pass-list/s $DSTROOT/run/pass-list.s || exit $? } setup-powerbox-menu-list() { === modified file 'xsession-skel/homedir/.config/containers/list' --- old/xsession-skel/homedir/.config/containers/list 2024-04-05 18:32:10 +0000 +++ new/xsession-skel/homedir/.config/containers/list 2024-03-21 16:50:43 +0000 @@ -1,23 +1,12 @@ alpine-browsers.ccx +alpine-dev.ccx +alpine-games.ccx +alpine-jack.ccx alpine-recombee.ccx gomuks.ccx -gpg.ccx mail.ccx -mpd.ccx -neonmodem.ccx -pentoo.ccx profanity.ccx -recombee-browser.ccx senpai.ccx -signal.ccx -simplex.ccx -sndiod.ccx -socials.ccx -spark.ccx -ssh.ccx -te2000-browser.ccx -telegram.ccx testssl.ccx -tor.ccx -twitch.ccx +void-musl-gajim.ccx weechat.ccx === modified file 'xsession-skel/homedir/run/init' --- old/xsession-skel/homedir/run/init 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/run/init 2022-10-12 21:16:24 +0000 @@ -4,20 +4,9 @@ /bin/cd / s6-setsid -qb -- umask 022 - if { s6-echo -n -- "\n* user container init: " } foreground { uname -n } - s6-envdir -I -- "/home/ccx/run/"/env - -if { s6-echo -- "\n* current environment: " } -if { env } - -if { s6-echo -- "\n* checking X11 availability: " } -if { importas -i HOST HOST stat /tmp/.X11-unix/${HOST} } -if { xprop -root } - -if { s6-echo -- "\n* OK, starting up services: " } redirfd -r 0 /dev/null background { === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5900/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5900/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5900/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5901/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5901/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5901/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5902/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5902/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5902/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5903/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5903/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5903/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5904/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5904/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5904/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5905/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5905/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5905/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5906/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5906/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5906/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5907/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5907/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5907/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5908/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5908/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5908/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167 === modified file 'xsession-skel/homedir/s6-rc/source/vnc.5909/run' --- old/xsession-skel/homedir/s6-rc/source/vnc.5909/run 2024-04-05 18:18:31 +0000 +++ new/xsession-skel/homedir/s6-rc/source/vnc.5909/run 2021-03-12 20:03:23 +0000 @@ -1,6 +1,6 @@ #!/bin/execlineb -P s6-envdir env importas -i -u vnc_port vnc_port -s6-tcpserver -1 127.0.0.1 ${vnc_port} +s6-tcpserver4 -1 127.0.0.1 ${vnc_port} s6-ipcclient /run/vnc.${vnc_port} s6-ioconnect -0167