Skip to content

Commit

Permalink
build: Fix moar
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Oct 19, 2024
1 parent 7869ebd commit cfd149c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
16 changes: 9 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ Remember to use _Ctrl-P_ (for fzf) and `f` (for rg=ripgrep; and _Ctrl-H_ in VSC)

- shellcheck pre-commit and GitHub action, fix all errors

- Replace the massive copy/paste in the Bash shell scripts with a library of Shell functions (at least, if not something better)

- https://sw.kovidgoyal.net/kitty/kittens/hints/

- [DNF v5](https://www.zdnet.com/google-amp/article/how-to-install-dnf5-on-fedora-39-for-faster-application-installation-and-management/)? Try in container!

- fix SSH_AUTH_SOCK "bug" in dotfiles
- Remember how https://github.com/vorburger/vorburger-dotfiles-bin-etc/commit/36771f62ac2c31e40cbc9d72ca58adef00c263db
- Remember how https://github.com/vorburger/vorburger-dotfiles-bin-etc/commit/36771f62ac2c31e40cbc9d72ca58adef00c263db
was reverted on 2023-01-07, see https://github.com/vorburger/vorburger-dotfiles-bin-etc/commit/6bafbde1afd456fca5d32761f09142584058bb97
- Cannot "ssh localhsot" in GNOME Terminal instead of in Kitty
- Cannot "ssh localhsot" in GNOME Terminal instead of in Kitty
because `SSH_AUTH_SOCKET` was set to `/run/user/1000/keyring/ssh` instead of `/home/vorburger/.ssh.agent` ...
- Retrace what set this where!
- Move `SSH_AUTH_SOCKET` magic from `bin/tmux-local`, `bin/tmux3` and `tmux-ssh` to... some place "earlier".
- This is also why VSC Remote localhost fails... does that work now?
- Do the VSC Beancount Extensions for LLnP work remotely now? Probably not, just like they don't from the laptop. Open issues.
- This might fix the git-server login? Not sure, could be unrelated.
- Retrace what set this where!
- Move `SSH_AUTH_SOCKET` magic from `bin/tmux-local`, `bin/tmux3` and `tmux-ssh` to... some place "earlier".
- This is also why VSC Remote localhost fails... does that work now?
- Do the VSC Beancount Extensions for LLnP work remotely now? Probably not, just like they don't from the laptop. Open issues.
- This might fix the git-server login? Not sure, could be unrelated.

- Make `alias c` use `glow` or `mdcat` instead of `bat` IFF MD

Expand Down
2 changes: 1 addition & 1 deletion container/devshell/test-ssh-agent
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ssh-add -l

docker rm --force test-"$1" || true
docker run -d -p 2222 --name test-"$1" "$1"
PORT="$(docker port test-"$1" | sed 's/2222\/tcp -> 0.0.0.0://')"
PORT="$(docker port test-"$1" | head -n1 | sed 's/2222\/tcp -> 0.0.0.0://')"
sleep 2

rm -f /tmp/test-$$-id_rsa*
Expand Down
2 changes: 1 addition & 1 deletion container/git-server/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cp /tmp/test-$$-id_rsa.pub /tmp/test-$$-id_rsa.ssh/authorized_keys

docker rm --force test-git-server || true
docker run -d -p 2222 -v /tmp/test-$$-id_rsa.ssh/:/home/git/.ssh/:ro,Z --name test-git-server git-server
PORT="$(docker port test-git-server | sed 's/2222\/tcp -> 0.0.0.0://')"
PORT="$(docker port test-git-server | head -n1 | sed 's/2222\/tcp -> 0.0.0.0://')"
sleep 2

ssh -i /tmp/test-$$-id_rsa -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -p "$PORT" [email protected] && exit 1
Expand Down
10 changes: 5 additions & 5 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ cd "$(dirname "$0")"
# but use the 'vorburger' user created in the ./Dockerfile, instead of creating a 'tester' on the fly..
# (TODO avoid copy/paste from ../container/devshell/test-ssh-agent, which itself copy/pasted from ../sshd/test)

docker rm --force --time=1 test-vorburger-again || true
docker rm --force test-vorburger-again || true
docker run -d -p 2222 --name test-vorburger-again vorburger
PORT="$(docker port test-vorburger-again | sed 's/2222\/tcp -> 0.0.0.0://')"
PORT="$(docker port test-vorburger-again | head -n1 | sed 's/2222\/tcp -> 0.0.0.0://')"

rm -f /tmp/test-$$-id_rsa*
ssh-keygen -f /tmp/test-$$-id_rsa -P "" -C test-vorburger-again
docker cp /tmp/test-$$-id_rsa test-vorburger-again:/home/vorburger/.ssh/test.pubkey
docker exec test-vorburger-again cat /home/vorburger/.ssh/test.pubkey >> /home/vorburger/.ssh/authorized_keys
ssh -A -i /tmp/test-$$-id_rsa -o "StrictHostKeyChecking=no" -p $PORT vorburger@localhost ssh-add -l
ssh -A -i /tmp/test-$$-id_rsa -o "StrictHostKeyChecking=no" -p "$PORT" vorburger@localhost ssh-add -l

# This tests if the local SSH YubiKey works (which does not work on CI)
ssh -A -o "StrictHostKeyChecking=no" -p $PORT vorburger@localhost ssh-add -l
ssh -A -o "StrictHostKeyChecking=no" -p "$PORT" vorburger@localhost ssh-add -l

docker rm --force --time=1 test-vorburger-again
docker rm --force test-vorburger-again

echo Test ~vorburger successful.
2 changes: 1 addition & 1 deletion toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euxo pipefail

docker build -t vorburger-toolbox -f Dockerfile-toolbox .
docker rm --force --time=1 vorburger-toolbox || true
docker rm --force vorburger-toolbox || true
toolbox create -i vorburger-toolbox
toolbox enter vorburger-toolbox

0 comments on commit cfd149c

Please sign in to comment.